提交 be9ead22 编写于 作者: M Mr.doob

Updated examples builds.

上级 9a514bf5
......@@ -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 ) );
}
......
......@@ -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;
......
......@@ -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,
......
......@@ -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 ),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册