x_ite 8.3.2 → 8.4.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.
Files changed (117) hide show
  1. package/.github/workflows/pages-deploy.yml +1 -1
  2. package/.vscode/settings.json +2 -1
  3. package/dist/LICENSE.md +4 -4
  4. package/dist/assets/components/Annotation.js +13 -13
  5. package/dist/assets/components/Annotation.min.js +1 -1
  6. package/dist/assets/components/CADGeometry.js +13 -13
  7. package/dist/assets/components/CADGeometry.min.js +1 -1
  8. package/dist/assets/components/CubeMapTexturing.js +25 -25
  9. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  10. package/dist/assets/components/DIS.js +13 -13
  11. package/dist/assets/components/DIS.min.js +1 -1
  12. package/dist/assets/components/EventUtilities.js +9 -9
  13. package/dist/assets/components/EventUtilities.min.js +1 -1
  14. package/dist/assets/components/Geometry2D.js +19 -19
  15. package/dist/assets/components/Geometry2D.min.js +1 -1
  16. package/dist/assets/components/Geospatial.js +33 -33
  17. package/dist/assets/components/Geospatial.min.js +1 -1
  18. package/dist/assets/components/HAnim.js +64 -75
  19. package/dist/assets/components/HAnim.min.js +1 -1
  20. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  21. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  22. package/dist/assets/components/Layout.js +27 -27
  23. package/dist/assets/components/Layout.min.js +1 -1
  24. package/dist/assets/components/NURBS.js +24 -24
  25. package/dist/assets/components/NURBS.min.js +1 -1
  26. package/dist/assets/components/ParticleSystems.js +23 -23
  27. package/dist/assets/components/ParticleSystems.min.js +1 -1
  28. package/dist/assets/components/Picking.js +19 -19
  29. package/dist/assets/components/Picking.min.js +1 -1
  30. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  31. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  32. package/dist/assets/components/Scripting.js +28 -28
  33. package/dist/assets/components/Scripting.min.js +1 -1
  34. package/dist/assets/components/Text.js +24 -24
  35. package/dist/assets/components/Text.min.js +1 -1
  36. package/dist/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +39 -39
  37. package/dist/assets/components/TextureProjector.min.js +1 -0
  38. package/dist/assets/components/Texturing3D.js +27 -27
  39. package/dist/assets/components/Texturing3D.min.js +1 -1
  40. package/dist/assets/components/VolumeRendering.js +19 -19
  41. package/dist/assets/components/VolumeRendering.min.js +1 -1
  42. package/dist/assets/components/X_ITE.js +9 -9
  43. package/dist/assets/components/X_ITE.min.js +1 -1
  44. package/dist/x_ite.css +1 -1
  45. package/dist/x_ite.js +3986 -1366
  46. package/dist/x_ite.min.js +1 -1
  47. package/dist/x_ite.zip +0 -0
  48. package/docs/Gemfile +1 -4
  49. package/docs/_config.yml +3 -3
  50. package/docs/_posts/getting-started.md +147 -441
  51. package/docs/_posts/reference/field-services-and-objects.md +24 -4
  52. package/docs/_posts/reference/prototype-services.md +24 -4
  53. package/docs/_posts/reference/scene-services.md +18 -2
  54. package/docs/_posts/what's-new.md +32 -4
  55. package/docs/_tabs/playground.html +36 -40
  56. package/docs/assets/css/style.scss +18 -0
  57. package/package.json +1 -1
  58. package/src/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +5 -5
  59. package/src/examples.js +1 -1
  60. package/src/tests.js +5 -5
  61. package/src/x_ite/Base/X3DInfoArray.js +45 -19
  62. package/src/x_ite/Base/X3DObject.js +29 -20
  63. package/src/x_ite/Base/X3DObjectArrayField.js +71 -26
  64. package/src/x_ite/Base/X3DTypedArrayField.js +108 -32
  65. package/src/x_ite/Browser/DOMIntegration.js +4 -3
  66. package/src/x_ite/Browser/VERSION.js +1 -1
  67. package/src/x_ite/Browser/X3DBrowser.js +43 -28
  68. package/src/x_ite/Components/Core/X3DNode.js +682 -210
  69. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +484 -100
  70. package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +18 -43
  71. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +27 -26
  72. package/src/x_ite/Components/HAnim/HAnimJoint.js +19 -31
  73. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +6 -3
  74. package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +14 -1
  75. package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +0 -1
  76. package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjector.js +1 -1
  77. package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjectorParallel.js +1 -1
  78. package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/X3DTextureProjectorNode.js +0 -0
  79. package/src/x_ite/Components/Time/TimeSensor.js +5 -0
  80. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +1 -0
  81. package/src/x_ite/Configuration/ComponentInfo.js +51 -22
  82. package/src/x_ite/Configuration/ProfileInfo.js +10 -6
  83. package/src/x_ite/Configuration/SupportedComponents.js +22 -20
  84. package/src/x_ite/Configuration/SupportedProfiles.js +1 -1
  85. package/src/x_ite/Configuration/UnitInfo.js +69 -26
  86. package/src/x_ite/Execution/X3DExecutionContext.js +78 -55
  87. package/src/x_ite/Execution/X3DExportedNode.js +75 -28
  88. package/src/x_ite/Execution/X3DImportedNode.js +227 -67
  89. package/src/x_ite/Execution/X3DScene.js +437 -117
  90. package/src/x_ite/Fields/ArrayFields.js +105 -55
  91. package/src/x_ite/Fields/SFBool.js +14 -6
  92. package/src/x_ite/Fields/SFColor.js +35 -12
  93. package/src/x_ite/Fields/SFColorRGBA.js +2 -0
  94. package/src/x_ite/Fields/SFDouble.js +17 -10
  95. package/src/x_ite/Fields/SFFloat.js +17 -10
  96. package/src/x_ite/Fields/SFImage.js +93 -8
  97. package/src/x_ite/Fields/SFInt32.js +14 -6
  98. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +38 -13
  99. package/src/x_ite/Fields/SFNode.js +59 -21
  100. package/src/x_ite/Fields/SFRotation.js +38 -13
  101. package/src/x_ite/Fields/SFString.js +14 -7
  102. package/src/x_ite/Fields/SFTime.js +14 -6
  103. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +39 -13
  104. package/src/x_ite/InputOutput/FileLoader.js +1 -1
  105. package/src/x_ite/InputOutput/Generator.js +178 -17
  106. package/src/x_ite/Parser/JSONParser.js +1 -1
  107. package/src/x_ite/Parser/VRMLParser.js +24 -27
  108. package/src/x_ite/Parser/X3DParser.js +0 -4
  109. package/src/x_ite/Parser/XMLParser.js +2 -2
  110. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +182 -64
  111. package/src/x_ite/Prototype/X3DProtoDeclaration.js +314 -93
  112. package/src/x_ite/Rendering/X3DRenderObject.js +6 -1
  113. package/src/x_ite/Routing/X3DRoute.js +104 -40
  114. package/src/x_ite.html +1 -1
  115. package/x_ite.min.html +1 -1
  116. package/dist/assets/components/ProjectiveTextureMapping.min.js +0 -1
  117. package/docs/Gemfile.lock +0 -116
