未验证 提交 29ff8202 编写于 作者: M Michael Herzog 提交者: GitHub

Updated examples builds. (#22527)

上级 67dcebc3
......@@ -217,27 +217,6 @@
if ( planeIntersect ) {
let space = this.space;
if ( this.mode === 'scale' ) {
space = 'local';
} else if ( this.axis === 'E' || this.axis === 'XYZE' || this.axis === 'XYZ' ) {
space = 'world';
}
if ( space === 'local' && this.mode === 'rotate' ) {
const snap = this.rotationSnap;
if ( this.axis === 'X' && snap ) this.object.rotation.x = Math.round( this.object.rotation.x / snap ) * snap;
if ( this.axis === 'Y' && snap ) this.object.rotation.y = Math.round( this.object.rotation.y / snap ) * snap;
if ( this.axis === 'Z' && snap ) this.object.rotation.z = Math.round( this.object.rotation.z / snap ) * snap;
}
this.object.updateMatrixWorld();
this.object.parent.updateMatrixWorld();
......
......@@ -93,7 +93,7 @@
}
if ( i === breaks - 1 ) {
if ( i === breaks.length - 1 ) {
for ( let j = 0; j < 4; j ++ ) {
......
......@@ -6,15 +6,15 @@
class SAOPass extends THREE.Pass {
constructor( scene, camera, depthTexture, useNormals, resolution ) {
constructor( scene, camera, useDepthTexture = false, useNormals = false, resolution = new THREE.Vector2( 256, 256 ) ) {
super();
this.scene = scene;
this.camera = camera;
this.clear = true;
this.needsSwap = false;
this.supportsDepthTextureExtension = depthTexture !== undefined ? depthTexture : false;
this.supportsNormalTexture = useNormals !== undefined ? useNormals : false;
this.supportsDepthTextureExtension = useDepthTexture;
this.supportsNormalTexture = useNormals;
this.originalClearColor = new THREE.Color();
this._oldClearColor = new THREE.Color();
this.oldClearAlpha = 1;
......@@ -30,7 +30,7 @@
saoBlurStdDev: 4,
saoBlurDepthCutoff: 0.01
};
this.resolution = resolution !== undefined ? new THREE.Vector2( resolution.x, resolution.y ) : new THREE.Vector2( 256, 256 );
this.resolution = new THREE.Vector2( resolution.x, resolution.y );
this.saoRenderTarget = new THREE.WebGLRenderTarget( this.resolution.x, this.resolution.y, {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
......@@ -44,10 +44,11 @@
format: THREE.RGBAFormat
} );
this.depthRenderTarget = this.normalRenderTarget.clone();
let depthTexture;
if ( this.supportsDepthTextureExtension ) {
const depthTexture = new THREE.DepthTexture();
depthTexture = new THREE.DepthTexture();
depthTexture.type = THREE.UnsignedShortType;
this.beautyRenderTarget.depthTexture = depthTexture;
this.beautyRenderTarget.depthBuffer = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册