@shopware-ag/dive 2.0.1-beta.6 → 2.0.1-beta.7
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/build/chunks/{AssetExporter-ClYQ4gnb.mjs → AssetExporter-QnOue3VT.mjs} +19 -19
- package/build/chunks/{AssetExporter-CAqADFbL.cjs → AssetExporter-TzKB2FHh.cjs} +4 -4
- package/build/chunks/AssetLoader-DCBiLwef.cjs +4 -0
- package/build/chunks/{AssetLoader-BewzFwHi.mjs → AssetLoader-Dqrg0Re8.mjs} +38 -35
- package/build/chunks/FileTypes-Ca8pkRlQ.cjs +30 -0
- package/build/chunks/FileTypes-CpKiTXEY.mjs +1109 -0
- package/build/chunks/MathUtils-CBW56ZuG.cjs +1 -0
- package/build/chunks/MathUtils-CFGjHuVF.mjs +159 -0
- package/build/chunks/OrbitController-D-WNei2f.mjs +940 -0
- package/build/chunks/OrbitController-rMX8EHvJ.cjs +1 -0
- package/build/chunks/PerspectiveCamera-CONx93im.cjs +1 -0
- package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +38 -0
- package/build/chunks/PovSchema-Co9FznEz.cjs +1 -0
- package/build/chunks/PovSchema-DWWvr_ED.mjs +10 -0
- package/build/chunks/SelectTool-BizqI7_a.cjs +1 -0
- package/build/chunks/{SelectTool-DLXheZay.mjs → SelectTool-DVFL7BtX.mjs} +10 -10
- package/build/chunks/network-error-CHvryg-4.mjs +18 -0
- package/build/chunks/network-error-D_pq8VU6.cjs +1 -0
- package/build/chunks/package-CeZyVg2G.mjs +39 -0
- package/build/chunks/package-D_hIrGNz.cjs +1 -0
- package/build/dive.cjs +1 -30
- package/build/dive.mjs +617 -1089
- package/build/plugins/animation/index.cjs +1 -0
- package/build/plugins/animation/index.d.ts +2 -0
- package/build/plugins/animation/index.mjs +126 -0
- package/build/plugins/ar/index.cjs +1 -0
- package/build/plugins/ar/index.d.ts +2 -0
- package/build/{chunks/ARSystem-D27w7Pck.mjs → plugins/ar/index.mjs} +38 -44
- package/build/plugins/assetconverter/index.d.ts +2 -0
- package/build/plugins/assetexporter/index.cjs +1 -0
- package/build/plugins/assetexporter/index.d.ts +2 -0
- package/build/plugins/assetexporter/index.mjs +4 -0
- package/build/plugins/assetloader/index.cjs +1 -0
- package/build/plugins/assetloader/index.d.ts +2 -0
- package/build/plugins/assetloader/index.mjs +6 -0
- package/build/plugins/axiscamera/index.cjs +1 -0
- package/build/plugins/axiscamera/index.d.ts +2 -0
- package/build/plugins/axiscamera/index.mjs +4 -0
- package/build/plugins/mediacreator/index.cjs +1 -0
- package/build/plugins/mediacreator/index.d.ts +2 -0
- package/build/{chunks/MediaCreator-psLAAyJA.mjs → plugins/mediacreator/index.mjs} +1 -1
- package/build/{modules/controller → plugins/orbitcontroller}/index.cjs +1 -1
- package/build/plugins/orbitcontroller/index.d.ts +2 -0
- package/build/plugins/orbitcontroller/index.mjs +5 -0
- package/build/plugins/state/index.cjs +27 -0
- package/build/plugins/state/index.d.ts +2 -0
- package/build/plugins/state/index.mjs +4265 -0
- package/build/plugins/systeminfo/index.cjs +1 -0
- package/build/plugins/systeminfo/index.d.ts +2 -0
- package/build/{modules → plugins}/systeminfo/index.mjs +24 -23
- package/build/plugins/toolbox/index.cjs +1 -0
- package/build/plugins/toolbox/index.d.ts +2 -0
- package/build/{chunks/Toolbox-DKuyL8n5.mjs → plugins/toolbox/index.mjs} +8 -2
- package/build/src/components/gizmo/Gizmo.d.ts +1 -1
- package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
- package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
- package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
- package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
- package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
- package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
- package/build/src/components/model/Model.d.ts +2 -2
- package/build/src/components/primitive/Primitive.d.ts +3 -3
- package/build/src/components/root/Root.d.ts +5 -7
- package/build/src/core/Dive.d.ts +1 -1
- package/build/src/engine/clock/Clock.d.ts +1 -0
- package/build/src/index.d.ts +2 -1
- package/build/src/interfaces/Draggable.d.ts +1 -1
- package/build/src/plugins/animation/index.d.ts +2 -0
- package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
- package/build/src/plugins/animation/src/index.d.ts +3 -0
- package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
- package/build/src/plugins/ar/index.d.ts +4 -0
- package/build/src/{modules/ar → plugins/ar/src}/ARSystem.d.ts +0 -27
- package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +1 -1
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +3 -3
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +1 -1
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
- package/build/src/plugins/assetconverter/index.d.ts +1 -0
- package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
- package/build/src/plugins/assetexporter/index.d.ts +1 -0
- package/build/src/{modules/assetexporter → plugins/assetexporter/src}/AssetExporter.d.ts +1 -18
- package/build/src/plugins/assetloader/index.d.ts +3 -0
- package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +8 -0
- package/build/src/plugins/axiscamera/index.d.ts +1 -0
- package/build/src/{modules/axiscamera → plugins/axiscamera/src}/AxisCamera.d.ts +1 -4
- package/build/src/plugins/mediacreator/index.d.ts +1 -0
- package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
- package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
- package/build/src/{modules/controller/orbit → plugins/orbitcontroller/src}/OrbitController.d.ts +3 -3
- package/build/src/plugins/state/index.d.ts +4 -0
- package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
- package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
- package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +3 -3
- package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
- package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
- package/build/src/plugins/state/src/actions/object/deleteobject.d.ts +13 -0
- package/build/src/plugins/state/src/actions/object/deselectobject.d.ts +13 -0
- package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +3 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
- package/build/src/plugins/state/src/actions/object/getobjects.d.ts +13 -0
- package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +3 -3
- package/build/src/plugins/state/src/actions/object/selectobject.d.ts +13 -0
- package/build/src/plugins/state/src/actions/object/setparent.d.ts +23 -0
- package/build/src/plugins/state/src/actions/object/updateobject.d.ts +13 -0
- package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
- package/build/src/plugins/state/src/actions/scene/getallscenedata.d.ts +9 -0
- package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmovisible.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
- package/build/src/{modules → plugins}/state/types/ActionTypes.d.ts +8 -9
- package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
- package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
- package/build/src/plugins/state/types/index.d.ts +1 -0
- package/build/src/plugins/systeminfo/index.d.ts +2 -0
- package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +1 -32
- package/build/src/plugins/toolbox/index.d.ts +4 -0
- package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +2 -4
- package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +2 -11
- package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +2 -3
- package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +2 -3
- package/build/src/types/components/DIVELight.d.ts +4 -0
- package/build/src/types/components/DIVESceneObject.d.ts +6 -0
- package/build/src/types/components/index.d.ts +2 -0
- package/build/src/types/index.d.ts +2 -5
- package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
- package/build/src/types/schema/EntitySchema.d.ts +11 -0
- package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
- package/build/src/types/schema/GeometrySchema.d.ts +7 -0
- package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
- package/build/src/types/schema/GroupSchema.d.ts +11 -0
- package/build/src/types/schema/LightSchema.d.ts +28 -0
- package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
- package/build/src/types/schema/ModelSchema.d.ts +14 -0
- package/build/src/types/schema/PovSchema.d.ts +10 -0
- package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
- package/build/src/types/schema/index.d.ts +11 -0
- package/package.json +41 -41
- package/build/chunks/ARSystem-_0cLAxyG.cjs +0 -1
- package/build/chunks/AnimationSystem-Bf-xhqRe.mjs +0 -101
- package/build/chunks/AnimationSystem-DFUYMNpj.cjs +0 -1
- package/build/chunks/AssetLoader-Bq-Ekxil.cjs +0 -4
- package/build/chunks/AxisCamera-CUb3g8WX.cjs +0 -1
- package/build/chunks/AxisCamera-lXJLIPLK.mjs +0 -39
- package/build/chunks/AxisHelperColors-BrGqktN5.cjs +0 -1
- package/build/chunks/AxisHelperColors-JLBHYQDi.mjs +0 -9
- package/build/chunks/FileTypes-DuVGjbcR.mjs +0 -36
- package/build/chunks/FileTypes-DzVpDu_p.cjs +0 -1
- package/build/chunks/MediaCreator-CEWeS42n.cjs +0 -1
- package/build/chunks/ModuleRegistry-CBfx1EVd.mjs +0 -13
- package/build/chunks/ModuleRegistry-CDIxOzgZ.cjs +0 -1
- package/build/chunks/OrbitController-B8VkQV1e.cjs +0 -1
- package/build/chunks/OrbitController-CXu1ko6E.mjs +0 -462
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
- package/build/chunks/PerspectiveCamera-PMJPzAn3.mjs +0 -34
- package/build/chunks/SelectTool-9eiKZXT4.cjs +0 -1
- package/build/chunks/State-BNgqNPrs.mjs +0 -4296
- package/build/chunks/State-Mvu0hG-n.cjs +0 -27
- package/build/chunks/Toolbox-qFN47t2F.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
- package/build/chunks/index-C_uFFwT2.mjs +0 -5
- package/build/chunks/index-DAwIH9xh.cjs +0 -1
- package/build/chunks/package-CHgGmFCa.cjs +0 -1
- package/build/chunks/package-CIkS9WF6.mjs +0 -39
- package/build/modules/animation/index.cjs +0 -1
- package/build/modules/animation/index.d.ts +0 -2
- package/build/modules/animation/index.mjs +0 -5
- package/build/modules/ar/index.cjs +0 -1
- package/build/modules/ar/index.d.ts +0 -2
- package/build/modules/ar/index.mjs +0 -11
- package/build/modules/assetconverter/index.cjs +0 -1
- package/build/modules/assetconverter/index.d.ts +0 -2
- package/build/modules/assetconverter/index.mjs +0 -4
- package/build/modules/assetexporter/index.cjs +0 -1
- package/build/modules/assetexporter/index.d.ts +0 -2
- package/build/modules/assetexporter/index.mjs +0 -4
- package/build/modules/assetloader/index.cjs +0 -1
- package/build/modules/assetloader/index.d.ts +0 -2
- package/build/modules/assetloader/index.mjs +0 -4
- package/build/modules/axiscamera/index.cjs +0 -1
- package/build/modules/axiscamera/index.d.ts +0 -2
- package/build/modules/axiscamera/index.mjs +0 -4
- package/build/modules/controller/index.d.ts +0 -2
- package/build/modules/controller/index.mjs +0 -5
- package/build/modules/mediacreator/index.cjs +0 -1
- package/build/modules/mediacreator/index.d.ts +0 -2
- package/build/modules/mediacreator/index.mjs +0 -4
- package/build/modules/state/index.cjs +0 -1
- package/build/modules/state/index.d.ts +0 -2
- package/build/modules/state/index.mjs +0 -39
- package/build/modules/systeminfo/index.cjs +0 -1
- package/build/modules/systeminfo/index.d.ts +0 -2
- package/build/modules/toolbox/index.cjs +0 -1
- package/build/modules/toolbox/index.d.ts +0 -2
- package/build/modules/toolbox/index.mjs +0 -10
- package/build/src/modules/ModuleRegistry.d.ts +0 -19
- package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
- package/build/src/modules/animation/index.d.ts +0 -2
- package/build/src/modules/ar/index.d.ts +0 -4
- package/build/src/modules/assetconverter/AssetConverter.d.ts +0 -30
- package/build/src/modules/assetconverter/index.d.ts +0 -1
- package/build/src/modules/assetexporter/index.d.ts +0 -1
- package/build/src/modules/assetloader/AssetLoader.d.ts +0 -29
- package/build/src/modules/assetloader/index.d.ts +0 -1
- package/build/src/modules/axiscamera/index.d.ts +0 -1
- package/build/src/modules/controller/index.d.ts +0 -1
- package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
- package/build/src/modules/mediacreator/index.d.ts +0 -1
- package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
- package/build/src/modules/state/actions/object/deleteobject.d.ts +0 -12
- package/build/src/modules/state/actions/object/deselectobject.d.ts +0 -12
- package/build/src/modules/state/actions/object/getobjects.d.ts +0 -12
- package/build/src/modules/state/actions/object/selectobject.d.ts +0 -12
- package/build/src/modules/state/actions/object/setparent.d.ts +0 -22
- package/build/src/modules/state/actions/object/updateobject.d.ts +0 -12
- package/build/src/modules/state/actions/scene/getallscenedata.d.ts +0 -9
- package/build/src/modules/state/index.d.ts +0 -4
- package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
- package/build/src/modules/state/types/COMEntity.d.ts +0 -11
- package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
- package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
- package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
- package/build/src/modules/state/types/COMGroup.d.ts +0 -11
- package/build/src/modules/state/types/COMLight.d.ts +0 -28
- package/build/src/modules/state/types/COMModel.d.ts +0 -14
- package/build/src/modules/state/types/COMPov.d.ts +0 -10
- package/build/src/modules/state/types/COMPrimitive.d.ts +0 -14
- package/build/src/modules/state/types/index.d.ts +0 -11
- package/build/src/modules/systeminfo/index.d.ts +0 -1
- package/build/src/modules/toolbox/index.d.ts +0 -4
- package/build/src/types/SceneData.d.ts +0 -19
- package/build/src/types/SceneObjects.d.ts +0 -9
- package/build/src/types/UUID.d.ts +0 -1
- /package/build/{chunks/AssetConverter-BTAb23e8.cjs → plugins/assetconverter/index.cjs} +0 -0
- /package/build/{chunks/AssetConverter-D-qOTLs1.mjs → plugins/assetconverter/index.mjs} +0 -0
- /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
- /package/build/src/{modules/ar → plugins/ar/src}/arquicklook/ARQuickLook.d.ts +0 -0
- /package/build/src/{modules/ar → plugins/ar/src}/error/ar-errors.d.ts +0 -0
- /package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +0 -0
- /package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +0 -0
- /package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +0 -0
- /package/build/src/{modules/assetloader → plugins/assetloader/src}/draco/DracoLoader.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
- /package/build/src/{types/info → plugins/systeminfo/types}/index.d.ts +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var ve = Object.defineProperty;
|
|
2
2
|
var Be = (d, e, t) => e in d ? ve(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
|
|
3
3
|
var v = (d, e, t) => Be(d, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { TrianglesDrawMode as je, TriangleFanDrawMode as re, TriangleStripDrawMode as be, Loader as ae, LoaderUtils as X, FileLoader as K, MeshPhysicalMaterial as
|
|
4
|
+
import { TrianglesDrawMode as je, TriangleFanDrawMode as re, TriangleStripDrawMode as be, Loader as ae, LoaderUtils as X, FileLoader as K, MeshPhysicalMaterial as O, Vector2 as q, Color as U, LinearSRGBColorSpace as D, SRGBColorSpace as N, SpotLight as Ke, PointLight as Ve, DirectionalLight as We, Matrix4 as Y, Vector3 as B, Quaternion as Le, InstancedMesh as Xe, InstancedBufferAttribute as ze, Object3D as ce, TextureLoader as Me, ImageBitmapLoader as qe, BufferAttribute as P, InterleavedBuffer as Ye, InterleavedBufferAttribute as Je, LinearMipmapLinearFilter as Ie, NearestMipmapLinearFilter as Qe, LinearMipmapNearestFilter as Ze, NearestMipmapNearestFilter as $e, LinearFilter as Ce, NearestFilter as et, RepeatWrapping as J, MirroredRepeatWrapping as Ne, ClampToEdgeWrapping as De, PointsMaterial as tt, Material as Z, LineBasicMaterial as nt, MeshStandardMaterial as Oe, DoubleSide as st, MeshBasicMaterial as W, PropertyBinding as rt, BufferGeometry as ue, SkinnedMesh as ot, Mesh as Pe, LineSegments as it, Line as at, LineLoop as ct, Points as ut, Group as z, PerspectiveCamera as lt, MathUtils as ft, OrthographicCamera as dt, Skeleton as ht, AnimationClip as pt, Bone as mt, InterpolateDiscrete as gt, InterpolateLinear as ke, Texture as de, VectorKeyframeTrack as he, NumberKeyframeTrack as pe, QuaternionKeyframeTrack as me, ColorManagement as ge, FrontSide as At, Interpolant as Tt, Box3 as yt, Sphere as Rt, NoColorSpace as H } from "three";
|
|
5
5
|
import { u as xt, a as Ae } from "./fflate.module-xyO_T3Zm.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { S as _t } from "./FileTypes-CpKiTXEY.mjs";
|
|
7
|
+
import { N as Te, g as wt, i as Et } from "./network-error-CHvryg-4.mjs";
|
|
7
8
|
import { F as ye, P as Re } from "./parse-error-BFRJyIxM.mjs";
|
|
8
9
|
function xe(d, e) {
|
|
9
10
|
if (e === je)
|
|
@@ -42,10 +43,10 @@ class St extends ae {
|
|
|
42
43
|
return new vt(t);
|
|
43
44
|
}), this.register(function(t) {
|
|
44
45
|
return new Bt(t);
|
|
45
|
-
}), this.register(function(t) {
|
|
46
|
-
return new Ot(t);
|
|
47
46
|
}), this.register(function(t) {
|
|
48
47
|
return new Dt(t);
|
|
48
|
+
}), this.register(function(t) {
|
|
49
|
+
return new Ot(t);
|
|
49
50
|
}), this.register(function(t) {
|
|
50
51
|
return new Pt(t);
|
|
51
52
|
}), this.register(function(t) {
|
|
@@ -234,7 +235,7 @@ class Lt {
|
|
|
234
235
|
const r = t.json, i = ((r.extensions && r.extensions[this.name] || {}).lights || [])[e];
|
|
235
236
|
let c;
|
|
236
237
|
const u = new U(16777215);
|
|
237
|
-
i.color !== void 0 && u.setRGB(i.color[0], i.color[1], i.color[2],
|
|
238
|
+
i.color !== void 0 && u.setRGB(i.color[0], i.color[1], i.color[2], D);
|
|
238
239
|
const l = i.range !== void 0 ? i.range : 0;
|
|
239
240
|
switch (i.type) {
|
|
240
241
|
case "directional":
|
|
@@ -276,7 +277,7 @@ class Mt {
|
|
|
276
277
|
if (r) {
|
|
277
278
|
if (Array.isArray(r.baseColorFactor)) {
|
|
278
279
|
const s = r.baseColorFactor;
|
|
279
|
-
e.color.setRGB(s[0], s[1], s[2],
|
|
280
|
+
e.color.setRGB(s[0], s[1], s[2], D), e.opacity = s[3];
|
|
280
281
|
}
|
|
281
282
|
r.baseColorTexture !== void 0 && n.push(o.assignTexture(e, "map", r.baseColorTexture, N));
|
|
282
283
|
}
|
|
@@ -301,7 +302,7 @@ class Ct {
|
|
|
301
302
|
}
|
|
302
303
|
getMaterialType(e) {
|
|
303
304
|
const o = this.parser.json.materials[e];
|
|
304
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
305
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
305
306
|
}
|
|
306
307
|
extendMaterialParams(e, t) {
|
|
307
308
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -321,7 +322,7 @@ class Nt {
|
|
|
321
322
|
}
|
|
322
323
|
getMaterialType(e) {
|
|
323
324
|
const o = this.parser.json.materials[e];
|
|
324
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
325
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
325
326
|
}
|
|
326
327
|
extendMaterialParams(e, t) {
|
|
327
328
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -331,13 +332,13 @@ class Nt {
|
|
|
331
332
|
return s.iridescenceFactor !== void 0 && (t.iridescence = s.iridescenceFactor), s.iridescenceTexture !== void 0 && r.push(o.assignTexture(t, "iridescenceMap", s.iridescenceTexture)), s.iridescenceIor !== void 0 && (t.iridescenceIOR = s.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), s.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = s.iridescenceThicknessMinimum), s.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = s.iridescenceThicknessMaximum), s.iridescenceThicknessTexture !== void 0 && r.push(o.assignTexture(t, "iridescenceThicknessMap", s.iridescenceThicknessTexture)), Promise.all(r);
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
|
-
class
|
|
335
|
+
class Dt {
|
|
335
336
|
constructor(e) {
|
|
336
337
|
this.parser = e, this.name = b.KHR_MATERIALS_SHEEN;
|
|
337
338
|
}
|
|
338
339
|
getMaterialType(e) {
|
|
339
340
|
const o = this.parser.json.materials[e];
|
|
340
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
341
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
341
342
|
}
|
|
342
343
|
extendMaterialParams(e, t) {
|
|
343
344
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -348,18 +349,18 @@ class Ot {
|
|
|
348
349
|
const s = n.extensions[this.name];
|
|
349
350
|
if (s.sheenColorFactor !== void 0) {
|
|
350
351
|
const a = s.sheenColorFactor;
|
|
351
|
-
t.sheenColor.setRGB(a[0], a[1], a[2],
|
|
352
|
+
t.sheenColor.setRGB(a[0], a[1], a[2], D);
|
|
352
353
|
}
|
|
353
354
|
return s.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = s.sheenRoughnessFactor), s.sheenColorTexture !== void 0 && r.push(o.assignTexture(t, "sheenColorMap", s.sheenColorTexture, N)), s.sheenRoughnessTexture !== void 0 && r.push(o.assignTexture(t, "sheenRoughnessMap", s.sheenRoughnessTexture)), Promise.all(r);
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
|
-
class
|
|
357
|
+
class Ot {
|
|
357
358
|
constructor(e) {
|
|
358
359
|
this.parser = e, this.name = b.KHR_MATERIALS_TRANSMISSION;
|
|
359
360
|
}
|
|
360
361
|
getMaterialType(e) {
|
|
361
362
|
const o = this.parser.json.materials[e];
|
|
362
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
363
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
363
364
|
}
|
|
364
365
|
extendMaterialParams(e, t) {
|
|
365
366
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -375,7 +376,7 @@ class Pt {
|
|
|
375
376
|
}
|
|
376
377
|
getMaterialType(e) {
|
|
377
378
|
const o = this.parser.json.materials[e];
|
|
378
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
379
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
379
380
|
}
|
|
380
381
|
extendMaterialParams(e, t) {
|
|
381
382
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -384,7 +385,7 @@ class Pt {
|
|
|
384
385
|
const r = [], s = n.extensions[this.name];
|
|
385
386
|
t.thickness = s.thicknessFactor !== void 0 ? s.thicknessFactor : 0, s.thicknessTexture !== void 0 && r.push(o.assignTexture(t, "thicknessMap", s.thicknessTexture)), t.attenuationDistance = s.attenuationDistance || 1 / 0;
|
|
386
387
|
const a = s.attenuationColor || [1, 1, 1];
|
|
387
|
-
return t.attenuationColor = new U().setRGB(a[0], a[1], a[2],
|
|
388
|
+
return t.attenuationColor = new U().setRGB(a[0], a[1], a[2], D), Promise.all(r);
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
class kt {
|
|
@@ -393,7 +394,7 @@ class kt {
|
|
|
393
394
|
}
|
|
394
395
|
getMaterialType(e) {
|
|
395
396
|
const o = this.parser.json.materials[e];
|
|
396
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
397
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
397
398
|
}
|
|
398
399
|
extendMaterialParams(e, t) {
|
|
399
400
|
const n = this.parser.json.materials[e];
|
|
@@ -409,7 +410,7 @@ class Ft {
|
|
|
409
410
|
}
|
|
410
411
|
getMaterialType(e) {
|
|
411
412
|
const o = this.parser.json.materials[e];
|
|
412
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
413
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
413
414
|
}
|
|
414
415
|
extendMaterialParams(e, t) {
|
|
415
416
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -418,7 +419,7 @@ class Ft {
|
|
|
418
419
|
const r = [], s = n.extensions[this.name];
|
|
419
420
|
t.specularIntensity = s.specularFactor !== void 0 ? s.specularFactor : 1, s.specularTexture !== void 0 && r.push(o.assignTexture(t, "specularIntensityMap", s.specularTexture));
|
|
420
421
|
const a = s.specularColorFactor || [1, 1, 1];
|
|
421
|
-
return t.specularColor = new U().setRGB(a[0], a[1], a[2],
|
|
422
|
+
return t.specularColor = new U().setRGB(a[0], a[1], a[2], D), s.specularColorTexture !== void 0 && r.push(o.assignTexture(t, "specularColorMap", s.specularColorTexture, N)), Promise.all(r);
|
|
422
423
|
}
|
|
423
424
|
}
|
|
424
425
|
class Ut {
|
|
@@ -427,7 +428,7 @@ class Ut {
|
|
|
427
428
|
}
|
|
428
429
|
getMaterialType(e) {
|
|
429
430
|
const o = this.parser.json.materials[e];
|
|
430
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
431
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
431
432
|
}
|
|
432
433
|
extendMaterialParams(e, t) {
|
|
433
434
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -443,7 +444,7 @@ class Ht {
|
|
|
443
444
|
}
|
|
444
445
|
getMaterialType(e) {
|
|
445
446
|
const o = this.parser.json.materials[e];
|
|
446
|
-
return !o.extensions || !o.extensions[this.name] ? null :
|
|
447
|
+
return !o.extensions || !o.extensions[this.name] ? null : O;
|
|
447
448
|
}
|
|
448
449
|
extendMaterialParams(e, t) {
|
|
449
450
|
const o = this.parser, n = o.json.materials[e];
|
|
@@ -647,7 +648,7 @@ class Wt {
|
|
|
647
648
|
y !== void 0 && (x.normalized = y);
|
|
648
649
|
}
|
|
649
650
|
l(m);
|
|
650
|
-
}, a, c,
|
|
651
|
+
}, a, c, D, f);
|
|
651
652
|
});
|
|
652
653
|
});
|
|
653
654
|
}
|
|
@@ -714,7 +715,7 @@ const C = {
|
|
|
714
715
|
9986: Qe,
|
|
715
716
|
9987: Ie
|
|
716
717
|
}, Ee = {
|
|
717
|
-
33071:
|
|
718
|
+
33071: De,
|
|
718
719
|
33648: Ne,
|
|
719
720
|
10497: J
|
|
720
721
|
}, $ = {
|
|
@@ -753,7 +754,7 @@ const C = {
|
|
|
753
754
|
BLEND: "BLEND"
|
|
754
755
|
};
|
|
755
756
|
function Qt(d) {
|
|
756
|
-
return d.DefaultMaterial === void 0 && (d.DefaultMaterial = new
|
|
757
|
+
return d.DefaultMaterial === void 0 && (d.DefaultMaterial = new Oe({
|
|
757
758
|
color: 16777215,
|
|
758
759
|
emissive: 0,
|
|
759
760
|
metalness: 1,
|
|
@@ -1200,7 +1201,7 @@ class sn {
|
|
|
1200
1201
|
e.material = o;
|
|
1201
1202
|
}
|
|
1202
1203
|
getMaterialType() {
|
|
1203
|
-
return
|
|
1204
|
+
return Oe;
|
|
1204
1205
|
}
|
|
1205
1206
|
/**
|
|
1206
1207
|
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
@@ -1218,7 +1219,7 @@ class sn {
|
|
|
1218
1219
|
const l = r.pbrMetallicRoughness || {};
|
|
1219
1220
|
if (a.color = new U(1, 1, 1), a.opacity = 1, Array.isArray(l.baseColorFactor)) {
|
|
1220
1221
|
const f = l.baseColorFactor;
|
|
1221
|
-
a.color.setRGB(f[0], f[1], f[2],
|
|
1222
|
+
a.color.setRGB(f[0], f[1], f[2], D), a.opacity = f[3];
|
|
1222
1223
|
}
|
|
1223
1224
|
l.baseColorTexture !== void 0 && c.push(t.assignTexture(a, "map", l.baseColorTexture, N)), a.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, a.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (c.push(t.assignTexture(a, "metalnessMap", l.metallicRoughnessTexture)), c.push(t.assignTexture(a, "roughnessMap", l.metallicRoughnessTexture))), s = this._invokeOne(function(f) {
|
|
1224
1225
|
return f.getMaterialType && f.getMaterialType(e);
|
|
@@ -1234,7 +1235,7 @@ class sn {
|
|
|
1234
1235
|
}
|
|
1235
1236
|
if (r.occlusionTexture !== void 0 && s !== W && (c.push(t.assignTexture(a, "aoMap", r.occlusionTexture)), r.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = r.occlusionTexture.strength)), r.emissiveFactor !== void 0 && s !== W) {
|
|
1236
1237
|
const l = r.emissiveFactor;
|
|
1237
|
-
a.emissive = new U().setRGB(l[0], l[1], l[2],
|
|
1238
|
+
a.emissive = new U().setRGB(l[0], l[1], l[2], D);
|
|
1238
1239
|
}
|
|
1239
1240
|
return r.emissiveTexture !== void 0 && s !== W && c.push(t.assignTexture(a, "emissiveMap", r.emissiveTexture, N)), Promise.all(c).then(function() {
|
|
1240
1241
|
const l = new s(a);
|
|
@@ -1592,7 +1593,7 @@ function Se(d, e, t) {
|
|
|
1592
1593
|
});
|
|
1593
1594
|
n.push(s);
|
|
1594
1595
|
}
|
|
1595
|
-
return ge.workingColorSpace !==
|
|
1596
|
+
return ge.workingColorSpace !== D && "COLOR_0" in o && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ge.workingColorSpace}" not supported.`), F(d, e), rn(d, e, t), Promise.all(n).then(function() {
|
|
1596
1597
|
return e.targets !== void 0 ? Zt(d, e.targets, t) : d;
|
|
1597
1598
|
});
|
|
1598
1599
|
}
|
|
@@ -1768,7 +1769,7 @@ class an extends ae {
|
|
|
1768
1769
|
p["float inputs:rotation"] && (h.rotation = parseFloat(p["float inputs:rotation"])), p["float2 inputs:scale"] && (h.repeat = new q().fromArray(JSON.parse("[" + p["float2 inputs:scale"].replace(/[()]*/g, "") + "]"))), p["float2 inputs:translation"] && (h.offset = new q().fromArray(JSON.parse("[" + p["float2 inputs:translation"].replace(/[()]*/g, "") + "]")));
|
|
1769
1770
|
}
|
|
1770
1771
|
function E(h) {
|
|
1771
|
-
const p = new
|
|
1772
|
+
const p = new O();
|
|
1772
1773
|
if (h !== void 0) {
|
|
1773
1774
|
if ('def Shader "PreviewSurface"' in h) {
|
|
1774
1775
|
const g = h['def Shader "PreviewSurface"'];
|
|
@@ -1836,7 +1837,7 @@ class an extends ae {
|
|
|
1836
1837
|
function _(h) {
|
|
1837
1838
|
if ("asset inputs:file" in h) {
|
|
1838
1839
|
const p = h["asset inputs:file"].replace(/@*/g, ""), A = new Me().load(a[p]), w = {
|
|
1839
|
-
'"clamp"':
|
|
1840
|
+
'"clamp"': De,
|
|
1840
1841
|
'"mirror"': Ne,
|
|
1841
1842
|
'"repeat"': J
|
|
1842
1843
|
};
|
|
@@ -1899,7 +1900,7 @@ class cn extends ae {
|
|
|
1899
1900
|
}) {
|
|
1900
1901
|
this.decodeDracoFile(e, t, null, null, N).catch(o);
|
|
1901
1902
|
}
|
|
1902
|
-
decodeDracoFile(e, t, o, n, r =
|
|
1903
|
+
decodeDracoFile(e, t, o, n, r = D, s = () => {
|
|
1903
1904
|
}) {
|
|
1904
1905
|
const a = {
|
|
1905
1906
|
attributeIDs: o || this.defaultAttributeIDs,
|
|
@@ -2284,7 +2285,7 @@ class fn extends cn {
|
|
|
2284
2285
|
), this.decoderPending;
|
|
2285
2286
|
}
|
|
2286
2287
|
}
|
|
2287
|
-
class
|
|
2288
|
+
class Tn {
|
|
2288
2289
|
constructor() {
|
|
2289
2290
|
v(this, "_gltfLoader");
|
|
2290
2291
|
v(this, "_usdzLoader");
|
|
@@ -2302,12 +2303,12 @@ class An {
|
|
|
2302
2303
|
}
|
|
2303
2304
|
}
|
|
2304
2305
|
async load(e) {
|
|
2305
|
-
const t =
|
|
2306
|
+
const t = wt(e);
|
|
2306
2307
|
if (t.length === 0)
|
|
2307
2308
|
throw new ye("No file extension found in URI", "");
|
|
2308
|
-
if (!
|
|
2309
|
+
if (!Et(t))
|
|
2309
2310
|
throw new ye(
|
|
2310
|
-
`Unsupported file type: ${t}. Supported types: ${
|
|
2311
|
+
`Unsupported file type: ${t}. Supported types: ${_t.join(", ")}`,
|
|
2311
2312
|
t
|
|
2312
2313
|
);
|
|
2313
2314
|
const o = await this._loadFile(e);
|
|
@@ -2331,5 +2332,7 @@ class An {
|
|
|
2331
2332
|
}
|
|
2332
2333
|
}
|
|
2333
2334
|
export {
|
|
2334
|
-
|
|
2335
|
+
Tn as A,
|
|
2336
|
+
fn as D,
|
|
2337
|
+
ln as a
|
|
2335
2338
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";var N=Object.defineProperty;var H=(a,i,e)=>i in a?N(a,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[i]=e;var r=(a,i,e)=>H(a,typeof i!="symbol"?i+"":i,e);const w=require("./OrbitController-rMX8EHvJ.cjs"),s=require("three"),p=require("three-spritetext"),l=require("./PerspectiveCamera-CONx93im.cjs");class L extends s.OrthographicCamera{constructor(e,t,n){super(-1,1,1,-1,.1,100);r(this,"axesHelper");r(this,"_renderer");r(this,"_scene");r(this,"_camera");r(this,"_restoreViewport",new s.Vector4);this.layers.mask=l.COORDINATE_LAYER_MASK,this.axesHelper=new s.AxesHelper(.5),this.axesHelper.layers.mask=l.COORDINATE_LAYER_MASK,this.axesHelper.material.depthTest=!1,this.axesHelper.position.set(0,0,-1),this.axesHelper.setColors(new s.Color(F),new s.Color(Y),new s.Color(W));const o=new p("X",.2,v),h=new p("Y",.2,b),d=new p("Z",.2,C);o.layers.mask=l.COORDINATE_LAYER_MASK,h.layers.mask=l.COORDINATE_LAYER_MASK,d.layers.mask=l.COORDINATE_LAYER_MASK,o.position.set(.7,0,0),h.position.set(0,.7,0),d.position.set(0,0,.7),this.axesHelper.add(o),this.axesHelper.add(h),this.axesHelper.add(d),this.add(this.axesHelper),this._renderer=e,this._scene=t,this._camera=n,this._scene.add(this)}tick(){const e=this._scene.background;this._scene.background=null,this._renderer.webglrenderer.getViewport(this._restoreViewport),this._renderer.webglrenderer.setViewport(0,0,150,150),this._renderer.webglrenderer.autoClear=!1,this.setFromCameraMatrix(this._camera.matrix),this._renderer.webglrenderer.render(this._scene,this),this._renderer.webglrenderer.setViewport(this._restoreViewport),this._renderer.webglrenderer.autoClear=!0,this._scene.background=e}dispose(){this._scene.remove(this)}setFromCameraMatrix(e){this.axesHelper.rotation.setFromRotationMatrix(new s.Matrix4().extractRotation(e).invert())}}class S extends s.Object3D{constructor(){super();r(this,"isDIVELight",!0);r(this,"isDIVEAmbientLight",!0);r(this,"_light");this.name="DIVEAmbientLight",this._light=new s.AmbientLight(16777215,1),this._light.layers.mask=l.PRODUCT_LAYER_MASK,this.add(this._light)}setColor(e){this._light.color=e}setIntensity(e){this._light.intensity=e}setEnabled(e){this._light.visible=e}}class x extends s.Object3D{constructor(){super();r(this,"isDIVELight",!0);r(this,"isDIVEPointLight",!0);r(this,"isMovable",!0);r(this,"isSelectable",!0);r(this,"gizmo",null);r(this,"light");r(this,"mesh");this.name="DIVEPointLight",this.light=new s.PointLight(16777215,1),this.light.layers.mask=l.PRODUCT_LAYER_MASK,this.light.castShadow=!0,this.light.shadow.mapSize.width=512,this.light.shadow.mapSize.height=512,this.add(this.light);const e=.1,t=new s.SphereGeometry(e,e*320,e*320),n=new s.MeshBasicMaterial({color:this.light.color,transparent:!0,opacity:.8,side:s.FrontSide});this.mesh=new s.Mesh(t,n),this.mesh.layers.mask=l.UI_LAYER_MASK,this.add(this.mesh)}setColor(e){this.light.color=e,this.mesh.material.color=e}setIntensity(e){this.light.intensity=e,this.mesh.material.opacity=e>.8?.8:e*.8}setEnabled(e){this.light.visible=e}onMove(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("UPDATE_OBJECT",{id:this.userData.id,position:this.position})})}onSelect(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("SELECT_OBJECT",{id:this.userData.id})})}onDeselect(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("DESELECT_OBJECT",{id:this.userData.id})})}}class f extends s.Object3D{constructor(){super();r(this,"isDIVELight",!0);r(this,"isDIVESceneLight",!0);r(this,"_hemiLight");r(this,"_dirLight");this.name="DIVESceneLight",this._hemiLight=new s.HemisphereLight(16777215,16777215,2),this._hemiLight.layers.mask=l.PRODUCT_LAYER_MASK,this._hemiLight.position.set(0,50,0),this.add(this._hemiLight),this._dirLight=new s.DirectionalLight(16777215,3),this._dirLight.layers.mask=l.PRODUCT_LAYER_MASK,this._dirLight.position.set(1,1.75,1),this._dirLight.position.multiplyScalar(30),this._dirLight.castShadow=!0,this._dirLight.shadow.mapSize.width=2048,this._dirLight.shadow.mapSize.height=2048;const e=5;this._dirLight.shadow.camera.left=-5,this._dirLight.shadow.camera.right=e,this._dirLight.shadow.camera.top=e,this._dirLight.shadow.camera.bottom=-5,this._dirLight.shadow.camera.far=3500,this.add(this._dirLight)}setColor(e){this._hemiLight.color=e,this._dirLight.color=e}setIntensity(e){this._hemiLight.intensity=e*2,this._dirLight.intensity=e*3}setEnabled(e){this._hemiLight.visible=e,this._dirLight.visible=e}}const m=a=>a.parent?m(a.parent):a;class g extends s.Object3D{constructor(){super();r(this,"isSelectable",!0);r(this,"isMovable",!0);r(this,"isDIVENode",!0);r(this,"gizmo",null);r(this,"_positionWorldBuffer");r(this,"_boundingBox");this.layers.mask=l.PRODUCT_LAYER_MASK,this._positionWorldBuffer=new s.Vector3,this._boundingBox=new s.Box3}setPosition(e){if(!this.parent){this.position.set(e.x,e.y,e.z);return}const t=new s.Vector3(e.x,e.y,e.z);this.position.copy(this.parent.worldToLocal(t)),"isDIVEGroup"in this.parent&&this.parent.updateLineTo(this)}setRotation(e){this.rotation.set(e.x,e.y,e.z)}setScale(e){this.scale.set(e.x,e.y,e.z)}setVisibility(e){this.visible=e}setToWorldOrigin(){this.position.set(0,0,0),Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("UPDATE_OBJECT",{id:this.userData.id,position:this.getWorldPosition(this._positionWorldBuffer),rotation:this.rotation,scale:this.scale})})}onMove(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("UPDATE_OBJECT",{id:this.userData.id,position:this.getWorldPosition(this._positionWorldBuffer),rotation:this.rotation,scale:this.scale})})}onSelect(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("SELECT_OBJECT",{id:this.userData.id})})}onDeselect(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:e})=>{var t;(t=e.get(this.userData.id))==null||t.performAction("DESELECT_OBJECT",{id:this.userData.id})})}}class E extends g{constructor(){super(...arguments);r(this,"isDIVEModel",!0);r(this,"_mesh",null);r(this,"_material",null);r(this,"_assetLoader",null)}async _getAssetLoader(){return this._assetLoader||(this._assetLoader=new(await Promise.resolve().then(()=>require("../plugins/assetloader/index.cjs"))).AssetLoader),this._assetLoader}async setFromURL(e){const n=await(await this._getAssetLoader()).load(e);this.setFromGLTF(n),Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:o})=>{var h;(h=o.get(this.userData.id))==null||h.performAction("MODEL_LOADED",{id:this.userData.id})})}setFromGLTF(e){this.clear(),this._boundingBox.makeEmpty(),e.traverse(t=>{t.castShadow=!0,t.receiveShadow=!0,t.layers.mask=this.layers.mask,this._boundingBox.expandByObject(t),!this._mesh&&"isMesh"in t&&(this._mesh=t,this._material?this._mesh.material=this._material:this._material=t.material)}),this.add(e)}setMaterial(e){this._material||(this._material=new s.MeshStandardMaterial),e.vertexColors!==void 0&&(this._material.vertexColors=e.vertexColors),e.color!==void 0&&this._material.color.set(e.color),e.map!==void 0&&(this._material.map=e.map),e.normalMap!==void 0&&(this._material.normalMap=e.normalMap),e.roughness!==void 0&&(this._material.roughness=e.roughness),e.roughnessMap!==void 0&&(this._material.roughnessMap=e.roughnessMap,this._material.roughnessMap&&(this._material.roughness=1)),e.metalness!==void 0&&(this._material.metalness=e.metalness),e.metalnessMap!==void 0&&(this._material.metalnessMap=e.metalnessMap,this._material.metalnessMap&&(this._material.metalness=1)),this._mesh&&(this._mesh.material=this._material)}placeOnFloor(){var o,h,d,c;const e=this.getWorldPosition(this._positionWorldBuffer),t=e.clone();(h=(o=this._mesh)==null?void 0:o.geometry)==null||h.computeBoundingBox();const n=(c=(d=this._mesh)==null?void 0:d.geometry)==null?void 0:c.boundingBox;!n||!this._mesh||(e.y=e.y-this._mesh.localToWorld(n.min.clone()).y,e.y!==t.y&&Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:_})=>{var u;(u=_.get(this.userData.id))==null||u.performAction("UPDATE_OBJECT",{id:this.userData.id,position:e,rotation:this.rotation,scale:this.scale})}))}dropIt(){if(!this.parent){console.warn("DIVEModel: dropIt() called on a model that is not in the scene.",this);return}const e=this._boundingBox.min.y*this.scale.y,t=this.localToWorld(this._boundingBox.getCenter(new s.Vector3).multiply(this.scale));t.y=e+this.position.y;const n=new s.Raycaster(t,new s.Vector3(0,-1,0));n.layers.mask=l.PRODUCT_LAYER_MASK;const o=n.intersectObjects(m(this).root.children,!0);if(o.length>0){const h=o[0].object;h.geometry.computeBoundingBox();const d=h.geometry.boundingBox,c=h.localToWorld(d.max.clone()),_=this.position.clone(),u=this.position.clone().setY(c.y).sub(new s.Vector3(0,e,0));if(this.position.copy(u),this.position.y===_.y)return;this.onMove()}}}class V extends g{constructor(){super();r(this,"isDIVEPrimitive",!0);r(this,"_mesh");this._mesh=new s.Mesh,this._mesh.layers.mask=l.PRODUCT_LAYER_MASK,this._mesh.castShadow=!0,this._mesh.receiveShadow=!0,this._mesh.material=new s.MeshStandardMaterial,this.add(this._mesh)}setGeometry(e){const t=this.assembleGeometry(e);t&&(this._mesh.geometry=t,this._boundingBox.setFromObject(this._mesh))}setMaterial(e){const t=this._mesh.material;e.vertexColors!==void 0&&(t.vertexColors=e.vertexColors),e.color!==void 0&&(t.color=new s.Color(e.color)),e.map!==void 0&&(t.map=e.map),e.normalMap!==void 0&&(t.normalMap=e.normalMap),e.roughness!==void 0&&(t.roughness=e.roughness),e.roughnessMap!==void 0&&(t.roughnessMap=e.roughnessMap,t.roughnessMap&&(t.roughness=1)),e.metalness!==void 0&&(t.metalness=e.metalness),e.metalnessMap!==void 0&&(t.metalnessMap=e.metalnessMap,t.metalnessMap&&(t.metalness=0)),this._mesh&&(this._mesh.material=t)}placeOnFloor(){var o,h,d,c;const e=this.getWorldPosition(this._positionWorldBuffer),t=e.clone();(h=(o=this._mesh)==null?void 0:o.geometry)==null||h.computeBoundingBox();const n=(c=(d=this._mesh)==null?void 0:d.geometry)==null?void 0:c.boundingBox;!n||!this._mesh||(e.y=e.y-this._mesh.localToWorld(n.min.clone()).y,e.y!==t.y&&Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:_})=>{var u;(u=_.get(this.userData.id))==null||u.performAction("UPDATE_OBJECT",{id:this.userData.id,position:e,rotation:this.rotation,scale:this.scale})}))}dropIt(){if(!this.parent){console.warn("DIVEPrimitive: dropIt() called on a model that is not in the scene.",this);return}const e=this._boundingBox.min.y*this.scale.y,t=this.localToWorld(this._boundingBox.getCenter(new s.Vector3).multiply(this.scale));t.y=e+this.position.y;const n=new s.Raycaster(t,new s.Vector3(0,-1,0));n.layers.mask=l.PRODUCT_LAYER_MASK;const o=n.intersectObjects(m(this).root.children,!0);if(o.length>0){const h=o[0].object;h.geometry.computeBoundingBox();const d=h.geometry.boundingBox,c=h.localToWorld(d.max.clone()),_=this.position.clone(),u=this.position.clone().setY(c.y).sub(new s.Vector3(0,e,0));if(this.position.copy(u),this.position.y===_.y)return;this.onMove()}}assembleGeometry(e){switch(this._mesh.material.flatShading=!1,e.name.toLowerCase()){case"cylinder":return this.createCylinderGeometry(e);case"sphere":return this.createSphereGeometry(e);case"pyramid":return this._mesh.material.flatShading=!0,this.createPyramidGeometry(e);case"cube":case"box":return this.createBoxGeometry(e);case"cone":return this.createConeGeometry(e);case"wall":return this.createWallGeometry(e);case"plane":return this.createPlaneGeometry(e);default:return console.warn("DIVEPrimitive.assembleGeometry: Invalid geometry type:",e.name.toLowerCase()),null}}createCylinderGeometry(e){const t=new s.CylinderGeometry(e.width/2,e.width/2,e.height,64);return t.translate(0,e.height/2,0),t}createSphereGeometry(e){return new s.SphereGeometry(e.width/2,256,256)}createPyramidGeometry(e){const t=new Float32Array([-e.width/2,0,-e.depth/2,e.width/2,0,-e.depth/2,e.width/2,0,e.depth/2,-e.width/2,0,e.depth/2,0,e.height,0]),n=new Uint16Array([0,1,2,0,2,3,0,4,1,1,4,2,2,4,3,3,4,0]),o=new s.BufferGeometry;return o.setAttribute("position",new s.BufferAttribute(t,3)),o.setIndex(new s.BufferAttribute(n,1)),o.computeVertexNormals(),o.computeBoundingBox(),o.computeBoundingSphere(),o}createBoxGeometry(e){const t=new s.BoxGeometry(e.width,e.height,e.depth);return t.translate(0,e.height/2,0),t}createConeGeometry(e){const t=new s.ConeGeometry(e.width/2,e.height,256);return t.translate(0,e.height/2,0),t}createWallGeometry(e){const t=new s.BoxGeometry(e.width,e.height,e.depth||.05,16);return t.translate(0,e.height/2,0),t}createPlaneGeometry(e){const t=new s.BoxGeometry(e.width,e.height,e.depth);return t.translate(0,e.height/2,0),t}}class P extends g{constructor(){super();r(this,"isDIVEGroup",!0);r(this,"_members");r(this,"_lines");this.name="DIVEGroup",this._members=[],this._lines=[]}get members(){return this._members}setPosition(e){super.setPosition(e),this._members.forEach(t=>{"isDIVENode"in t&&t.onMove()})}setLinesVisibility(e,t){if(!t){this._lines.forEach(o=>{o.visible=e});return}const n=this._members.indexOf(t);n!==-1&&(this._lines[n].visible=e)}attach(e){if(this._members.includes(e))return this;const t=this.createLine();return this.add(t),this._lines.push(t),super.attach(e),this._members.push(e),this._updateLineTo(t,e),this.setLinesVisibility(!0,e),this}remove(e){const t=this._members.indexOf(e);if(t===-1)return this;const n=this._lines[t];return super.remove(n),this._lines.splice(t,1),super.remove(e),this._members.splice(t,1),this}updateLineTo(e){const t=this._members.indexOf(e);t!==-1&&this._updateLineTo(this._lines[t],e)}createLine(){const e=new s.BufferGeometry,t=new s.LineDashedMaterial({color:6710886,dashSize:.05,gapSize:.025}),n=new s.Line(e,t);return n.visible=!1,n}_updateLineTo(e,t){const n=[new s.Vector3(0,0,0),t.position.clone()];e.geometry.setFromPoints(n),e.computeLineDistances()}}class M extends s.Mesh{constructor(){const e=new s.PlaneGeometry(1,1);e.scale(1e3,1e3,1),e.rotateX(-Math.PI/2);const t=new s.MeshStandardMaterial({color:new s.Color(16777215),side:s.FrontSide});super(e,t);r(this,"isDIVEFloor",!0);this.name="Floor",this.layers.mask=l.PRODUCT_LAYER_MASK,this.receiveShadow=!0}setVisibility(e){this.visible=e}setColor(e){this.material.color=new s.Color(e)}}class R extends s.Object3D{constructor(){super();r(this,"isDIVERoot",!0);r(this,"_floor");this.name="Root",this._floor=new M,this.add(this._floor)}get floor(){return this._floor}computeSceneBB(){const e=new s.Box3;return this.children.forEach(t=>{"isDIVEFloor"in t||t.traverse(n=>{"isObject3D"in n&&e.expandByObject(n)})}),e}getSceneObject(e){let t;return this.traverse(n=>{t||n.userData.id===e.id&&(t=n)}),t}addSceneObject(e){let t=this.getSceneObject(e);if(t)return console.warn(`DIVERoot.addSceneObject: Scene object with id ${e.id} already exists`),t;switch(e.entityType){case"pov":break;case"light":{switch(e.type){case"scene":{t=new f;break}case"ambient":{t=new S;break}case"point":{t=new x;break}default:throw new Error(`DIVERoot.addSceneObject: Unknown light type: ${e.type}`)}t.name=e.name,t.userData.id=e.id,this.add(t),this._updateLight(t,e);break}case"model":{t=new E,t.name=e.name,t.userData.id=e.id,t.userData.uri=e.uri,this.add(t),this._updateModel(t,e);break}case"primitive":{t=new V,t.name=e.name,t.userData.id=e.id,this.add(t),this._updatePrimitive(t,e);break}case"group":{t=new P,t.name=e.name,t.userData.id=e.id,this.add(t),this._updateGroup(t,e);break}default:throw new Error(`DIVERoot.addSceneObject: Unknown entity type: ${e.entityType}`)}return t}updateSceneObject(e){const t=this.getSceneObject(e);if(!t){console.warn(`DIVERoot.updateSceneObject: Scene object with id ${e.id} does not exist`);return}switch(e.entityType){case"pov":break;case"light":{this._updateLight(t,e);break}case"model":{this._updateModel(t,e);break}case"primitive":{this._updatePrimitive(t,e);break}case"group":{this._updateGroup(t,e);break}default:throw new Error(`DIVERoot.updateSceneObject: Unknown entity type: ${e.entityType}`)}}deleteSceneObject(e){const t=this.getSceneObject(e);if(!t){console.warn(`DIVERoot.deleteSceneObject: Object with id ${e.id} not found`);return}switch(e.entityType){case"pov":break;case"light":{this._deleteLight(t);break}case"model":{this._deleteModel(t);break}case"primitive":{this._deletePrimitive(t);break}case"group":{this._deleteGroup(t);break}default:throw new Error(`DIVERoot.deleteSceneObject: Unknown entity type: ${e.entityType}`)}}_updateLight(e,t){t.name!==void 0&&t.name!==null&&(e.name=t.name),t.position!==void 0&&t.position!==null&&e.position.set(t.position.x,t.position.y,t.position.z),t.intensity!==void 0&&t.intensity!==null&&e.setIntensity(t.intensity),t.enabled!==void 0&&t.enabled!==null&&e.setEnabled(t.enabled),t.color!==void 0&&t.color!==null&&e.setColor(new s.Color(t.color)),t.visible!==void 0&&t.visible!==null&&(e.visible=t.visible),t.parentId!==void 0&&this._setParent({...t,parentId:t.parentId})}_updateModel(e,t){t.uri!==void 0&&e.setFromURL(t.uri),t.name!==void 0&&(e.name=t.name),t.position!==void 0&&e.setPosition(t.position),t.rotation!==void 0&&e.setRotation(t.rotation),t.scale!==void 0&&e.setScale(t.scale),t.visible!==void 0&&e.setVisibility(t.visible),t.material!==void 0&&e.setMaterial(t.material),t.parentId!==void 0&&this._setParent({...t,parentId:t.parentId})}_updatePrimitive(e,t){t.name!==void 0&&(e.name=t.name),t.geometry!==void 0&&e.setGeometry(t.geometry),t.position!==void 0&&e.setPosition(t.position),t.rotation!==void 0&&e.setRotation(t.rotation),t.scale!==void 0&&e.setScale(t.scale),t.visible!==void 0&&e.setVisibility(t.visible),t.material!==void 0&&e.setMaterial(t.material),t.parentId!==void 0&&this._setParent({...t,parentId:t.parentId})}_updateGroup(e,t){t.name!==void 0&&(e.name=t.name),t.position!==void 0&&e.setPosition(t.position),t.rotation!==void 0&&e.setRotation(t.rotation),t.scale!==void 0&&e.setScale(t.scale),t.visible!==void 0&&e.setVisibility(t.visible),t.bbVisible!==void 0&&e.setLinesVisibility(t.bbVisible),t.parentId!==void 0&&this._setParent({...t,parentId:t.parentId})}_deleteLight(e){this._detachTransformControls(e),e.parent.remove(e)}_deleteModel(e){this._detachTransformControls(e),e.parent.remove(e)}_deletePrimitive(e){this._detachTransformControls(e),e.parent.remove(e)}_deleteGroup(e){this._detachTransformControls(e);for(let t=e.members.length-1;t>=0;t--)this.attach(e.members[t]);e.parent.remove(e)}_setParent(e){const t=this.getSceneObject(e);if(e.parentId!==null){const n=this.getSceneObject({id:e.parentId,entityType:e.entityType});if(!n)return;n.attach(t)}else this.attach(t)}_detachTransformControls(e){this._findScene(e).children.find(t=>{"isTransformControls"in t&&t.detach()})}_findScene(e){return e.parent!==null?this._findScene(e.parent):e}}const k="#888888",T="#dddddd";class A extends s.Object3D{constructor(){super(),this.name="Grid";const i=new s.GridHelper(100,100,k,T);i.material.depthTest=!1,i.layers.mask=l.HELPER_LAYER_MASK,this.add(i)}setVisibility(i){this.visible=i}}class B extends s.Scene{constructor(){super();r(this,"_root");r(this,"_grid");this.background=new s.Color(16777215),this._root=new R,this.add(this._root),this._grid=new A,this.add(this._grid)}get root(){return this._root}get grid(){return this._grid}setBackground(e){this.background=new s.Color(e)}computeSceneBB(){return this.root.computeSceneBB()}}const D={canvas:void 0,antialias:!0,alpha:!0,powerPreference:"high-performance",precision:"highp",stencil:!1,depth:!0,logarithmicDepthBuffer:!1,shadows:!0,shadowQuality:"high"};class O{constructor(i,e,t){r(this,"_webglrenderer");r(this,"_settings");this._scene=i,this._camera=e,this._settings={...D,...t??{}},this._webglrenderer=new s.WebGLRenderer(this._settings),this._webglrenderer.shadowMap.enabled=this._settings.shadows,this._webglrenderer.shadowMap.type=this._settings.shadowQuality==="high"?s.PCFSoftShadowMap:this._settings.shadowQuality==="medium"?s.PCFShadowMap:s.BasicShadowMap}get webglrenderer(){return this._webglrenderer}setCanvas(i){this._webglrenderer.dispose(),this._settings.canvas=i,this._webglrenderer=new s.WebGLRenderer(this._settings)}render(){this._webglrenderer.render(this._scene,this._camera)}onResize(i,e){this._webglrenderer.setSize(i,e,!1)}dispose(){this._webglrenderer.dispose()}}class G{constructor(){r(this,"_renderer",null);r(this,"_lastTime",0);r(this,"_isRunning",!1);r(this,"_tickers",[])}start(){this._isRunning||(this._isRunning=!0,this._lastTime=performance.now(),requestAnimationFrame(this._tick.bind(this)))}stop(){this._isRunning=!1}setRenderer(i){this._renderer=i}addTicker(i){this._tickers.find(e=>e.uuid===i.uuid)||this._tickers.push(i)}hasTicker(i){return this._tickers.find(e=>e.uuid===i.uuid)!==void 0}removeTicker(i){const e=this._tickers.findIndex(t=>t.uuid===i.uuid);e!==-1&&this._tickers.splice(e,1)}dispose(){this.stop(),this._tickers.forEach(i=>{var e;return(e=i.dispose)==null?void 0:e.call(i)}),this._tickers=[],this._isRunning=!1,this._lastTime=0}_tick(i){var t;if(!this._isRunning)return;const e=(i-this._lastTime)/1e3;this._lastTime=i,this._tickers.forEach(n=>n.tick(e)),(t=this._renderer)==null||t.render(),requestAnimationFrame(this._tick.bind(this))}}class z{constructor(i,e){r(this,"_resizeObserver");r(this,"_width",0);r(this,"_height",0);this._resizeObserver=new ResizeObserver(t=>{for(const n of t){const{width:o,height:h}=n.contentRect;o===this._width&&h===this._height||(i.onResize(o,h),e.onResize(o,h),this._width=o,this._height=h)}}),this._observeCanvas(i.webglrenderer.domElement)}setCanvas(i){this._resizeObserver.disconnect(),this._observeCanvas(i)}dispose(){this._resizeObserver.disconnect()}_observeCanvas(i){if(i.parentElement)this._resizeObserver.observe(i.parentElement);else{const e=setInterval(()=>{i.parentElement&&(this._resizeObserver.observe(i.parentElement),clearInterval(e))},16)}}}const y={autoStart:!0,displayAxes:!1,...l.DIVEPerspectiveCameraDefaultSettings,...D};class U{constructor(i){r(this,"_renderer");r(this,"_scene");r(this,"_camera");r(this,"_resizeManager");r(this,"_clock");r(this,"_settings");this._settings={...y,...i??{}},this._scene=new B,this._camera=new l.DIVEPerspectiveCamera(this._settings),this._renderer=new O(this._scene,this._camera,this._settings),this._resizeManager=new z(this._renderer,this._camera),this._clock=new G,this._clock.setRenderer(this._renderer),this._settings.autoStart&&this.start()}get scene(){return this._scene}get camera(){return this._camera}get renderer(){return this._renderer}setCanvas(i){this._renderer.setCanvas(i),this._resizeManager.setCanvas(i)}get clock(){return this._clock}start(){this._clock.start()}stop(){this._clock.stop()}dispose(){this._clock.dispose(),this._resizeManager.dispose(),this._renderer.dispose()}}const v="#c20017",b="#00ab26",C="#0081d4",F=v,Y=b,W=C;window.DIVE={instances:[],get instance(){return window.DIVE.instances[0]}};const q={...y,...w.OrbitControllerDefaultSettings};class I{constructor(i){r(this,"_instanceId",s.MathUtils.generateUUID());r(this,"_settings");r(this,"_engine");r(this,"orbitController");r(this,"axisCamera");this._settings={...q,...i??{}},this._engine=new U(i),this.orbitController=new w.OrbitController(this._engine.camera,this._engine.renderer.webglrenderer.domElement,this._settings),this._engine.clock.addTicker(this.orbitController),this._settings.displayAxes?(this.axisCamera=new L(this._engine.renderer,this._engine.scene,this._engine.camera),this._engine.clock.addTicker(this.axisCamera)):this.axisCamera=null,Promise.resolve().then(()=>require("./package-D_hIrGNz.cjs")).then(e=>{console.log(`DIVE ${e.default.version} initialized successfully!`),console.log(`
|
|
2
|
+
@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
|
|
3
|
+
@@@@+-:::::::---------------------==------------------------------=#@@@@
|
|
4
|
+
@@%=::::.......::---------------------------------------------------------+@@
|
|
5
|
+
@@+:::...........::-----------------------------------------------------------#@@
|
|
6
|
+
@@=:::.........::::::-------------------------------------------------------------%@
|
|
7
|
+
@%:::.......:::::::-----------------------------------------------------------------#@
|
|
8
|
+
@*:::.....:::::-----------------------------------------------------------------------*@
|
|
9
|
+
@%::::::.::::---------------------------------------------------------------------------@@
|
|
10
|
+
@@-:::::::::-----------------------------------------------------------------------------=@
|
|
11
|
+
@%::::::::--------------------------------------------------------------------------------%@
|
|
12
|
+
@+::::::::--------------------------------=@@@@@%-----------------------------------------%@
|
|
13
|
+
@=:::::::--------------------------------*@@ @@+---------------------------------------#@
|
|
14
|
+
@+:::::::-------------------------------*@ @*--------------------------------------%@
|
|
15
|
+
@#::::::::-----------------------------=@@ @@=-------------------------------------%@
|
|
16
|
+
@@-::::::::----------------------------@@ @@------------------------------------=@
|
|
17
|
+
@%:::::::::--------------------------*@ @*-----------------------------------@@
|
|
18
|
+
@*:::::::::-------------------------@@ @@----------------------------------%@
|
|
19
|
+
@#::::::::::----------------------%@ @%--------------------------------%@
|
|
20
|
+
@#:::::::::::-------------------=@@ @@=------------------------------%@
|
|
21
|
+
@@-::::::::::::----------------%@ @%----------------------------=@@
|
|
22
|
+
@@#::::::::::::::------------*@ @*--------------------------#@@
|
|
23
|
+
@@+::::::::::::::::--------@@ @@------------------------+@@
|
|
24
|
+
@@*:::::::::::::::::----@@ @@---------------------+@@
|
|
25
|
+
@@@-:::::::::::::::--#@ @#-----------------=%@@
|
|
26
|
+
@@%-::::::::::::-%@ @%-------------=%@@
|
|
27
|
+
@@@@+:::::::#@@ @@*-------*@@@@
|
|
28
|
+
@@@@@@@ @@@@@@
|
|
29
|
+
|
|
30
|
+
`)}),window.DIVE.instances.push(this)}static async QuickView(i,e){const t=new I(e);t.engine.scene.background=new s.Color(16777215),t.engine.scene.grid.setVisibility(!1),t.engine.scene.root.floor.setVisibility(!0),t.engine.camera.position.set(0,2,2),t.orbitController.target.set(0,.5,0);const n=new f;n.name="SceneLight",n.userData.id=s.MathUtils.generateUUID(),n.setEnabled(!0),n.visible=!0,n.setIntensity((e==null?void 0:e.lightIntensity)??1),n.setColor(new s.Color(16777215)),t.engine.scene.root.add(n);const o=new E;o.name="object",o.userData.id=s.MathUtils.generateUUID(),o.userData.uri=i,o.visible=!0,t.engine.scene.root.add(o),await o.setFromURL(i);const h=t.engine.scene.computeSceneBB(),d=t.orbitController.computeEncompassingView(h);return t.engine.camera.position.copy(d.position),t.orbitController.target.copy(d.target),t}get engine(){return this._engine}get canvas(){return this._engine.renderer.webglrenderer.domElement}setCanvas(i){this._engine.setCanvas(i),this._engine.clock.removeTicker(this.orbitController),this.orbitController.dispose(),this.orbitController=new w.OrbitController(this._engine.camera,i,this._settings),this._engine.clock.addTicker(this.orbitController)}async dispose(){return new Promise(i=>{this._engine.clock.removeTicker(this.orbitController),this.orbitController.dispose(),this.axisCamera&&(this._engine.clock.removeTicker(this.axisCamera),this.axisCamera.dispose()),window.DIVE.instances=window.DIVE.instances.filter(e=>e._instanceId!==this._instanceId),i()})}}const K={glb:{key:"glb",extension:"glb"},gltf:{key:"gltf",extension:"gltf"},usdz:{key:"usdz",extension:"usdz"}},J=Object.values(K).map(a=>a.extension);exports.AxesColorBlue=W;exports.AxesColorBlueLetter=C;exports.AxesColorGreen=Y;exports.AxesColorGreenLetter=b;exports.AxesColorRed=F;exports.AxesColorRedLetter=v;exports.DIVE=I;exports.DIVEAmbientLight=S;exports.DIVEAxisCamera=L;exports.DIVEClock=G;exports.DIVEDefaultSettings=q;exports.DIVEEngine=U;exports.DIVEFloor=M;exports.DIVEGrid=A;exports.DIVEGroup=P;exports.DIVEModel=E;exports.DIVENode=g;exports.DIVEPointLight=x;exports.DIVEPrimitive=V;exports.DIVERenderPipeline=O;exports.DIVERenderPipelineDefaultSettings=D;exports.DIVEResizeManager=z;exports.DIVERoot=R;exports.DIVEScene=B;exports.DIVESceneLight=f;exports.EngineDefaultSettings=y;exports.FILE_TYPES=K;exports.GRID_CENTER_LINE_COLOR=k;exports.GRID_SIDE_LINE_COLOR=T;exports.SUPPORTED_FILE_TYPES=J;exports.findSceneRecursive=m;
|