2
0
Mr.doob 3 жил өмнө
parent
commit
be9ead22f7

+ 2 - 2
examples/js/animation/CCDIKSolver.js

@@ -179,13 +179,13 @@
 
 					if ( rotationMin !== undefined ) {
 
-						link.rotation.setFromVector3( link.rotation.toVector3( _vector ).max( rotationMin ) );
+						link.rotation.setFromVector3( _vector.setFromEuler( link.rotation ).max( rotationMin ) );
 
 					}
 
 					if ( rotationMax !== undefined ) {
 
-						link.rotation.setFromVector3( link.rotation.toVector3( _vector ).min( rotationMax ) );
+						link.rotation.setFromVector3( _vector.setFromEuler( link.rotation ).min( rotationMax ) );
 
 					}
 

+ 1 - 1
examples/js/misc/ProgressiveLightMap.js

@@ -315,7 +315,7 @@
 
 			};
 
-			this.blurringPlane = new THREE.Mesh( new THREE.PlaneBufferGeometry( 1, 1 ), blurMaterial );
+			this.blurringPlane = new THREE.Mesh( new THREE.PlaneGeometry( 1, 1 ), blurMaterial );
 			this.blurringPlane.name = 'Blurring Plane';
 			this.blurringPlane.frustumCulled = false;
 			this.blurringPlane.renderOrder = 0;

+ 4 - 14
examples/js/objects/Reflector.js

@@ -12,7 +12,7 @@
 			const textureHeight = options.textureHeight || 512;
 			const clipBias = options.clipBias || 0;
 			const shader = options.shader || Reflector.ReflectorShader;
-			const multisample = options.multisample || 4; //
+			const multisample = options.multisample !== undefined ? options.multisample : 4; //
 
 			const reflectorPlane = new THREE.Plane();
 			const normal = new THREE.Vector3();
@@ -26,19 +26,9 @@
 			const q = new THREE.Vector4();
 			const textureMatrix = new THREE.Matrix4();
 			const virtualCamera = new THREE.PerspectiveCamera();
-			let renderTarget;
-
-			if ( multisample > 0 ) {
-
-				renderTarget = new THREE.WebGLMultisampleRenderTarget( textureWidth, textureHeight );
-				renderTarget.samples = multisample;
-
-			} else {
-
-				renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight );
-
-			}
-
+			const renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, {
+				samples: multisample
+			} );
 			const material = new THREE.ShaderMaterial( {
 				uniforms: THREE.UniformsUtils.clone( shader.uniforms ),
 				fragmentShader: shader.fragmentShader,

+ 4 - 14
examples/js/objects/Refractor.js

@@ -12,7 +12,7 @@
 			const textureHeight = options.textureHeight || 512;
 			const clipBias = options.clipBias || 0;
 			const shader = options.shader || Refractor.RefractorShader;
-			const multisample = options.multisample || 4; //
+			const multisample = options.multisample !== undefined ? options.multisample : 4; //
 
 			const virtualCamera = new THREE.PerspectiveCamera();
 			virtualCamera.matrixAutoUpdate = false;
@@ -21,19 +21,9 @@
 			const refractorPlane = new THREE.Plane();
 			const textureMatrix = new THREE.Matrix4(); // render target
 
-			let renderTarget;
-
-			if ( multisample > 0 ) {
-
-				renderTarget = new THREE.WebGLMultisampleRenderTarget( textureWidth, textureHeight );
-				renderTarget.samples = multisample;
-
-			} else {
-
-				renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight );
-
-			} // material
-
+			const renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, {
+				samples: multisample
+			} ); // material
 
 			this.material = new THREE.ShaderMaterial( {
 				uniforms: THREE.UniformsUtils.clone( shader.uniforms ),