x_ite 10.5.3 → 10.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/assets/components/AnnotationComponent.js +23 -23
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +24 -24
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +35 -35
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +22 -22
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +21 -21
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +56 -51
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +53 -53
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +32 -32
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +15 -15
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +37 -37
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +57 -57
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +55 -53
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +33 -33
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +39 -39
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +43 -43
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +41 -39
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +21 -21
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +41 -41
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +46 -44
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +53 -77
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/assets/lib/README.md +1 -0
- package/dist/assets/lib/libktx.js +1 -1
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +1456 -1057
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +1456 -1057
- package/dist/x_ite.zip +0 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v10.5.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.
|
|
1
|
+
/* X_ITE v10.5.4 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.4")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
5
|
/******/ // The require scope
|
|
@@ -39,31 +39,31 @@ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.3")];
|
|
|
39
39
|
|
|
40
40
|
// UNUSED EXPORTS: default
|
|
41
41
|
|
|
42
|
-
;//
|
|
42
|
+
;// external "__X_ITE_X3D__ .Components"
|
|
43
43
|
const external_X_ITE_X3D_Components_namespaceObject = __X_ITE_X3D__ .Components;
|
|
44
44
|
var external_X_ITE_X3D_Components_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Components_namespaceObject);
|
|
45
|
-
;//
|
|
45
|
+
;// external "__X_ITE_X3D__ .Fields"
|
|
46
46
|
const external_X_ITE_X3D_Fields_namespaceObject = __X_ITE_X3D__ .Fields;
|
|
47
47
|
var external_X_ITE_X3D_Fields_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Fields_namespaceObject);
|
|
48
|
-
;//
|
|
48
|
+
;// external "__X_ITE_X3D__ .X3DFieldDefinition"
|
|
49
49
|
const external_X_ITE_X3D_X3DFieldDefinition_namespaceObject = __X_ITE_X3D__ .X3DFieldDefinition;
|
|
50
50
|
var external_X_ITE_X3D_X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DFieldDefinition_namespaceObject);
|
|
51
|
-
;//
|
|
51
|
+
;// external "__X_ITE_X3D__ .FieldDefinitionArray"
|
|
52
52
|
const external_X_ITE_X3D_FieldDefinitionArray_namespaceObject = __X_ITE_X3D__ .FieldDefinitionArray;
|
|
53
53
|
var external_X_ITE_X3D_FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_FieldDefinitionArray_namespaceObject);
|
|
54
|
-
;//
|
|
54
|
+
;// external "__X_ITE_X3D__ .X3DNode"
|
|
55
55
|
const external_X_ITE_X3D_X3DNode_namespaceObject = __X_ITE_X3D__ .X3DNode;
|
|
56
56
|
var external_X_ITE_X3D_X3DNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DNode_namespaceObject);
|
|
57
|
-
;//
|
|
57
|
+
;// external "__X_ITE_X3D__ .X3DGeometricPropertyNode"
|
|
58
58
|
const external_X_ITE_X3D_X3DGeometricPropertyNode_namespaceObject = __X_ITE_X3D__ .X3DGeometricPropertyNode;
|
|
59
59
|
var external_X_ITE_X3D_X3DGeometricPropertyNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DGeometricPropertyNode_namespaceObject);
|
|
60
|
-
;//
|
|
60
|
+
;// external "__X_ITE_X3D__ .X3DConstants"
|
|
61
61
|
const external_X_ITE_X3D_X3DConstants_namespaceObject = __X_ITE_X3D__ .X3DConstants;
|
|
62
62
|
var external_X_ITE_X3D_X3DConstants_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DConstants_namespaceObject);
|
|
63
|
-
;//
|
|
63
|
+
;// external "__X_ITE_X3D__ .Namespace"
|
|
64
64
|
const external_X_ITE_X3D_Namespace_namespaceObject = __X_ITE_X3D__ .Namespace;
|
|
65
65
|
var external_X_ITE_X3D_Namespace_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Namespace_namespaceObject);
|
|
66
|
-
;//
|
|
66
|
+
;// ./src/x_ite/Components/HAnim/HAnimDisplacer.js
|
|
67
67
|
/*******************************************************************************
|
|
68
68
|
*
|
|
69
69
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -150,31 +150,31 @@ const __default__ = HAnimDisplacer;
|
|
|
150
150
|
;
|
|
151
151
|
|
|
152
152
|
/* harmony default export */ const HAnim_HAnimDisplacer = (external_X_ITE_X3D_Namespace_default().add ("HAnimDisplacer", __default__));
|
|
153
|
-
;//
|
|
153
|
+
;// external "__X_ITE_X3D__ .X3DChildNode"
|
|
154
154
|
const external_X_ITE_X3D_X3DChildNode_namespaceObject = __X_ITE_X3D__ .X3DChildNode;
|
|
155
155
|
var external_X_ITE_X3D_X3DChildNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DChildNode_namespaceObject);
|
|
156
|
-
;//
|
|
156
|
+
;// external "__X_ITE_X3D__ .Group"
|
|
157
157
|
const external_X_ITE_X3D_Group_namespaceObject = __X_ITE_X3D__ .Group;
|
|
158
158
|
var external_X_ITE_X3D_Group_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Group_namespaceObject);
|
|
159
|
-
;//
|
|
159
|
+
;// external "__X_ITE_X3D__ .Transform"
|
|
160
160
|
const external_X_ITE_X3D_Transform_namespaceObject = __X_ITE_X3D__ .Transform;
|
|
161
161
|
var external_X_ITE_X3D_Transform_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Transform_namespaceObject);
|
|
162
|
-
;//
|
|
162
|
+
;// external "__X_ITE_X3D__ .X3DBoundedObject"
|
|
163
163
|
const external_X_ITE_X3D_X3DBoundedObject_namespaceObject = __X_ITE_X3D__ .X3DBoundedObject;
|
|
164
164
|
var external_X_ITE_X3D_X3DBoundedObject_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DBoundedObject_namespaceObject);
|
|
165
|
-
;//
|
|
165
|
+
;// external "__X_ITE_X3D__ .TraverseType"
|
|
166
166
|
const external_X_ITE_X3D_TraverseType_namespaceObject = __X_ITE_X3D__ .TraverseType;
|
|
167
167
|
var external_X_ITE_X3D_TraverseType_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_TraverseType_namespaceObject);
|
|
168
|
-
;//
|
|
168
|
+
;// external "__X_ITE_X3D__ .X3DCast"
|
|
169
169
|
const external_X_ITE_X3D_X3DCast_namespaceObject = __X_ITE_X3D__ .X3DCast;
|
|
170
170
|
var external_X_ITE_X3D_X3DCast_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DCast_namespaceObject);
|
|
171
|
-
;//
|
|
171
|
+
;// external "__X_ITE_X3D__ .Matrix4"
|
|
172
172
|
const external_X_ITE_X3D_Matrix4_namespaceObject = __X_ITE_X3D__ .Matrix4;
|
|
173
173
|
var external_X_ITE_X3D_Matrix4_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Matrix4_namespaceObject);
|
|
174
|
-
;//
|
|
174
|
+
;// external "__X_ITE_X3D__ .Algorithm"
|
|
175
175
|
const external_X_ITE_X3D_Algorithm_namespaceObject = __X_ITE_X3D__ .Algorithm;
|
|
176
176
|
var external_X_ITE_X3D_Algorithm_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Algorithm_namespaceObject);
|
|
177
|
-
;//
|
|
177
|
+
;// ./src/x_ite/Components/HAnim/HAnimHumanoid.js
|
|
178
178
|
/*******************************************************************************
|
|
179
179
|
*
|
|
180
180
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -847,13 +847,13 @@ const HAnimHumanoid_default_ = HAnimHumanoid;
|
|
|
847
847
|
;
|
|
848
848
|
|
|
849
849
|
/* harmony default export */ const HAnim_HAnimHumanoid = (external_X_ITE_X3D_Namespace_default().add ("HAnimHumanoid", HAnimHumanoid_default_));
|
|
850
|
-
;//
|
|
850
|
+
;// external "__X_ITE_X3D__ .X3DTransformNode"
|
|
851
851
|
const external_X_ITE_X3D_X3DTransformNode_namespaceObject = __X_ITE_X3D__ .X3DTransformNode;
|
|
852
852
|
var external_X_ITE_X3D_X3DTransformNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DTransformNode_namespaceObject);
|
|
853
|
-
;//
|
|
853
|
+
;// external "__X_ITE_X3D__ .Vector3"
|
|
854
854
|
const external_X_ITE_X3D_Vector3_namespaceObject = __X_ITE_X3D__ .Vector3;
|
|
855
855
|
var external_X_ITE_X3D_Vector3_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Vector3_namespaceObject);
|
|
856
|
-
;//
|
|
856
|
+
;// ./src/x_ite/Components/HAnim/HAnimJoint.js
|
|
857
857
|
/*******************************************************************************
|
|
858
858
|
*
|
|
859
859
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1037,19 +1037,19 @@ const HAnimJoint_default_ = HAnimJoint;
|
|
|
1037
1037
|
;
|
|
1038
1038
|
|
|
1039
1039
|
/* harmony default export */ const HAnim_HAnimJoint = (external_X_ITE_X3D_Namespace_default().add ("HAnimJoint", HAnimJoint_default_));
|
|
1040
|
-
;//
|
|
1040
|
+
;// external "__X_ITE_X3D__ .TimeSensor"
|
|
1041
1041
|
const external_X_ITE_X3D_TimeSensor_namespaceObject = __X_ITE_X3D__ .TimeSensor;
|
|
1042
1042
|
var external_X_ITE_X3D_TimeSensor_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_TimeSensor_namespaceObject);
|
|
1043
|
-
;//
|
|
1043
|
+
;// external "__X_ITE_X3D__ .PositionInterpolator"
|
|
1044
1044
|
const external_X_ITE_X3D_PositionInterpolator_namespaceObject = __X_ITE_X3D__ .PositionInterpolator;
|
|
1045
1045
|
var external_X_ITE_X3D_PositionInterpolator_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_PositionInterpolator_namespaceObject);
|
|
1046
|
-
;//
|
|
1046
|
+
;// external "__X_ITE_X3D__ .OrientationInterpolator"
|
|
1047
1047
|
const external_X_ITE_X3D_OrientationInterpolator_namespaceObject = __X_ITE_X3D__ .OrientationInterpolator;
|
|
1048
1048
|
var external_X_ITE_X3D_OrientationInterpolator_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_OrientationInterpolator_namespaceObject);
|
|
1049
|
-
;//
|
|
1049
|
+
;// external "__X_ITE_X3D__ .Rotation4"
|
|
1050
1050
|
const external_X_ITE_X3D_Rotation4_namespaceObject = __X_ITE_X3D__ .Rotation4;
|
|
1051
1051
|
var external_X_ITE_X3D_Rotation4_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Rotation4_namespaceObject);
|
|
1052
|
-
;//
|
|
1052
|
+
;// ./src/x_ite/Components/HAnim/HAnimMotion.js
|
|
1053
1053
|
/*******************************************************************************
|
|
1054
1054
|
*
|
|
1055
1055
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1458,10 +1458,10 @@ const HAnimMotion_default_ = HAnimMotion;
|
|
|
1458
1458
|
;
|
|
1459
1459
|
|
|
1460
1460
|
/* harmony default export */ const HAnim_HAnimMotion = (external_X_ITE_X3D_Namespace_default().add ("HAnimMotion", HAnimMotion_default_));
|
|
1461
|
-
;//
|
|
1461
|
+
;// external "__X_ITE_X3D__ .X3DGroupingNode"
|
|
1462
1462
|
const external_X_ITE_X3D_X3DGroupingNode_namespaceObject = __X_ITE_X3D__ .X3DGroupingNode;
|
|
1463
1463
|
var external_X_ITE_X3D_X3DGroupingNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DGroupingNode_namespaceObject);
|
|
1464
|
-
;//
|
|
1464
|
+
;// ./src/x_ite/Components/HAnim/HAnimSegment.js
|
|
1465
1465
|
/*******************************************************************************
|
|
1466
1466
|
*
|
|
1467
1467
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1557,7 +1557,7 @@ const HAnimSegment_default_ = HAnimSegment;
|
|
|
1557
1557
|
;
|
|
1558
1558
|
|
|
1559
1559
|
/* harmony default export */ const HAnim_HAnimSegment = (external_X_ITE_X3D_Namespace_default().add ("HAnimSegment", HAnimSegment_default_));
|
|
1560
|
-
;//
|
|
1560
|
+
;// ./src/x_ite/Components/HAnim/HAnimSite.js
|
|
1561
1561
|
/*******************************************************************************
|
|
1562
1562
|
*
|
|
1563
1563
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1651,7 +1651,7 @@ const HAnimSite_default_ = HAnimSite;
|
|
|
1651
1651
|
;
|
|
1652
1652
|
|
|
1653
1653
|
/* harmony default export */ const HAnim_HAnimSite = (external_X_ITE_X3D_Namespace_default().add ("HAnimSite", HAnimSite_default_));
|
|
1654
|
-
;//
|
|
1654
|
+
;// ./src/assets/components/HAnimComponent.js
|
|
1655
1655
|
/*******************************************************************************
|
|
1656
1656
|
*
|
|
1657
1657
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v10.5.
|
|
2
|
-
const t=window[Symbol.for("X_ITE.X3D-10.5.3")];(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=t.Components;var i=e.n(n);const s=t.Fields;var o=e.n(s);const r=t.X3DFieldDefinition;var a=e.n(r);const d=t.FieldDefinitionArray;var u=e.n(d);const l=t.X3DNode;var h=e.n(l);const p=t.X3DGeometricPropertyNode;var c=e.n(p);const _=t.X3DConstants;var m=e.n(_);const w=t.Namespace;var g=e.n(w);function f(t){c().call(this,t),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(f.prototype,c().prototype),Object.defineProperties(f,{...h().getStaticProperties("HAnimDisplacer","HAnim",1,"displacers","3.0"),fieldDefinitions:{value:new(u())([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 F=f,I=g().add("HAnimDisplacer",F),O=t.X3DChildNode;var x=e.n(O);const S=t.Group;var T=e.n(S);const v=t.Transform;var b=e.n(v);const N=t.X3DBoundedObject;var y=e.n(N);const E=t.TraverseType;var M=e.n(E);const j=t.X3DCast;var D=e.n(j);const A=t.Matrix4;var C=e.n(A);const k=t.Algorithm;var V=e.n(k);function B(t){x().call(this,t),y().call(this,t),this.addType(m().HAnimHumanoid),this.addChildObjects(m().inputOutput,"jointTextures",new(o().SFTime),m().inputOutput,"displacementsTexture",new(o().SFTime),m().inputOutput,"displacementWeightsTexture",new(o().SFTime)),this._translation.setUnit("length"),this._center.setUnit("length"),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),t.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(T())(t),this.viewpointsNode=new(T())(t),this.skinNode=new(T())(t),this.transformNode=new(b())(t),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.skinCoordNode=null,this.change=new R,this.skinning=Function.prototype}Object.assign(Object.setPrototypeOf(B.prototype,x().prototype),y().prototype,{initialize(){x().prototype.initialize.call(this),y().prototype.initialize.call(this),this.skeletonNode.setAllowedTypes(m().HAnimJoint,m().HAnimSite),this.viewpointsNode.setAllowedTypes(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.transformNode._isCameraObject.addFieldInterest(this._isCameraObject),this.transformNode._isPickableObject.addFieldInterest(this._isPickableObject),this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.setCameraObject(this.transformNode.isCameraObject()),this.setPickableObject(this.transformNode.isPickableObject());const t=this.getBrowser().getContext();if(1!==t.getVersion()){this.skinNode.traverse=function(t,e,n){n.getHumanoids().push(t),T().prototype.traverse.call(this,e,n),n.getHumanoids().pop()}.bind(this.skinNode,this),this.jointsTexture=t.createTexture(),this.displacementsTexture=t.createTexture(),this.jointMatricesTexture=t.createTexture();for(const e of[this.jointsTexture,this.displacementsTexture,this.jointMatricesTexture])t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.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(t,e){return this.transformNode.getBBox(t,e)},getSubBBox(t,e){return this.transformNode.getSubBBox(t,e)},getMatrix(){return this.transformNode.getMatrix()},getHumanoidKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const t=this._motionsEnabled,e=this.motionNodes;for(const t of e)t._joints.removeInterest("set_connectJoints__",this),t._channelsEnabled.removeInterest("set_connectJoints__",this),t._channels.removeInterest("set_connectJoints__",this),t._values.removeInterest("set_connectJoints__",this),t.disconnectJoints(this.jointNodes);e.length=0;for(const[n,i]of this._motions.entries()){if(n<t.length&&!t[n])continue;const s=D()(m().HAnimMotion,i);s&&e.push(s)}for(const t of e)t._joints.addInterest("set_connectJoints__",this,t),t._channelsEnabled.addInterest("set_connectJoints__",this,t),t._channels.addInterest("set_connectJoints__",this,t),t._values.addInterest("set_connectJoints__",this,t),t.connectJoints(this.jointNodes)},set_connectJoints__(t){t.disconnectJoints(this.jointNodes),t.connectJoints(this.jointNodes)},set_joints__(){const t=this.jointNodes,e=this.jointBindingMatrices,n=this._jointBindingPositions,i=this._jointBindingRotations,s=this._jointBindingScales,o=n.length,r=i.length,a=s.length;for(const e of this.motionNodes)e.disconnectJoints(t);for(const e of t)e.removeInterest("enable",this.change),e._skinCoordIndex.removeInterest("addEvent",this._jointTextures),e._skinCoordWeight.removeInterest("addEvent",this._jointTextures),e._displacements.removeInterest("addEvent",this._displacementsTexture),e._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);t.length=0,e.length=0;for(const[d,u]of this._joints.entries()){const l=D()(m().HAnimJoint,u);if(!l)continue;const h=o?n[Math.min(d,o-1)].getValue():null,p=r?i[Math.min(d,r-1)].getValue():null,c=a?s[Math.min(d,a-1)].getValue():null;t.push(l),e.push((new(C())).set(h,p,c))}for(const e of t)e.addInterest("enable",this.change),e._skinCoordIndex.addInterest("addEvent",this._jointTextures),e._skinCoordWeight.addInterest("addEvent",this._jointTextures),e._displacements.addInterest("addEvent",this._displacementsTexture),e._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const e of this.motionNodes)e.connectJoints(t);const d=Math.ceil(Math.sqrt(8*t.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[])),n=Array.from({length:t},(()=>[]));for(const[t,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(e[r]?.push(t),n[r]?.push(i))}}const i=V().roundToMultiple(e.reduce(((t,e)=>Math.max(t,e.length)),0),4),s=2*i,o=Math.ceil(Math.sqrt(t*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<t;++o)r.set(e[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.change.enable(),this.set_humanoidKey__()},set_displacementsTexture__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[]));for(const[t,n]of this.jointNodes.entries())for(const i of n.getDisplacers()){const n=i._displacements;for(const[s,o]of i._coordIndex.entries())e[o]?.push(...n[s],t)}const n=e.reduce(((t,e)=>Math.max(t,e.length)),0)/4,i=4*n,s=V().roundToMultiple(Math.ceil(Math.sqrt(t*n*2))||1,2),o=new Float32Array(s*s*4);for(let n=0;n<t;++n)o.set(e[n],n*i);this.numDisplacements=n;const r=this.getBrowser().getContext();r.bindTexture(r.TEXTURE_2D,this.displacementsTexture),r.texImage2D(r.TEXTURE_2D,0,r.RGBA32F,s,s,0,r.RGBA,r.FLOAT,o);const a=this.displacementWeights;for(let e=a.length;e<t;++e)a[e]=[];a.length=t,this.displacementWeightsArray=new Float32Array(s*s*2),this.change.enable(),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const t=this.skinCoordNode?._point.length||1,e=this.displacementWeights;for(const t of e)t.length=0;for(const t of this.jointNodes)for(const n of t.getDisplacers()){const t=n._weight;for(const i of n._coordIndex)e[i]?.push(t,0,0,0)}const n=this.numDisplacements,i=4*n,s=V().roundToMultiple(Math.ceil(Math.sqrt(t*n*2))||1,2),o=this.displacementWeightsArray;for(let n=0;n<t;++n)o.set(e[n],n*i);const r=this.getBrowser().getContext();r.bindTexture(r.TEXTURE_2D,this.displacementsTexture),r.texSubImage2D(r.TEXTURE_2D,0,0,s/2,s,s/2,r.RGBA,r.FLOAT,o),this.change.enable()},set_skinCoord__(){this.skinCoordNode&&(this.skinCoordNode.removeInterest("addEvent",this._jointTextures),this.skinCoordNode.removeInterest("addEvent",this._displacementsTexture),this.skinCoordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.skinCoordNode=D()(m().X3DCoordinateNode,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(t,e){this.transformNode.traverse(t,e),this.skinning(t,e)},skinning:(()=>{const t=new(C());return function(e,n){if(e!==M().DISPLAY||this.change.lock())return;t.assign(this.transformNode.getMatrix()).multRight(n.getModelViewMatrix().get()).inverse();const 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 n=i[e],s=o[e],a=n.getModelViewMatrix().multRight(t).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(t,e){const n=this.getBrowser().getTexture2DUnit(),i=this.getBrowser().getTexture2DUnit(),s=this.getBrowser().getTexture2DUnit();t.activeTexture(t.TEXTURE0+n),t.bindTexture(t.TEXTURE_2D,this.jointsTexture),t.uniform1i(e.x3d_JointsTexture,n),t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.displacementsTexture),t.uniform1i(e.x3d_DisplacementsTexture,i),t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this.jointMatricesTexture),t.uniform1i(e.x3d_JointMatricesTexture,s)},dispose(){y().prototype.dispose.call(this),x().prototype.dispose.call(this)}}),Object.defineProperties(B,{...h().getStaticProperties("HAnimHumanoid","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"version",new(o().SFString)("2.0")),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,"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,"viewpoints",new(o().MFNode)),new(a())(m().inputOutput,"sites",new(o().MFNode)),new(a())(m().inputOutput,"segments",new(o().MFNode)),new(a())(m().inputOutput,"motionsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"motions",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,"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 R{#t=!0;enable(){this.#t=!1}lock(){const t=this.#t;return this.#t=!0,t}}const P=B,H=g().add("HAnimHumanoid",P),X=t.X3DTransformNode;var J=e.n(X);const U=t.Vector3;var W=e.n(U);function z(t){J().call(this,t),this.addType(m().HAnimJoint),this.addChildObjects(m().outputOnly,"displacements",new(o().SFTime),m().outputOnly,"displacementWeights",new(o().SFTime)),this.setAllowedTypes(m().HAnimJoint,m().HAnimSegment,m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(C())}Object.assign(Object.setPrototypeOf(z.prototype,J().prototype),{initialize(){J().prototype.initialize.call(this),this._displacers.addInterest("set_displacers__",this),this.set_displacers__()},getModelViewMatrix(){return this.modelViewMatrix},getDisplacers(){return this.displacerNodes},set_displacers__(){const t=this.displacerNodes;for(const e of t)e._coordIndex.removeInterest("addEvent",this._displacements),e._displacements.removeInterest("addEvent",this._displacements),e._coordIndex.removeInterest("addEvent",this._displacementWeights),e._weight.removeInterest("addEvent",this._displacementWeights);t.length=0;for(const e of this._displacers){const n=D()(m().HAnimDisplacer,e);n&&t.push(n)}for(const e of t)e._coordIndex.addInterest("addEvent",this._displacements),e._displacements.addInterest("addEvent",this._displacements),e._coordIndex.addInterest("addEvent",this._displacementWeights),e._weight.addInterest("addEvent",this._displacementWeights)},traverse(t,e){const n=e.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),t===M().DISPLAY&&this.modelViewMatrix.assign(n.get()),J().prototype.groupTraverse.call(this,t,e),n.pop()},groupTraverse(t,e){t===M().DISPLAY&&this.modelViewMatrix.assign(e.getModelViewMatrix().get()),J().prototype.groupTraverse.call(this,t,e)}}),Object.defineProperties(z,{...h().getStaticProperties("HAnimJoint","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([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 L=z,G=g().add("HAnimJoint",L),Y=t.TimeSensor;var K=e.n(Y);const Z=t.PositionInterpolator;var q=e.n(Z);const $=t.OrientationInterpolator;var Q=e.n($);const tt=t.Rotation4;var et=e.n(tt);function nt(t){x().call(this,t),this.addType(m().HAnimMotion),this.timeSensor=new(K())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(nt.prototype,x().prototype),{initialize(){x().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(t){const e=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(t);for(const[t,{positionInterpolator:s,orientationInterpolator:o,scaleInterpolator:r}]of this.interpolators.entries()){if(t<e.length&&!e[t])continue;const a=i.get(n[t]);a&&(s?._value_changed.addFieldInterest(a._translation),o?._value_changed.addFieldInterest(a._rotation),r?._value_changed.addFieldInterest(a._scale))}},disconnectJoints(t){const e=this.joints,n=this.getJointsIndex(t);for(const[t,{positionInterpolator:i,orientationInterpolator:s,scaleInterpolator:o}]of this.interpolators.entries()){const r=n.get(e[t]);r&&(i?._value_changed.removeFieldInterest(r._translation),s?._value_changed.removeFieldInterest(r._rotation),o?._value_changed.removeFieldInterest(r._scale))}},getJointsIndex(t){const e=new Map(t.map((t=>[t._name.getValue().trim(),t])));return e.delete("IGNORED"),e.set("HumanoidRoot",e.get("humanoid_root")),e},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:t,orientationInterpolator:e,scaleInterpolator:n}of this.interpolators)t?._value_changed.getFieldInterests().forEach((e=>t._value_changed.removeFieldInterest(e))),e?._value_changed.getFieldInterests().forEach((t=>e._value_changed.removeFieldInterest(t))),n?._value_changed.getFieldInterests().forEach((t=>n._value_changed.removeFieldInterest(t)))},set_interpolators__(){const t=this.timeSensor;t._fraction_changed.getFieldInterests().forEach((e=>t._fraction_changed.removeFieldInterest(e)));const e=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map((t=>t.split(/[\s,]+/s))),n=this._values,i=e.reduce(((t,e)=>t+e.length),0),s=Math.floor(i?n.length/i:0),o=new Map,r=Array.from({length:e.length},(()=>({})));this.interpolators=r;for(let i=0,a=0;i<s;++i)for(const[d,u]of e.entries()){o.clear();for(const t of u)o.set(t,n[a++]);if(o.has("Xposition")||o.has("Yposition")||o.has("Zposition")){const e=r[d].positionInterpolator??this.createPositionInterpolator(r,d),n=i/(s-1),a=new(W())(o.get("Xposition")??0,o.get("Yposition")??0,o.get("Zposition")??0);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xrotation")||o.has("Yrotation")||o.has("Zrotation")){const e=r[d].orientationInterpolator??this.createOrientationInterpolator(r,d),n=i/(s-1),a=et().fromEuler(V().radians(o.get("Xrotation")??0),V().radians(o.get("Yrotation")??0),V().radians(o.get("Zrotation")??0));e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xscale")||o.has("Yscale")||o.has("Zscale")){const e=r[d].scaleInterpolator??this.createScaleInterpolator(r,d),n=i/(s-1),a=new(W())(o.get("Xscale")??1,o.get("Yscale")??1,o.get("Zscale")??1);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}}for(const{positionInterpolator:t,orientationInterpolator:e,scaleInterpolator:n}of r)t?.setup(),e?.setup(),n?.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=s-1,this._frameCount=s,this.set_frameDuration__()},set_next_or_previous__(t,e){if(!e.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*t;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 t=this._frameCount.getValue(),e=V().clamp(this._frameIndex.getValue(),0,t),n=t>1?e/(t-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const t of this.timeSensor._fraction_changed.getFieldInterests())t.setValue(n)},set_frameDuration__(){const t=this._frameCount.getValue(),e=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=t>1?(t-1)*e:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const t=this._frameCount.getValue(),e=V().clamp(this._startFrame.getValue(),0,t),n=V().clamp(this._endFrame.getValue(),0,t);this.startFrame=Math.min(e,n),this.endFrame=Math.max(e,n),this.timeSensor._range[1]=t>1?this.startFrame/(t-1):0,this.timeSensor._range[2]=t>1?this.endFrame/(t-1):0},createPositionInterpolator(t,e){return t[e].positionInterpolator=new(q())(this.getExecutionContext())},createOrientationInterpolator(t,e){return t[e].orientationInterpolator=new(Q())(this.getExecutionContext())},createScaleInterpolator(t,e){return t[e].scaleInterpolator=new(q())(this.getExecutionContext())},getFraction(){for(const t of this.timeSensor._fraction_changed.getFieldInterests())return t.getValue();return 0}}),Object.defineProperties(nt,{...h().getStaticProperties("HAnimMotion","HAnim",2,"motions","4.0"),fieldDefinitions:{value:new(u())([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 it=nt,st=g().add("HAnimMotion",it),ot=t.X3DGroupingNode;var rt=e.n(ot);function at(t){rt().call(this,t),this.addType(m().HAnimSegment),this._mass.setUnit("mass")}Object.setPrototypeOf(at.prototype,rt().prototype),Object.defineProperties(at,{...h().getStaticProperties("HAnimSegment","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([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 dt=at,ut=g().add("HAnimSegment",dt);function lt(t){J().call(this,t),this.addType(m().HAnimSite)}Object.setPrototypeOf(lt.prototype,J().prototype),Object.defineProperties(lt,{...h().getStaticProperties("HAnimSite","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([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 ht=lt,pt=g().add("HAnimSite",ht);i().add({name:"HAnim",concreteNodes:[I,H,G,st,ut,pt],abstractNodes:[]});g().add("HAnimComponent",undefined)})();
|
|
1
|
+
/* X_ITE v10.5.4 */
|
|
2
|
+
const t=window[Symbol.for("X_ITE.X3D-10.5.4")];(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=t.Components;var i=e.n(n);const s=t.Fields;var o=e.n(s);const r=t.X3DFieldDefinition;var a=e.n(r);const d=t.FieldDefinitionArray;var u=e.n(d);const l=t.X3DNode;var h=e.n(l);const p=t.X3DGeometricPropertyNode;var c=e.n(p);const _=t.X3DConstants;var m=e.n(_);const w=t.Namespace;var g=e.n(w);function f(t){c().call(this,t),this.addType(m().HAnimDisplacer),this._displacements.setUnit("length")}Object.setPrototypeOf(f.prototype,c().prototype),Object.defineProperties(f,{...h().getStaticProperties("HAnimDisplacer","HAnim",1,"displacers","3.0"),fieldDefinitions:{value:new(u())([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 F=f,I=g().add("HAnimDisplacer",F),O=t.X3DChildNode;var x=e.n(O);const S=t.Group;var T=e.n(S);const v=t.Transform;var b=e.n(v);const N=t.X3DBoundedObject;var y=e.n(N);const E=t.TraverseType;var M=e.n(E);const j=t.X3DCast;var D=e.n(j);const A=t.Matrix4;var C=e.n(A);const k=t.Algorithm;var V=e.n(k);function B(t){x().call(this,t),y().call(this,t),this.addType(m().HAnimHumanoid),this.addChildObjects(m().inputOutput,"jointTextures",new(o().SFTime),m().inputOutput,"displacementsTexture",new(o().SFTime),m().inputOutput,"displacementWeightsTexture",new(o().SFTime)),this._translation.setUnit("length"),this._center.setUnit("length"),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),t.getSpecificationVersion()<=3.3&&(this._version=""),this.skeletonNode=new(T())(t),this.viewpointsNode=new(T())(t),this.skinNode=new(T())(t),this.transformNode=new(b())(t),this.motionNodes=[],this.jointNodes=[],this.jointBindingMatrices=[],this.displacementWeights=[],this.numJoints=0,this.numDisplacements=0,this.skinCoordNode=null,this.change=new R,this.skinning=Function.prototype}Object.assign(Object.setPrototypeOf(B.prototype,x().prototype),y().prototype,{initialize(){x().prototype.initialize.call(this),y().prototype.initialize.call(this),this.skeletonNode.setAllowedTypes(m().HAnimJoint,m().HAnimSite),this.viewpointsNode.setAllowedTypes(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.transformNode._isCameraObject.addFieldInterest(this._isCameraObject),this.transformNode._isPickableObject.addFieldInterest(this._isPickableObject),this.skeletonNode.setup(),this.viewpointsNode.setup(),this.skinNode.setup(),this.transformNode.setup(),this.setCameraObject(this.transformNode.isCameraObject()),this.setPickableObject(this.transformNode.isPickableObject());const t=this.getBrowser().getContext();if(1!==t.getVersion()){this.skinNode.traverse=function(t,e,n){n.getHumanoids().push(t),T().prototype.traverse.call(this,e,n),n.getHumanoids().pop()}.bind(this.skinNode,this),this.jointsTexture=t.createTexture(),this.displacementsTexture=t.createTexture(),this.jointMatricesTexture=t.createTexture();for(const e of[this.jointsTexture,this.displacementsTexture,this.jointMatricesTexture])t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.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(t,e){return this.transformNode.getBBox(t,e)},getSubBBox(t,e){return this.transformNode.getSubBBox(t,e)},getMatrix(){return this.transformNode.getMatrix()},getHumanoidKey(){return this.humanoidKey},getNumJoints(){return this.numJoints},getNumDisplacements(){return this.numDisplacements},set_humanoidKey__(){this.humanoidKey=`[${this.numJoints}.${this.numDisplacements}]`},set_motions__(){const t=this._motionsEnabled,e=this.motionNodes;for(const t of e)t._joints.removeInterest("set_connectJoints__",this),t._channelsEnabled.removeInterest("set_connectJoints__",this),t._channels.removeInterest("set_connectJoints__",this),t._values.removeInterest("set_connectJoints__",this),t.disconnectJoints(this.jointNodes);e.length=0;for(const[n,i]of this._motions.entries()){if(n<t.length&&!t[n])continue;const s=D()(m().HAnimMotion,i);s&&e.push(s)}for(const t of e)t._joints.addInterest("set_connectJoints__",this,t),t._channelsEnabled.addInterest("set_connectJoints__",this,t),t._channels.addInterest("set_connectJoints__",this,t),t._values.addInterest("set_connectJoints__",this,t),t.connectJoints(this.jointNodes)},set_connectJoints__(t){t.disconnectJoints(this.jointNodes),t.connectJoints(this.jointNodes)},set_joints__(){const t=this.jointNodes,e=this.jointBindingMatrices,n=this._jointBindingPositions,i=this._jointBindingRotations,s=this._jointBindingScales,o=n.length,r=i.length,a=s.length;for(const e of this.motionNodes)e.disconnectJoints(t);for(const e of t)e.removeInterest("enable",this.change),e._skinCoordIndex.removeInterest("addEvent",this._jointTextures),e._skinCoordWeight.removeInterest("addEvent",this._jointTextures),e._displacements.removeInterest("addEvent",this._displacementsTexture),e._displacementWeights.removeInterest("addEvent",this._displacementWeightsTexture);t.length=0,e.length=0;for(const[d,u]of this._joints.entries()){const l=D()(m().HAnimJoint,u);if(!l)continue;const h=o?n[Math.min(d,o-1)].getValue():null,p=r?i[Math.min(d,r-1)].getValue():null,c=a?s[Math.min(d,a-1)].getValue():null;t.push(l),e.push((new(C())).set(h,p,c))}for(const e of t)e.addInterest("enable",this.change),e._skinCoordIndex.addInterest("addEvent",this._jointTextures),e._skinCoordWeight.addInterest("addEvent",this._jointTextures),e._displacements.addInterest("addEvent",this._displacementsTexture),e._displacementWeights.addInterest("addEvent",this._displacementWeightsTexture);for(const e of this.motionNodes)e.connectJoints(t);const d=Math.ceil(Math.sqrt(8*t.length));this.jointMatricesArray=new Float32Array(d*d*4),this._jointTextures.addEvent(),this._displacementsTexture.addEvent(),this._displacementWeightsTexture.addEvent()},set_jointTextures__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[])),n=Array.from({length:t},(()=>[]));for(const[t,i]of this.jointNodes.entries()){const s=i._skinCoordWeight.getValue();for(const[o,r]of i._skinCoordIndex.entries()){const i=s[o];0!==i&&(e[r]?.push(t),n[r]?.push(i))}}const i=V().roundToMultiple(e.reduce(((t,e)=>Math.max(t,e.length)),0),4),s=2*i,o=Math.ceil(Math.sqrt(t*s))||1,r=new Float32Array(o*o*4);for(let o=0;o<t;++o)r.set(e[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.change.enable(),this.set_humanoidKey__()},set_displacementsTexture__(){const t=this.skinCoordNode?._point.length||1,e=Array.from({length:t},(()=>[]));for(const[t,n]of this.jointNodes.entries())for(const i of n.getDisplacers()){const n=i._displacements;for(const[s,o]of i._coordIndex.entries())e[o]?.push(...n[s],t)}const n=e.reduce(((t,e)=>Math.max(t,e.length)),0)/4,i=4*n,s=V().roundToMultiple(Math.ceil(Math.sqrt(t*n*2))||1,2),o=new Float32Array(s*s*4);for(let n=0;n<t;++n)o.set(e[n],n*i);this.numDisplacements=n;const r=this.getBrowser().getContext();r.bindTexture(r.TEXTURE_2D,this.displacementsTexture),r.texImage2D(r.TEXTURE_2D,0,r.RGBA32F,s,s,0,r.RGBA,r.FLOAT,o);const a=this.displacementWeights;for(let e=a.length;e<t;++e)a[e]=[];a.length=t,this.displacementWeightsArray=new Float32Array(s*s*2),this.change.enable(),this.set_humanoidKey__()},set_displacementWeightsTexture__(){const t=this.skinCoordNode?._point.length||1,e=this.displacementWeights;for(const t of e)t.length=0;for(const t of this.jointNodes)for(const n of t.getDisplacers()){const t=n._weight;for(const i of n._coordIndex)e[i]?.push(t,0,0,0)}const n=this.numDisplacements,i=4*n,s=V().roundToMultiple(Math.ceil(Math.sqrt(t*n*2))||1,2),o=this.displacementWeightsArray;for(let n=0;n<t;++n)o.set(e[n],n*i);const r=this.getBrowser().getContext();r.bindTexture(r.TEXTURE_2D,this.displacementsTexture),r.texSubImage2D(r.TEXTURE_2D,0,0,s/2,s,s/2,r.RGBA,r.FLOAT,o),this.change.enable()},set_skinCoord__(){this.skinCoordNode&&(this.skinCoordNode.removeInterest("addEvent",this._jointTextures),this.skinCoordNode.removeInterest("addEvent",this._displacementsTexture),this.skinCoordNode.removeInterest("addEvent",this._displacementWeightsTexture)),this.skinCoordNode=D()(m().X3DCoordinateNode,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(t,e){this.transformNode.traverse(t,e),this.skinning(t,e)},skinning:(()=>{const t=new(C());return function(e,n){if(e!==M().DISPLAY||this.change.lock())return;t.assign(this.transformNode.getMatrix()).multRight(n.getModelViewMatrix().get()).inverse();const 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 n=i[e],s=o[e],a=n.getModelViewMatrix().multRight(t).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(t,e){const n=this.getBrowser().getTexture2DUnit(),i=this.getBrowser().getTexture2DUnit(),s=this.getBrowser().getTexture2DUnit();t.activeTexture(t.TEXTURE0+n),t.bindTexture(t.TEXTURE_2D,this.jointsTexture),t.uniform1i(e.x3d_JointsTexture,n),t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.displacementsTexture),t.uniform1i(e.x3d_DisplacementsTexture,i),t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this.jointMatricesTexture),t.uniform1i(e.x3d_JointMatricesTexture,s)},dispose(){y().prototype.dispose.call(this),x().prototype.dispose.call(this)}}),Object.defineProperties(B,{...h().getStaticProperties("HAnimHumanoid","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([new(a())(m().inputOutput,"metadata",new(o().SFNode)),new(a())(m().inputOutput,"version",new(o().SFString)("2.0")),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,"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,"viewpoints",new(o().MFNode)),new(a())(m().inputOutput,"sites",new(o().MFNode)),new(a())(m().inputOutput,"segments",new(o().MFNode)),new(a())(m().inputOutput,"motionsEnabled",new(o().MFBool)),new(a())(m().inputOutput,"motions",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,"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 R{#t=!0;enable(){this.#t=!1}lock(){const t=this.#t;return this.#t=!0,t}}const P=B,H=g().add("HAnimHumanoid",P),X=t.X3DTransformNode;var J=e.n(X);const U=t.Vector3;var W=e.n(U);function z(t){J().call(this,t),this.addType(m().HAnimJoint),this.addChildObjects(m().outputOnly,"displacements",new(o().SFTime),m().outputOnly,"displacementWeights",new(o().SFTime)),this.setAllowedTypes(m().HAnimJoint,m().HAnimSegment,m().HAnimSite),this.displacerNodes=[],this.modelViewMatrix=new(C())}Object.assign(Object.setPrototypeOf(z.prototype,J().prototype),{initialize(){J().prototype.initialize.call(this),this._displacers.addInterest("set_displacers__",this),this.set_displacers__()},getModelViewMatrix(){return this.modelViewMatrix},getDisplacers(){return this.displacerNodes},set_displacers__(){const t=this.displacerNodes;for(const e of t)e._coordIndex.removeInterest("addEvent",this._displacements),e._displacements.removeInterest("addEvent",this._displacements),e._coordIndex.removeInterest("addEvent",this._displacementWeights),e._weight.removeInterest("addEvent",this._displacementWeights);t.length=0;for(const e of this._displacers){const n=D()(m().HAnimDisplacer,e);n&&t.push(n)}for(const e of t)e._coordIndex.addInterest("addEvent",this._displacements),e._displacements.addInterest("addEvent",this._displacements),e._coordIndex.addInterest("addEvent",this._displacementWeights),e._weight.addInterest("addEvent",this._displacementWeights)},traverse(t,e){const n=e.getModelViewMatrix();n.push(),n.multLeft(this.getMatrix()),t===M().DISPLAY&&this.modelViewMatrix.assign(n.get()),J().prototype.groupTraverse.call(this,t,e),n.pop()},groupTraverse(t,e){t===M().DISPLAY&&this.modelViewMatrix.assign(e.getModelViewMatrix().get()),J().prototype.groupTraverse.call(this,t,e)}}),Object.defineProperties(z,{...h().getStaticProperties("HAnimJoint","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([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 L=z,G=g().add("HAnimJoint",L),Y=t.TimeSensor;var K=e.n(Y);const Z=t.PositionInterpolator;var q=e.n(Z);const $=t.OrientationInterpolator;var Q=e.n($);const tt=t.Rotation4;var et=e.n(tt);function nt(t){x().call(this,t),this.addType(m().HAnimMotion),this.timeSensor=new(K())(this.getExecutionContext()),this.interpolators=[]}Object.assign(Object.setPrototypeOf(nt.prototype,x().prototype),{initialize(){x().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(t){const e=this._channelsEnabled,n=this.joints,i=this.getJointsIndex(t);for(const[t,{positionInterpolator:s,orientationInterpolator:o,scaleInterpolator:r}]of this.interpolators.entries()){if(t<e.length&&!e[t])continue;const a=i.get(n[t]);a&&(s?._value_changed.addFieldInterest(a._translation),o?._value_changed.addFieldInterest(a._rotation),r?._value_changed.addFieldInterest(a._scale))}},disconnectJoints(t){const e=this.joints,n=this.getJointsIndex(t);for(const[t,{positionInterpolator:i,orientationInterpolator:s,scaleInterpolator:o}]of this.interpolators.entries()){const r=n.get(e[t]);r&&(i?._value_changed.removeFieldInterest(r._translation),s?._value_changed.removeFieldInterest(r._rotation),o?._value_changed.removeFieldInterest(r._scale))}},getJointsIndex(t){const e=new Map(t.map((t=>[t._name.getValue().trim(),t])));return e.delete("IGNORED"),e.set("HumanoidRoot",e.get("humanoid_root")),e},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:t,orientationInterpolator:e,scaleInterpolator:n}of this.interpolators)t?._value_changed.getFieldInterests().forEach((e=>t._value_changed.removeFieldInterest(e))),e?._value_changed.getFieldInterests().forEach((t=>e._value_changed.removeFieldInterest(t))),n?._value_changed.getFieldInterests().forEach((t=>n._value_changed.removeFieldInterest(t)))},set_interpolators__(){const t=this.timeSensor;t._fraction_changed.getFieldInterests().forEach((e=>t._fraction_changed.removeFieldInterest(e)));const e=this._channels.getValue().replace(/^[\s,\d]+|[\s,\d]+$/gs,"").split(/[\s,]+\d+[\s,]+/s).map((t=>t.split(/[\s,]+/s))),n=this._values,i=e.reduce(((t,e)=>t+e.length),0),s=Math.floor(i?n.length/i:0),o=new Map,r=Array.from({length:e.length},(()=>({})));this.interpolators=r;for(let i=0,a=0;i<s;++i)for(const[d,u]of e.entries()){o.clear();for(const t of u)o.set(t,n[a++]);if(o.has("Xposition")||o.has("Yposition")||o.has("Zposition")){const e=r[d].positionInterpolator??this.createPositionInterpolator(r,d),n=i/(s-1),a=new(W())(o.get("Xposition")??0,o.get("Yposition")??0,o.get("Zposition")??0);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xrotation")||o.has("Yrotation")||o.has("Zrotation")){const e=r[d].orientationInterpolator??this.createOrientationInterpolator(r,d),n=i/(s-1),a=et().fromEuler(V().radians(o.get("Xrotation")??0),V().radians(o.get("Yrotation")??0),V().radians(o.get("Zrotation")??0));e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}if(o.has("Xscale")||o.has("Yscale")||o.has("Zscale")){const e=r[d].scaleInterpolator??this.createScaleInterpolator(r,d),n=i/(s-1),a=new(W())(o.get("Xscale")??1,o.get("Yscale")??1,o.get("Zscale")??1);e._key.push(n),e._keyValue.push(a),t._fraction_changed.addFieldInterest(e._set_fraction)}}for(const{positionInterpolator:t,orientationInterpolator:e,scaleInterpolator:n}of r)t?.setup(),e?.setup(),n?.setup();this._frameIndex=0,this._startFrame=0,this._endFrame=s-1,this._frameCount=s,this.set_frameDuration__()},set_next_or_previous__(t,e){if(!e.getValue())return;const n=this.getFraction(),i=this._frameCount.getValue(),s=this._frameIncrement.getValue(),o=(i>1?Math.floor(n*(i-1)):0)+s*t;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 t=this._frameCount.getValue(),e=V().clamp(this._frameIndex.getValue(),0,t),n=t>1?e/(t-1):0;if(this.timeSensor._range[0]=n,!this.timeSensor._isActive.getValue())for(const t of this.timeSensor._fraction_changed.getFieldInterests())t.setValue(n)},set_frameDuration__(){const t=this._frameCount.getValue(),e=Math.max(this._frameDuration.getValue(),0);this.timeSensor._cycleInterval=t>1?(t-1)*e:0},set_frameIncrement__(){this.timeSensor._enabled=this._frameIncrement.getValue()},set_start_or_endFrame__(){const t=this._frameCount.getValue(),e=V().clamp(this._startFrame.getValue(),0,t),n=V().clamp(this._endFrame.getValue(),0,t);this.startFrame=Math.min(e,n),this.endFrame=Math.max(e,n),this.timeSensor._range[1]=t>1?this.startFrame/(t-1):0,this.timeSensor._range[2]=t>1?this.endFrame/(t-1):0},createPositionInterpolator(t,e){return t[e].positionInterpolator=new(q())(this.getExecutionContext())},createOrientationInterpolator(t,e){return t[e].orientationInterpolator=new(Q())(this.getExecutionContext())},createScaleInterpolator(t,e){return t[e].scaleInterpolator=new(q())(this.getExecutionContext())},getFraction(){for(const t of this.timeSensor._fraction_changed.getFieldInterests())return t.getValue();return 0}}),Object.defineProperties(nt,{...h().getStaticProperties("HAnimMotion","HAnim",2,"motions","4.0"),fieldDefinitions:{value:new(u())([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 it=nt,st=g().add("HAnimMotion",it),ot=t.X3DGroupingNode;var rt=e.n(ot);function at(t){rt().call(this,t),this.addType(m().HAnimSegment),this._mass.setUnit("mass")}Object.setPrototypeOf(at.prototype,rt().prototype),Object.defineProperties(at,{...h().getStaticProperties("HAnimSegment","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([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 dt=at,ut=g().add("HAnimSegment",dt);function lt(t){J().call(this,t),this.addType(m().HAnimSite)}Object.setPrototypeOf(lt.prototype,J().prototype),Object.defineProperties(lt,{...h().getStaticProperties("HAnimSite","HAnim",1,"children","3.0"),fieldDefinitions:{value:new(u())([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 ht=lt,pt=g().add("HAnimSite",ht);i().add({name:"HAnim",concreteNodes:[I,H,G,st,ut,pt],abstractNodes:[]});g().add("HAnimComponent",undefined)})();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v10.5.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.
|
|
1
|
+
/* X_ITE v10.5.4 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.4")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
5
|
/******/ // The require scope
|
|
@@ -39,13 +39,13 @@ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.3")];
|
|
|
39
39
|
|
|
40
40
|
// UNUSED EXPORTS: default
|
|
41
41
|
|
|
42
|
-
;//
|
|
42
|
+
;// external "__X_ITE_X3D__ .Components"
|
|
43
43
|
const external_X_ITE_X3D_Components_namespaceObject = __X_ITE_X3D__ .Components;
|
|
44
44
|
var external_X_ITE_X3D_Components_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Components_namespaceObject);
|
|
45
|
-
;//
|
|
45
|
+
;// external "__X_ITE_X3D__ .Namespace"
|
|
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
49
|
/*******************************************************************************
|
|
50
50
|
*
|
|
51
51
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -148,25 +148,25 @@ const __default__ = X3DKeyDeviceSensorContext;
|
|
|
148
148
|
;
|
|
149
149
|
|
|
150
150
|
/* harmony default export */ const KeyDeviceSensor_X3DKeyDeviceSensorContext = (external_X_ITE_X3D_Namespace_default().add ("X3DKeyDeviceSensorContext", __default__));
|
|
151
|
-
;//
|
|
151
|
+
;// external "__X_ITE_X3D__ .Fields"
|
|
152
152
|
const external_X_ITE_X3D_Fields_namespaceObject = __X_ITE_X3D__ .Fields;
|
|
153
153
|
var external_X_ITE_X3D_Fields_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Fields_namespaceObject);
|
|
154
|
-
;//
|
|
154
|
+
;// external "__X_ITE_X3D__ .X3DFieldDefinition"
|
|
155
155
|
const external_X_ITE_X3D_X3DFieldDefinition_namespaceObject = __X_ITE_X3D__ .X3DFieldDefinition;
|
|
156
156
|
var external_X_ITE_X3D_X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DFieldDefinition_namespaceObject);
|
|
157
|
-
;//
|
|
157
|
+
;// external "__X_ITE_X3D__ .FieldDefinitionArray"
|
|
158
158
|
const external_X_ITE_X3D_FieldDefinitionArray_namespaceObject = __X_ITE_X3D__ .FieldDefinitionArray;
|
|
159
159
|
var external_X_ITE_X3D_FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_FieldDefinitionArray_namespaceObject);
|
|
160
|
-
;//
|
|
160
|
+
;// external "__X_ITE_X3D__ .X3DNode"
|
|
161
161
|
const external_X_ITE_X3D_X3DNode_namespaceObject = __X_ITE_X3D__ .X3DNode;
|
|
162
162
|
var external_X_ITE_X3D_X3DNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DNode_namespaceObject);
|
|
163
|
-
;//
|
|
163
|
+
;// external "__X_ITE_X3D__ .X3DSensorNode"
|
|
164
164
|
const external_X_ITE_X3D_X3DSensorNode_namespaceObject = __X_ITE_X3D__ .X3DSensorNode;
|
|
165
165
|
var external_X_ITE_X3D_X3DSensorNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DSensorNode_namespaceObject);
|
|
166
|
-
;//
|
|
166
|
+
;// external "__X_ITE_X3D__ .X3DConstants"
|
|
167
167
|
const external_X_ITE_X3D_X3DConstants_namespaceObject = __X_ITE_X3D__ .X3DConstants;
|
|
168
168
|
var external_X_ITE_X3D_X3DConstants_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DConstants_namespaceObject);
|
|
169
|
-
;//
|
|
169
|
+
;// ./src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js
|
|
170
170
|
/*******************************************************************************
|
|
171
171
|
*
|
|
172
172
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -279,7 +279,7 @@ const X3DKeyDeviceSensorNode_default_ = X3DKeyDeviceSensorNode;
|
|
|
279
279
|
;
|
|
280
280
|
|
|
281
281
|
/* harmony default export */ const KeyDeviceSensor_X3DKeyDeviceSensorNode = (external_X_ITE_X3D_Namespace_default().add ("X3DKeyDeviceSensorNode", X3DKeyDeviceSensorNode_default_));
|
|
282
|
-
;//
|
|
282
|
+
;// ./src/x_ite/Components/KeyDeviceSensor/KeySensor.js
|
|
283
283
|
/*******************************************************************************
|
|
284
284
|
*
|
|
285
285
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -645,7 +645,7 @@ const KeySensor_default_ = KeySensor;
|
|
|
645
645
|
;
|
|
646
646
|
|
|
647
647
|
/* harmony default export */ const KeyDeviceSensor_KeySensor = (external_X_ITE_X3D_Namespace_default().add ("KeySensor", KeySensor_default_));
|
|
648
|
-
;//
|
|
648
|
+
;// ./src/x_ite/Components/KeyDeviceSensor/StringSensor.js
|
|
649
649
|
/*******************************************************************************
|
|
650
650
|
*
|
|
651
651
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -796,7 +796,7 @@ const StringSensor_default_ = StringSensor;
|
|
|
796
796
|
;
|
|
797
797
|
|
|
798
798
|
/* harmony default export */ const KeyDeviceSensor_StringSensor = (external_X_ITE_X3D_Namespace_default().add ("StringSensor", StringSensor_default_));
|
|
799
|
-
;//
|
|
799
|
+
;// ./src/assets/components/KeyDeviceSensorComponent.js
|
|
800
800
|
/*******************************************************************************
|
|
801
801
|
*
|
|
802
802
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v10.5.
|
|
2
|
-
const e=window[Symbol.for("X_ITE.X3D-10.5.
|
|
1
|
+
/* X_ITE v10.5.4 */
|
|
2
|
+
const e=window[Symbol.for("X_ITE.X3D-10.5.4")];(()=>{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)})();
|