x_ite 8.9.0 → 8.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +3 -7
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +13 -13
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +19 -19
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +33 -33
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +129 -90
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +27 -27
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +24 -24
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +23 -23
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +18 -18
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +18 -18
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +37 -37
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +24 -24
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjector.js +14 -14
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +30 -30
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +18 -18
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +9 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +415 -130
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +2 -2
  47. package/docs/_posts/components/HAnim/HAnimDisplacer.md +1 -1
  48. package/docs/_posts/components/HAnim/HAnimHumanoid.md +75 -75
  49. package/docs/_posts/components/HAnim/HAnimJoint.md +2 -2
  50. package/docs/_posts/components/HAnim/HAnimMotion.md +22 -22
  51. package/docs/_posts/components/HAnim/HAnimSegment.md +1 -1
  52. package/docs/_posts/components/HAnim/HAnimSite.md +1 -1
  53. package/docs/_posts/getting-started.md +3 -7
  54. package/docs/laboratory/gltf-sample-viewer.html +52 -4
  55. package/package.json +2 -1
  56. package/src/standard/Math/Geometry/Box2.js +12 -2
  57. package/src/standard/Math/Geometry/Box3.js +12 -2
  58. package/src/x_ite/Base/X3DObjectArrayField.js +3 -2
  59. package/src/x_ite/Base/X3DTypedArrayField.js +3 -2
  60. package/src/x_ite/Browser/VERSION.js +1 -1
  61. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +105 -68
  62. package/src/x_ite/Components/HAnim/HAnimMotion.js +3 -3
  63. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +1 -1
  64. package/src/x_ite/Fields/ArrayFields.js +9 -7
  65. package/src/x_ite/Parser/GLTF2Parser.js +316 -55
  66. package/src/x_ite/Parser/SVGParser.js +1 -1
package/dist/x_ite.zip CHANGED
Binary file
package/docs/_config.yml CHANGED
@@ -20,8 +20,8 @@ timezone:
20
20
  # ↓ --------------------------
21
21
 
22
22
  title: X_ITE X3D Browser # the main title
23
- version: 8.9.0 # x_ite latest version
24
- size: 285 # size in kb
23
+ version: 8.9.2 # x_ite latest version
24
+ size: 286 # size in kb
25
25
  x3d_latest_version: 4.0 # x3d latest version
26
26
 
27
27
  tagline: Step Into The Future # it will display as the sub-title
@@ -101,7 +101,7 @@ The weigh factor has typical range [0,1] and defines the scale factor applied to
101
101
  - Allowed name suffixes include _feature, _action and _config.
102
102
  - Index values for HanimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
103
103
  - Requires X3D `profile='Full'` or else include `<component name='HAnim' level='1'/>`
104
- - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen)
104
+ - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen).
105
105
 
106
106
  ## See Also
107
107
 
@@ -37,6 +37,19 @@ Information about this node can be contained in a MetadataBoolean, MetadataDoubl
37
37
 
