x_ite 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/annotation.js +2 -2
- package/dist/assets/components/annotation.min.js +1 -1
- package/dist/assets/components/cad-geometry.js +2 -2
- package/dist/assets/components/cad-geometry.min.js +1 -1
- package/dist/assets/components/cube-map-texturing.js +2 -2
- package/dist/assets/components/cube-map-texturing.min.js +1 -1
- package/dist/assets/components/dis.js +2 -2
- package/dist/assets/components/dis.min.js +1 -1
- package/dist/assets/components/event-utilities.js +2 -2
- package/dist/assets/components/event-utilities.min.js +1 -1
- package/dist/assets/components/geometry2d.js +2 -2
- package/dist/assets/components/geometry2d.min.js +1 -1
- package/dist/assets/components/geospatial.js +2 -2
- package/dist/assets/components/geospatial.min.js +1 -1
- package/dist/assets/components/h-anim.js +2 -2
- package/dist/assets/components/h-anim.min.js +1 -1
- package/dist/assets/components/key-device-sensor.js +2 -2
- package/dist/assets/components/key-device-sensor.min.js +1 -1
- package/dist/assets/components/layout.js +2 -2
- package/dist/assets/components/layout.min.js +1 -1
- package/dist/assets/components/nurbs.js +2 -2
- package/dist/assets/components/nurbs.min.js +1 -1
- package/dist/assets/components/particle-systems.js +2 -2
- package/dist/assets/components/particle-systems.min.js +1 -1
- package/dist/assets/components/picking.js +2 -2
- package/dist/assets/components/picking.min.js +1 -1
- package/dist/assets/components/projective-texture-mapping.js +2 -2
- package/dist/assets/components/projective-texture-mapping.min.js +1 -1
- package/dist/assets/components/rigid-body-physics.js +2 -2
- package/dist/assets/components/rigid-body-physics.min.js +1 -1
- package/dist/assets/components/scripting.js +2 -2
- package/dist/assets/components/scripting.min.js +1 -1
- package/dist/assets/components/texturing-3d.js +2 -2
- package/dist/assets/components/texturing-3d.min.js +1 -1
- package/dist/assets/components/volume-rendering.js +2 -2
- package/dist/assets/components/volume-rendering.min.js +1 -1
- package/dist/assets/components/x_ite.js +2 -2
- package/dist/assets/components/x_ite.min.js +1 -1
- package/dist/assets/shaders/webgl1/Phong.fs +3 -3
- package/dist/assets/shaders/webgl2/Phong.fs +3 -3
- package/dist/example.html +2 -2
- package/dist/x_ite.css +2 -2
- package/dist/x_ite.js +14 -45
- package/dist/x_ite.min.js +4 -4
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/index.md +2 -2
- package/package.json +3 -3
- package/src/assets/shaders/webgl1/Phong.fs +3 -3
- package/src/assets/shaders/webgl2/Phong.fs +3 -3
- package/src/x_ite/Base/X3DBaseNode.js +8 -2
- package/src/x_ite/Browser/NURBS/NURBS.js +51 -51
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +17 -16
- package/src/x_ite/Components/NURBS/Contour2D.js +53 -14
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +15 -12
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +9 -9
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +9 -9
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +6 -6
- package/src/x_ite/Components/NURBS/NurbsSet.js +31 -27
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +10 -10
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +5 -5
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +4 -4
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +6 -6
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +46 -7
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +30 -32
- package/src/x_ite/Components/Shape/Material.js +0 -20
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +0 -12
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +0 -8
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){const t=window[Symbol.for("X_ITE.X3D-5.0.
|
|
1
|
+
!function(){const t=window[Symbol.for("X_ITE.X3D-5.0.2")].define,n=window[Symbol.for("X_ITE.X3D-5.0.2")].require;t("x_ite/Components/Annotation/AnnotationLayer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Navigation/Viewpoint","x_ite/Components/Grouping/Group","x_ite/Base/X3DConstants"],(function(t,n,e,i,o,a,u){"use strict";function r(t){i.call(this,t,new o(t),new a(t)),this.addType(u.AnnotationLayer)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(u.inputOutput,"metadata",new t.SFNode),new n(u.inputOutput,"isPickable",new t.SFBool(!0)),new n(u.inputOutput,"layoutPolicy",new t.MFString),new n(u.inputOutput,"shownGroupID",new t.MFString),new n(u.inputOutput,"viewport",new t.SFNode)]),getTypeName:function(){return"AnnotationLayer"},getComponentName:function(){return"Annotation"},getContainerField:function(){return"layers"},initialize:function(){i.prototype.initialize.call(this)}}),r})),t("x_ite/Components/Annotation/AnnotationTarget",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,o){"use strict";function a(t){i.call(this,t),this.addType(o.AnnotationTarget)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"referencePoint",new t.SFVec3f(0,0,0)),new n(o.inputOutput,"leadLineStyle",new t.SFNode),new n(o.inputOutput,"marker",new t.SFNode),new n(o.inputOutput,"annotations",new t.MFNode)]),getTypeName:function(){return"AnnotationTarget"},getComponentName:function(){return"Annotation"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this)}}),a})),t("x_ite/Components/Annotation/X3DAnnotationNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(t,n){"use strict";function e(e){t.call(this,e),this.addType(n.X3DAnnotationNode)}return e.prototype=Object.assign(Object.create(t.prototype),{constructor:e,initialize:function(){t.prototype.initialize.call(this)}}),e})),t("x_ite/Components/Annotation/GroupAnnotation",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Annotation/X3DAnnotationNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,o,a){"use strict";function u(t){i.call(this,t),o.call(this,t),this.addType(a.GroupAnnotation)}return u.prototype=Object.assign(Object.create(i.prototype),o.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(a.inputOutput,"metadata",new t.SFNode),new n(a.inputOutput,"enabled",new t.SFBool(!0)),new n(a.inputOutput,"annotationGroupID",new t.SFString),new n(a.inputOutput,"displayPolicy",new t.SFString("NEVER")),new n(a.inputOutput,"visible",new t.SFBool(!0)),new n(a.inputOutput,"bboxDisplay",new t.SFBool),new n(a.initializeOnly,"bboxCenter",new t.SFVec3f(0,0,0)),new n(a.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(a.inputOnly,"addChildren",new t.MFNode),new n(a.inputOnly,"removeChildren",new t.MFNode),new n(a.inputOutput,"children",new t.MFNode)]),getTypeName:function(){return"GroupAnnotation"},getComponentName:function(){return"Annotation"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),o.prototype.initialize.call(this)}}),u})),t("x_ite/Components/Annotation/IconAnnotation",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Annotation/X3DAnnotationNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,o,a){"use strict";function u(t){i.call(this,t),o.call(this,t),this.addType(a.IconAnnotation)}return u.prototype=Object.assign(Object.create(i.prototype),o.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(a.inputOutput,"metadata",new t.SFNode),new n(a.inputOutput,"enabled",new t.SFBool(!0)),new n(a.inputOutput,"annotationGroupID",new t.SFString),new n(a.inputOutput,"displayPolicy",new t.SFString("NEVER")),new n(a.inputOutput,"url",new t.MFString),new n(a.inputOutput,"autoRefresh",new t.SFTime),new n(a.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600))]),getTypeName:function(){return"IconAnnotation"},getComponentName:function(){return"Annotation"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),o.prototype.initialize.call(this)},requestImmediateLoad:function(t=!0){}}),u})),t("x_ite/Components/Annotation/TextAnnotation",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Annotation/X3DAnnotationNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,o){"use strict";function a(t){i.call(this,t),this.addType(o.TextAnnotation)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.inputOutput,"annotationGroupID",new t.SFString),new n(o.inputOutput,"displayPolicy",new t.SFString("NEVER")),new n(o.inputOutput,"contentType",new t.SFString("text/plain")),new n(o.inputOutput,"text",new t.SFString)]),getTypeName:function(){return"TextAnnotation"},getComponentName:function(){return"Annotation"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this)}}),a})),t("x_ite/Components/Annotation/URLAnnotation",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Annotation/X3DAnnotationNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,o){"use strict";function a(t){i.call(this,t),this.addType(o.URLAnnotation)}return a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.inputOutput,"annotationGroupID",new t.SFString),new n(o.inputOutput,"displayPolicy",new t.SFString("NEVER")),new n(o.inputOutput,"url",new t.MFString)]),getTypeName:function(){return"URLAnnotation"},getComponentName:function(){return"Annotation"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this)}}),a})),t(n.getComponentUrl("annotation"),["x_ite/Components","x_ite/Components/Annotation/AnnotationLayer","x_ite/Components/Annotation/AnnotationTarget","x_ite/Components/Annotation/GroupAnnotation","x_ite/Components/Annotation/IconAnnotation","x_ite/Components/Annotation/TextAnnotation","x_ite/Components/Annotation/URLAnnotation","x_ite/Components/Annotation/X3DAnnotationNode"],(function(t,n,e,i,o,a,u,r){"use strict";t.addComponent({name:"Annotation",types:{AnnotationLayer:n,AnnotationTarget:e,GroupAnnotation:i,IconAnnotation:o,TextAnnotation:a,URLAnnotation:u},abstractTypes:{X3DAnnotationNode:r}})}))}();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.0")].define,t=window[Symbol.for("X_ITE.X3D-5.0.0")].require;e("x_ite/Components/CADGeometry/X3DProductStructureChildNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function n(n){e.call(this,n),this.addType(t.X3DProductStructureChildNode)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n}),n})),e("x_ite/Components/CADGeometry/CADAssembly",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/CADGeometry/X3DProductStructureChildNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o,r){"use strict";function s(e){i.call(this,e),o.call(this,e),this.addType(r.CADAssembly)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"name",new e.SFString),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"CADAssembly"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"}}),s})),e("x_ite/Components/CADGeometry/CADFace",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CADGeometry/X3DProductStructureChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType"],(function(e,t,n,i,o,r,s){"use strict";function u(e){i.call(this,e),o.call(this,e),this.addType(r.CADFace),this.childNode=null,this.visibleNode=null,this.boundedObject=null}return u.prototype=Object.assign(Object.create(i.prototype),o.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"name",new e.SFString),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOutput,"shape",new e.SFNode)]),getTypeName:function(){return"CADFace"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),o.prototype.initialize.call(this),this._shape.addInterest("set_shape__",this),this.set_shape__()},getBBox:function(e,t){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){const n=this.visibleNode;return n?n.getBBox(e,t):e.set()}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},set_shape__:function(){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this),this.childNode._visible.removeInterest("set_visible__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this)),this.childNode=null;try{const e=this._shape.getValue().getInnerNode(),t=e.getType();for(let n=t.length-1;n>=0;--n){switch(t[n]){case r.LOD:case r.Transform:case r.X3DShapeNode:e._isCameraObject.addInterest("set_cameraObject__",this),e._isPickableObject.addInterest("set_transformSensors__",this),e._visible.addInterest("set_visible__",this),e._bboxDisplay.addInterest("set_bboxDisplay__",this),this.childNode=e;break;default:continue}break}}catch(e){}this.childNode?delete this.traverse:this.traverse=Function.prototype,this.set_transformSensors__(),this.set_visible__(),this.set_bboxDisplay__()},set_cameraObject__:function(){this.childNode&&this.childNode.getCameraObject()?this.setCameraObject(this.childNode._visible.getValue()):this.setCameraObject(!1)},set_transformSensors__:function(){this.setPickableObject(Boolean(this.childNode&&this.childNode.getPickableObject()))},set_visible__:function(){this.childNode?this.visibleNode=this.childNode._visible.getValue()?this.childNode:null:this.visibleNode=null,this.set_cameraObject__()},set_bboxDisplay__:function(){this.childNode?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},traverse:function(e,t){switch(e){case s.POINTER:case s.CAMERA:case s.SHADOW:{const n=this.visibleNode;return void(n&&n.traverse(e,t))}case s.PICKING:{const n=t.getBrowser().getPickingHierarchy();return n.push(this),this.childNode.traverse(e,t),void n.pop()}case s.COLLISION:return void this.childNode.traverse(e,t);case s.DISPLAY:{const n=this.visibleNode;n&&n.traverse(e,t);const i=this.boundedObject;return void(i&&i.displayBBox(e,t))}}}}),u})),e("x_ite/Components/CADGeometry/CADLayer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o){"use strict";function r(e){i.call(this,e),this.addType(o.CADLayer)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"visible",new e.SFBool(!0)),new t(o.inputOutput,"bboxDisplay",new e.SFBool),new t(o.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(o.initializeOnly,"bboxCenter",new e.SFVec3f),new t(o.inputOnly,"addChildren",new e.MFNode),new t(o.inputOnly,"removeChildren",new e.MFNode),new t(o.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"CADLayer"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"}}),r})),e("x_ite/Components/CADGeometry/CADPart",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Components/CADGeometry/X3DProductStructureChildNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o,r){"use strict";function s(e){i.call(this,e),o.call(this,e),this.addType(r.CADPart)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"name",new e.SFString),new t(r.inputOutput,"translation",new e.SFVec3f),new t(r.inputOutput,"rotation",new e.SFRotation),new t(r.inputOutput,"scale",new e.SFVec3f(1,1,1)),new t(r.inputOutput,"scaleOrientation",new e.SFRotation),new t(r.inputOutput,"center",new e.SFVec3f),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"CADPart"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"}}),s})),e("x_ite/Components/CADGeometry/IndexedQuadSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o){"use strict";function r(e){i.call(this,e),this.addType(o.IndexedQuadSet)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_index",new e.MFInt32),new t(o.initializeOnly,"solid",new e.SFBool(!0)),new t(o.initializeOnly,"ccw",new e.SFBool(!0)),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"index",new e.MFInt32),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"texCoord",new e.SFNode),new t(o.inputOutput,"normal",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedQuadSet"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"geometry"},initialize:function(){i.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},getTriangleIndex:function(){const e=[0,1,2,0,2,3];return function(t){const n=t%6;return(t-n)/6*4+e[n]}}(),getPolygonIndex:function(e){return this._index[e]},build:function(){let e=this._index.length;e-=e%4,i.prototype.build.call(this,4,e,6,e/4*6)}}),r})),e("x_ite/Components/CADGeometry/QuadSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o){"use strict";function r(e){i.call(this,e),this.addType(o.QuadSet)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.initializeOnly,"solid",new e.SFBool(!0)),new t(o.initializeOnly,"ccw",new e.SFBool(!0)),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"texCoord",new e.SFNode),new t(o.inputOutput,"normal",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"QuadSet"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"geometry"},getTriangleIndex:function(){const e=[0,1,2,0,2,3];return function(t){const n=t%6;return(t-n)/6*4+e[n]}}(),build:function(){if(!this.getCoord())return;let e=this.getCoord().getSize();e-=e%4,i.prototype.build.call(this,4,e,6,e/4*6)},createNormals:function(e,t){return this.createFaceNormals(e,t)}}),r})),e(t.getComponentUrl("cad-geometry"),["x_ite/Components","x_ite/Components/CADGeometry/CADAssembly","x_ite/Components/CADGeometry/CADFace","x_ite/Components/CADGeometry/CADLayer","x_ite/Components/CADGeometry/CADPart","x_ite/Components/CADGeometry/IndexedQuadSet","x_ite/Components/CADGeometry/QuadSet","x_ite/Components/CADGeometry/X3DProductStructureChildNode"],(function(e,t,n,i,o,r,s,u){"use strict";e.addComponent({name:"CADGeometry",types:{CADAssembly:t,CADFace:n,CADLayer:i,CADPart:o,IndexedQuadSet:r,QuadSet:s},abstractTypes:{X3DProductStructureChildNode:u}})}))}();
|
|
1
|
+
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.2")].define,t=window[Symbol.for("X_ITE.X3D-5.0.2")].require;e("x_ite/Components/CADGeometry/X3DProductStructureChildNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function n(n){e.call(this,n),this.addType(t.X3DProductStructureChildNode)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n}),n})),e("x_ite/Components/CADGeometry/CADAssembly",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/CADGeometry/X3DProductStructureChildNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o,r){"use strict";function s(e){i.call(this,e),o.call(this,e),this.addType(r.CADAssembly)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"name",new e.SFString),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"CADAssembly"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"}}),s})),e("x_ite/Components/CADGeometry/CADFace",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CADGeometry/X3DProductStructureChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType"],(function(e,t,n,i,o,r,s){"use strict";function u(e){i.call(this,e),o.call(this,e),this.addType(r.CADFace),this.childNode=null,this.visibleNode=null,this.boundedObject=null}return u.prototype=Object.assign(Object.create(i.prototype),o.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"name",new e.SFString),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOutput,"shape",new e.SFNode)]),getTypeName:function(){return"CADFace"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),o.prototype.initialize.call(this),this._shape.addInterest("set_shape__",this),this.set_shape__()},getBBox:function(e,t){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){const n=this.visibleNode;return n?n.getBBox(e,t):e.set()}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},set_shape__:function(){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this),this.childNode._visible.removeInterest("set_visible__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this)),this.childNode=null;try{const e=this._shape.getValue().getInnerNode(),t=e.getType();for(let n=t.length-1;n>=0;--n){switch(t[n]){case r.LOD:case r.Transform:case r.X3DShapeNode:e._isCameraObject.addInterest("set_cameraObject__",this),e._isPickableObject.addInterest("set_transformSensors__",this),e._visible.addInterest("set_visible__",this),e._bboxDisplay.addInterest("set_bboxDisplay__",this),this.childNode=e;break;default:continue}break}}catch(e){}this.childNode?delete this.traverse:this.traverse=Function.prototype,this.set_transformSensors__(),this.set_visible__(),this.set_bboxDisplay__()},set_cameraObject__:function(){this.childNode&&this.childNode.getCameraObject()?this.setCameraObject(this.childNode._visible.getValue()):this.setCameraObject(!1)},set_transformSensors__:function(){this.setPickableObject(Boolean(this.childNode&&this.childNode.getPickableObject()))},set_visible__:function(){this.childNode?this.visibleNode=this.childNode._visible.getValue()?this.childNode:null:this.visibleNode=null,this.set_cameraObject__()},set_bboxDisplay__:function(){this.childNode?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},traverse:function(e,t){switch(e){case s.POINTER:case s.CAMERA:case s.SHADOW:{const n=this.visibleNode;return void(n&&n.traverse(e,t))}case s.PICKING:{const n=t.getBrowser().getPickingHierarchy();return n.push(this),this.childNode.traverse(e,t),void n.pop()}case s.COLLISION:return void this.childNode.traverse(e,t);case s.DISPLAY:{const n=this.visibleNode;n&&n.traverse(e,t);const i=this.boundedObject;return void(i&&i.displayBBox(e,t))}}}}),u})),e("x_ite/Components/CADGeometry/CADLayer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o){"use strict";function r(e){i.call(this,e),this.addType(o.CADLayer)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"visible",new e.SFBool(!0)),new t(o.inputOutput,"bboxDisplay",new e.SFBool),new t(o.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(o.initializeOnly,"bboxCenter",new e.SFVec3f),new t(o.inputOnly,"addChildren",new e.MFNode),new t(o.inputOnly,"removeChildren",new e.MFNode),new t(o.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"CADLayer"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"}}),r})),e("x_ite/Components/CADGeometry/CADPart",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Components/CADGeometry/X3DProductStructureChildNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o,r){"use strict";function s(e){i.call(this,e),o.call(this,e),this.addType(r.CADPart)}return s.prototype=Object.assign(Object.create(i.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"name",new e.SFString),new t(r.inputOutput,"translation",new e.SFVec3f),new t(r.inputOutput,"rotation",new e.SFRotation),new t(r.inputOutput,"scale",new e.SFVec3f(1,1,1)),new t(r.inputOutput,"scaleOrientation",new e.SFRotation),new t(r.inputOutput,"center",new e.SFVec3f),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"CADPart"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"children"}}),s})),e("x_ite/Components/CADGeometry/IndexedQuadSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o){"use strict";function r(e){i.call(this,e),this.addType(o.IndexedQuadSet)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_index",new e.MFInt32),new t(o.initializeOnly,"solid",new e.SFBool(!0)),new t(o.initializeOnly,"ccw",new e.SFBool(!0)),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"index",new e.MFInt32),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"texCoord",new e.SFNode),new t(o.inputOutput,"normal",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedQuadSet"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"geometry"},initialize:function(){i.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},getTriangleIndex:function(){const e=[0,1,2,0,2,3];return function(t){const n=t%6;return(t-n)/6*4+e[n]}}(),getPolygonIndex:function(e){return this._index[e]},build:function(){let e=this._index.length;e-=e%4,i.prototype.build.call(this,4,e,6,e/4*6)}}),r})),e("x_ite/Components/CADGeometry/QuadSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,n,i,o){"use strict";function r(e){i.call(this,e),this.addType(o.QuadSet)}return r.prototype=Object.assign(Object.create(i.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.initializeOnly,"solid",new e.SFBool(!0)),new t(o.initializeOnly,"ccw",new e.SFBool(!0)),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"texCoord",new e.SFNode),new t(o.inputOutput,"normal",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"QuadSet"},getComponentName:function(){return"CADGeometry"},getContainerField:function(){return"geometry"},getTriangleIndex:function(){const e=[0,1,2,0,2,3];return function(t){const n=t%6;return(t-n)/6*4+e[n]}}(),build:function(){if(!this.getCoord())return;let e=this.getCoord().getSize();e-=e%4,i.prototype.build.call(this,4,e,6,e/4*6)},createNormals:function(e,t){return this.createFaceNormals(e,t)}}),r})),e(t.getComponentUrl("cad-geometry"),["x_ite/Components","x_ite/Components/CADGeometry/CADAssembly","x_ite/Components/CADGeometry/CADFace","x_ite/Components/CADGeometry/CADLayer","x_ite/Components/CADGeometry/CADPart","x_ite/Components/CADGeometry/IndexedQuadSet","x_ite/Components/CADGeometry/QuadSet","x_ite/Components/CADGeometry/X3DProductStructureChildNode"],(function(e,t,n,i,o,r,s,u){"use strict";e.addComponent({name:"CADGeometry",types:{CADAssembly:t,CADFace:n,CADLayer:i,CADPart:o,IndexedQuadSet:r,QuadSet:s},abstractTypes:{X3DProductStructureChildNode:u}})}))}();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.0")].define,t=window[Symbol.for("X_ITE.X3D-5.0.0")].require;e("x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode",["x_ite/Components/Texturing/X3DSingleTextureNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DEnvironmentTextureNode);const r=this.getBrowser().getContext();this.target=r.TEXTURE_CUBE_MAP,this.targets=[r.TEXTURE_CUBE_MAP_POSITIVE_Z,r.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.TEXTURE_CUBE_MAP_NEGATIVE_X,r.TEXTURE_CUBE_MAP_POSITIVE_X,r.TEXTURE_CUBE_MAP_POSITIVE_Y,r.TEXTURE_CUBE_MAP_NEGATIVE_Y]}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTarget:function(){return this.target},getTextureType:function(){return 4},getTextureTypeString:function(){return"CUBE"},getTargets:function(){return this.targets},clearTexture:function(){const e=new Uint8Array([255,255,255,255]);return function(){const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(const i of this.getTargets())t.texImage2D(i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,e)}}(),updateTextureProperties:function(){e.prototype.updateTextureProperties.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,128,128,!1,!1,!1)},setShaderUniformsToChannel:function(e,t,i,r){const n=i.getBrowser().getTextureCubeUnit();e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_CUBE_MAP,this.getTexture()),e.uniform1i(r.textureType,4),e.uniform1i(r.textureCube,n)}}),i})),e("x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,r,n,s){"use strict";function o(e){r.call(this,e),this.addType(s.ComposedCubeMapTexture),this.addAlias("front",this._frontTexture),this.addAlias("back",this._backTexture),this.addAlias("left",this._leftTexture),this.addAlias("right",this._rightTexture),this.addAlias("bottom",this._bottomTexture),this.addAlias("top",this._topTexture),this.textures=[null,null,null,null,null,null],this.symbols=[Symbol(),Symbol(),Symbol(),Symbol(),Symbol(),Symbol()],this.loadStates=0}return o.prototype=Object.assign(Object.create(r.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"description",new e.SFString),new t(s.inputOutput,"frontTexture",new e.SFNode),new t(s.inputOutput,"backTexture",new e.SFNode),new t(s.inputOutput,"leftTexture",new e.SFNode),new t(s.inputOutput,"rightTexture",new e.SFNode),new t(s.inputOutput,"bottomTexture",new e.SFNode),new t(s.inputOutput,"topTexture",new e.SFNode),new t(s.initializeOnly,"textureProperties",new e.SFNode)]),getTypeName:function(){return"ComposedCubeMapTexture"},getComponentName:function(){return"CubeMapTexturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),this.clearTexture(),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.set_texture__(this._frontTexture,0),this.set_texture__(this._backTexture,1),this.set_texture__(this._leftTexture,2),this.set_texture__(this._rightTexture,3),this.set_texture__(this._topTexture,4),this.set_texture__(this._bottomTexture,5)},set_texture__:function(e,t){let i=this.textures[t];i&&(i.removeInterest("set_loadState__",this),i._loadState.removeFieldCallback(this.symbols[t])),i=this.textures[t]=n(s.X3DTexture2DNode,e),i&&(i.addInterest("set_loadState__",this,i,t),i._loadState.addFieldCallback(this.symbols[t],this.set_loadState__.bind(this,i,t))),this.set_loadState__(i,t)},set_loadState__:function(e,t){e?this.setLoadStateBit(e.checkLoadState(),e.getData(),t):this.setLoadStateBit(s.NOT_STARTED,null,t),this.setTextures()},setLoadStateBit:function(e,t,i){e===s.COMPLETE_STATE||t?this.loadStates|=1<<i:this.loadStates&=~(1<<i)},isComplete:function(){if(63!==this.loadStates)return!1;const e=this.textures,t=e[0].getWidth();for(const i of e){if(i.getWidth()!==t)return!1;if(i.getHeight()!==t)return!1}return!0},setTextures:function(){const e=this.getBrowser().getContext();if(e.bindTexture(this.getTarget(),this.getTexture()),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),this.isComplete()){const e=this.textures;for(let t=0;t<6;++t){const i=this.getBrowser().getContext(),r=e[t],n=r.getWidth(),s=r.getHeight(),o=r.getData();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!r.getFlipY()),i.pixelStorei(i.UNPACK_ALIGNMENT,1),o instanceof Uint8Array?i.texImage2D(this.getTargets()[t],0,i.RGBA,n,s,!1,i.RGBA,i.UNSIGNED_BYTE,o):i.texImage2D(this.getTargets()[t],0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,o)}this.updateTextureProperties()}else this.clearTexture();this.set_transparent__()},set_transparent__:function(){const e=!1;if(this.isComplete())for(const t of this.textures)if(t._transparent.getValue()){e=!0;break}this.setTransparent(e)}}),o})),e("x_ite/Rendering/DependentRenderer",["x_ite/Base/X3DBaseNode","x_ite/Rendering/X3DRenderObject","x_ite/Rendering/TraverseType"],(function(e,t,i){"use strict";function r(i){e.call(this,i),t.call(this,i),this.renderObject=null}r.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:r,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this)},isIndependent:function(){return!1},setRenderer:function(e){this.renderObject=e},getBrowser:function(){return this.renderObject.getBrowser()},getLayer:function(){return this.renderObject.getLayer()},getBackground:function(){return this.renderObject.getBackground()},getFog:function(){return this.renderObject.getFog()},getNavigationInfo:function(){return this.renderObject.getNavigationInfo()},getViewpoint:function(){return this.renderObject.getViewpoint()},getLightContainer:function(){return this.renderObject.getLights()[this.lightIndex++]},render:function(e,r,n){switch(e){case i.COLLISION:case i.SHADOW:t.prototype.render.call(this,e,r,n);break;case i.DISPLAY:this.lightIndex=0,t.prototype.render.call(this,e,r,n);for(const e of this.renderObject.getLights())e.getModelViewMatrix().pop()}}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});return r})),e("x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode","x_ite/Rendering/DependentRenderer","x_ite/Rendering/TextureBuffer","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,r,n,s,o,a,u,h,d,g,p,x,l){"use strict";function c(e){r.call(this,e),this.addType(o.GeneratedCubeMapTexture),this.renderer=new n(e),this.projectionMatrix=new x,this.modelMatrix=new x,this.viewVolume=new h}return c.prototype=Object.assign(Object.create(r.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"description",new e.SFString),new t(o.inputOutput,"update",new e.SFString("NONE")),new t(o.initializeOnly,"size",new e.SFInt32(128)),new t(o.initializeOnly,"textureProperties",new e.SFNode)]),getTypeName:function(){return"GeneratedCubeMapTexture"},getComponentName:function(){return"CubeMapTexturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),this.renderer.setup();let e=l.nextPowerOfTwo(this._size.getValue());if(e>0){e=l.nextPowerOfTwo(e);const t=this.getBrowser().getContext(),i=new Uint8Array(e*e*4);t.bindTexture(this.getTarget(),this.getTexture());for(const r of this.getTargets())t.texImage2D(r,0,t.RGBA,e,e,0,t.RGBA,t.UNSIGNED_BYTE,i);this.viewport=new p(0,0,e,e),this.frameBuffer=new s(this.getBrowser(),e,e)}},traverse:function(e,t){"NONE"!==this._update.getValue()&&this.frameBuffer&&t.isIndependent()&&(t.getGeneratedCubeMapTextures().push(this),this.modelMatrix.assign(t.getModelViewMatrix().get()).multRight(t.getCameraSpaceMatrix().get()))},renderTexture:function(){const e=[new d(g.zAxis,new g(0,0,-1)),new d(g.zAxis,new g(0,0,1)),new d(g.zAxis,new g(1,0,0)),new d(g.zAxis,new g(-1,0,0)),new d(g.zAxis,new g(0,-1,0)),new d(g.zAxis,new g(0,1,0))],t=[new g(-1,-1,1),new g(-1,-1,1),new g(-1,-1,1),new g(-1,-1,1),new g(1,1,1),new g(1,1,1)],i=new x;return function(r){this.renderer.setRenderer(r);const n=this.renderer,s=r.getBrowser(),o=r.getLayer(),h=s.getContext(),d=n.getBackground(),g=n.getNavigationInfo(),p=n.getViewpoint(),c=s.getHeadlight(),T=g._headlight.getValue(),_=g.getNearValue(),f=g.getFarValue(p),w=u.perspective(l.radians(90),_,f,1,1,this.projectionMatrix);this.setTransparent(d.getTransparent()),this.frameBuffer.bind(),n.getViewVolumes().push(this.viewVolume.set(w,this.viewport,this.viewport)),n.getProjectionMatrix().pushMatrix(w),h.bindTexture(this.getTarget(),this.getTexture()),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1);for(let r=0;r<6;++r){h.clear(h.COLOR_BUFFER_BIT),n.getCameraSpaceMatrix().pushMatrix(this.modelMatrix),n.getCameraSpaceMatrix().rotate(e[r]),n.getCameraSpaceMatrix().scale(t[r]);try{n.getViewMatrix().pushMatrix(i.assign(n.getCameraSpaceMatrix().get()).inverse())}catch(e){console.error(e),n.getViewMatrix().pushMatrix(x.Identity)}n.getModelViewMatrix().pushMatrix(i),T&&(c.getModelViewMatrix().pushMatrix(i),c.getModelViewMatrix().multLeft(p.getCameraSpaceMatrix())),o.traverse(a.DISPLAY,n),T&&c.getModelViewMatrix().pop(),n.getModelViewMatrix().pop(),n.getCameraSpaceMatrix().pop(),n.getViewMatrix().pop();const s=this.frameBuffer.readPixels(),u=this.frameBuffer.getWidth(),d=this.frameBuffer.getHeight();h.bindTexture(this.getTarget(),this.getTexture()),h.texImage2D(this.getTargets()[r],0,h.RGBA,u,d,!1,h.RGBA,h.UNSIGNED_BYTE,s)}this.updateTextureProperties(),n.getProjectionMatrix().pop(),n.getViewVolumes().pop(),this.frameBuffer.unbind(),"NEXT_FRAME_ONLY"===this._update.getValue()&&(this._update="NONE")}}(),setShaderUniformsToChannel:function(){const e=new Float32Array(16);return function(t,i,n,s){r.prototype.setShaderUniformsToChannel.call(this,t,i,n,s),n===this.renderer&&t.uniformMatrix4fv(i.x3d_ModelViewMatrix,!1,e)}}()}),c})),e("x_ite/Components/CubeMapTexturing/ImageCubeMapTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Algorithm","x_ite/DEBUG"],(function(e,t,i,r,n,s,o,a,u,h){"use strict";const d=new Uint8Array([255,255,255,255]),g=[new a(1,1),new a(3,1),new a(0,1),new a(2,1),new a(1,0),new a(1,2)];function p(e){n.call(this,e),s.call(this,e),this.addType(o.ImageCubeMapTexture),this.urlStack=new t.MFString}return p.prototype=Object.assign(Object.create(n.prototype),s.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new r([new i(o.inputOutput,"metadata",new t.SFNode),new i(o.inputOutput,"description",new t.SFString),new i(o.inputOutput,"load",new t.SFBool(!0)),new i(o.inputOutput,"url",new t.MFString),new i(o.inputOutput,"autoRefresh",new t.SFTime),new i(o.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(o.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"ImageCubeMapTexture"},getComponentName:function(){return"CubeMapTexturing"},getContainerField:function(){return"texture"},initialize:function(){n.prototype.initialize.call(this),s.prototype.initialize.call(this);const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)t.texImage2D(this.getTargets()[e],0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,d);this.canvas=e("<canvas></canvas>"),this.image=e("<img></img>"),this.image.on("load",this.setImage.bind(this)),this.image.on("error",this.setError.bind(this)),this.image.bind("abort",this.setError.bind(this)),this.image[0].crossOrigin="Anonymous",this.requestImmediateLoad()},unloadNow:function(){this.clearTexture()},loadNow:function(){this.urlStack.setValue(this._url),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.clearTexture(),void this.setLoadState(o.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.image.attr("src",this.URL.href)},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading image:",decodeURI(this.URL.href)),this.loadNext()},setImage:function(){h&&"data:"!==this.URL.protocol&&console.info("Done loading image cube map texture:",decodeURI(this.URL.href));try{const e=this.image[0],t=this.canvas[0],i=t.getContext("2d");let r=e.width,n=e.height,s=Math.floor(r/4),a=Math.floor(n/3);u.isPowerOfTwo(s)&&u.isPowerOfTwo(a)&&4*s===r&&3*a===n?(t.width=r,t.height=n,i.drawImage(e,0,0)):(s=u.nextPowerOfTwo(s),a=u.nextPowerOfTwo(a),r=4*s,n=3*a,t.width=r,t.height=n,i.drawImage(e,0,0,e.width,e.height,0,0,r,n));const h=this.getBrowser().getContext();let d=!0;h.bindTexture(this.getTarget(),this.getTexture()),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1);for(let e=0;e<6;++e){const t=i.getImageData(g[e].x*s,g[e].y*a,s,a).data;if(d)for(let e=3;e<t.length;e+=4)if(255!==t[e]){d=!1;break}h.texImage2D(this.getTargets()[e],0,h.RGBA,s,a,!1,h.RGBA,h.UNSIGNED_BYTE,new Uint8Array(t.buffer))}this.updateTextureProperties(),this.setTransparent(!d),this.setLoadState(o.COMPLETE_STATE)}catch(e){console.log(e.message),this.setError()}}}),p})),e(t.getComponentUrl("cube-map-texturing"),["x_ite/Components","x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture","x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture","x_ite/Components/CubeMapTexturing/ImageCubeMapTexture","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode"],(function(e,t,i,r,n){"use strict";e.addComponent({name:"CubeMapTexturing",types:{ComposedCubeMapTexture:t,GeneratedCubeMapTexture:i,ImageCubeMapTexture:r},abstractTypes:{X3DEnvironmentTextureNode:n}})}))}();
|
|
1
|
+
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.2")].define,t=window[Symbol.for("X_ITE.X3D-5.0.2")].require;e("x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode",["x_ite/Components/Texturing/X3DSingleTextureNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DEnvironmentTextureNode);const r=this.getBrowser().getContext();this.target=r.TEXTURE_CUBE_MAP,this.targets=[r.TEXTURE_CUBE_MAP_POSITIVE_Z,r.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.TEXTURE_CUBE_MAP_NEGATIVE_X,r.TEXTURE_CUBE_MAP_POSITIVE_X,r.TEXTURE_CUBE_MAP_POSITIVE_Y,r.TEXTURE_CUBE_MAP_NEGATIVE_Y]}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTarget:function(){return this.target},getTextureType:function(){return 4},getTextureTypeString:function(){return"CUBE"},getTargets:function(){return this.targets},clearTexture:function(){const e=new Uint8Array([255,255,255,255]);return function(){const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(const i of this.getTargets())t.texImage2D(i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,e)}}(),updateTextureProperties:function(){e.prototype.updateTextureProperties.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,128,128,!1,!1,!1)},setShaderUniformsToChannel:function(e,t,i,r){const n=i.getBrowser().getTextureCubeUnit();e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_CUBE_MAP,this.getTexture()),e.uniform1i(r.textureType,4),e.uniform1i(r.textureCube,n)}}),i})),e("x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,r,n,s){"use strict";function o(e){r.call(this,e),this.addType(s.ComposedCubeMapTexture),this.addAlias("front",this._frontTexture),this.addAlias("back",this._backTexture),this.addAlias("left",this._leftTexture),this.addAlias("right",this._rightTexture),this.addAlias("bottom",this._bottomTexture),this.addAlias("top",this._topTexture),this.textures=[null,null,null,null,null,null],this.symbols=[Symbol(),Symbol(),Symbol(),Symbol(),Symbol(),Symbol()],this.loadStates=0}return o.prototype=Object.assign(Object.create(r.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"description",new e.SFString),new t(s.inputOutput,"frontTexture",new e.SFNode),new t(s.inputOutput,"backTexture",new e.SFNode),new t(s.inputOutput,"leftTexture",new e.SFNode),new t(s.inputOutput,"rightTexture",new e.SFNode),new t(s.inputOutput,"bottomTexture",new e.SFNode),new t(s.inputOutput,"topTexture",new e.SFNode),new t(s.initializeOnly,"textureProperties",new e.SFNode)]),getTypeName:function(){return"ComposedCubeMapTexture"},getComponentName:function(){return"CubeMapTexturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),this.clearTexture(),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.set_texture__(this._frontTexture,0),this.set_texture__(this._backTexture,1),this.set_texture__(this._leftTexture,2),this.set_texture__(this._rightTexture,3),this.set_texture__(this._topTexture,4),this.set_texture__(this._bottomTexture,5)},set_texture__:function(e,t){let i=this.textures[t];i&&(i.removeInterest("set_loadState__",this),i._loadState.removeFieldCallback(this.symbols[t])),i=this.textures[t]=n(s.X3DTexture2DNode,e),i&&(i.addInterest("set_loadState__",this,i,t),i._loadState.addFieldCallback(this.symbols[t],this.set_loadState__.bind(this,i,t))),this.set_loadState__(i,t)},set_loadState__:function(e,t){e?this.setLoadStateBit(e.checkLoadState(),e.getData(),t):this.setLoadStateBit(s.NOT_STARTED,null,t),this.setTextures()},setLoadStateBit:function(e,t,i){e===s.COMPLETE_STATE||t?this.loadStates|=1<<i:this.loadStates&=~(1<<i)},isComplete:function(){if(63!==this.loadStates)return!1;const e=this.textures,t=e[0].getWidth();for(const i of e){if(i.getWidth()!==t)return!1;if(i.getHeight()!==t)return!1}return!0},setTextures:function(){const e=this.getBrowser().getContext();if(e.bindTexture(this.getTarget(),this.getTexture()),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),this.isComplete()){const e=this.textures;for(let t=0;t<6;++t){const i=this.getBrowser().getContext(),r=e[t],n=r.getWidth(),s=r.getHeight(),o=r.getData();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!r.getFlipY()),i.pixelStorei(i.UNPACK_ALIGNMENT,1),o instanceof Uint8Array?i.texImage2D(this.getTargets()[t],0,i.RGBA,n,s,!1,i.RGBA,i.UNSIGNED_BYTE,o):i.texImage2D(this.getTargets()[t],0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,o)}this.updateTextureProperties()}else this.clearTexture();this.set_transparent__()},set_transparent__:function(){const e=!1;if(this.isComplete())for(const t of this.textures)if(t._transparent.getValue()){e=!0;break}this.setTransparent(e)}}),o})),e("x_ite/Rendering/DependentRenderer",["x_ite/Base/X3DBaseNode","x_ite/Rendering/X3DRenderObject","x_ite/Rendering/TraverseType"],(function(e,t,i){"use strict";function r(i){e.call(this,i),t.call(this,i),this.renderObject=null}r.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:r,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this)},isIndependent:function(){return!1},setRenderer:function(e){this.renderObject=e},getBrowser:function(){return this.renderObject.getBrowser()},getLayer:function(){return this.renderObject.getLayer()},getBackground:function(){return this.renderObject.getBackground()},getFog:function(){return this.renderObject.getFog()},getNavigationInfo:function(){return this.renderObject.getNavigationInfo()},getViewpoint:function(){return this.renderObject.getViewpoint()},getLightContainer:function(){return this.renderObject.getLights()[this.lightIndex++]},render:function(e,r,n){switch(e){case i.COLLISION:case i.SHADOW:t.prototype.render.call(this,e,r,n);break;case i.DISPLAY:this.lightIndex=0,t.prototype.render.call(this,e,r,n);for(const e of this.renderObject.getLights())e.getModelViewMatrix().pop()}}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});return r})),e("x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode","x_ite/Rendering/DependentRenderer","x_ite/Rendering/TextureBuffer","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,r,n,s,o,a,u,h,d,g,p,x,l){"use strict";function c(e){r.call(this,e),this.addType(o.GeneratedCubeMapTexture),this.renderer=new n(e),this.projectionMatrix=new x,this.modelMatrix=new x,this.viewVolume=new h}return c.prototype=Object.assign(Object.create(r.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"description",new e.SFString),new t(o.inputOutput,"update",new e.SFString("NONE")),new t(o.initializeOnly,"size",new e.SFInt32(128)),new t(o.initializeOnly,"textureProperties",new e.SFNode)]),getTypeName:function(){return"GeneratedCubeMapTexture"},getComponentName:function(){return"CubeMapTexturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),this.renderer.setup();let e=l.nextPowerOfTwo(this._size.getValue());if(e>0){e=l.nextPowerOfTwo(e);const t=this.getBrowser().getContext(),i=new Uint8Array(e*e*4);t.bindTexture(this.getTarget(),this.getTexture());for(const r of this.getTargets())t.texImage2D(r,0,t.RGBA,e,e,0,t.RGBA,t.UNSIGNED_BYTE,i);this.viewport=new p(0,0,e,e),this.frameBuffer=new s(this.getBrowser(),e,e)}},traverse:function(e,t){"NONE"!==this._update.getValue()&&this.frameBuffer&&t.isIndependent()&&(t.getGeneratedCubeMapTextures().push(this),this.modelMatrix.assign(t.getModelViewMatrix().get()).multRight(t.getCameraSpaceMatrix().get()))},renderTexture:function(){const e=[new d(g.zAxis,new g(0,0,-1)),new d(g.zAxis,new g(0,0,1)),new d(g.zAxis,new g(1,0,0)),new d(g.zAxis,new g(-1,0,0)),new d(g.zAxis,new g(0,-1,0)),new d(g.zAxis,new g(0,1,0))],t=[new g(-1,-1,1),new g(-1,-1,1),new g(-1,-1,1),new g(-1,-1,1),new g(1,1,1),new g(1,1,1)],i=new x;return function(r){this.renderer.setRenderer(r);const n=this.renderer,s=r.getBrowser(),o=r.getLayer(),h=s.getContext(),d=n.getBackground(),g=n.getNavigationInfo(),p=n.getViewpoint(),c=s.getHeadlight(),T=g._headlight.getValue(),_=g.getNearValue(),f=g.getFarValue(p),w=u.perspective(l.radians(90),_,f,1,1,this.projectionMatrix);this.setTransparent(d.getTransparent()),this.frameBuffer.bind(),n.getViewVolumes().push(this.viewVolume.set(w,this.viewport,this.viewport)),n.getProjectionMatrix().pushMatrix(w),h.bindTexture(this.getTarget(),this.getTexture()),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1);for(let r=0;r<6;++r){h.clear(h.COLOR_BUFFER_BIT),n.getCameraSpaceMatrix().pushMatrix(this.modelMatrix),n.getCameraSpaceMatrix().rotate(e[r]),n.getCameraSpaceMatrix().scale(t[r]);try{n.getViewMatrix().pushMatrix(i.assign(n.getCameraSpaceMatrix().get()).inverse())}catch(e){console.error(e),n.getViewMatrix().pushMatrix(x.Identity)}n.getModelViewMatrix().pushMatrix(i),T&&(c.getModelViewMatrix().pushMatrix(i),c.getModelViewMatrix().multLeft(p.getCameraSpaceMatrix())),o.traverse(a.DISPLAY,n),T&&c.getModelViewMatrix().pop(),n.getModelViewMatrix().pop(),n.getCameraSpaceMatrix().pop(),n.getViewMatrix().pop();const s=this.frameBuffer.readPixels(),u=this.frameBuffer.getWidth(),d=this.frameBuffer.getHeight();h.bindTexture(this.getTarget(),this.getTexture()),h.texImage2D(this.getTargets()[r],0,h.RGBA,u,d,!1,h.RGBA,h.UNSIGNED_BYTE,s)}this.updateTextureProperties(),n.getProjectionMatrix().pop(),n.getViewVolumes().pop(),this.frameBuffer.unbind(),"NEXT_FRAME_ONLY"===this._update.getValue()&&(this._update="NONE")}}(),setShaderUniformsToChannel:function(){const e=new Float32Array(16);return function(t,i,n,s){r.prototype.setShaderUniformsToChannel.call(this,t,i,n,s),n===this.renderer&&t.uniformMatrix4fv(i.x3d_ModelViewMatrix,!1,e)}}()}),c})),e("x_ite/Components/CubeMapTexturing/ImageCubeMapTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Algorithm","x_ite/DEBUG"],(function(e,t,i,r,n,s,o,a,u,h){"use strict";const d=new Uint8Array([255,255,255,255]),g=[new a(1,1),new a(3,1),new a(0,1),new a(2,1),new a(1,0),new a(1,2)];function p(e){n.call(this,e),s.call(this,e),this.addType(o.ImageCubeMapTexture),this.urlStack=new t.MFString}return p.prototype=Object.assign(Object.create(n.prototype),s.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new r([new i(o.inputOutput,"metadata",new t.SFNode),new i(o.inputOutput,"description",new t.SFString),new i(o.inputOutput,"load",new t.SFBool(!0)),new i(o.inputOutput,"url",new t.MFString),new i(o.inputOutput,"autoRefresh",new t.SFTime),new i(o.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(o.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"ImageCubeMapTexture"},getComponentName:function(){return"CubeMapTexturing"},getContainerField:function(){return"texture"},initialize:function(){n.prototype.initialize.call(this),s.prototype.initialize.call(this);const t=this.getBrowser().getContext();t.bindTexture(this.getTarget(),this.getTexture());for(let e=0;e<6;++e)t.texImage2D(this.getTargets()[e],0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,d);this.canvas=e("<canvas></canvas>"),this.image=e("<img></img>"),this.image.on("load",this.setImage.bind(this)),this.image.on("error",this.setError.bind(this)),this.image.bind("abort",this.setError.bind(this)),this.image[0].crossOrigin="Anonymous",this.requestImmediateLoad()},unloadNow:function(){this.clearTexture()},loadNow:function(){this.urlStack.setValue(this._url),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.clearTexture(),void this.setLoadState(o.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.image.attr("src",this.URL.href)},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading image:",decodeURI(this.URL.href)),this.loadNext()},setImage:function(){h&&"data:"!==this.URL.protocol&&console.info("Done loading image cube map texture:",decodeURI(this.URL.href));try{const e=this.image[0],t=this.canvas[0],i=t.getContext("2d");let r=e.width,n=e.height,s=Math.floor(r/4),a=Math.floor(n/3);u.isPowerOfTwo(s)&&u.isPowerOfTwo(a)&&4*s===r&&3*a===n?(t.width=r,t.height=n,i.drawImage(e,0,0)):(s=u.nextPowerOfTwo(s),a=u.nextPowerOfTwo(a),r=4*s,n=3*a,t.width=r,t.height=n,i.drawImage(e,0,0,e.width,e.height,0,0,r,n));const h=this.getBrowser().getContext();let d=!0;h.bindTexture(this.getTarget(),this.getTexture()),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1);for(let e=0;e<6;++e){const t=i.getImageData(g[e].x*s,g[e].y*a,s,a).data;if(d)for(let e=3;e<t.length;e+=4)if(255!==t[e]){d=!1;break}h.texImage2D(this.getTargets()[e],0,h.RGBA,s,a,!1,h.RGBA,h.UNSIGNED_BYTE,new Uint8Array(t.buffer))}this.updateTextureProperties(),this.setTransparent(!d),this.setLoadState(o.COMPLETE_STATE)}catch(e){console.log(e.message),this.setError()}}}),p})),e(t.getComponentUrl("cube-map-texturing"),["x_ite/Components","x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture","x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture","x_ite/Components/CubeMapTexturing/ImageCubeMapTexture","x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode"],(function(e,t,i,r,n){"use strict";e.addComponent({name:"CubeMapTexturing",types:{ComposedCubeMapTexture:t,GeneratedCubeMapTexture:i,ImageCubeMapTexture:r},abstractTypes:{X3DEnvironmentTextureNode:n}})}))}();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){const t=window[Symbol.for("X_ITE.X3D-5.0.0")].define,n=window[Symbol.for("X_ITE.X3D-5.0.0")].require;t("x_ite/Components/DIS/DISEntityManager",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,u){"use strict";function o(t){i.call(this,t),this.addType(u.DISEntityManager)}return o.prototype=Object.assign(Object.create(i.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(u.inputOutput,"metadata",new t.SFNode),new n(u.inputOutput,"address",new t.SFString("localhost")),new n(u.inputOutput,"applicationID",new t.SFInt32(1)),new n(u.inputOutput,"mapping",new t.MFNode),new n(u.inputOutput,"port",new t.SFInt32),new n(u.inputOutput,"siteID",new t.SFInt32),new n(u.outputOnly,"addedEntities",new t.MFNode),new n(u.outputOnly,"removedEntities",new t.MFNode)]),getTypeName:function(){return"DISEntityManager"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"}}),o})),t("x_ite/Components/DIS/DISEntityTypeMapping",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DInfoNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.DISEntityTypeMapping)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"load",new t.SFBool(!0)),new n(o.inputOutput,"url",new t.MFString),new n(o.inputOutput,"autoRefresh",new t.SFTime),new n(o.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new n(o.initializeOnly,"category",new t.SFInt32),new n(o.initializeOnly,"country",new t.SFInt32),new n(o.initializeOnly,"domain",new t.SFInt32),new n(o.initializeOnly,"extra",new t.SFInt32),new n(o.initializeOnly,"kind",new t.SFInt32),new n(o.initializeOnly,"specific",new t.SFInt32),new n(o.initializeOnly,"subcategory",new t.SFInt32)]),getTypeName:function(){return"DISEntityTypeMapping"},getComponentName:function(){return"DIS"},getContainerField:function(){return"mapping"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)},requestImmediateLoad:function(t=!0){},requestUnload:function(){},set_load__:function(){},set_url__:function(){}}),p})),t("x_ite/Components/DIS/EspduTransform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Core/X3DSensorNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.EspduTransform)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOnly,"addChildren",new t.MFNode),new n(o.inputOnly,"removeChildren",new t.MFNode),new n(o.inputOutput,"children",new t.MFNode),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOnly,"set_articulationParameterValue0",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue1",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue2",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue3",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue4",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue5",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue6",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue7",new t.SFFloat),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"articulationParameterCount",new t.SFInt32),new n(o.inputOutput,"articulationParameterDesignatorArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterChangeIndicatorArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterIdPartAttachedToArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterTypeArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterArray",new t.MFFloat),new n(o.inputOutput,"center",new t.SFVec3f),new n(o.inputOutput,"collisionType",new t.SFInt32),new n(o.inputOutput,"deadReckoning",new t.SFInt32),new n(o.inputOutput,"detonationLocation",new t.SFVec3f),new n(o.inputOutput,"detonationRelativeLocation",new t.SFVec3f),new n(o.inputOutput,"detonationResult",new t.SFInt32),new n(o.inputOutput,"entityCategory",new t.SFInt32),new n(o.inputOutput,"entityCountry",new t.SFInt32),new n(o.inputOutput,"entityDomain",new t.SFInt32),new n(o.inputOutput,"entityExtra",new t.SFInt32),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"entityKind",new t.SFInt32),new n(o.inputOutput,"entitySpecific",new t.SFInt32),new n(o.inputOutput,"entitySubCategory",new t.SFInt32),new n(o.inputOutput,"eventApplicationID",new t.SFInt32(1)),new n(o.inputOutput,"eventEntityID",new t.SFInt32),new n(o.inputOutput,"eventNumber",new t.SFInt32),new n(o.inputOutput,"eventSiteID",new t.SFInt32),new n(o.inputOutput,"fired1",new t.SFBool),new n(o.inputOutput,"fired2",new t.SFBool),new n(o.inputOutput,"fireMissionIndex",new t.SFInt32),new n(o.inputOutput,"firingRange",new t.SFFloat),new n(o.inputOutput,"firingRate",new t.SFInt32),new n(o.inputOutput,"forceID",new t.SFInt32),new n(o.inputOutput,"fuse",new t.SFInt32),new n(o.inputOutput,"linearVelocity",new t.SFVec3f),new n(o.inputOutput,"linearAcceleration",new t.SFVec3f),new n(o.inputOutput,"marking",new t.SFString),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"munitionApplicationID",new t.SFInt32(1)),new n(o.inputOutput,"munitionEndPoint",new t.SFVec3f),new n(o.inputOutput,"munitionEntityID",new t.SFInt32),new n(o.inputOutput,"munitionQuantity",new t.SFInt32),new n(o.inputOutput,"munitionSiteID",new t.SFInt32),new n(o.inputOutput,"munitionStartPoint",new t.SFVec3f),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFTime(.1)),new n(o.inputOutput,"rotation",new t.SFRotation),new n(o.inputOutput,"scale",new t.SFVec3f(1,1,1)),new n(o.inputOutput,"scaleOrientation",new t.SFRotation),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"translation",new t.SFVec3f),new n(o.inputOutput,"warhead",new t.SFInt32),new n(o.inputOutput,"writeInterval",new t.SFTime(1)),new n(o.outputOnly,"articulationParameterValue0_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue1_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue2_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue3_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue4_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue5_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue6_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue7_changed",new t.SFFloat),new n(o.outputOnly,"collideTime",new t.SFTime),new n(o.outputOnly,"detonateTime",new t.SFTime),new n(o.outputOnly,"firedTime",new t.SFTime),new n(o.outputOnly,"isCollided",new t.SFBool),new n(o.outputOnly,"isDetonated",new t.SFBool),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime),new n(o.initializeOnly,"rtpHeaderExpected",new t.SFBool)]),getTypeName:function(){return"EspduTransform"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t("x_ite/Components/DIS/ReceiverPdu",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DSensorNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.ReceiverPdu)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"radioID",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFFloat(.1)),new n(o.inputOutput,"receivedPower",new t.SFFloat),new n(o.inputOutput,"receiverState",new t.SFInt32),new n(o.inputOutput,"rtpHeaderExpected",new t.SFBool),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"transmitterApplicationID",new t.SFInt32(1)),new n(o.inputOutput,"transmitterEntityID",new t.SFInt32),new n(o.inputOutput,"transmitterRadioID",new t.SFInt32),new n(o.inputOutput,"transmitterSiteID",new t.SFInt32),new n(o.inputOutput,"whichGeometry",new t.SFInt32(1)),new n(o.inputOutput,"writeInterval",new t.SFFloat(1)),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime)]),getTypeName:function(){return"ReceiverPdu"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t("x_ite/Components/DIS/SignalPdu",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DSensorNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.SignalPdu)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"data",new t.MFInt32),new n(o.inputOutput,"dataLength",new t.SFInt32),new n(o.inputOutput,"encodingScheme",new t.SFInt32),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"radioID",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFFloat(.1)),new n(o.inputOutput,"rtpHeaderExpected",new t.SFBool),new n(o.inputOutput,"sampleRate",new t.SFInt32),new n(o.inputOutput,"samples",new t.SFInt32),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"tdlType",new t.SFInt32),new n(o.inputOutput,"whichGeometry",new t.SFInt32(1)),new n(o.inputOutput,"writeInterval",new t.SFFloat(1)),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime)]),getTypeName:function(){return"SignalPdu"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t("x_ite/Components/DIS/TransmitterPdu",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DSensorNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.TransmitterPdu)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"antennaLocation",new t.SFVec3f),new n(o.inputOutput,"antennaPatternLength",new t.SFInt32),new n(o.inputOutput,"antennaPatternType",new t.SFInt32),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"cryptoKeyID",new t.SFInt32),new n(o.inputOutput,"cryptoSystem",new t.SFInt32),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"frequency",new t.SFInt32),new n(o.inputOutput,"inputSource",new t.SFInt32),new n(o.inputOutput,"lengthOfModulationParameters",new t.SFInt32),new n(o.inputOutput,"modulationTypeDetail",new t.SFInt32),new n(o.inputOutput,"modulationTypeMajor",new t.SFInt32),new n(o.inputOutput,"modulationTypeSpreadSpectrum",new t.SFInt32),new n(o.inputOutput,"modulationTypeSystem",new t.SFInt32),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"power",new t.SFFloat),new n(o.inputOutput,"radioEntityTypeCategory",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeCountry",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeDomain",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeKind",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeNomenclature",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeNomenclatureVersion",new t.SFInt32),new n(o.inputOutput,"radioID",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFFloat(.1)),new n(o.inputOutput,"relativeAntennaLocation",new t.SFVec3f),new n(o.inputOutput,"rtpHeaderExpected",new t.SFBool),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"transmitFrequencyBandwidth",new t.SFFloat),new n(o.inputOutput,"transmitState",new t.SFInt32),new n(o.inputOutput,"whichGeometry",new t.SFInt32(1)),new n(o.inputOutput,"writeInterval",new t.SFFloat(1)),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime)]),getTypeName:function(){return"TransmitterPdu"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t(n.getComponentUrl("dis"),["x_ite/Components","x_ite/Components/DIS/DISEntityManager","x_ite/Components/DIS/DISEntityTypeMapping","x_ite/Components/DIS/EspduTransform","x_ite/Components/DIS/ReceiverPdu","x_ite/Components/DIS/SignalPdu","x_ite/Components/DIS/TransmitterPdu"],(function(t,n,e,i,u,o,p){"use strict";t.addComponent({name:"DIS",types:{DISEntityManager:n,DISEntityTypeMapping:e,EspduTransform:i,ReceiverPdu:u,SignalPdu:o,TransmitterPdu:p},abstractTypes:{}})}))}();
|
|
1
|
+
!function(){const t=window[Symbol.for("X_ITE.X3D-5.0.2")].define,n=window[Symbol.for("X_ITE.X3D-5.0.2")].require;t("x_ite/Components/DIS/DISEntityManager",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,u){"use strict";function o(t){i.call(this,t),this.addType(u.DISEntityManager)}return o.prototype=Object.assign(Object.create(i.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(u.inputOutput,"metadata",new t.SFNode),new n(u.inputOutput,"address",new t.SFString("localhost")),new n(u.inputOutput,"applicationID",new t.SFInt32(1)),new n(u.inputOutput,"mapping",new t.MFNode),new n(u.inputOutput,"port",new t.SFInt32),new n(u.inputOutput,"siteID",new t.SFInt32),new n(u.outputOnly,"addedEntities",new t.MFNode),new n(u.outputOnly,"removedEntities",new t.MFNode)]),getTypeName:function(){return"DISEntityManager"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"}}),o})),t("x_ite/Components/DIS/DISEntityTypeMapping",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DInfoNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.DISEntityTypeMapping)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"load",new t.SFBool(!0)),new n(o.inputOutput,"url",new t.MFString),new n(o.inputOutput,"autoRefresh",new t.SFTime),new n(o.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new n(o.initializeOnly,"category",new t.SFInt32),new n(o.initializeOnly,"country",new t.SFInt32),new n(o.initializeOnly,"domain",new t.SFInt32),new n(o.initializeOnly,"extra",new t.SFInt32),new n(o.initializeOnly,"kind",new t.SFInt32),new n(o.initializeOnly,"specific",new t.SFInt32),new n(o.initializeOnly,"subcategory",new t.SFInt32)]),getTypeName:function(){return"DISEntityTypeMapping"},getComponentName:function(){return"DIS"},getContainerField:function(){return"mapping"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)},requestImmediateLoad:function(t=!0){},requestUnload:function(){},set_load__:function(){},set_url__:function(){}}),p})),t("x_ite/Components/DIS/EspduTransform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Core/X3DSensorNode","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.EspduTransform)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOnly,"addChildren",new t.MFNode),new n(o.inputOnly,"removeChildren",new t.MFNode),new n(o.inputOutput,"children",new t.MFNode),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOnly,"set_articulationParameterValue0",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue1",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue2",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue3",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue4",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue5",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue6",new t.SFFloat),new n(o.inputOnly,"set_articulationParameterValue7",new t.SFFloat),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"articulationParameterCount",new t.SFInt32),new n(o.inputOutput,"articulationParameterDesignatorArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterChangeIndicatorArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterIdPartAttachedToArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterTypeArray",new t.MFInt32),new n(o.inputOutput,"articulationParameterArray",new t.MFFloat),new n(o.inputOutput,"center",new t.SFVec3f),new n(o.inputOutput,"collisionType",new t.SFInt32),new n(o.inputOutput,"deadReckoning",new t.SFInt32),new n(o.inputOutput,"detonationLocation",new t.SFVec3f),new n(o.inputOutput,"detonationRelativeLocation",new t.SFVec3f),new n(o.inputOutput,"detonationResult",new t.SFInt32),new n(o.inputOutput,"entityCategory",new t.SFInt32),new n(o.inputOutput,"entityCountry",new t.SFInt32),new n(o.inputOutput,"entityDomain",new t.SFInt32),new n(o.inputOutput,"entityExtra",new t.SFInt32),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"entityKind",new t.SFInt32),new n(o.inputOutput,"entitySpecific",new t.SFInt32),new n(o.inputOutput,"entitySubCategory",new t.SFInt32),new n(o.inputOutput,"eventApplicationID",new t.SFInt32(1)),new n(o.inputOutput,"eventEntityID",new t.SFInt32),new n(o.inputOutput,"eventNumber",new t.SFInt32),new n(o.inputOutput,"eventSiteID",new t.SFInt32),new n(o.inputOutput,"fired1",new t.SFBool),new n(o.inputOutput,"fired2",new t.SFBool),new n(o.inputOutput,"fireMissionIndex",new t.SFInt32),new n(o.inputOutput,"firingRange",new t.SFFloat),new n(o.inputOutput,"firingRate",new t.SFInt32),new n(o.inputOutput,"forceID",new t.SFInt32),new n(o.inputOutput,"fuse",new t.SFInt32),new n(o.inputOutput,"linearVelocity",new t.SFVec3f),new n(o.inputOutput,"linearAcceleration",new t.SFVec3f),new n(o.inputOutput,"marking",new t.SFString),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"munitionApplicationID",new t.SFInt32(1)),new n(o.inputOutput,"munitionEndPoint",new t.SFVec3f),new n(o.inputOutput,"munitionEntityID",new t.SFInt32),new n(o.inputOutput,"munitionQuantity",new t.SFInt32),new n(o.inputOutput,"munitionSiteID",new t.SFInt32),new n(o.inputOutput,"munitionStartPoint",new t.SFVec3f),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFTime(.1)),new n(o.inputOutput,"rotation",new t.SFRotation),new n(o.inputOutput,"scale",new t.SFVec3f(1,1,1)),new n(o.inputOutput,"scaleOrientation",new t.SFRotation),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"translation",new t.SFVec3f),new n(o.inputOutput,"warhead",new t.SFInt32),new n(o.inputOutput,"writeInterval",new t.SFTime(1)),new n(o.outputOnly,"articulationParameterValue0_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue1_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue2_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue3_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue4_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue5_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue6_changed",new t.SFFloat),new n(o.outputOnly,"articulationParameterValue7_changed",new t.SFFloat),new n(o.outputOnly,"collideTime",new t.SFTime),new n(o.outputOnly,"detonateTime",new t.SFTime),new n(o.outputOnly,"firedTime",new t.SFTime),new n(o.outputOnly,"isCollided",new t.SFBool),new n(o.outputOnly,"isDetonated",new t.SFBool),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime),new n(o.initializeOnly,"rtpHeaderExpected",new t.SFBool)]),getTypeName:function(){return"EspduTransform"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t("x_ite/Components/DIS/ReceiverPdu",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DSensorNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.ReceiverPdu)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"radioID",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFFloat(.1)),new n(o.inputOutput,"receivedPower",new t.SFFloat),new n(o.inputOutput,"receiverState",new t.SFInt32),new n(o.inputOutput,"rtpHeaderExpected",new t.SFBool),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"transmitterApplicationID",new t.SFInt32(1)),new n(o.inputOutput,"transmitterEntityID",new t.SFInt32),new n(o.inputOutput,"transmitterRadioID",new t.SFInt32),new n(o.inputOutput,"transmitterSiteID",new t.SFInt32),new n(o.inputOutput,"whichGeometry",new t.SFInt32(1)),new n(o.inputOutput,"writeInterval",new t.SFFloat(1)),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime)]),getTypeName:function(){return"ReceiverPdu"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t("x_ite/Components/DIS/SignalPdu",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DSensorNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.SignalPdu)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"data",new t.MFInt32),new n(o.inputOutput,"dataLength",new t.SFInt32),new n(o.inputOutput,"encodingScheme",new t.SFInt32),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"radioID",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFFloat(.1)),new n(o.inputOutput,"rtpHeaderExpected",new t.SFBool),new n(o.inputOutput,"sampleRate",new t.SFInt32),new n(o.inputOutput,"samples",new t.SFInt32),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"tdlType",new t.SFInt32),new n(o.inputOutput,"whichGeometry",new t.SFInt32(1)),new n(o.inputOutput,"writeInterval",new t.SFFloat(1)),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime)]),getTypeName:function(){return"SignalPdu"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t("x_ite/Components/DIS/TransmitterPdu",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DSensorNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DConstants"],(function(t,n,e,i,u,o){"use strict";function p(t){i.call(this,t),u.call(this,t),this.addType(o.TransmitterPdu)}return p.prototype=Object.assign(Object.create(i.prototype),u.prototype,{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new e([new n(o.inputOutput,"metadata",new t.SFNode),new n(o.inputOutput,"visible",new t.SFBool(!0)),new n(o.inputOutput,"bboxDisplay",new t.SFBool),new n(o.initializeOnly,"bboxSize",new t.SFVec3f(-1,-1,-1)),new n(o.initializeOnly,"bboxCenter",new t.SFVec3f),new n(o.inputOutput,"enabled",new t.SFBool(!0)),new n(o.outputOnly,"isActive",new t.SFBool),new n(o.inputOutput,"address",new t.SFString("localhost")),new n(o.inputOutput,"antennaLocation",new t.SFVec3f),new n(o.inputOutput,"antennaPatternLength",new t.SFInt32),new n(o.inputOutput,"antennaPatternType",new t.SFInt32),new n(o.inputOutput,"applicationID",new t.SFInt32(1)),new n(o.inputOutput,"cryptoKeyID",new t.SFInt32),new n(o.inputOutput,"cryptoSystem",new t.SFInt32),new n(o.inputOutput,"entityID",new t.SFInt32),new n(o.inputOutput,"frequency",new t.SFInt32),new n(o.inputOutput,"inputSource",new t.SFInt32),new n(o.inputOutput,"lengthOfModulationParameters",new t.SFInt32),new n(o.inputOutput,"modulationTypeDetail",new t.SFInt32),new n(o.inputOutput,"modulationTypeMajor",new t.SFInt32),new n(o.inputOutput,"modulationTypeSpreadSpectrum",new t.SFInt32),new n(o.inputOutput,"modulationTypeSystem",new t.SFInt32),new n(o.inputOutput,"multicastRelayHost",new t.SFString),new n(o.inputOutput,"multicastRelayPort",new t.SFInt32),new n(o.inputOutput,"networkMode",new t.SFString("standAlone")),new n(o.inputOutput,"port",new t.SFInt32),new n(o.inputOutput,"power",new t.SFFloat),new n(o.inputOutput,"radioEntityTypeCategory",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeCountry",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeDomain",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeKind",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeNomenclature",new t.SFInt32),new n(o.inputOutput,"radioEntityTypeNomenclatureVersion",new t.SFInt32),new n(o.inputOutput,"radioID",new t.SFInt32),new n(o.inputOutput,"readInterval",new t.SFFloat(.1)),new n(o.inputOutput,"relativeAntennaLocation",new t.SFVec3f),new n(o.inputOutput,"rtpHeaderExpected",new t.SFBool),new n(o.inputOutput,"siteID",new t.SFInt32),new n(o.inputOutput,"transmitFrequencyBandwidth",new t.SFFloat),new n(o.inputOutput,"transmitState",new t.SFInt32),new n(o.inputOutput,"whichGeometry",new t.SFInt32(1)),new n(o.inputOutput,"writeInterval",new t.SFFloat(1)),new n(o.outputOnly,"isNetworkReader",new t.SFBool),new n(o.outputOnly,"isNetworkWriter",new t.SFBool),new n(o.outputOnly,"isRtpHeaderHeard",new t.SFBool),new n(o.outputOnly,"isStandAlone",new t.SFBool),new n(o.outputOnly,"timestamp",new t.SFTime)]),getTypeName:function(){return"TransmitterPdu"},getComponentName:function(){return"DIS"},getContainerField:function(){return"children"},initialize:function(){i.prototype.initialize.call(this),u.prototype.initialize.call(this)}}),p})),t(n.getComponentUrl("dis"),["x_ite/Components","x_ite/Components/DIS/DISEntityManager","x_ite/Components/DIS/DISEntityTypeMapping","x_ite/Components/DIS/EspduTransform","x_ite/Components/DIS/ReceiverPdu","x_ite/Components/DIS/SignalPdu","x_ite/Components/DIS/TransmitterPdu"],(function(t,n,e,i,u,o,p){"use strict";t.addComponent({name:"DIS",types:{DISEntityManager:n,DISEntityTypeMapping:e,EspduTransform:i,ReceiverPdu:u,SignalPdu:o,TransmitterPdu:p},abstractTypes:{}})}))}();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.
|
|
1
|
+
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.2")].define,t=window[Symbol.for("X_ITE.X3D-5.0.2")].require;e("x_ite/Components/EventUtilities/BooleanFilter",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.BooleanFilter)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_boolean",new e.SFBool),new t(o.outputOnly,"inputTrue",new e.SFBool),new t(o.outputOnly,"inputFalse",new e.SFBool),new t(o.outputOnly,"inputNegate",new e.SFBool)]),getTypeName:function(){return"BooleanFilter"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__:function(){const e=this._set_boolean.getValue();e?this._inputTrue=!0:this._inputFalse=!1,this._inputNegate=!e}}),s})),e("x_ite/Components/EventUtilities/X3DSequencerNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i){"use strict";function n(i){e.call(this,i),this.addType(t.X3DSequencerNode),this.index=-1}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._set_fraction.addInterest("set_fraction__",this),this._previous.addInterest("set_previous__",this),this._next.addInterest("set_next__",this),this._key.addInterest("set_index__",this)},set_fraction__:function(){const e=this._set_fraction.getValue(),t=this._key,n=t.length;if(0===n)return;let o=0;if(1===n||e<=t[0])o=0;else if(e>=t[n-1])o=this.getSize()-1;else{o=i.upperBound(t,0,n,e,i.less)-1}o!==this.index&&o<this.getSize()&&this.sequence(this.index=o)},set_previous__:function(){this._previous.getValue()&&(this.index<=0?this.index=this.getSize()-1:--this.index,this.index<this.getSize()&&this.sequence(this.index))},set_next__:function(){this._next.getValue()&&(this.index>=this.getSize()-1?this.index=0:++this.index,this.index<this.getSize()&&this.sequence(this.index))},set_index__:function(){this.index=-1}}),n})),e("x_ite/Components/EventUtilities/BooleanSequencer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EventUtilities/X3DSequencerNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.BooleanSequencer)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOnly,"previous",new e.SFBool),new t(o.inputOnly,"next",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFBool),new t(o.outputOnly,"value_changed",new e.SFBool)]),getTypeName:function(){return"BooleanSequencer"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_index__",this)},getSize:function(){return this._keyValue.length},sequence:function(e){this._value_changed=this._keyValue[e]}}),s})),e("x_ite/Components/EventUtilities/BooleanToggle",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.BooleanToggle)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_boolean",new e.SFBool),new t(o.inputOutput,"toggle",new e.SFBool)]),getTypeName:function(){return"BooleanToggle"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__:function(){this._set_boolean.getValue()&&(this._toggle=!this._toggle.getValue())}}),s})),e("x_ite/Components/EventUtilities/X3DTriggerNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DTriggerNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),e("x_ite/Components/EventUtilities/BooleanTrigger",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EventUtilities/X3DTriggerNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.BooleanTrigger)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_triggerTime",new e.SFTime),new t(o.outputOnly,"triggerTrue",new e.SFBool)]),getTypeName:function(){return"BooleanTrigger"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._set_triggerTime.addInterest("set_triggerTime__",this)},set_triggerTime__:function(){this._triggerTrue=!0}}),s})),e("x_ite/Components/EventUtilities/IntegerSequencer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EventUtilities/X3DSequencerNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.IntegerSequencer)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOnly,"previous",new e.SFBool),new t(o.inputOnly,"next",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFInt32),new t(o.outputOnly,"value_changed",new e.SFInt32)]),getTypeName:function(){return"IntegerSequencer"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_index__",this)},getSize:function(){return this._keyValue.length},sequence:function(e){this._value_changed=this._keyValue[e]}}),s})),e("x_ite/Components/EventUtilities/IntegerTrigger",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EventUtilities/X3DTriggerNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.IntegerTrigger)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_boolean",new e.SFBool),new t(o.inputOutput,"integerKey",new e.SFInt32(-1)),new t(o.outputOnly,"triggerValue",new e.SFInt32)]),getTypeName:function(){return"IntegerTrigger"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__:function(){this._triggerValue=this._integerKey}}),s})),e("x_ite/Components/EventUtilities/TimeTrigger",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EventUtilities/X3DTriggerNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,o){"use strict";function s(e){n.call(this,e),this.addType(o.TimeTrigger)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_boolean",new e.SFBool),new t(o.outputOnly,"triggerTime",new e.SFTime)]),getTypeName:function(){return"TimeTrigger"},getComponentName:function(){return"EventUtilities"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._set_boolean.addInterest("set_boolean__",this)},set_boolean__:function(){this._triggerTime=this.getBrowser().getCurrentTime()}}),s})),e(t.getComponentUrl("event-utilities"),["x_ite/Components","x_ite/Components/EventUtilities/BooleanFilter","x_ite/Components/EventUtilities/BooleanSequencer","x_ite/Components/EventUtilities/BooleanToggle","x_ite/Components/EventUtilities/BooleanTrigger","x_ite/Components/EventUtilities/IntegerSequencer","x_ite/Components/EventUtilities/IntegerTrigger","x_ite/Components/EventUtilities/TimeTrigger","x_ite/Components/EventUtilities/X3DSequencerNode","x_ite/Components/EventUtilities/X3DTriggerNode"],(function(e,t,i,n,o,s,r,l,a,u){"use strict";e.addComponent({name:"EventUtilities",types:{BooleanFilter:t,BooleanSequencer:i,BooleanToggle:n,BooleanTrigger:o,IntegerSequencer:s,IntegerTrigger:r,TimeTrigger:l},abstractTypes:{X3DSequencerNode:a,X3DTriggerNode:u}})}))}();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.0")].define,t=window[Symbol.for("X_ITE.X3D-5.0.0")].require;e("x_ite/Browser/Geometry2D/Arc2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addChildObjects("dimension",new t.SFInt32(40))}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTypeName:function(){return"ArcClose2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"arcClose2DOptions"}}),i})),e("x_ite/Browser/Geometry2D/ArcClose2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addChildObjects("dimension",new t.SFInt32(40))}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTypeName:function(){return"Arc2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"arc2DOptions"}}),i})),e("x_ite/Browser/Geometry2D/Circle2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Complex"],(function(e,t,i,n){"use strict";function s(n){e.call(this,n),this.addChildObjects("dimension",new t.SFInt32(40)),this.vertices=i.createArray()}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,getTypeName:function(){return"Circle2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"circle2DOptions"},initialize:function(){this.addInterest("build",this),this.build()},getVertices:function(){return this.vertices},build:function(){const e=this._dimension.getValue(),t=2*Math.PI/e,i=this.vertices;i.length=0;for(let s=0;s<e;++s){const e=n.Polar(1,t*s),o=n.Polar(1,t*(s+1));i.push(e.real,e.imag,0,1),i.push(o.real,o.imag,0,1)}i.shrinkToFit()}}),s})),e("x_ite/Browser/Geometry2D/Disk2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector3"],(function(e,t,i,n,s){"use strict";function o(n){e.call(this,n),this.addChildObjects("dimension",new t.SFInt32(40)),this.circleVertices=i.createArray(),this.diskTexCoords=i.createArray(),this.diskNormals=i.createArray(),this.diskVertices=i.createArray()}return o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,getTypeName:function(){return"Disk2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"circle2DOptions"},initialize:function(){this.addInterest("build",this),this.build()},getCircleVertices:function(){return this.circleVertices},getDiskTexCoords:function(){return this.diskTexCoords},getDiskNormals:function(){return this.diskNormals},getDiskVertices:function(){return this.diskVertices},build:function(){const e=new n(.5,.5),t=new n(0,0),i=new n(0,0),s=new n(0,0),o=new n(0,0);return function(){const n=this._dimension.getValue(),r=2*Math.PI/n,a=this.circleVertices,l=this.diskTexCoords,c=this.diskNormals,u=this.diskVertices;a.length=0,l.length=0,c.length=0,u.length=0;for(let g=0;g<n;++g){const n=r*g,h=r*(g+1);t.setPolar(.5,n).add(e),i.setPolar(.5,h).add(e),s.setPolar(1,n),o.setPolar(1,h),a.push(s.real,s.imag,0,1),l.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(0,0,0,1,s.real,s.imag,0,1,o.real,o.imag,0,1)}a.shrinkToFit(),l.shrinkToFit(),c.shrinkToFit(),u.shrinkToFit()}}()}),o})),e("x_ite/Browser/Geometry2D/Rectangle2DOptions",["x_ite/Fields","x_ite/Base/X3DBaseNode","x_ite/Components/Geometry3D/IndexedFaceSet","x_ite/Components/Rendering/Coordinate","x_ite/Components/Texturing/TextureCoordinate"],(function(e,t,i,n,s){"use strict";function o(e){t.call(this,e)}return o.prototype=Object.assign(Object.create(t.prototype),{constructor:o,getTypeName:function(){return"Rectangle2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"rectangle2DOptions"},initialize:function(){t.prototype.initialize.call(this)},getGeometry:function(){if(this.geometry)return this.geometry;this.geometry=new i(this.getExecutionContext()),this.geometry._texCoord=new s(this.getExecutionContext()),this.geometry._coord=new n(this.getExecutionContext());const t=this.geometry,o=this.geometry._texCoord.getValue(),r=this.geometry._coord.getValue();return t._texCoordIndex=new e.MFInt32(0,1,2,3,-1),t._coordIndex=new e.MFInt32(0,1,2,3,-1),o._point=new e.MFVec2f(new e.SFVec2f(1,1),new e.SFVec2f(0,1),new e.SFVec2f(0,0),new e.SFVec2f(1,0)),r._point=new e.MFVec3f(new e.SFVec3f(1,1,0),new e.SFVec3f(-1,1,0),new e.SFVec3f(-1,-1,0),new e.SFVec3f(1,-1,0)),o.setup(),r.setup(),t.setup(),this.geometry}}),o})),e("x_ite/Browser/Geometry2D/X3DGeometry2DContext",["x_ite/Browser/Geometry2D/Arc2DOptions","x_ite/Browser/Geometry2D/ArcClose2DOptions","x_ite/Browser/Geometry2D/Circle2DOptions","x_ite/Browser/Geometry2D/Disk2DOptions","x_ite/Browser/Geometry2D/Rectangle2DOptions","x_ite/Browser/Core/PrimitiveQuality"],(function(e,t,i,n,s,o){"use strict";function r(){}function a(e,t){const i=new t(this.getPrivateScene());return i.setup(),this[e]=function(){return i},Object.defineProperty(this,e,{enumerable:!1}),i}return r.prototype={initialize:function(){this.setGeometry2DPrimitiveQuality(this.getBrowserOptions().getPrimitiveQuality())},getArc2DOptions:function(){return a.call(this,"getArc2DOptions",e)},getArcClose2DOptions:function(){return a.call(this,"getArcClose2DOptions",t)},getCircle2DOptions:function(){return a.call(this,"getCircle2DOptions",i)},getDisk2DOptions:function(){return a.call(this,"getDisk2DOptions",n)},getRectangle2DOptions:function(){return a.call(this,"getRectangle2DOptions",s)},setGeometry2DPrimitiveQuality:function(e){const t=this.getArc2DOptions(),i=this.getArcClose2DOptions(),n=this.getCircle2DOptions(),s=this.getDisk2DOptions();switch(e){case o.LOW:t._dimension=20,i._dimension=20,n._dimension=20,s._dimension=20;break;case o.MEDIUM:t._dimension=40,i._dimension=40,n._dimension=40,s._dimension=40;break;case o.HIGH:t._dimension=80,i._dimension=80,n._dimension=80,s._dimension=80}}},r})),e("x_ite/Components/Geometry2D/Arc2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Algorithm"],(function(e,t,i,n,s,o,r){"use strict";function a(e){n.call(this,e),this.addType(s.Arc2D),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"startAngle",new e.SFFloat),new t(s.initializeOnly,"endAngle",new e.SFFloat(1.5708)),new t(s.initializeOnly,"radius",new e.SFFloat(1))]),getTypeName:function(){return"Arc2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getArc2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArc2DOptions().removeInterest("requestRebuild",this)},getSweepAngle:function(){const e=r.interval(this._startAngle.getValue(),0,2*Math.PI),t=r.interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build:function(){const e=this.getBrowser().getArc2DOptions()._dimension.getValue(),t=this._startAngle.getValue(),i=Math.abs(this._radius.getValue()),n=this.getSweepAngle(),s=Math.max(3,Math.floor(n*e/(2*Math.PI))),r=this.getVertices();for(let e=0;e<s;++e){const a=t+n*(e/s),l=o.Polar(i,a),c=t+n*((e+1)/s),u=o.Polar(i,c);r.push(l.real,l.imag,0,1),r.push(u.real,u.imag,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),a})),e("x_ite/Components/Geometry2D/ArcClose2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Algorithm"],(function(e,t,i,n,s,o,r){"use strict";function a(e){n.call(this,e),this.addType(s.ArcClose2D),this.setGeometryType(2),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"closureType",new e.SFString("PIE")),new t(s.initializeOnly,"startAngle",new e.SFFloat),new t(s.initializeOnly,"endAngle",new e.SFFloat(1.5708)),new t(s.initializeOnly,"radius",new e.SFFloat(1)),new t(s.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"ArcClose2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getArcClose2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArcClose2DOptions().removeInterest("requestRebuild",this)},getSweepAngle:function(){const e=r.interval(this._startAngle.getValue(),0,2*Math.PI),t=r.interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build:function(){const e=new o(.5,.5);return function(){const t=this.getBrowser().getArcClose2DOptions(),i="CHORD"===this._closureType.getValue(),n=t._dimension.getValue(),s=this._startAngle.getValue(),r=Math.abs(this._radius.getValue()),a=this.getSweepAngle(),l=Math.max(4,Math.floor(a*n/(2*Math.PI))),c=this.getTexCoords(),u=this.getNormals(),g=this.getVertices(),h=[],d=[];this.getMultiTexCoords().push(c);const p=l-1;for(let t=0;t<l;++t){const i=s+a*(t/p);h.push(o.Polar(.5,i).add(e)),d.push(o.Polar(r,i))}if(i){const e=h[0],t=d[0];for(let i=1;i<p;++i){const n=h[i],s=h[i+1],o=d[i],r=d[i+1];c.push(e.real,e.imag,0,1,n.real,n.imag,0,1,s.real,s.imag,0,1),u.push(0,0,1,0,0,1,0,0,1),g.push(t.real,t.imag,0,1,o.real,o.imag,0,1,r.real,r.imag,0,1)}}else for(let e=0;e<p;++e){const t=h[e],i=h[e+1],n=d[e],s=d[e+1];c.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),u.push(0,0,1,0,0,1,0,0,1),g.push(0,0,0,1,n.real,n.imag,0,1,s.real,s.imag,0,1)}this.getMin().set(-r,-r,0),this.getMax().set(r,r,0),this.setSolid(this._solid.getValue())}}()}),a})),e("x_ite/Components/Geometry2D/Circle2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.Circle2D),this._radius.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"radius",new e.SFFloat(1))]),getTypeName:function(){return"Circle2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getCircle2DOptions().addInterest("requestRebuild",this):this.getBrowser().getCircle2DOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getCircle2DOptions(),t=this.getVertices(),i=this._radius.getValue();if(1===i)this.setVertices(e.getVertices());else{const n=e.getVertices().getValue();for(let e=0,s=n.length;e<s;e+=4)t.push(n[e]*i,n[e+1]*i,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),o})),e("x_ite/Components/Geometry2D/Disk2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s,o){"use strict";function r(e){s.call(this,e),this.addType(o.Disk2D),this._innerRadius.setUnit("length"),this._outerRadius.setUnit("length")}return r.prototype=Object.assign(Object.create(n.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.initializeOnly,"innerRadius",new e.SFFloat),new t(o.initializeOnly,"outerRadius",new e.SFFloat(1)),new t(o.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"Disk2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this)},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getDisk2DOptions().addInterest("requestRebuild",this):this.getBrowser().getDisk2DOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getDisk2DOptions(),t=Math.min(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue())),i=Math.max(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue()));if(t===i){const t=this.getVertices();if(0===i)return;if(1===i)this.setVertices(e.getCircleVertices());else{const n=e.getCircleVertices().getValue();for(let e=0,s=n.length;e<s;e+=4)t.push(n[e]*i,n[e+1]*i,0,1)}return this.getMin().set(-i,-i,0),this.getMax().set(i,i,0),void this.setGeometryType(1)}if(0===t){if(this.getMultiTexCoords().push(e.getDiskTexCoords()),this.setNormals(e.getDiskNormals()),1===i)this.setVertices(e.getDiskVertices());else{const t=e.getDiskVertices().getValue(),n=this.getVertices();for(let e=0,s=t.length;e<s;e+=4)n.push(t[e]*i,t[e+1]*i,0,1)}return this.getMin().set(-i,-i,0),this.getMax().set(i,i,0),this.setGeometryType(2),void this.setSolid(this._solid.getValue())}const n=t/i,s=(1-n)/2,o=e.getDiskTexCoords().getValue(),r=e.getDiskVertices().getValue(),a=this.getTexCoords(),l=this.getNormals(),c=this.getVertices();this.getMultiTexCoords().push(a);for(let e=0,u=r.length;e<u;e+=12)a.push(o[e+4]*n+s,o[e+5]*n+s,0,1,o[e+4],o[e+5],0,1,o[e+8],o[e+9],0,1,o[e+4]*n+s,o[e+5]*n+s,0,1,o[e+8],o[e+9],0,1,o[e+8]*n+s,o[e+9]*n+s,0,1),l.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),c.push(r[e+4]*t,r[e+5]*t,0,1,r[e+4]*i,r[e+5]*i,0,1,r[e+8]*i,r[e+9]*i,0,1,r[e+4]*t,r[e+5]*t,0,1,r[e+8]*i,r[e+9]*i,0,1,r[e+8]*t,r[e+9]*t,0,1);this.getMin().set(-i,-i,0),this.getMax().set(i,i,0),this.setGeometryType(2),this.setSolid(this._solid.getValue())},intersectsLine:function(e,t,i,o){return this.getGeometryType()<2?s.prototype.intersectsLine.call(this,e,t,i,o):n.prototype.intersectsLine.call(this,e,t,i,o)},intersectsBox:function(e,t,i){return this.getGeometryType()<2?s.prototype.intersectsBox.call(this,e,t,i):n.prototype.intersectsBox.call(this,e,t,i)},display:function(e,t){return this.getGeometryType()<2?s.prototype.display.call(this,e,t):n.prototype.display.call(this,e,t)},displayParticles:function(e,t,i,o){return this.getGeometryType()<2?s.prototype.displayParticles.call(this,e,t,i,o):n.prototype.displayParticles.call(this,e,t,i,o)}}),r})),e("x_ite/Components/Geometry2D/Polyline2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.Polyline2D),this._lineSegments.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"lineSegments",new e.MFVec2f)]),getTypeName:function(){return"Polyline2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=this._lineSegments.getValue(),t=this.getVertices();for(let i=0,n=2*(this._lineSegments.length-1);i<n;i+=2)t.push(e[i+0],e[i+1],0,1),t.push(e[i+2],e[i+3],0,1)}}),o})),e("x_ite/Components/Geometry2D/Polypoint2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DPointGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.Polypoint2D),this._point.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"point",new e.MFVec2f)]),getTypeName:function(){return"Polypoint2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=this._point.getValue(),t=this.getVertices();for(let i=0,n=2*this._point.length;i<n;i+=2)t.push(e[i],e[i+1],0,1)}}),o})),e("x_ite/Components/Geometry2D/Rectangle2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,s,o,r){"use strict";function a(e){n.call(this,e),this.addType(s.Rectangle2D),this.setGeometryType(2),this._size.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"size",new e.SFVec2f(2,2)),new t(s.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"Rectangle2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=new o(2,2);return function(){const t=this.getBrowser().getRectangle2DOptions().getGeometry(),i=this._size.getValue();if(this.setMultiTexCoords(t.getMultiTexCoords()),this.setNormals(t.getNormals()),i.equals(e))this.setVertices(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=r.divide(i,2),n=e.x,s=e.y,o=t.getVertices().getValue(),a=this.getVertices();for(let e=0;e<o.length;e+=4)a.push(n*o[e],s*o[e+1],0,1);this.getMin().set(-n,-s,0),this.getMax().set(n,s,0)}this.setSolid(this._solid.getValue())}}()}),a})),e("x_ite/Components/Geometry2D/TriangleSet2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.TriangleSet2D),this.setGeometryType(2),this._vertices.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"vertices",new e.MFVec2f),new t(s.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"TriangleSet2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=this._vertices.getValue(),t=this.getNormals(),i=this.getVertices();for(let n=0,s=2*this._vertices.length;n<s;n+=2)t.push(0,0,1),i.push(e[n],e[n+1],0,1);this.setSolid(this._solid.getValue())},buildTexCoords:function(){const e=this.getTexCoords();if(0===e.length){const t=this.getTexCoordParams(),i=t.min,n=t.Ssize,s=this.getVertices().getValue();for(let t=0,o=s.length;t<o;t+=4)e.push((s[t]-i[0])/n,(s[t+1]-i[1])/n,0,1);e.shrinkToFit()}return e}}),o})),e(t.getComponentUrl("geometry2d"),["x_ite/Components","x_ite/Browser/Geometry2D/X3DGeometry2DContext","x_ite/Components/Geometry2D/Arc2D","x_ite/Components/Geometry2D/ArcClose2D","x_ite/Components/Geometry2D/Circle2D","x_ite/Components/Geometry2D/Disk2D","x_ite/Components/Geometry2D/Polyline2D","x_ite/Components/Geometry2D/Polypoint2D","x_ite/Components/Geometry2D/Rectangle2D","x_ite/Components/Geometry2D/TriangleSet2D"],(function(e,t,i,n,s,o,r,a,l,c){"use strict";e.addComponent({name:"Geometry2D",types:{Arc2D:i,ArcClose2D:n,Circle2D:s,Disk2D:o,Polyline2D:r,Polypoint2D:a,Rectangle2D:l,TriangleSet2D:c},abstractTypes:{},browser:t})}))}();
|
|
1
|
+
!function(){const e=window[Symbol.for("X_ITE.X3D-5.0.2")].define,t=window[Symbol.for("X_ITE.X3D-5.0.2")].require;e("x_ite/Browser/Geometry2D/Arc2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addChildObjects("dimension",new t.SFInt32(40))}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTypeName:function(){return"ArcClose2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"arcClose2DOptions"}}),i})),e("x_ite/Browser/Geometry2D/ArcClose2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addChildObjects("dimension",new t.SFInt32(40))}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTypeName:function(){return"Arc2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"arc2DOptions"}}),i})),e("x_ite/Browser/Geometry2D/Circle2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Complex"],(function(e,t,i,n){"use strict";function s(n){e.call(this,n),this.addChildObjects("dimension",new t.SFInt32(40)),this.vertices=i.createArray()}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,getTypeName:function(){return"Circle2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"circle2DOptions"},initialize:function(){this.addInterest("build",this),this.build()},getVertices:function(){return this.vertices},build:function(){const e=this._dimension.getValue(),t=2*Math.PI/e,i=this.vertices;i.length=0;for(let s=0;s<e;++s){const e=n.Polar(1,t*s),o=n.Polar(1,t*(s+1));i.push(e.real,e.imag,0,1),i.push(o.real,o.imag,0,1)}i.shrinkToFit()}}),s})),e("x_ite/Browser/Geometry2D/Disk2DOptions",["x_ite/Base/X3DBaseNode","x_ite/Fields","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector3"],(function(e,t,i,n,s){"use strict";function o(n){e.call(this,n),this.addChildObjects("dimension",new t.SFInt32(40)),this.circleVertices=i.createArray(),this.diskTexCoords=i.createArray(),this.diskNormals=i.createArray(),this.diskVertices=i.createArray()}return o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,getTypeName:function(){return"Disk2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"circle2DOptions"},initialize:function(){this.addInterest("build",this),this.build()},getCircleVertices:function(){return this.circleVertices},getDiskTexCoords:function(){return this.diskTexCoords},getDiskNormals:function(){return this.diskNormals},getDiskVertices:function(){return this.diskVertices},build:function(){const e=new n(.5,.5),t=new n(0,0),i=new n(0,0),s=new n(0,0),o=new n(0,0);return function(){const n=this._dimension.getValue(),r=2*Math.PI/n,a=this.circleVertices,l=this.diskTexCoords,c=this.diskNormals,u=this.diskVertices;a.length=0,l.length=0,c.length=0,u.length=0;for(let g=0;g<n;++g){const n=r*g,h=r*(g+1);t.setPolar(.5,n).add(e),i.setPolar(.5,h).add(e),s.setPolar(1,n),o.setPolar(1,h),a.push(s.real,s.imag,0,1),l.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),c.push(0,0,1,0,0,1,0,0,1),u.push(0,0,0,1,s.real,s.imag,0,1,o.real,o.imag,0,1)}a.shrinkToFit(),l.shrinkToFit(),c.shrinkToFit(),u.shrinkToFit()}}()}),o})),e("x_ite/Browser/Geometry2D/Rectangle2DOptions",["x_ite/Fields","x_ite/Base/X3DBaseNode","x_ite/Components/Geometry3D/IndexedFaceSet","x_ite/Components/Rendering/Coordinate","x_ite/Components/Texturing/TextureCoordinate"],(function(e,t,i,n,s){"use strict";function o(e){t.call(this,e)}return o.prototype=Object.assign(Object.create(t.prototype),{constructor:o,getTypeName:function(){return"Rectangle2DOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"rectangle2DOptions"},initialize:function(){t.prototype.initialize.call(this)},getGeometry:function(){if(this.geometry)return this.geometry;this.geometry=new i(this.getExecutionContext()),this.geometry._texCoord=new s(this.getExecutionContext()),this.geometry._coord=new n(this.getExecutionContext());const t=this.geometry,o=this.geometry._texCoord.getValue(),r=this.geometry._coord.getValue();return t._texCoordIndex=new e.MFInt32(0,1,2,3,-1),t._coordIndex=new e.MFInt32(0,1,2,3,-1),o._point=new e.MFVec2f(new e.SFVec2f(1,1),new e.SFVec2f(0,1),new e.SFVec2f(0,0),new e.SFVec2f(1,0)),r._point=new e.MFVec3f(new e.SFVec3f(1,1,0),new e.SFVec3f(-1,1,0),new e.SFVec3f(-1,-1,0),new e.SFVec3f(1,-1,0)),o.setup(),r.setup(),t.setup(),this.geometry}}),o})),e("x_ite/Browser/Geometry2D/X3DGeometry2DContext",["x_ite/Browser/Geometry2D/Arc2DOptions","x_ite/Browser/Geometry2D/ArcClose2DOptions","x_ite/Browser/Geometry2D/Circle2DOptions","x_ite/Browser/Geometry2D/Disk2DOptions","x_ite/Browser/Geometry2D/Rectangle2DOptions","x_ite/Browser/Core/PrimitiveQuality"],(function(e,t,i,n,s,o){"use strict";function r(){}function a(e,t){const i=new t(this.getPrivateScene());return i.setup(),this[e]=function(){return i},Object.defineProperty(this,e,{enumerable:!1}),i}return r.prototype={initialize:function(){this.setGeometry2DPrimitiveQuality(this.getBrowserOptions().getPrimitiveQuality())},getArc2DOptions:function(){return a.call(this,"getArc2DOptions",e)},getArcClose2DOptions:function(){return a.call(this,"getArcClose2DOptions",t)},getCircle2DOptions:function(){return a.call(this,"getCircle2DOptions",i)},getDisk2DOptions:function(){return a.call(this,"getDisk2DOptions",n)},getRectangle2DOptions:function(){return a.call(this,"getRectangle2DOptions",s)},setGeometry2DPrimitiveQuality:function(e){const t=this.getArc2DOptions(),i=this.getArcClose2DOptions(),n=this.getCircle2DOptions(),s=this.getDisk2DOptions();switch(e){case o.LOW:t._dimension=20,i._dimension=20,n._dimension=20,s._dimension=20;break;case o.MEDIUM:t._dimension=40,i._dimension=40,n._dimension=40,s._dimension=40;break;case o.HIGH:t._dimension=80,i._dimension=80,n._dimension=80,s._dimension=80}}},r})),e("x_ite/Components/Geometry2D/Arc2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Algorithm"],(function(e,t,i,n,s,o,r){"use strict";function a(e){n.call(this,e),this.addType(s.Arc2D),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"startAngle",new e.SFFloat),new t(s.initializeOnly,"endAngle",new e.SFFloat(1.5708)),new t(s.initializeOnly,"radius",new e.SFFloat(1))]),getTypeName:function(){return"Arc2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getArc2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArc2DOptions().removeInterest("requestRebuild",this)},getSweepAngle:function(){const e=r.interval(this._startAngle.getValue(),0,2*Math.PI),t=r.interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build:function(){const e=this.getBrowser().getArc2DOptions()._dimension.getValue(),t=this._startAngle.getValue(),i=Math.abs(this._radius.getValue()),n=this.getSweepAngle(),s=Math.max(3,Math.floor(n*e/(2*Math.PI))),r=this.getVertices();for(let e=0;e<s;++e){const a=t+n*(e/s),l=o.Polar(i,a),c=t+n*((e+1)/s),u=o.Polar(i,c);r.push(l.real,l.imag,0,1),r.push(u.real,u.imag,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),a})),e("x_ite/Components/Geometry2D/ArcClose2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Algorithm"],(function(e,t,i,n,s,o,r){"use strict";function a(e){n.call(this,e),this.addType(s.ArcClose2D),this.setGeometryType(2),this._startAngle.setUnit("angle"),this._endAngle.setUnit("angle"),this._radius.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"closureType",new e.SFString("PIE")),new t(s.initializeOnly,"startAngle",new e.SFFloat),new t(s.initializeOnly,"endAngle",new e.SFFloat(1.5708)),new t(s.initializeOnly,"radius",new e.SFFloat(1)),new t(s.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"ArcClose2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getArcClose2DOptions().addInterest("requestRebuild",this):this.getBrowser().getArcClose2DOptions().removeInterest("requestRebuild",this)},getSweepAngle:function(){const e=r.interval(this._startAngle.getValue(),0,2*Math.PI),t=r.interval(this._endAngle.getValue(),0,2*Math.PI);if(e===t)return 2*Math.PI;const i=Math.abs(t-e);return e>t?2*Math.PI-i:isNaN(i)?0:i},build:function(){const e=new o(.5,.5);return function(){const t=this.getBrowser().getArcClose2DOptions(),i="CHORD"===this._closureType.getValue(),n=t._dimension.getValue(),s=this._startAngle.getValue(),r=Math.abs(this._radius.getValue()),a=this.getSweepAngle(),l=Math.max(4,Math.floor(a*n/(2*Math.PI))),c=this.getTexCoords(),u=this.getNormals(),g=this.getVertices(),h=[],d=[];this.getMultiTexCoords().push(c);const p=l-1;for(let t=0;t<l;++t){const i=s+a*(t/p);h.push(o.Polar(.5,i).add(e)),d.push(o.Polar(r,i))}if(i){const e=h[0],t=d[0];for(let i=1;i<p;++i){const n=h[i],s=h[i+1],o=d[i],r=d[i+1];c.push(e.real,e.imag,0,1,n.real,n.imag,0,1,s.real,s.imag,0,1),u.push(0,0,1,0,0,1,0,0,1),g.push(t.real,t.imag,0,1,o.real,o.imag,0,1,r.real,r.imag,0,1)}}else for(let e=0;e<p;++e){const t=h[e],i=h[e+1],n=d[e],s=d[e+1];c.push(.5,.5,0,1,t.real,t.imag,0,1,i.real,i.imag,0,1),u.push(0,0,1,0,0,1,0,0,1),g.push(0,0,0,1,n.real,n.imag,0,1,s.real,s.imag,0,1)}this.getMin().set(-r,-r,0),this.getMax().set(r,r,0),this.setSolid(this._solid.getValue())}}()}),a})),e("x_ite/Components/Geometry2D/Circle2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.Circle2D),this._radius.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"radius",new e.SFFloat(1))]),getTypeName:function(){return"Circle2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getCircle2DOptions().addInterest("requestRebuild",this):this.getBrowser().getCircle2DOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getCircle2DOptions(),t=this.getVertices(),i=this._radius.getValue();if(1===i)this.setVertices(e.getVertices());else{const n=e.getVertices().getValue();for(let e=0,s=n.length;e<s;e+=4)t.push(n[e]*i,n[e+1]*i,0,1)}this.getMin().set(-i,-i,0),this.getMax().set(i,i,0)}}),o})),e("x_ite/Components/Geometry2D/Disk2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s,o){"use strict";function r(e){s.call(this,e),this.addType(o.Disk2D),this._innerRadius.setUnit("length"),this._outerRadius.setUnit("length")}return r.prototype=Object.assign(Object.create(n.prototype),{constructor:r,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.initializeOnly,"innerRadius",new e.SFFloat),new t(o.initializeOnly,"outerRadius",new e.SFFloat(1)),new t(o.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"Disk2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this)},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getDisk2DOptions().addInterest("requestRebuild",this):this.getBrowser().getDisk2DOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getDisk2DOptions(),t=Math.min(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue())),i=Math.max(Math.abs(this._innerRadius.getValue()),Math.abs(this._outerRadius.getValue()));if(t===i){const t=this.getVertices();if(0===i)return;if(1===i)this.setVertices(e.getCircleVertices());else{const n=e.getCircleVertices().getValue();for(let e=0,s=n.length;e<s;e+=4)t.push(n[e]*i,n[e+1]*i,0,1)}return this.getMin().set(-i,-i,0),this.getMax().set(i,i,0),void this.setGeometryType(1)}if(0===t){if(this.getMultiTexCoords().push(e.getDiskTexCoords()),this.setNormals(e.getDiskNormals()),1===i)this.setVertices(e.getDiskVertices());else{const t=e.getDiskVertices().getValue(),n=this.getVertices();for(let e=0,s=t.length;e<s;e+=4)n.push(t[e]*i,t[e+1]*i,0,1)}return this.getMin().set(-i,-i,0),this.getMax().set(i,i,0),this.setGeometryType(2),void this.setSolid(this._solid.getValue())}const n=t/i,s=(1-n)/2,o=e.getDiskTexCoords().getValue(),r=e.getDiskVertices().getValue(),a=this.getTexCoords(),l=this.getNormals(),c=this.getVertices();this.getMultiTexCoords().push(a);for(let e=0,u=r.length;e<u;e+=12)a.push(o[e+4]*n+s,o[e+5]*n+s,0,1,o[e+4],o[e+5],0,1,o[e+8],o[e+9],0,1,o[e+4]*n+s,o[e+5]*n+s,0,1,o[e+8],o[e+9],0,1,o[e+8]*n+s,o[e+9]*n+s,0,1),l.push(0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1),c.push(r[e+4]*t,r[e+5]*t,0,1,r[e+4]*i,r[e+5]*i,0,1,r[e+8]*i,r[e+9]*i,0,1,r[e+4]*t,r[e+5]*t,0,1,r[e+8]*i,r[e+9]*i,0,1,r[e+8]*t,r[e+9]*t,0,1);this.getMin().set(-i,-i,0),this.getMax().set(i,i,0),this.setGeometryType(2),this.setSolid(this._solid.getValue())},intersectsLine:function(e,t,i,o){return this.getGeometryType()<2?s.prototype.intersectsLine.call(this,e,t,i,o):n.prototype.intersectsLine.call(this,e,t,i,o)},intersectsBox:function(e,t,i){return this.getGeometryType()<2?s.prototype.intersectsBox.call(this,e,t,i):n.prototype.intersectsBox.call(this,e,t,i)},display:function(e,t){return this.getGeometryType()<2?s.prototype.display.call(this,e,t):n.prototype.display.call(this,e,t)},displayParticles:function(e,t,i,o){return this.getGeometryType()<2?s.prototype.displayParticles.call(this,e,t,i,o):n.prototype.displayParticles.call(this,e,t,i,o)}}),r})),e("x_ite/Components/Geometry2D/Polyline2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.Polyline2D),this._lineSegments.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"lineSegments",new e.MFVec2f)]),getTypeName:function(){return"Polyline2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=this._lineSegments.getValue(),t=this.getVertices();for(let i=0,n=2*(this._lineSegments.length-1);i<n;i+=2)t.push(e[i+0],e[i+1],0,1),t.push(e[i+2],e[i+3],0,1)}}),o})),e("x_ite/Components/Geometry2D/Polypoint2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DPointGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.Polypoint2D),this._point.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"point",new e.MFVec2f)]),getTypeName:function(){return"Polypoint2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=this._point.getValue(),t=this.getVertices();for(let i=0,n=2*this._point.length;i<n;i+=2)t.push(e[i],e[i+1],0,1)}}),o})),e("x_ite/Components/Geometry2D/Rectangle2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,s,o,r){"use strict";function a(e){n.call(this,e),this.addType(s.Rectangle2D),this.setGeometryType(2),this._size.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"size",new e.SFVec2f(2,2)),new t(s.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"Rectangle2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=new o(2,2);return function(){const t=this.getBrowser().getRectangle2DOptions().getGeometry(),i=this._size.getValue();if(this.setMultiTexCoords(t.getMultiTexCoords()),this.setNormals(t.getNormals()),i.equals(e))this.setVertices(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=r.divide(i,2),n=e.x,s=e.y,o=t.getVertices().getValue(),a=this.getVertices();for(let e=0;e<o.length;e+=4)a.push(n*o[e],s*o[e+1],0,1);this.getMin().set(-n,-s,0),this.getMax().set(n,s,0)}this.setSolid(this._solid.getValue())}}()}),a})),e("x_ite/Components/Geometry2D/TriangleSet2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,s){"use strict";function o(e){n.call(this,e),this.addType(s.TriangleSet2D),this.setGeometryType(2),this._vertices.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"vertices",new e.MFVec2f),new t(s.initializeOnly,"solid",new e.SFBool)]),getTypeName:function(){return"TriangleSet2D"},getComponentName:function(){return"Geometry2D"},getContainerField:function(){return"geometry"},build:function(){const e=this._vertices.getValue(),t=this.getNormals(),i=this.getVertices();for(let n=0,s=2*this._vertices.length;n<s;n+=2)t.push(0,0,1),i.push(e[n],e[n+1],0,1);this.setSolid(this._solid.getValue())},buildTexCoords:function(){const e=this.getTexCoords();if(0===e.length){const t=this.getTexCoordParams(),i=t.min,n=t.Ssize,s=this.getVertices().getValue();for(let t=0,o=s.length;t<o;t+=4)e.push((s[t]-i[0])/n,(s[t+1]-i[1])/n,0,1);e.shrinkToFit()}return e}}),o})),e(t.getComponentUrl("geometry2d"),["x_ite/Components","x_ite/Browser/Geometry2D/X3DGeometry2DContext","x_ite/Components/Geometry2D/Arc2D","x_ite/Components/Geometry2D/ArcClose2D","x_ite/Components/Geometry2D/Circle2D","x_ite/Components/Geometry2D/Disk2D","x_ite/Components/Geometry2D/Polyline2D","x_ite/Components/Geometry2D/Polypoint2D","x_ite/Components/Geometry2D/Rectangle2D","x_ite/Components/Geometry2D/TriangleSet2D"],(function(e,t,i,n,s,o,r,a,l,c){"use strict";e.addComponent({name:"Geometry2D",types:{Arc2D:i,ArcClose2D:n,Circle2D:s,Disk2D:o,Polyline2D:r,Polypoint2D:a,Rectangle2D:l,TriangleSet2D:c},abstractTypes:{},browser:t})}))}();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var module = { }, exports, process;
|
|
5
5
|
|
|
6
6
|
const
|
|
7
|
-
define = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
8
|
-
require = window [Symbol .for ("X_ITE.X3D-5.0.
|
|
7
|
+
define = window [Symbol .for ("X_ITE.X3D-5.0.2")] .define,
|
|
8
|
+
require = window [Symbol .for ("X_ITE.X3D-5.0.2")] .require;
|
|
9
9
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
10
10
|
*******************************************************************************
|
|
11
11
|
*
|