@@ -48,7 +48,6 @@
48
48
  import X3DObject from "../Base/X3DObject.js";
49
49
  import X3DConstants from "../Base/X3DConstants.js";
50
50
  import SFNodeCache from "../Fields/SFNodeCache.js";
51
- import Generator from "../InputOutput/Generator.js";
52
51
 
53
52
  const
54
53
  _executionContext = Symbol (),
@@ -112,68 +111,133 @@ X3DRoute .prototype = Object .assign (Object .create (X3DObject .prototype),
112
111
  this [_sourceField] .removeOutputRoute (this);
113
112
  this [_destinationField] .removeInputRoute (this);
114
113
  },
115
- toVRMLStream: function (stream)
114
+ toVRMLStream: function (generator)
116
115
  {
117
116
  const
118
- generator = Generator .Get (stream),
119
117
  sourceNodeName = generator .LocalName (this [_sourceNode]),
120
118
  destinationNodeName = generator .LocalName (this [_destinationNode]);
121
119
 
122
- stream .string += generator .Indent ();
123
- stream .string += "ROUTE";
124
- stream .string += " ";
125
- stream .string += sourceNodeName;
126
- stream .string += ".";
127
- stream .string += this [_sourceField] .getName ();
120
+ generator .string += generator .Indent ();
121
+ generator .string += "ROUTE";
122
+ generator .string += generator .Space ();
123
+ generator .string += sourceNodeName;
124
+ generator .string += ".";
125
+ generator .string += this [_sourceField] .getName ();
128
126
 
129
127
  if (this [_sourceField] .getAccessType () === X3DConstants .inputOutput)
130
- stream .string += "_changed";
128
+ generator .string += "_changed";
131
129
 
132
- stream .string += " ";
133
- stream .string += "TO";
134
- stream .string += " ";
135
- stream .string += destinationNodeName;
136
- stream .string += ".";
130
+ generator .string += generator .Space ();
131
+ generator .string += "TO";
132
+ generator .string += generator .Space ();
133
+ generator .string += destinationNodeName;
134
+ generator .string += ".";
137
135
 
138
136
  if (this [_destinationField] .getAccessType () === X3DConstants .inputOutput)
139
- stream .string += "set_";
137
+ generator .string += "set_";
140
138
 
141
- stream .string += this [_destinationField] .getName ();
139
+ generator .string += this [_destinationField] .getName ();
142
140
  },
