Skip to content

Commit

Permalink
- introduced release function to release/dispose 3d resources
Browse files Browse the repository at this point in the history
- introduced caching for gltfloader
- introduced resource references
- fixed protocol communication with multiple tools
  • Loading branch information
ptc-rdeleeuw committed Jun 5, 2024
1 parent f5a96da commit 12dd669
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/gltfExample/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class GLTFExample2 {
const gltfLoader = new GltfLoaderComponentNode(new GltfLoaderComponentStore());
gltfLoader.setUrl(self.location.href.substring(0, self.location.href.lastIndexOf('/')) + "/flagab.glb");
this.#gltfObject.addComponent(1, gltfLoader);
this.#gltfObject.addComponent(2, new SimpleAnimationComponentNode());
//this.#gltfObject.addComponent(2, new SimpleAnimationComponentNode());
this.#gltfObject.setScale(1000, 1000, 1000);
this.#baseTool.getTool().setChild("gltfObject", this.#gltfObject);
}
this.#gltfObject.getComponentByType(SimpleAnimationComponentNode.TYPE).setAnimation((timestamp) => {
/*this.#gltfObject.getComponentByType(SimpleAnimationComponentNode.TYPE).setAnimation((timestamp) => {
return {x: 0, y: this.#amplitude * Math.sin(2.0 * Math.PI * this.#frequency * timestamp), z: 0};
});
});*/
}

/**
Expand Down

0 comments on commit 12dd669

Please sign in to comment.