|
@@ -691,10 +691,10 @@ Eb;Eb.prototype.isMeshDistanceMaterial=!0;Eb.prototype.copy=function(a){L.protot
|
|
|
{constructor:Ne,isArrayCamera:!0});Gb.prototype=Object.assign(Object.create(C.prototype),{constructor:Gb,isGroup:!0});Object.assign(Md.prototype,{constructor:Md,getHandSpace:function(){if(null===this._hand&&(this._hand=new Gb,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState={pinching:!1},window.XRHand))for(var a=0;a<=window.XRHand.LITTLE_PHALANX_TIP;a++){var b=new Gb;b.matrixAutoUpdate=!1;b.visible=!1;this._hand.joints.push(b);this._hand.add(b)}return this._hand},
|
|
|
getTargetRaySpace:function(){null===this._targetRay&&(this._targetRay=new Gb,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1);return this._targetRay},getGripSpace:function(){null===this._grip&&(this._grip=new Gb,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1);return this._grip},dispatchEvent:function(a){null!==this._targetRay&&this._targetRay.dispatchEvent(a);null!==this._grip&&this._grip.dispatchEvent(a);null!==this._hand&&this._hand.dispatchEvent(a);return this},disconnect:function(a){this.dispatchEvent({type:"disconnected",
|
|
|
data:a});null!==this._targetRay&&(this._targetRay.visible=!1);null!==this._grip&&(this._grip.visible=!1);null!==this._hand&&(this._hand.visible=!1);return this},update:function(a,b,c){var d=null,e=null,f=null,g=this._targetRay,h=this._grip,l=this._hand;if(a)if(a.hand){f=!0;for(var k=0;k<=window.XRHand.LITTLE_PHALANX_TIP;k++)if(a.hand[k]){var q=b.getJointPose(a.hand[k],c),p=l.joints[k];null!==q&&(p.matrix.fromArray(q.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.jointRadius=
|
|
|
-q.radius);p.visible=null!==q;q=l.joints[window.XRHand.INDEX_PHALANX_TIP].position.distanceTo(l.joints[window.XRHand.THUMB_PHALANX_TIP].position);l.inputState.pinching&&.025<q?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",target:this})):!l.inputState.pinching&&.015>=q&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",target:this}))}}else null!==g&&(d=b.getPose(a.targetRaySpace,c),null!==d&&(g.matrix.fromArray(d.transform.matrix),g.matrix.decompose(g.position,g.rotation,
|
|
|
-g.scale))),null!==h&&a.gripSpace&&(e=b.getPose(a.gripSpace,c),null!==e&&(h.matrix.fromArray(e.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale)));null!==g&&(g.visible=null!==d);null!==h&&(h.visible=null!==e);null!==l&&(l.visible=null!==f);return this}});Object.assign(Vh.prototype,Ea.prototype);og.prototype=Object.assign(Object.create(Nd.prototype),{constructor:og,isWebGL1Renderer:!0});Object.assign(Oe.prototype,{isFogExp2:!0,clone:function(){return new Oe(this.color,this.density)},
|
|
|
-toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Pe.prototype,{isFog:!0,clone:function(){return new Pe(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(Ba.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Ba.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},
|
|
|
-copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(a){void 0===a.arrayBuffers&&(a.arrayBuffers={});void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=P.generateUUID());void 0===a.arrayBuffers[this.array.buffer._uuid]&&
|
|
|
+q.radius);p.visible=null!==q;q=l.joints[window.XRHand.INDEX_PHALANX_TIP].position.distanceTo(l.joints[window.XRHand.THUMB_PHALANX_TIP].position);l.inputState.pinching&&.025<q?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:a.handedness,target:this})):!l.inputState.pinching&&.015>=q&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:a.handedness,target:this}))}}else null!==g&&(d=b.getPose(a.targetRaySpace,c),null!==d&&(g.matrix.fromArray(d.transform.matrix),
|
|
|
+g.matrix.decompose(g.position,g.rotation,g.scale))),null!==h&&a.gripSpace&&(e=b.getPose(a.gripSpace,c),null!==e&&(h.matrix.fromArray(e.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale)));null!==g&&(g.visible=null!==d);null!==h&&(h.visible=null!==e);null!==l&&(l.visible=null!==f);return this}});Object.assign(Vh.prototype,Ea.prototype);og.prototype=Object.assign(Object.create(Nd.prototype),{constructor:og,isWebGL1Renderer:!0});Object.assign(Oe.prototype,{isFogExp2:!0,clone:function(){return new Oe(this.color,
|
|
|
+this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Pe.prototype,{isFog:!0,clone:function(){return new Pe(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(Ba.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Ba.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=
|
|
|
+a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;d<e;d++)this.array[a+d]=b.array[c+d];return this},set:function(a,b){void 0===b&&(b=0);this.array.set(a,b);return this},clone:function(a){void 0===a.arrayBuffers&&(a.arrayBuffers={});void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=P.generateUUID());void 0===a.arrayBuffers[this.array.buffer._uuid]&&
|
|
|
(a.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);a=new this.array.constructor(a.arrayBuffers[this.array.buffer._uuid]);a=new Ba(a,this.stride);a.setUsage(this.usage);return a},onUpload:function(a){this.onUploadCallback=a;return this},toJSON:function(a){void 0===a.arrayBuffers&&(a.arrayBuffers={});void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=P.generateUUID());void 0===a.arrayBuffers[this.array.buffer._uuid]&&(a.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer)));
|
|
|
return{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});var uc=new m;Object.defineProperties(Hb.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(a){this.data.needsUpdate=a}}});Object.assign(Hb.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(a){for(var b=0,c=this.data.count;b<c;b++)uc.x=this.getX(b),uc.y=this.getY(b),uc.z=this.getZ(b),uc.applyMatrix4(a),
|
|
|
this.setXYZ(b,uc.x,uc.y,uc.z);return this},setX:function(a,b){this.data.array[a*this.data.stride+this.offset]=b;return this},setY:function(a,b){this.data.array[a*this.data.stride+this.offset+1]=b;return this},setZ:function(a,b){this.data.array[a*this.data.stride+this.offset+2]=b;return this},setW:function(a,b){this.data.array[a*this.data.stride+this.offset+3]=b;return this},getX:function(a){return this.data.array[a*this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.data.stride+
|