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

Updated builds.

上级 d0a39528
......@@ -21220,8 +21220,6 @@
frameOfRef = value;
isExclusive = session.exclusive;
console.log( 0 );
} );
}
......@@ -21238,8 +21236,6 @@
this.requestAnimationFrame = function ( callback ) {
console.log( 1 );
function onFrame( time, frame ) {
pose = frame.getDevicePose( frameOfRef );
......@@ -143,10 +143,10 @@ new p,r=new da;r.bounds=new ba(0,0,.5,1);r.layers.enable(1);var t=new da;t.bound
h.makeTranslation(0,d.userHeight,0);b=f.pose;var c=null!==g?g:a;c.matrix.copy(h);c.matrix.decompose(c.position,c.quaternion,c.scale);null!==b.orientation&&(u.fromArray(b.orientation),c.quaternion.multiply(u));null!==b.position&&(u.setFromRotationMatrix(h),n.fromArray(b.position),n.applyQuaternion(u),c.position.add(n));c.updateMatrixWorld();if(!1===e.isPresenting)return a;r.near=a.near;t.near=a.near;r.far=a.far;t.far=a.far;q.matrixWorld.copy(a.matrixWorld);q.matrixWorldInverse.copy(a.matrixWorldInverse);
r.matrixWorldInverse.fromArray(f.leftViewMatrix);t.matrixWorldInverse.fromArray(f.rightViewMatrix);k.getInverse(h);r.matrixWorldInverse.multiply(k);t.matrixWorldInverse.multiply(k);a=c.parent;null!==a&&(m.getInverse(a.matrixWorld),r.matrixWorldInverse.multiply(m),t.matrixWorldInverse.multiply(m));r.matrixWorld.getInverse(r.matrixWorldInverse);t.matrixWorld.getInverse(t.matrixWorldInverse);r.projectionMatrix.fromArray(f.leftProjectionMatrix);t.projectionMatrix.fromArray(f.rightProjectionMatrix);q.projectionMatrix.copy(r.projectionMatrix);
a=e.getLayers();a.length&&(a=a[0],null!==a.leftBounds&&4===a.leftBounds.length&&r.bounds.fromArray(a.leftBounds),null!==a.rightBounds&&4===a.rightBounds.length&&t.bounds.fromArray(a.rightBounds));return q};this.getStandingMatrix=function(){return h};this.isPresenting=b;this.requestAnimationFrame=function(a){e.requestAnimationFrame(a)};this.submitFrame=function(){b()&&e.submitFrame()};this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",c)}}function Gg(a){function b(){return null!==
d&&null!==e}var c=null,d=null,e=null,f=null,g=new da;g.layers.enable(1);g.viewport=new ba;var h=new da;h.layers.enable(2);h.viewport=new ba;var k=new Dc([g,h]);k.layers.enable(1);k.layers.enable(2);this.enabled=!1;this.getDevice=function(){return c};this.setDevice=function(b){void 0!==b&&(c=b);a.setCompatibleXRDevice(b)};this.setSession=function(b){d=b;null!==d&&(d.baseLayer=new XRWebGLLayer(d,a),d.requestFrameOfReference("stage").then(function(a){e=a;console.log(0)}))};this.getCamera=function(a){return b()?
k:a};this.isPresenting=b;this.requestAnimationFrame=function(b){console.log(1);d.requestAnimationFrame(function(c,g){f=g.getDevicePose(e);c=d.baseLayer;g=g.views;for(var h=0;h<g.length;h++){var m=g[h],n=c.getViewport(m),u=f.getViewMatrix(m),l=k.cameras[h];l.projectionMatrix.fromArray(m.projectionMatrix);l.matrixWorldInverse.fromArray(u);l.matrixWorld.getInverse(l.matrixWorldInverse);l.viewport.set(n.x,n.y,n.width,n.height);0===h&&(k.matrixWorld.copy(l.matrixWorld),k.matrixWorldInverse.copy(l.matrixWorldInverse),
k.projectionMatrix.copy(l.projectionMatrix))}a.bindFramebuffer(a.FRAMEBUFFER,d.baseLayer.framebuffer);b()})};this.submitFrame=function(){}}function Xd(a){function b(){la=new Hf(D);la.get("WEBGL_depth_texture");la.get("OES_texture_float");la.get("OES_texture_float_linear");la.get("OES_texture_half_float");la.get("OES_texture_half_float_linear");la.get("OES_standard_derivatives");la.get("OES_element_index_uint");la.get("ANGLE_instanced_arrays");ja=new Ve(D,la);Ra=new Ff(D,la,a);Z=new Eg(D,la,ja);Z.scissor(S.copy(aa).multiplyScalar(U));
Z.viewport(V.copy(N).multiplyScalar(U));fb=new Kf(D);Ba=new tg;ea=new Fg(D,la,Z,Ba,Ra,ja,fb);ra=new yf(D);sa=new If(D,ra,fb);qa=new Nf(sa,fb);va=new Mf(D);oa=new sg(T,la,Ra);ta=new xg;pa=new Cg;ma=new Df(T,Z,qa,R);wa=new Ef(D,la,fb);xa=new Jf(D,la,fb);ya=new Dg(T,D,Z,ea,Ra);fb.programs=oa.programs;T.context=D;T.capabilities=Ra;T.extensions=la;T.properties=Ba;T.renderLists=ta;T.state=Z;T.info=fb}function c(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function d(){console.log("THREE.WebGLRenderer: Context Restored.");
d&&null!==e}var c=null,d=null,e=null,f=null,g=new da;g.layers.enable(1);g.viewport=new ba;var h=new da;h.layers.enable(2);h.viewport=new ba;var k=new Dc([g,h]);k.layers.enable(1);k.layers.enable(2);this.enabled=!1;this.getDevice=function(){return c};this.setDevice=function(b){void 0!==b&&(c=b);a.setCompatibleXRDevice(b)};this.setSession=function(b){d=b;null!==d&&(d.baseLayer=new XRWebGLLayer(d,a),d.requestFrameOfReference("stage").then(function(a){e=a}))};this.getCamera=function(a){return b()?k:a};
this.isPresenting=b;this.requestAnimationFrame=function(b){d.requestAnimationFrame(function(c,g){f=g.getDevicePose(e);c=d.baseLayer;g=g.views;for(var h=0;h<g.length;h++){var m=g[h],n=c.getViewport(m),u=f.getViewMatrix(m),l=k.cameras[h];l.projectionMatrix.fromArray(m.projectionMatrix);l.matrixWorldInverse.fromArray(u);l.matrixWorld.getInverse(l.matrixWorldInverse);l.viewport.set(n.x,n.y,n.width,n.height);0===h&&(k.matrixWorld.copy(l.matrixWorld),k.matrixWorldInverse.copy(l.matrixWorldInverse),k.projectionMatrix.copy(l.projectionMatrix))}a.bindFramebuffer(a.FRAMEBUFFER,
d.baseLayer.framebuffer);b()})};this.submitFrame=function(){}}function Xd(a){function b(){la=new Hf(D);la.get("WEBGL_depth_texture");la.get("OES_texture_float");la.get("OES_texture_float_linear");la.get("OES_texture_half_float");la.get("OES_texture_half_float_linear");la.get("OES_standard_derivatives");la.get("OES_element_index_uint");la.get("ANGLE_instanced_arrays");ja=new Ve(D,la);Ra=new Ff(D,la,a);Z=new Eg(D,la,ja);Z.scissor(S.copy(aa).multiplyScalar(U));Z.viewport(V.copy(N).multiplyScalar(U));
fb=new Kf(D);Ba=new tg;ea=new Fg(D,la,Z,Ba,Ra,ja,fb);ra=new yf(D);sa=new If(D,ra,fb);qa=new Nf(sa,fb);va=new Mf(D);oa=new sg(T,la,Ra);ta=new xg;pa=new Cg;ma=new Df(T,Z,qa,R);wa=new Ef(D,la,fb);xa=new Jf(D,la,fb);ya=new Dg(T,D,Z,ea,Ra);fb.programs=oa.programs;T.context=D;T.capabilities=Ra;T.extensions=la;T.properties=Ba;T.renderLists=ta;T.state=Z;T.info=fb}function c(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function d(){console.log("THREE.WebGLRenderer: Context Restored.");
I=!1;b()}function e(a){a=a.target;a.removeEventListener("dispose",e);f(a);Ba.remove(a)}function f(a){var b=Ba.get(a).program;a.program=void 0;void 0!==b&&oa.releaseProgram(b)}function g(a,b,c){a.render(function(a){T.renderBufferImmediate(a,b,c)})}function h(){na.isPresenting()?na.requestAnimationFrame(k):window.requestAnimationFrame(k)}function k(a){!1!==ua&&(za(a),h())}function m(a,b,c){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isLight)B.pushLight(a),a.castShadow&&B.pushShadow(a);else if(a.isSprite)a.frustumCulled&&
!da.intersectsSprite(a)||B.pushSprite(a);else if(a.isImmediateRenderObject)c&&Qb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(qd),z.push(a,null,a.material,Qb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||da.intersectsObject(a)){c&&Qb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(qd);var d=qa.update(a),e=a.material;if(Array.isArray(e))for(var f=d.groups,g=0,h=f.length;g<h;g++){var k=f[g],n=e[k.materialIndex];n&&n.visible&&z.push(a,
d,n,Qb.z,k)}else e.visible&&z.push(a,d,e,Qb.z,null)}a=a.children;g=0;for(h=a.length;g<h;g++)m(a[g],b,c)}}function u(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],h=g.object,k=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera){Mb=c;for(var u=c.cameras,r=0,l=u.length;r<l;r++){var t=u[r];if(h.layers.test(t.layers)){if("viewport"in t)Z.viewport(V.copy(t.viewport));else{var q=t.bounds;Z.viewport(V.set(q.x*X,q.y*ca,q.z*X,q.w*ca).multiplyScalar(U))}n(h,b,t,k,m,g)}}}else Mb=null,n(h,
......
......@@ -21214,8 +21214,6 @@ function WebXRManager( gl ) {
frameOfRef = value;
isExclusive = session.exclusive;
console.log( 0 );
} );
}
......@@ -21232,8 +21230,6 @@ function WebXRManager( gl ) {
this.requestAnimationFrame = function ( callback ) {
console.log( 1 );
function onFrame( time, frame ) {
pose = frame.getDevicePose( frameOfRef );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册