x_ite 11.5.11 → 11.5.14

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.
Files changed (54) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/components/AnnotationComponent.js +2 -378
  3. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  4. package/dist/assets/components/CADGeometryComponent.js +2 -378
  5. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  6. package/dist/assets/components/CubeMapTexturingComponent.js +4 -333
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +2 -331
  9. package/dist/assets/components/DISComponent.min.js +2 -2
  10. package/dist/assets/components/EventUtilitiesComponent.js +2 -472
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  12. package/dist/assets/components/Geometry2DComponent.js +2 -707
  13. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  14. package/dist/assets/components/GeospatialComponent.js +4 -897
  15. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  16. package/dist/assets/components/HAnimComponent.js +9 -338
  17. package/dist/assets/components/HAnimComponent.min.js +2 -2
  18. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -237
  19. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  20. package/dist/assets/components/LayoutComponent.js +2 -425
  21. package/dist/assets/components/LayoutComponent.min.js +2 -2
  22. package/dist/assets/components/NURBSComponent.js +3 -896
  23. package/dist/assets/components/NURBSComponent.min.js +2 -2
  24. package/dist/assets/components/ParticleSystemsComponent.js +9 -715
  25. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  26. package/dist/assets/components/PickingComponent.js +2 -566
  27. package/dist/assets/components/PickingComponent.min.js +2 -2
  28. package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -942
  29. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  30. package/dist/assets/components/ScriptingComponent.js +2 -190
  31. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  32. package/dist/assets/components/TextComponent.js +2 -379
  33. package/dist/assets/components/TextComponent.min.js +2 -2
  34. package/dist/assets/components/TextureProjectionComponent.js +8 -196
  35. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  36. package/dist/assets/components/Texturing3DComponent.js +4303 -4867
  37. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  38. package/dist/assets/components/VolumeRenderingComponent.js +5 -900
  39. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  40. package/dist/assets/components/WebXRComponent.js +5 -145
  41. package/dist/assets/components/WebXRComponent.min.js +2 -2
  42. package/dist/assets/components/X_ITEComponent.js +18 -853
  43. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  44. package/dist/assets/fonts/PT_Sans/OFL.txt +94 -94
  45. package/dist/assets/lib/libktx.js +1 -1
  46. package/dist/assets/lib/libktx.wasm +0 -0
  47. package/dist/example.html +1 -1
  48. package/dist/x_ite.css +1 -1
  49. package/dist/x_ite.js +51129 -70574
  50. package/dist/x_ite.min.js +2 -2
  51. package/dist/x_ite.min.mjs +2 -2
  52. package/dist/x_ite.mjs +51013 -70458
  53. package/dist/x_ite.zip +0 -0
  54. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.11 */
