Skip to content

Commit

Permalink
Updated gltf dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
frzi committed Dec 19, 2021
1 parent d2893ec commit 181c090
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
targets: ["Model3DView"]),
],
dependencies: [
.package(url: "https://github.com/frzi/GLTFSceneKit", revision: "5981b86dc6e6e7bc910a5e38b03bea4c4053a5fd"),
.package(url: "https://github.com/frzi/GLTFSceneKit", revision: "589cac03b34a7f5103d14b3741bfcd8add417593"),
.package(url: "https://github.com/timdonnelly/DisplayLink", from: "0.2.0"),
],
targets: [
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Below a quick rundown of *Model3DView*'s features.

Using *Model3DView* couldn't possibly be more easy. Use the `Model3DView` like any other view:
```swift
import Model3DViewD
import Model3DView

struct MyView: View {
var body: some View {
Expand Down Expand Up @@ -128,19 +128,19 @@ Model3DView(named: "garden.obj")

<br>

### Skyboxes and IBL (image based lighting)
### Skybox and IBL (image based lighting)
*Model3DView* does not allow you to place lights in the scenery. Instead you can set the mood by using environment maps and the skybox texture.
```swift
Model3DView(file: product.path)
.ibl(named: "studio.exr", intensity: 2)
.ibl(named: "studio_env.exr", intensity: 2)
.skybox(named: "studio.jpg")
```

*Note: IBL only affects assets using a PBR material.*

<br>

## FAQ ℹ️
## FAQ
### Can I use this to make 3D games?
***No***. It is very important to understand *Model3DView* is made to only render 3D models in your SwiftUI app, with very limited interaction. It's nothing more than an 'ImageView' to easily spruce up your app with 3D graphics.

Expand Down
4 changes: 2 additions & 2 deletions Sources/Model3DView/Model3DView.docc/QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ With Model3DView displaying a 3D model is as easy as displaying an image. Additi
## Displaying a 3D model

``Model3DView/Model3DView`` can display a 3D model from three different sources:
* Use ``Model3DView/Model3DView/init(file:)`` to reference a file using a file `URL`
* ``Model3DView/Model3DView/init(file:)`` to reference a file using a file `URL`
* ``Model3DView/Model3DView/init(named:)`` to reference a file from the app's bundle
* ``Model3DView/Model3DView/init(scene:)`` to render a `SCNScene`.

```swift
Model3DView(named: "duck.gltf")
```

The model and camera will be centered to show the model by default.
The model and camera will be centered by default.

- Note: When referencing a `SCNScene` instance, its contents will be copied to an internal SceneKit scene. Modifications made to the original `SCNScene` will have no effect to the scene rendered by Model3DView.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 181c090

Please sign in to comment.