Skip to content

Commit

Permalink
simplified entities
Browse files Browse the repository at this point in the history
  • Loading branch information
ptc-rdeleeuw committed May 30, 2024
1 parent 33ba7c6 commit 17c93d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/gltfExample/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import WorldStore from "/objectDefaultFiles/scene/WorldStore.js";
import {ParentMessageInterface} from "/objectDefaultFiles/scene/MessageInterface.js";
import EntityNode from "/objectDefaultFiles/scene/EntityNode.js";
import EntityStore from "/objectDefaultFiles/scene/EntityStore.js";
import DefaultEntity from "/objectDefaultFiles/scene/DefaultEntity.js";
import GltfLoaderComponentNode from "/objectDefaultFiles/scene/GltfLoaderComponentNode.js";
import GltfLoaderComponentStore from "/objectDefaultFiles/scene/GltfLoaderComponentStore.js";

Expand Down Expand Up @@ -74,7 +75,7 @@ class GLTFExample {
this.#world.setState(state);
this.#tool = this.#world.get("threejsContainer").get("tools").values()[0]; // <- server will only send content for this tool (world with one tool)
if (!this.#tool.hasChild("gltfObject")) {
this.#gltfObject = new EntityNode(new EntityStore());
this.#gltfObject = new EntityNode(new EntityStore(new DefaultEntity()));
const gltfLoader = new GltfLoaderComponentNode(new GltfLoaderComponentStore());
gltfLoader.setUrl(self.location.href.substring(0, self.location.href.lastIndexOf('/')) + "/flagab.glb");
this.#gltfObject.addComponent(1, gltfLoader);
Expand Down

0 comments on commit 17c93d1

Please sign in to comment.