https://github.com/kije/three-d-gltf-import
glTF 2.0 loader for three-d
https://github.com/kije/three-d-gltf-import
Last synced: about 2 months ago
JSON representation
glTF 2.0 loader for three-d
- Host: GitHub
- URL: https://github.com/kije/three-d-gltf-import
- Owner: kije
- License: mit
- Created: 2021-04-04T17:25:28.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-05T16:09:56.000Z (about 5 years ago)
- Last Synced: 2025-10-28T18:59:35.741Z (8 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# three-d-gltf-import
This crate implements a GLTF loader for the [three-d](https://crates.io/crates/three-d) crate. It supports both desktop and wasm target.
It supports loading `.gltf` as well as `.glb` (binary) files, and can handle embedded (e.g. via base64) or external references to buffers and images (relative paths to the GLTF-File, `file://` on desktop, `http[s]://` for wasm).
Internally ist ueses the [`gltf`](https://crates.io/crates/gltf) crate to parse the GLTF files.
## THIS CRATE IS STILL UNDER DEVELOPMENT
## Usage
TODO
## Testing
For testing purposes, some sample models from [https://github.com/KhronosGroup/glTF-Sample-Models]() are used (stored in `/sample_models`.
The repository with sample models is added via a git submodule and can be initialized via:
```bash
git submodule update --init --recursive
```
### WASM/Browser
In order to run WASM tests, the steps outlined [here](https://rustwasm.github.io/wasm-bindgen/wasm-bindgen-test/usage.html#appendix-using-wasm-bindgen-test-without-wasm-pack) need to be performed.
After that, the tests can be run with this command:
```bash
WASM_BINDGEN_TEST_TIMEOUT=600 cargo test --target wasm32-unknown-unknown
```
Note: Test-Timout needs to be set pretty high since some test that load bigger/complex models can take a long time.