Skip to content

Commit

Permalink
Addons: Refactored InteractiveGroup. (#834)
Browse files Browse the repository at this point in the history
* Addons: Refactored InteractiveGroup.

* Update three.js

* Add examples

* Update patch

* Delete examples
  • Loading branch information
Methuselah96 authored Feb 22, 2024
1 parent 20580bd commit c777aa5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14522,7 +14522,7 @@ index b659652..06e3224 100644
//

diff --git a/examples-testing/examples/webxr_vr_sandbox.ts b/examples-testing/examples/webxr_vr_sandbox.ts
index aa80cf7..e929206 100644
index 6ffadcf..b3b80e3 100644
--- a/examples-testing/examples/webxr_vr_sandbox.ts
+++ b/examples-testing/examples/webxr_vr_sandbox.ts
@@ -12,9 +12,9 @@ import { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFa
Expand All @@ -14538,7 +14538,7 @@ index aa80cf7..e929206 100644

const parameters = {
radius: 0.6,
@@ -197,7 +197,7 @@ function animate() {
@@ -199,7 +199,7 @@ function animate() {

function render() {
const time = performance.now() * 0.0002;
Expand All @@ -14547,7 +14547,7 @@ index aa80cf7..e929206 100644
torus.rotation.x = time * 0.4;
torus.rotation.y = time;

@@ -205,5 +205,9 @@ function render() {
@@ -207,5 +207,9 @@ function render() {
stats.update();

// Canvas elements doesn't trigger DOM updates, so we have to update the texture
Expand Down
4 changes: 3 additions & 1 deletion types/three/examples/jsm/interactive/InteractiveGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ export interface InteractiveObject3DEventMap extends Object3DEventMap {
export class InteractiveObject3D extends Object3D<InteractiveObject3DEventMap> {}

export class InteractiveGroup extends Group {
constructor(renderer: WebGLRenderer, camera: Camera);
listenToPointerEvents(renderer: WebGLRenderer, camera: Camera): void;

listenToXRControllerEvents(renderer: WebGLRenderer): void;
}

0 comments on commit c777aa5

Please sign in to comment.