x_ite 15.1.11 → 16.0.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 -5
- package/dist/LICENSE.md +0 -16
- package/dist/assets/components/AnnotationComponent.js +1 -1
- package/dist/assets/components/AnnotationComponent.min.js +1 -1
- package/dist/assets/components/CADGeometryComponent.js +1 -1
- package/dist/assets/components/CADGeometryComponent.min.js +1 -1
- package/dist/assets/components/CubeMapTexturingComponent.js +58 -137
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +1 -1
- package/dist/assets/components/DISComponent.min.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.js +38 -5
- package/dist/assets/components/GaussianSplatsComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +1 -1
- package/dist/assets/components/Geometry2DComponent.min.js +1 -1
- package/dist/assets/components/Geometry3DComponent.js +1 -1
- package/dist/assets/components/Geometry3DComponent.min.js +1 -1
- package/dist/assets/components/GeospatialComponent.js +3 -3
- package/dist/assets/components/GeospatialComponent.min.js +1 -1
- package/dist/assets/components/HAnimComponent.js +1 -1
- package/dist/assets/components/HAnimComponent.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensorComponent.js +4 -6
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +1 -1
- package/dist/assets/components/LayoutComponent.min.js +1 -1
- package/dist/assets/components/NURBSComponent.js +1 -1
- package/dist/assets/components/NURBSComponent.min.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
- package/dist/assets/components/PickingComponent.js +4 -4
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +25 -25
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +21 -45
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +9 -38
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
- package/dist/assets/components/Texturing3DComponent.js +81 -127
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +33 -33
- package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
- package/dist/assets/components/WebXRComponent.js +25 -51
- package/dist/assets/components/WebXRComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +1 -1
- package/dist/assets/components/X_ITEComponent.min.js +1 -1
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +4 -0
- package/dist/x_ite.js +2294 -9405
- package/dist/x_ite.min.js +2 -0
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +2285 -9393
- package/dist/x_ite.zip +0 -0
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -37,10 +37,10 @@ If you are going to use X_ITE in a production environment, you should use a fixe
|
|
|
37
37
|
jsDelivr is an open-source content delivery network (CDN) renowned for its no-cost access, swift performance, and reliable service.
|
|
38
38
|
|
|
39
39
|
```html
|
|
40
|
-
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@
|
|
40
|
+
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@16.0.0/dist/x_ite.min.js"></script>
|
|
41
41
|
<!-- or as ES module for use in scripts -->
|
|
42
42
|
<script type="module">
|
|
43
|
-
import X3D from "https://cdn.jsdelivr.net/npm/x_ite@
|
|
43
|
+
import X3D from "https://cdn.jsdelivr.net/npm/x_ite@16.0.0/dist/x_ite.min.mjs";
|
|
44
44
|
</script>
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -71,7 +71,7 @@ This script initializes an X3D canvas within an HTML page, configuring it to con
|
|
|
71
71
|
You can include an external file:
|
|
72
72
|
|
|
73
73
|
```html
|
|
74
|
-
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@
|
|
74
|
+
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@16.0.0/dist/x_ite.min.js"></script>
|
|
75
75
|
<x3d-canvas
|
|
76
76
|
src="box.x3d"
|
|
77
77
|
contentScale="auto"
|
|
@@ -83,7 +83,7 @@ You can include an external file:
|
|
|
83
83
|
However, you can also include and manipulate the XML directly:
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
|
-
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@
|
|
86
|
+
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@16.0.0/dist/x_ite.min.js"></script>
|
|
87
87
|
<x3d-canvas contentScale="auto" update="auto">
|
|
88
88
|
<X3D profile='Interchange' version='4.1'>
|
|
89
89
|
<head>
|
|
@@ -122,7 +122,7 @@ The same scene can also be created using pure JavaScript:
|
|
|
122
122
|
|
|
123
123
|
```html
|
|
124
124
|
<script type="module">
|
|
125
|
-
import X3D from "https://cdn.jsdelivr.net/npm/x_ite@
|
|
125
|
+
import X3D from "https://cdn.jsdelivr.net/npm/x_ite@16.0.0/dist/x_ite.min.mjs";
|
|
126
126
|
|
|
127
127
|
const
|
|
128
128
|
canvas = document .createElement ("x3d-canvas"), // Or get an already inserted <x3d-canvas> element.
|
package/dist/LICENSE.md
CHANGED
|
@@ -24,22 +24,6 @@ ADDITIONAL LICENSES
|
|
|
24
24
|
-------------------
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
/*!
|
|
28
|
-
* jQuery JavaScript Library v4.0.0+slim
|
|
29
|
-
* https://jquery.com/
|
|
30
|
-
*
|
|
31
|
-
* Copyright OpenJS Foundation and other contributors
|
|
32
|
-
* Released under the MIT license
|
|
33
|
-
* https://jquery.com/license/
|
|
34
|
-
*
|
|
35
|
-
* Date: 2026-01-18T00:20Z
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/*!
|
|
39
|
-
* jQuery Mousewheel 3.2.2
|
|
40
|
-
* Copyright OpenJS Foundation and other contributors
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
27
|
/**
|
|
44
28
|
* @license
|
|
45
29
|
* Copyright 2000, Silicon Graphics, Inc. All Rights Reserved.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE
|
|
1
|
+
/* X_ITE v16.0.0 */
|
|
2
2
|
const t=window[Symbol.for("X_ITE.X3D")];(()=>{const e={n:t=>{const n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{if(Array.isArray(n))for(var i=0;i<n.length;){var o=n[i++],a=n[i++];e.o(t,o)?0===a&&i++:0===a?Object.defineProperty(t,o,{enumerable:!0,value:n[i++]}):Object.defineProperty(t,o,{enumerable:!0,get:a})}else for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},n=t.Components;var i=e.n(n);const o=t.Fields;var a=e.n(o);const p=t.X3DFieldDefinition;var r=e.n(p);const u=t.FieldDefinitionArray;var l=e.n(u);const s=t.X3DNode;var d=e.n(s);const c=t.X3DLayerNode;var w=e.n(c);const y=t.Viewpoint;var O=e.n(y);const S=t.Group;var b=e.n(S);const f=t.X3DConstants;var h=e.n(f);const F=t.Namespace;var g=e.n(F);function A(t){w().call(this,t,new(O())(t),new(b())(t)),this.addType(h().AnnotationLayer)}Object.assign(Object.setPrototypeOf(A.prototype,w().prototype),{initialize(){w().prototype.initialize.call(this)}}),Object.defineProperties(A,{...d().getStaticProperties("AnnotationLayer","Annotation",1,"layers","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"isPickable",new(a().SFBool)(!0)),new(r())(h().inputOutput,"layoutPolicy",new(a().MFString)),new(r())(h().inputOutput,"shownGroupID",new(a().MFString)),new(r())(h().inputOutput,"viewport",new(a().SFNode))]),enumerable:!0}});const P=A,m=g().add("AnnotationLayer",P),v=t.X3DChildNode;var N=e.n(v);function j(t){N().call(this,t),this.addType(h().AnnotationTarget)}Object.assign(Object.setPrototypeOf(j.prototype,N().prototype),{initialize(){N().prototype.initialize.call(this)}}),Object.defineProperties(j,{...d().getStaticProperties("AnnotationTarget","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"referencePoint",new(a().SFVec3f)),new(r())(h().inputOutput,"leadLineStyle",new(a().SFNode)),new(r())(h().inputOutput,"marker",new(a().SFNode)),new(r())(h().inputOutput,"annotations",new(a().MFNode))]),enumerable:!0}});const D=j,z=g().add("AnnotationTarget",D),T=t.X3DGroupingNode;var X=e.n(T);function G(t){N().call(this,t),this.addType(h().X3DAnnotationNode)}Object.assign(Object.setPrototypeOf(G.prototype,N().prototype),{initialize(){N().prototype.initialize.call(this)}}),Object.defineProperties(G,d().getStaticProperties("X3DAnnotationNode","Annotation",1));const I=G,L=g().add("X3DAnnotationNode",I);function E(t){X().call(this,t),L.call(this,t),this.addType(h().GroupAnnotation)}Object.assign(Object.setPrototypeOf(E.prototype,X().prototype),L.prototype,{initialize(){X().prototype.initialize.call(this),L.prototype.initialize.call(this)},dispose(){L.prototype.dispose.call(this),X().prototype.dispose.call(this)}}),Object.defineProperties(E,{...d().getStaticProperties("GroupAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"visible",new(a().SFBool)(!0)),new(r())(h().inputOutput,"bboxDisplay",new(a().SFBool)),new(r())(h().initializeOnly,"bboxSize",new(a().SFVec3f)(-1,-1,-1)),new(r())(h().initializeOnly,"bboxCenter",new(a().SFVec3f)),new(r())(h().inputOnly,"addChildren",new(a().MFNode)),new(r())(h().inputOnly,"removeChildren",new(a().MFNode)),new(r())(h().inputOutput,"children",new(a().MFNode))]),enumerable:!0}});const M=E,R=g().add("GroupAnnotation",M),x=t.X3DUrlObject;var V=e.n(x);function B(t){L.call(this,t),V().call(this,t),this.addType(h().IconAnnotation)}Object.assign(Object.setPrototypeOf(B.prototype,L.prototype),V().prototype,{initialize(){L.prototype.initialize.call(this),V().prototype.initialize.call(this)},async requestImmediateLoad(t=!0){},dispose(){V().prototype.dispose.call(this),L.prototype.dispose.call(this)}}),Object.defineProperties(B,{...d().getStaticProperties("IconAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"url",new(a().MFString)),new(r())(h().inputOutput,"autoRefresh",new(a().SFTime)(0)),new(r())(h().inputOutput,"autoRefreshTimeLimit",new(a().SFTime)(3600))]),enumerable:!0}});const C=B,U=g().add("IconAnnotation",C);function _(t){L.call(this,t),this.addType(h().TextAnnotation)}Object.assign(Object.setPrototypeOf(_.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this)}}),Object.defineProperties(_,{...d().getStaticProperties("TextAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"contentType",new(a().SFString)("text/plain")),new(r())(h().inputOutput,"text",new(a().SFString))]),enumerable:!0}});const k=_,q=g().add("TextAnnotation",k);function H(t){L.call(this,t),this.addType(h().URLAnnotation)}Object.assign(Object.setPrototypeOf(H.prototype,L.prototype),{initialize(){L.prototype.initialize.call(this)}}),Object.defineProperties(H,{...d().getStaticProperties("URLAnnotation","Annotation",1,"children","4.0"),fieldDefinitions:{value:new(l())([new(r())(h().inputOutput,"metadata",new(a().SFNode)),new(r())(h().inputOutput,"enabled",new(a().SFBool)(!0)),new(r())(h().inputOutput,"annotationGroupID",new(a().SFString)),new(r())(h().inputOutput,"displayPolicy",new(a().SFString)("NEVER")),new(r())(h().inputOutput,"url",new(a().MFString))]),enumerable:!0}});const J=H,K=g().add("URLAnnotation",J);i().add({name:"Annotation",concreteNodes:[m,z,R,U,q,K],abstractNodes:[L]});g().add("AnnotationComponent",void 0)})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE
|
|
1
|
+
/* X_ITE v16.0.0 */
|
|
2
2
|
const e=window[Symbol.for("X_ITE.X3D")];(()=>{const t={n:e=>{const i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{if(Array.isArray(i))for(var n=0;n<i.length;){var s=i[n++],o=i[n++];t.o(e,s)?0===o&&n++:0===o?Object.defineProperty(e,s,{enumerable:!0,value:i[n++]}):Object.defineProperty(e,s,{enumerable:!0,get:o})}else for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},i=e.Components;var n=t.n(i);const s=e.Fields;var o=t.n(s);const r=e.X3DFieldDefinition;var l=t.n(r);const d=e.FieldDefinitionArray;var a=t.n(d);const u=e.X3DNode;var c=t.n(u);const b=e.X3DGroupingNode;var p=t.n(b);const O=e.X3DChildNode;var h=t.n(O);const w=e.X3DConstants;var j=t.n(w);const y=e.Namespace;var S=t.n(y);function _(e){h().call(this,e),this.addType(j().X3DProductStructureChildNode)}Object.setPrototypeOf(_.prototype,h().prototype),Object.defineProperties(_,c().getStaticProperties("X3DProductStructureChildNode","CADGeometry",2));const m=_,f=S().add("X3DProductStructureChildNode",m);function F(e){p().call(this,e),f.call(this,e),this.addType(j().CADAssembly)}Object.setPrototypeOf(F.prototype,p().prototype),Object.defineProperties(F,{...c().getStaticProperties("CADAssembly","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(j().inputOutput,"metadata",new(o().SFNode)),new(l())(j().inputOutput,"name",new(o().SFString)),new(l())(j().inputOutput,"visible",new(o().SFBool)(!0)),new(l())(j().inputOutput,"bboxDisplay",new(o().SFBool)),new(l())(j().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(l())(j().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(l())(j().inputOnly,"addChildren",new(o().MFNode)),new(l())(j().inputOnly,"removeChildren",new(o().MFNode)),new(l())(j().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const g=F,v=S().add("CADAssembly",g),C=e.X3DBoundedObject;var D=t.n(C);const N=e.TraverseType;var P=t.n(N);const x=e.X3DCast;var B=t.n(x);function I(e){f.call(this,e),D().call(this,e),this.addType(j().CADFace),this.addChildObjects(j().outputOnly,"rebuild",new(o().SFTime)),this.setBoundedObject(!0),this.setPointingObject(!0),this.setCollisionObject(!0),this.setShadowObject(!0),this.setVisibleObject(!0),this.visibleObjects=[]}Object.assign(Object.setPrototypeOf(I.prototype,f.prototype),D().prototype,{initialize(){f.prototype.initialize.call(this),D().prototype.initialize.call(this),this._rebuild.addInterest("set_children__",this),this._bboxSize.addInterest("set_boundedObjects__",this),this._shape.addInterest("requestRebuild",this),this.set_children__()},getBBox(e,t){return this.isDefaultBBoxSize()?this.boundedObject?.getBBox(e,t)??e.set():e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},getShapes(e,t){for(const i of this.visibleObjects)i.getShapes(e,t);return e},requestRebuild(){this._rebuild.addEvent()},set_children__(){this.setChild(B()(j().X3DChildNode,this._shape))},setChild(e){if(this.childNode){const e=this.childNode;e._isBoundedObject.removeInterest("requestRebuild",this),e._isPointingObject.removeInterest("requestRebuild",this),e._isCameraObject.removeInterest("requestRebuild",this),e._isPickableObject.removeInterest("requestRebuild",this),e._isCollisionObject.removeInterest("requestRebuild",this),e._isShadowObject.removeInterest("requestRebuild",this),e._isVisibleObject.removeInterest("requestRebuild",this),B()(j().X3DBoundedObject,e)&&(e._display.removeInterest("requestRebuild",this),e._bboxDisplay.removeInterest("requestRebuild",this))}if(this.childNode=null,this.boundedObject=null,this.pointingObject=null,this.cameraObject=null,this.pickableObject=null,this.collisionObject=null,this.shadowObject=null,this.visibleObjects.length=0,e){const t=e.getType();for(let i=t.length-1;i>=0;--i){switch(t[i]){case j().LOD:case j().Transform:case j().X3DShapeNode:e._isBoundedObject.addInterest("requestRebuild",this),e._isPointingObject.addInterest("requestRebuild",this),e._isCameraObject.addInterest("requestRebuild",this),e._isPickableObject.addInterest("requestRebuild",this),e._isCollisionObject.addInterest("requestRebuild",this),e._isShadowObject.addInterest("requestRebuild",this),e._isVisibleObject.addInterest("requestRebuild",this),this.childNode=e,e.isVisible()&&(e.isBoundedObject()&&(this.boundedObject=e),e.isPointingObject()&&(this.pointingObject=e),e.isCameraObject()&&(this.cameraObject=e),e.isPickableObject()&&(this.pickableObject=e),e.isCollisionObject()&&(this.collisionObject=e),e.isShadowObject()&&(this.shadowObject=e),e.isVisibleObject()&&this.visibleObjects.push(e)),B()(j().X3DBoundedObject,e)&&(e._display.addInterest("requestRebuild",this),e._bboxDisplay.addInterest("requestRebuild",this),e.isBBoxVisible()&&this.visibleObjects.push(e.getBBoxNode()));break;default:continue}break}}this.set_pointingObjects__(),this.set_cameraObjects__(),this.set_pickableObjects__(),this.set_collisionObjects__(),this.set_shadowObjects__(),this.set_visibleObjects__(),this.set_boundedObjects__()},set_boundedObjects__(){this.setBoundedObject(this.boundedObject||!this.isDefaultBBoxSize())},set_pointingObjects__(){this.setPointingObject(this.pointingObject)},set_cameraObjects__(){this.setCameraObject(this.cameraObject)},set_pickableObjects__(){this.setPickableObject(this.getTransformSensors().size||this.pickableObject)},set_collisionObjects__(){this.setCollisionObject(this.collisionObject)},set_shadowObjects__(){this.setShadowObject(this.shadowObject)},set_visibleObjects__(){this.setVisibleObject(this.visibleObjects.length)},traverse(e,t){switch(e){case P().POINTER:return void this.pointingObject?.traverse(e,t);case P().CAMERA:return void this.cameraObject?.traverse(e,t);case P().PICKING:if(this.getBrowser().getPickable().at(-1))for(const i of this.visibleObjects)i.traverse(e,t);else this.pickableObject?.traverse(e,t);return;case P().COLLISION:return void this.collisionObject?.traverse(e,t);case P().DEPTH:case P().SHADOW:return void this.shadowObject?.traverse(e,t);case P().DISPLAY:for(const i of this.visibleObjects)i.traverse(e,t);return}},dispose(){D().prototype.dispose.call(this),f.prototype.dispose.call(this)}}),Object.defineProperties(I,{...c().getStaticProperties("CADFace","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(j().inputOutput,"metadata",new(o().SFNode)),new(l())(j().inputOutput,"name",new(o().SFString)),new(l())(j().inputOutput,"visible",new(o().SFBool)(!0)),new(l())(j().inputOutput,"bboxDisplay",new(o().SFBool)),new(l())(j().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(l())(j().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(l())(j().inputOutput,"shape",new(o().SFNode))]),enumerable:!0}});const z=I,V=S().add("CADFace",z);function A(e){p().call(this,e),this.addType(j().CADLayer)}Object.setPrototypeOf(A.prototype,p().prototype),Object.defineProperties(A,{...c().getStaticProperties("CADLayer","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(j().inputOutput,"metadata",new(o().SFNode)),new(l())(j().inputOutput,"name",new(o().SFString)),new(l())(j().inputOutput,"visible",new(o().SFBool)(!0)),new(l())(j().inputOutput,"bboxDisplay",new(o().SFBool)),new(l())(j().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(l())(j().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(l())(j().inputOnly,"addChildren",new(o().MFNode)),new(l())(j().inputOnly,"removeChildren",new(o().MFNode)),new(l())(j().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const R=A,q=S().add("CADLayer",R),T=e.X3DTransformNode;var X=t.n(T);function k(e){X().call(this,e),f.call(this,e),this.addType(j().CADPart)}Object.setPrototypeOf(k.prototype,X().prototype),Object.defineProperties(k,{...c().getStaticProperties("CADPart","CADGeometry",2,"children","3.1"),fieldDefinitions:{value:new(a())([new(l())(j().inputOutput,"metadata",new(o().SFNode)),new(l())(j().inputOutput,"name",new(o().SFString)),new(l())(j().inputOutput,"translation",new(o().SFVec3f)),new(l())(j().inputOutput,"rotation",new(o().SFRotation)),new(l())(j().inputOutput,"scale",new(o().SFVec3f)(1,1,1)),new(l())(j().inputOutput,"scaleOrientation",new(o().SFRotation)),new(l())(j().inputOutput,"center",new(o().SFVec3f)),new(l())(j().inputOutput,"visible",new(o().SFBool)(!0)),new(l())(j().inputOutput,"bboxDisplay",new(o().SFBool)),new(l())(j().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(l())(j().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(l())(j().inputOnly,"addChildren",new(o().MFNode)),new(l())(j().inputOnly,"removeChildren",new(o().MFNode)),new(l())(j().inputOutput,"children",new(o().MFNode))]),enumerable:!0}});const M=k,G=S().add("CADPart",M),L=e.X3DComposedGeometryNode;var Q=t.n(L);function E(e){Q().call(this,e),this.addType(j().IndexedQuadSet)}Object.assign(Object.setPrototypeOf(E.prototype,Q().prototype),{initialize(){Q().prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},getTriangleIndex:(()=>{const e=[0,1,2,0,2,3];return function(t){const i=t%6;return(t-i)/6*4+e[i]}})(),getPolygonIndex(e){return this._index[e]},getVerticesPerPolygon:()=>4,getNumVertices(){return this.checkVertexCount(this._index.length,4)},build(){const e=this.getNumVertices();Q().prototype.build.call(this,4,e,6,e/4*6)}}),Object.defineProperties(E,{...c().getStaticProperties("IndexedQuadSet","CADGeometry",1,"geometry","3.1"),fieldDefinitions:{value:new(a())([new(l())(j().inputOutput,"metadata",new(o().SFNode)),new(l())(j().inputOnly,"set_index",new(o().MFInt32)),new(l())(j().initializeOnly,"solid",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"ccw",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"colorPerVertex",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"normalPerVertex",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"index",new(o().MFInt32)),new(l())(j().inputOutput,"attrib",new(o().MFNode)),new(l())(j().inputOutput,"fogCoord",new(o().SFNode)),new(l())(j().inputOutput,"color",new(o().SFNode)),new(l())(j().inputOutput,"texCoord",new(o().SFNode)),new(l())(j().inputOutput,"tangent",new(o().SFNode)),new(l())(j().inputOutput,"normal",new(o().SFNode)),new(l())(j().inputOutput,"coord",new(o().SFNode))]),enumerable:!0}});const H=E,K=S().add("IndexedQuadSet",H);function W(e){Q().call(this,e),this.addType(j().QuadSet)}Object.assign(Object.setPrototypeOf(W.prototype,Q().prototype),{getTriangleIndex:(()=>{const e=[0,1,2,0,2,3];return function(t){const i=t%6;return(t-i)/6*4+e[i]}})(),getVerticesPerPolygon:()=>4,getNumVertices(){return this.checkVertexCount(this.getCoord()?.getSize()??0,4)},build(){const e=this.getNumVertices();Q().prototype.build.call(this,4,e,6,e/4*6)},createNormals(e,t,i){return this.createFaceNormals(e,t,i)}}),Object.defineProperties(W,{...c().getStaticProperties("QuadSet","CADGeometry",1,"geometry","3.1"),fieldDefinitions:{value:new(a())([new(l())(j().inputOutput,"metadata",new(o().SFNode)),new(l())(j().initializeOnly,"solid",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"ccw",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"colorPerVertex",new(o().SFBool)(!0)),new(l())(j().initializeOnly,"normalPerVertex",new(o().SFBool)(!0)),new(l())(j().inputOutput,"attrib",new(o().MFNode)),new(l())(j().inputOutput,"fogCoord",new(o().SFNode)),new(l())(j().inputOutput,"color",new(o().SFNode)),new(l())(j().inputOutput,"texCoord",new(o().SFNode)),new(l())(j().inputOutput,"tangent",new(o().SFNode)),new(l())(j().inputOutput,"normal",new(o().SFNode)),new(l())(j().inputOutput,"coord",new(o().SFNode))]),enumerable:!0}});const Y=W,J=S().add("QuadSet",Y);n().add({name:"CADGeometry",concreteNodes:[v,V,q,G,K,J],abstractNodes:[f]});S().add("CADGeometryComponent",void 0)})();
|
|
@@ -1,41 +1,9 @@
|
|
|
1
|
-
/* X_ITE
|
|
1
|
+
/* X_ITE v16.0.0 */
|
|
2
2
|
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/***/ 254
|
|
8
|
-
(module) {
|
|
9
|
-
|
|
10
|
-
module.exports = __X_ITE_X3D__ .jquery;
|
|
11
|
-
|
|
12
|
-
/***/ }
|
|
13
|
-
|
|
14
|
-
/******/ });
|
|
15
|
-
/************************************************************************/
|
|
16
|
-
/******/ // The module cache
|
|
17
|
-
/******/ const __webpack_module_cache__ = {};
|
|
18
|
-
/******/
|
|
19
|
-
/******/ // The require function
|
|
20
|
-
/******/ function __webpack_require__(moduleId) {
|
|
21
|
-
/******/ // Check if module is in cache
|
|
22
|
-
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
23
|
-
/******/ if (cachedModule !== undefined) {
|
|
24
|
-
/******/ return cachedModule.exports;
|
|
25
|
-
/******/ }
|
|
26
|
-
/******/ // Create a new module (and put it into the cache)
|
|
27
|
-
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
28
|
-
/******/ // no module.id needed
|
|
29
|
-
/******/ // no module.loaded needed
|
|
30
|
-
/******/ exports: {}
|
|
31
|
-
/******/ };
|
|
32
|
-
/******/
|
|
33
|
-
/******/ // Execute the module function
|
|
34
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
35
|
-
/******/
|
|
36
|
-
/******/ // Return the exports of the module
|
|
37
|
-
/******/ return module.exports;
|
|
38
|
-
/******/ }
|
|
5
|
+
/******/ // The require scope
|
|
6
|
+
/******/ const __webpack_require__ = {};
|
|
39
7
|
/******/
|
|
40
8
|
/************************************************************************/
|
|
41
9
|
/******/ /* webpack/runtime/compat get default export */
|
|
@@ -222,6 +190,7 @@ Object .assign (Object .setPrototypeOf (X3DEnvironmentTextureNode .prototype, (e
|
|
|
222
190
|
this .setSize (1);
|
|
223
191
|
this .setTransparent (false);
|
|
224
192
|
this .updateTextureParameters ();
|
|
193
|
+
this .addNodeEvent ();
|
|
225
194
|
};
|
|
226
195
|
})(),
|
|
227
196
|
updateTextureParameters ()
|
|
@@ -422,7 +391,6 @@ Object .assign (Object .setPrototypeOf (ComposedCubeMapTexture .prototype, CubeM
|
|
|
422
391
|
else
|
|
423
392
|
{
|
|
424
393
|
this .clearTexture ();
|
|
425
|
-
this .addNodeEvent ();
|
|
426
394
|
}
|
|
427
395
|
},
|
|
428
396
|
getRenderedTextures (renderedTextures)
|
|
@@ -548,9 +516,7 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
|
|
|
548
516
|
},
|
|
549
517
|
set_size__ ()
|
|
550
518
|
{
|
|
551
|
-
const
|
|
552
|
-
browser = this .getBrowser (),
|
|
553
|
-
gl = browser .getContext ();
|
|
519
|
+
const size = this ._size .getValue ();
|
|
554
520
|
|
|
555
521
|
// Dispose old framebuffer.
|
|
556
522
|
|
|
@@ -558,13 +524,14 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
|
|
|
558
524
|
|
|
559
525
|
// Transfer 6 textures of size x size pixels.
|
|
560
526
|
|
|
561
|
-
const size = this ._size .getValue ();
|
|
562
|
-
|
|
563
527
|
if (size > 0)
|
|
564
528
|
{
|
|
565
529
|
// Upload default data.
|
|
566
530
|
|
|
567
|
-
const
|
|
531
|
+
const
|
|
532
|
+
browser = this .getBrowser (),
|
|
533
|
+
gl = browser .getContext (),
|
|
534
|
+
defaultData = new Uint8Array (size * size * 4);
|
|
568
535
|
|
|
569
536
|
gl .bindTexture (this .getTarget (), this .getTexture ());
|
|
570
537
|
|
|
@@ -584,7 +551,7 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
|
|
|
584
551
|
{
|
|
585
552
|
this .frameBuffer = null;
|
|
586
553
|
|
|
587
|
-
this .
|
|
554
|
+
this .clearTexture ();
|
|
588
555
|
}
|
|
589
556
|
},
|
|
590
557
|
traverse (type, renderObject)
|
|
@@ -648,7 +615,6 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
|
|
|
648
615
|
dependentRenderer = this .dependentRenderers .get (renderObject),
|
|
649
616
|
browser = this .getBrowser (),
|
|
650
617
|
gl = browser .getContext (),
|
|
651
|
-
layer = renderObject .getLayer (),
|
|
652
618
|
viewport = this .viewport,
|
|
653
619
|
background = dependentRenderer .getBackground (),
|
|
654
620
|
navigationInfoNode = dependentRenderer .getNavigationInfo (),
|
|
@@ -664,7 +630,7 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
|
|
|
664
630
|
this .setTransparent (background .isTransparent ());
|
|
665
631
|
|
|
666
632
|
dependentRenderer .setFramebuffer (this .frameBuffer);
|
|
667
|
-
dependentRenderer .getViewVolumes () .push (viewVolume .set (projectionMatrix, viewport
|
|
633
|
+
dependentRenderer .getViewVolumes () .push (viewVolume .set (projectionMatrix, viewport));
|
|
668
634
|
dependentRenderer .getProjectionMatrix () .push (projectionMatrix);
|
|
669
635
|
|
|
670
636
|
gl .bindTexture (this .getTarget (), this .getTexture ());
|
|
@@ -699,7 +665,7 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, Cube
|
|
|
699
665
|
|
|
700
666
|
// Render layer's children.
|
|
701
667
|
|
|
702
|
-
|
|
668
|
+
renderObject .getLayer () .traverse ((external_X_ITE_X3D_TraverseType_default()).DISPLAY, dependentRenderer);
|
|
703
669
|
|
|
704
670
|
// Pop matrices.
|
|
705
671
|
|
|
@@ -775,7 +741,6 @@ var external_X_ITE_X3D_Vector2_default = /*#__PURE__*/__webpack_require__.n(exte
|
|
|
775
741
|
const external_X_ITE_X3D_DEVELOPMENT_namespaceObject = __X_ITE_X3D__ .DEVELOPMENT;
|
|
776
742
|
var external_X_ITE_X3D_DEVELOPMENT_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_DEVELOPMENT_namespaceObject);
|
|
777
743
|
;// ./src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js
|
|
778
|
-
/* provided dependency */ var $ = __webpack_require__(254);
|
|
779
744
|
|
|
780
745
|
|
|
781
746
|
|
|
@@ -793,9 +758,6 @@ function ImageCubeMapTexture (executionContext)
|
|
|
793
758
|
external_X_ITE_X3D_X3DUrlObject_default().call (this, executionContext);
|
|
794
759
|
|
|
795
760
|
this .addType ((external_X_ITE_X3D_X3DConstants_default()).ImageCubeMapTexture);
|
|
796
|
-
|
|
797
|
-
this .image = $("<img></img>");
|
|
798
|
-
this .urlStack = new (external_X_ITE_X3D_Fields_default()).MFString ();
|
|
799
761
|
}
|
|
800
762
|
|
|
801
763
|
Object .assign (Object .setPrototypeOf (ImageCubeMapTexture .prototype, CubeMapTexturing_X3DEnvironmentTextureNode .prototype),
|
|
@@ -806,13 +768,6 @@ Object .assign (Object .setPrototypeOf (ImageCubeMapTexture .prototype, CubeMapT
|
|
|
806
768
|
CubeMapTexturing_X3DEnvironmentTextureNode .prototype .initialize .call (this);
|
|
807
769
|
external_X_ITE_X3D_X3DUrlObject_default().prototype .initialize .call (this);
|
|
808
770
|
|
|
809
|
-
// Initialize.
|
|
810
|
-
|
|
811
|
-
this .image
|
|
812
|
-
.on ("load", this .setImage .bind (this))
|
|
813
|
-
.on ("abort error", this .setError .bind (this))
|
|
814
|
-
.attr ("crossorigin", "anonymous");
|
|
815
|
-
|
|
816
771
|
this .requestImmediateLoad () .catch (Function .prototype);
|
|
817
772
|
},
|
|
818
773
|
unloadData ()
|
|
@@ -821,130 +776,96 @@ Object .assign (Object .setPrototypeOf (ImageCubeMapTexture .prototype, CubeMapT
|
|
|
821
776
|
},
|
|
822
777
|
loadData ()
|
|
823
778
|
{
|
|
824
|
-
this
|
|
825
|
-
this .loadNext ();
|
|
826
|
-
},
|
|
827
|
-
loadNext ()
|
|
828
|
-
{
|
|
829
|
-
if (this .urlStack .length === 0)
|
|
830
|
-
{
|
|
831
|
-
this .clearTexture ();
|
|
832
|
-
this .setLoadState ((external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE);
|
|
833
|
-
this .addNodeEvent ();
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
new (external_X_ITE_X3D_FileLoader_default()) (this, { dataAsString: false }) .loadDocument ([this .urlStack .shift ()], (data, fileURL) =>
|
|
779
|
+
new (external_X_ITE_X3D_FileLoader_default()) (this, { dataAsString: false }) .loadDocument (this ._url, async (data, fileURL) =>
|
|
838
780
|
{
|
|
839
781
|
if (data === null)
|
|
840
782
|
{
|
|
841
|
-
this .
|
|
783
|
+
this .clearTexture ();
|
|
784
|
+
this .setLoadState ((external_X_ITE_X3D_X3DConstants_default()).FAILED_STATE);
|
|
842
785
|
}
|
|
843
786
|
else if (data instanceof ArrayBuffer)
|
|
844
787
|
{
|
|
845
|
-
|
|
788
|
+
fileURL = new URL (fileURL);
|
|
846
789
|
|
|
847
|
-
if (
|
|
790
|
+
if (fileURL .pathname .match (/\.ktx2?(?:\.gz)?$/) || fileURL .href .match (/^\s*data:image\/ktx2[;,]/s))
|
|
848
791
|
{
|
|
849
792
|
this .setLinear (true);
|
|
850
793
|
this .setMipMaps (false);
|
|
851
794
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
795
|
+
const
|
|
796
|
+
decoder = await this .getBrowser () .getKTXDecoder (),
|
|
797
|
+
texture = await decoder .loadKTXFromBuffer (data);
|
|
798
|
+
|
|
799
|
+
this .setKTXTexture (texture, fileURL);
|
|
856
800
|
}
|
|
857
801
|
else
|
|
858
802
|
{
|
|
859
803
|
this .setLinear (false);
|
|
860
804
|
this .setMipMaps (true);
|
|
861
805
|
|
|
862
|
-
|
|
806
|
+
const objectURL = URL .createObjectURL (new Blob ([data]));
|
|
863
807
|
|
|
864
|
-
|
|
808
|
+
try
|
|
809
|
+
{
|
|
810
|
+
this .setImage (await this .loadImage (objectURL), fileURL);
|
|
811
|
+
}
|
|
812
|
+
finally
|
|
813
|
+
{
|
|
814
|
+
URL .revokeObjectURL (objectURL);
|
|
815
|
+
}
|
|
865
816
|
}
|
|
866
817
|
}
|
|
867
818
|
else
|
|
868
819
|
{
|
|
869
|
-
throw new Error (
|
|
820
|
+
throw new Error (`${this .getTypeName ()}: No suitable file handler found.`);
|
|
870
821
|
}
|
|
871
822
|
});
|
|
872
823
|
},
|
|
873
|
-
|
|
874
|
-
{
|
|
875
|
-
if (this .fileURL .protocol !== "data:")
|
|
876
|
-
console .warn (`Error loading image '${decodeURI (this .fileURL)}':`, event .type);
|
|
877
|
-
|
|
878
|
-
URL .revokeObjectURL (this .objectURL);
|
|
879
|
-
|
|
880
|
-
this .loadNext ();
|
|
881
|
-
},
|
|
882
|
-
setKTXTexture (texture)
|
|
824
|
+
setKTXTexture (texture, fileURL)
|
|
883
825
|
{
|
|
884
826
|
if (texture .target !== this .getTarget ())
|
|
885
|
-
|
|
827
|
+
throw new Error ("Invalid KTX texture target, must be 'TEXTURE_CUBE_MAP'.");
|
|
886
828
|
|
|
887
829
|
if ((external_X_ITE_X3D_DEVELOPMENT_default()))
|
|
888
830
|
{
|
|
889
|
-
if (
|
|
890
|
-
console .info (`Done loading
|
|
831
|
+
if (fileURL .protocol !== "data:")
|
|
832
|
+
console .info (`Done loading ${this .getTypeName ()} '${decodeURI (fileURL)}'.`);
|
|
891
833
|
}
|
|
892
834
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
this .setSize (texture .baseWidth);
|
|
898
|
-
this .updateTextureParameters ();
|
|
835
|
+
this .setTexture (texture);
|
|
836
|
+
this .setTransparent (false);
|
|
837
|
+
this .setSize (texture .baseWidth);
|
|
838
|
+
this .updateTextureParameters ();
|
|
899
839
|
|
|
900
|
-
|
|
901
|
-
this .addNodeEvent ();
|
|
902
|
-
}
|
|
903
|
-
catch (error)
|
|
904
|
-
{
|
|
905
|
-
// Catch security error from cross origin requests.
|
|
906
|
-
this .setError ({ type: error .message });
|
|
907
|
-
}
|
|
840
|
+
this .setLoadState ((external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE);
|
|
908
841
|
},
|
|
909
|
-
setImage ()
|
|
842
|
+
setImage (image, fileURL)
|
|
910
843
|
{
|
|
911
844
|
if ((external_X_ITE_X3D_DEVELOPMENT_default()))
|
|
912
845
|
{
|
|
913
|
-
if (
|
|
914
|
-
console .info (`Done loading
|
|
846
|
+
if (fileURL .protocol !== "data:")
|
|
847
|
+
console .info (`Done loading ${this .getTypeName ()} '${decodeURI (fileURL)}'.`);
|
|
915
848
|
}
|
|
916
849
|
|
|
917
|
-
|
|
918
|
-
{
|
|
919
|
-
// Create texture.
|
|
850
|
+
// Create texture.
|
|
920
851
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
852
|
+
const
|
|
853
|
+
gl = this .getBrowser () .getContext (),
|
|
854
|
+
texture = gl .createTexture ();
|
|
924
855
|
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
856
|
+
gl .bindTexture (gl .TEXTURE_2D, texture);
|
|
857
|
+
gl .texImage2D (gl .TEXTURE_2D, 0, gl .RGBA, gl .RGBA, gl .UNSIGNED_BYTE, image);
|
|
858
|
+
gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_MIN_FILTER, gl .LINEAR);
|
|
859
|
+
gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_MAG_FILTER, gl .LINEAR);
|
|
860
|
+
gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_WRAP_S, gl .CLAMP_TO_EDGE);
|
|
861
|
+
gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_WRAP_T, gl .CLAMP_TO_EDGE);
|
|
931
862
|
|
|
932
|
-
|
|
863
|
+
this .imageToCubeMap (texture, image .width, image .height, false);
|
|
933
864
|
|
|
934
|
-
|
|
865
|
+
// Update load state.
|
|
935
866
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
939
|
-
catch (error)
|
|
940
|
-
{
|
|
941
|
-
// Catch security error from cross origin requests.
|
|
942
|
-
this .setError ({ type: error .message });
|
|
943
|
-
}
|
|
944
|
-
finally
|
|
945
|
-
{
|
|
946
|
-
URL .revokeObjectURL (this .objectURL);
|
|
947
|
-
}
|
|
867
|
+
this .setLoadState ((external_X_ITE_X3D_X3DConstants_default()).COMPLETE_STATE);
|
|
868
|
+
this .addNodeEvent ();
|
|
948
869
|
},
|
|
949
870
|
imageToCubeMap (texture, width, height)
|
|
950
871
|
{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE
|
|
2
|
-
const e=window[Symbol.for("X_ITE.X3D")];(()=>{var t={254(t){t.exports=e.jquery}};const r={};function i(e){const s=r[e];if(void 0!==s)return s.exports;const a=r[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var s=t[r++],a=t[r++];i.o(e,s)?0===a&&r++:0===a?Object.defineProperty(e,s,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,s,{enumerable:!0,get:a})}else for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=e.Components;var a=i.n(s);const n=e.Namespace;var o=i.n(n);const u=o().add("Panorama2.fs","#version 300 es\nprecision highp float;precision highp int;precision highp sampler2D;const float M_PI=3.1415926535897932384626433832795;in vec2 texCoord;out vec4 x3d_FragColor;uniform sampler2D x3d_PanoramaTextureEXT;uniform int x3d_CurrentFaceEXT;vec3 uvToXYZ(const in int face,const in vec2 uv){switch(face){case 0:return vec3(1.,uv.y,uv.x);case 1:return vec3(-1.,uv.y,-uv.x);case 2:return vec3(uv.x,uv.y,-1.);case 3:return vec3(-uv.x,uv.y,1.);case 4:return vec3(uv.y,-1.,uv.x);default:return vec3(-uv.y,1.,uv.x);}}vec2 dirToUV(const in vec3 dir){return vec2(.5+.5*atan(dir.z,dir.x)/M_PI,1.-acos(dir.y)/M_PI);}vec3 panoramaToCubeMap(const in int face,const in vec2 texCoord){vec3 scan=uvToXYZ(face,texCoord);vec3 direction=normalize(scan);vec2 src=dirToUV(direction);return texture(x3d_PanoramaTextureEXT,src).rgb;}void main(){x3d_FragColor=vec4(panoramaToCubeMap(x3d_CurrentFaceEXT,texCoord),1.);}"),h=Symbol();function d(){}Object.assign(d.prototype,{getPanoramaShader(){return this[h]??=this.createShader({name:"Panorama",vertexShader:"FullScreen",fragmentShader:`data:x-shader/x-fragment,${u}`,uniforms:["x3d_PanoramaTextureEXT","x3d_CurrentFaceEXT"]})}});const T=d,p=o().add("X3DCubeMapTexturingContext",T),c=e.Fields;var x=i.n(c);const l=e.X3DFieldDefinition;var g=i.n(l);const _=e.FieldDefinitionArray;var E=i.n(_);const f=e.X3DNode;var m=i.n(f);const b=e.X3DSingleTextureNode;var R=i.n(b);const w=e.X3DConstants;var S=i.n(w);function M(e){R().call(this,e),this.addType(S().X3DEnvironmentTextureNode);const t=this.getBrowser().getContext();this.target=t.TEXTURE_CUBE_MAP,this.targets=[t.TEXTURE_CUBE_MAP_POSITIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_Y,t.TEXTURE_CUBE_MAP_NEGATIVE_Y]}Object.assign(Object.setPrototypeOf(M.prototype,R().prototype),{initialize(){R().prototype.initialize.call(this),this.clearTexture()},getTarget(){return this.target},getTargets(){return this.targets},getTextureType:()=>4,getSize(){return this.size},setSize(e){this.size=e,this.levels=Math.floor(Math.log2(Math.max(e,1)))},getLevels(){return this.levels},clearTexture:(()=>{const e=new Uint8Array([255,255,255,255]);return function(){const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(const r of this.getTargets())t.texImage2D(r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,e);this.setSize(1),this.setTransparent(!1),this.updateTextureParameters()}})(),updateTextureParameters(){R().prototype.updateTextureParameters.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,this.size,this.size,!1,!1,!1)},setShaderUniforms(e,t){const r=this.getBrowser().popTextureUnit();e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_CUBE_MAP,this.getTexture()),e.uniform1i(t.textureCube,r)}}),Object.defineProperties(M,m().getStaticProperties("X3DEnvironmentTextureNode","CubeMapTexturing",1));const v=M,C=o().add("X3DEnvironmentTextureNode",v),U=e.X3DCast;var A=i.n(U);const I=e.BitSet;var P=i.n(I);function y(e){C.call(this,e),this.addType(S().ComposedCubeMapTexture),this.addChildObjects(S().outputOnly,"update",new(x().SFTime)),e.getSpecificationVersion()<=3.3&&(this.addAlias("front",this._frontTexture),this.addAlias("back",this._backTexture),this.addAlias("left",this._leftTexture),this.addAlias("right",this._rightTexture),this.addAlias("top",this._topTexture),this.addAlias("bottom",this._bottomTexture)),this.textureNodes=[null,null,null,null,null,null],this.textureBits=new(P())}Object.assign(Object.setPrototypeOf(y.prototype,C.prototype),{initialize(){C.prototype.initialize.call(this);const e=this.getBrowser().getContext();this.frameBuffer=e.createFramebuffer(),this._frontTexture.addInterest("set_texture__",this,0),this._backTexture.addInterest("set_texture__",this,1),this._leftTexture.addInterest("set_texture__",this,2),this._rightTexture.addInterest("set_texture__",this,3),this._topTexture.addInterest("set_texture__",this,5),this._bottomTexture.addInterest("set_texture__",this,4),this._update.addInterest("update",this),this.set_texture__(0,this._frontTexture),this.set_texture__(1,this._backTexture),this.set_texture__(2,this._leftTexture),this.set_texture__(3,this._rightTexture),this.set_texture__(4,this._topTexture),this.set_texture__(5,this._bottomTexture)},set_texture__(e,t){let r=this.textureNodes[e];r?.removeInterest("set_loadState__",this),r=this.textureNodes[e]=A()(S().X3DTexture2DNode,t),r?.addInterest("set_loadState__",this,e,r),this.set_loadState__(e,r)},set_loadState__(e,t){this.setTextureBit(e,t?.checkLoadState()),this._update.addEvent()},setTextureBit(e,t){this.textureBits.set(e,t===S().COMPLETE_STATE)},isComplete(){if(63!==+this.textureBits)return!1;const e=this.textureNodes,t=e[0].getWidth();for(const r of e){if(r.getWidth()!==t)return!1;if(r.getHeight()!==t)return!1}return!0},update(){if(this.isComplete()){const e=this.getBrowser().getContext(),t=this.textureNodes,r=t[0].getWidth();if(r!==this.getSize()){const t=new Uint8Array(r*r*4);e.bindTexture(this.getTarget(),this.getTexture());for(let i=0;i<6;++i)e.texImage2D(this.getTargets()[i],0,e.RGBA,r,r,0,e.RGBA,e.UNSIGNED_BYTE,t);this.setSize(r),this.updateTextureParameters()}e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer);for(let i=0;i<6;++i){const s=t[i];if(e.bindTexture(e.TEXTURE_2D,s.getTexture()),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,s.getTexture(),0),e.bindTexture(this.getTarget(),this.getTexture()),1===s.getTextureType())e.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,r,r);else for(let t=0;t<r;++t)e.copyTexSubImage2D(this.getTargets()[i],0,0,r-t-1,0,t,r,1)}this.setTransparent(t.some(e=>e.isTransparent())),this.setLinear(t.some(e=>e.isLinear())),this.setMipMaps(t.every(e=>e.canMipMaps())),this.updateTextureParameters(),this.addNodeEvent()}else this.clearTexture(),this.addNodeEvent()},getRenderedTextures(e){for(const t of this.textureNodes)t?.getRenderedTextures(e)}}),Object.defineProperties(y,{...m().getStaticProperties("ComposedCubeMapTexture","CubeMapTexturing",1,"texture","3.1"),fieldDefinitions:{value:new(E())([new(g())(S().inputOutput,"metadata",new(x().SFNode)),new(g())(S().inputOutput,"description",new(x().SFString)),new(g())(S().inputOutput,"frontTexture",new(x().SFNode)),new(g())(S().inputOutput,"backTexture",new(x().SFNode)),new(g())(S().inputOutput,"leftTexture",new(x().SFNode)),new(g())(S().inputOutput,"rightTexture",new(x().SFNode)),new(g())(S().inputOutput,"topTexture",new(x().SFNode)),new(g())(S().inputOutput,"bottomTexture",new(x().SFNode)),new(g())(S().initializeOnly,"textureProperties",new(x().SFNode))]),enumerable:!0}});const N=y,X=o().add("ComposedCubeMapTexture",N),F=e.DependentRenderer;var B=i.n(F);const O=e.TextureBuffer;var D=i.n(O);const L=e.TraverseType;var V=i.n(L);const z=e.Camera;var G=i.n(z);const j=e.ViewVolume;var k=i.n(j);const Y=e.Rotation4;var Z=i.n(Y);const W=e.Vector3;var H=i.n(W);const K=e.Vector4;var $=i.n(K);const q=e.Matrix4;var J=i.n(q);const Q=e.Algorithm;var ee=i.n(Q);function te(e){C.call(this,e),this.addType(S().GeneratedCubeMapTexture),this.dependentRenderers=new WeakMap,this.projectionMatrix=new(J()),this.modelMatrix=new(J()),this.updateCallbacks=new Map}Object.assign(Object.setPrototypeOf(te.prototype,C.prototype),{initialize(){C.prototype.initialize.call(this),this._size.addInterest("set_size__",this),this.set_size__()},isRenderedTexture:()=>!0,getRenderedTextures(e){e.add(this)},addUpdateCallback(e,t){this.updateCallbacks.set(e,t)},removeUpdateCallback(e){this.updateCallbacks.delete(e)},set_size__(){const e=this.getBrowser(),t=e.getContext();this.frameBuffer?.dispose();const r=this._size.getValue();if(r>0){const i=new Uint8Array(r*r*4);t.bindTexture(this.getTarget(),this.getTexture());for(const e of this.getTargets())t.texImage2D(e,0,t.RGBA,r,r,0,t.RGBA,t.UNSIGNED_BYTE,i);this.updateTextureParameters(),this.viewport=new($())(0,0,r,r),this.frameBuffer=new(D())({browser:e,width:r,height:r}),this.setSize(r)}else this.frameBuffer=null,this.setSize(0)},traverse(e,t){t.isIndependent()&&this.frameBuffer&&"NONE"!==this._update.getValue()&&(t.getRenderedTextures().add(this),this.modelMatrix.assign(t.getModelViewMatrix().get()).multRight(t.getCameraSpaceMatrix().get()))},renderTexture:(()=>{const e=[Z().fromVectors(H().Z_AXIS,H().NEGATIVE_Z_AXIS),Z().fromVectors(H().Z_AXIS,H().Z_AXIS),Z().fromVectors(H().Z_AXIS,H().X_AXIS),Z().fromVectors(H().Z_AXIS,H().NEGATIVE_X_AXIS),Z().fromVectors(H().Z_AXIS,H().NEGATIVE_Y_AXIS),Z().fromVectors(H().Z_AXIS,H().Y_AXIS)],t=[new(H())(-1,-1,1),new(H())(-1,-1,1),new(H())(-1,-1,1),new(H())(-1,-1,1),new(H())(1,1,1),new(H())(1,1,1)],r=new(J()),i=new(k());return function(s){this.textureRenderingPass=!0,this.dependentRenderers.has(s)||this.dependentRenderers.set(s,new(B())(this.getExecutionContext(),s));const a=this.dependentRenderers.get(s),n=this.getBrowser(),o=n.getContext(),u=s.getLayer(),h=this.viewport,d=a.getBackground(),T=a.getNavigationInfo(),p=a.getViewpoint(),c=n.getHeadlight(),x=T._headlight.getValue(),l=p.getNearDistance(T),g=p.getFarDistance(T),_=G().perspective(ee().radians(90),l,g,1,1,this.projectionMatrix),E=this.frameBuffer.getWidth(),f=this.frameBuffer.getHeight();this.setTransparent(d.isTransparent()),a.setFramebuffer(this.frameBuffer),a.getViewVolumes().push(i.set(_,h,h)),a.getProjectionMatrix().push(_),o.bindTexture(this.getTarget(),this.getTexture()),this.frameBuffer.bind();for(let i=0;i<6;++i)o.viewport(...h),o.scissor(...h),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),a.getCameraSpaceMatrix().push(this.modelMatrix),a.getCameraSpaceMatrix().rotate(e[i]),a.getCameraSpaceMatrix().scale(t[i]),r.assign(a.getCameraSpaceMatrix().get()).inverse(),a.getViewMatrix().push(r),a.getModelViewMatrix().push(r),x&&(c.modelViewMatrix.push(r),c.modelViewMatrix.multLeft(p.getCameraSpaceMatrix())),u.traverse(V().DISPLAY,a),x&&c.modelViewMatrix.pop(),a.getModelViewMatrix().pop(),a.getCameraSpaceMatrix().pop(),a.getViewMatrix().pop(),o.bindTexture(this.getTarget(),this.getTexture()),o.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,E,f);this.updateTextureParameters(),a.getProjectionMatrix().pop(),a.getViewVolumes().pop(),this._update.equals("NEXT_FRAME_ONLY")&&(this._update="NONE");for(const e of this.updateCallbacks.values())e();this.textureRenderingPass=!1}})(),setShaderUniforms(e,t){C.prototype.setShaderUniforms.call(this,e,t),this.textureRenderingPass&&e.scissor(0,0,0,0)}}),Object.defineProperties(te,{...m().getStaticProperties("GeneratedCubeMapTexture","CubeMapTexturing",3,"texture","3.0"),fieldDefinitions:{value:new(E())([new(g())(S().inputOutput,"metadata",new(x().SFNode)),new(g())(S().inputOutput,"description",new(x().SFString)),new(g())(S().inputOutput,"update",new(x().SFString)("NONE")),new(g())(S().initializeOnly,"size",new(x().SFInt32)(128)),new(g())(S().initializeOnly,"textureProperties",new(x().SFNode))]),enumerable:!0}});const re=te,ie=o().add("GeneratedCubeMapTexture",re),se=e.X3DUrlObject;var ae=i.n(se);const ne=e.FileLoader;var oe=i.n(ne);const ue=e.Vector2;var he=i.n(ue);const de=e.DEVELOPMENT;var Te=i.n(de),pe=i(254);function ce(e){C.call(this,e),ae().call(this,e),this.addType(S().ImageCubeMapTexture),this.image=pe("<img></img>"),this.urlStack=new(x().MFString)}Object.assign(Object.setPrototypeOf(ce.prototype,C.prototype),ae().prototype,{initialize(){C.prototype.initialize.call(this),ae().prototype.initialize.call(this),this.image.on("load",this.setImage.bind(this)).on("abort error",this.setError.bind(this)).attr("crossorigin","anonymous"),this.requestImmediateLoad().catch(Function.prototype)},unloadData(){this.clearTexture()},loadData(){this.urlStack.setValue(this._url),this.loadNext()},loadNext(){if(0===this.urlStack.length)return this.clearTexture(),this.setLoadState(S().FAILED_STATE),void this.addNodeEvent();new(oe())(this,{dataAsString:!1}).loadDocument([this.urlStack.shift()],(e,t)=>{if(null===e)this.loadNext();else{if(!(e instanceof ArrayBuffer))throw new Error("ImageTexture: no suitable file type handler found.");this.fileURL=new URL(t),this.fileURL.pathname.match(/\.ktx2?(?:\.gz)?$/)||this.fileURL.href.match(/^\s*data:image\/ktx2[;,]/s)?(this.setLinear(!0),this.setMipMaps(!1),this.getBrowser().getKTXDecoder().then(t=>t.loadKTXFromBuffer(e)).then(e=>this.setKTXTexture(e)).catch(e=>this.setError({type:e.message}))):(this.setLinear(!1),this.setMipMaps(!0),this.objectURL=URL.createObjectURL(new Blob([e])),this.image.attr("src",this.objectURL))}})},setError(e){"data:"!==this.fileURL.protocol&&console.warn(`Error loading image '${decodeURI(this.fileURL)}':`,e.type),URL.revokeObjectURL(this.objectURL),this.loadNext()},setKTXTexture(e){if(e.target!==this.getTarget())return this.setError({type:"Invalid KTX texture target, must be 'TEXTURE_CUBE_MAP'."});Te()&&"data:"!==this.fileURL.protocol&&console.info(`Done loading image cube map texture '${decodeURI(this.fileURL)}'.`);try{this.setTexture(e),this.setTransparent(!1),this.setSize(e.baseWidth),this.updateTextureParameters(),this.setLoadState(S().COMPLETE_STATE),this.addNodeEvent()}catch(e){this.setError({type:e.message})}},setImage(){Te()&&"data:"!==this.fileURL.protocol&&console.info(`Done loading image cube map texture '${decodeURI(this.fileURL)}'.`);try{const e=this.getBrowser().getContext(),t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.image[0]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.imageToCubeMap(t,this.image.prop("width"),this.image.prop("height"),!1),this.setLoadState(S().COMPLETE_STATE),this.addNodeEvent()}catch(e){this.setError({type:e.message})}finally{URL.revokeObjectURL(this.objectURL)}},imageToCubeMap(e,t,r){const i=t/r;Math.abs(i-4/3)<.01&&this.skyBoxToCubeMap(e,t,r),Math.abs(i-2)<.01&&this.panoramaToCubeMap(e,t,r),this.updateTextureParameters()},skyBoxToCubeMap:(()=>{const e=[new(he())(1,1),new(he())(3,1),new(he())(0,1),new(he())(2,1),new(he())(1,0),new(he())(1,2)];return function(t,r,i){const s=this.getBrowser().getContext(),a=s.createFramebuffer(),n=Math.floor(r/4),o=Math.floor(i/3),u=new Uint8Array(n*o*4);s.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)s.texImage2D(this.getTargets()[e],0,s.RGBA,n,o,0,s.RGBA,s.UNSIGNED_BYTE,null);s.bindFramebuffer(s.FRAMEBUFFER,a),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,t,0);let h=!1;s.bindTexture(this.getTarget(),this.getTexture());for(let t=0;t<6;++t)s.copyTexSubImage2D(this.getTargets()[t],0,0,0,e[t].x*n,e[t].y*o,n,o),h||(s.readPixels(e[t].x*n,e[t].y*o,n,o,s.RGBA,s.UNSIGNED_BYTE,u),h=this.isImageTransparent(u));s.deleteFramebuffer(a),s.deleteTexture(t),this.setTransparent(h),this.setSize(n)}})(),panoramaToCubeMap(e,t,r){const i=this.getBrowser(),s=i.getContext(),a=i.getPanoramaShader(),n=s.createFramebuffer(),o=Math.floor(r/2),u=new Uint8Array(o*o*4);s.bindTexture(s.TEXTURE_2D,e),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.MIRRORED_REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.MIRRORED_REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)s.texImage2D(this.getTargets()[e],0,s.RGBA,o,o,0,s.RGBA,s.UNSIGNED_BYTE,null);s.useProgram(a.getProgram()),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,e),s.uniform1i(a.x3d_PanoramaTextureEXT,0),s.bindFramebuffer(s.FRAMEBUFFER,n),s.viewport(0,0,o,o),s.scissor(0,0,o,o),s.disable(s.DEPTH_TEST),s.enable(s.CULL_FACE),s.frontFace(s.CCW),s.clearColor(0,0,0,0),s.bindVertexArray(i.getFullscreenVertexArrayObject());let h=!1;for(let e=0;e<6;++e)s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,this.getTargets()[e],this.getTexture(),0),s.clear(s.COLOR_BUFFER_BIT),s.uniform1i(a.x3d_CurrentFaceEXT,e),s.drawArrays(s.TRIANGLES,0,6),h||(s.readPixels(0,0,o,o,s.RGBA,s.UNSIGNED_BYTE,u),h=this.isImageTransparent(u));s.enable(s.DEPTH_TEST),s.deleteFramebuffer(n),s.deleteTexture(e),this.setTransparent(h),this.setSize(o)},dispose(){ae().prototype.dispose.call(this),C.prototype.dispose.call(this)}}),Object.defineProperties(ce,{...m().getStaticProperties("ImageCubeMapTexture","CubeMapTexturing",2,"texture","3.0"),fieldDefinitions:{value:new(E())([new(g())(S().inputOutput,"metadata",new(x().SFNode)),new(g())(S().inputOutput,"description",new(x().SFString)),new(g())(S().inputOutput,"load",new(x().SFBool)(!0)),new(g())(S().inputOutput,"url",new(x().MFString)),new(g())(S().inputOutput,"autoRefresh",new(x().SFTime)(0)),new(g())(S().inputOutput,"autoRefreshTimeLimit",new(x().SFTime)(3600)),new(g())(S().initializeOnly,"textureProperties",new(x().SFNode))]),enumerable:!0}});const xe=ce,le=o().add("ImageCubeMapTexture",xe);a().add({name:"CubeMapTexturing",concreteNodes:[X,ie,le],abstractNodes:[C],browserContext:p});o().add("CubeMapTexturingComponent",void 0)})();
|
|
1
|
+
/* X_ITE v16.0.0 */
|
|
2
|
+
const e=window[Symbol.for("X_ITE.X3D")];(()=>{const t={n:e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{if(Array.isArray(r))for(var i=0;i<r.length;){var a=r[i++],s=r[i++];t.o(e,a)?0===s&&i++:0===s?Object.defineProperty(e,a,{enumerable:!0,value:r[i++]}):Object.defineProperty(e,a,{enumerable:!0,get:s})}else for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},r=e.Components;var i=t.n(r);const a=e.Namespace;var s=t.n(a);const n=s().add("Panorama2.fs","#version 300 es\nprecision highp float;precision highp int;precision highp sampler2D;const float M_PI=3.1415926535897932384626433832795;in vec2 texCoord;out vec4 x3d_FragColor;uniform sampler2D x3d_PanoramaTextureEXT;uniform int x3d_CurrentFaceEXT;vec3 uvToXYZ(const in int face,const in vec2 uv){switch(face){case 0:return vec3(1.,uv.y,uv.x);case 1:return vec3(-1.,uv.y,-uv.x);case 2:return vec3(uv.x,uv.y,-1.);case 3:return vec3(-uv.x,uv.y,1.);case 4:return vec3(uv.y,-1.,uv.x);default:return vec3(-uv.y,1.,uv.x);}}vec2 dirToUV(const in vec3 dir){return vec2(.5+.5*atan(dir.z,dir.x)/M_PI,1.-acos(dir.y)/M_PI);}vec3 panoramaToCubeMap(const in int face,const in vec2 texCoord){vec3 scan=uvToXYZ(face,texCoord);vec3 direction=normalize(scan);vec2 src=dirToUV(direction);return texture(x3d_PanoramaTextureEXT,src).rgb;}void main(){x3d_FragColor=vec4(panoramaToCubeMap(x3d_CurrentFaceEXT,texCoord),1.);}"),o=Symbol();function u(){}Object.assign(u.prototype,{getPanoramaShader(){return this[o]??=this.createShader({name:"Panorama",vertexShader:"FullScreen",fragmentShader:`data:x-shader/x-fragment,${n}`,uniforms:["x3d_PanoramaTextureEXT","x3d_CurrentFaceEXT"]})}});const T=u,d=s().add("X3DCubeMapTexturingContext",T),h=e.Fields;var p=t.n(h);const c=e.X3DFieldDefinition;var x=t.n(c);const l=e.FieldDefinitionArray;var g=t.n(l);const _=e.X3DNode;var E=t.n(_);const f=e.X3DSingleTextureNode;var m=t.n(f);const b=e.X3DConstants;var w=t.n(b);function R(e){m().call(this,e),this.addType(w().X3DEnvironmentTextureNode);const t=this.getBrowser().getContext();this.target=t.TEXTURE_CUBE_MAP,this.targets=[t.TEXTURE_CUBE_MAP_POSITIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_Y,t.TEXTURE_CUBE_MAP_NEGATIVE_Y]}Object.assign(Object.setPrototypeOf(R.prototype,m().prototype),{initialize(){m().prototype.initialize.call(this),this.clearTexture()},getTarget(){return this.target},getTargets(){return this.targets},getTextureType:()=>4,getSize(){return this.size},setSize(e){this.size=e,this.levels=Math.floor(Math.log2(Math.max(e,1)))},getLevels(){return this.levels},clearTexture:(()=>{const e=new Uint8Array([255,255,255,255]);return function(){const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(const r of this.getTargets())t.texImage2D(r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,e);this.setSize(1),this.setTransparent(!1),this.updateTextureParameters(),this.addNodeEvent()}})(),updateTextureParameters(){m().prototype.updateTextureParameters.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,this.size,this.size,!1,!1,!1)},setShaderUniforms(e,t){const r=this.getBrowser().popTextureUnit();e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_CUBE_MAP,this.getTexture()),e.uniform1i(t.textureCube,r)}}),Object.defineProperties(R,E().getStaticProperties("X3DEnvironmentTextureNode","CubeMapTexturing",1));const S=R,M=s().add("X3DEnvironmentTextureNode",S),C=e.X3DCast;var v=t.n(C);const A=e.BitSet;var I=t.n(A);function P(e){M.call(this,e),this.addType(w().ComposedCubeMapTexture),this.addChildObjects(w().outputOnly,"update",new(p().SFTime)),e.getSpecificationVersion()<=3.3&&(this.addAlias("front",this._frontTexture),this.addAlias("back",this._backTexture),this.addAlias("left",this._leftTexture),this.addAlias("right",this._rightTexture),this.addAlias("top",this._topTexture),this.addAlias("bottom",this._bottomTexture)),this.textureNodes=[null,null,null,null,null,null],this.textureBits=new(I())}Object.assign(Object.setPrototypeOf(P.prototype,M.prototype),{initialize(){M.prototype.initialize.call(this);const e=this.getBrowser().getContext();this.frameBuffer=e.createFramebuffer(),this._frontTexture.addInterest("set_texture__",this,0),this._backTexture.addInterest("set_texture__",this,1),this._leftTexture.addInterest("set_texture__",this,2),this._rightTexture.addInterest("set_texture__",this,3),this._topTexture.addInterest("set_texture__",this,5),this._bottomTexture.addInterest("set_texture__",this,4),this._update.addInterest("update",this),this.set_texture__(0,this._frontTexture),this.set_texture__(1,this._backTexture),this.set_texture__(2,this._leftTexture),this.set_texture__(3,this._rightTexture),this.set_texture__(4,this._topTexture),this.set_texture__(5,this._bottomTexture)},set_texture__(e,t){let r=this.textureNodes[e];r?.removeInterest("set_loadState__",this),r=this.textureNodes[e]=v()(w().X3DTexture2DNode,t),r?.addInterest("set_loadState__",this,e,r),this.set_loadState__(e,r)},set_loadState__(e,t){this.setTextureBit(e,t?.checkLoadState()),this._update.addEvent()},setTextureBit(e,t){this.textureBits.set(e,t===w().COMPLETE_STATE)},isComplete(){if(63!==+this.textureBits)return!1;const e=this.textureNodes,t=e[0].getWidth();for(const r of e){if(r.getWidth()!==t)return!1;if(r.getHeight()!==t)return!1}return!0},update(){if(this.isComplete()){const e=this.getBrowser().getContext(),t=this.textureNodes,r=t[0].getWidth();if(r!==this.getSize()){const t=new Uint8Array(r*r*4);e.bindTexture(this.getTarget(),this.getTexture());for(let i=0;i<6;++i)e.texImage2D(this.getTargets()[i],0,e.RGBA,r,r,0,e.RGBA,e.UNSIGNED_BYTE,t);this.setSize(r),this.updateTextureParameters()}e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer);for(let i=0;i<6;++i){const a=t[i];if(e.bindTexture(e.TEXTURE_2D,a.getTexture()),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a.getTexture(),0),e.bindTexture(this.getTarget(),this.getTexture()),1===a.getTextureType())e.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,r,r);else for(let t=0;t<r;++t)e.copyTexSubImage2D(this.getTargets()[i],0,0,r-t-1,0,t,r,1)}this.setTransparent(t.some(e=>e.isTransparent())),this.setLinear(t.some(e=>e.isLinear())),this.setMipMaps(t.every(e=>e.canMipMaps())),this.updateTextureParameters(),this.addNodeEvent()}else this.clearTexture()},getRenderedTextures(e){for(const t of this.textureNodes)t?.getRenderedTextures(e)}}),Object.defineProperties(P,{...E().getStaticProperties("ComposedCubeMapTexture","CubeMapTexturing",1,"texture","3.1"),fieldDefinitions:{value:new(g())([new(x())(w().inputOutput,"metadata",new(p().SFNode)),new(x())(w().inputOutput,"description",new(p().SFString)),new(x())(w().inputOutput,"frontTexture",new(p().SFNode)),new(x())(w().inputOutput,"backTexture",new(p().SFNode)),new(x())(w().inputOutput,"leftTexture",new(p().SFNode)),new(x())(w().inputOutput,"rightTexture",new(p().SFNode)),new(x())(w().inputOutput,"topTexture",new(p().SFNode)),new(x())(w().inputOutput,"bottomTexture",new(p().SFNode)),new(x())(w().initializeOnly,"textureProperties",new(p().SFNode))]),enumerable:!0}});const U=P,X=s().add("ComposedCubeMapTexture",U),y=e.DependentRenderer;var N=t.n(y);const B=e.TextureBuffer;var F=t.n(B);const D=e.TraverseType;var O=t.n(D);const L=e.Camera;var V=t.n(L);const G=e.ViewVolume;var z=t.n(G);const j=e.Rotation4;var k=t.n(j);const Y=e.Vector3;var Z=t.n(Y);const W=e.Vector4;var H=t.n(W);const $=e.Matrix4;var K=t.n($);const q=e.Algorithm;var J=t.n(q);function Q(e){M.call(this,e),this.addType(w().GeneratedCubeMapTexture),this.dependentRenderers=new WeakMap,this.projectionMatrix=new(K()),this.modelMatrix=new(K()),this.updateCallbacks=new Map}Object.assign(Object.setPrototypeOf(Q.prototype,M.prototype),{initialize(){M.prototype.initialize.call(this),this._size.addInterest("set_size__",this),this.set_size__()},isRenderedTexture:()=>!0,getRenderedTextures(e){e.add(this)},addUpdateCallback(e,t){this.updateCallbacks.set(e,t)},removeUpdateCallback(e){this.updateCallbacks.delete(e)},set_size__(){const e=this._size.getValue();if(this.frameBuffer?.dispose(),e>0){const t=this.getBrowser(),r=t.getContext(),i=new Uint8Array(e*e*4);r.bindTexture(this.getTarget(),this.getTexture());for(const t of this.getTargets())r.texImage2D(t,0,r.RGBA,e,e,0,r.RGBA,r.UNSIGNED_BYTE,i);this.updateTextureParameters(),this.viewport=new(H())(0,0,e,e),this.frameBuffer=new(F())({browser:t,width:e,height:e}),this.setSize(e)}else this.frameBuffer=null,this.clearTexture()},traverse(e,t){t.isIndependent()&&this.frameBuffer&&"NONE"!==this._update.getValue()&&(t.getRenderedTextures().add(this),this.modelMatrix.assign(t.getModelViewMatrix().get()).multRight(t.getCameraSpaceMatrix().get()))},renderTexture:(()=>{const e=[k().fromVectors(Z().Z_AXIS,Z().NEGATIVE_Z_AXIS),k().fromVectors(Z().Z_AXIS,Z().Z_AXIS),k().fromVectors(Z().Z_AXIS,Z().X_AXIS),k().fromVectors(Z().Z_AXIS,Z().NEGATIVE_X_AXIS),k().fromVectors(Z().Z_AXIS,Z().NEGATIVE_Y_AXIS),k().fromVectors(Z().Z_AXIS,Z().Y_AXIS)],t=[new(Z())(-1,-1,1),new(Z())(-1,-1,1),new(Z())(-1,-1,1),new(Z())(-1,-1,1),new(Z())(1,1,1),new(Z())(1,1,1)],r=new(K()),i=new(z());return function(a){this.textureRenderingPass=!0,this.dependentRenderers.has(a)||this.dependentRenderers.set(a,new(N())(this.getExecutionContext(),a));const s=this.dependentRenderers.get(a),n=this.getBrowser(),o=n.getContext(),u=this.viewport,T=s.getBackground(),d=s.getNavigationInfo(),h=s.getViewpoint(),p=n.getHeadlight(),c=d._headlight.getValue(),x=h.getNearDistance(d),l=h.getFarDistance(d),g=V().perspective(J().radians(90),x,l,1,1,this.projectionMatrix),_=this.frameBuffer.getWidth(),E=this.frameBuffer.getHeight();this.setTransparent(T.isTransparent()),s.setFramebuffer(this.frameBuffer),s.getViewVolumes().push(i.set(g,u)),s.getProjectionMatrix().push(g),o.bindTexture(this.getTarget(),this.getTexture()),this.frameBuffer.bind();for(let i=0;i<6;++i)o.viewport(...u),o.scissor(...u),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),s.getCameraSpaceMatrix().push(this.modelMatrix),s.getCameraSpaceMatrix().rotate(e[i]),s.getCameraSpaceMatrix().scale(t[i]),r.assign(s.getCameraSpaceMatrix().get()).inverse(),s.getViewMatrix().push(r),s.getModelViewMatrix().push(r),c&&(p.modelViewMatrix.push(r),p.modelViewMatrix.multLeft(h.getCameraSpaceMatrix())),a.getLayer().traverse(O().DISPLAY,s),c&&p.modelViewMatrix.pop(),s.getModelViewMatrix().pop(),s.getCameraSpaceMatrix().pop(),s.getViewMatrix().pop(),o.bindTexture(this.getTarget(),this.getTexture()),o.copyTexSubImage2D(this.getTargets()[i],0,0,0,0,0,_,E);this.updateTextureParameters(),s.getProjectionMatrix().pop(),s.getViewVolumes().pop(),this._update.equals("NEXT_FRAME_ONLY")&&(this._update="NONE");for(const e of this.updateCallbacks.values())e();this.textureRenderingPass=!1}})(),setShaderUniforms(e,t){M.prototype.setShaderUniforms.call(this,e,t),this.textureRenderingPass&&e.scissor(0,0,0,0)}}),Object.defineProperties(Q,{...E().getStaticProperties("GeneratedCubeMapTexture","CubeMapTexturing",3,"texture","3.0"),fieldDefinitions:{value:new(g())([new(x())(w().inputOutput,"metadata",new(p().SFNode)),new(x())(w().inputOutput,"description",new(p().SFString)),new(x())(w().inputOutput,"update",new(p().SFString)("NONE")),new(x())(w().initializeOnly,"size",new(p().SFInt32)(128)),new(x())(w().initializeOnly,"textureProperties",new(p().SFNode))]),enumerable:!0}});const ee=Q,te=s().add("GeneratedCubeMapTexture",ee),re=e.X3DUrlObject;var ie=t.n(re);const ae=e.FileLoader;var se=t.n(ae);const ne=e.Vector2;var oe=t.n(ne);const ue=e.DEVELOPMENT;var Te=t.n(ue);function de(e){M.call(this,e),ie().call(this,e),this.addType(w().ImageCubeMapTexture)}Object.assign(Object.setPrototypeOf(de.prototype,M.prototype),ie().prototype,{initialize(){M.prototype.initialize.call(this),ie().prototype.initialize.call(this),this.requestImmediateLoad().catch(Function.prototype)},unloadData(){this.clearTexture()},loadData(){new(se())(this,{dataAsString:!1}).loadDocument(this._url,async(e,t)=>{if(null===e)this.clearTexture(),this.setLoadState(w().FAILED_STATE);else{if(!(e instanceof ArrayBuffer))throw new Error(`${this.getTypeName()}: No suitable file handler found.`);if((t=new URL(t)).pathname.match(/\.ktx2?(?:\.gz)?$/)||t.href.match(/^\s*data:image\/ktx2[;,]/s)){this.setLinear(!0),this.setMipMaps(!1);const r=await this.getBrowser().getKTXDecoder(),i=await r.loadKTXFromBuffer(e);this.setKTXTexture(i,t)}else{this.setLinear(!1),this.setMipMaps(!0);const r=URL.createObjectURL(new Blob([e]));try{this.setImage(await this.loadImage(r),t)}finally{URL.revokeObjectURL(r)}}}})},setKTXTexture(e,t){if(e.target!==this.getTarget())throw new Error("Invalid KTX texture target, must be 'TEXTURE_CUBE_MAP'.");Te()&&"data:"!==t.protocol&&console.info(`Done loading ${this.getTypeName()} '${decodeURI(t)}'.`),this.setTexture(e),this.setTransparent(!1),this.setSize(e.baseWidth),this.updateTextureParameters(),this.setLoadState(w().COMPLETE_STATE)},setImage(e,t){Te()&&"data:"!==t.protocol&&console.info(`Done loading ${this.getTypeName()} '${decodeURI(t)}'.`);const r=this.getBrowser().getContext(),i=r.createTexture();r.bindTexture(r.TEXTURE_2D,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),this.imageToCubeMap(i,e.width,e.height,!1),this.setLoadState(w().COMPLETE_STATE),this.addNodeEvent()},imageToCubeMap(e,t,r){const i=t/r;Math.abs(i-4/3)<.01&&this.skyBoxToCubeMap(e,t,r),Math.abs(i-2)<.01&&this.panoramaToCubeMap(e,t,r),this.updateTextureParameters()},skyBoxToCubeMap:(()=>{const e=[new(oe())(1,1),new(oe())(3,1),new(oe())(0,1),new(oe())(2,1),new(oe())(1,0),new(oe())(1,2)];return function(t,r,i){const a=this.getBrowser().getContext(),s=a.createFramebuffer(),n=Math.floor(r/4),o=Math.floor(i/3),u=new Uint8Array(n*o*4);a.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)a.texImage2D(this.getTargets()[e],0,a.RGBA,n,o,0,a.RGBA,a.UNSIGNED_BYTE,null);a.bindFramebuffer(a.FRAMEBUFFER,s),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,t,0);let T=!1;a.bindTexture(this.getTarget(),this.getTexture());for(let t=0;t<6;++t)a.copyTexSubImage2D(this.getTargets()[t],0,0,0,e[t].x*n,e[t].y*o,n,o),T||(a.readPixels(e[t].x*n,e[t].y*o,n,o,a.RGBA,a.UNSIGNED_BYTE,u),T=this.isImageTransparent(u));a.deleteFramebuffer(s),a.deleteTexture(t),this.setTransparent(T),this.setSize(n)}})(),panoramaToCubeMap(e,t,r){const i=this.getBrowser(),a=i.getContext(),s=i.getPanoramaShader(),n=a.createFramebuffer(),o=Math.floor(r/2),u=new Uint8Array(o*o*4);a.bindTexture(a.TEXTURE_2D,e),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.MIRRORED_REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.MIRRORED_REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)a.texImage2D(this.getTargets()[e],0,a.RGBA,o,o,0,a.RGBA,a.UNSIGNED_BYTE,null);a.useProgram(s.getProgram()),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e),a.uniform1i(s.x3d_PanoramaTextureEXT,0),a.bindFramebuffer(a.FRAMEBUFFER,n),a.viewport(0,0,o,o),a.scissor(0,0,o,o),a.disable(a.DEPTH_TEST),a.enable(a.CULL_FACE),a.frontFace(a.CCW),a.clearColor(0,0,0,0),a.bindVertexArray(i.getFullscreenVertexArrayObject());let T=!1;for(let e=0;e<6;++e)a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,this.getTargets()[e],this.getTexture(),0),a.clear(a.COLOR_BUFFER_BIT),a.uniform1i(s.x3d_CurrentFaceEXT,e),a.drawArrays(a.TRIANGLES,0,6),T||(a.readPixels(0,0,o,o,a.RGBA,a.UNSIGNED_BYTE,u),T=this.isImageTransparent(u));a.enable(a.DEPTH_TEST),a.deleteFramebuffer(n),a.deleteTexture(e),this.setTransparent(T),this.setSize(o)},dispose(){ie().prototype.dispose.call(this),M.prototype.dispose.call(this)}}),Object.defineProperties(de,{...E().getStaticProperties("ImageCubeMapTexture","CubeMapTexturing",2,"texture","3.0"),fieldDefinitions:{value:new(g())([new(x())(w().inputOutput,"metadata",new(p().SFNode)),new(x())(w().inputOutput,"description",new(p().SFString)),new(x())(w().inputOutput,"load",new(p().SFBool)(!0)),new(x())(w().inputOutput,"url",new(p().MFString)),new(x())(w().inputOutput,"autoRefresh",new(p().SFTime)(0)),new(x())(w().inputOutput,"autoRefreshTimeLimit",new(p().SFTime)(3600)),new(x())(w().initializeOnly,"textureProperties",new(p().SFNode))]),enumerable:!0}});const he=de,pe=s().add("ImageCubeMapTexture",he);i().add({name:"CubeMapTexturing",concreteNodes:[X,te,pe],abstractNodes:[M],browserContext:d});s().add("CubeMapTexturingComponent",void 0)})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE
|
|
1
|
+
/* X_ITE v16.0.0 */
|
|
2
2
|
const t=window[Symbol.for("X_ITE.X3D")];(()=>{const e={n:t=>{const n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{if(Array.isArray(n))for(var i=0;i<n.length;){var u=n[i++],p=n[i++];e.o(t,u)?0===p&&i++:0===p?Object.defineProperty(t,u,{enumerable:!0,value:n[i++]}):Object.defineProperty(t,u,{enumerable:!0,get:p})}else for(var u in n)e.o(n,u)&&!e.o(t,u)&&Object.defineProperty(t,u,{enumerable:!0,get:n[u]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},n=t.Components;var i=e.n(n);const u=t.Fields;var p=e.n(u);const o=t.X3DFieldDefinition;var a=e.n(o);const w=t.FieldDefinitionArray;var r=e.n(w);const l=t.X3DNode;var S=e.n(l);const s=t.X3DChildNode;var O=e.n(s);const F=t.X3DConstants;var c=e.n(F);const d=t.Namespace;var y=e.n(d);function I(t){O().call(this,t),this.addType(c().DISEntityManager),t.getSpecificationVersion()<=3.3&&this.addAlias("mapping",this._children)}Object.setPrototypeOf(I.prototype,O().prototype),Object.defineProperties(I,{...S().getStaticProperties("DISEntityManager","DIS",2,"children","3.0"),fieldDefinitions:{value:new(r())([new(a())(c().inputOutput,"metadata",new(p().SFNode)),new(a())(c().inputOutput,"address",new(p().SFString)("localhost")),new(a())(c().inputOutput,"applicationID",new(p().SFInt32)),new(a())(c().inputOutput,"children",new(p().MFNode)),new(a())(c().inputOutput,"port",new(p().SFInt32)),new(a())(c().inputOutput,"siteID",new(p().SFInt32)),new(a())(c().outputOnly,"addedEntities",new(p().MFNode)),new(a())(c().outputOnly,"removedEntities",new(p().MFNode))]),enumerable:!0}});const m=I,g=y().add("DISEntityManager",m),h=t.X3DInfoNode;var f=e.n(h);const D=t.X3DUrlObject;var b=e.n(D);function P(t){f().call(this,t),b().call(this,t),this.addType(c().DISEntityTypeMapping)}Object.assign(Object.setPrototypeOf(P.prototype,f().prototype),b().prototype,{initialize(){f().prototype.initialize.call(this),b().prototype.initialize.call(this)},dispose(){b().prototype.dispose.call(this),f().prototype.dispose.call(this)}}),Object.defineProperties(P,{...S().getStaticProperties("DISEntityTypeMapping","DIS",2,"children","3.0"),fieldDefinitions:{value:new(r())([new(a())(c().inputOutput,"metadata",new(p().SFNode)),new(a())(c().inputOutput,"description",new(p().SFString)),new(a())(c().inputOutput,"load",new(p().SFBool)(!0)),new(a())(c().inputOutput,"url",new(p().MFString)),new(a())(c().inputOutput,"autoRefresh",new(p().SFTime)(0)),new(a())(c().inputOutput,"autoRefreshTimeLimit",new(p().SFTime)(3600)),new(a())(c().initializeOnly,"category",new(p().SFInt32)),new(a())(c().initializeOnly,"country",new(p().SFInt32)),new(a())(c().initializeOnly,"domain",new(p().SFInt32)),new(a())(c().initializeOnly,"extra",new(p().SFInt32)),new(a())(c().initializeOnly,"kind",new(p().SFInt32)),new(a())(c().initializeOnly,"specific",new(p().SFInt32)),new(a())(c().initializeOnly,"subcategory",new(p().SFInt32))]),enumerable:!0}});const B=P,v=y().add("DISEntityTypeMapping",B),T=t.X3DGroupingNode;var V=e.n(T);const z=t.X3DNetworkSensorNode;var N=e.n(z);function _(t){V().call(this,t),N().call(this,t),this.addType(c().EspduTransform),t.getSpecificationVersion()<=3.3&&(this._applicationID=1,this._munitionApplicationID=1)}Object.assign(Object.setPrototypeOf(_.prototype,V().prototype),N().prototype,{initialize(){V().prototype.initialize.call(this),N().prototype.initialize.call(this)}}),Object.defineProperties(_,{...S().getStaticProperties("EspduTransform","DIS",1,"children","3.0"),fieldDefinitions:{value:new(r())([new(a())(c().inputOutput,"metadata",new(p().SFNode)),new(a())(c().inputOutput,"description",new(p().SFString)),new(a())(c().inputOutput,"enabled",new(p().SFBool)(!0)),new(a())(c().inputOutput,"visible",new(p().SFBool)(!0)),new(a())(c().inputOutput,"bboxDisplay",new(p().SFBool)),new(a())(c().initializeOnly,"bboxSize",new(p().SFVec3f)(-1,-1,-1)),new(a())(c().initializeOnly,"bboxCenter",new(p().SFVec3f)),new(a())(c().inputOnly,"addChildren",new(p().MFNode)),new(a())(c().inputOnly,"removeChildren",new(p().MFNode)),new(a())(c().inputOutput,"children",new(p().MFNode)),new(a())(c().outputOnly,"isActive",new(p().SFBool)),new(a())(c().inputOnly,"set_articulationParameterValue0",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue1",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue2",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue3",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue4",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue5",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue6",new(p().SFFloat)),new(a())(c().inputOnly,"set_articulationParameterValue7",new(p().SFFloat)),new(a())(c().inputOutput,"address",new(p().SFString)("localhost")),new(a())(c().inputOutput,"applicationID",new(p().SFInt32)),new(a())(c().inputOutput,"articulationParameterCount",new(p().SFInt32)),new(a())(c().inputOutput,"articulationParameterDesignatorArray",new(p().MFInt32)),new(a())(c().inputOutput,"articulationParameterChangeIndicatorArray",new(p().MFInt32)),new(a())(c().inputOutput,"articulationParameterIdPartAttachedToArray",new(p().MFInt32)),new(a())(c().inputOutput,"articulationParameterTypeArray",new(p().MFInt32)),new(a())(c().inputOutput,"articulationParameterArray",new(p().MFFloat)),new(a())(c().inputOutput,"center",new(p().SFVec3f)),new(a())(c().inputOutput,"collisionType",new(p().SFInt32)),new(a())(c().inputOutput,"deadReckoning",new(p().SFInt32)),new(a())(c().inputOutput,"detonationLocation",new(p().SFVec3f)),new(a())(c().inputOutput,"detonationRelativeLocation",new(p().SFVec3f)),new(a())(c().inputOutput,"detonationResult",new(p().SFInt32)),new(a())(c().inputOutput,"entityCategory",new(p().SFInt32)),new(a())(c().inputOutput,"entityCountry",new(p().SFInt32)),new(a())(c().inputOutput,"entityDomain",new(p().SFInt32)),new(a())(c().inputOutput,"entityExtra",new(p().SFInt32)),new(a())(c().inputOutput,"entityID",new(p().SFInt32)),new(a())(c().inputOutput,"entityKind",new(p().SFInt32)),new(a())(c().inputOutput,"entitySpecific",new(p().SFInt32)),new(a())(c().inputOutput,"entitySubcategory",new(p().SFInt32)),new(a())(c().inputOutput,"eventApplicationID",new(p().SFInt32)),new(a())(c().inputOutput,"eventEntityID",new(p().SFInt32)),new(a())(c().inputOutput,"eventNumber",new(p().SFInt32)),new(a())(c().inputOutput,"eventSiteID",new(p().SFInt32)),new(a())(c().inputOutput,"fired1",new(p().SFBool)),new(a())(c().inputOutput,"fired2",new(p().SFBool)),new(a())(c().inputOutput,"fireMissionIndex",new(p().SFInt32)),new(a())(c().inputOutput,"firingRange",new(p().SFFloat)),new(a())(c().inputOutput,"firingRate",new(p().SFInt32)),new(a())(c().inputOutput,"forceID",new(p().SFInt32)),new(a())(c().inputOutput,"fuse",new(p().SFInt32)),new(a())(c().inputOutput,"linearVelocity",new(p().SFVec3f)),new(a())(c().inputOutput,"linearAcceleration",new(p().SFVec3f)),new(a())(c().inputOutput,"marking",new(p().SFString)),new(a())(c().inputOutput,"multicastRelayHost",new(p().SFString)),new(a())(c().inputOutput,"multicastRelayPort",new(p().SFInt32)),new(a())(c().inputOutput,"munitionApplicationID",new(p().SFInt32)),new(a())(c().inputOutput,"munitionEndPoint",new(p().SFVec3f)),new(a())(c().inputOutput,"munitionEntityID",new(p().SFInt32)),new(a())(c().inputOutput,"munitionQuantity",new(p().SFInt32)),new(a())(c().inputOutput,"munitionSiteID",new(p().SFInt32)),new(a())(c().inputOutput,"munitionStartPoint",new(p().SFVec3f)),new(a())(c().inputOutput,"networkMode",new(p().SFString)("standAlone")),new(a())(c().inputOutput,"port",new(p().SFInt32)),new(a())(c().inputOutput,"readInterval",new(p().SFTime)(.1)),new(a())(c().inputOutput,"rotation",new(p().SFRotation)),new(a())(c().inputOutput,"scale",new(p().SFVec3f)(1,1,1)),new(a())(c().inputOutput,"scaleOrientation",new(p().SFRotation)),new(a())(c().inputOutput,"siteID",new(p().SFInt32)),new(a())(c().inputOutput,"translation",new(p().SFVec3f)),new(a())(c().inputOutput,"warhead",new(p().SFInt32)),new(a())(c().inputOutput,"writeInterval",new(p().SFTime)(1)),new(a())(c().outputOnly,"articulationParameterValue0_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue1_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue2_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue3_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue4_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue5_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue6_changed",new(p().SFFloat)),new(a())(c().outputOnly,"articulationParameterValue7_changed",new(p().SFFloat)),new(a())(c().outputOnly,"collideTime",new(p().SFTime)),new(a())(c().outputOnly,"detonateTime",new(p().SFTime)),new(a())(c().outputOnly,"firedTime",new(p().SFTime)),new(a())(c().outputOnly,"isCollided",new(p().SFBool)),new(a())(c().outputOnly,"isDetonated",new(p().SFBool)),new(a())(c().outputOnly,"isNetworkReader",new(p().SFBool)),new(a())(c().outputOnly,"isNetworkWriter",new(p().SFBool)),new(a())(c().outputOnly,"isRtpHeaderHeard",new(p().SFBool)),new(a())(c().outputOnly,"isStandAlone",new(p().SFBool)),new(a())(c().outputOnly,"timestamp",new(p().SFTime)),new(a())(c().inputOutput,"rtpHeaderExpected",new(p().SFBool)),new(a())(c().inputOutput,"geoCoords",new(p().SFVec3d)),new(a())(c().initializeOnly,"geoSystem",new(p().MFString)("GD","WE"))]),enumerable:!0}});const x=_,E=y().add("EspduTransform",x),M=t.X3DBoundedObject;var R=e.n(M);function A(t){N().call(this,t),R().call(this,t),this.addType(c().ReceiverPdu),t.getSpecificationVersion()<=3.3&&(this._applicationID=1,this._transmitterApplicationID=1)}Object.assign(Object.setPrototypeOf(A.prototype,N().prototype),R().prototype,{initialize(){N().prototype.initialize.call(this),R().prototype.initialize.call(this)},getBBox(t,e){return this.isDefaultBBoxSize()?t.set():t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},dispose(){R().prototype.dispose.call(this),N().prototype.dispose.call(this)}}),Object.defineProperties(A,{...S().getStaticProperties("ReceiverPdu","DIS",1,"children","3.0"),fieldDefinitions:{value:new(r())([new(a())(c().inputOutput,"metadata",new(p().SFNode)),new(a())(c().inputOutput,"description",new(p().SFString)),new(a())(c().inputOutput,"visible",new(p().SFBool)(!0)),new(a())(c().inputOutput,"bboxDisplay",new(p().SFBool)),new(a())(c().initializeOnly,"bboxSize",new(p().SFVec3f)(-1,-1,-1)),new(a())(c().initializeOnly,"bboxCenter",new(p().SFVec3f)),new(a())(c().inputOutput,"enabled",new(p().SFBool)(!0)),new(a())(c().outputOnly,"isActive",new(p().SFBool)),new(a())(c().inputOutput,"address",new(p().SFString)("localhost")),new(a())(c().inputOutput,"applicationID",new(p().SFInt32)),new(a())(c().inputOutput,"entityID",new(p().SFInt32)),new(a())(c().inputOutput,"multicastRelayHost",new(p().SFString)),new(a())(c().inputOutput,"multicastRelayPort",new(p().SFInt32)),new(a())(c().inputOutput,"networkMode",new(p().SFString)("standAlone")),new(a())(c().inputOutput,"port",new(p().SFInt32)),new(a())(c().inputOutput,"radioID",new(p().SFInt32)),new(a())(c().inputOutput,"readInterval",new(p().SFTime)(.1)),new(a())(c().inputOutput,"receivedPower",new(p().SFFloat)),new(a())(c().inputOutput,"receiverState",new(p().SFInt32)),new(a())(c().inputOutput,"rtpHeaderExpected",new(p().SFBool)),new(a())(c().inputOutput,"siteID",new(p().SFInt32)),new(a())(c().inputOutput,"transmitterApplicationID",new(p().SFInt32)),new(a())(c().inputOutput,"transmitterEntityID",new(p().SFInt32)),new(a())(c().inputOutput,"transmitterRadioID",new(p().SFInt32)),new(a())(c().inputOutput,"transmitterSiteID",new(p().SFInt32)),new(a())(c().inputOutput,"whichGeometry",new(p().SFInt32)(1)),new(a())(c().inputOutput,"writeInterval",new(p().SFTime)(1)),new(a())(c().outputOnly,"isNetworkReader",new(p().SFBool)),new(a())(c().outputOnly,"isNetworkWriter",new(p().SFBool)),new(a())(c().outputOnly,"isRtpHeaderHeard",new(p().SFBool)),new(a())(c().outputOnly,"isStandAlone",new(p().SFBool)),new(a())(c().outputOnly,"timestamp",new(p().SFTime)),new(a())(c().inputOutput,"geoCoords",new(p().SFVec3d)),new(a())(c().initializeOnly,"geoSystem",new(p().MFString)("GD","WE"))]),enumerable:!0}});const j=A,C=y().add("ReceiverPdu",j);function k(t){N().call(this,t),R().call(this,t),this.addType(c().SignalPdu),t.getSpecificationVersion()<=3.3&&(this._applicationID=1)}Object.assign(Object.setPrototypeOf(k.prototype,N().prototype),R().prototype,{initialize(){N().prototype.initialize.call(this),R().prototype.initialize.call(this)},getBBox(t,e){return this.isDefaultBBoxSize()?t.set():t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},dispose(){R().prototype.dispose.call(this),N().prototype.dispose.call(this)}}),Object.defineProperties(k,{...S().getStaticProperties("SignalPdu","DIS",1,"children","3.0"),fieldDefinitions:{value:new(r())([new(a())(c().inputOutput,"metadata",new(p().SFNode)),new(a())(c().inputOutput,"description",new(p().SFString)),new(a())(c().inputOutput,"visible",new(p().SFBool)(!0)),new(a())(c().inputOutput,"bboxDisplay",new(p().SFBool)),new(a())(c().initializeOnly,"bboxSize",new(p().SFVec3f)(-1,-1,-1)),new(a())(c().initializeOnly,"bboxCenter",new(p().SFVec3f)),new(a())(c().inputOutput,"enabled",new(p().SFBool)(!0)),new(a())(c().outputOnly,"isActive",new(p().SFBool)),new(a())(c().inputOutput,"address",new(p().SFString)("localhost")),new(a())(c().inputOutput,"applicationID",new(p().SFInt32)),new(a())(c().inputOutput,"data",new(p().MFInt32)),new(a())(c().inputOutput,"dataLength",new(p().SFInt32)),new(a())(c().inputOutput,"encodingScheme",new(p().SFInt32)),new(a())(c().inputOutput,"entityID",new(p().SFInt32)),new(a())(c().inputOutput,"multicastRelayHost",new(p().SFString)),new(a())(c().inputOutput,"multicastRelayPort",new(p().SFInt32)),new(a())(c().inputOutput,"networkMode",new(p().SFString)("standAlone")),new(a())(c().inputOutput,"port",new(p().SFInt32)),new(a())(c().inputOutput,"radioID",new(p().SFInt32)),new(a())(c().inputOutput,"readInterval",new(p().SFTime)(.1)),new(a())(c().inputOutput,"rtpHeaderExpected",new(p().SFBool)),new(a())(c().inputOutput,"sampleRate",new(p().SFInt32)),new(a())(c().inputOutput,"samples",new(p().SFInt32)),new(a())(c().inputOutput,"siteID",new(p().SFInt32)),new(a())(c().inputOutput,"tdlType",new(p().SFInt32)),new(a())(c().inputOutput,"whichGeometry",new(p().SFInt32)(1)),new(a())(c().inputOutput,"writeInterval",new(p().SFTime)(1)),new(a())(c().outputOnly,"isNetworkReader",new(p().SFBool)),new(a())(c().outputOnly,"isNetworkWriter",new(p().SFBool)),new(a())(c().outputOnly,"isRtpHeaderHeard",new(p().SFBool)),new(a())(c().outputOnly,"isStandAlone",new(p().SFBool)),new(a())(c().outputOnly,"timestamp",new(p().SFTime)),new(a())(c().inputOutput,"geoCoords",new(p().SFVec3d)),new(a())(c().initializeOnly,"geoSystem",new(p().MFString)("GD","WE"))]),enumerable:!0}});const H=k,X=y().add("SignalPdu",H);function G(t){N().call(this,t),R().call(this,t),this.addType(c().TransmitterPdu),t.getSpecificationVersion()<=3.3&&(this._applicationID=1)}Object.assign(Object.setPrototypeOf(G.prototype,N().prototype),R().prototype,{initialize(){N().prototype.initialize.call(this),R().prototype.initialize.call(this)},getBBox(t,e){return this.isDefaultBBoxSize()?t.set():t.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},dispose(){R().prototype.dispose.call(this),N().prototype.dispose.call(this)}}),Object.defineProperties(G,{...S().getStaticProperties("TransmitterPdu","DIS",1,"children","3.0"),fieldDefinitions:{value:new(r())([new(a())(c().inputOutput,"metadata",new(p().SFNode)),new(a())(c().inputOutput,"description",new(p().SFString)),new(a())(c().inputOutput,"visible",new(p().SFBool)(!0)),new(a())(c().inputOutput,"bboxDisplay",new(p().SFBool)),new(a())(c().initializeOnly,"bboxSize",new(p().SFVec3f)(-1,-1,-1)),new(a())(c().initializeOnly,"bboxCenter",new(p().SFVec3f)),new(a())(c().inputOutput,"enabled",new(p().SFBool)(!0)),new(a())(c().outputOnly,"isActive",new(p().SFBool)),new(a())(c().inputOutput,"address",new(p().SFString)("localhost")),new(a())(c().inputOutput,"antennaLocation",new(p().SFVec3f)),new(a())(c().inputOutput,"antennaPatternLength",new(p().SFInt32)),new(a())(c().inputOutput,"antennaPatternType",new(p().SFInt32)),new(a())(c().inputOutput,"applicationID",new(p().SFInt32)),new(a())(c().inputOutput,"cryptoKeyID",new(p().SFInt32)),new(a())(c().inputOutput,"cryptoSystem",new(p().SFInt32)),new(a())(c().inputOutput,"entityID",new(p().SFInt32)),new(a())(c().inputOutput,"frequency",new(p().SFInt32)),new(a())(c().inputOutput,"inputSource",new(p().SFInt32)),new(a())(c().inputOutput,"lengthOfModulationParameters",new(p().SFInt32)),new(a())(c().inputOutput,"modulationTypeDetail",new(p().SFInt32)),new(a())(c().inputOutput,"modulationTypeMajor",new(p().SFInt32)),new(a())(c().inputOutput,"modulationTypeSpreadSpectrum",new(p().SFInt32)),new(a())(c().inputOutput,"modulationTypeSystem",new(p().SFInt32)),new(a())(c().inputOutput,"multicastRelayHost",new(p().SFString)),new(a())(c().inputOutput,"multicastRelayPort",new(p().SFInt32)),new(a())(c().inputOutput,"networkMode",new(p().SFString)("standAlone")),new(a())(c().inputOutput,"port",new(p().SFInt32)),new(a())(c().inputOutput,"power",new(p().SFFloat)),new(a())(c().inputOutput,"radioEntityTypeCategory",new(p().SFInt32)),new(a())(c().inputOutput,"radioEntityTypeCountry",new(p().SFInt32)),new(a())(c().inputOutput,"radioEntityTypeDomain",new(p().SFInt32)),new(a())(c().inputOutput,"radioEntityTypeKind",new(p().SFInt32)),new(a())(c().inputOutput,"radioEntityTypeNomenclature",new(p().SFInt32)),new(a())(c().inputOutput,"radioEntityTypeNomenclatureVersion",new(p().SFInt32)),new(a())(c().inputOutput,"radioID",new(p().SFInt32)),new(a())(c().inputOutput,"readInterval",new(p().SFTime)(.1)),new(a())(c().inputOutput,"relativeAntennaLocation",new(p().SFVec3f)),new(a())(c().inputOutput,"rtpHeaderExpected",new(p().SFBool)),new(a())(c().inputOutput,"siteID",new(p().SFInt32)),new(a())(c().inputOutput,"transmitFrequencyBandwidth",new(p().SFFloat)),new(a())(c().inputOutput,"transmitState",new(p().SFInt32)),new(a())(c().inputOutput,"whichGeometry",new(p().SFInt32)(1)),new(a())(c().inputOutput,"writeInterval",new(p().SFTime)(1)),new(a())(c().outputOnly,"isNetworkReader",new(p().SFBool)),new(a())(c().outputOnly,"isNetworkWriter",new(p().SFBool)),new(a())(c().outputOnly,"isRtpHeaderHeard",new(p().SFBool)),new(a())(c().outputOnly,"isStandAlone",new(p().SFBool)),new(a())(c().outputOnly,"timestamp",new(p().SFTime)),new(a())(c().inputOutput,"geoCoords",new(p().SFVec3d)),new(a())(c().initializeOnly,"geoSystem",new(p().MFString)("GD","WE"))]),enumerable:!0}});const W=G,L=y().add("TransmitterPdu",W);i().add({name:"DIS",concreteNodes:[g,v,E,C,X,L],abstractNodes:[]});y().add("DISComponent",void 0)})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE
|
|
1
|
+
/* X_ITE v16.0.0 */
|
|
2
2
|
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
@@ -318,7 +318,7 @@ Object .assign (Object .setPrototypeOf (BooleanToggle .prototype, (external_X_IT
|
|
|
318
318
|
set_boolean__ ()
|
|
319
319
|
{
|
|
320
320
|
if (this ._set_boolean .getValue ())
|
|
321
|
-
this ._toggle = !
|
|
321
|
+
this ._toggle = !this ._toggle .getValue ();
|
|
322
322
|
},
|
|
323
323
|
});
|
|
324
324
|
|