Browse Source

Updated examples builds.

Mr.doob 2 years ago
parent
commit
920d4c34d3

+ 1 - 1
examples/js/controls/TransformControls.js

@@ -184,7 +184,7 @@
 
 			if ( this.camera.isOrthographicCamera ) {
 
-				this.camera.getWorldDirection( this.eye );
+				this.camera.getWorldDirection( this.eye ).negate();
 
 			} else {
 

+ 3 - 2
examples/js/interactive/InteractiveGroup.js

@@ -21,8 +21,9 @@
 			function onPointerEvent( event ) {
 
 				event.stopPropagation();
-				_pointer.x = event.clientX / element.clientWidth * 2 - 1;
-				_pointer.y = - ( event.clientY / element.clientHeight ) * 2 + 1;
+				const rect = renderer.domElement.getBoundingClientRect();
+				_pointer.x = ( event.clientX - rect.left ) / rect.width * 2 - 1;
+				_pointer.y = - ( event.clientY - rect.top ) / rect.height * 2 + 1;
 				raycaster.setFromCamera( _pointer, camera );
 				const intersects = raycaster.intersectObjects( scope.children, false );
 

+ 3 - 3
examples/js/utils/BufferGeometryUtils.js

@@ -345,7 +345,7 @@
 		// a set of InterleavedBufferAttributes for each attribute
 		let TypedArray;
 		let arrayLength = 0;
-		let stride = 0; // calculate the the length and type of the interleavedBuffer
+		let stride = 0; // calculate the length and type of the interleavedBuffer
 
 		for ( let i = 0, l = attributes.length; i < l; ++ i ) {
 
@@ -515,7 +515,7 @@
 	/**
  * @param {BufferGeometry} geometry
  * @param {number} tolerance
- * @return {BufferGeometry>}
+ * @return {BufferGeometry}
  */
 
 
@@ -656,7 +656,7 @@
 	/**
  * @param {BufferGeometry} geometry
  * @param {number} drawMode
- * @return {BufferGeometry>}
+ * @return {BufferGeometry}
  */