Skip to content

Commit

Permalink
- optimized placement of tools by parenting them to the world object
Browse files Browse the repository at this point in the history
- implemented visibility component to make open and close tool work
  • Loading branch information
ptc-rdeleeuw committed Jun 3, 2024
1 parent 81a4ceb commit 6806dc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/gltfExample/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ class GLTFExample2 {
const rootWhenClosed = document.querySelector('#rootWhenClosed');
this.#envelope = new Envelope(this.#spatialInterface, [], rootWhenOpened, rootWhenClosed, isStackable, areFramesOrdered, isFullscreenFull2D, opensWhenAdded);
this.#envelope.onOpen(() => {
this.#baseTool.setVisible(true);
});
this.#envelope.onClose(() => {
this.#baseTool.setVisible(false);
});
this.#envelope.onBlur(() => {
});
Expand Down

0 comments on commit 6806dc8

Please sign in to comment.