143
- toXMLStream: function (stream)
141
+ toXMLStream: function (generator)
144
142
  {
145
143
  const
146
- generator = Generator .Get (stream),
147
144
  sourceNodeName = generator .LocalName (this [_sourceNode]),
148
145
  destinationNodeName = generator .LocalName (this [_destinationNode]);
149
146
 
150
- stream .string += generator .Indent ();
151
- stream .string += "<ROUTE";
152
- stream .string += " ";
153
- stream .string += "fromNode='";
154
- stream .string += generator .XMLEncode (sourceNodeName);
155
- stream .string += "'";
156
- stream .string += " ";
157
- stream .string += "fromField='";
158
- stream .string += generator .XMLEncode (this [_sourceField] .getName ());
147
+ generator .string += generator .Indent ();
148
+ generator .string += "<ROUTE";
149
+ generator .string += generator .Space ();
150
+ generator .string += "fromNode='";
151
+ generator .string += generator .XMLEncode (sourceNodeName);
152
+ generator .string += "'";
153
+ generator .string += generator .Space ();
154
+ generator .string += "fromField='";
155
+ generator .string += generator .XMLEncode (this [_sourceField] .getName ());
159
156
 
160
157
  if (this [_sourceField] .getAccessType () === X3DConstants .inputOutput)
161
- stream .string += "_changed";
158
+ generator .string += "_changed";
162
159
 
163
- stream .string += "'";
164
- stream .string += " ";
165
- stream .string += "toNode='";
166
- stream .string += generator .XMLEncode (destinationNodeName);
167
- stream .string += "'";
168
- stream .string += " ";
169
- stream .string += "toField='";
160
+ generator .string += "'";
161
+ generator .string += generator .Space ();
162
+ generator .string += "toNode='";
163
+ generator .string += generator .XMLEncode (destinationNodeName);
164
+ generator .string += "'";
165
+ generator .string += generator .Space ();
166
+ generator .string += "toField='";
170
167
 
171
168
  if (this [_destinationField] .getAccessType () === X3DConstants .inputOutput)
172
- stream .string += "set_";
169
+ generator .string += "set_";
173
170
 
174
- stream .string += generator .XMLEncode (this [_destinationField] .getName ());
175
- stream .string += "'";
176
- stream .string += "/>";
171
+ generator .string += generator .XMLEncode (this [_destinationField] .getName ());
172
+ generator .string += "'";
173
+ generator .string += "/>";
174
+ },
175
+ toJSONStream: function (generator)
176
+ {
177
+ const
178
+ sourceNodeName = generator .LocalName (this [_sourceNode]),
179
+ destinationNodeName = generator .LocalName (this [_destinationNode]);
180
+
181
+ generator .string += generator .Indent ();
182
+ generator .string += '{';
183
+ generator .string += generator .TidySpace ();
184
+ generator .string += '"';
185
+ generator .string += "ROUTE";
186
+ generator .string += '"';
187
+ generator .string += ':';
188
+ generator .string += generator .TidyBreak ();
189
+ generator .string += generator .IncIndent ();
190
+ generator .string += generator .Indent ();
191
+ generator .string += '{';
192
+ generator .string += generator .TidyBreak ();
193
+ generator .string += generator .IncIndent ();
194
+
195
+ generator .string += generator .Indent ();
196
+ generator .string += '"';
197
+ generator .string += "@fromNode";
198
+ generator .string += '"';
199
+ generator .string += ':';
200
+ generator .string += generator .TidySpace ();
201
+ generator .string += generator .JSONEncode (sourceNodeName);
202
+ generator .string += ',';
203
+ generator .string += generator .TidyBreak ();
204
+
205
+ generator .string += generator .Indent ();
206
+ generator .string += '"';
207
+ generator .string += "@fromField";
208
+ generator .string += '"';
209
+ generator .string += ':';
210
+ generator .string += generator .TidySpace ();
211
+ generator .string += generator .JSONEncode (this [_sourceField] .getName ());
212
+ generator .string += ',';
213
+ generator .string += generator .TidyBreak ();
214
+
215
+ generator .string += generator .Indent ();
216
+ generator .string += '"';
217
+ generator .string += "@toNode";
218
+ generator .string += '"';
219
+ generator .string += ':';
220
+ generator .string += generator .TidySpace ();
221
+ generator .string += generator .JSONEncode (destinationNodeName);
222
+ generator .string += ',';
223
+ generator .string += generator .TidyBreak ();
224
+
225
+ generator .string += generator .Indent ();
226
+ generator .string += '"';
227
+ generator .string += "@toField";
228
+ generator .string += '"';
229
+ generator .string += ':';
230
+ generator .string += generator .TidySpace ();
231
+ generator .string += generator .JSONEncode (this [_destinationField] .getName ());
232
+ generator .string += generator .TidyBreak ();
233
+
234
+ generator .string += generator .DecIndent ();
235
+ generator .string += generator .Indent ();
236
+ generator .string += '}';
237
+ generator .string += generator .TidyBreak ();
238
+ generator .string += generator .DecIndent ();
239
+ generator .string += generator .Indent ();
240
+ generator .string += '}';
177
241
  },
