x_ite 8.9.2 → 8.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +77 -73
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +19 -19
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +31 -30
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +71 -83
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +38 -38
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -24
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +18 -18
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +778 -801
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_posts/getting-started.md +7 -1
- package/package.json +2 -2
- package/src/tests.js +360 -0
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +11 -20
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +8 -5
- package/src/x_ite/Components/Geometry3D/Extrusion.js +10 -12
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +46 -56
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +44 -40
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +7 -6
- package/src/x_ite/Components/Networking/X3DUrlObject.js +2 -3
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +11 -13
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +4 -6
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +8 -9
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +8 -4
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +20 -21
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +12 -13
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +6 -7
- package/src/x_ite/Components/Scripting/Script.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
/* X_ITE v8.9.2 */(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Components");var i=e.n(t);const n=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Fields");var s=e.n(n);const o=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Base/X3DFieldDefinition");var r=e.n(o);const a=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Base/FieldDefinitionArray");var c=e.n(a);const h=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Components/Core/X3DSensorNode");var p=e.n(h);const l=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Rendering/TraverseType");var d=e.n(l);const g=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Base/X3DConstants");var u=e.n(g);const m=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Namespace");var y=e.n(m);let _=0;const w={MATCH_ANY:_++,MATCH_EVERY:_++,MATCH_ONLY_ONE:_++};y().set("x_ite/Browser/Picking/MatchCriterion",w);const k=w;let S=0;const b={BOUNDS:S++,GEOMETRY:S++};y().set("x_ite/Browser/Picking/IntersectionType",b);const f=b;let v=0;const O={ANY:v++,CLOSEST:v++,ALL:v++,ALL_SORTED:v++};y().set("x_ite/Browser/Picking/SortOrder",O);const T=O,N=window[Symbol.for("X_ITE.X3D-8.9.2")].require("standard/Math/Numbers/Matrix4");var C=e.n(N);function P(e,t){this.array=e,t&&(this.compare=t)}Object.assign(P.prototype,{compare:(e,t)=>e<t,sort(e,t){t-e>1&&this.quicksort(e,t-1)},quicksort(e,t){let i=e,n=t;const{array:s,compare:o}=this,r=s[e+t>>>1];for(;;){for(;o(s[i],r);)++i;for(;o(r,s[n]);)--n;if(!(i<n)){i===n&&(++i,--n);break}{const e=s[i];s[i]=s[n],s[n]=e,i++,n--}}e<n&&this.quicksort(e,n),i<t&&this.quicksort(i,t)}});const G=P;y().set("standard/Math/Algorithms/QuickSort",G);const M=G,x=window[Symbol.for("X_ITE.X3D-8.9.2")].require("standard/Utility/ObjectCache");var B,j,A,F=e.n(x)()(C());function E(e,t){return e.distance<t.distance}function D(e){p().call(this,e),this.addType(u().X3DPickSensorNode),this.objectType=new Set,this.intersectionType=f.BOUNDS,this.sortOrder=T.CLOSEST,this.pickTargetNodes=new Set,this.modelMatrices=[],this.targets=[],this.targets.size=0,this.pickedTargets=[],this.pickedTargetsSorter=new M(this.pickedTargets,E),this.pickedGeometries=new(s().MFNode)}Object.assign(Object.setPrototypeOf(D.prototype,p().prototype),{initialize(){this.getLive().addInterest("set_live__",this),this._enabled.addInterest("set_live__",this),this._objectType.addInterest("set_objectType__",this),this._matchCriterion.addInterest("set_matchCriterion__",this),this._intersectionType.addInterest("set_intersectionType__",this),this._sortOrder.addInterest("set_sortOrder__",this),this._pickTarget.addInterest("set_pickTarget__",this),this.set_objectType__(),this.set_matchCriterion__(),this.set_intersectionType__(),this.set_sortOrder__(),this.set_pickTarget__()},getObjectType(){return this.objectType},getMatchCriterion(){return this.matchCriterion},getIntersectionType(){return this.intersectionType},getSortOrder(){return this.sortOrder},getModelMatrices(){return this.modelMatrices},getTargets(){return this.targets},getPickShape:(()=>{const e=new WeakMap;return function(t){const i=e.get(t);if(void 0!==i)return i;const n=this.getBrowser(),s=n.getPrivateScene().createNode("Shape",!1),o=n.getPrivateScene().createNode("CollidableShape",!1);return s.setPrivate(!0),o.setPrivate(!0),o.setConvex(!0),s._geometry=t,o._shape=s,s.setup(),o.setup(),e.set(t,o),o}})(),getPickedGeometries:function(){var e=this.targets,t=e.size,i=this.pickedTargets,n=this.pickedGeometries;i.length=0;for(var s=0;s<t;++s){var o=e[s];o.intersected&&i.push(o)}if(0===i.length)return n.length=0,n;switch(this.sortOrder){case T.ANY:i.length=1,n[0]=this.getPickedGeometry(i[0]),n.length=1;break;case T.CLOSEST:this.pickedTargetsSorter.sort(0,i.length),i.length=1,n[0]=this.getPickedGeometry(i[0]),n.length=1;break;case T.ALL:s=0;for(var r=i.length;s<r;++s)n[s]=this.getPickedGeometry(i[s]);n.length=r;break;case T.ALL_SORTED:for(this.pickedTargetsSorter.sort(0,i.length),s=0,r=i.length;s<r;++s)n[s]=this.getPickedGeometry(i[s]);n.length=r}return n},getPickedGeometry(e){var t=this.getExecutionContext(),i=e.geometryNode;if(i.getExecutionContext()===t)return i;if((o=i.getExecutionContext()).getType().includes(u().X3DPrototypeInstance)&&o.getExecutionContext()===t)return o;for(var n=e.pickingHierarchy,s=n.length-1;s>=0;--s){var o,r=n[s];if(r.getExecutionContext()===t)return r;if((o=r.getExecutionContext()).getType().includes(u().X3DPrototypeInstance)&&o.getExecutionContext()===t)return o}return null},getPickedTargets(){return this.pickedTargets},set_live__(){this.getLive().getValue()&&this._enabled.getValue()&&!this.objectType.has("NONE")?(this.getBrowser().addPickSensor(this),this.setPickableObject(!0)):(this.getBrowser().removePickSensor(this),this.setPickableObject(!1))},set_objectType__(){this.objectType.clear();for(var e=0,t=this._objectType.length;e<t;++e)this.objectType.add(this._objectType[e]);this.set_live__()},set_matchCriterion__:(A=new Map([["MATCH_ANY",k.MATCH_ANY],["MATCH_EVERY",k.MATCH_EVERY],["MATCH_ONLY_ONE",k.MATCH_ONLY_ONE]]),function(){this.matchCriterion=A.get(this._matchCriterion.getValue()),void 0===this.matchCriterion&&(this.matchCriterion=MatchCriterionType.MATCH_ANY)}),set_intersectionType__:(j=new Map([["BOUNDS",f.BOUNDS],["GEOMETRY",f.GEOMETRY]]),function(){this.intersectionType=j.get(this._intersectionType.getValue()),void 0===this.intersectionType&&(this.intersectionType=f.BOUNDS)}),set_sortOrder__:(B=new Map([["ANY",T.ANY],["CLOSEST",T.CLOSEST],["ALL",T.ALL],["ALL_SORTED",T.ALL_SORTED]]),function(){this.sortOrder=B.get(this._sortOrder.getValue()),void 0===this.sortOrder&&(this.sortOrder=T.CLOSEST)}),set_pickTarget__(){this.pickTargetNodes.clear();for(var e=0,t=this._pickTarget.length;e<t;++e)try{for(var i=this._pickTarget[e].getValue().getInnerNode(),n=i.getType(),s=n.length-1;s>=0;--s)switch(n[s]){case u().Inline:case u().Shape:case u().X3DGroupingNode:this.pickTargetNodes.add(i);break;default:continue}}catch{}},traverse(e,t){e===d().PICKING&&this.isPickableObject()&&this.modelMatrices.push(F.pop().assign(t.getModelViewMatrix().get()))},collect(e,t,i){var n=this.pickTargetNodes;if(i.some((e=>n.has(e)))){var s=this.targets;if(s.size<s.length)var o=s[s.size];else{o={modelMatrix:new(C()),pickingHierarchy:[],pickedPoint:[],intersections:[]};s.push(o)}++s.size,o.intersected=!1,o.geometryNode=e,o.pickedPoint.length=0,o.intersections.length=0,o.modelMatrix.assign(t);for(var r=o.pickingHierarchy,a=0,c=i.length;a<c;++a)r[a]=i[a];r.length=c}},process(){for(var e=this.modelMatrices,t=0,i=e.length;t<i;++t)F.push(e[t]);this.modelMatrices.length=0,this.targets.size=0}}),Object.defineProperties(D,{typeName:{value:"X3DPickSensorNode",enumerable:!0},componentName:{value:"Picking",enumerable:!0}});const I=D;y().set("x_ite/Components/Picking/X3DPickSensorNode",I);const L=I,z=window[Symbol.for("X_ITE.X3D-8.9.2")].require("standard/Math/Numbers/Vector3");var V=e.n(z);const X=window[Symbol.for("X_ITE.X3D-8.9.2")].require("standard/Math/Geometry/Box3");var R=e.n(X);const q=window[Symbol.for("X_ITE.X3D-8.9.2")].require("standard/Math/Geometry/Line3");var Y,H,U,W,K,Q,Z,J,$,ee,te,ie,ne,se,oe,re,ae=e.n(q);function ce(e){L.call(this,e),this.addType(u().LinePickSensor),this.pickingGeometryNode=null}Object.assign(Object.setPrototypeOf(ce.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode=null;try{for(var e=this._pickingGeometry.getValue().getInnerNode(),t=e.getType(),i=t.length-1;i>=0;--i)switch(t[i]){case u().IndexedLineSet:case u().LineSet:this.pickingGeometryNode=e;break;default:continue}}catch{}},process:(Y=new(R()),H=new(R()),U=new(V())(0,0,0),W=new(V())(0,0,0),K=new(C()),Q=new(V())(0,0,0),Z=new(V())(0,0,0),J=new(ae())(V().Zero,V().zAxis),$=new(V())(0,0,0),ee=new(V())(0,0,0),te=[],ie=[],ne=new(V())(0,0,0),se=new(s().MFVec3f),oe=new(s().MFVec3f),re=new(s().MFVec3f),function(){if(this.pickingGeometryNode){var e=this.getModelMatrices(),t=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var i=0,n=e.length;i<n;++i){var s=e[i];Y.assign(this.pickingGeometryNode.getBBox()).multRight(s);for(var o=0,r=t.size;o<r;++o){var a=t[o];H.assign(a.geometryNode.getBBox()).multRight(a.modelMatrix),Y.intersectsBox(H)&&(U.assign(Y.center),W.assign(H.center),a.intersected=!0,a.distance=U.distance(W))}}var c=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),c!==this._isActive.getValue()&&(this._isActive=c),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);break;case f.GEOMETRY:for(i=0,n=e.length;i<n;++i)for(s=e[i],Y.assign(this.pickingGeometryNode.getBBox()).multRight(s),o=0,r=t.size;o<r;++o){var h=(a=t[o]).geometryNode,p=this.pickingGeometryNode.getVertices();H.assign(h.getBBox()).multRight(a.modelMatrix),K.assign(a.modelMatrix).inverse().multLeft(s);for(var l=0,d=p.length;l<d;l+=8)if(K.multVecMatrix(Q.set(p[l+0],p[l+1],p[l+2])),K.multVecMatrix(Z.set(p[l+4],p[l+5],p[l+6])),J.setPoints(Q,Z),ie.length=0,h.intersectsLine(J,a.modelMatrix,te,ie))for(var g=0,u=ie.length;g<u;++g){var m=ie[g];$.assign(m.point).subtract(Q),ee.assign(m.point).subtract(Z),$.add(ee).magnitude()<=Q.distance(Z)&&a.intersections.push(m)}a.intersections.length&&(U.assign(Y.center),W.assign(H.center),a.intersected=!0,a.distance=U.distance(W))}var y;c=!!(y=this.getPickedGeometries()).length,y.assign(y.filter((e=>e))),c!==this._isActive.getValue()&&(this._isActive=c),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);var _=this.getPickedTargets();for(se.length=0,oe.length=0,re.length=0,o=0,r=_.length;o<r;++o){var w=_[o].intersections;for(g=0,u=w.length;g<u;++g)o=(m=w[g]).texCoord,ne.set(o.x,o.y,o.z),se.push(ne),oe.push(m.normal),re.push(m.point)}this._pickedTextureCoordinate.equals(se)||(this._pickedTextureCoordinate=se),this._pickedNormal.equals(oe)||(this._pickedNormal=oe),this._pickedPoint.equals(re)||(this._pickedPoint=re)}}L.prototype.process.call(this)})}),Object.defineProperties(ce,{typeName:{value:"LinePickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().outputOnly,"pickedTextureCoordinate",new(s().MFVec3f)),new(r())(u().outputOnly,"pickedNormal",new(s().MFVec3f)),new(r())(u().outputOnly,"pickedPoint",new(s().MFVec3f)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const he=ce;y().set("x_ite/Components/Picking/LinePickSensor",he);const pe=he,le=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Components/Grouping/X3DGroupingNode");var de=e.n(le);function ge(e){this.addType(u().X3DPickableObject),this.objectType=new Set}Object.assign(ge.prototype,{initialize(){this._objectType.addInterest("set_objectType__",this),this.set_objectType__()},getObjectType(){return this.objectType},set_objectType__(){this.objectType.clear();for(var e=0,t=this._objectType.length;e<t;++e)this.objectType.add(this._objectType[e])},dispose(){}}),Object.defineProperties(ge,{typeName:{value:"X3DPickableObject",enumerable:!0},componentName:{value:"Picking",enumerable:!0}});const ue=ge;y().set("x_ite/Components/Picking/X3DPickableObject",ue);const me=ue;function ye(e){de().call(this,e),me.call(this,e),this.addType(u().PickableGroup)}Object.assign(Object.setPrototypeOf(ye.prototype,de().prototype),me.prototype,{initialize(){de().prototype.initialize.call(this),me.prototype.initialize.call(this),this._pickable.addInterest("set_pickable__",this),this.set_pickable__()},set_pickableObjects__(){this.set_pickable__()},set_pickable__(){this.setPickableObject(!(!this._pickable.getValue()&&!this.getTransformSensors().size))},traverse:(()=>{const e=new Set;return function(t,i){if(t===d().PICKING){if(this._pickable.getValue()){if(this.getObjectType().has("NONE"))return;const n=this.getBrowser(),s=n.getPickable();if(this.getObjectType().has("ALL"))s.push(!0),de().prototype.traverse.call(this,t,i),s.pop();else{const o=n.getPickSensors();for(const t of o.at(-1)){if(!t.getObjectType().has("ALL")){let e=0;for(const i of this.getObjectType())if(t.getObjectType().has(i)){++e;break}switch(t.getMatchCriterion()){case k.MATCH_ANY:if(0===e)continue;break;case k.MATCH_EVERY:if(e!==pickSensor.getObjectType().size)continue;break;case k.MATCH_ONLY_ONE:if(1!==e)continue}}e.add(t)}s.push(!0),o.push(e),de().prototype.traverse.call(this,t,i),o.pop(),s.pop(),e.clear()}}}else de().prototype.traverse.call(this,t,i)}})(),dispose(){me.prototype.dispose.call(this),de().prototype.dispose.call(this)}}),Object.defineProperties(ye,{typeName:{value:"PickableGroup",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"pickable",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"visible",new(s().SFBool)(!0)),new(r())(u().inputOutput,"bboxDisplay",new(s().SFBool)),new(r())(u().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(r())(u().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(r())(u().inputOnly,"addChildren",new(s().MFNode)),new(r())(u().inputOnly,"removeChildren",new(s().MFNode)),new(r())(u().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const _e=ye;y().set("x_ite/Components/Picking/PickableGroup",_e);const we=_e,ke=window[Symbol.for("X_ITE.X3D-8.9.2")].require("x_ite/Base/X3DCast");var Se=e.n(ke);const be=window[Symbol.for("X_ITE.X3D-8.9.2")].require("standard/Math/Numbers/Rotation4");var fe=e.n(be);const ve=window[Symbol.for("X_ITE.X3D-8.9.2")].require("lib/ammojs/AmmoClass");var Oe=e.n(ve);function Te(){this.broadphase=new(Oe().btDbvtBroadphase),this.collisionConfiguration=new(Oe().btDefaultCollisionConfiguration),this.dispatcher=new(Oe().btCollisionDispatcher)(this.collisionConfiguration),this.collisionWorld=new(Oe().btCollisionWorld)(this.dispatcher,this.broadphase,this.collisionConfiguration),this.compoundShape1=new(Oe().btCompoundShape),this.motionState1=new(Oe().btDefaultMotionState),this.constructionInfo1=new(Oe().btRigidBodyConstructionInfo)(0,this.motionState1,this.compoundShape1),this.rigidBody1=new(Oe().btRigidBody)(this.constructionInfo1),this.compoundShape2=new(Oe().btCompoundShape),this.motionState2=new(Oe().btDefaultMotionState),this.constructionInfo2=new(Oe().btRigidBodyConstructionInfo)(0,this.motionState2,this.compoundShape2),this.rigidBody2=new(Oe().btRigidBody)(this.constructionInfo2),this.collisionWorld.addCollisionObject(this.rigidBody1),this.collisionWorld.addCollisionObject(this.rigidBody2)}Object.assign(Te.prototype,{constuctor:Te,setChildShape1(e,t){this.setChildShape(this.compoundShape1,e,t)},setChildShape2(e,t){this.setChildShape(this.compoundShape2,e,t)},setChildShape1Components(e,t,i){this.setChildShapeComponents(this.compoundShape1,e,t,i)},setChildShape2Components(e,t,i){this.setChildShapeComponents(this.compoundShape2,e,t,i)},setChildShape:(()=>{const e=new(V())(0,0,0),t=new(fe()),i=new(V())(1,1,1),n=new(Oe().btVector3)(0,0,0);return function(s,o,r){s.getNumChildShapes()&&s.removeChildShapeByIndex(0),r.getNumChildShapes()&&(o.get(e,t,i),n.setValue(i.x,i.y,i.z),r.setLocalScaling(n),s.addChildShape(this.getTransform(e,t),r))}})(),setChildShapeComponents(e,t,i,n){e.getNumChildShapes()&&e.removeChildShapeByIndex(0),n.getNumChildShapes()&&(n.setLocalScaling(i),e.addChildShape(t,n))},contactTest(){this.collisionWorld.performDiscreteCollisionDetection();const e=this.dispatcher.getNumManifolds();for(let t=0;t<e;++t){const e=this.dispatcher.getManifoldByIndexInternal(t),i=e.getNumContacts();for(let t=0;t<i;++t){if(e.getContactPoint(t).getDistance()<=0)return!0}}return!1},getTransform:(()=>{const e=new(Oe().btTransform),t=new(Oe().btVector3)(0,0,0),i=new(C());return function(n,s,o){const r=o||e;return i.set(n,s),t.setValue(i[12],i[13],i[14]),r.getBasis().setValue(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),r.setOrigin(t),r}})()});const Ne=Te;y().set("x_ite/Browser/Picking/VolumePicker",Ne);const Ce=Ne;function Pe(e){L.call(this,e),this.addType(u().PointPickSensor),this.pickingGeometryNode=null,this.picker=new Ce,this.compoundShapes=[]}var Ge,Me,xe;Object.assign(Object.setPrototypeOf(Pe.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode&&this.pickingGeometryNode._rebuild.removeInterest("set_geometry__",this),this.pickingGeometryNode=Se()(u().PointSet,this._pickingGeometry),this.pickingGeometryNode&&this.pickingGeometryNode._rebuild.addInterest("set_geometry__",this),this.set_geometry__()},set_geometry__:(Ge=new(Oe().btVector3)(1,1,1),Me=new(Oe().btVector3),xe=new(Oe().btTransform),function(){var e=this.compoundShapes;if(this.pickingGeometryNode){var t=this.pickingGeometryNode.getCoord();if(t){for(var i=0,n=t.getSize();i<n;++i)if(i<e.length){var s=e[i],o=t.get1Point(i,s.point);Me.setValue(o.x,o.y,o.z),xe.setOrigin(Me),s.setLocalScaling(Ge),s.updateChildTransform(0,xe)}else{s=new(Oe().btCompoundShape);var r=new(Oe().btSphereShape)(0);o=t.get1Point(i,new(V())(0,0,0)),s.point=o,Me.setValue(o.x,o.y,o.z),xe.setOrigin(Me),s.addChildShape(xe,r),e.push(s)}e.length=n}else e.length=0}else e.length=0}),process:(()=>{var e=new(R()),t=new(R()),i=new(V())(0,0,0),n=new(V())(0,0,0),o=new(Oe().btTransform),r=new(Oe().btVector3),a=new(V())(0,0,0),c=new(fe()),h=new(V())(1,1,1),p=new(s().MFVec3f);return function(){if(this.pickingGeometryNode){var s=this.getModelMatrices(),l=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var d=0,g=s.length;d<g;++d){var u=s[d];e.assign(this.pickingGeometryNode.getBBox()).multRight(u);for(var m=0,y=l.size;m<y;++m){var _=l[m];t.assign(_.geometryNode.getBBox()).multRight(_.modelMatrix),e.intersectsBox(t)&&(i.assign(e.center),n.assign(t.center),_.intersected=!0,_.distance=i.distance(n))}}var w=!!(N=this.getPickedGeometries()).length;N.assign(N.filter((e=>e))),w!==this._isActive.getValue()&&(this._isActive=w),this._pickedGeometry.equals(N)||(this._pickedGeometry=N);break;case f.GEOMETRY:var k=this.picker,S=this.compoundShapes;for(d=0,g=s.length;d<g;++d){u=s[d];e.assign(this.pickingGeometryNode.getBBox()).multRight(u),u.get(a,c,h),k.getTransform(a,c,o),r.setValue(h.x,h.y,h.z);for(var b=0,v=S.length;b<v;++b){var O=S[b];k.setChildShape1Components(o,r,O);for(m=0,y=l.size;m<y;++m){_=l[m];var T=this.getPickShape(_.geometryNode);t.assign(_.geometryNode.getBBox()).multRight(_.modelMatrix),k.setChildShape2(_.modelMatrix,T.getCompoundShape()),k.contactTest()&&(i.assign(e.center),n.assign(t.center),_.intersected=!0,_.distance=i.distance(n),_.pickedPoint.push(O.point))}}}var N;w=!!(N=this.getPickedGeometries()).length;N.assign(N.filter((e=>e))),w!==this._isActive.getValue()&&(this._isActive=w),this._pickedGeometry.equals(N)||(this._pickedGeometry=N);var C=this.getPickedTargets();p.length=0;for(m=0,y=C.length;m<y;++m)for(var P=C[m].pickedPoint,G=0,M=P.length;G<M;++G)p.push(P[G]);this._pickedPoint.equals(p)||(this._pickedPoint=p)}}L.prototype.process.call(this)}})()}),Object.defineProperties(Pe,{typeName:{value:"PointPickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().outputOnly,"pickedPoint",new(s().MFVec3f)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const Be=Pe;y().set("x_ite/Components/Picking/PointPickSensor",Be);const je=Be;function Ae(e){L.call(this,e),this.addType(u().PrimitivePickSensor),this.pickingGeometryNode=null,this.picker=new Ce}Object.assign(Object.setPrototypeOf(Ae.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode=null;try{for(var e=this._pickingGeometry.getValue().getInnerNode(),t=e.getType(),i=t.length-1;i>=0;--i)switch(t[i]){case u().Box:case u().Cone:case u().Cylinder:case u().Sphere:this.pickingGeometryNode=e;break;default:continue}}catch{}},process:(()=>{var e=new(R()),t=new(R()),i=new(V())(0,0,0),n=new(V())(0,0,0);return function(){if(this.pickingGeometryNode){var s=this.getModelMatrices(),o=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var r=0,a=s.length;r<a;++r){var c=s[r];e.assign(this.pickingGeometryNode.getBBox()).multRight(c);for(var h=0,p=o.size;h<p;++h){var l=o[h];t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),e.intersectsBox(t)&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);break;case f.GEOMETRY:var g=this.picker;for(r=0,a=s.length;r<a;++r){c=s[r];var u=this.getPickShape(this.pickingGeometryNode);e.assign(this.pickingGeometryNode.getBBox()).multRight(c),g.setChildShape1(c,u.getCompoundShape());for(h=0,p=o.size;h<p;++h){l=o[h];var m=this.getPickShape(l.geometryNode);t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),g.setChildShape2(l.modelMatrix,m.getCompoundShape()),g.contactTest()&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var y;d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y)}}L.prototype.process.call(this)}})()}),Object.defineProperties(Ae,{typeName:{value:"PrimitivePickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const Fe=Ae;y().set("x_ite/Components/Picking/PrimitivePickSensor",Fe);const Ee=Fe;function De(e){L.call(this,e),this.addType(u().VolumePickSensor),this.pickingGeometryNode=null,this.picker=new Ce}Object.assign(Object.setPrototypeOf(De.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode=Se()(u().X3DGeometryNode,this._pickingGeometry)},process:(()=>{var e=new(R()),t=new(R()),i=new(V())(0,0,0),n=new(V())(0,0,0);return function(){if(this.pickingGeometryNode){var s=this.getModelMatrices(),o=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var r=0,a=s.length;r<a;++r){var c=s[r];e.assign(this.pickingGeometryNode.getBBox()).multRight(c);for(var h=0,p=o.size;h<p;++h){var l=o[h];t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),e.intersectsBox(t)&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);break;case f.GEOMETRY:var g=this.picker;for(r=0,a=s.length;r<a;++r){c=s[r];var u=this.getPickShape(this.pickingGeometryNode);e.assign(this.pickingGeometryNode.getBBox()).multRight(c),g.setChildShape1(c,u.getCompoundShape());for(h=0,p=o.size;h<p;++h){l=o[h];var m=this.getPickShape(l.geometryNode);t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),g.setChildShape2(l.modelMatrix,m.getCompoundShape()),g.contactTest()&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var y;d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y)}}L.prototype.process.call(this)}})()}),Object.defineProperties(De,{typeName:{value:"VolumePickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const Ie=De;y().set("x_ite/Components/Picking/VolumePickSensor",Ie);const Le=Ie;i().add({name:"Picking",concreteNodes:[pe,we,je,Ee,Le],abstractNodes:[L,me]});const ze=void 0;y().set("assets/components/Picking",ze)})();
|
|
1
|
+
/* X_ITE v8.9.4 */(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Components");var i=e.n(t);const n=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Fields");var s=e.n(n);const o=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Base/X3DFieldDefinition");var r=e.n(o);const a=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Base/FieldDefinitionArray");var c=e.n(a);const h=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Components/Core/X3DSensorNode");var p=e.n(h);const l=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Rendering/TraverseType");var d=e.n(l);const g=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Base/X3DConstants");var u=e.n(g);const m=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Namespace");var y=e.n(m);let _=0;const w={MATCH_ANY:_++,MATCH_EVERY:_++,MATCH_ONLY_ONE:_++};y().set("x_ite/Browser/Picking/MatchCriterion",w);const k=w;let S=0;const b={BOUNDS:S++,GEOMETRY:S++};y().set("x_ite/Browser/Picking/IntersectionType",b);const f=b;let v=0;const O={ANY:v++,CLOSEST:v++,ALL:v++,ALL_SORTED:v++};y().set("x_ite/Browser/Picking/SortOrder",O);const T=O,N=window[Symbol.for("X_ITE.X3D-8.9.4")].require("standard/Math/Numbers/Matrix4");var C=e.n(N);function P(e,t){this.array=e,t&&(this.compare=t)}Object.assign(P.prototype,{compare:(e,t)=>e<t,sort(e,t){t-e>1&&this.quicksort(e,t-1)},quicksort(e,t){let i=e,n=t;const{array:s,compare:o}=this,r=s[e+t>>>1];for(;;){for(;o(s[i],r);)++i;for(;o(r,s[n]);)--n;if(!(i<n)){i===n&&(++i,--n);break}{const e=s[i];s[i]=s[n],s[n]=e,i++,n--}}e<n&&this.quicksort(e,n),i<t&&this.quicksort(i,t)}});const G=P;y().set("standard/Math/Algorithms/QuickSort",G);const M=G,x=window[Symbol.for("X_ITE.X3D-8.9.4")].require("standard/Utility/ObjectCache");var B,j,A,F=e.n(x)()(C());function E(e,t){return e.distance<t.distance}function D(e){p().call(this,e),this.addType(u().X3DPickSensorNode),this.objectType=new Set,this.intersectionType=f.BOUNDS,this.sortOrder=T.CLOSEST,this.pickTargetNodes=new Set,this.modelMatrices=[],this.targets=[],this.targets.size=0,this.pickedTargets=[],this.pickedTargetsSorter=new M(this.pickedTargets,E),this.pickedGeometries=new(s().MFNode)}Object.assign(Object.setPrototypeOf(D.prototype,p().prototype),{initialize(){this.getLive().addInterest("set_live__",this),this._enabled.addInterest("set_live__",this),this._objectType.addInterest("set_objectType__",this),this._matchCriterion.addInterest("set_matchCriterion__",this),this._intersectionType.addInterest("set_intersectionType__",this),this._sortOrder.addInterest("set_sortOrder__",this),this._pickTarget.addInterest("set_pickTarget__",this),this.set_objectType__(),this.set_matchCriterion__(),this.set_intersectionType__(),this.set_sortOrder__(),this.set_pickTarget__()},getObjectType(){return this.objectType},getMatchCriterion(){return this.matchCriterion},getIntersectionType(){return this.intersectionType},getSortOrder(){return this.sortOrder},getModelMatrices(){return this.modelMatrices},getTargets(){return this.targets},getPickShape:(()=>{const e=new WeakMap;return function(t){const i=e.get(t);if(void 0!==i)return i;const n=this.getBrowser(),s=n.getPrivateScene().createNode("Shape",!1),o=n.getPrivateScene().createNode("CollidableShape",!1);return s.setPrivate(!0),o.setPrivate(!0),o.setConvex(!0),s._geometry=t,o._shape=s,s.setup(),o.setup(),e.set(t,o),o}})(),getPickedGeometries:function(){var e=this.targets,t=e.size,i=this.pickedTargets,n=this.pickedGeometries;i.length=0;for(var s=0;s<t;++s){var o=e[s];o.intersected&&i.push(o)}if(0===i.length)return n.length=0,n;switch(this.sortOrder){case T.ANY:i.length=1,n[0]=this.getPickedGeometry(i[0]),n.length=1;break;case T.CLOSEST:this.pickedTargetsSorter.sort(0,i.length),i.length=1,n[0]=this.getPickedGeometry(i[0]),n.length=1;break;case T.ALL:s=0;for(var r=i.length;s<r;++s)n[s]=this.getPickedGeometry(i[s]);n.length=r;break;case T.ALL_SORTED:for(this.pickedTargetsSorter.sort(0,i.length),s=0,r=i.length;s<r;++s)n[s]=this.getPickedGeometry(i[s]);n.length=r}return n},getPickedGeometry(e){var t=this.getExecutionContext(),i=e.geometryNode;if(i.getExecutionContext()===t)return i;if((o=i.getExecutionContext()).getType().includes(u().X3DPrototypeInstance)&&o.getExecutionContext()===t)return o;for(var n=e.pickingHierarchy,s=n.length-1;s>=0;--s){var o,r=n[s];if(r.getExecutionContext()===t)return r;if((o=r.getExecutionContext()).getType().includes(u().X3DPrototypeInstance)&&o.getExecutionContext()===t)return o}return null},getPickedTargets(){return this.pickedTargets},set_live__(){this.getLive().getValue()&&this._enabled.getValue()&&!this.objectType.has("NONE")?(this.getBrowser().addPickSensor(this),this.setPickableObject(!0)):(this.getBrowser().removePickSensor(this),this.setPickableObject(!1))},set_objectType__(){this.objectType.clear();for(var e=0,t=this._objectType.length;e<t;++e)this.objectType.add(this._objectType[e]);this.set_live__()},set_matchCriterion__:(A=new Map([["MATCH_ANY",k.MATCH_ANY],["MATCH_EVERY",k.MATCH_EVERY],["MATCH_ONLY_ONE",k.MATCH_ONLY_ONE]]),function(){this.matchCriterion=A.get(this._matchCriterion.getValue()),void 0===this.matchCriterion&&(this.matchCriterion=MatchCriterionType.MATCH_ANY)}),set_intersectionType__:(j=new Map([["BOUNDS",f.BOUNDS],["GEOMETRY",f.GEOMETRY]]),function(){this.intersectionType=j.get(this._intersectionType.getValue()),void 0===this.intersectionType&&(this.intersectionType=f.BOUNDS)}),set_sortOrder__:(B=new Map([["ANY",T.ANY],["CLOSEST",T.CLOSEST],["ALL",T.ALL],["ALL_SORTED",T.ALL_SORTED]]),function(){this.sortOrder=B.get(this._sortOrder.getValue()),void 0===this.sortOrder&&(this.sortOrder=T.CLOSEST)}),set_pickTarget__(){this.pickTargetNodes.clear();for(var e=0,t=this._pickTarget.length;e<t;++e)try{for(var i=this._pickTarget[e].getValue().getInnerNode(),n=i.getType(),s=n.length-1;s>=0;--s)switch(n[s]){case u().Inline:case u().Shape:case u().X3DGroupingNode:this.pickTargetNodes.add(i);break;default:continue}}catch{}},traverse(e,t){e===d().PICKING&&this.isPickableObject()&&this.modelMatrices.push(F.pop().assign(t.getModelViewMatrix().get()))},collect(e,t,i){var n=this.pickTargetNodes;if(i.some((e=>n.has(e)))){var s=this.targets;if(s.size<s.length)var o=s[s.size];else{o={modelMatrix:new(C()),pickingHierarchy:[],pickedPoint:[],intersections:[]};s.push(o)}++s.size,o.intersected=!1,o.geometryNode=e,o.pickedPoint.length=0,o.intersections.length=0,o.modelMatrix.assign(t);for(var r=o.pickingHierarchy,a=0,c=i.length;a<c;++a)r[a]=i[a];r.length=c}},process(){for(var e=this.modelMatrices,t=0,i=e.length;t<i;++t)F.push(e[t]);this.modelMatrices.length=0,this.targets.size=0}}),Object.defineProperties(D,{typeName:{value:"X3DPickSensorNode",enumerable:!0},componentName:{value:"Picking",enumerable:!0}});const I=D;y().set("x_ite/Components/Picking/X3DPickSensorNode",I);const L=I,z=window[Symbol.for("X_ITE.X3D-8.9.4")].require("standard/Math/Numbers/Vector3");var V=e.n(z);const X=window[Symbol.for("X_ITE.X3D-8.9.4")].require("standard/Math/Geometry/Box3");var R=e.n(X);const q=window[Symbol.for("X_ITE.X3D-8.9.4")].require("standard/Math/Geometry/Line3");var Y,H,U,W,K,Q,Z,J,$,ee,te,ie,ne,se,oe,re,ae=e.n(q);function ce(e){L.call(this,e),this.addType(u().LinePickSensor),this.pickingGeometryNode=null}Object.assign(Object.setPrototypeOf(ce.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode=null;try{for(var e=this._pickingGeometry.getValue().getInnerNode(),t=e.getType(),i=t.length-1;i>=0;--i)switch(t[i]){case u().IndexedLineSet:case u().LineSet:this.pickingGeometryNode=e;break;default:continue}}catch{}},process:(Y=new(R()),H=new(R()),U=new(V())(0,0,0),W=new(V())(0,0,0),K=new(C()),Q=new(V())(0,0,0),Z=new(V())(0,0,0),J=new(ae())(V().Zero,V().zAxis),$=new(V())(0,0,0),ee=new(V())(0,0,0),te=[],ie=[],ne=new(V())(0,0,0),se=new(s().MFVec3f),oe=new(s().MFVec3f),re=new(s().MFVec3f),function(){if(this.pickingGeometryNode){var e=this.getModelMatrices(),t=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var i=0,n=e.length;i<n;++i){var s=e[i];Y.assign(this.pickingGeometryNode.getBBox()).multRight(s);for(var o=0,r=t.size;o<r;++o){var a=t[o];H.assign(a.geometryNode.getBBox()).multRight(a.modelMatrix),Y.intersectsBox(H)&&(U.assign(Y.center),W.assign(H.center),a.intersected=!0,a.distance=U.distance(W))}}var c=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),c!==this._isActive.getValue()&&(this._isActive=c),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);break;case f.GEOMETRY:for(i=0,n=e.length;i<n;++i)for(s=e[i],Y.assign(this.pickingGeometryNode.getBBox()).multRight(s),o=0,r=t.size;o<r;++o){var h=(a=t[o]).geometryNode,p=this.pickingGeometryNode.getVertices();H.assign(h.getBBox()).multRight(a.modelMatrix),K.assign(a.modelMatrix).inverse().multLeft(s);for(var l=0,d=p.length;l<d;l+=8)if(K.multVecMatrix(Q.set(p[l+0],p[l+1],p[l+2])),K.multVecMatrix(Z.set(p[l+4],p[l+5],p[l+6])),J.setPoints(Q,Z),ie.length=0,h.intersectsLine(J,a.modelMatrix,te,ie))for(var g=0,u=ie.length;g<u;++g){var m=ie[g];$.assign(m.point).subtract(Q),ee.assign(m.point).subtract(Z),$.add(ee).magnitude()<=Q.distance(Z)&&a.intersections.push(m)}a.intersections.length&&(U.assign(Y.center),W.assign(H.center),a.intersected=!0,a.distance=U.distance(W))}var y;c=!!(y=this.getPickedGeometries()).length,y.assign(y.filter((e=>e))),c!==this._isActive.getValue()&&(this._isActive=c),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);var _=this.getPickedTargets();for(se.length=0,oe.length=0,re.length=0,o=0,r=_.length;o<r;++o){var w=_[o].intersections;for(g=0,u=w.length;g<u;++g)o=(m=w[g]).texCoord,ne.set(o.x,o.y,o.z),se.push(ne),oe.push(m.normal),re.push(m.point)}this._pickedTextureCoordinate.equals(se)||(this._pickedTextureCoordinate=se),this._pickedNormal.equals(oe)||(this._pickedNormal=oe),this._pickedPoint.equals(re)||(this._pickedPoint=re)}}L.prototype.process.call(this)})}),Object.defineProperties(ce,{typeName:{value:"LinePickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().outputOnly,"pickedTextureCoordinate",new(s().MFVec3f)),new(r())(u().outputOnly,"pickedNormal",new(s().MFVec3f)),new(r())(u().outputOnly,"pickedPoint",new(s().MFVec3f)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const he=ce;y().set("x_ite/Components/Picking/LinePickSensor",he);const pe=he,le=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Components/Grouping/X3DGroupingNode");var de=e.n(le);function ge(e){this.addType(u().X3DPickableObject),this.objectType=new Set}Object.assign(ge.prototype,{initialize(){this._objectType.addInterest("set_objectType__",this),this.set_objectType__()},getObjectType(){return this.objectType},set_objectType__(){this.objectType.clear();for(var e=0,t=this._objectType.length;e<t;++e)this.objectType.add(this._objectType[e])},dispose(){}}),Object.defineProperties(ge,{typeName:{value:"X3DPickableObject",enumerable:!0},componentName:{value:"Picking",enumerable:!0}});const ue=ge;y().set("x_ite/Components/Picking/X3DPickableObject",ue);const me=ue;function ye(e){de().call(this,e),me.call(this,e),this.addType(u().PickableGroup)}Object.assign(Object.setPrototypeOf(ye.prototype,de().prototype),me.prototype,{initialize(){de().prototype.initialize.call(this),me.prototype.initialize.call(this),this._pickable.addInterest("set_pickable__",this),this.set_pickable__()},set_pickableObjects__(){this.set_pickable__()},set_pickable__(){this.setPickableObject(!(!this._pickable.getValue()&&!this.getTransformSensors().size))},traverse:(()=>{const e=new Set;return function(t,i){if(t===d().PICKING){if(this._pickable.getValue()){if(this.getObjectType().has("NONE"))return;const n=this.getBrowser(),s=n.getPickable();if(this.getObjectType().has("ALL"))s.push(!0),de().prototype.traverse.call(this,t,i),s.pop();else{const o=n.getPickSensors();for(const t of o.at(-1)){if(!t.getObjectType().has("ALL")){let e=0;for(const i of this.getObjectType())if(t.getObjectType().has(i)){++e;break}switch(t.getMatchCriterion()){case k.MATCH_ANY:if(0===e)continue;break;case k.MATCH_EVERY:if(e!==pickSensor.getObjectType().size)continue;break;case k.MATCH_ONLY_ONE:if(1!==e)continue}}e.add(t)}s.push(!0),o.push(e),de().prototype.traverse.call(this,t,i),o.pop(),s.pop(),e.clear()}}}else de().prototype.traverse.call(this,t,i)}})(),dispose(){me.prototype.dispose.call(this),de().prototype.dispose.call(this)}}),Object.defineProperties(ye,{typeName:{value:"PickableGroup",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"pickable",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"visible",new(s().SFBool)(!0)),new(r())(u().inputOutput,"bboxDisplay",new(s().SFBool)),new(r())(u().initializeOnly,"bboxSize",new(s().SFVec3f)(-1,-1,-1)),new(r())(u().initializeOnly,"bboxCenter",new(s().SFVec3f)),new(r())(u().inputOnly,"addChildren",new(s().MFNode)),new(r())(u().inputOnly,"removeChildren",new(s().MFNode)),new(r())(u().inputOutput,"children",new(s().MFNode))]),enumerable:!0}});const _e=ye;y().set("x_ite/Components/Picking/PickableGroup",_e);const we=_e,ke=window[Symbol.for("X_ITE.X3D-8.9.4")].require("x_ite/Base/X3DCast");var Se=e.n(ke);const be=window[Symbol.for("X_ITE.X3D-8.9.4")].require("standard/Math/Numbers/Rotation4");var fe=e.n(be);const ve=window[Symbol.for("X_ITE.X3D-8.9.4")].require("lib/ammojs/AmmoClass");var Oe=e.n(ve);function Te(){this.broadphase=new(Oe().btDbvtBroadphase),this.collisionConfiguration=new(Oe().btDefaultCollisionConfiguration),this.dispatcher=new(Oe().btCollisionDispatcher)(this.collisionConfiguration),this.collisionWorld=new(Oe().btCollisionWorld)(this.dispatcher,this.broadphase,this.collisionConfiguration),this.compoundShape1=new(Oe().btCompoundShape),this.motionState1=new(Oe().btDefaultMotionState),this.constructionInfo1=new(Oe().btRigidBodyConstructionInfo)(0,this.motionState1,this.compoundShape1),this.rigidBody1=new(Oe().btRigidBody)(this.constructionInfo1),this.compoundShape2=new(Oe().btCompoundShape),this.motionState2=new(Oe().btDefaultMotionState),this.constructionInfo2=new(Oe().btRigidBodyConstructionInfo)(0,this.motionState2,this.compoundShape2),this.rigidBody2=new(Oe().btRigidBody)(this.constructionInfo2),this.collisionWorld.addCollisionObject(this.rigidBody1),this.collisionWorld.addCollisionObject(this.rigidBody2)}Object.assign(Te.prototype,{constuctor:Te,setChildShape1(e,t){this.setChildShape(this.compoundShape1,e,t)},setChildShape2(e,t){this.setChildShape(this.compoundShape2,e,t)},setChildShape1Components(e,t,i){this.setChildShapeComponents(this.compoundShape1,e,t,i)},setChildShape2Components(e,t,i){this.setChildShapeComponents(this.compoundShape2,e,t,i)},setChildShape:(()=>{const e=new(V())(0,0,0),t=new(fe()),i=new(V())(1,1,1),n=new(Oe().btVector3)(0,0,0);return function(s,o,r){s.getNumChildShapes()&&s.removeChildShapeByIndex(0),r.getNumChildShapes()&&(o.get(e,t,i),n.setValue(i.x,i.y,i.z),r.setLocalScaling(n),s.addChildShape(this.getTransform(e,t),r))}})(),setChildShapeComponents(e,t,i,n){e.getNumChildShapes()&&e.removeChildShapeByIndex(0),n.getNumChildShapes()&&(n.setLocalScaling(i),e.addChildShape(t,n))},contactTest(){this.collisionWorld.performDiscreteCollisionDetection();const e=this.dispatcher.getNumManifolds();for(let t=0;t<e;++t){const e=this.dispatcher.getManifoldByIndexInternal(t),i=e.getNumContacts();for(let t=0;t<i;++t){if(e.getContactPoint(t).getDistance()<=0)return!0}}return!1},getTransform:(()=>{const e=new(Oe().btTransform),t=new(Oe().btVector3)(0,0,0),i=new(C());return function(n,s,o){const r=o||e;return i.set(n,s),t.setValue(i[12],i[13],i[14]),r.getBasis().setValue(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),r.setOrigin(t),r}})()});const Ne=Te;y().set("x_ite/Browser/Picking/VolumePicker",Ne);const Ce=Ne;function Pe(e){L.call(this,e),this.addType(u().PointPickSensor),this.pickingGeometryNode=null,this.picker=new Ce,this.compoundShapes=[]}var Ge,Me,xe;Object.assign(Object.setPrototypeOf(Pe.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode&&this.pickingGeometryNode._rebuild.removeInterest("set_geometry__",this),this.pickingGeometryNode=Se()(u().PointSet,this._pickingGeometry),this.pickingGeometryNode&&this.pickingGeometryNode._rebuild.addInterest("set_geometry__",this),this.set_geometry__()},set_geometry__:(Ge=new(Oe().btVector3)(1,1,1),Me=new(Oe().btVector3),xe=new(Oe().btTransform),function(){var e=this.compoundShapes;if(this.pickingGeometryNode){var t=this.pickingGeometryNode.getCoord();if(t){for(var i=0,n=t.getSize();i<n;++i)if(i<e.length){var s=e[i],o=t.get1Point(i,s.point);Me.setValue(o.x,o.y,o.z),xe.setOrigin(Me),s.setLocalScaling(Ge),s.updateChildTransform(0,xe)}else{s=new(Oe().btCompoundShape);var r=new(Oe().btSphereShape)(0);o=t.get1Point(i,new(V())(0,0,0)),s.point=o,Me.setValue(o.x,o.y,o.z),xe.setOrigin(Me),s.addChildShape(xe,r),e.push(s)}e.length=n}else e.length=0}else e.length=0}),process:(()=>{var e=new(R()),t=new(R()),i=new(V())(0,0,0),n=new(V())(0,0,0),o=new(Oe().btTransform),r=new(Oe().btVector3),a=new(V())(0,0,0),c=new(fe()),h=new(V())(1,1,1),p=new(s().MFVec3f);return function(){if(this.pickingGeometryNode){var s=this.getModelMatrices(),l=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var d=0,g=s.length;d<g;++d){var u=s[d];e.assign(this.pickingGeometryNode.getBBox()).multRight(u);for(var m=0,y=l.size;m<y;++m){var _=l[m];t.assign(_.geometryNode.getBBox()).multRight(_.modelMatrix),e.intersectsBox(t)&&(i.assign(e.center),n.assign(t.center),_.intersected=!0,_.distance=i.distance(n))}}var w=!!(N=this.getPickedGeometries()).length;N.assign(N.filter((e=>e))),w!==this._isActive.getValue()&&(this._isActive=w),this._pickedGeometry.equals(N)||(this._pickedGeometry=N);break;case f.GEOMETRY:var k=this.picker,S=this.compoundShapes;for(d=0,g=s.length;d<g;++d){u=s[d];e.assign(this.pickingGeometryNode.getBBox()).multRight(u),u.get(a,c,h),k.getTransform(a,c,o),r.setValue(h.x,h.y,h.z);for(var b=0,v=S.length;b<v;++b){var O=S[b];k.setChildShape1Components(o,r,O);for(m=0,y=l.size;m<y;++m){_=l[m];var T=this.getPickShape(_.geometryNode);t.assign(_.geometryNode.getBBox()).multRight(_.modelMatrix),k.setChildShape2(_.modelMatrix,T.getCompoundShape()),k.contactTest()&&(i.assign(e.center),n.assign(t.center),_.intersected=!0,_.distance=i.distance(n),_.pickedPoint.push(O.point))}}}var N;w=!!(N=this.getPickedGeometries()).length;N.assign(N.filter((e=>e))),w!==this._isActive.getValue()&&(this._isActive=w),this._pickedGeometry.equals(N)||(this._pickedGeometry=N);var C=this.getPickedTargets();p.length=0;for(m=0,y=C.length;m<y;++m)for(var P=C[m].pickedPoint,G=0,M=P.length;G<M;++G)p.push(P[G]);this._pickedPoint.equals(p)||(this._pickedPoint=p)}}L.prototype.process.call(this)}})()}),Object.defineProperties(Pe,{typeName:{value:"PointPickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().outputOnly,"pickedPoint",new(s().MFVec3f)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const Be=Pe;y().set("x_ite/Components/Picking/PointPickSensor",Be);const je=Be;function Ae(e){L.call(this,e),this.addType(u().PrimitivePickSensor),this.pickingGeometryNode=null,this.picker=new Ce}Object.assign(Object.setPrototypeOf(Ae.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode=null;try{for(var e=this._pickingGeometry.getValue().getInnerNode(),t=e.getType(),i=t.length-1;i>=0;--i)switch(t[i]){case u().Box:case u().Cone:case u().Cylinder:case u().Sphere:this.pickingGeometryNode=e;break;default:continue}}catch{}},process:(()=>{var e=new(R()),t=new(R()),i=new(V())(0,0,0),n=new(V())(0,0,0);return function(){if(this.pickingGeometryNode){var s=this.getModelMatrices(),o=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var r=0,a=s.length;r<a;++r){var c=s[r];e.assign(this.pickingGeometryNode.getBBox()).multRight(c);for(var h=0,p=o.size;h<p;++h){var l=o[h];t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),e.intersectsBox(t)&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);break;case f.GEOMETRY:var g=this.picker;for(r=0,a=s.length;r<a;++r){c=s[r];var u=this.getPickShape(this.pickingGeometryNode);e.assign(this.pickingGeometryNode.getBBox()).multRight(c),g.setChildShape1(c,u.getCompoundShape());for(h=0,p=o.size;h<p;++h){l=o[h];var m=this.getPickShape(l.geometryNode);t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),g.setChildShape2(l.modelMatrix,m.getCompoundShape()),g.contactTest()&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var y;d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y)}}L.prototype.process.call(this)}})()}),Object.defineProperties(Ae,{typeName:{value:"PrimitivePickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const Fe=Ae;y().set("x_ite/Components/Picking/PrimitivePickSensor",Fe);const Ee=Fe;function De(e){L.call(this,e),this.addType(u().VolumePickSensor),this.pickingGeometryNode=null,this.picker=new Ce}Object.assign(Object.setPrototypeOf(De.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this),this._pickingGeometry.addInterest("set_pickingGeometry__",this),this.set_pickingGeometry__()},set_pickingGeometry__(){this.pickingGeometryNode=Se()(u().X3DGeometryNode,this._pickingGeometry)},process:(()=>{var e=new(R()),t=new(R()),i=new(V())(0,0,0),n=new(V())(0,0,0);return function(){if(this.pickingGeometryNode){var s=this.getModelMatrices(),o=this.getTargets();switch(this.getIntersectionType()){case f.BOUNDS:for(var r=0,a=s.length;r<a;++r){var c=s[r];e.assign(this.pickingGeometryNode.getBBox()).multRight(c);for(var h=0,p=o.size;h<p;++h){var l=o[h];t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),e.intersectsBox(t)&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y);break;case f.GEOMETRY:var g=this.picker;for(r=0,a=s.length;r<a;++r){c=s[r];var u=this.getPickShape(this.pickingGeometryNode);e.assign(this.pickingGeometryNode.getBBox()).multRight(c),g.setChildShape1(c,u.getCompoundShape());for(h=0,p=o.size;h<p;++h){l=o[h];var m=this.getPickShape(l.geometryNode);t.assign(l.geometryNode.getBBox()).multRight(l.modelMatrix),g.setChildShape2(l.modelMatrix,m.getCompoundShape()),g.contactTest()&&(i.assign(e.center),n.assign(t.center),l.intersected=!0,l.distance=i.distance(n))}}var y;d=!!(y=this.getPickedGeometries()).length;y.assign(y.filter((e=>e))),d!==this._isActive.getValue()&&(this._isActive=d),this._pickedGeometry.equals(y)||(this._pickedGeometry=y)}}L.prototype.process.call(this)}})()}),Object.defineProperties(De,{typeName:{value:"VolumePickSensor",enumerable:!0},componentName:{value:"Picking",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["3.2","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(c())([new(r())(u().inputOutput,"metadata",new(s().SFNode)),new(r())(u().inputOutput,"enabled",new(s().SFBool)(!0)),new(r())(u().inputOutput,"objectType",new(s().MFString)("ALL")),new(r())(u().inputOutput,"matchCriterion",new(s().SFString)("MATCH_ANY")),new(r())(u().initializeOnly,"intersectionType",new(s().SFString)("BOUNDS")),new(r())(u().initializeOnly,"sortOrder",new(s().SFString)("CLOSEST")),new(r())(u().outputOnly,"isActive",new(s().SFBool)),new(r())(u().inputOutput,"pickingGeometry",new(s().SFNode)),new(r())(u().inputOutput,"pickTarget",new(s().MFNode)),new(r())(u().outputOnly,"pickedGeometry",new(s().MFNode))]),enumerable:!0}});const Ie=De;y().set("x_ite/Components/Picking/VolumePickSensor",Ie);const Le=Ie;i().add({name:"Picking",concreteNodes:[pe,we,je,Ee,Le],abstractNodes:[L,me]});const ze=void 0;y().set("assets/components/Picking",ze)})();
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
/* X_ITE v8.9.
|
|
1
|
+
/* X_ITE v8.9.4 */(() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/ 355:
|
|
5
|
-
/***/ ((module) => {
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
module.exports = window [Symbol .for ("X_ITE.X3D-8.9.2")] .require ("lib/jquery");
|
|
9
|
-
|
|
10
|
-
/***/ }),
|
|
11
|
-
|
|
12
4
|
/***/ 573:
|
|
13
5
|
/***/ (() => {
|
|
14
6
|
|
|
@@ -88,31 +80,31 @@ var __webpack_exports__ = {};
|
|
|
88
80
|
// UNUSED EXPORTS: default
|
|
89
81
|
|
|
90
82
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
|
|
91
|
-
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
83
|
+
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Components");
|
|
92
84
|
var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
|
|
93
85
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
|
|
94
|
-
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
86
|
+
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Fields");
|
|
95
87
|
var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
|
|
96
88
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
|
|
97
|
-
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
89
|
+
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Base/X3DFieldDefinition");
|
|
98
90
|
var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
|
|
99
91
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
|
|
100
|
-
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
92
|
+
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Base/FieldDefinitionArray");
|
|
101
93
|
var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
|
|
102
94
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DNode\")"
|
|
103
|
-
const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
95
|
+
const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Components/Core/X3DNode");
|
|
104
96
|
var X3DNode_default = /*#__PURE__*/__webpack_require__.n(X3DNode_namespaceObject);
|
|
105
97
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
|
|
106
|
-
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
98
|
+
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Base/X3DConstants");
|
|
107
99
|
var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
|
|
108
100
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DCast\")"
|
|
109
|
-
const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
101
|
+
const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Base/X3DCast");
|
|
110
102
|
var X3DCast_default = /*#__PURE__*/__webpack_require__.n(X3DCast_namespaceObject);
|
|
111
103
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Matrix4\")"
|
|
112
|
-
const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
104
|
+
const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("standard/Math/Numbers/Matrix4");
|
|
113
105
|
var Matrix4_default = /*#__PURE__*/__webpack_require__.n(Matrix4_namespaceObject);
|
|
114
106
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
|
|
115
|
-
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
107
|
+
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Namespace");
|
|
116
108
|
var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
|
|
117
109
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js
|
|
118
110
|
/*******************************************************************************
|
|
@@ -341,7 +333,7 @@ const __default__ = X3DRigidJointNode;
|
|
|
341
333
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/X3DRigidJointNode", __default__);
|
|
342
334
|
/* harmony default export */ const RigidBodyPhysics_X3DRigidJointNode = (__default__);
|
|
343
335
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
|
|
344
|
-
const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
336
|
+
const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("standard/Math/Numbers/Vector3");
|
|
345
337
|
var Vector3_default = /*#__PURE__*/__webpack_require__.n(Vector3_namespaceObject);
|
|
346
338
|
;// CONCATENATED MODULE: ./src/lib/ammojs/ammo.js
|
|
347
339
|
var ammo_dirname = "/";
|
|
@@ -440,7 +432,6 @@ const AmmoClass_default_ = new ammo ();
|
|
|
440
432
|
Namespace_default().set ("lib/ammojs/AmmoClass", AmmoClass_default_);
|
|
441
433
|
/* harmony default export */ const AmmoClass = (AmmoClass_default_);
|
|
442
434
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/BallJoint.js
|
|
443
|
-
/* provided dependency */ var $ = __webpack_require__(355);
|
|
444
435
|
/*******************************************************************************
|
|
445
436
|
*
|
|
446
437
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -505,7 +496,7 @@ function BallJoint (executionContext)
|
|
|
505
496
|
this ._anchorPoint .setUnit ("length");
|
|
506
497
|
|
|
507
498
|
this .joint = null;
|
|
508
|
-
this .outputs =
|
|
499
|
+
this .outputs = new Set ();
|
|
509
500
|
this .localAnchorPoint1 = new (Vector3_default()) (0, 0, 0);
|
|
510
501
|
this .localAnchorPoint2 = new (Vector3_default()) (0, 0, 0);
|
|
511
502
|
}
|
|
@@ -557,8 +548,7 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, RigidBodyPhysics_X
|
|
|
557
548
|
},
|
|
558
549
|
set_forceOutput__ ()
|
|
559
550
|
{
|
|
560
|
-
|
|
561
|
-
delete this .outputs [key];
|
|
551
|
+
this .outputs .clear ();
|
|
562
552
|
|
|
563
553
|
for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
|
|
564
554
|
{
|
|
@@ -566,16 +556,16 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, RigidBodyPhysics_X
|
|
|
566
556
|
|
|
567
557
|
if (value == "ALL")
|
|
568
558
|
{
|
|
569
|
-
this .outputs .body1AnchorPoint
|
|
570
|
-
this .outputs .body2AnchorPoint
|
|
559
|
+
this .outputs .add ("body1AnchorPoint");
|
|
560
|
+
this .outputs .add ("body2AnchorPoint");
|
|
571
561
|
}
|
|
572
562
|
else
|
|
573
563
|
{
|
|
574
|
-
this .outputs
|
|
564
|
+
this .outputs .add (value);
|
|
575
565
|
}
|
|
576
566
|
}
|
|
577
567
|
|
|
578
|
-
this .setOutput (
|
|
568
|
+
this .setOutput (!! this .outputs .size);
|
|
579
569
|
},
|
|
580
570
|
set_anchorPoint__ ()
|
|
581
571
|
{
|
|
@@ -598,7 +588,7 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, RigidBodyPhysics_X
|
|
|
598
588
|
|
|
599
589
|
return function ()
|
|
600
590
|
{
|
|
601
|
-
if (this .outputs .body1AnchorPoint)
|
|
591
|
+
if (this .outputs .has ("body1AnchorPoint"))
|
|
602
592
|
this ._body1AnchorPoint = this .getBody1 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix1 () .multVecMatrix (localAnchorPoint1 .assign (this .localAnchorPoint1)));
|
|
603
593
|
};
|
|
604
594
|
})(),
|
|
@@ -608,7 +598,7 @@ Object .assign (Object .setPrototypeOf (BallJoint .prototype, RigidBodyPhysics_X
|
|
|
608
598
|
|
|
609
599
|
return function ()
|
|
610
600
|
{
|
|
611
|
-
if (this .outputs .body2AnchorPoint)
|
|
601
|
+
if (this .outputs .has ("body2AnchorPoint"))
|
|
612
602
|
this ._body2AnchorPoint = this .getBody2 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix2 () .multVecMatrix (localAnchorPoint2 .assign (this .localAnchorPoint2)));
|
|
613
603
|
};
|
|
614
604
|
})(),
|
|
@@ -657,10 +647,10 @@ const BallJoint_default_ = BallJoint;
|
|
|
657
647
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/BallJoint", BallJoint_default_);
|
|
658
648
|
/* harmony default export */ const RigidBodyPhysics_BallJoint = (BallJoint_default_);
|
|
659
649
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DChildNode\")"
|
|
660
|
-
const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
650
|
+
const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Components/Core/X3DChildNode");
|
|
661
651
|
var X3DChildNode_default = /*#__PURE__*/__webpack_require__.n(X3DChildNode_namespaceObject);
|
|
662
652
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/X3DBoundedObject\")"
|
|
663
|
-
const X3DBoundedObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
653
|
+
const X3DBoundedObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Components/Grouping/X3DBoundedObject");
|
|
664
654
|
var X3DBoundedObject_default = /*#__PURE__*/__webpack_require__.n(X3DBoundedObject_namespaceObject);
|
|
665
655
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js
|
|
666
656
|
/*******************************************************************************
|
|
@@ -835,7 +825,7 @@ const X3DNBodyCollidableNode_default_ = X3DNBodyCollidableNode;
|
|
|
835
825
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode", X3DNBodyCollidableNode_default_);
|
|
836
826
|
/* harmony default export */ const RigidBodyPhysics_X3DNBodyCollidableNode = (X3DNBodyCollidableNode_default_);
|
|
837
827
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Rendering/TraverseType\")"
|
|
838
|
-
const TraverseType_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
828
|
+
const TraverseType_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Rendering/TraverseType");
|
|
839
829
|
var TraverseType_default = /*#__PURE__*/__webpack_require__.n(TraverseType_namespaceObject);
|
|
840
830
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js
|
|
841
831
|
/*******************************************************************************
|
|
@@ -1893,7 +1883,7 @@ const CollisionCollection_default_ = CollisionCollection;
|
|
|
1893
1883
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/CollisionCollection", CollisionCollection_default_);
|
|
1894
1884
|
/* harmony default export */ const RigidBodyPhysics_CollisionCollection = (CollisionCollection_default_);
|
|
1895
1885
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DSensorNode\")"
|
|
1896
|
-
const X3DSensorNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
1886
|
+
const X3DSensorNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("x_ite/Components/Core/X3DSensorNode");
|
|
1897
1887
|
var X3DSensorNode_default = /*#__PURE__*/__webpack_require__.n(X3DSensorNode_namespaceObject);
|
|
1898
1888
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js
|
|
1899
1889
|
/*******************************************************************************
|
|
@@ -2126,13 +2116,17 @@ Object .assign (Object .setPrototypeOf (CollisionSensor .prototype, (X3DSensorNo
|
|
|
2126
2116
|
const contactNode = this .contactCache [index];
|
|
2127
2117
|
|
|
2128
2118
|
if (contactNode)
|
|
2119
|
+
{
|
|
2129
2120
|
return contactNode;
|
|
2121
|
+
}
|
|
2122
|
+
else
|
|
2123
|
+
{
|
|
2124
|
+
const contactNode = this .contactCache [index] = this .getExecutionContext () .createNode ("Contact", false);
|
|
2130
2125
|
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
contactNode .setup ();
|
|
2126
|
+
contactNode .setup ();
|
|
2134
2127
|
|
|
2135
|
-
|
|
2128
|
+
return contactNode;
|
|
2129
|
+
}
|
|
2136
2130
|
},
|
|
2137
2131
|
});
|
|
2138
2132
|
|
|
@@ -2580,10 +2574,9 @@ const Contact_default_ = Contact;
|
|
|
2580
2574
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/Contact", Contact_default_);
|
|
2581
2575
|
/* harmony default export */ const RigidBodyPhysics_Contact = (Contact_default_);
|
|
2582
2576
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Rotation4\")"
|
|
2583
|
-
const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
2577
|
+
const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("standard/Math/Numbers/Rotation4");
|
|
2584
2578
|
var Rotation4_default = /*#__PURE__*/__webpack_require__.n(Rotation4_namespaceObject);
|
|
2585
2579
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js
|
|
2586
|
-
/* provided dependency */ var DoubleAxisHingeJoint_$ = __webpack_require__(355);
|
|
2587
2580
|
/*******************************************************************************
|
|
2588
2581
|
*
|
|
2589
2582
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -2656,7 +2649,7 @@ function DoubleAxisHingeJoint (executionContext)
|
|
|
2656
2649
|
this ._suspensionForce .setUnit ("force");
|
|
2657
2650
|
|
|
2658
2651
|
this .joint = null;
|
|
2659
|
-
this .outputs =
|
|
2652
|
+
this .outputs = new Set ();
|
|
2660
2653
|
this .localAnchorPoint1 = new (Vector3_default()) (0, 0, 0);
|
|
2661
2654
|
this .localAnchorPoint2 = new (Vector3_default()) (0, 0, 0);
|
|
2662
2655
|
this .localAxis1 = new (Vector3_default()) (0, 0, 0);
|
|
@@ -2732,8 +2725,7 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, RigidBo
|
|
|
2732
2725
|
},
|
|
2733
2726
|
set_forceOutput__ ()
|
|
2734
2727
|
{
|
|
2735
|
-
|
|
2736
|
-
delete this .outputs [key];
|
|
2728
|
+
this .outputs .clear ();
|
|
2737
2729
|
|
|
2738
2730
|
for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
|
|
2739
2731
|
{
|
|
@@ -2741,22 +2733,22 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, RigidBo
|
|
|
2741
2733
|
|
|
2742
2734
|
if (value == "ALL")
|
|
2743
2735
|
{
|
|
2744
|
-
this .outputs .body1AnchorPoint
|
|
2745
|
-
this .outputs .body2AnchorPoint
|
|
2746
|
-
this .outputs .body1Axis
|
|
2747
|
-
this .outputs .body2Axis
|
|
2748
|
-
this .outputs .hinge1Angle
|
|
2749
|
-
this .outputs .hinge2Angle
|
|
2750
|
-
this .outputs .hinge1AngleRate
|
|
2751
|
-
this .outputs .hinge2AngleRate
|
|
2736
|
+
this .outputs .add ("body1AnchorPoint");
|
|
2737
|
+
this .outputs .add ("body2AnchorPoint");
|
|
2738
|
+
this .outputs .add ("body1Axis");
|
|
2739
|
+
this .outputs .add ("body2Axis");
|
|
2740
|
+
this .outputs .add ("hinge1Angle");
|
|
2741
|
+
this .outputs .add ("hinge2Angle");
|
|
2742
|
+
this .outputs .add ("hinge1AngleRate");
|
|
2743
|
+
this .outputs .add ("hinge2AngleRate");
|
|
2752
2744
|
}
|
|
2753
2745
|
else
|
|
2754
2746
|
{
|
|
2755
|
-
this .outputs
|
|
2747
|
+
this .outputs .add (value);
|
|
2756
2748
|
}
|
|
2757
2749
|
}
|
|
2758
2750
|
|
|
2759
|
-
this .setOutput (
|
|
2751
|
+
this .setOutput (!! this .outputs .size);
|
|
2760
2752
|
},
|
|
2761
2753
|
update1: (() =>
|
|
2762
2754
|
{
|
|
@@ -2768,13 +2760,13 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, RigidBo
|
|
|
2768
2760
|
|
|
2769
2761
|
return function ()
|
|
2770
2762
|
{
|
|
2771
|
-
if (this .outputs .body1AnchorPoint)
|
|
2763
|
+
if (this .outputs .has ("body1AnchorPoint"))
|
|
2772
2764
|
this ._body1AnchorPoint = this .getBody1 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix1 () .multVecMatrix (localAnchorPoint1 .assign (this .localAnchorPoint1)));
|
|
2773
2765
|
|
|
2774
|
-
if (this .outputs .body1Axis)
|
|
2766
|
+
if (this .outputs .has ("body1Axis"))
|
|
2775
2767
|
this ._body1Axis = this .getInitialInverseMatrix1 () .multDirMatrix (this .getBody1 () .getMatrix () .multDirMatrix (localAxis1 .assign (this .localAxis1))) .normalize ();
|
|
2776
2768
|
|
|
2777
|
-
if (this .outputs .hinge1Angle)
|
|
2769
|
+
if (this .outputs .has ("hinge1Angle"))
|
|
2778
2770
|
{
|
|
2779
2771
|
var lastAngle = this ._hinge1Angle .getValue ();
|
|
2780
2772
|
|
|
@@ -2783,7 +2775,7 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, RigidBo
|
|
|
2783
2775
|
|
|
2784
2776
|
this ._hinge1Angle = rotation .angle;
|
|
2785
2777
|
|
|
2786
|
-
if (this .outputs .angleRate)
|
|
2778
|
+
if (this .outputs .has ("angleRate"))
|
|
2787
2779
|
this ._hinge1AngleRate = (this ._hinge1Angle .getValue () - lastAngle) * this .getBrowser () .getCurrentFrameRate ();
|
|
2788
2780
|
}
|
|
2789
2781
|
};
|
|
@@ -2798,13 +2790,13 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, RigidBo
|
|
|
2798
2790
|
|
|
2799
2791
|
return function ()
|
|
2800
2792
|
{
|
|
2801
|
-
if (this .outputs .body2AnchorPoint)
|
|
2793
|
+
if (this .outputs .has ("body2AnchorPoint"))
|
|
2802
2794
|
this ._body2AnchorPoint = this .getBody2 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix2 () .multVecMatrix (localAnchorPoint2 .assign (this .localAnchorPoint2)));
|
|
2803
2795
|
|
|
2804
|
-
if (this .outputs .body2Axis)
|
|
2796
|
+
if (this .outputs .has ("body2Axis"))
|
|
2805
2797
|
this ._body2Axis = this .getInitialInverseMatrix2 () .multDirMatrix (this .getBody2 () .getMatrix () .multDirMatrix (localAxis2 .assign (this .localAxis2))) .normalize ();
|
|
2806
2798
|
|
|
2807
|
-
if (this .outputs .hinge2Angle)
|
|
2799
|
+
if (this .outputs .has ("hinge2Angle"))
|
|
2808
2800
|
{
|
|
2809
2801
|
var lastAngle = this ._hinge2Angle .getValue ();
|
|
2810
2802
|
|
|
@@ -2813,7 +2805,7 @@ Object .assign (Object .setPrototypeOf (DoubleAxisHingeJoint .prototype, RigidBo
|
|
|
2813
2805
|
|
|
2814
2806
|
this ._hinge2Angle = rotation .angle;
|
|
2815
2807
|
|
|
2816
|
-
if (this .outputs .angleRate)
|
|
2808
|
+
if (this .outputs .has ("angleRate"))
|
|
2817
2809
|
this ._hinge2AngleRate = (this ._hinge2Angle .getValue () - lastAngle) * this .getBrowser () .getCurrentFrameRate ();
|
|
2818
2810
|
}
|
|
2819
2811
|
};
|
|
@@ -3019,7 +3011,7 @@ const MotorJoint_default_ = MotorJoint;
|
|
|
3019
3011
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/MotorJoint", MotorJoint_default_);
|
|
3020
3012
|
/* harmony default export */ const RigidBodyPhysics_MotorJoint = (MotorJoint_default_);
|
|
3021
3013
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Quaternion\")"
|
|
3022
|
-
const Quaternion_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.
|
|
3014
|
+
const Quaternion_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.4")] .require ("standard/Math/Numbers/Quaternion");
|
|
3023
3015
|
var Quaternion_default = /*#__PURE__*/__webpack_require__.n(Quaternion_namespaceObject);
|
|
3024
3016
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/RigidBody.js
|
|
3025
3017
|
/*******************************************************************************
|
|
@@ -3939,7 +3931,6 @@ const RigidBodyCollection_default_ = RigidBodyCollection;
|
|
|
3939
3931
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/RigidBodyCollection", RigidBodyCollection_default_);
|
|
3940
3932
|
/* harmony default export */ const RigidBodyPhysics_RigidBodyCollection = (RigidBodyCollection_default_);
|
|
3941
3933
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js
|
|
3942
|
-
/* provided dependency */ var SingleAxisHingeJoint_$ = __webpack_require__(355);
|
|
3943
3934
|
/*******************************************************************************
|
|
3944
3935
|
*
|
|
3945
3936
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -4012,7 +4003,7 @@ function SingleAxisHingeJoint (executionContext)
|
|
|
4012
4003
|
this ._angleRate .setUnit ("angularRate");
|
|
4013
4004
|
|
|
4014
4005
|
this .joint = null;
|
|
4015
|
-
this .outputs =
|
|
4006
|
+
this .outputs = new Set ();
|
|
4016
4007
|
this .localAnchorPoint1 = new (Vector3_default()) (0, 0, 0);
|
|
4017
4008
|
this .localAnchorPoint2 = new (Vector3_default()) (0, 0, 0);
|
|
4018
4009
|
}
|
|
@@ -4087,8 +4078,7 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, RigidBo
|
|
|
4087
4078
|
},
|
|
4088
4079
|
set_forceOutput__ ()
|
|
4089
4080
|
{
|
|
4090
|
-
|
|
4091
|
-
delete this .outputs [key];
|
|
4081
|
+
this .outputs .clear ();
|
|
4092
4082
|
|
|
4093
4083
|
for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
|
|
4094
4084
|
{
|
|
@@ -4096,18 +4086,18 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, RigidBo
|
|
|
4096
4086
|
|
|
4097
4087
|
if (value == "ALL")
|
|
4098
4088
|
{
|
|
4099
|
-
this .outputs .body1AnchorPoint
|
|
4100
|
-
this .outputs .body2AnchorPoint
|
|
4101
|
-
this .outputs .angle
|
|
4102
|
-
this .outputs .angularRate
|
|
4089
|
+
this .outputs .add ("body1AnchorPoint");
|
|
4090
|
+
this .outputs .add ("body2AnchorPoint");
|
|
4091
|
+
this .outputs .add ("angle");
|
|
4092
|
+
this .outputs .add ("angularRate");
|
|
4103
4093
|
}
|
|
4104
4094
|
else
|
|
4105
4095
|
{
|
|
4106
|
-
this .outputs
|
|
4096
|
+
this .outputs .add (value);
|
|
4107
4097
|
}
|
|
4108
4098
|
}
|
|
4109
4099
|
|
|
4110
|
-
this .setOutput (
|
|
4100
|
+
this .setOutput (!! this .outputs .size);
|
|
4111
4101
|
},
|
|
4112
4102
|
update1: (() =>
|
|
4113
4103
|
{
|
|
@@ -4115,7 +4105,7 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, RigidBo
|
|
|
4115
4105
|
|
|
4116
4106
|
return function ()
|
|
4117
4107
|
{
|
|
4118
|
-
if (this .outputs .body1AnchorPoint)
|
|
4108
|
+
if (this .outputs .has ("body1AnchorPoint"))
|
|
4119
4109
|
this ._body1AnchorPoint = this .getBody1 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix1 () .multVecMatrix (localAnchorPoint1 .assign (this .localAnchorPoint1)));
|
|
4120
4110
|
};
|
|
4121
4111
|
})(),
|
|
@@ -4128,10 +4118,10 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, RigidBo
|
|
|
4128
4118
|
|
|
4129
4119
|
return function ()
|
|
4130
4120
|
{
|
|
4131
|
-
if (this .outputs .body2AnchorPoint)
|
|
4121
|
+
if (this .outputs .has ("body2AnchorPoint"))
|
|
4132
4122
|
this ._body2AnchorPoint = this .getBody2 () .getMatrix () .multVecMatrix (this .getInitialInverseMatrix2 () .multVecMatrix (localAnchorPoint2 .assign (this .localAnchorPoint2)));
|
|
4133
4123
|
|
|
4134
|
-
if (this .outputs .angle)
|
|
4124
|
+
if (this .outputs .has ("angle"))
|
|
4135
4125
|
{
|
|
4136
4126
|
var lastAngle = this ._angle .getValue ();
|
|
4137
4127
|
|
|
@@ -4140,7 +4130,7 @@ Object .assign (Object .setPrototypeOf (SingleAxisHingeJoint .prototype, RigidBo
|
|
|
4140
4130
|
|
|
4141
4131
|
this ._angle = rotation .angle;
|
|
4142
4132
|
|
|
4143
|
-
if (this .outputs .angleRate)
|
|
4133
|
+
if (this .outputs .has ("angleRate"))
|
|
4144
4134
|
this ._angleRate = (this ._angle .getValue () - lastAngle) * this .getBrowser () .getCurrentFrameRate ();
|
|
4145
4135
|
}
|
|
4146
4136
|
};
|
|
@@ -4197,7 +4187,6 @@ const SingleAxisHingeJoint_default_ = SingleAxisHingeJoint;
|
|
|
4197
4187
|
Namespace_default().set ("x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint", SingleAxisHingeJoint_default_);
|
|
4198
4188
|
/* harmony default export */ const RigidBodyPhysics_SingleAxisHingeJoint = (SingleAxisHingeJoint_default_);
|
|
4199
4189
|
;// CONCATENATED MODULE: ./src/x_ite/Components/RigidBodyPhysics/SliderJoint.js
|
|
4200
|
-
/* provided dependency */ var SliderJoint_$ = __webpack_require__(355);
|
|
4201
4190
|
/*******************************************************************************
|
|
4202
4191
|
*
|
|
4203
4192
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -4268,7 +4257,7 @@ function SliderJoint (executionContext)
|
|
|
4268
4257
|
this ._separationRate .setUnit ("speed");
|
|
4269
4258
|
|
|
4270
4259
|
this .joint = null;
|
|
4271
|
-
this .outputs =
|
|
4260
|
+
this .outputs = new Set ();
|
|
4272
4261
|
}
|
|
4273
4262
|
|
|
4274
4263
|
Object .assign (Object .setPrototypeOf (SliderJoint .prototype, RigidBodyPhysics_X3DRigidJointNode .prototype),
|
|
@@ -4356,8 +4345,7 @@ Object .assign (Object .setPrototypeOf (SliderJoint .prototype, RigidBodyPhysics
|
|
|
4356
4345
|
},
|
|
4357
4346
|
set_forceOutput__ ()
|
|
4358
4347
|
{
|
|
4359
|
-
|
|
4360
|
-
delete this .outputs [key];
|
|
4348
|
+
this .outputs .clear ();
|
|
4361
4349
|
|
|
4362
4350
|
for (var i = 0, length = this ._forceOutput .length; i < length; ++ i)
|
|
4363
4351
|
{
|
|
@@ -4365,16 +4353,16 @@ Object .assign (Object .setPrototypeOf (SliderJoint .prototype, RigidBodyPhysics
|
|
|
4365
4353
|
|
|
4366
4354
|
if (value == "ALL")
|
|
4367
4355
|
{
|
|
4368
|
-
this .outputs .separation
|
|
4369
|
-
this .outputs .separationRate
|
|
4356
|
+
this .outputs .add ("separation");
|
|
4357
|
+
this .outputs .add ("separationRate");
|
|
4370
4358
|
}
|
|
4371
4359
|
else
|
|
4372
4360
|
{
|
|
4373
|
-
this .outputs
|
|
4361
|
+
this .outputs .add (value);
|
|
4374
4362
|
}
|
|
4375
4363
|
}
|
|
4376
4364
|
|
|
4377
|
-
this .setOutput (
|
|
4365
|
+
this .setOutput (!! this .outputs .size);
|
|
4378
4366
|
},
|
|
4379
4367
|
set_separation__ ()
|
|
4380
4368
|
{
|