2
- const e=window[Symbol.for("X_ITE.X3D-11.5.11")];(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=e.Components;var i=t.n(n);const s=e.Fields;var o=t.n(s);const r=e.X3DFieldDefinition;var a=t.n(r);const d=e.FieldDefinitionArray;var h=t.n(d);const l=e.X3DNode;var u=t.n(l);const c=e.X3DGeometricPropertyNode;var _=t.n(c);const p=e.X3DConstants;var m=t.n(p);const g=e.Namespace;var x=t.n(g);function T(e){_().call(this,e),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(T.prototype,_().prototype),Object.defineProperties(T,{...u().getStaticProperties("HAnimDisplacer","HAnim",1,"displacers","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"weight",new(o().SFFloat)),new(a())(m().inputOutput,"coordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"displacements",new(o().MFVec3f))]),enumerable:!0}});const w=T,f=x().add("HAnimDisplacer",w),I=e.X3DChildNode;var F=t.n(I);const S=e.Group;var v=t.n(S);const E=e.Transform;var N=t.n(E);const O=e.X3DBoundedObject;var M=t.n(O);const D=e.TraverseType;var b=t.n(D);const y=e.X3DCast;var A=t.n(y);const j=e.Matrix4;var k=t.n(j);const R=e.Algorithm;var C=t.n(R);const X=e.ShaderRegistry;var U=t.n(X);const W=x().add("Skin2.glsl",()=>"\n#if defined(X3D_SKINNING)\nin float x3d_CoordIndex;\n#if X3D_NUM_JOINT_SETS>0\nuniform sampler2D x3d_JointsTexture;\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_DisplacementsTexture;uniform sampler2D x3d_DisplacementWeightsTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0||X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_JointMatricesTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0\nmat4 getJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);vec4 d=texelFetch(x3d_JointMatricesTexture,joint*8+3,0);return mat4(a,b,c,d);}\n#if defined(X3D_NORMALS)\nmat3 getJointNormalMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8+4,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+5,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+6,0);return mat3(a.xyz,vec3(a.w,b.xy),vec3(b.zw,c.x));}\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nmat3 getDisplacementJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);return mat3(a.xyz,b.xyz,c.xyz);}\n#endif\n#if defined(X3D_NORMALS)\nvec3 skinNormal=vec3(0);\n#if defined(X3D_TANGENTS)\nvec3 skinTangent=vec3(0);\n#endif\n#define getSkinNormal(normal)(skinNormal)\n#if defined(X3D_TANGENTS)\n#define getSkinTangent(tangent)(skinTangent)\n#endif\n#else\n#define getSkinNormal(normal)(normal)\n#define getSkinTangent(tangent)(tangent)\n#endif\nvec4 getSkinVertex(const in vec4 vertex,const in vec3 normal,const in vec3 tangent){int coordIndex=int(x3d_CoordIndex);vec4 skin=vertex;\n#if defined(X3D_NORMALS)\nskinNormal=normal;\n#if defined(X3D_TANGENTS)\nskinTangent=tangent;\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\n{int coordIndexD=coordIndex*(X3D_NUM_DISPLACEMENTS*2);for(int i=0;i<X3D_NUM_DISPLACEMENTS;++i){int index=coordIndexD+i*2;vec4 displacement=texelFetch(x3d_DisplacementsTexture,index,0);int weightIndex=int(texelFetch(x3d_DisplacementsTexture,index+1,0).x);float weight=texelFetch(x3d_DisplacementWeightsTexture,weightIndex,0).x;skin.xyz+=getDisplacementJointMatrix(int(displacement.w))*(displacement.xyz*weight);}}\n#endif\n#if X3D_NUM_JOINT_SETS>0\n{int coordIndexJ=coordIndex*(X3D_NUM_JOINT_SETS*2);for(int i=0;i<X3D_NUM_JOINT_SETS;++i){int index=coordIndexJ+i;ivec4 joints=ivec4(texelFetch(x3d_JointsTexture,index,0));vec4 weights=texelFetch(x3d_JointsTexture,index+X3D_NUM_JOINT_SETS,0);for(int i=0;i<4;++i){int joint=joints[i];float weight=weights[i];skin+=(getJointMatrix(joint)*vertex-vertex)*weight;\n#if defined(X3D_NORMALS)\nmat3 jointNormalMatrix=getJointNormalMatrix(joint);skinNormal+=(jointNormalMatrix*normal-normal)*weight;\n#if defined(X3D_TANGENTS)\nskinTangent+=(jointNormalMatrix*tangent-tangent)*weight;\n#endif\n#endif\n}}}\n#endif\nreturn skin;}\n#endif\n");function J(e){F().call(this,e),M().call(this,e),this.addType(m().HAnimHumanoid),this.addChildObjects(m().outputOnly,"jointTextures",new(o().SFTime),m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._translation.setUnit("length"),this._center.setUnit("length"),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),e.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(v())(e),this.viewpointsNode=new(v())(e),this.skinNode=new V(e,this),this.transformNode=new(N())(e),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.update=new B,this.skinning=Function.prototype}U().addInclude("Skin",void 0,W),Object.assign(Object.setPrototypeOf(J.prototype,F().prototype),M().prototype,{initialize(){F().prototype.initialize.call(this),M().prototype.initialize.call(this),this.skeletonNode.addAllowedTypes(m().HAnimJoint,m().HAnimSite),this.viewpointsNode.addAllowedTypes(m().HAnimSite),this._skeleton.addFieldInterest(this.skeletonNode._children),this._viewpoints.addFieldInterest(this.viewpointsNode._children),this._skin.addFieldInterest(this.skinNode._children),this.skeletonNode._children=this._skeleton,this.viewpointsNode._children=this._viewpoints,this.skinNode._children=this._skin,this.skeletonNode.setPrivate(!0),this.viewpointsNode.setPrivate(!0),this.skinNode.setPrivate(!0),this._translation.addFieldInterest(this.transformNode._translation),this._rotation.addFieldInterest(this.transformNode._rotation),this._scale.addFieldInterest(this.transformNode._scale),this._scaleOrientation.addFieldInterest(this.transformNode._scaleOrientation),this._center.addFieldInterest(this.transformNode._center),this._bboxDisplay.addFieldInterest(this.transformNode._bboxDisplay),this._bboxSize.addFieldInterest(this.transformNode._bboxSize),this._bboxCenter.addFieldInterest(this.transformNode._bboxCenter),this.transformNode._translation=this._translation,this.transformNode._rotation=this._rotation,this.transformNode._scale=this._scale,this.transformNode._scaleOrientation=this._scaleOrientation,this.transformNode._center=this._center,this.transformNode._bboxDisplay=this._bboxDisplay,this.transformNode._bboxSize=this._bboxSize,this.transformNode._bboxCenter=this._bboxCenter,this.transformNode._children=[this.skeletonNode,this.viewpointsNode,this.skinNode],this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.connectChildNode(this.transformNode);const e=this.getBrowser().getContext();if(1!==e.getVersion()){this.jointsTexture=e.createTexture(),this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.jointsTexture,this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);this._motionsEnabled.addInterest("set_motions__",this),this._motions.addInterest("set_motions__",this),this._jointBindingPositions.addInterest("set_joints__",this),this._jointBindingRotations.addInterest("set_joints__",this),this._jointBindingScales.addInterest("set_joints__",this),this._joints.addInterest("set_joints__",this),this._jointTextures.addInterest("set_jointTextures__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this._skinCoord.addInterest("set_skinCoord__",this),this.set_motions__(),this.set_joints__(),this.set_skinCoord__()}},getBBox(e,t){return this.transformNode.getBBox(e,t)},getSubBBox(e,t){return this.transformNode.getSubBBox(e,t)},getMatrix(){return this.transformNode.getMatrix()},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const e=this._motionsEnabled,t=this.motionNodes;for(const e of t)e._joints.removeInterest("set_connectJoints__",this),e._channelsEnabled.removeInterest("set_connectJoints__",this),e._channels.removeInterest("set_connectJoints__",this),e._values.removeInterest("set_connectJoints__",this),e.disconnectJoints(this.jointNodes);t.length=0;for(const[n,i]of this._motions.entries()){if(n<e.length&&!e[n])continue;const s=A()(m().HAnimMotion,i);s&&t.push(s)}for(const e of t)e._joints.addInterest("set_connectJoints__",this,e),e._channelsEnabled.addInterest("set_connectJoints__",this,e),e._channels.addInterest("set_connectJoints__",this,e),e._values.addInterest("set_connectJoints__",this,e),e.connectJoints(this.jointNodes)},set_connectJoints__(e){e.disconnectJoints(this.jointNodes),e.connectJoints(this.jointNodes)},set_joints__(){const e=this.jointNodes,t=this.jointBindingMatrices,n=this._jointBindingPositions,i=this._jointBindingRotations,s=this._jointBindingScales,o=n.length,r=i.length,a=s.length;for(const t of this.motionNodes)t.disconnectJoints(e);for(const t of e)t.removeInterest("unlock",this.update),t._skinCoordIndex.removeInterest("addEvent",this._jointTextures),t._skinCoordWeight.removeInterest("addEvent",this._jointTextures),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0,t.length=0;for(const[d,h]of this._joints.entries()){const l=A()(m().HAnimJoint,h);if(!l)continue;const u=o?n[Math.min(d,o-1)].getValue():null,c=r?i[Math.min(d,r-1)].getValue():null,_=a?s[Math.min(d,a-1)].getValue():null;e.push(l),t.push((new(k())).set(u,c,_))}for(const t of e)t.addInterest("unlock",this.update),t._skinCoordIndex.addInterest("addEvent",this._jointTextures),t._skinCoordWeight.addInterest("addEvent",this._jointTextures),t._displacements.addInterest("addEvent",this._displacementsTexture),t._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const t of this.motionNodes)t.connectJoints(e);const d=Math.ceil(Math.sqrt(8*e.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]),n=Array.from({length:e},()=>[]);for(const[e,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(t[r]?.push(e),n[r]?.push(i))}}const i=C().roundToMultiple(t.reduce((e,t)=>Math.max(e,t.length),0),4),s=2*i,o=Math.ceil(Math.sqrt(e*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<e;++o)r.set(t[o],o*s),r.set(n[o],o*s+i);this.numJoints=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.update.unlock(),this.set_humanoidKey__()},set_displacementsTexture__(){const e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const[e,i]of this.jointNodes.entries())for(const{_weight:s,_coordIndex:o,_displacements:r}of i.getDisplacers())if(o.length){this.displacementWeights.push(s,0,0,0);for(const[i,s]of o.entries())t[s]?.push(...r[i],e,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.update.unlock(),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.FLOAT,n)},set_skinCoord__(){this.skinCoordNode&&(this.skinCoordNode.removeInterest("addEvent",this._jointTextures),this.skinCoordNode.removeInterest("addEvent",this._displacementsTexture),this.skinCoordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.skinCoordNode=A()(m().Coordinate,this._skinCoord)??A()(m().CoordinateDouble,this._skinCoord),this.skinCoordNode?(delete this.skinning,this.skinCoordNode.addInterest("addEvent",this._jointTextures),this.skinCoordNode.addInterest("addEvent",this._displacementsTexture),this.skinCoordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(e,t){const n=t.getInvHumanoidMatrix();n.push(this.transformNode.getMatrix()),n.multRight(t.getModelViewMatrix().get()),n.inverse(),this.transformNode.traverse(e,t),this.skinning(e,t),n.pop()},skinning(e,t){if(e!==b().DISPLAY||this.update.lock())return;const n=t.getInvHumanoidMatrix().get(),i=this.jointNodes,s=i.length,o=this.jointBindingMatrices,r=this.jointMatricesArray,a=Math.ceil(Math.sqrt(8*s));for(let e=0;e<s;++e){const t=i[e],s=o[e],a=t.getModelViewMatrix().multRight(n).multLeft(s),d=a.submatrix.transpose().inverse();r.set(a,32*e+0),r.set(d,32*e+16)}const d=this.getBrowser().getContext();d.bindTexture(d.TEXTURE_2D,this.jointMatricesTexture),d.texImage2D(d.TEXTURE_2D,0,d.RGBA32F,a,a,0,d.RGBA,d.FLOAT,r)},setShaderUniforms(e,t){const n=this.getBrowser(),i=n.getTexture2DUnit(),s=n.getTexture2DUnit(),o=n.getTexture2DUnit(),r=n.getTexture2DUnit();e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.jointsTexture),e.uniform1i(t.x3d_JointsTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,s),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,o),e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,r)},dispose(){M().prototype.dispose.call(this),F().prototype.dispose.call(this)}}),Object.defineProperties(J,{...u().getStaticProperties("HAnimHumanoid","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"info",new(o().MFString)),new(a())(m().inputOutput,"version",new(o().SFString)("2.0")),new(a())(m().inputOutput,"skeletalConfiguration",new(o().SFString)("BASIC")),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOutput,"skeleton",new(o().MFNode)),new(a())(m().inputOutput,"jointBindingPositions",new(o().MFVec3f)),new(a())(m().inputOutput,"jointBindingRotations",new(o().MFRotation)),new(a())(m().inputOutput,"jointBindingScales",new(o().MFVec3f)),new(a())(m().inputOutput,"joints",new(o().MFNode)),new(a())(m().inputOutput,"segments",new(o().MFNode)),new(a())(m().inputOutput,"sites",new(o().MFNode)),new(a())(m().inputOutput,"viewpoints",new(o().MFNode)),new(a())(m().inputOutput,"motionsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"motions",new(o().MFNode)),new(a())(m().inputOutput,"skinBindingNormals",new(o().SFNode)),new(a())(m().inputOutput,"skinBindingCoords",new(o().SFNode)),new(a())(m().inputOutput,"skinNormal",new(o().SFNode)),new(a())(m().inputOutput,"skinCoord",new(o().SFNode)),new(a())(m().inputOutput,"skin",new(o().MFNode))]),enumerable:!0}});class V extends(v()){#e;constructor(e,t){super(e),this.#e=t}traverse(e,t){t.getHAnimNode().push(this.#e),super.traverse(e,t),t.getHAnimNode().pop()}}class B{#t=!0;unlock(){this.#t=!1}lock(){const e=this.#t;return this.#t=!0,e}}const P=J,H=x().add("HAnimHumanoid",P),z=e.X3DTransformNode;var L=t.n(z);function G(e){L().call(this,e),this.addType(m().HAnimJoint),this.addChildObjects(m().outputOnly,"displacements",new(o().SFTime),m().outputOnly,"displacementWeights",new(o().SFTime)),this.setVisibleObject(!0),this.addAllowedTypes(m().HAnimJoint,m().HAnimSegment),e.getSpecificationVersion()<=3.3&&this.addAllowedTypes(m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(k())}Object.assign(Object.setPrototypeOf(G.prototype,L().prototype),{initialize(){L().prototype.initialize.call(this),this._displacers.addInterest("set_displacers__",this),this.set_displacers__()},getModelViewMatrix(){return this.modelViewMatrix},getDisplacers(){return this.displacerNodes},set_visibleObjects__(){},set_displacers__(){const e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacements),t._displacements.removeInterest("addEvent",this._displacements),t._coordIndex.removeInterest("addEvent",this._displacementWeights),t._weight.removeInterest("addEvent",this._displacementWeights);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacements),t._displacements.addInterest("addEvent",this._displacements),t._coordIndex.addInterest("addEvent",this._displacementWeights),t._weight.addInterest("addEvent",this._displacementWeights);this._displacements.addEvent(),this._displacementWeights.addEvent()},traverse(e,t){const n=t.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),e===b().DISPLAY&&this.modelViewMatrix.assign(n.get()),L().prototype.groupTraverse.call(this,e,t),n.pop()},groupTraverse(e,t){e===b().DISPLAY&&this.modelViewMatrix.assign(t.getModelViewMatrix().get()),L().prototype.groupTraverse.call(this,e,t)}}),Object.defineProperties(G,{...u().getStaticProperties("HAnimJoint","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"llimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"ulimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"limitOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"stiffness",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"skinCoordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"skinCoordWeight",new(o().MFFloat)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const K=G,Y=x().add("HAnimJoint",K),q=e.TimeSensor;var Z=t.n(q);const $=e.PositionInterpolator;var Q=t.n($);const ee=e.OrientationInterpolator;var te=t.n(ee);const ne=e.Vector3;var ie=t.n(ne);const se=e.Rotation4;var oe=t.n(se);function re(e){F().call(this,e),this.addType(m().HAnimMotion),this.timeSensor=new(Z())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(re.prototype,F().prototype),{initialize(){F().prototype.initialize.call(this),this._loop.addFieldInterest(this.timeSensor._loop),this.timeSensor._cycleTime.addFieldInterest(this._cycleTime),this.timeSensor._elapsedTime.addFieldInterest(this._elapsedTime),this.timeSensor._enabled=!1,this.timeSensor._loop=this._loop,this.timeSensor._stopTime=1,this.timeSensor.setup(),this._enabled.addInterest("set_enabled__",this),this._joints.addInterest("set_joints__",this),this._channels.addInterest("set_interpolators__",this),this._values.addInterest("set_interpolators__",this),this._next.addInterest("set_next_or_previous__",this,1),this._previous.addInterest("set_next_or_previous__",this,-1),this._frameIndex.addInterest("set_frameIndex__",this),this._frameDuration.addInterest("set_frameDuration__",this),this._frameIncrement.addInterest("set_frameIncrement__",this),this._startFrame.addInterest("set_start_or_endFrame__",this),this._endFrame.addInterest("set_start_or_endFrame__",this),this.set_enabled__(),this.set_joints__(),this.set_frameIncrement__(),this.set_interpolators__()},connectJoints(e){const t=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(e);for(const[e,{positionInterpolator:s,orientationInterpolator:o,scaleInterpolator:r}]of this.interpolators.entries()){if(e<t.length&&!t[e])continue;const a=i.get(n[e]);a&&(s?._value_changed.addFieldInterest(a._translation),o?._value_changed.addFieldInterest(a._rotation),r?._value_changed.addFieldInterest(a._scale))}},disconnectJoints(e){const t=this.joints,n=this.getJointsIndex(e);for(const[e,{positionInterpolator:i,orientationInterpolator:s,scaleInterpolator:o}]of this.interpolators.entries()){const r=n.get(t[e]);r&&(i?._value_changed.removeFieldInterest(r._translation),s?._value_changed.removeFieldInterest(r._rotation),o?._value_changed.removeFieldInterest(r._scale))}},getJointsIndex(e){const t=new Map(e.map(e=>[e._name.getValue().trim(),e]));return t.delete("IGNORED"),t.set("HumanoidRoot",t.get("humanoid_root")),t},set_enabled__(){this._enabled.getValue()?this.timeSensor._startTime=Date.now()/1e3:this.timeSensor._stopTime=Date.now()/1e3},set_joints__(){this.joints=this._joints.getValue().replace(/^[\s,]+|[\s,]+$/gs,"").split(/[\s,]+/s);for(const{positionInterpolator:e,orientationInterpolator:t,scaleInterpolator:n}of this.interpolators)e?._value_changed.getFieldInterests().forEach(t=>e._value_changed.removeFieldInterest(t)),t?._value_changed.getFieldInterests().forEach(e=>t._value_changed.removeFieldInterest(e)),n?._value_changed.getFieldInterests().forEach(e=>n._value_changed.removeFieldInterest(e))},set_interpolators__(){const e=this.timeSensor;e._fraction_changed.getFieldInterests().forEach(t=>e._fraction_changed.removeFieldInterest(t));const t=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map(e=>e.split(/[\s,]+/s)),n=this._values,i=t.reduce((e,t)=>e+t.length,0),s=Math.floor(i?n.length/i:0),o=new Map,r=Array.from({length:t.length},()=>({}));this.interpolators=r;for(let i=0,a=0;i<s;++i)for(const[d,h]of t.entries()){o.clear();for(const e of h)o.set(e,n[a++]);if(o.has("Xposition")||o.has("Yposition")||o.has("Zposition")){const t=r[d].positionInterpolator??this.createPositionInterpolator(r,d),n=i/(s-1),a=new(ie())(o.get("Xposition")??0,o.get("Yposition")??0,o.get("Zposition")??0);t._key.push(n),t._keyValue.push(a),e._fraction_changed.addFieldInterest(t._set_fraction)}if(o.has("Xrotation")||o.has("Yrotation")||o.has("Zrotation")){const t=r[d].orientationInterpolator??this.createOrientationInterpolator(r,d),n=i/(s-1),a=oe().fromEuler(C().radians(o.get("Xrotation")??0),C().radians(o.get("Yrotation")??0),C().radians(o.get("Zrotation")??0));t._key.push(n),t._keyValue.push(a),e._fraction_changed.addFieldInterest(t._set_fraction)}if(o.has("Xscale")||o.has("Yscale")||o.has("Zscale")){const t=r[d].scaleInterpolator??this.createScaleInterpolator(r,d),n=i/(s-1),a=new(ie())(o.get("Xscale")??1,o.get("Yscale")??1,o.get("Zscale")??1);t._key.push(n),t._keyValue.push(a),e._fraction_changed.addFieldInterest(t._set_fraction)}}for(const{positionInterpolator:e,orientationInterpolator:t,scaleInterpolator:n}of r)e?.setup(),t?.setup(),n?.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=s-1,this._frameCount=s,this.set_frameDuration__()},set_next_or_previous__(e,t){if(!t.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*e;if(o>this.endFrame){if(!this._loop.getValue())return;this._frameIndex=this.startFrame}else if(o<this.startFrame){if(!this._loop.getValue())return;this._frameIndex=this.endFrame}else this._frameIndex=o},set_frameIndex__(){const e=this._frameCount.getValue(),t=C().clamp(this._frameIndex.getValue(),0,e),n=e>1?t/(e-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const e of this.timeSensor._fraction_changed.getFieldInterests())e.setValue(n)},set_frameDuration__(){const e=this._frameCount.getValue(),t=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=e>1?(e-1)*t:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const e=this._frameCount.getValue(),t=C().clamp(this._startFrame.getValue(),0,e),n=C().clamp(this._endFrame.getValue(),0,e);this.startFrame=Math.min(t,n),this.endFrame=Math.max(t,n),this.timeSensor._range[1]=e>1?this.startFrame/(e-1):0,this.timeSensor._range[2]=e>1?this.endFrame/(e-1):0},createPositionInterpolator(e,t){return e[t].positionInterpolator=new(Q())(this.getExecutionContext())},createOrientationInterpolator(e,t){return e[t].orientationInterpolator=new(te())(this.getExecutionContext())},createScaleInterpolator(e,t){return e[t].scaleInterpolator=new(Q())(this.getExecutionContext())},getFraction(){for(const e of this.timeSensor._fraction_changed.getFieldInterests())return e.getValue();return 0}}),Object.defineProperties(re,{...u().getStaticProperties("HAnimMotion","HAnim",2,"motions","4.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"enabled",new(o().SFBool)(!0)),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"joints",new(o().SFString)),new(a())(m().inputOutput,"channelsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"channels",new(o().SFString)),new(a())(m().inputOutput,"values",new(o().MFFloat)),new(a())(m().inputOutput,"loop",new(o().SFBool)),new(a())(m().inputOnly,"next",new(o().SFBool)),new(a())(m().inputOnly,"previous",new(o().SFBool)),new(a())(m().inputOutput,"frameIndex",new(o().SFInt32)),new(a())(m().inputOutput,"frameDuration",new(o().SFTime)(.1)),new(a())(m().inputOutput,"frameIncrement",new(o().SFInt32)(1)),new(a())(m().inputOutput,"startFrame",new(o().SFInt32)),new(a())(m().inputOutput,"endFrame",new(o().SFInt32)),new(a())(m().outputOnly,"cycleTime",new(o().SFTime)),new(a())(m().outputOnly,"elapsedTime",new(o().SFTime)),new(a())(m().outputOnly,"frameCount",new(o().SFInt32))]),enumerable:!0}});const ae=re,de=x().add("HAnimMotion",ae),he=e.X3DGroupingNode;var le=t.n(he);function ue(e){le().call(this,e),this.addType(m().HAnimSegment),this.addChildObjects(m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._mass.setUnit("mass");const t=Math.ceil(Math.sqrt(8));this.numJoints=0,this.numDisplacements=0,this.displacerNodes=[],this.displacementWeights=[],this.jointMatricesArray=new Float32Array(t*t*4)}Object.assign(Object.setPrototypeOf(ue.prototype,le().prototype),{initialize(){le().prototype.initialize.call(this);const e=this.getBrowser().getContext();if(1!==e.getVersion()){this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);this._displacers.addInterest("set_displacers__",this),this._coord.addInterest("set_coord__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this.set_displacers__(),this.set_coord__()}},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_displacers__(){const e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacementsTexture),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._coordIndex.removeInterest("addEvent",this._displacementWeightsTexture),t._weight.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacementsTexture),t._displacements.addInterest("addEvent",this._displacementsTexture),t._coordIndex.addInterest("addEvent",this._displacementWeightsTexture),t._weight.addInterest("addEvent",this._displacementWeightsTexture);this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_displacementsTexture__(){const e=this.coordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const{_weight:e,_coordIndex:i,_displacements:s}of this.displacerNodes)if(i.length){this.displacementWeights.push(e,0,0,0);for(const[e,o]of i.entries())t[o]?.push(...s[e],0,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.FLOAT,n)},set_coord__(){this.coordNode&&(this.coordNode.removeInterest("addEvent",this._displacementsTexture),this.coordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.coordNode=A()(m().Coordinate,this._coord)??A()(m().CoordinateDouble,this._coord),this.coordNode?(delete this.skinning,this.coordNode.addInterest("addEvent",this._displacementsTexture),this.coordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(e,t){this.coordNode&&t.getHAnimNode().push(this),le().prototype.traverse.call(this,e,t),this.skinning(e,t),this.coordNode&&t.getHAnimNode().pop()},skinning:(()=>{const e=new(k());return function(t,n){if(t!==b().DISPLAY)return;const i=n.getInvHumanoidMatrix().get(),s=this.jointMatricesArray,o=Math.ceil(Math.sqrt(8)),r=e.assign(n.getModelViewMatrix().get()).multRight(i);s.set(r,0);const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointMatricesTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,s)}})(),setShaderUniforms(e,t){const n=this.getBrowser(),i=n.getTexture2DUnit(),s=n.getTexture2DUnit(),o=n.getTexture2DUnit();e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,s),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,o)}}),Object.defineProperties(ue,{...u().getStaticProperties("HAnimSegment","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"mass",new(o().SFFloat)),new(a())(m().inputOutput,"centerOfMass",new(o().SFVec3f)),new(a())(m().inputOutput,"momentsOfInertia",new(o().MFFloat)(0,0,0,0,0,0,0,0,0)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"coord",new(o().SFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const ce=ue,_e=x().add("HAnimSegment",ce);function pe(e){L().call(this,e),this.addType(m().HAnimSite)}Object.setPrototypeOf(pe.prototype,L().prototype),Object.defineProperties(pe,{...u().getStaticProperties("HAnimSite","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const me=pe,ge=x().add("HAnimSite",me);i().add({name:"HAnim",concreteNodes:[f,H,Y,de,_e,ge],abstractNodes:[]});x().add("HAnimComponent",undefined)})();
1
+ /* X_ITE v11.5.14 */
2
+ const e=window[Symbol.for("X_ITE.X3D-11.5.14")];(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=e.Components;var i=t.n(n);const s=e.Fields;var o=t.n(s);const r=e.X3DFieldDefinition;var a=t.n(r);const d=e.FieldDefinitionArray;var h=t.n(d);const l=e.X3DNode;var u=t.n(l);const c=e.X3DGeometricPropertyNode;var _=t.n(c);const p=e.X3DConstants;var m=t.n(p);const g=e.Namespace;var x=t.n(g);function T(e){_().call(this,e),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(T.prototype,_().prototype),Object.defineProperties(T,{...u().getStaticProperties("HAnimDisplacer","HAnim",1,"displacers","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"weight",new(o().SFFloat)),new(a())(m().inputOutput,"coordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"displacements",new(o().MFVec3f))]),enumerable:!0}});const w=T,f=x().add("HAnimDisplacer",w),I=e.X3DChildNode;var F=t.n(I);const S=e.Group;var v=t.n(S);const E=e.Transform;var N=t.n(E);const O=e.X3DBoundedObject;var M=t.n(O);const D=e.TraverseType;var b=t.n(D);const y=e.X3DCast;var A=t.n(y);const j=e.Matrix4;var k=t.n(j);const R=e.Algorithm;var C=t.n(R);const X=e.ShaderRegistry;var U=t.n(X);const W=x().add("Skin2.glsl",()=>"\n#if defined(X3D_SKINNING)\nin float x3d_CoordIndex;\n#if X3D_NUM_JOINT_SETS>0\nuniform sampler2D x3d_JointsTexture;\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_DisplacementsTexture;uniform sampler2D x3d_DisplacementWeightsTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0||X3D_NUM_DISPLACEMENTS>0\nuniform sampler2D x3d_JointMatricesTexture;\n#endif\n#if X3D_NUM_JOINT_SETS>0\nmat4 getJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);vec4 d=texelFetch(x3d_JointMatricesTexture,joint*8+3,0);return mat4(a,b,c,d);}\n#if defined(X3D_NORMALS)\nmat3 getJointNormalMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8+4,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+5,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+6,0);return mat3(a.xyz,vec3(a.w,b.xy),vec3(b.zw,c.x));}\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\nmat3 getDisplacementJointMatrix(const in int joint){vec4 a=texelFetch(x3d_JointMatricesTexture,joint*8,0);vec4 b=texelFetch(x3d_JointMatricesTexture,joint*8+1,0);vec4 c=texelFetch(x3d_JointMatricesTexture,joint*8+2,0);return mat3(a.xyz,b.xyz,c.xyz);}\n#endif\n#if defined(X3D_NORMALS)\nvec3 skinNormal=vec3(0);\n#if defined(X3D_TANGENTS)\nvec3 skinTangent=vec3(0);\n#endif\n#define getSkinNormal(normal)(skinNormal)\n#if defined(X3D_TANGENTS)\n#define getSkinTangent(tangent)(skinTangent)\n#endif\n#else\n#define getSkinNormal(normal)(normal)\n#define getSkinTangent(tangent)(tangent)\n#endif\nvec4 getSkinVertex(const in vec4 vertex,const in vec3 normal,const in vec3 tangent){int coordIndex=int(x3d_CoordIndex);vec4 skin=vertex;\n#if defined(X3D_NORMALS)\nskinNormal=normal;\n#if defined(X3D_TANGENTS)\nskinTangent=tangent;\n#endif\n#endif\n#if X3D_NUM_DISPLACEMENTS>0\n{int coordIndexD=coordIndex*(X3D_NUM_DISPLACEMENTS*2);for(int i=0;i<X3D_NUM_DISPLACEMENTS;++i){int index=coordIndexD+i*2;vec4 displacement=texelFetch(x3d_DisplacementsTexture,index,0);int weightIndex=int(texelFetch(x3d_DisplacementsTexture,index+1,0).x);float weight=texelFetch(x3d_DisplacementWeightsTexture,weightIndex,0).x;skin.xyz+=getDisplacementJointMatrix(int(displacement.w))*(displacement.xyz*weight);}}\n#endif\n#if X3D_NUM_JOINT_SETS>0\n{int coordIndexJ=coordIndex*(X3D_NUM_JOINT_SETS*2);for(int i=0;i<X3D_NUM_JOINT_SETS;++i){int index=coordIndexJ+i;ivec4 joints=ivec4(texelFetch(x3d_JointsTexture,index,0));vec4 weights=texelFetch(x3d_JointsTexture,index+X3D_NUM_JOINT_SETS,0);for(int i=0;i<4;++i){int joint=joints[i];float weight=weights[i];skin+=(getJointMatrix(joint)*vertex-vertex)*weight;\n#if defined(X3D_NORMALS)\nmat3 jointNormalMatrix=getJointNormalMatrix(joint);skinNormal+=(jointNormalMatrix*normal-normal)*weight;\n#if defined(X3D_TANGENTS)\nskinTangent+=(jointNormalMatrix*tangent-tangent)*weight;\n#endif\n#endif\n}}}\n#endif\nreturn skin;}\n#endif\n");function J(e){F().call(this,e),M().call(this,e),this.addType(m().HAnimHumanoid),this.addChildObjects(m().outputOnly,"jointTextures",new(o().SFTime),m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._translation.setUnit("length"),this._center.setUnit("length"),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),e.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(v())(e),this.viewpointsNode=new(v())(e),this.skinNode=new V(e,this),this.transformNode=new(N())(e),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.update=new B,this.skinning=Function.prototype}U().addInclude("Skin",void 0,W),Object.assign(Object.setPrototypeOf(J.prototype,F().prototype),M().prototype,{initialize(){F().prototype.initialize.call(this),M().prototype.initialize.call(this),this.skeletonNode.addAllowedTypes(m().HAnimJoint,m().HAnimSite),this.viewpointsNode.addAllowedTypes(m().HAnimSite),this._skeleton.addFieldInterest(this.skeletonNode._children),this._viewpoints.addFieldInterest(this.viewpointsNode._children),this._skin.addFieldInterest(this.skinNode._children),this.skeletonNode._children=this._skeleton,this.viewpointsNode._children=this._viewpoints,this.skinNode._children=this._skin,this.skeletonNode.setPrivate(!0),this.viewpointsNode.setPrivate(!0),this.skinNode.setPrivate(!0),this._translation.addFieldInterest(this.transformNode._translation),this._rotation.addFieldInterest(this.transformNode._rotation),this._scale.addFieldInterest(this.transformNode._scale),this._scaleOrientation.addFieldInterest(this.transformNode._scaleOrientation),this._center.addFieldInterest(this.transformNode._center),this._bboxDisplay.addFieldInterest(this.transformNode._bboxDisplay),this._bboxSize.addFieldInterest(this.transformNode._bboxSize),this._bboxCenter.addFieldInterest(this.transformNode._bboxCenter),this.transformNode._translation=this._translation,this.transformNode._rotation=this._rotation,this.transformNode._scale=this._scale,this.transformNode._scaleOrientation=this._scaleOrientation,this.transformNode._center=this._center,this.transformNode._bboxDisplay=this._bboxDisplay,this.transformNode._bboxSize=this._bboxSize,this.transformNode._bboxCenter=this._bboxCenter,this.transformNode._children=[this.skeletonNode,this.viewpointsNode,this.skinNode],this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.connectChildNode(this.transformNode);const e=this.getBrowser().getContext();if(1!==e.getVersion()){this.jointsTexture=e.createTexture(),this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.jointsTexture,this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);this._motionsEnabled.addInterest("set_motions__",this),this._motions.addInterest("set_motions__",this),this._jointBindingPositions.addInterest("set_joints__",this),this._jointBindingRotations.addInterest("set_joints__",this),this._jointBindingScales.addInterest("set_joints__",this),this._joints.addInterest("set_joints__",this),this._jointTextures.addInterest("set_jointTextures__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this._skinCoord.addInterest("set_skinCoord__",this),this.set_motions__(),this.set_joints__(),this.set_skinCoord__()}},getBBox(e,t){return this.transformNode.getBBox(e,t)},getSubBBox(e,t){return this.transformNode.getSubBBox(e,t)},getMatrix(){return this.transformNode.getMatrix()},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const e=this._motionsEnabled,t=this.motionNodes;for(const e of t)e._joints.removeInterest("set_connectJoints__",this),e._channelsEnabled.removeInterest("set_connectJoints__",this),e._channels.removeInterest("set_connectJoints__",this),e._values.removeInterest("set_connectJoints__",this),e.disconnectJoints(this.jointNodes);t.length=0;for(const[n,i]of this._motions.entries()){if(n<e.length&&!e[n])continue;const s=A()(m().HAnimMotion,i);s&&t.push(s)}for(const e of t)e._joints.addInterest("set_connectJoints__",this,e),e._channelsEnabled.addInterest("set_connectJoints__",this,e),e._channels.addInterest("set_connectJoints__",this,e),e._values.addInterest("set_connectJoints__",this,e),e.connectJoints(this.jointNodes)},set_connectJoints__(e){e.disconnectJoints(this.jointNodes),e.connectJoints(this.jointNodes)},set_joints__(){const e=this.jointNodes,t=this.jointBindingMatrices,n=this._jointBindingPositions,i=this._jointBindingRotations,s=this._jointBindingScales,o=n.length,r=i.length,a=s.length;for(const t of this.motionNodes)t.disconnectJoints(e);for(const t of e)t.removeInterest("unlock",this.update),t._skinCoordIndex.removeInterest("addEvent",this._jointTextures),t._skinCoordWeight.removeInterest("addEvent",this._jointTextures),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0,t.length=0;for(const[d,h]of this._joints.entries()){const l=A()(m().HAnimJoint,h);if(!l)continue;const u=o?n[Math.min(d,o-1)].getValue():null,c=r?i[Math.min(d,r-1)].getValue():null,_=a?s[Math.min(d,a-1)].getValue():null;e.push(l),t.push((new(k())).set(u,c,_))}for(const t of e)t.addInterest("unlock",this.update),t._skinCoordIndex.addInterest("addEvent",this._jointTextures),t._skinCoordWeight.addInterest("addEvent",this._jointTextures),t._displacements.addInterest("addEvent",this._displacementsTexture),t._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const t of this.motionNodes)t.connectJoints(e);const d=Math.ceil(Math.sqrt(8*e.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]),n=Array.from({length:e},()=>[]);for(const[e,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(t[r]?.push(e),n[r]?.push(i))}}const i=C().roundToMultiple(t.reduce((e,t)=>Math.max(e,t.length),0),4),s=2*i,o=Math.ceil(Math.sqrt(e*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<e;++o)r.set(t[o],o*s),r.set(n[o],o*s+i);this.numJoints=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.update.unlock(),this.set_humanoidKey__()},set_displacementsTexture__(){const e=this.skinCoordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const[e,i]of this.jointNodes.entries())for(const{_weight:s,_coordIndex:o,_displacements:r}of i.getDisplacers())if(o.length){this.displacementWeights.push(s,0,0,0);for(const[i,s]of o.entries())t[s]?.push(...r[i],e,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.update.unlock(),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.FLOAT,n)},set_skinCoord__(){this.skinCoordNode&&(this.skinCoordNode.removeInterest("addEvent",this._jointTextures),this.skinCoordNode.removeInterest("addEvent",this._displacementsTexture),this.skinCoordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.skinCoordNode=A()(m().Coordinate,this._skinCoord)??A()(m().CoordinateDouble,this._skinCoord),this.skinCoordNode?(delete this.skinning,this.skinCoordNode.addInterest("addEvent",this._jointTextures),this.skinCoordNode.addInterest("addEvent",this._displacementsTexture),this.skinCoordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(e,t){const n=t.getInvHumanoidMatrix();n.push(this.transformNode.getMatrix()),n.multRight(t.getModelViewMatrix().get()),n.inverse(),this.transformNode.traverse(e,t),this.skinning(e,t),n.pop()},skinning(e,t){if(e!==b().DISPLAY||this.update.lock())return;const n=t.getInvHumanoidMatrix().get(),i=this.jointNodes,s=i.length,o=this.jointBindingMatrices,r=this.jointMatricesArray,a=Math.ceil(Math.sqrt(8*s));for(let e=0;e<s;++e){const t=i[e],s=o[e],a=t.getModelViewMatrix().multRight(n).multLeft(s),d=a.submatrix.transpose().inverse();r.set(a,32*e+0),r.set(d,32*e+16)}const d=this.getBrowser().getContext();d.bindTexture(d.TEXTURE_2D,this.jointMatricesTexture),d.texImage2D(d.TEXTURE_2D,0,d.RGBA32F,a,a,0,d.RGBA,d.FLOAT,r)},setShaderUniforms(e,t){const n=this.getBrowser(),i=n.getTextureUnit(),s=n.getTextureUnit(),o=n.getTextureUnit(),r=n.getTextureUnit();e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.jointsTexture),e.uniform1i(t.x3d_JointsTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,s),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,o),e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,r)},dispose(){M().prototype.dispose.call(this),F().prototype.dispose.call(this)}}),Object.defineProperties(J,{...u().getStaticProperties("HAnimHumanoid","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"info",new(o().MFString)),new(a())(m().inputOutput,"version",new(o().SFString)("2.0")),new(a())(m().inputOutput,"skeletalConfiguration",new(o().SFString)("BASIC")),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOutput,"skeleton",new(o().MFNode)),new(a())(m().inputOutput,"jointBindingPositions",new(o().MFVec3f)),new(a())(m().inputOutput,"jointBindingRotations",new(o().MFRotation)),new(a())(m().inputOutput,"jointBindingScales",new(o().MFVec3f)),new(a())(m().inputOutput,"joints",new(o().MFNode)),new(a())(m().inputOutput,"segments",new(o().MFNode)),new(a())(m().inputOutput,"sites",new(o().MFNode)),new(a())(m().inputOutput,"viewpoints",new(o().MFNode)),new(a())(m().inputOutput,"motionsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"motions",new(o().MFNode)),new(a())(m().inputOutput,"skinBindingNormals",new(o().SFNode)),new(a())(m().inputOutput,"skinBindingCoords",new(o().SFNode)),new(a())(m().inputOutput,"skinNormal",new(o().SFNode)),new(a())(m().inputOutput,"skinCoord",new(o().SFNode)),new(a())(m().inputOutput,"skin",new(o().MFNode))]),enumerable:!0}});class V extends(v()){#e;constructor(e,t){super(e),this.#e=t}traverse(e,t){t.getHAnimNode().push(this.#e),super.traverse(e,t),t.getHAnimNode().pop()}}class B{#t=!0;unlock(){this.#t=!1}lock(){const e=this.#t;return this.#t=!0,e}}const P=J,H=x().add("HAnimHumanoid",P),z=e.X3DTransformNode;var L=t.n(z);function G(e){L().call(this,e),this.addType(m().HAnimJoint),this.addChildObjects(m().outputOnly,"displacements",new(o().SFTime),m().outputOnly,"displacementWeights",new(o().SFTime)),this.setVisibleObject(!0),this.addAllowedTypes(m().HAnimJoint,m().HAnimSegment),e.getSpecificationVersion()<=3.3&&this.addAllowedTypes(m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(k())}Object.assign(Object.setPrototypeOf(G.prototype,L().prototype),{initialize(){L().prototype.initialize.call(this),this._displacers.addInterest("set_displacers__",this),this.set_displacers__()},getModelViewMatrix(){return this.modelViewMatrix},getDisplacers(){return this.displacerNodes},set_visibleObjects__(){},set_displacers__(){const e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacements),t._displacements.removeInterest("addEvent",this._displacements),t._coordIndex.removeInterest("addEvent",this._displacementWeights),t._weight.removeInterest("addEvent",this._displacementWeights);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacements),t._displacements.addInterest("addEvent",this._displacements),t._coordIndex.addInterest("addEvent",this._displacementWeights),t._weight.addInterest("addEvent",this._displacementWeights);this._displacements.addEvent(),this._displacementWeights.addEvent()},traverse(e,t){const n=t.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),e===b().DISPLAY&&this.modelViewMatrix.assign(n.get()),L().prototype.groupTraverse.call(this,e,t),n.pop()},groupTraverse(e,t){e===b().DISPLAY&&this.modelViewMatrix.assign(t.getModelViewMatrix().get()),L().prototype.groupTraverse.call(this,e,t)}}),Object.defineProperties(G,{...u().getStaticProperties("HAnimJoint","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"llimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"ulimit",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"limitOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"stiffness",new(o().MFFloat)(0,0,0)),new(a())(m().inputOutput,"skinCoordIndex",new(o().MFInt32)),new(a())(m().inputOutput,"skinCoordWeight",new(o().MFFloat)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const K=G,Y=x().add("HAnimJoint",K),q=e.TimeSensor;var Z=t.n(q);const $=e.PositionInterpolator;var Q=t.n($);const ee=e.OrientationInterpolator;var te=t.n(ee);const ne=e.Vector3;var ie=t.n(ne);const se=e.Rotation4;var oe=t.n(se);function re(e){F().call(this,e),this.addType(m().HAnimMotion),this.timeSensor=new(Z())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(re.prototype,F().prototype),{initialize(){F().prototype.initialize.call(this),this._loop.addFieldInterest(this.timeSensor._loop),this.timeSensor._cycleTime.addFieldInterest(this._cycleTime),this.timeSensor._elapsedTime.addFieldInterest(this._elapsedTime),this.timeSensor._enabled=!1,this.timeSensor._loop=this._loop,this.timeSensor._stopTime=1,this.timeSensor.setup(),this._enabled.addInterest("set_enabled__",this),this._joints.addInterest("set_joints__",this),this._channels.addInterest("set_interpolators__",this),this._values.addInterest("set_interpolators__",this),this._next.addInterest("set_next_or_previous__",this,1),this._previous.addInterest("set_next_or_previous__",this,-1),this._frameIndex.addInterest("set_frameIndex__",this),this._frameDuration.addInterest("set_frameDuration__",this),this._frameIncrement.addInterest("set_frameIncrement__",this),this._startFrame.addInterest("set_start_or_endFrame__",this),this._endFrame.addInterest("set_start_or_endFrame__",this),this.set_enabled__(),this.set_joints__(),this.set_frameIncrement__(),this.set_interpolators__()},connectJoints(e){const t=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(e);for(const[e,{positionInterpolator:s,orientationInterpolator:o,scaleInterpolator:r}]of this.interpolators.entries()){if(e<t.length&&!t[e])continue;const a=i.get(n[e]);a&&(s?._value_changed.addFieldInterest(a._translation),o?._value_changed.addFieldInterest(a._rotation),r?._value_changed.addFieldInterest(a._scale))}},disconnectJoints(e){const t=this.joints,n=this.getJointsIndex(e);for(const[e,{positionInterpolator:i,orientationInterpolator:s,scaleInterpolator:o}]of this.interpolators.entries()){const r=n.get(t[e]);r&&(i?._value_changed.removeFieldInterest(r._translation),s?._value_changed.removeFieldInterest(r._rotation),o?._value_changed.removeFieldInterest(r._scale))}},getJointsIndex(e){const t=new Map(e.map(e=>[e._name.getValue().trim(),e]));return t.delete("IGNORED"),t.set("HumanoidRoot",t.get("humanoid_root")),t},set_enabled__(){this._enabled.getValue()?this.timeSensor._startTime=Date.now()/1e3:this.timeSensor._stopTime=Date.now()/1e3},set_joints__(){this.joints=this._joints.getValue().replace(/^[\s,]+|[\s,]+$/gs,"").split(/[\s,]+/s);for(const{positionInterpolator:e,orientationInterpolator:t,scaleInterpolator:n}of this.interpolators)e?._value_changed.getFieldInterests().forEach(t=>e._value_changed.removeFieldInterest(t)),t?._value_changed.getFieldInterests().forEach(e=>t._value_changed.removeFieldInterest(e)),n?._value_changed.getFieldInterests().forEach(e=>n._value_changed.removeFieldInterest(e))},set_interpolators__(){const e=this.timeSensor;e._fraction_changed.getFieldInterests().forEach(t=>e._fraction_changed.removeFieldInterest(t));const t=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map(e=>e.split(/[\s,]+/s)),n=this._values,i=t.reduce((e,t)=>e+t.length,0),s=Math.floor(i?n.length/i:0),o=new Map,r=Array.from({length:t.length},()=>({}));this.interpolators=r;for(let i=0,a=0;i<s;++i)for(const[d,h]of t.entries()){o.clear();for(const e of h)o.set(e,n[a++]);if(o.has("Xposition")||o.has("Yposition")||o.has("Zposition")){const t=r[d].positionInterpolator??this.createPositionInterpolator(r,d),n=i/(s-1),a=new(ie())(o.get("Xposition")??0,o.get("Yposition")??0,o.get("Zposition")??0);t._key.push(n),t._keyValue.push(a),e._fraction_changed.addFieldInterest(t._set_fraction)}if(o.has("Xrotation")||o.has("Yrotation")||o.has("Zrotation")){const t=r[d].orientationInterpolator??this.createOrientationInterpolator(r,d),n=i/(s-1),a=oe().fromEuler(C().radians(o.get("Xrotation")??0),C().radians(o.get("Yrotation")??0),C().radians(o.get("Zrotation")??0));t._key.push(n),t._keyValue.push(a),e._fraction_changed.addFieldInterest(t._set_fraction)}if(o.has("Xscale")||o.has("Yscale")||o.has("Zscale")){const t=r[d].scaleInterpolator??this.createScaleInterpolator(r,d),n=i/(s-1),a=new(ie())(o.get("Xscale")??1,o.get("Yscale")??1,o.get("Zscale")??1);t._key.push(n),t._keyValue.push(a),e._fraction_changed.addFieldInterest(t._set_fraction)}}for(const{positionInterpolator:e,orientationInterpolator:t,scaleInterpolator:n}of r)e?.setup(),t?.setup(),n?.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=s-1,this._frameCount=s,this.set_frameDuration__()},set_next_or_previous__(e,t){if(!t.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*e;if(o>this.endFrame){if(!this._loop.getValue())return;this._frameIndex=this.startFrame}else if(o<this.startFrame){if(!this._loop.getValue())return;this._frameIndex=this.endFrame}else this._frameIndex=o},set_frameIndex__(){const e=this._frameCount.getValue(),t=C().clamp(this._frameIndex.getValue(),0,e),n=e>1?t/(e-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const e of this.timeSensor._fraction_changed.getFieldInterests())e.setValue(n)},set_frameDuration__(){const e=this._frameCount.getValue(),t=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=e>1?(e-1)*t:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const e=this._frameCount.getValue(),t=C().clamp(this._startFrame.getValue(),0,e),n=C().clamp(this._endFrame.getValue(),0,e);this.startFrame=Math.min(t,n),this.endFrame=Math.max(t,n),this.timeSensor._range[1]=e>1?this.startFrame/(e-1):0,this.timeSensor._range[2]=e>1?this.endFrame/(e-1):0},createPositionInterpolator(e,t){return e[t].positionInterpolator=new(Q())(this.getExecutionContext())},createOrientationInterpolator(e,t){return e[t].orientationInterpolator=new(te())(this.getExecutionContext())},createScaleInterpolator(e,t){return e[t].scaleInterpolator=new(Q())(this.getExecutionContext())},getFraction(){for(const e of this.timeSensor._fraction_changed.getFieldInterests())return e.getValue();return 0}}),Object.defineProperties(re,{...u().getStaticProperties("HAnimMotion","HAnim",2,"motions","4.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"enabled",new(o().SFBool)(!0)),new(a())(m().inputOutput,"loa",new(o().SFInt32)(-1)),new(a())(m().inputOutput,"joints",new(o().SFString)),new(a())(m().inputOutput,"channelsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"channels",new(o().SFString)),new(a())(m().inputOutput,"values",new(o().MFFloat)),new(a())(m().inputOutput,"loop",new(o().SFBool)),new(a())(m().inputOnly,"next",new(o().SFBool)),new(a())(m().inputOnly,"previous",new(o().SFBool)),new(a())(m().inputOutput,"frameIndex",new(o().SFInt32)),new(a())(m().inputOutput,"frameDuration",new(o().SFTime)(.1)),new(a())(m().inputOutput,"frameIncrement",new(o().SFInt32)(1)),new(a())(m().inputOutput,"startFrame",new(o().SFInt32)),new(a())(m().inputOutput,"endFrame",new(o().SFInt32)),new(a())(m().outputOnly,"cycleTime",new(o().SFTime)),new(a())(m().outputOnly,"elapsedTime",new(o().SFTime)),new(a())(m().outputOnly,"frameCount",new(o().SFInt32))]),enumerable:!0}});const ae=re,de=x().add("HAnimMotion",ae),he=e.X3DGroupingNode;var le=t.n(he);function ue(e){le().call(this,e),this.addType(m().HAnimSegment),this.addChildObjects(m().outputOnly,"displacementsTexture",new(o().SFTime),m().outputOnly,"displacementWeightsTexture",new(o().SFTime)),this._mass.setUnit("mass");const t=Math.ceil(Math.sqrt(8));this.numJoints=0,this.numDisplacements=0,this.displacerNodes=[],this.displacementWeights=[],this.jointMatricesArray=new Float32Array(t*t*4)}Object.assign(Object.setPrototypeOf(ue.prototype,le().prototype),{initialize(){le().prototype.initialize.call(this);const e=this.getBrowser().getContext();if(1!==e.getVersion()){this.displacementsTexture=e.createTexture(),this.displacementWeightsTexture=e.createTexture(),this.jointMatricesTexture=e.createTexture();for(const t of[this.displacementsTexture,this.displacementWeightsTexture,this.jointMatricesTexture])e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);this._displacers.addInterest("set_displacers__",this),this._coord.addInterest("set_coord__",this),this._displacementsTexture.addInterest("set_displacementsTexture__",this),this._displacementWeightsTexture.addInterest("set_displacementWeightsTexture__",this),this.set_displacers__(),this.set_coord__()}},getHAnimKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_displacers__(){const e=this.displacerNodes;for(const t of e)t._coordIndex.removeInterest("addEvent",this._displacementsTexture),t._displacements.removeInterest("addEvent",this._displacementsTexture),t._coordIndex.removeInterest("addEvent",this._displacementWeightsTexture),t._weight.removeInterest("addEvent",this._displacementWeightsTexture);e.length=0;for(const t of this._displacers){const n=A()(m().HAnimDisplacer,t);n&&e.push(n)}for(const t of e)t._coordIndex.addInterest("addEvent",this._displacementsTexture),t._displacements.addInterest("addEvent",this._displacementsTexture),t._coordIndex.addInterest("addEvent",this._displacementWeightsTexture),t._weight.addInterest("addEvent",this._displacementWeightsTexture);this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_displacementsTexture__(){const e=this.coordNode?._point.length||1,t=Array.from({length:e},()=>[]);let n=0;this.displacementWeights.length=0;for(const{_weight:e,_coordIndex:i,_displacements:s}of this.displacerNodes)if(i.length){this.displacementWeights.push(e,0,0,0);for(const[e,o]of i.entries())t[o]?.push(...s[e],0,n,0,0,0);++n}const i=t.reduce((e,t)=>Math.max(e,t.length),0)/8,s=8*i,o=Math.ceil(Math.sqrt(e*i*2))||1,r=new Float32Array(o*o*4);for(let n=0;n<e;++n)r.set(t[n],n*s);this.numDisplacements=i;const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.displacementsTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,r),this.displacementWeightsSize=Math.ceil(Math.sqrt(n)),this.displacementWeightsArray=new Float32Array(this.displacementWeightsSize*this.displacementWeightsSize*4),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const e=this.getBrowser().getContext(),t=this.displacementWeightsSize,n=this.displacementWeightsArray;n.set(this.displacementWeights),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA32F,t,t,0,e.RGBA,e.FLOAT,n)},set_coord__(){this.coordNode&&(this.coordNode.removeInterest("addEvent",this._displacementsTexture),this.coordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.coordNode=A()(m().Coordinate,this._coord)??A()(m().CoordinateDouble,this._coord),this.coordNode?(delete this.skinning,this.coordNode.addInterest("addEvent",this._displacementsTexture),this.coordNode.addInterest("addEvent",this._displacementWeightsTexture)):this.skinning=Function.prototype,this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},traverse(e,t){this.coordNode&&t.getHAnimNode().push(this),le().prototype.traverse.call(this,e,t),this.skinning(e,t),this.coordNode&&t.getHAnimNode().pop()},skinning:(()=>{const e=new(k());return function(t,n){if(t!==b().DISPLAY)return;const i=n.getInvHumanoidMatrix().get(),s=this.jointMatricesArray,o=Math.ceil(Math.sqrt(8)),r=e.assign(n.getModelViewMatrix().get()).multRight(i);s.set(r,0);const a=this.getBrowser().getContext();a.bindTexture(a.TEXTURE_2D,this.jointMatricesTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA32F,o,o,0,a.RGBA,a.FLOAT,s)}})(),setShaderUniforms(e,t){const n=this.getBrowser(),i=n.getTextureUnit(),s=n.getTextureUnit(),o=n.getTextureUnit();e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.displacementsTexture),e.uniform1i(t.x3d_DisplacementsTexture,i),e.activeTexture(e.TEXTURE0+s),e.bindTexture(e.TEXTURE_2D,this.displacementWeightsTexture),e.uniform1i(t.x3d_DisplacementWeightsTexture,s),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,this.jointMatricesTexture),e.uniform1i(t.x3d_JointMatricesTexture,o)}}),Object.defineProperties(ue,{...u().getStaticProperties("HAnimSegment","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"mass",new(o().SFFloat)),new(a())(m().inputOutput,"centerOfMass",new(o().SFVec3f)),new(a())(m().inputOutput,"momentsOfInertia",new(o().MFFloat)(0,0,0,0,0,0,0,0,0)),new(a())(m().inputOutput,"displacers",new(o().MFNode)),new(a())(m().inputOutput,"coord",new(o().SFNode)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const ce=ue,_e=x().add("HAnimSegment",ce);function pe(e){L().call(this,e),this.addType(m().HAnimSite)}Object.setPrototypeOf(pe.prototype,L().prototype),Object.defineProperties(pe,{...u().getStaticProperties("HAnimSite","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(h())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"description",new(o().SFString)),new(a())(m().inputOutput,"name",new(o().SFString)),new(a())(m().inputOutput,"translation",new(o().SFVec3f)),new(a())(m().inputOutput,"rotation",new(o().SFRotation)),new(a())(m().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(a())(m().inputOutput,"scaleOrientation",new(o().SFRotation)),new(a())(m().inputOutput,"center",new(o().SFVec3f)),new(a())(m().inputOutput,"visible",new(o().SFBool)(!0)),new(a())(m().inputOutput,"bboxDisplay",new(o().SFBool)),new(a())(m().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(a())(m().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(a())(m().inputOnly,"addChildren",new(o().MFNode)),new(a())(m().inputOnly,"removeChildren",new(o().MFNode)),new(a())(m().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const me=pe,ge=x().add("HAnimSite",me);i().add({name:"HAnim",concreteNodes:[f,H,Y,de,_e,ge],abstractNodes:[]});x().add("HAnimComponent",undefined)})();
@@ -1,5 +1,5 @@
1
- /* X_ITE v11.5.11 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.11")];
1
+ /* X_ITE v11.5.14 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.14")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -46,53 +46,6 @@ var external_X_ITE_X3D_Components_default = /*#__PURE__*/__webpack_require__.n(e
46
46
  const external_X_ITE_X3D_Namespace_namespaceObject = __X_ITE_X3D__ .Namespace;
47
47
  var external_X_ITE_X3D_Namespace_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Namespace_namespaceObject);
48
48
  ;// ./src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js
49
- /*******************************************************************************
50
- *
51
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
52
- *
53
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
54
- *
55
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
56
- *
57
- * The copyright notice above does not evidence any actual of intended
58
- * publication of such source code, and is an unpublished work by create3000.
59
- * This material contains CONFIDENTIAL INFORMATION that is the property of
60
- * create3000.
61
- *
62
- * No permission is granted to copy, distribute, or create derivative works from
63
- * the contents of this software, in whole or in part, without the prior written
64
- * permission of create3000.
65
- *
66
- * NON-MILITARY USE ONLY
67
- *
68
- * All create3000 software are effectively free software with a non-military use
69
- * restriction. It is free. Well commented source is provided. You may reuse the
70
- * source in any way you please with the exception anything that uses it must be
71
- * marked to indicate is contains 'non-military use only' components.
72
- *
73
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
74
- *
75
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
76
- *
77
- * This file is part of the X_ITE Project.
78
- *
79
- * X_ITE is free software: you can redistribute it and/or modify it under the
80
- * terms of the GNU General Public License version 3 only, as published by the
81
- * Free Software Foundation.
82
- *
83
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
84
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
85
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
86
- * details (a copy is included in the LICENSE file that accompanied this code).
87
- *
88
- * You should have received a copy of the GNU General Public License version 3
89
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
90
- * copy of the GPLv3 License.
91
- *
92
- * For Silvio, Joy and Adi.
93
- *
94
- ******************************************************************************/
95
-
96
49
  const
97
50
  _keyDeviceSensorNodes = Symbol (),
98
51
  _keydown = Symbol (),
@@ -167,53 +120,6 @@ var external_X_ITE_X3D_X3DSensorNode_default = /*#__PURE__*/__webpack_require__.
167
120
  const external_X_ITE_X3D_X3DConstants_namespaceObject = __X_ITE_X3D__ .X3DConstants;
168
121
  var external_X_ITE_X3D_X3DConstants_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DConstants_namespaceObject);
169
122
  ;// ./src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js
170
- /*******************************************************************************
171
- *
172
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
173
- *
174
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
175
- *
176
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
177
- *
178
- * The copyright notice above does not evidence any actual of intended
179
- * publication of such source code, and is an unpublished work by create3000.
180
- * This material contains CONFIDENTIAL INFORMATION that is the property of
181
- * create3000.
182
- *
183
- * No permission is granted to copy, distribute, or create derivative works from
184
- * the contents of this software, in whole or in part, without the prior written
185
- * permission of create3000.
186
- *
187
- * NON-MILITARY USE ONLY
188
- *
189
- * All create3000 software are effectively free software with a non-military use
190
- * restriction. It is free. Well commented source is provided. You may reuse the
191
- * source in any way you please with the exception anything that uses it must be
192
- * marked to indicate is contains 'non-military use only' components.
193
- *
194
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
195
- *
196
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
197
- *
198
- * This file is part of the X_ITE Project.
199
- *
200
- * X_ITE is free software: you can redistribute it and/or modify it under the
201
- * terms of the GNU General Public License version 3 only, as published by the
202
- * Free Software Foundation.
203
- *
204
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
205
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
206
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
207
- * details (a copy is included in the LICENSE file that accompanied this code).
208
- *
209
- * You should have received a copy of the GNU General Public License version 3
210
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
211
- * copy of the GPLv3 License.
212
- *
213
- * For Silvio, Joy and Adi.
214
- *
215
- ******************************************************************************/
216
-
217
123
 
218
124
 
219
125
 
@@ -280,53 +186,6 @@ const X3DKeyDeviceSensorNode_default_ = X3DKeyDeviceSensorNode;
280
186
 
281
187
  /* harmony default export */ const KeyDeviceSensor_X3DKeyDeviceSensorNode = (external_X_ITE_X3D_Namespace_default().add ("X3DKeyDeviceSensorNode", X3DKeyDeviceSensorNode_default_));
282
188
  ;// ./src/x_ite/Components/KeyDeviceSensor/KeySensor.js
283
- /*******************************************************************************
284
- *
285
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
286
- *
287
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
288
- *
289
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
290
- *
291
- * The copyright notice above does not evidence any actual of intended
292
- * publication of such source code, and is an unpublished work by create3000.
293
- * This material contains CONFIDENTIAL INFORMATION that is the property of
294
- * create3000.
295
- *
296
- * No permission is granted to copy, distribute, or create derivative works from
297
- * the contents of this software, in whole or in part, without the prior written
298
- * permission of create3000.
299
- *
300
- * NON-MILITARY USE ONLY
301
- *
302
- * All create3000 software are effectively free software with a non-military use
303
- * restriction. It is free. Well commented source is provided. You may reuse the
304
- * source in any way you please with the exception anything that uses it must be
305
- * marked to indicate is contains 'non-military use only' components.
306
- *
307
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
308
- *
309
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
310
- *
311
- * This file is part of the X_ITE Project.
312
- *
313
- * X_ITE is free software: you can redistribute it and/or modify it under the
314
- * terms of the GNU General Public License version 3 only, as published by the
315
- * Free Software Foundation.
316
- *
317
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
318
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
319
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
320
- * details (a copy is included in the LICENSE file that accompanied this code).
321
- *
322
- * You should have received a copy of the GNU General Public License version 3
323
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
324
- * copy of the GPLv3 License.
325
- *
326
- * For Silvio, Joy and Adi.
327
- *
328
- ******************************************************************************/
329
-
330
189
 
331
190
 
332
191
 
@@ -646,53 +505,6 @@ const KeySensor_default_ = KeySensor;
646
505
 
647
506
  /* harmony default export */ const KeyDeviceSensor_KeySensor = (external_X_ITE_X3D_Namespace_default().add ("KeySensor", KeySensor_default_));
648
507
  ;// ./src/x_ite/Components/KeyDeviceSensor/StringSensor.js
649
- /*******************************************************************************
650
- *
651
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
652
- *
653
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
654
- *
655
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
656
- *
657
- * The copyright notice above does not evidence any actual of intended
658
- * publication of such source code, and is an unpublished work by create3000.
659
- * This material contains CONFIDENTIAL INFORMATION that is the property of
660
- * create3000.
661
- *
662
- * No permission is granted to copy, distribute, or create derivative works from
663
- * the contents of this software, in whole or in part, without the prior written
664
- * permission of create3000.
665
- *
666
- * NON-MILITARY USE ONLY
667
- *
668
- * All create3000 software are effectively free software with a non-military use
669
- * restriction. It is free. Well commented source is provided. You may reuse the
670
- * source in any way you please with the exception anything that uses it must be
671
- * marked to indicate is contains 'non-military use only' components.
672
- *
673
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
674
- *
675
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
676
- *
677
- * This file is part of the X_ITE Project.
678
- *
679
- * X_ITE is free software: you can redistribute it and/or modify it under the
680
- * terms of the GNU General Public License version 3 only, as published by the
681
- * Free Software Foundation.
682
- *
683
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
684
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
685
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
686
- * details (a copy is included in the LICENSE file that accompanied this code).
687
- *
688
- * You should have received a copy of the GNU General Public License version 3
689
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
690
- * copy of the GPLv3 License.
691
- *
692
- * For Silvio, Joy and Adi.
693
- *
694
- ******************************************************************************/
695
-
696
508
 
697
509
 
698
510
 
@@ -797,53 +609,6 @@ const StringSensor_default_ = StringSensor;
797
609
 
798
610
  /* harmony default export */ const KeyDeviceSensor_StringSensor = (external_X_ITE_X3D_Namespace_default().add ("StringSensor", StringSensor_default_));
799
611
  ;// ./src/assets/components/KeyDeviceSensorComponent.js
800
- /*******************************************************************************
801
- *
802
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
803
- *
804
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
805
- *
806
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
807
- *
808
- * The copyright notice above does not evidence any actual of intended
809
- * publication of such source code, and is an unpublished work by create3000.
810
- * This material contains CONFIDENTIAL INFORMATION that is the property of
811
- * create3000.
812
- *
813
- * No permission is granted to copy, distribute, or create derivative works from
814
- * the contents of this software, in whole or in part, without the prior written
815
- * permission of create3000.
816
- *
817
- * NON-MILITARY USE ONLY
818
- *
819
- * All create3000 software are effectively free software with a non-military use
820
- * restriction. It is free. Well commented source is provided. You may reuse the
821
- * source in any way you please with the exception anything that uses it must be
822
- * marked to indicate is contains 'non-military use only' components.
823
- *
824
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
825
- *
826
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
827
- *
828
- * This file is part of the X_ITE Project.
829
- *
830
- * X_ITE is free software: you can redistribute it and/or modify it under the
831
- * terms of the GNU General Public License version 3 only, as published by the
832
- * Free Software Foundation.
833
- *
834
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
835
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
836
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
837
- * details (a copy is included in the LICENSE file that accompanied this code).
838
- *
839
- * You should have received a copy of the GNU General Public License version 3
840
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
841
- * copy of the GPLv3 License.
842
- *
843
- * For Silvio, Joy and Adi.
844
- *
845
- ******************************************************************************/
846
-
847
612
 
848
613
 
849
614
 
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.11 */
2
- const e=window[Symbol.for("X_ITE.X3D-11.5.11")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var a in s)t.o(s,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var a=t.n(s);const i=e.Namespace;var n=t.n(i);const r=Symbol(),o=Symbol(),c=Symbol();function h(){this[r]=new Set}Object.assign(h.prototype,{initialize(){const e=this.getElement();e.on("keydown.X3DKeyDeviceSensorContext",this[o].bind(this)),e.on("keyup.X3DKeyDeviceSensorContext",this[c].bind(this))},addKeyDeviceSensorNode(e){this[r].add(e)},removeKeyDeviceSensorNode(e){this[r].delete(e)},getKeyDeviceSensorNodes(){return this[r]},[o](e){for(const t of this[r])t.keydown(e)},[c](e){for(const t of this[r])t.keyup(e)},dispose(){this.getElement().off(".X3DKeyDeviceSensorContext")}});const l=h,y=n().add("X3DKeyDeviceSensorContext",l),d=e.Fields;var _=t.n(d);const b=e.X3DFieldDefinition;var k=t.n(b);const u=e.FieldDefinitionArray;var p=t.n(u);const K=e.X3DNode;var S=t.n(K);const w=e.X3DSensorNode;var v=t.n(w);const g=e.X3DConstants;var f=t.n(g);function P(e){v().call(this,e),this.addType(f().X3DKeyDeviceSensorNode)}Object.assign(Object.setPrototypeOf(P.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this),this.getLive().addInterest("set_live__",this),this.set_live__()},set_live__(){this.getLive().getValue()?(this._enabled.addInterest("set_enabled__",this),this._enabled.getValue()&&this.enable()):(this._enabled.removeInterest("set_enabled__",this),this.disable())},set_enabled__(){this._enabled.getValue()?this.enable():this.disable()},enable(){this.getBrowser().addKeyDeviceSensorNode(this)},disable(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown(){},keyup(){},release(){}}),Object.defineProperties(P,S().getStaticProperties("X3DKeyDeviceSensorNode","KeyDeviceSensor",1));const D=P,O=n().add("X3DKeyDeviceSensorNode",D);function C(e){O.call(this,e),this.addType(f().KeySensor)}Object.assign(Object.setPrototypeOf(C.prototype,O.prototype),{keydown(e){switch(e.preventDefault(),this._isActive.getValue()||(this._isActive=!0),e.which){case 16:this._shiftKey=!0;break;case 17:this._controlKey=!0;break;case 18:this._altKey=!0;break;case 112:this._actionKeyPress=1;break;case 113:this._actionKeyPress=2;break;case 114:this._actionKeyPress=3;break;case 115:this._actionKeyPress=4;break;case 116:this._actionKeyPress=5;break;case 117:this._actionKeyPress=6;break;case 118:this._actionKeyPress=7;break;case 119:this._actionKeyPress=8;break;case 120:this._actionKeyPress=9;break;case 121:this._actionKeyPress=10;break;case 122:this._actionKeyPress=11;break;case 123:this._actionKeyPress=12;break;case 36:this._actionKeyPress=13;break;case 35:this._actionKeyPress=14;break;case 33:this._actionKeyPress=15;break;case 34:this._actionKeyPress=16;break;case 38:this._actionKeyPress=17;break;case 40:this._actionKeyPress=18;break;case 37:this._actionKeyPress=19;break;case 39:this._actionKeyPress=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this._keyPress=String.fromCharCode(8);break;case"Delete":this._keyPress=String.fromCharCode(127);break;case"Enter":this._keyPress="\n";break;case"Escape":this._keyPress=String.fromCharCode(27);break;case"Tab":this._keyPress="\t";break;default:1===e.key.length&&(this._keyPress=e.key)}}},keyup(e){switch(e.preventDefault(),e.which){case 16:this._shiftKey=!1;break;case 17:this._controlKey=!1;break;case 18:this._altKey=!1;break;case 112:this._actionKeyRelease=1;break;case 113:this._actionKeyRelease=2;break;case 114:this._actionKeyRelease=3;break;case 115:this._actionKeyRelease=4;break;case 116:this._actionKeyRelease=5;break;case 117:this._actionKeyRelease=6;break;case 118:this._actionKeyRelease=7;break;case 119:this._actionKeyRelease=8;break;case 120:this._actionKeyRelease=9;break;case 121:this._actionKeyRelease=10;break;case 122:this._actionKeyRelease=11;break;case 123:this._actionKeyRelease=12;break;case 36:this._actionKeyRelease=13;break;case 35:this._actionKeyRelease=14;break;case 33:this._actionKeyRelease=15;break;case 34:this._actionKeyRelease=16;break;case 38:this._actionKeyRelease=17;break;case 40:this._actionKeyRelease=18;break;case 37:this._actionKeyRelease=19;break;case 39:this._actionKeyRelease=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this._keyRelease=String.fromCharCode(8);break;case"Delete":this._keyRelease=String.fromCharCode(127);break;case"Enter":this._keyRelease="\n";break;case"Escape":this._keyRelease=String.fromCharCode(27);break;case"Tab":this._keyRelease="\t";break;default:1===e.key.length&&(this._keyRelease=e.key)}}this._isActive.getValue()&&(this._isActive=!1)},release(){this._shiftKey.getValue()&&(this._shiftKey=!1),this._controlKey.getValue()&&(this._controlKey=!1),this._altKey.getValue()&&(this._altKey=!1)}}),Object.defineProperties(C,{...S().getStaticProperties("KeySensor","KeyDeviceSensor",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().outputOnly,"controlKey",new(_().SFBool)),new(k())(f().outputOnly,"shiftKey",new(_().SFBool)),new(k())(f().outputOnly,"altKey",new(_().SFBool)),new(k())(f().outputOnly,"actionKeyPress",new(_().SFInt32)),new(k())(f().outputOnly,"actionKeyRelease",new(_().SFInt32)),new(k())(f().outputOnly,"keyPress",new(_().SFString)),new(k())(f().outputOnly,"keyRelease",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const R=C,m=n().add("KeySensor",R);function F(e){O.call(this,e),this.addType(f().StringSensor)}Object.assign(Object.setPrototypeOf(F.prototype,O.prototype),{keydown(e){switch(e.preventDefault(),e.key){case"Backspace":this._isActive.getValue()&&this._deletionAllowed.getValue()&&this._enteredText.length&&(this._enteredText=this._enteredText.getValue().substring(0,this._enteredText.length-1));break;case"Enter":this._finalText=this._enteredText,this._enteredText.set(""),this._isActive.getValue()&&(this._isActive=!1);break;case"Escape":this._enteredText.set(""),this._isActive.getValue()&&(this._isActive=!1);break;case"Tab":break;default:(e.charCode||e.keyCode)&&1===e.key.length&&(this._isActive.getValue()||(this._isActive=!0,this._enteredText=""),this._enteredText=this._enteredText.getValue()+e.key)}}}),Object.defineProperties(F,{...S().getStaticProperties("StringSensor","KeyDeviceSensor",2,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().inputOutput,"deletionAllowed",new(_().SFBool)(!0)),new(k())(f().outputOnly,"enteredText",new(_().SFString)),new(k())(f().outputOnly,"finalText",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const T=F,x=n().add("StringSensor",T);a().add({name:"KeyDeviceSensor",concreteNodes:[m,x],abstractNodes:[O],browserContext:y});n().add("KeyDeviceSensorComponent",undefined)})();
1
+ /* X_ITE v11.5.14 */
2
+ const e=window[Symbol.for("X_ITE.X3D-11.5.14")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var a in s)t.o(s,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var a=t.n(s);const i=e.Namespace;var n=t.n(i);const r=Symbol(),o=Symbol(),c=Symbol();function h(){this[r]=new Set}Object.assign(h.prototype,{initialize(){const e=this.getElement();e.on("keydown.X3DKeyDeviceSensorContext",this[o].bind(this)),e.on("keyup.X3DKeyDeviceSensorContext",this[c].bind(this))},addKeyDeviceSensorNode(e){this[r].add(e)},removeKeyDeviceSensorNode(e){this[r].delete(e)},getKeyDeviceSensorNodes(){return this[r]},[o](e){for(const t of this[r])t.keydown(e)},[c](e){for(const t of this[r])t.keyup(e)},dispose(){this.getElement().off(".X3DKeyDeviceSensorContext")}});const l=h,y=n().add("X3DKeyDeviceSensorContext",l),d=e.Fields;var _=t.n(d);const b=e.X3DFieldDefinition;var k=t.n(b);const u=e.FieldDefinitionArray;var p=t.n(u);const K=e.X3DNode;var S=t.n(K);const w=e.X3DSensorNode;var v=t.n(w);const g=e.X3DConstants;var f=t.n(g);function P(e){v().call(this,e),this.addType(f().X3DKeyDeviceSensorNode)}Object.assign(Object.setPrototypeOf(P.prototype,v().prototype),{initialize(){v().prototype.initialize.call(this),this.getLive().addInterest("set_live__",this),this.set_live__()},set_live__(){this.getLive().getValue()?(this._enabled.addInterest("set_enabled__",this),this._enabled.getValue()&&this.enable()):(this._enabled.removeInterest("set_enabled__",this),this.disable())},set_enabled__(){this._enabled.getValue()?this.enable():this.disable()},enable(){this.getBrowser().addKeyDeviceSensorNode(this)},disable(){this.getBrowser().removeKeyDeviceSensorNode(this),this.release()},keydown(){},keyup(){},release(){}}),Object.defineProperties(P,S().getStaticProperties("X3DKeyDeviceSensorNode","KeyDeviceSensor",1));const D=P,O=n().add("X3DKeyDeviceSensorNode",D);function C(e){O.call(this,e),this.addType(f().KeySensor)}Object.assign(Object.setPrototypeOf(C.prototype,O.prototype),{keydown(e){switch(e.preventDefault(),this._isActive.getValue()||(this._isActive=!0),e.which){case 16:this._shiftKey=!0;break;case 17:this._controlKey=!0;break;case 18:this._altKey=!0;break;case 112:this._actionKeyPress=1;break;case 113:this._actionKeyPress=2;break;case 114:this._actionKeyPress=3;break;case 115:this._actionKeyPress=4;break;case 116:this._actionKeyPress=5;break;case 117:this._actionKeyPress=6;break;case 118:this._actionKeyPress=7;break;case 119:this._actionKeyPress=8;break;case 120:this._actionKeyPress=9;break;case 121:this._actionKeyPress=10;break;case 122:this._actionKeyPress=11;break;case 123:this._actionKeyPress=12;break;case 36:this._actionKeyPress=13;break;case 35:this._actionKeyPress=14;break;case 33:this._actionKeyPress=15;break;case 34:this._actionKeyPress=16;break;case 38:this._actionKeyPress=17;break;case 40:this._actionKeyPress=18;break;case 37:this._actionKeyPress=19;break;case 39:this._actionKeyPress=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this._keyPress=String.fromCharCode(8);break;case"Delete":this._keyPress=String.fromCharCode(127);break;case"Enter":this._keyPress="\n";break;case"Escape":this._keyPress=String.fromCharCode(27);break;case"Tab":this._keyPress="\t";break;default:1===e.key.length&&(this._keyPress=e.key)}}},keyup(e){switch(e.preventDefault(),e.which){case 16:this._shiftKey=!1;break;case 17:this._controlKey=!1;break;case 18:this._altKey=!1;break;case 112:this._actionKeyRelease=1;break;case 113:this._actionKeyRelease=2;break;case 114:this._actionKeyRelease=3;break;case 115:this._actionKeyRelease=4;break;case 116:this._actionKeyRelease=5;break;case 117:this._actionKeyRelease=6;break;case 118:this._actionKeyRelease=7;break;case 119:this._actionKeyRelease=8;break;case 120:this._actionKeyRelease=9;break;case 121:this._actionKeyRelease=10;break;case 122:this._actionKeyRelease=11;break;case 123:this._actionKeyRelease=12;break;case 36:this._actionKeyRelease=13;break;case 35:this._actionKeyRelease=14;break;case 33:this._actionKeyRelease=15;break;case 34:this._actionKeyRelease=16;break;case 38:this._actionKeyRelease=17;break;case 40:this._actionKeyRelease=18;break;case 37:this._actionKeyRelease=19;break;case 39:this._actionKeyRelease=20;break;default:if(e.charCode||e.keyCode)switch(e.key){case"AltGraph":case"CapsLock":case"Insert":break;case"Backspace":this._keyRelease=String.fromCharCode(8);break;case"Delete":this._keyRelease=String.fromCharCode(127);break;case"Enter":this._keyRelease="\n";break;case"Escape":this._keyRelease=String.fromCharCode(27);break;case"Tab":this._keyRelease="\t";break;default:1===e.key.length&&(this._keyRelease=e.key)}}this._isActive.getValue()&&(this._isActive=!1)},release(){this._shiftKey.getValue()&&(this._shiftKey=!1),this._controlKey.getValue()&&(this._controlKey=!1),this._altKey.getValue()&&(this._altKey=!1)}}),Object.defineProperties(C,{...S().getStaticProperties("KeySensor","KeyDeviceSensor",1,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().outputOnly,"controlKey",new(_().SFBool)),new(k())(f().outputOnly,"shiftKey",new(_().SFBool)),new(k())(f().outputOnly,"altKey",new(_().SFBool)),new(k())(f().outputOnly,"actionKeyPress",new(_().SFInt32)),new(k())(f().outputOnly,"actionKeyRelease",new(_().SFInt32)),new(k())(f().outputOnly,"keyPress",new(_().SFString)),new(k())(f().outputOnly,"keyRelease",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const R=C,m=n().add("KeySensor",R);function F(e){O.call(this,e),this.addType(f().StringSensor)}Object.assign(Object.setPrototypeOf(F.prototype,O.prototype),{keydown(e){switch(e.preventDefault(),e.key){case"Backspace":this._isActive.getValue()&&this._deletionAllowed.getValue()&&this._enteredText.length&&(this._enteredText=this._enteredText.getValue().substring(0,this._enteredText.length-1));break;case"Enter":this._finalText=this._enteredText,this._enteredText.set(""),this._isActive.getValue()&&(this._isActive=!1);break;case"Escape":this._enteredText.set(""),this._isActive.getValue()&&(this._isActive=!1);break;case"Tab":break;default:(e.charCode||e.keyCode)&&1===e.key.length&&(this._isActive.getValue()||(this._isActive=!0,this._enteredText=""),this._enteredText=this._enteredText.getValue()+e.key)}}}),Object.defineProperties(F,{...S().getStaticProperties("StringSensor","KeyDeviceSensor",2,"children","3.0"),fieldDefinitions:{value:new(p())([new(k())(f().inputOutput,"metadata",new(_().SFNode)),new(k())(f().inputOutput,"description",new(_().SFString)),new(k())(f().inputOutput,"enabled",new(_().SFBool)(!0)),new(k())(f().inputOutput,"deletionAllowed",new(_().SFBool)(!0)),new(k())(f().outputOnly,"enteredText",new(_().SFString)),new(k())(f().outputOnly,"finalText",new(_().SFString)),new(k())(f().outputOnly,"isActive",new(_().SFBool))]),enumerable:!0}});const T=F,x=n().add("StringSensor",T);a().add({name:"KeyDeviceSensor",concreteNodes:[m,x],abstractNodes:[O],browserContext:y});n().add("KeyDeviceSensorComponent",undefined)})();