178
242
  dispose: function ()
179
243
  {
package/src/x_ite.html CHANGED
@@ -396,7 +396,7 @@ main.color-management .browser {
396
396
  </div>
397
397
  </div>
398
398
  </main>
399
- <footer><div class="console"></div></footer>
399
+ <footer><div class="console x_ite-console"></div></footer>
400
400
  </div>
401
401
  </body>
402
402
  </html>
package/x_ite.min.html CHANGED
@@ -378,7 +378,7 @@ main.color-management .browser {
378
378
  </div>
379
379
  </div>
380
380
  </main>
381
- <footer><div class="console"></div></footer>
381
+ <footer><div class="console x_ite-console"></div></footer>
382
382
  </div>
383
383
  </body>
384
384
  </html>
@@ -1 +0,0 @@
1
- /* X_ITE v8.3.2 */(()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Components");var i=t.n(e);const r=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Fields");var o=t.n(r);const n=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Base/X3DFieldDefinition");var s=t.n(n);const a=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Base/FieldDefinitionArray");var u=t.n(a);const c=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Components/Core/X3DChildNode");var h=t.n(c);const l=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Base/X3DConstants");var x=t.n(l);const p=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Base/X3DCast");var g=t.n(p);const d=window[Symbol.for("X_ITE.X3D-8.3.2")].require("standard/Math/Numbers/Vector3");var w=t.n(d);const m=window[Symbol.for("X_ITE.X3D-8.3.2")].require("standard/Math/Numbers/Rotation4");var f=t.n(m);const _=window[Symbol.for("X_ITE.X3D-8.3.2")].require("standard/Math/Numbers/Matrix4");var T=t.n(_);const M=window[Symbol.for("X_ITE.X3D-8.3.2")].require("x_ite/Namespace");var j,v,y,V,S,b=t.n(M);function X(t){h().call(this,t),this.addType(x().X3DTextureProjectorNode),this._location.setUnit("length"),this._farDistance.setUnit("length"),this._location.setUnit("length")}X.prototype=Object.assign(Object.create(h().prototype),{constructor:X,initialize:function(){h().prototype.initialize.call(this),this._on.addInterest("set_on__",this),this._texture.addInterest("set_texture__",this),this.set_texture__()},getGlobal:function(){return this._global.getValue()},getLocation:function(){return this._location.getValue()},getDirection:function(){return this._direction.getValue()},getNearDistance:function(){return this._nearDistance.getValue()},getFarDistance:function(){return this._farDistance.getValue()},getTexture:function(){return this.textureNode},getBiasMatrix:(S=new(T())(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),function(){return S}),straightenHorizon:(j=new(w())(0,0,0),v=new(w())(0,0,0),y=new(w())(0,0,0),V=new(f())(0,0,1,0),function(t){t.multVecRot(j.assign(w().xAxis).negate()),t.multVecRot(v.assign(w().zAxis)),y.assign(this._upVector.getValue()).normalize();var e=v.cross(y);return Math.abs(v.dot(y))>=1||Math.abs(e.dot(j))>=1?t:(V.setFromToVec(j,e),t.multRight(V))}),set_on__:function(){this._on.getValue()&&this.textureNode?(delete this.push,delete this.pop):(this.push=Function.prototype,this.pop=Function.prototype)},set_texture__:function(){this.textureNode&&this.textureNode.removeInterest("set_aspectRatio__",this),this.textureNode=g()(x().X3DTexture2DNode,this._texture),this.textureNode&&this.textureNode.addInterest("set_aspectRatio__",this),this.set_aspectRatio__(),this.set_on__()},set_aspectRatio__:function(){this.textureNode?this._aspectRatio=this.textureNode.getWidth()/this.textureNode.getHeight():this._aspectRatio=0},push:function(t){var e=this.getTextureProjectors().pop();e.set(this,t.getModelViewMatrix().get()),this._global.getValue()?(t.getGlobalObjects().push(e),t.getTextureProjectors().push(e)):(t.getLocalObjects().push(e),t.getTextureProjectors().push(e),++t.getLocalObjectsCount()[2])},pop:function(t){this._global.getValue()||(t.getLocalObjects().pop(),--t.getLocalObjectsCount()[2])}});const O=X;b().set("x_ite/Components/ProjectiveTextureMapping/X3DTextureProjectorNode",O);const P=O,F=window[Symbol.for("X_ITE.X3D-8.3.2")].require("standard/Math/Geometry/Camera");var D=t.n(F);const N=window[Symbol.for("X_ITE.X3D-8.3.2")].require("standard/Utility/ObjectCache");var I=t.n(N),R=I()(E);function E(){this.projectionMatrix=new(T()),this.modelViewMatrix=new(T()),this.modelMatrix=new(T()),this.invTextureSpaceMatrix=new(T()),this.invTextureSpaceProjectionMatrix=new(T()),this.location=new(w())(0,0,0),this.locationArray=new Float32Array(3),this.direction=new(w())(0,0,0),this.rotation=new(f()),this.projectiveTextureMatrix=new(T()),this.projectiveTextureMatrixArray=new Float32Array(16)}function z(t){P.call(this,t),this.addType(x().TextureProjector),this._fieldOfView.setUnit("angle")}E.prototype={constructor:E,set:function(t,e){this.browser=t.getBrowser(),this.textureProjectorNode=t,this.modelViewMatrix.assign(e)},setGroup:function(t){this.groupNode=t},getModelViewMatrix:function(){return this.modelViewMatrix},setGlobalVariables:function(t){var e=this.textureProjectorNode,i=t.getCameraSpaceMatrix().get(),r=this.modelMatrix.assign(this.modelViewMatrix).multRight(i),o=this.invTextureSpaceMatrix.assign(e.getGlobal()?r:T().Identity);this.rotation.setFromToVec(w().zAxis,this.direction.assign(e.getDirection()).negate()),e.straightenHorizon(this.rotation),o.translate(e.getLocation()),o.rotate(this.rotation),o.inverse();var n=e.getTexture().getWidth(),s=e.getTexture().getHeight(),a=e.getNearDistance(),u=e.getFarDistance(),c=e.getFieldOfView();D().perspective(c,a,u,n,s,this.projectionMatrix),e.getGlobal()||o.multLeft(r.inverse()),this.invTextureSpaceProjectionMatrix.assign(o).multRight(this.projectionMatrix).multRight(e.getBiasMatrix()),this.projectiveTextureMatrix.assign(i).multRight(this.invTextureSpaceProjectionMatrix),this.projectiveTextureMatrixArray.set(this.projectiveTextureMatrix),this.modelViewMatrix.multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setShaderUniforms:function(t,e,i){const r=e.numProjectiveTextures++;if(e.hasTextureProjector(r,this))return;const o=this.textureProjectorNode.getTexture(),n=this.browser.getTexture2DUnit();t.activeTexture(t.TEXTURE0+n),t.bindTexture(t.TEXTURE_2D,o.getTexture()),t.uniform1i(e.x3d_ProjectiveTexture[r],n),t.uniformMatrix4fv(e.x3d_ProjectiveTextureMatrix[r],!1,this.projectiveTextureMatrixArray),t.uniform3fv(e.x3d_ProjectiveTextureLocation[r],this.locationArray)},dispose:function(){R.push(this)}},z.prototype=Object.assign(Object.create(P.prototype),{constructor:z,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(u())([new(s())(x().inputOutput,"metadata",new(o().SFNode)),new(s())(x().inputOutput,"description",new(o().SFString)),new(s())(x().inputOutput,"on",new(o().SFBool)(!0)),new(s())(x().inputOutput,"global",new(o().SFBool)(!0)),new(s())(x().inputOutput,"location",new(o().SFVec3f)(0,0,1)),new(s())(x().inputOutput,"direction",new(o().SFVec3f)(0,0,1)),new(s())(x().inputOutput,"upVector",new(o().SFVec3f)(0,0,1)),new(s())(x().inputOutput,"fieldOfView",new(o().SFFloat)(.7854)),new(s())(x().inputOutput,"nearDistance",new(o().SFFloat)(1)),new(s())(x().inputOutput,"farDistance",new(o().SFFloat)(10)),new(s())(x().outputOnly,"aspectRatio",new(o().SFFloat)),new(s())(x().inputOutput,"texture",new(o().SFNode))]),getTypeName:function(){return"TextureProjector"},getComponentName:function(){return"ProjectiveTextureMapping"},getContainerField:function(){return"children"},initialize:function(){P.prototype.initialize.call(this)},getFieldOfView:function(){var t=this._fieldOfView.getValue();return t>0&&t<Math.PI?t:Math.PI/4},getTextureProjectors:function(){return R}});const A=z;b().set("x_ite/Components/ProjectiveTextureMapping/TextureProjector",A);const C=A;var B=I()(U);function U(){this.projectionMatrix=new(T()),this.modelViewMatrix=new(T()),this.modelMatrix=new(T()),this.invTextureSpaceMatrix=new(T()),this.location=new(w())(0,0,0),this.locationArray=new Float32Array(3),this.invTextureSpaceProjectionMatrix=new(T()),this.direction=new(w())(0,0,0),this.rotation=new(f()),this.projectiveTextureMatrix=new(T()),this.projectiveTextureMatrixArray=new Float32Array(16)}function Y(t){P.call(this,t),this.addType(x().TextureProjectorParallel),this._fieldOfView.setUnit("length")}U.prototype={constructor:U,set:function(t,e){this.browser=t.getBrowser(),this.textureProjectorNode=t,this.modelViewMatrix.assign(e)},setGroup:function(t){this.groupNode=t},getModelViewMatrix:function(){return this.modelViewMatrix},setGlobalVariables:function(t){var e=this.textureProjectorNode,i=t.getCameraSpaceMatrix().get(),r=this.modelMatrix.assign(this.modelViewMatrix).multRight(i),o=this.invTextureSpaceMatrix.assign(e.getGlobal()?r:T().Identity);this.rotation.setFromToVec(w().zAxis,this.direction.assign(e.getDirection()).negate()),e.straightenHorizon(this.rotation),o.translate(e.getLocation()),o.rotate(this.rotation),o.inverse();var n=e.getTexture().getWidth()/e.getTexture().getHeight(),s=e.getMinimumX(),a=e.getMaximumX(),u=e.getMinimumY(),c=e.getMaximumY(),h=e.getSizeX(),l=e.getSizeY(),x=e.getNearDistance(),p=e.getFarDistance();if(n>h/l){var g=(s+a)/2,d=l*n/2;D().ortho(g-d,g+d,u,c,x,p,this.projectionMatrix)}else{g=(u+c)/2,d=h/n/2;D().ortho(s,a,g-d,g+d,x,p,this.projectionMatrix)}e.getGlobal()||o.multLeft(r.inverse()),this.invTextureSpaceProjectionMatrix.assign(o).multRight(this.projectionMatrix).multRight(e.getBiasMatrix()),this.projectiveTextureMatrix.assign(i).multRight(this.invTextureSpaceProjectionMatrix),this.projectiveTextureMatrixArray.set(this.projectiveTextureMatrix),this.modelViewMatrix.multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setShaderUniforms:function(t,e,i){const r=e.numProjectiveTextures++;if(e.hasTextureProjector(r,this))return;const o=this.textureProjectorNode.getTexture(),n=this.browser.getTexture2DUnit();t.activeTexture(t.TEXTURE0+n),t.bindTexture(t.TEXTURE_2D,o.getTexture()),t.uniform1i(e.x3d_ProjectiveTexture[r],n),t.uniformMatrix4fv(e.x3d_ProjectiveTextureMatrix[r],!1,this.projectiveTextureMatrixArray),t.uniform3fv(e.x3d_ProjectiveTextureLocation[r],this.locationArray)},dispose:function(){B.push(this)}},Y.prototype=Object.assign(Object.create(P.prototype),{constructor:Y,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(u())([new(s())(x().inputOutput,"metadata",new(o().SFNode)),new(s())(x().inputOutput,"description",new(o().SFString)),new(s())(x().inputOutput,"on",new(o().SFBool)(!0)),new(s())(x().inputOutput,"global",new(o().SFBool)(!0)),new(s())(x().inputOutput,"location",new(o().SFVec3f)(0,0,1)),new(s())(x().inputOutput,"direction",new(o().SFVec3f)(0,0,1)),new(s())(x().inputOutput,"upVector",new(o().SFVec3f)(0,1,0)),new(s())(x().inputOutput,"fieldOfView",new(o().MFFloat)(-1,-1,1,1)),new(s())(x().inputOutput,"nearDistance",new(o().SFFloat)(1)),new(s())(x().inputOutput,"farDistance",new(o().SFFloat)(10)),new(s())(x().outputOnly,"aspectRatio",new(o().SFFloat)),new(s())(x().inputOutput,"texture",new(o().SFNode))]),getTypeName:function(){return"TextureProjectorParallel"},getComponentName:function(){return"ProjectiveTextureMapping"},getContainerField:function(){return"children"},initialize:function(){P.prototype.initialize.call(this),this._fieldOfView.addInterest("set_fieldOfView___",this),this.set_fieldOfView___()},set_fieldOfView___:function(){var t=this._fieldOfView.length;this.minimumX=t>0?this._fieldOfView[0]:-1,this.minimumY=t>1?this._fieldOfView[1]:-1,this.maximumX=t>2?this._fieldOfView[2]:1,this.maximumY=t>3?this._fieldOfView[3]:1,this.sizeX=this.maximumX-this.minimumX,this.sizeY=this.maximumY-this.minimumY},getMinimumX:function(){return this.minimumX},getMinimumY:function(){return this.minimumY},getMaximumX:function(){return this.maximumX},getMaximumY:function(){return this.maximumY},getSizeX:function(){return this.sizeX},getSizeY:function(){return this.sizeY},getTextureProjectors:function(){return B}});const q=Y;b().set("x_ite/Components/ProjectiveTextureMapping/TextureProjectorParallel",q);const G=q;i().addComponent({name:"ProjectiveTextureMapping",types:{TextureProjector:C,TextureProjectorParallel:G},abstractTypes:{X3DTextureProjectorNode:P}});const L=void 0;b().set("assets/components/ProjectiveTextureMapping",L)})();
package/docs/Gemfile.lock DELETED
@@ -1,116 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- addressable (2.8.1)
5
- public_suffix (>= 2.0.2, < 6.0)
6
- colorator (1.1.0)
7
- concurrent-ruby (1.1.10)
8
- em-websocket (0.5.3)
9
- eventmachine (>= 0.12.9)
10
- http_parser.rb (~> 0)
11
- ethon (0.16.0)
12
- ffi (>= 1.15.0)
13
- eventmachine (1.2.7)
14
- ffi (1.15.5)
15
- forwardable-extended (2.6.0)
16
- html-proofer (3.19.4)
17
- addressable (~> 2.3)
18
- mercenary (~> 0.3)
19
- nokogiri (~> 1.13)
20
- parallel (~> 1.10)
21
- rainbow (~> 3.0)
22
- typhoeus (~> 1.3)
23
- yell (~> 2.0)
24
- http_parser.rb (0.8.0)
25
- i18n (1.12.0)
26
- concurrent-ruby (~> 1.0)
27
- jekyll (4.3.1)
28
- addressable (~> 2.4)
29
- colorator (~> 1.0)
30
- em-websocket (~> 0.5)
31
- i18n (~> 1.0)
32
- jekyll-sass-converter (>= 2.0, < 4.0)
33
- jekyll-watch (~> 2.0)
34
- kramdown (~> 2.3, >= 2.3.1)
35
- kramdown-parser-gfm (~> 1.0)
36
- liquid (~> 4.0)
37
- mercenary (>= 0.3.6, < 0.5)
38
- pathutil (~> 0.9)
39
- rouge (>= 3.0, < 5.0)
40
- safe_yaml (~> 1.0)
41
- terminal-table (>= 1.8, < 4.0)
42
- webrick (~> 1.7)
43
- jekyll-archives (2.2.1)
44
- jekyll (>= 3.6, < 5.0)
45
- jekyll-paginate (1.1.0)
46
- jekyll-redirect-from (0.16.0)
47
- jekyll (>= 3.3, < 5.0)
48
- jekyll-sass-converter (2.2.0)
49
- sassc (> 2.0.1, < 3.0)
50
- jekyll-seo-tag (2.8.0)
51
- jekyll (>= 3.8, < 5.0)
52
- jekyll-sitemap (1.4.0)
53
- jekyll (>= 3.7, < 5.0)
54
- jekyll-theme-chirpy (5.3.2)
55
- jekyll (~> 4.1)
56
- jekyll-archives (~> 2.2)
57
- jekyll-paginate (~> 1.1)
58
- jekyll-redirect-from (~> 0.16)
59
- jekyll-seo-tag (~> 2.7)
60
- jekyll-sitemap (~> 1.4)
61
- jekyll-watch (2.2.1)
62
- listen (~> 3.0)
63
- kramdown (2.4.0)
64
- rexml
65
- kramdown-parser-gfm (1.1.0)
66
- kramdown (~> 2.0)
67
- liquid (4.0.3)
68
- listen (3.7.1)
69
- rb-fsevent (~> 0.10, >= 0.10.3)
70
- rb-inotify (~> 0.9, >= 0.9.10)
71
- mercenary (0.4.0)
72
- nokogiri (1.13.10-arm64-darwin)
73
- racc (~> 1.4)
74
- nokogiri (1.13.10-x86_64-darwin)
75
- racc (~> 1.4)
76
- parallel (1.22.1)
77
- pathutil (0.16.2)
78
- forwardable-extended (~> 2.6)
79
- public_suffix (5.0.1)
80
- racc (1.6.1)
81
- rainbow (3.1.1)
82
- rb-fsevent (0.11.2)
83
- rb-inotify (0.10.1)
84
- ffi (~> 1.0)
85
- rexml (3.2.5)
86
- rouge (3.30.0)
87
- safe_yaml (1.0.5)
88
- sassc (2.4.0)
89
- ffi (~> 1.9)
90
- terminal-table (3.0.2)
91
- unicode-display_width (>= 1.1.1, < 3)
92
- thread_safe (0.3.6)
93
- typhoeus (1.4.0)
94
- ethon (>= 0.9.0)
95
- tzinfo (1.2.10)
96
- thread_safe (~> 0.1)
97
- tzinfo-data (1.2022.7)
98
- tzinfo (>= 1.0.0)
99
- unicode-display_width (2.3.0)
100
- wdm (0.1.1)
101
- webrick (1.7.0)
102
- yell (2.2.2)
103
-
104
- PLATFORMS
105
- universal-darwin-22
106
-
107
- DEPENDENCIES
108
- html-proofer (~> 3.18)
109
- jekyll-theme-chirpy (~> 5.3, >= 5.3.2)
110
- tzinfo (~> 1.2)
111
- tzinfo-data
112
- wdm (~> 0.1.1)
113
- webrick (~> 1.7)
114
-
115
- BUNDLED WITH
116
- 2.3.22