Skip to content

Commit

Permalink
fix(composer): support Windows dependency file paths in GLTF loader (#…
Browse files Browse the repository at this point in the history
…417)

* Add example 3D model with textures referenced with Windows paths for testing
  • Loading branch information
hwandersman committed Jan 5, 2023
1 parent 5228a39 commit 9f7c075
Show file tree
Hide file tree
Showing 8 changed files with 7,363 additions and 0 deletions.
Binary file added packages/scene-composer/public/tesla-model.bin
Binary file not shown.
7,351 changes: 7,351 additions & 0 deletions packages/scene-composer/public/tesla-model.gltf

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions packages/scene-composer/public/tesla-model/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Model Information:
* title: Tesla Model Y 2021
* source: https://sketchfab.com/3d-models/tesla-model-y-2021-e0f703b823e74746b40634d1876f6a13
* author: SQUIR3D (https://sketchfab.com/SQUIR3D)

Model License:
* license type: SKETCHFAB Editorial (https://sketchfab.com/licenses)
* requirements: Use only in connection with events that are newsworthy or of public interest

If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Tesla Model Y 2021" (https://sketchfab.com/3d-models/tesla-model-y-2021-e0f703b823e74746b40634d1876f6a13) by SQUIR3D (https://sketchfab.com/SQUIR3D) licensed under SKETCHFAB Editorial (https://sketchfab.com/licenses)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/scene-composer/src/three/TwinMakerFileLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class TwinMakerFileLoader extends THREE.FileLoader {
}

load(url: string, onLoad?: OnFileLoaderLoadFunc, onProgress?: OnProgressFunc, onError?: OnErrorFunc) {
url = url.replaceAll('\\', '/');
url = this.manager ? this.manager.resolveURL(url) : url;

const promise = this.getSceneObjectFunction?.(url);
Expand Down

0 comments on commit 9f7c075

Please sign in to comment.