x_ite 8.11.16 → 8.12.0
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 +5 -3
- package/dist/LICENSE.md +2 -2
- package/dist/assets/components/Annotation.js +21 -21
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +38 -36
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +31 -31
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +20 -20
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +19 -19
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +34 -34
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +86 -85
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +30 -32
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +13 -13
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +46 -42
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +65 -65
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +46 -46
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +31 -31
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +48 -48
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +108 -101
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +44 -44
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +18 -18
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +74 -92
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +39 -40
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +11 -11
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +3153 -2347
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -0
- package/dist/x_ite.mjs +121582 -0
- package/dist/x_ite.zip +0 -0
- package/package.json +9 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* X_ITE v8.
|
|
1
|
+
/* X_ITE v8.12.0 */(() => { // webpackBootstrap
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
5
|
/***/ 355:
|
|
6
6
|
/***/ ((module) => {
|
|
7
7
|
|
|
8
|
-
module.exports = window [Symbol .for ("X_ITE.X3D-8.
|
|
8
|
+
module.exports = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("lib/jquery");
|
|
9
9
|
|
|
10
10
|
/***/ })
|
|
11
11
|
|
|
@@ -73,97 +73,97 @@ var __webpack_exports__ = {};
|
|
|
73
73
|
// UNUSED EXPORTS: default
|
|
74
74
|
|
|
75
75
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
|
|
76
|
-
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
76
|
+
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Components");
|
|
77
77
|
var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
|
|
78
78
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DBaseNode\")"
|
|
79
|
-
const X3DBaseNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
79
|
+
const X3DBaseNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Base/X3DBaseNode");
|
|
80
80
|
var X3DBaseNode_default = /*#__PURE__*/__webpack_require__.n(X3DBaseNode_namespaceObject);
|
|
81
81
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
|
|
82
|
-
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
82
|
+
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Base/X3DFieldDefinition");
|
|
83
83
|
var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
|
|
84
84
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
|
|
85
|
-
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
85
|
+
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Base/FieldDefinitionArray");
|
|
86
86
|
var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
|
|
87
87
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DField\")"
|
|
88
|
-
const X3DField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
88
|
+
const X3DField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Base/X3DField");
|
|
89
89
|
var X3DField_default = /*#__PURE__*/__webpack_require__.n(X3DField_namespaceObject);
|
|
90
90
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DArrayField\")"
|
|
91
|
-
const X3DArrayField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
91
|
+
const X3DArrayField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Base/X3DArrayField");
|
|
92
92
|
var X3DArrayField_default = /*#__PURE__*/__webpack_require__.n(X3DArrayField_namespaceObject);
|
|
93
93
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
|
|
94
|
-
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
94
|
+
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Fields");
|
|
95
95
|
var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
|
|
96
96
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Browser/X3DBrowser\")"
|
|
97
|
-
const X3DBrowser_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
97
|
+
const X3DBrowser_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Browser/X3DBrowser");
|
|
98
98
|
var X3DBrowser_default = /*#__PURE__*/__webpack_require__.n(X3DBrowser_namespaceObject);
|
|
99
99
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ComponentInfo\")"
|
|
100
|
-
const ComponentInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
100
|
+
const ComponentInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/ComponentInfo");
|
|
101
101
|
var ComponentInfo_default = /*#__PURE__*/__webpack_require__.n(ComponentInfo_namespaceObject);
|
|
102
102
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ComponentInfoArray\")"
|
|
103
|
-
const ComponentInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
103
|
+
const ComponentInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/ComponentInfoArray");
|
|
104
104
|
var ComponentInfoArray_default = /*#__PURE__*/__webpack_require__.n(ComponentInfoArray_namespaceObject);
|
|
105
105
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ProfileInfo\")"
|
|
106
|
-
const ProfileInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
106
|
+
const ProfileInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/ProfileInfo");
|
|
107
107
|
var ProfileInfo_default = /*#__PURE__*/__webpack_require__.n(ProfileInfo_namespaceObject);
|
|
108
108
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ProfileInfoArray\")"
|
|
109
|
-
const ProfileInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
109
|
+
const ProfileInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/ProfileInfoArray");
|
|
110
110
|
var ProfileInfoArray_default = /*#__PURE__*/__webpack_require__.n(ProfileInfoArray_namespaceObject);
|
|
111
111
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ConcreteNodesArray\")"
|
|
112
|
-
const ConcreteNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
112
|
+
const ConcreteNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/ConcreteNodesArray");
|
|
113
113
|
var ConcreteNodesArray_default = /*#__PURE__*/__webpack_require__.n(ConcreteNodesArray_namespaceObject);
|
|
114
114
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/AbstractNodesArray\")"
|
|
115
|
-
const AbstractNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
115
|
+
const AbstractNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/AbstractNodesArray");
|
|
116
116
|
var AbstractNodesArray_default = /*#__PURE__*/__webpack_require__.n(AbstractNodesArray_namespaceObject);
|
|
117
117
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/UnitInfo\")"
|
|
118
|
-
const UnitInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
118
|
+
const UnitInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/UnitInfo");
|
|
119
119
|
var UnitInfo_default = /*#__PURE__*/__webpack_require__.n(UnitInfo_namespaceObject);
|
|
120
120
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/UnitInfoArray\")"
|
|
121
|
-
const UnitInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
121
|
+
const UnitInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Configuration/UnitInfoArray");
|
|
122
122
|
var UnitInfoArray_default = /*#__PURE__*/__webpack_require__.n(UnitInfoArray_namespaceObject);
|
|
123
123
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/NamedNodesArray\")"
|
|
124
|
-
const NamedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
124
|
+
const NamedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/NamedNodesArray");
|
|
125
125
|
var NamedNodesArray_default = /*#__PURE__*/__webpack_require__.n(NamedNodesArray_namespaceObject);
|
|
126
126
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/ImportedNodesArray\")"
|
|
127
|
-
const ImportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
127
|
+
const ImportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/ImportedNodesArray");
|
|
128
128
|
var ImportedNodesArray_default = /*#__PURE__*/__webpack_require__.n(ImportedNodesArray_namespaceObject);
|
|
129
129
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DImportedNode\")"
|
|
130
|
-
const X3DImportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
130
|
+
const X3DImportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/X3DImportedNode");
|
|
131
131
|
var X3DImportedNode_default = /*#__PURE__*/__webpack_require__.n(X3DImportedNode_namespaceObject);
|
|
132
132
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/ExportedNodesArray\")"
|
|
133
|
-
const ExportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
133
|
+
const ExportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/ExportedNodesArray");
|
|
134
134
|
var ExportedNodesArray_default = /*#__PURE__*/__webpack_require__.n(ExportedNodesArray_namespaceObject);
|
|
135
135
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DExportedNode\")"
|
|
136
|
-
const X3DExportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
136
|
+
const X3DExportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/X3DExportedNode");
|
|
137
137
|
var X3DExportedNode_default = /*#__PURE__*/__webpack_require__.n(X3DExportedNode_namespaceObject);
|
|
138
138
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DExecutionContext\")"
|
|
139
|
-
const X3DExecutionContext_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
139
|
+
const X3DExecutionContext_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/X3DExecutionContext");
|
|
140
140
|
var X3DExecutionContext_default = /*#__PURE__*/__webpack_require__.n(X3DExecutionContext_namespaceObject);
|
|
141
141
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DScene\")"
|
|
142
|
-
const X3DScene_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
142
|
+
const X3DScene_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Execution/X3DScene");
|
|
143
143
|
var X3DScene_default = /*#__PURE__*/__webpack_require__.n(X3DScene_namespaceObject);
|
|
144
144
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/ExternProtoDeclarationArray\")"
|
|
145
|
-
const ExternProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
145
|
+
const ExternProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Prototype/ExternProtoDeclarationArray");
|
|
146
146
|
var ExternProtoDeclarationArray_default = /*#__PURE__*/__webpack_require__.n(ExternProtoDeclarationArray_namespaceObject);
|
|
147
147
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/ProtoDeclarationArray\")"
|
|
148
|
-
const ProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
148
|
+
const ProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Prototype/ProtoDeclarationArray");
|
|
149
149
|
var ProtoDeclarationArray_default = /*#__PURE__*/__webpack_require__.n(ProtoDeclarationArray_namespaceObject);
|
|
150
150
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/X3DExternProtoDeclaration\")"
|
|
151
|
-
const X3DExternProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
151
|
+
const X3DExternProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Prototype/X3DExternProtoDeclaration");
|
|
152
152
|
var X3DExternProtoDeclaration_default = /*#__PURE__*/__webpack_require__.n(X3DExternProtoDeclaration_namespaceObject);
|
|
153
153
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/X3DProtoDeclaration\")"
|
|
154
|
-
const X3DProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
154
|
+
const X3DProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Prototype/X3DProtoDeclaration");
|
|
155
155
|
var X3DProtoDeclaration_default = /*#__PURE__*/__webpack_require__.n(X3DProtoDeclaration_namespaceObject);
|
|
156
156
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/X3DProtoDeclarationNode\")"
|
|
157
|
-
const X3DProtoDeclarationNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
157
|
+
const X3DProtoDeclarationNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Prototype/X3DProtoDeclarationNode");
|
|
158
158
|
var X3DProtoDeclarationNode_default = /*#__PURE__*/__webpack_require__.n(X3DProtoDeclarationNode_namespaceObject);
|
|
159
159
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Routing/RouteArray\")"
|
|
160
|
-
const RouteArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
160
|
+
const RouteArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Routing/RouteArray");
|
|
161
161
|
var RouteArray_default = /*#__PURE__*/__webpack_require__.n(RouteArray_namespaceObject);
|
|
162
162
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Routing/X3DRoute\")"
|
|
163
|
-
const X3DRoute_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
163
|
+
const X3DRoute_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Routing/X3DRoute");
|
|
164
164
|
var X3DRoute_default = /*#__PURE__*/__webpack_require__.n(X3DRoute_namespaceObject);
|
|
165
165
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
|
|
166
|
-
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
166
|
+
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Namespace");
|
|
167
167
|
var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
|
|
168
168
|
;// CONCATENATED MODULE: ./src/x_ite/Browser/Scripting/evaluate.js
|
|
169
169
|
/*******************************************************************************
|
|
@@ -213,7 +213,7 @@ var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceOb
|
|
|
213
213
|
*
|
|
214
214
|
******************************************************************************/
|
|
215
215
|
|
|
216
|
-
function evaluate (globalObject, sourceText)
|
|
216
|
+
function evaluate (thisArg, globalObject, sourceText)
|
|
217
217
|
{
|
|
218
218
|
return Function (/* js */ `with (arguments [0])
|
|
219
219
|
{
|
|
@@ -230,22 +230,22 @@ function evaluate (globalObject, sourceText)
|
|
|
230
230
|
})
|
|
231
231
|
());
|
|
232
232
|
}`)
|
|
233
|
-
(globalObject, sourceText);
|
|
233
|
+
.call (thisArg, globalObject, sourceText);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
const __default__ = evaluate;
|
|
237
237
|
;
|
|
238
238
|
|
|
239
|
-
Namespace_default().
|
|
239
|
+
Namespace_default().add ("evaluate", "x_ite/Browser/Scripting/evaluate", __default__);
|
|
240
240
|
/* harmony default export */ const Scripting_evaluate = (__default__);
|
|
241
241
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DChildNode\")"
|
|
242
|
-
const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
242
|
+
const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Components/Core/X3DChildNode");
|
|
243
243
|
var X3DChildNode_default = /*#__PURE__*/__webpack_require__.n(X3DChildNode_namespaceObject);
|
|
244
244
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Networking/X3DUrlObject\")"
|
|
245
|
-
const X3DUrlObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
245
|
+
const X3DUrlObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Components/Networking/X3DUrlObject");
|
|
246
246
|
var X3DUrlObject_default = /*#__PURE__*/__webpack_require__.n(X3DUrlObject_namespaceObject);
|
|
247
247
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
|
|
248
|
-
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
248
|
+
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Base/X3DConstants");
|
|
249
249
|
var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
|
|
250
250
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Scripting/X3DScriptNode.js
|
|
251
251
|
/*******************************************************************************
|
|
@@ -339,11 +339,14 @@ Object .defineProperties (X3DScriptNode,
|
|
|
339
339
|
const X3DScriptNode_default_ = X3DScriptNode;
|
|
340
340
|
;
|
|
341
341
|
|
|
342
|
-
Namespace_default().
|
|
342
|
+
Namespace_default().add ("X3DScriptNode", "x_ite/Components/Scripting/X3DScriptNode", X3DScriptNode_default_);
|
|
343
343
|
/* harmony default export */ const Scripting_X3DScriptNode = (X3DScriptNode_default_);
|
|
344
344
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/InputOutput/FileLoader\")"
|
|
345
|
-
const FileLoader_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.
|
|
345
|
+
const FileLoader_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/InputOutput/FileLoader");
|
|
346
346
|
var FileLoader_default = /*#__PURE__*/__webpack_require__.n(FileLoader_namespaceObject);
|
|
347
|
+
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields/SFNodeCache\")"
|
|
348
|
+
const SFNodeCache_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.0")] .require ("x_ite/Fields/SFNodeCache");
|
|
349
|
+
var SFNodeCache_default = /*#__PURE__*/__webpack_require__.n(SFNodeCache_namespaceObject);
|
|
347
350
|
;// CONCATENATED MODULE: ./src/x_ite/Components/Scripting/Script.js
|
|
348
351
|
/* provided dependency */ var $ = __webpack_require__(355);
|
|
349
352
|
/*******************************************************************************
|
|
@@ -425,6 +428,7 @@ var FileLoader_default = /*#__PURE__*/__webpack_require__.n(FileLoader_namespace
|
|
|
425
428
|
|
|
426
429
|
|
|
427
430
|
|
|
431
|
+
|
|
428
432
|
|
|
429
433
|
|
|
430
434
|
function Script (executionContext)
|
|
@@ -496,61 +500,7 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
|
|
|
496
500
|
}
|
|
497
501
|
});
|
|
498
502
|
},
|
|
499
|
-
|
|
500
|
-
{
|
|
501
|
-
try
|
|
502
|
-
{
|
|
503
|
-
const callbacks = ["initialize", "prepareEvents", "eventsProcessed", "shutdown"];
|
|
504
|
-
|
|
505
|
-
for (const field of this .getUserDefinedFields ())
|
|
506
|
-
{
|
|
507
|
-
switch (field .getAccessType ())
|
|
508
|
-
{
|
|
509
|
-
case (X3DConstants_default()).inputOnly:
|
|
510
|
-
callbacks .push (field .getName ());
|
|
511
|
-
break;
|
|
512
|
-
case (X3DConstants_default()).inputOutput:
|
|
513
|
-
callbacks .push ("set_" + field .getName ());
|
|
514
|
-
break;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
sourceText += ";\n[" + callbacks .map (c => `typeof ${c} !== "undefined" ? ${c} : undefined`) .join (",") + "];";
|
|
519
|
-
|
|
520
|
-
this .globalObject = this .getGlobalObject ();
|
|
521
|
-
|
|
522
|
-
const
|
|
523
|
-
result = this .evaluate (sourceText),
|
|
524
|
-
context = new Map ();
|
|
525
|
-
|
|
526
|
-
for (let i = 0; i < callbacks .length; ++ i)
|
|
527
|
-
context .set (callbacks [i], result [i]);
|
|
528
|
-
|
|
529
|
-
return context;
|
|
530
|
-
}
|
|
531
|
-
catch (error)
|
|
532
|
-
{
|
|
533
|
-
this .setError ("while evaluating script source", error);
|
|
534
|
-
|
|
535
|
-
return new Map ();
|
|
536
|
-
}
|
|
537
|
-
},
|
|
538
|
-
evaluate (sourceText)
|
|
539
|
-
{
|
|
540
|
-
const browser = this .getBrowser ();
|
|
541
|
-
|
|
542
|
-
browser .getScriptStack () .push (this);
|
|
543
|
-
|
|
544
|
-
try
|
|
545
|
-
{
|
|
546
|
-
return Scripting_evaluate (this .globalObject, sourceText);
|
|
547
|
-
}
|
|
548
|
-
finally
|
|
549
|
-
{
|
|
550
|
-
browser .getScriptStack () .pop ();
|
|
551
|
-
}
|
|
552
|
-
},
|
|
553
|
-
getGlobalObject ()
|
|
503
|
+
createGlobalObject ()
|
|
554
504
|
{
|
|
555
505
|
const browser = this .getBrowser ();
|
|
556
506
|
|
|
@@ -618,6 +568,7 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
|
|
|
618
568
|
SFMatrix4f: { value: (Fields_default()).SFMatrix4f },
|
|
619
569
|
SFNode: { value: SFNode },
|
|
620
570
|
SFRotation: { value: (Fields_default()).SFRotation },
|
|
571
|
+
SFString: { value: (Fields_default()).SFString },
|
|
621
572
|
SFVec2d: { value: (Fields_default()).SFVec2d },
|
|
622
573
|
SFVec2f: { value: (Fields_default()).SFVec2f },
|
|
623
574
|
SFVec3d: { value: (Fields_default()).SFVec3d },
|
|
@@ -677,6 +628,61 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
|
|
|
677
628
|
|
|
678
629
|
return Object .create (Object .prototype, globalObject);
|
|
679
630
|
},
|
|
631
|
+
createContext (sourceText)
|
|
632
|
+
{
|
|
633
|
+
try
|
|
634
|
+
{
|
|
635
|
+
const callbacks = ["initialize", "prepareEvents", "eventsProcessed", "shutdown"];
|
|
636
|
+
|
|
637
|
+
for (const field of this .getUserDefinedFields ())
|
|
638
|
+
{
|
|
639
|
+
switch (field .getAccessType ())
|
|
640
|
+
{
|
|
641
|
+
case (X3DConstants_default()).inputOnly:
|
|
642
|
+
callbacks .push (field .getName ());
|
|
643
|
+
break;
|
|
644
|
+
case (X3DConstants_default()).inputOutput:
|
|
645
|
+
callbacks .push ("set_" + field .getName ());
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
sourceText += ";\n[" + callbacks .map (c => `typeof ${c} !== "undefined" ? ${c} : undefined`) .join (",") + "];";
|
|
651
|
+
|
|
652
|
+
const
|
|
653
|
+
result = this .evaluate (sourceText),
|
|
654
|
+
context = new Map ();
|
|
655
|
+
|
|
656
|
+
for (let i = 0; i < callbacks .length; ++ i)
|
|
657
|
+
context .set (callbacks [i], result [i]);
|
|
658
|
+
|
|
659
|
+
return context;
|
|
660
|
+
}
|
|
661
|
+
catch (error)
|
|
662
|
+
{
|
|
663
|
+
this .setError ("while evaluating script source", error);
|
|
664
|
+
|
|
665
|
+
return new Map ();
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
evaluate (sourceText)
|
|
669
|
+
{
|
|
670
|
+
const browser = this .getBrowser ();
|
|
671
|
+
|
|
672
|
+
try
|
|
673
|
+
{
|
|
674
|
+
browser .getScriptStack () .push (this);
|
|
675
|
+
|
|
676
|
+
if (!this .globalObject)
|
|
677
|
+
this .globalObject = this .createGlobalObject ();
|
|
678
|
+
|
|
679
|
+
return Scripting_evaluate (SFNodeCache_default().get (this), this .globalObject, sourceText);
|
|
680
|
+
}
|
|
681
|
+
finally
|
|
682
|
+
{
|
|
683
|
+
browser .getScriptStack () .pop ();
|
|
684
|
+
}
|
|
685
|
+
},
|
|
680
686
|
initialize__ (sourceText)
|
|
681
687
|
{
|
|
682
688
|
this .disconnect ();
|
|
@@ -685,7 +691,8 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
|
|
|
685
691
|
|
|
686
692
|
// Create context.
|
|
687
693
|
|
|
688
|
-
this .
|
|
694
|
+
this .globalObject = this .createGlobalObject ();
|
|
695
|
+
this .context = this .createContext (sourceText);
|
|
689
696
|
|
|
690
697
|
// Connect shutdown.
|
|
691
698
|
|
|
@@ -750,7 +757,7 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
|
|
|
750
757
|
|
|
751
758
|
try
|
|
752
759
|
{
|
|
753
|
-
callback (browser .getCurrentTime ());
|
|
760
|
+
callback .call (SFNodeCache_default().get (this), browser .getCurrentTime ());
|
|
754
761
|
}
|
|
755
762
|
catch (error)
|
|
756
763
|
{
|
|
@@ -768,7 +775,7 @@ Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNo
|
|
|
768
775
|
|
|
769
776
|
try
|
|
770
777
|
{
|
|
771
|
-
callback (field .valueOf (), browser .getCurrentTime ());
|
|
778
|
+
callback .call (SFNodeCache_default().get (this), field .valueOf (), browser .getCurrentTime ());
|
|
772
779
|
}
|
|
773
780
|
catch (error)
|
|
774
781
|
{
|
|
@@ -858,7 +865,7 @@ Object .defineProperties (Script,
|
|
|
858
865
|
const Script_default_ = Script;
|
|
859
866
|
;
|
|
860
867
|
|
|
861
|
-
Namespace_default().
|
|
868
|
+
Namespace_default().add ("Script", "x_ite/Components/Scripting/Script", Script_default_);
|
|
862
869
|
/* harmony default export */ const Scripting_Script = (Script_default_);
|
|
863
870
|
;// CONCATENATED MODULE: ./src/assets/components/Scripting.js
|
|
864
871
|
/*******************************************************************************
|
|
@@ -927,7 +934,7 @@ Components_default().add ({
|
|
|
927
934
|
const Scripting_default_ = undefined;
|
|
928
935
|
;
|
|
929
936
|
|
|
930
|
-
Namespace_default().
|
|
937
|
+
Namespace_default().add ("Scripting", "assets/components/Scripting", Scripting_default_);
|
|
931
938
|
/* harmony default export */ const Scripting = ((/* unused pure expression or super */ null && (Scripting_default_)));
|
|
932
939
|
})();
|
|
933
940
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* X_ITE v8.11.16 */(()=>{"use strict";var e={355:e=>{e.exports=window[Symbol.for("X_ITE.X3D-8.11.16")].require("lib/jquery")}},t={};function o(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Components");var t=o.n(e);const r=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Base/X3DBaseNode");var i=o.n(r);const n=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Base/X3DFieldDefinition");var a=o.n(n);const s=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Base/FieldDefinitionArray");var l=o.n(s);const u=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Base/X3DField");var c=o.n(u);const d=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Base/X3DArrayField");var p=o.n(d);const f=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Fields");var v=o.n(f);const _=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Browser/X3DBrowser");var w=o.n(_);const S=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/ComponentInfo");var y=o.n(S);const m=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/ComponentInfoArray");var F=o.n(m);const h=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/ProfileInfo");var X=o.n(h);const D=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/ProfileInfoArray");var x=o.n(D);const g=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/ConcreteNodesArray");var b=o.n(g);const E=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/AbstractNodesArray");var I=o.n(E);const T=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/UnitInfo");var M=o.n(T);const N=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Configuration/UnitInfoArray");var A=o.n(N);const O=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/NamedNodesArray");var q=o.n(O);const C=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/ImportedNodesArray");var P=o.n(C);const V=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/X3DImportedNode");var B=o.n(V);const R=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/ExportedNodesArray");var j=o.n(R);const U=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/X3DExportedNode");var z=o.n(U);const L=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/X3DExecutionContext");var k=o.n(L);const G=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Execution/X3DScene");var $=o.n(G);const H=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Prototype/ExternProtoDeclarationArray");var J=o.n(H);const W=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Prototype/ProtoDeclarationArray");var K=o.n(W);const Q=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Prototype/X3DExternProtoDeclaration");var Y=o.n(Q);const Z=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Prototype/X3DProtoDeclaration");var ee=o.n(Z);const te=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Prototype/X3DProtoDeclarationNode");var oe=o.n(te);const re=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Routing/RouteArray");var ie=o.n(re);const ne=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Routing/X3DRoute");var ae=o.n(ne);const se=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Namespace");var le=o.n(se);const ue=function(e,t){return Function("with (arguments [0])\n {\n return eval ((() =>\n {\n const sourceText = arguments [1];\n\n delete arguments [0];\n delete arguments [1];\n\n arguments .length = 0;\n\n return sourceText;\n })\n ());\n }")(e,t)};le().set("x_ite/Browser/Scripting/evaluate",ue);const ce=ue,de=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Components/Core/X3DChildNode");var pe=o.n(de);const fe=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Components/Networking/X3DUrlObject");var ve=o.n(fe);const _e=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/Base/X3DConstants");var we=o.n(_e);function Se(e){pe().call(this,e),ve().call(this,e),this.addType(we().X3DScriptNode)}Object.assign(Object.setPrototypeOf(Se.prototype,pe().prototype),ve().prototype,{initialize(){pe().prototype.initialize.call(this),ve().prototype.initialize.call(this)},dispose(){ve().prototype.dispose.call(this),pe().prototype.dispose.call(this)}}),Object.defineProperties(Se,{typeName:{value:"X3DScriptNode",enumerable:!0},componentName:{value:"Scripting",enumerable:!0}});const ye=Se;le().set("x_ite/Components/Scripting/X3DScriptNode",ye);const me=ye,Fe=window[Symbol.for("X_ITE.X3D-8.11.16")].require("x_ite/InputOutput/FileLoader");var he=o.n(Fe),Xe=o(355);function De(e){me.call(this,e),this.addType(we().Script)}Object.assign(Object.setPrototypeOf(De.prototype,me.prototype),{initialize(){me.prototype.initialize.call(this),this.requestImmediateLoad().catch(Function.prototype)},getExtendedEventHandling:()=>!1,canUserDefinedFields:()=>!0,addUserDefinedField(e,t,o){me.prototype.addUserDefinedField.call(this,e,t,o),this.isInitialized()&&(this.setLoadState(we().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},removeUserDefinedField(e){this.getUserDefinedFields().get(e)?.removeInterest("set_field__",this),me.prototype.removeUserDefinedField.call(this,e),this.isInitialized()&&(this.setLoadState(we().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},getSourceText(){return this._url},unloadData(){this.initialize__("")},loadData(){new(he())(this).loadDocument(this._url,(e=>{null===e?this.setLoadState(we().FAILED_STATE):(this.initialize__(Xe.decodeText(e)),this.setLoadState(we().COMPLETE_STATE))}))},getContext(e){try{const t=["initialize","prepareEvents","eventsProcessed","shutdown"];for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case we().inputOnly:t.push(e.getName());break;case we().inputOutput:t.push("set_"+e.getName())}e+=";\n["+t.map((e=>`typeof ${e} !== "undefined" ? ${e} : undefined`)).join(",")+"];",this.globalObject=this.getGlobalObject();const o=this.evaluate(e),r=new Map;for(let e=0;e<t.length;++e)r.set(t[e],o[e]);return r}catch(e){return this.setError("while evaluating script source",e),new Map}},evaluate(e){const t=this.getBrowser();t.getScriptStack().push(this);try{return ce(this.globalObject,e)}finally{t.getScriptStack().pop()}},getGlobalObject(){const e=this.getBrowser();function t(t){const o=e.createVrmlFromString(t);if(o.length&&o[0])return o[0];throw new Error("SFNode.new: invalid argument.")}t.prototype=v().SFNode.prototype;const o={NULL:{value:null},FALSE:{value:!1},TRUE:{value:!0},print:{value:e.println.bind(e)},trace:{value:e.println.bind(e)},Browser:{value:e},X3DConstants:{value:we()},X3DBrowser:{value:w()},X3DExecutionContext:{value:k()},X3DScene:{value:$()},ComponentInfo:{value:y()},ComponentInfoArray:{value:F()},ProfileInfo:{value:X()},ProfileInfoArray:{value:x()},ConcreteNodesArray:{value:b()},AbstractNodesArray:{value:I()},UnitInfo:{value:M()},UnitInfoArray:{value:A()},NamedNodesArray:{value:q()},ImportedNodesArray:{value:P()},X3DImportedNode:{value:B()},ExportedNodesArray:{value:j()},X3DExportedNode:{value:z()},ExternProtoDeclarationArray:{value:J()},ProtoDeclarationArray:{value:K()},X3DExternProtoDeclaration:{value:Y()},X3DProtoDeclaration:{value:ee()},X3DProtoDeclarationNode:{value:oe()},RouteArray:{value:ie()},X3DRoute:{value:ae()},X3DBaseNode:{value:i()},X3DFieldDefinition:{value:a()},FieldDefinitionArray:{value:l()},X3DField:{value:c()},X3DArrayField:{value:p()},SFColor:{value:v().SFColor},SFColorRGBA:{value:v().SFColorRGBA},SFImage:{value:v().SFImage},SFMatrix3d:{value:v().SFMatrix3d},SFMatrix3f:{value:v().SFMatrix3f},SFMatrix4d:{value:v().SFMatrix4d},SFMatrix4f:{value:v().SFMatrix4f},SFNode:{value:t},SFRotation:{value:v().SFRotation},SFVec2d:{value:v().SFVec2d},SFVec2f:{value:v().SFVec2f},SFVec3d:{value:v().SFVec3d},SFVec3f:{value:v().SFVec3f},SFVec4d:{value:v().SFVec4d},SFVec4f:{value:v().SFVec4f},VrmlMatrix:{value:v().VrmlMatrix},MFBool:{value:v().MFBool},MFColor:{value:v().MFColor},MFColorRGBA:{value:v().MFColorRGBA},MFDouble:{value:v().MFDouble},MFFloat:{value:v().MFFloat},MFImage:{value:v().MFImage},MFInt32:{value:v().MFInt32},MFMatrix3d:{value:v().MFMatrix3d},MFMatrix3f:{value:v().MFMatrix3f},MFMatrix4d:{value:v().MFMatrix4d},MFMatrix4f:{value:v().MFMatrix4f},MFNode:{value:v().MFNode},MFRotation:{value:v().MFRotation},MFString:{value:v().MFString},MFTime:{value:v().MFTime},MFVec2d:{value:v().MFVec2d},MFVec2f:{value:v().MFVec2f},MFVec3d:{value:v().MFVec3d},MFVec3f:{value:v().MFVec3f},MFVec4d:{value:v().MFVec4d},MFVec4f:{value:v().MFVec4f}};for(const e of this.getUserDefinedFields()){const t=e.getName();e.getAccessType()!==we().inputOnly&&(t in o||(o[t]={get:e.valueOf.bind(e),set:e.setValue.bind(e)}),e.getAccessType()===we().inputOutput&&(o[t+"_changed"]={get:e.valueOf.bind(e),set:e.setValue.bind(e)}))}return Object.create(Object.prototype,o)},initialize__(e){this.disconnect();const t=this.getBrowser();this.context=this.getContext(e);const o=this.context.get("shutdown");"function"==typeof o&&Xe(window).on("unload.Script"+this.getId(),this.call__.bind(this,o,"shutdown"));const r=this.context.get("prepareEvents");"function"==typeof r&&t.prepareEvents().addInterest("call__",this,r,"prepareEvents");const i=this.context.get("eventsProcessed");"function"==typeof i&&this.addInterest("call__",this,i,"eventsProcessed");for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case we().inputOnly:{const t=this.context.get(e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t);break}case we().inputOutput:{const t=this.context.get("set_"+e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t);break}}const n=this.context.get("initialize");"function"==typeof n&&this.call__(n,"initialize")},call__(e,t){const o=this.getBrowser();o.getScriptStack().push(this);try{e(o.getCurrentTime())}catch(e){this.setError(`in function '${t}'`,e)}o.getScriptStack().pop()},set_field__(e,t){const o=this.getBrowser();t.setTainted(!0),o.getScriptStack().push(this);try{e(t.valueOf(),o.getCurrentTime())}catch(e){this.setError("in function '"+t.getName()+"'",e)}o.getScriptStack().pop(),t.setTainted(!1)},setError(e,t){console.error("JavaScript Error in Script '"+this.getName()+"', "+e+"\nworld url is '"+this.getExecutionContext().getWorldURL()+"':"),console.error(t)},disconnect(){const e=this.context?.get("shutdown");"function"==typeof e&&this.call__(e,"shutdown"),Xe(window).off(".Script"+this.getId()),this.getBrowser().prepareEvents().removeInterest("call__",this),this.removeInterest("call__",this);for(const e of this.getUserDefinedFields())e.removeInterest("set_field__",this)},dispose(){this.disconnect(),me.prototype.dispose.call(this)}}),Object.defineProperties(De,{typeName:{value:"Script",enumerable:!0},componentName:{value:"Scripting",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["2.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(l())([new(a())(we().inputOutput,"metadata",new(v().SFNode)),new(a())(we().inputOutput,"description",new(v().SFString)),new(a())(we().inputOutput,"load",new(v().SFBool)(!0)),new(a())(we().inputOutput,"url",new(v().MFString)),new(a())(we().inputOutput,"autoRefresh",new(v().SFTime)),new(a())(we().inputOutput,"autoRefreshTimeLimit",new(v().SFTime)(3600)),new(a())(we().initializeOnly,"directOutput",new(v().SFBool)),new(a())(we().initializeOnly,"mustEvaluate",new(v().SFBool))]),enumerable:!0}});const xe=De;le().set("x_ite/Components/Scripting/Script",xe);const ge=xe;t().add({name:"Scripting",concreteNodes:[ge],abstractNodes:[me]});const be=void 0;le().set("assets/components/Scripting",be)})()})();
|
|
1
|
+
/* X_ITE v8.12.0 */(()=>{"use strict";var e={355:e=>{e.exports=window[Symbol.for("X_ITE.X3D-8.12.0")].require("lib/jquery")}},t={};function o(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Components");var t=o.n(e);const r=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Base/X3DBaseNode");var i=o.n(r);const n=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Base/X3DFieldDefinition");var a=o.n(n);const s=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Base/FieldDefinitionArray");var l=o.n(s);const c=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Base/X3DField");var u=o.n(c);const d=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Base/X3DArrayField");var p=o.n(d);const f=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Fields");var v=o.n(f);const S=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Browser/X3DBrowser");var _=o.n(S);const w=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/ComponentInfo");var y=o.n(w);const F=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/ComponentInfoArray");var h=o.n(F);const m=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/ProfileInfo");var X=o.n(m);const D=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/ProfileInfoArray");var g=o.n(D);const x=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/ConcreteNodesArray");var b=o.n(x);const E=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/AbstractNodesArray");var I=o.n(E);const T=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/UnitInfo");var M=o.n(T);const N=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Configuration/UnitInfoArray");var A=o.n(N);const O=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/NamedNodesArray");var q=o.n(O);const C=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/ImportedNodesArray");var P=o.n(C);const V=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/X3DImportedNode");var B=o.n(V);const j=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/ExportedNodesArray");var R=o.n(j);const U=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/X3DExportedNode");var z=o.n(U);const L=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/X3DExecutionContext");var k=o.n(L);const G=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Execution/X3DScene");var $=o.n(G);const H=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Prototype/ExternProtoDeclarationArray");var J=o.n(H);const W=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Prototype/ProtoDeclarationArray");var K=o.n(W);const Q=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Prototype/X3DExternProtoDeclaration");var Y=o.n(Q);const Z=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Prototype/X3DProtoDeclaration");var ee=o.n(Z);const te=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Prototype/X3DProtoDeclarationNode");var oe=o.n(te);const re=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Routing/RouteArray");var ie=o.n(re);const ne=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Routing/X3DRoute");var ae=o.n(ne);const se=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Namespace");var le=o.n(se);const ce=function(e,t,o){return Function("with (arguments [0])\n {\n return eval ((() =>\n {\n const sourceText = arguments [1];\n\n delete arguments [0];\n delete arguments [1];\n\n arguments .length = 0;\n\n return sourceText;\n })\n ());\n }").call(e,t,o)};le().add("evaluate","x_ite/Browser/Scripting/evaluate",ce);const ue=ce,de=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Components/Core/X3DChildNode");var pe=o.n(de);const fe=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Components/Networking/X3DUrlObject");var ve=o.n(fe);const Se=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Base/X3DConstants");var _e=o.n(Se);function we(e){pe().call(this,e),ve().call(this,e),this.addType(_e().X3DScriptNode)}Object.assign(Object.setPrototypeOf(we.prototype,pe().prototype),ve().prototype,{initialize(){pe().prototype.initialize.call(this),ve().prototype.initialize.call(this)},dispose(){ve().prototype.dispose.call(this),pe().prototype.dispose.call(this)}}),Object.defineProperties(we,{typeName:{value:"X3DScriptNode",enumerable:!0},componentName:{value:"Scripting",enumerable:!0}});const ye=we;le().add("X3DScriptNode","x_ite/Components/Scripting/X3DScriptNode",ye);const Fe=ye,he=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/InputOutput/FileLoader");var me=o.n(he);const Xe=window[Symbol.for("X_ITE.X3D-8.12.0")].require("x_ite/Fields/SFNodeCache");var De=o.n(Xe),ge=o(355);function xe(e){Fe.call(this,e),this.addType(_e().Script)}Object.assign(Object.setPrototypeOf(xe.prototype,Fe.prototype),{initialize(){Fe.prototype.initialize.call(this),this.requestImmediateLoad().catch(Function.prototype)},getExtendedEventHandling:()=>!1,canUserDefinedFields:()=>!0,addUserDefinedField(e,t,o){Fe.prototype.addUserDefinedField.call(this,e,t,o),this.isInitialized()&&(this.setLoadState(_e().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},removeUserDefinedField(e){this.getUserDefinedFields().get(e)?.removeInterest("set_field__",this),Fe.prototype.removeUserDefinedField.call(this,e),this.isInitialized()&&(this.setLoadState(_e().NOT_STARTED_STATE),this.requestImmediateLoad().catch(Function.prototype))},getSourceText(){return this._url},unloadData(){this.initialize__("")},loadData(){new(me())(this).loadDocument(this._url,(e=>{null===e?this.setLoadState(_e().FAILED_STATE):(this.initialize__(ge.decodeText(e)),this.setLoadState(_e().COMPLETE_STATE))}))},createGlobalObject(){const e=this.getBrowser();function t(t){const o=e.createVrmlFromString(t);if(o.length&&o[0])return o[0];throw new Error("SFNode.new: invalid argument.")}t.prototype=v().SFNode.prototype;const o={NULL:{value:null},FALSE:{value:!1},TRUE:{value:!0},print:{value:e.println.bind(e)},trace:{value:e.println.bind(e)},Browser:{value:e},X3DConstants:{value:_e()},X3DBrowser:{value:_()},X3DExecutionContext:{value:k()},X3DScene:{value:$()},ComponentInfo:{value:y()},ComponentInfoArray:{value:h()},ProfileInfo:{value:X()},ProfileInfoArray:{value:g()},ConcreteNodesArray:{value:b()},AbstractNodesArray:{value:I()},UnitInfo:{value:M()},UnitInfoArray:{value:A()},NamedNodesArray:{value:q()},ImportedNodesArray:{value:P()},X3DImportedNode:{value:B()},ExportedNodesArray:{value:R()},X3DExportedNode:{value:z()},ExternProtoDeclarationArray:{value:J()},ProtoDeclarationArray:{value:K()},X3DExternProtoDeclaration:{value:Y()},X3DProtoDeclaration:{value:ee()},X3DProtoDeclarationNode:{value:oe()},RouteArray:{value:ie()},X3DRoute:{value:ae()},X3DBaseNode:{value:i()},X3DFieldDefinition:{value:a()},FieldDefinitionArray:{value:l()},X3DField:{value:u()},X3DArrayField:{value:p()},SFColor:{value:v().SFColor},SFColorRGBA:{value:v().SFColorRGBA},SFImage:{value:v().SFImage},SFMatrix3d:{value:v().SFMatrix3d},SFMatrix3f:{value:v().SFMatrix3f},SFMatrix4d:{value:v().SFMatrix4d},SFMatrix4f:{value:v().SFMatrix4f},SFNode:{value:t},SFRotation:{value:v().SFRotation},SFString:{value:v().SFString},SFVec2d:{value:v().SFVec2d},SFVec2f:{value:v().SFVec2f},SFVec3d:{value:v().SFVec3d},SFVec3f:{value:v().SFVec3f},SFVec4d:{value:v().SFVec4d},SFVec4f:{value:v().SFVec4f},VrmlMatrix:{value:v().VrmlMatrix},MFBool:{value:v().MFBool},MFColor:{value:v().MFColor},MFColorRGBA:{value:v().MFColorRGBA},MFDouble:{value:v().MFDouble},MFFloat:{value:v().MFFloat},MFImage:{value:v().MFImage},MFInt32:{value:v().MFInt32},MFMatrix3d:{value:v().MFMatrix3d},MFMatrix3f:{value:v().MFMatrix3f},MFMatrix4d:{value:v().MFMatrix4d},MFMatrix4f:{value:v().MFMatrix4f},MFNode:{value:v().MFNode},MFRotation:{value:v().MFRotation},MFString:{value:v().MFString},MFTime:{value:v().MFTime},MFVec2d:{value:v().MFVec2d},MFVec2f:{value:v().MFVec2f},MFVec3d:{value:v().MFVec3d},MFVec3f:{value:v().MFVec3f},MFVec4d:{value:v().MFVec4d},MFVec4f:{value:v().MFVec4f}};for(const e of this.getUserDefinedFields()){const t=e.getName();e.getAccessType()!==_e().inputOnly&&(t in o||(o[t]={get:e.valueOf.bind(e),set:e.setValue.bind(e)}),e.getAccessType()===_e().inputOutput&&(o[t+"_changed"]={get:e.valueOf.bind(e),set:e.setValue.bind(e)}))}return Object.create(Object.prototype,o)},createContext(e){try{const t=["initialize","prepareEvents","eventsProcessed","shutdown"];for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case _e().inputOnly:t.push(e.getName());break;case _e().inputOutput:t.push("set_"+e.getName())}e+=";\n["+t.map((e=>`typeof ${e} !== "undefined" ? ${e} : undefined`)).join(",")+"];";const o=this.evaluate(e),r=new Map;for(let e=0;e<t.length;++e)r.set(t[e],o[e]);return r}catch(e){return this.setError("while evaluating script source",e),new Map}},evaluate(e){const t=this.getBrowser();try{return t.getScriptStack().push(this),this.globalObject||(this.globalObject=this.createGlobalObject()),ue(De().get(this),this.globalObject,e)}finally{t.getScriptStack().pop()}},initialize__(e){this.disconnect();const t=this.getBrowser();this.globalObject=this.createGlobalObject(),this.context=this.createContext(e);const o=this.context.get("shutdown");"function"==typeof o&&ge(window).on("unload.Script"+this.getId(),this.call__.bind(this,o,"shutdown"));const r=this.context.get("prepareEvents");"function"==typeof r&&t.prepareEvents().addInterest("call__",this,r,"prepareEvents");const i=this.context.get("eventsProcessed");"function"==typeof i&&this.addInterest("call__",this,i,"eventsProcessed");for(const e of this.getUserDefinedFields())switch(e.getAccessType()){case _e().inputOnly:{const t=this.context.get(e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t);break}case _e().inputOutput:{const t=this.context.get("set_"+e.getName());"function"==typeof t&&e.addInterest("set_field__",this,t);break}}const n=this.context.get("initialize");"function"==typeof n&&this.call__(n,"initialize")},call__(e,t){const o=this.getBrowser();o.getScriptStack().push(this);try{e.call(De().get(this),o.getCurrentTime())}catch(e){this.setError(`in function '${t}'`,e)}o.getScriptStack().pop()},set_field__(e,t){const o=this.getBrowser();t.setTainted(!0),o.getScriptStack().push(this);try{e.call(De().get(this),t.valueOf(),o.getCurrentTime())}catch(e){this.setError("in function '"+t.getName()+"'",e)}o.getScriptStack().pop(),t.setTainted(!1)},setError(e,t){console.error("JavaScript Error in Script '"+this.getName()+"', "+e+"\nworld url is '"+this.getExecutionContext().getWorldURL()+"':"),console.error(t)},disconnect(){const e=this.context?.get("shutdown");"function"==typeof e&&this.call__(e,"shutdown"),ge(window).off(".Script"+this.getId()),this.getBrowser().prepareEvents().removeInterest("call__",this),this.removeInterest("call__",this);for(const e of this.getUserDefinedFields())e.removeInterest("set_field__",this)},dispose(){this.disconnect(),Fe.prototype.dispose.call(this)}}),Object.defineProperties(xe,{typeName:{value:"Script",enumerable:!0},componentName:{value:"Scripting",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["2.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(l())([new(a())(_e().inputOutput,"metadata",new(v().SFNode)),new(a())(_e().inputOutput,"description",new(v().SFString)),new(a())(_e().inputOutput,"load",new(v().SFBool)(!0)),new(a())(_e().inputOutput,"url",new(v().MFString)),new(a())(_e().inputOutput,"autoRefresh",new(v().SFTime)),new(a())(_e().inputOutput,"autoRefreshTimeLimit",new(v().SFTime)(3600)),new(a())(_e().initializeOnly,"directOutput",new(v().SFBool)),new(a())(_e().initializeOnly,"mustEvaluate",new(v().SFBool))]),enumerable:!0}});const be=xe;le().add("Script","x_ite/Components/Scripting/Script",be);const Ee=be;t().add({name:"Scripting",concreteNodes:[Ee],abstractNodes:[Fe]});const Ie=void 0;le().add("Scripting","assets/components/Scripting",Ie)})()})();
|