38
38
  - [X3D Architecture 7.2.4 Metadata](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/core.html#Metadata){:target="_blank"}
39
39
 
40
+ ### SFString [in, out] **version** ""
41
+
42
+ HAnimHumanoid *version*, where allowed value is 2.0 for final ISO 19774 *version* 2019.
43
+
44
+ #### Hint
45
+
46
+ - Default HAnimHumanoid *version* is 1.0 for X3D *version* 3, and HAnimHumanoid required *version* is 2.0 for X3D *version* 4.
47
+
48
+ #### Warnings
49
+
50
+ - No other values are allowed for strict validation.
51
+ - Prior developmental versions of HAnim nodes, such as *version* 1 of standardized ISO 19774 *version* 2006, might not validate correctly due to small changes in the contained-node content model, so conversion of such models is recommended.
52
+
40
53
  ### SFString [in, out] **description** ""
41
54
 
42
55
  Author-provided prose that describes intended purpose of this node.
@@ -60,19 +73,6 @@ Unique *name* attribute must be defined so that each HAnimHumanoid node in a sce
60
73
 
61
74
  - *name* field is not included if this instance is a USE node, in order to avoid potential mismatches.
62
75
 
63
- ### SFString [in, out] **version** ""
64
-
65
- HAnimHumanoid *version*, where allowed value is 2.0 for final ISO 19774 *version* 2019.
66
-
67
- #### Hint
68
-
69
- - Default HAnimHumanoid *version* is 1.0 for X3D *version* 3, and HAnimHumanoid required *version* is 2.0 for X3D *version* 4.
70
-
71
- #### Warnings
72
-
73
- - No other values are allowed for strict validation.
74
- - Prior developmental versions of HAnim nodes, such as *version* 1 of standardized ISO 19774 *version* 2006, might not validate correctly due to small changes in the contained-node content model, so conversion of such models is recommended.
75
-
76
76
  ### MFString [in, out] **info** [ ]
77
77
 
78
78
  Contains metadata keyword=value pairs, where approved keyword terms are humanoidVersion authorName authorEmail copyright creationDate usageRestrictions age gender height and weight.
@@ -110,63 +110,6 @@ Preliminary rotation of coordinate system before scaling (to allow scaling aroun
110
110
 
111
111
  Translation offset from origin of local coordinate system.
112
112
 
113
- ### MFVec3f [in, out] **jointBindingPositions** [ ] <small>(-∞,∞)</small>
114
-
115
- Specifies an array of position values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.
116
-
117
- #### Hint
118
-
119
- - If only one value is provided, it is provided to each Joint equivalently.
120
-
121
- #### Warning
122
-
123
- - Not used when skeletalConfiguration='BASIC'.
124
-
125
- ### MFRotation [in, out] **jointBindingRotations** [ ] <small>(-∞,∞) or [-1,1]</small>
126
-
127
- Specifies an array of rotation values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.
128
-
129
- #### Hint
130
-
131
- - If only one value is provided, it is provided to each Joint equivalently.
132
-
133
- #### Warning
134
-
135
- - Not used when skeletalConfiguration='BASIC'.
136
-
137
- ### MFVec3f [in, out] **jointBindingScales** [ ] <small>(-∞,∞)</small>
138
-
139
- Specifies an array of scale values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.
140
-
141
- #### Hint
142
-
143
- - If only one value is provided, it is provided to each Joint equivalently.
144
-
145
- #### Warning
146
-
147
- - Not used when skeletalConfiguration='BASIC'.
148
-
149
- ### MFBool [in, out] **motionsEnabled** [ ]
150
-
151
- Array of boolean values corresponding to HAnimMotion nodes indicating which can animate the HAnimHumanoid.
152
-
153
- ### SFInt32 [in, out] **loa** -1 <small>[-1,∞)</small>
154
-
155
- Level Of Articulation 0..4 indicates complexity and detail of joints for given humanoid skeletal hierarchy.
156
-
157
- #### Hints
158
-
159
- - *loa* value of -1 indicates that no LOA conformance is provided.
160
- - [Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8.4 Levels of articulation](https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#LevelsOfArticulation){:target="_blank"}
161
-
162
- ### SFString [in, out] **skeletalConfiguration** "BASIC"
163
-
164
- Models sharing a common skeletal configuration can share animations and binding poses.
165
-
166
- #### Hint
167
-
168
- - [A value of 'BASIC' conforms to restrictive skeletal model in X3D Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8 Modelling of humanoids](https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#ModellingOfHumanoids){:target="_blank"}
169
-
170
113
  ### SFBool [in, out] **visible** TRUE
171
114
 
172
115
  Whether or not renderable content within this node is visually displayed.
@@ -205,6 +148,23 @@ Bounding box center accompanies bboxSize and provides an optional hint for bound
205
148
  - [X3D Architecture, 10.2.2 Bounding boxes](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/grouping.html#BoundingBoxes){:target="_blank"}
206
149
  - [X3D Architecture, 10.3.1 X3DBoundedObject](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/grouping.html#X3DBoundedObject){:target="_blank"}
207
150
 
151
+ ### SFInt32 [in, out] **loa** -1 <small>[-1,∞)</small>
152
+
153
+ Level Of Articulation 0..4 indicates complexity and detail of joints for given humanoid skeletal hierarchy.
154
+
155
+ #### Hints
156
+
157
+ - *loa* value of -1 indicates that no LOA conformance is provided.
158
+ - [Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8.4 Levels of articulation](https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#LevelsOfArticulation){:target="_blank"}
159
+
160
+ ### SFString [in, out] **skeletalConfiguration** "BASIC"
161
+
162
+ Models sharing a common skeletal configuration can share animations and binding poses.
163
+
164
+ #### Hint
165
+
166
+ - [A value of 'BASIC' conforms to restrictive skeletal model in X3D Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8 Modelling of humanoids](https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#ModellingOfHumanoids){:target="_blank"}
167
+
208
168
  ### MFNode [in, out] **skeleton** [ ] <small>[HAnimJoint, HAnimSite]</small>
209
169
 
210
170
  List of top-level HAnimJoint and HAnimSite nodes that create the *skeleton* model. The *skeleton* field contains the humanoid_root Joint object, and thus the entire hierarchy of HAnimJoint/HAnimSegment nodes making up the articulated *skeleton* model.
@@ -260,6 +220,50 @@ The *segments* field contains a list of USE references for all HAnimSegment node
260
220
  - The number of contained `<HAnimSegment USE='*' containerField='segments'/>` nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimSegment node instances found within the preceding skeleton hierarchy.
261
221
  - Top-level HAnimSegment USE nodes must include `containerField='segments'` for proper validation and operation.
262
222
 
223
+ ### MFBool [in, out] **motionsEnabled** [ ]
224
+
225
+ Array of boolean values corresponding to HAnimMotion nodes indicating which can animate the HAnimHumanoid.
226
+
227
+ ### MFNode [in, out] **motions** [ ] <small>[HAnimMotion]</small>
228
+
229
+ Contains any HAnimMotion nodes that can animate the HAnimHumanoid.
230
+
231
+ ### MFVec3f [in, out] **jointBindingPositions** [ ] <small>(-∞,∞)</small>
232
+
233
+ Specifies an array of position values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.
234
+
235
+ #### Hint
236
+
237
+ - If only one value is provided, it is provided to each Joint equivalently.
238
+
239
+ #### Warning
240
+
241
+ - Not used when skeletalConfiguration='BASIC'.
242
+
243
+ ### MFRotation [in, out] **jointBindingRotations** [ ] <small>(-∞,∞) or [-1,1]</small>
244
+
245
+ Specifies an array of rotation values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.
246
+
247
+ #### Hint
248
+
249
+ - If only one value is provided, it is provided to each Joint equivalently.
250
+
251
+ #### Warning
252
+
253
+ - Not used when skeletalConfiguration='BASIC'.
254
+
255
+ ### MFVec3f [in, out] **jointBindingScales** [ ] <small>(-∞,∞)</small>
256
+
257
+ Specifies an array of scale values for each HAnimJoint node in the joints field, in order, corresponding to each binding pose.
258
+
259
+ #### Hint
260
+
261
+ - If only one value is provided, it is provided to each Joint equivalently.
262
+
263
+ #### Warning
264
+
265
+ - Not used when skeletalConfiguration='BASIC'.
266
+
263
267
  ### MFNode [in, out] **joints** [ ] <small>[HAnimJoint]</small>
264
268
 
265
269
  The *joints* field contains a list of USE references for all HAnimJoint node instances found within the preceding skeleton hierarchy.
@@ -274,10 +278,6 @@ The *joints* field contains a list of USE references for all HAnimJoint node ins
274
278
  - The number of contained `<HAnimJoint USE='*' containerField='joints'/>` nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimJoint node instances found within the preceding skeleton hierarchy.
275
279
  - Top-level HAnimJoint USE nodes must include `containerField='joints'` for proper validation and operation.
276
280
 
277
- ### MFNode [in, out] **motions** [ ] <small>[HAnimMotion]</small>
278
-
279
- Contains any HAnimMotion nodes that can animate the HAnimHumanoid.
280
-
281
281
  ### SFNode [in, out] **skinBindingNormal** NULL <small>[X3DNormalNode]</small>
282
282
 
283
283
  Input/Output field *skinBindingNormal*.
@@ -295,7 +295,7 @@ Single Normal node utilized by indexed mesh definitions for skin. The *skinNorma
295
295
  - Index values for HanimHumanoid skin IndexedFaceSet, skinCoord and *skinNormal* nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
296
296
  - Top-level Normal node must include `containerField='skinNormal'` for proper validation and operation.
297
297
  - (X3D version 4.0 draft) requires X3D `profile='Full'` or else include `<component name='HAnim' level='2'/>`
298
- - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen)
298
+ - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen).
299
299
 
300
300
  ### SFNode [in, out] **skinCoord** NULL <small>[X3DCoordinateNode]</small>
301
301
 
@@ -247,8 +247,8 @@ Grouping nodes contain an ordered list of *children* nodes.
247
247
  - HAnimJoint can only contain certain nodes: HAnimJoint, HAnimSegment, HAnimSite (with `containerField='children')` and also HAnimDisplacer nodes (with `containerField='displacers').`
248
248
  - An HAnimJoint may not be a child of an HAnimSegment.
249
249
  - Requires X3D `profile='Full'` or else include `<component name='HAnim' level='1'/>`
250
- - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen)
251
- - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen)
250
+ - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen).
251
+ - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen).
252
252
  - The number of contained \<HAnimJoint USE='*' `containerField='joints'/>` nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimJoint node instances found within the preceding skeleton hierarchy.
253
253
 
254
254
  ## See Also
@@ -13,7 +13,7 @@ tags: [HAnimMotion, HAnim]
13
13
 
14
14
  ## Overview
15
15
 
16
- An HAnimMotion node supports discrete frame-by-frame playback for H-Anim motion data animation. Design characteristics include integration with HAnim figure data and HAnimJoint nodes, animation control, and playback of raw motion data.
16
+ An HAnimMotion node supports discrete frame-by-frame playback for HAnim motion data animation. Design characteristics include integration with HAnim figure data and HAnimJoint nodes, animation control, and playback of raw motion data.
17
17
 
18
18
  The HAnimMotion node belongs to the **HAnim** component and its default container field is *children.* It is available from X3D version 4.0 or higher.
19
19
 
@@ -71,6 +71,22 @@ Send *previous* output value in keyValue array, and reset internal fraction fiel
71
71
 
72
72
  - It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.
73
73
 
74
+ ### SFInt32 [in, out] **startFrame** 0 <small>[0,∞)</small>
75
+
76
+ *startFrame* indicates initial index of animated frame. Note that *startFrame* can precede, equal or follow endFrame.
77
+
78
+ #### Hint
79
+
80
+ - *startFrame* starts at 0 and is no greater than (frameCount - 1).
81
+
82
+ ### SFInt32 [in, out] **endFrame** 0 <small>[0,∞)</small>
83
+
84
+ *endFrame* indicates final index of animated frame. Note that *endFrame* can precede, equal or follow *endFrame*. The default *endFrame* value is reset to (frameCount - 1) whenever frameCount is changed.
85
+
86
+ #### Hint
87
+
88
+ - *endFrame* starts at 0 and is no greater than (frameCount - 1).
89
+
74
90
  ### SFTime [in, out] **frameDuration** 0.1 <small>(0,∞)</small>
75
91
 
76
92
  *frameDuration* specifies the duration of each frame in seconds.
@@ -95,6 +111,10 @@ Send *previous* output value in keyValue array, and reset internal fraction fiel
95
111
 
96
112
  Repeat indefinitely when *loop*=true, repeat only once when *loop*=false.
97
113
 
114
+ ### MFBool [in, out] **channelsEnabled** [ ]
115
+
116
+ Boolean values for each channel indicating whether enabled.
117
+
98
118
  ### SFString [in, out] **channels** ""
99
119
 
100
120
  List of number of *channels* for transformation, followed by transformation type of each channel of data. Each value is space or comma separated.
@@ -103,10 +123,6 @@ List of number of *channels* for transformation, followed by transformation type
103
123
 
104
124
  - *channels* are enabled by default, unless otherwise indicated by channelsEnabled field.
105
125
 
106
- ### MFBool [in, out] **channelsEnabled** [ ]
107
-
108
- Boolean values for each channel indicating whether enabled.
109
-
110
126
  ### SFString [in, out] **joints** ""
111
127
 
112
128
  *joints* field lists names of *joints* that raw motion data is to be applied to. The number and order of the names in the *joints* field shall match the number and order of the channels field information, and the number and order of the sets of values in the values field for each frame of the animation.
@@ -125,22 +141,6 @@ Level Of Articulation 0..4 indicates complexity and detail of joints for given h
125
141
  - *loa* value of -1 indicates that no LOA conformance is provided.
126
142
  - [Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8.4 Levels of articulation](https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#LevelsOfArticulation){:target="_blank"}
127
143
 
128
- ### SFInt32 [in, out] **startFrame** 0 <small>[0,∞)</small>
129
-
130
- *startFrame* indicates initial index of animated frame. Note that *startFrame* can precede, equal or follow endFrame.
131
-
132
- #### Hint
133
-
134
- - *startFrame* starts at 0 and is no greater than (frameCount - 1).
135
-
136
- ### SFInt32 [in, out] **endFrame** 0 <small>[0,∞)</small>
137
-
138
- *endFrame* indicates final index of animated frame. Note that *endFrame* can precede, equal or follow *endFrame*. The default *endFrame* value is reset to (frameCount - 1) whenever frameCount is changed.
139
-
140
- #### Hint
141
-
142
- - *endFrame* starts at 0 and is no greater than (frameCount - 1).
143
-
144
144
  ### MFFloat [in, out] **values** [ ] <small>(-∞,∞)</small>
145
145
 
146
146
  *values* field contains all transformation *values*, ordered first by frame, then by joint, and then by transformation Sets of floats in the *values* array matching the order listed in joints and channels fields.
@@ -171,7 +171,7 @@ Level Of Articulation 0..4 indicates complexity and detail of joints for given h
171
171
 
172
172
  ### SFInt32 [out] **frameCount**
173
173
 
174
- Output field *frameCount*.
174
+ *frameCount* is computed at run time and indicates the total number of frames present in the animation, equaling the number of sets of channel data rows present in the values array.
175
175
 
176
176
  ## Advisories
177
177
 
@@ -164,7 +164,7 @@ Grouping nodes contain an ordered list of *children* nodes.
164
164
  ### Warnings
165
165
 
166
166
  - Requires X3D `profile='Full'` or else include `<component name='HAnim' level='1'/>`
167
- - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen)
167
+ - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen).
168
168
  - The number of contained \<HAnimSegment USE='*' `containerField='segments'/>` nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimJoint node instances found within the preceding skeleton hierarchy.
169
169
 
170
170
  ## See Also
@@ -168,7 +168,7 @@ Grouping nodes contain an ordered list of *children* nodes.
168
168
 
169
169
  - Ensure that visible HAnimSite locations are not inadvertently obscured by skin animation.
170
170
  - Requires X3D `profile='Full'` or else include `<component name='HAnim' level='1'/>`
171
- - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen)
171
+ - For X3D3 HAnim1, spelling of component name is 'H-Anim' (including hyphen).
172
172
  - The number of contained \<HAnimSite USE='*' `containerField='sites,` skeleton or viewpoints'/\> nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimSite node instances found within the preceding skeleton hierarchy.
173
173
 
174
174
  ## See Also
@@ -589,17 +589,13 @@ If you are in production and everything is working well, then use a fixed versio
589
589
  $ npm install x_ite
590
590
  ```
591
591
 
592
- It can be used in [Electron](https://www.electronjs.org){:target="_blank"} apps in a preload script of the **renderer process** in a way like this:
592
+ It can be used in [Electron](https://www.electronjs.org){:target="_blank"} apps in the **renderer process** in a way like this:
593
593
 
594
594
  ```js
595
- window .addEventListener ("DOMContentLoaded", () =>
596
- {
597
- const X3D = require ("x_ite")
598
- ...
599
- })
595
+ const X3D = require ("x_ite")
600
596
  ```
601
597
 
602
- Make sure that contextIsolation is set to **false** when creating a BrowserWindow instance.
598
+ Make sure that `contextIsolation` is set to `false` when creating a BrowserWindow instance.
603
599
 
604
600
  ## Embedding X_ITE within a Web Page
605
601
 
@@ -42,6 +42,7 @@ tags: [glTF, Sample, Viewer]
42
42
  }
43
43
 
44
44
  .viewer-column1 {
45
+ position: relative;
45
46
  flex: 80%;
46
47
  width: 80%;
47
48
  height: 100%;
@@ -66,6 +67,21 @@ tags: [glTF, Sample, Viewer]
66
67
  height: 100%;
67
68
  aspect-ratio: unset;
68
69
  }
70
+
71
+ #animations {
72
+ display: none;
73
+ position: absolute;
74
+ right: 0;
75
+ bottom: 5px;
76
+ min-width: 200px;
77
+ padding: 10px 20px;
78
+ background-color: var(--body-bg);
79
+ border-bottom: 5px solid var(--text-color);
80
+ }
81
+
82
+ #animations label {
83
+ margin: 0;
84
+ }
69
85
  </style>
70
86
 
71
87
  <div class="viewer-row">
@@ -84,6 +100,7 @@ tags: [glTF, Sample, Viewer]
84
100
  </Scene>
85
101
  </X3D>
86
102
  </x3d-canvas>
103
+ <div id="animations"></div>
87
104
  </div>
88
105
  <div class="viewer-column2"></div>
89
106
  </div>
@@ -357,6 +374,8 @@ async function loadURL (filename, server, event)
357
374
  {
358
375
  event .preventDefault ();
359
376
 
377
+ $("#animations") .hide ();
378
+
360
379
  const Browser = X3D .getBrowser ();
361
380
 
362
381
  await Browser .loadURL (new X3D .MFString (server + filename));
@@ -365,13 +384,42 @@ async function loadURL (filename, server, event)
365
384
  {
366
385
  const animations = Browser .currentScene .getExportedNode ("Animations");
367
386
 
368
- for (const group of animations .children)
387
+ $("#animations") .empty ();
388
+ $("<b></b>") .text ("Animations") .appendTo ($("#animations"));
389
+ $("<br>") .appendTo ($("#animations"));
390
+
391
+ for (const [i, group] of animations .children .entries ())
369
392
  {
370
- group .children [0] .loop = true;
371
- group .children [0] .startTime = Date .now () / 1000;
393
+ const timeSensor = group .children [0];
394
+
395
+ timeSensor .loop = true;
396
+ timeSensor .stopTime = Date .now () / 1000;
397
+
398
+ $("<input></input>")
399
+ .attr ("id", "animation" + i)
400
+ .attr ("type", "checkbox")
401
+ .on ("change", event =>
402
+ {
403
+ if ($(event .target) .is (":checked"))
404
+ timeSensor .startTime = Date .now () / 1000;
405
+ else
406
+ timeSensor .stopTime = Date .now () / 1000;
407
+ })
408
+ .appendTo ($("#animations"));
409
+
410
+ $(document .createTextNode (" ")) .appendTo ($("#animations"));
411
+
412
+ $("<label></label>")
413
+ .attr ("for", "animation" + i)
414
+ .text (group .children [0] .description)
415
+ .appendTo ($("#animations"));
416
+
417
+ $("<br>") .appendTo ($("#animations"));
372
418
  }
419
+
420
+ $("#animations") .show ();
373
421
  }
374
- catch (error)
422
+ catch
375
423
  { }
376
424
 
377
425
  if (!Browser .getActiveViewpoint () ._description .getValue ())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "8.9.0",
3
+ "version": "8.9.2",
4
4
  "description": "X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.",
5
5
  "homepage": "https://create3000.github.io/x_ite/",
6
6
  "author": "Holger Seelig <holger.seelig@gmail.com>",
@@ -23,6 +23,7 @@
23
23
  "JavaScript",
24
24
  "JSON",
25
25
  "Node",
26
+ "PLY",
26
27
  "STL",
27
28
  "SVG",
28
29
  "VRML",
@@ -209,9 +209,19 @@ Object .assign (Box2,
209
209
  {
210
210
  return new Box2 () .setExtents (min, max);
211
211
  },
212
- Points (... points)
212
+ Points (points)
213
213
  {
214
- return new Box2 () .setExtents (points [0] .copy () .min (... points), points [0] .copy () .max (... points));
214
+ const
215
+ min = new Vector2 (Number .POSITIVE_INFINITY, Number .POSITIVE_INFINITY),
216
+ max = new Vector2 (Number .NEGATIVE_INFINITY, Number .NEGATIVE_INFINITY);
217
+
218
+ for (const point of points)
219
+ {
220
+ min .min (point);
221
+ max .max (point);
222
+ }
223
+
224
+ return new Box2 () .setExtents (min, max);
215
225
  },
216
226
  });
217
227
 
@@ -617,9 +617,19 @@ Object .assign (Box3,
617
617
  {
618
618
  return new Box3 () .setExtents (min, max);
619
619
  },
620
- Points (... points)
620
+ Points (points)
621
621
  {
622
- return new Box3 () .setExtents (points [0] .copy () .min (... points), points [0] .copy () .max (... points));
622
+ const
623
+ min = new Vector3 (Number .POSITIVE_INFINITY, Number .POSITIVE_INFINITY, Number .POSITIVE_INFINITY),
624
+ max = new Vector3 (Number .NEGATIVE_INFINITY, Number .NEGATIVE_INFINITY, Number .NEGATIVE_INFINITY);
625
+
626
+ for (const point of points)
627
+ {
628
+ min .min (point);
629
+ max .max (point);
630
+ }
631
+
632
+ return new Box3 () .setExtents (min, max);
623
633
  },
624
634
  });
625
635
 
@@ -124,7 +124,7 @@ const handler =
124
124
  },
125
125
  };
126
126
 
127
- function X3DObjectArrayField (value)
127
+ function X3DObjectArrayField (values)
128
128
  {
129
129
  const proxy = new Proxy (this, handler);
130
130
 
@@ -133,7 +133,8 @@ function X3DObjectArrayField (value)
133
133
  this [_target] = this;
134
134
  this [_proxy] = proxy;
135
135
 
136
- this .push (... value);
136
+ for (const value of values)
137
+ this .push (value);
137
138
 
138
139
  return proxy;
139
140
  }
@@ -164,7 +164,7 @@ const handler =
164
164
  },
165
165
  };
166
166
 
167
- function X3DTypedArrayField (args)
167
+ function X3DTypedArrayField (values)
168
168
  {
169
169
  const proxy = new Proxy (this, handler);
170
170
 
@@ -179,7 +179,8 @@ function X3DTypedArrayField (args)
179
179
  this [_tmp] = [ ]; // Array with components size.
180
180
  }
181
181
 
182
- this .push (... args);
182
+ for (const value of values)
183
+ this .push (value);
183
184
 
184
185
  return proxy;
185
186
  }
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.9.0";
48
+ export default "8.9.2";