We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
container
1 parent 9059d18 commit 364cf4eCopy full SHA for 364cf4e
examples/jsm/helpers/ViewHelper.js
@@ -148,8 +148,8 @@ class ViewHelper extends THREE.Object3D {
148
if ( this.animating === true ) return false;
149
150
const rect = dom.getBoundingClientRect();
151
- const offsetX = rect.left + ( container.dom.offsetWidth - dim );
152
- const offsetY = rect.top + ( container.dom.offsetHeight - dim );
+ const offsetX = rect.left + ( dom.offsetWidth - dim );
+ const offsetY = rect.top + ( dom.offsetHeight - dim );
153
mouse.x = ( ( event.clientX - offsetX ) / ( rect.width - offsetX ) ) * 2 - 1;
154
mouse.y = - ( ( event.clientY - offsetY ) / ( rect.bottom - offsetY ) ) * 2 + 1;
155
0 commit comments