@shopware-ag/dive 2.0.1-beta.6 → 2.0.1-beta.8
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-BfPa_oNd.cjs +4 -0
- package/build/chunks/{AssetLoader-BewzFwHi.mjs → AssetLoader-C8Teswp4.mjs} +38 -35
- package/build/chunks/FileTypes-B2JRjVgw.cjs +30 -0
- package/build/chunks/FileTypes-CXnW0NAe.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-DLXheZay.mjs → SelectTool-DFpr9XHT.mjs} +10 -10
- package/build/chunks/SelectTool-DVqL2ebn.cjs +1 -0
- package/build/chunks/network-error-CHvryg-4.mjs +18 -0
- package/build/chunks/network-error-D_pq8VU6.cjs +1 -0
- package/build/chunks/package-BBfJ2Cc5.cjs +1 -0
- package/build/chunks/package-CHFUaMpF.mjs +39 -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 +42 -40
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let l=1234567;const m=Math.PI/180,w=180/Math.PI;function A(){const r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(a[r&255]+a[r>>8&255]+a[r>>16&255]+a[r>>24&255]+"-"+a[t&255]+a[t>>8&255]+"-"+a[t>>16&15|64]+a[t>>24&255]+"-"+a[e&63|128]+a[e>>8&255]+"-"+a[e>>16&255]+a[e>>24&255]+a[n&255]+a[n>>8&255]+a[n>>16&255]+a[n>>24&255]).toLowerCase()}function y(r,t,e){return Math.max(t,Math.min(e,r))}function I(r,t){return(r%t+t)%t}function D(r,t,e,n,s){return n+(r-t)*(s-n)/(e-t)}function g(r,t,e){return r!==t?(e-r)/(t-r):0}function U(r,t,e){return(1-e)*r+e*t}function E(r,t,e,n){return U(r,t,1-Math.exp(-e*n))}function P(r,t=1){return t-Math.abs(I(r,t*2)-t)}function T(r,t,e){return r<=t?0:r>=e?1:(r=(r-t)/(e-t),r*r*(3-2*r))}function x(r,t,e){return r<=t?0:r>=e?1:(r=(r-t)/(e-t),r*r*r*(r*(r*6-15)+10))}function F(r,t){return r+Math.floor(Math.random()*(t-r+1))}function R(r,t){return r+Math.random()*(t-r)}function k(r){return r*(.5-Math.random())}function L(r){r!==void 0&&(l=r);let t=l+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function O(r){return r*m}function X(r){return r*w}function Y(r){return(r&r-1)===0&&r!==0}function Z(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function _(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function z(r,t,e,n,s){const u=Math.cos,i=Math.sin,f=u(e/2),o=i(e/2),c=u((t+n)/2),d=i((t+n)/2),h=u((t-n)/2),M=i((t-n)/2),b=u((n-t)/2),p=i((n-t)/2);switch(s){case"XYX":r.set(f*d,o*h,o*M,f*c);break;case"YZY":r.set(o*M,f*d,o*h,f*c);break;case"ZXZ":r.set(o*h,o*M,f*d,f*c);break;case"XZX":r.set(f*d,o*p,o*b,f*c);break;case"YXY":r.set(o*b,f*d,o*p,f*c);break;case"ZYZ":r.set(o*p,o*b,f*d,f*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function G(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Q(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}const N={DEG2RAD:m,RAD2DEG:w,generateUUID:A,clamp:y,euclideanModulo:I,mapLinear:D,inverseLerp:g,lerp:U,damp:E,pingpong:P,smoothstep:T,smootherstep:x,randInt:F,randFloat:R,randFloatSpread:k,seededRandom:L,degToRad:O,radToDeg:X,isPowerOfTwo:Y,ceilPowerOfTwo:Z,floorPowerOfTwo:_,setQuaternionFromProperEuler:z,normalize:Q,denormalize:G};exports.MathUtils=N;exports.clamp=y;exports.generateUUID=A;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
const a = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
|
2
|
+
let m = 1234567;
|
|
3
|
+
const l = Math.PI / 180, w = 180 / Math.PI;
|
|
4
|
+
function I() {
|
|
5
|
+
const r = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0;
|
|
6
|
+
return (a[r & 255] + a[r >> 8 & 255] + a[r >> 16 & 255] + a[r >> 24 & 255] + "-" + a[t & 255] + a[t >> 8 & 255] + "-" + a[t >> 16 & 15 | 64] + a[t >> 24 & 255] + "-" + a[e & 63 | 128] + a[e >> 8 & 255] + "-" + a[e >> 16 & 255] + a[e >> 24 & 255] + a[n & 255] + a[n >> 8 & 255] + a[n >> 16 & 255] + a[n >> 24 & 255]).toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
function D(r, t, e) {
|
|
9
|
+
return Math.max(t, Math.min(e, r));
|
|
10
|
+
}
|
|
11
|
+
function A(r, t) {
|
|
12
|
+
return (r % t + t) % t;
|
|
13
|
+
}
|
|
14
|
+
function U(r, t, e, n, s) {
|
|
15
|
+
return n + (r - t) * (s - n) / (e - t);
|
|
16
|
+
}
|
|
17
|
+
function g(r, t, e) {
|
|
18
|
+
return r !== t ? (e - r) / (t - r) : 0;
|
|
19
|
+
}
|
|
20
|
+
function y(r, t, e) {
|
|
21
|
+
return (1 - e) * r + e * t;
|
|
22
|
+
}
|
|
23
|
+
function x(r, t, e, n) {
|
|
24
|
+
return y(r, t, 1 - Math.exp(-e * n));
|
|
25
|
+
}
|
|
26
|
+
function E(r, t = 1) {
|
|
27
|
+
return t - Math.abs(A(r, t * 2) - t);
|
|
28
|
+
}
|
|
29
|
+
function P(r, t, e) {
|
|
30
|
+
return r <= t ? 0 : r >= e ? 1 : (r = (r - t) / (e - t), r * r * (3 - 2 * r));
|
|
31
|
+
}
|
|
32
|
+
function T(r, t, e) {
|
|
33
|
+
return r <= t ? 0 : r >= e ? 1 : (r = (r - t) / (e - t), r * r * r * (r * (r * 6 - 15) + 10));
|
|
34
|
+
}
|
|
35
|
+
function F(r, t) {
|
|
36
|
+
return r + Math.floor(Math.random() * (t - r + 1));
|
|
37
|
+
}
|
|
38
|
+
function R(r, t) {
|
|
39
|
+
return r + Math.random() * (t - r);
|
|
40
|
+
}
|
|
41
|
+
function k(r) {
|
|
42
|
+
return r * (0.5 - Math.random());
|
|
43
|
+
}
|
|
44
|
+
function L(r) {
|
|
45
|
+
r !== void 0 && (m = r);
|
|
46
|
+
let t = m += 1831565813;
|
|
47
|
+
return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
48
|
+
}
|
|
49
|
+
function O(r) {
|
|
50
|
+
return r * l;
|
|
51
|
+
}
|
|
52
|
+
function X(r) {
|
|
53
|
+
return r * w;
|
|
54
|
+
}
|
|
55
|
+
function Y(r) {
|
|
56
|
+
return (r & r - 1) === 0 && r !== 0;
|
|
57
|
+
}
|
|
58
|
+
function Z(r) {
|
|
59
|
+
return Math.pow(2, Math.ceil(Math.log(r) / Math.LN2));
|
|
60
|
+
}
|
|
61
|
+
function _(r) {
|
|
62
|
+
return Math.pow(2, Math.floor(Math.log(r) / Math.LN2));
|
|
63
|
+
}
|
|
64
|
+
function z(r, t, e, n, s) {
|
|
65
|
+
const u = Math.cos, i = Math.sin, f = u(e / 2), o = i(e / 2), c = u((t + n) / 2), d = i((t + n) / 2), h = u((t - n) / 2), M = i((t - n) / 2), b = u((n - t) / 2), p = i((n - t) / 2);
|
|
66
|
+
switch (s) {
|
|
67
|
+
case "XYX":
|
|
68
|
+
r.set(f * d, o * h, o * M, f * c);
|
|
69
|
+
break;
|
|
70
|
+
case "YZY":
|
|
71
|
+
r.set(o * M, f * d, o * h, f * c);
|
|
72
|
+
break;
|
|
73
|
+
case "ZXZ":
|
|
74
|
+
r.set(o * h, o * M, f * d, f * c);
|
|
75
|
+
break;
|
|
76
|
+
case "XZX":
|
|
77
|
+
r.set(f * d, o * p, o * b, f * c);
|
|
78
|
+
break;
|
|
79
|
+
case "YXY":
|
|
80
|
+
r.set(o * b, f * d, o * p, f * c);
|
|
81
|
+
break;
|
|
82
|
+
case "ZYZ":
|
|
83
|
+
r.set(o * p, o * b, f * d, f * c);
|
|
84
|
+
break;
|
|
85
|
+
default:
|
|
86
|
+
console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + s);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function G(r, t) {
|
|
90
|
+
switch (t.constructor) {
|
|
91
|
+
case Float32Array:
|
|
92
|
+
return r;
|
|
93
|
+
case Uint32Array:
|
|
94
|
+
return r / 4294967295;
|
|
95
|
+
case Uint16Array:
|
|
96
|
+
return r / 65535;
|
|
97
|
+
case Uint8Array:
|
|
98
|
+
return r / 255;
|
|
99
|
+
case Int32Array:
|
|
100
|
+
return Math.max(r / 2147483647, -1);
|
|
101
|
+
case Int16Array:
|
|
102
|
+
return Math.max(r / 32767, -1);
|
|
103
|
+
case Int8Array:
|
|
104
|
+
return Math.max(r / 127, -1);
|
|
105
|
+
default:
|
|
106
|
+
throw new Error("Invalid component type.");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function Q(r, t) {
|
|
110
|
+
switch (t.constructor) {
|
|
111
|
+
case Float32Array:
|
|
112
|
+
return r;
|
|
113
|
+
case Uint32Array:
|
|
114
|
+
return Math.round(r * 4294967295);
|
|
115
|
+
case Uint16Array:
|
|
116
|
+
return Math.round(r * 65535);
|
|
117
|
+
case Uint8Array:
|
|
118
|
+
return Math.round(r * 255);
|
|
119
|
+
case Int32Array:
|
|
120
|
+
return Math.round(r * 2147483647);
|
|
121
|
+
case Int16Array:
|
|
122
|
+
return Math.round(r * 32767);
|
|
123
|
+
case Int8Array:
|
|
124
|
+
return Math.round(r * 127);
|
|
125
|
+
default:
|
|
126
|
+
throw new Error("Invalid component type.");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const N = {
|
|
130
|
+
DEG2RAD: l,
|
|
131
|
+
RAD2DEG: w,
|
|
132
|
+
generateUUID: I,
|
|
133
|
+
clamp: D,
|
|
134
|
+
euclideanModulo: A,
|
|
135
|
+
mapLinear: U,
|
|
136
|
+
inverseLerp: g,
|
|
137
|
+
lerp: y,
|
|
138
|
+
damp: x,
|
|
139
|
+
pingpong: E,
|
|
140
|
+
smoothstep: P,
|
|
141
|
+
smootherstep: T,
|
|
142
|
+
randInt: F,
|
|
143
|
+
randFloat: R,
|
|
144
|
+
randFloatSpread: k,
|
|
145
|
+
seededRandom: L,
|
|
146
|
+
degToRad: O,
|
|
147
|
+
radToDeg: X,
|
|
148
|
+
isPowerOfTwo: Y,
|
|
149
|
+
ceilPowerOfTwo: Z,
|
|
150
|
+
floorPowerOfTwo: _,
|
|
151
|
+
setQuaternionFromProperEuler: z,
|
|
152
|
+
normalize: Q,
|
|
153
|
+
denormalize: G
|
|
154
|
+
};
|
|
155
|
+
export {
|
|
156
|
+
N as M,
|
|
157
|
+
D as c,
|
|
158
|
+
I as g
|
|
159
|
+
};
|