Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework for version 2.0 #422

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "glTF-Sample-Assets"]
path = glTF-Sample-Assets
url = https://github.com/KhronosGroup/glTF-Sample-Assets.git
47 changes: 12 additions & 35 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,38 @@ rust-version = "1.61"
travis-ci = { repository = "gltf-rs/gltf" }

[workspace]
members = ["gltf-derive", "gltf-json"]
members = ["gltf-derive"]

[dev-dependencies]
approx = "0.5"

[dependencies]
base64 = { optional = true, version = "0.13" }
byteorder = "1.3"
gltf-json = { path = "gltf-json", version = "=1.4.1" }
gltf-derive = { path = "gltf-derive", version = "=1.4.1" }
lazy_static = "1"
urlencoding = { optional = true, version = "2.1" }
serde = "1.0"
serde_derive = "1.0"
serde_json = { features = ["raw_value"], version = "1.0" }
serde_repr = "0.1"
serde_with = "3.6"

[dependencies.image]
[dependencies.image_crate]
default-features = false
package = "image"
features = ["jpeg", "png"]
optional = true
version = "0.25"

[features]
default = ["import", "utils", "names"]
allow_empty_texture = ["gltf-json/allow_empty_texture"]
extensions = ["gltf-json/extensions"]
extras = ["gltf-json/extras"]
names = ["gltf-json/names"]
default = ["import", "utils"]
allow_empty_texture = []
extensions = []
utils = []
import = ["base64", "image", "urlencoding"]
KHR_lights_punctual = ["gltf-json/KHR_lights_punctual"]
KHR_materials_pbrSpecularGlossiness = ["gltf-json/KHR_materials_pbrSpecularGlossiness"]
KHR_materials_unlit = ["gltf-json/KHR_materials_unlit"]
KHR_texture_transform = ["gltf-json/KHR_texture_transform"]
KHR_materials_transmission = ["gltf-json/KHR_materials_transmission"]
KHR_materials_ior = ["gltf-json/KHR_materials_ior"]
KHR_materials_variants = ["gltf-json/KHR_materials_variants"]
KHR_materials_volume = ["gltf-json/KHR_materials_volume"]
KHR_materials_specular = ["gltf-json/KHR_materials_specular"]
KHR_materials_emissive_strength = ["gltf-json/KHR_materials_emissive_strength"]
import = ["base64", "image_crate", "urlencoding"]
guess_mime_type = []

[[example]]
name = "gltf-display"
path = "examples/display/main.rs"

[[example]]
name = "gltf-export"
path = "examples/export/main.rs"

[[example]]
name = "gltf-roundtrip"
path = "examples/roundtrip/main.rs"

[[example]]
name = "gltf-tree"
path = "examples/tree/main.rs"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ This crate is intended to load [glTF 2.0](https://www.khronos.org/gltf), a file

See the [crate documentation](https://docs.rs/gltf) for example usage.

### Features

#### Extras and names

By default, `gltf` ignores all `extras` and `names` included with glTF assets. You can negate this by enabling the `extras` and `names` features, respectively.

```toml
[dependencies.gltf]
version = "1.4"
features = ["extras", "names"]
```

#### glTF extensions

The following glTF extensions are supported by the crate:
Expand All @@ -54,13 +42,6 @@ The following glTF extensions are supported by the crate:
- `KHR_materials_ior`
- `KHR_materials_emissive_strength `

To use an extension, list its name in the `features` section.

```toml
[dependencies.gltf]
features = ["KHR_materials_unlit"]
```

### Examples

#### gltf-display
Expand Down
Binary file removed examples/Box.glb
Binary file not shown.
Loading
Loading