aptechka 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{client-lib/Animation-uimN7sdT.js → lib/Animation-DF5jPON_.js} +23 -28
- package/lib/Animation-seVC6-fS.cjs +1 -0
- package/lib/Composed-ChlKoJEp.cjs +1 -0
- package/lib/Composed-CoX1ImVk.js +31 -0
- package/lib/Damped-BDO-F13V.js +53 -0
- package/lib/Damped-C7WAqKPh.cjs +1 -0
- package/lib/Derived-B-2UXnVE.cjs +1 -0
- package/lib/Derived-CDGpSMKu.js +56 -0
- package/{client-lib/SourceManager--L_rA28b.js → lib/SourceManager-B8-EMNnd.js} +26 -30
- package/lib/SourceManager-TzU9Rw08.cjs +1 -0
- package/lib/Store-BnA-dJsE.cjs +1 -0
- package/{client-lib/Store-Qr3SNOSf.js → lib/Store-DGtldlBH.js} +29 -34
- package/lib/Tweened-CHhmfvzo.js +44 -0
- package/lib/Tweened-DSXD0I0k.cjs +1 -0
- package/lib/Viewport-BmLTk_6k.cjs +1 -0
- package/lib/Viewport-DTlImj28.js +123 -0
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.js +167 -0
- package/{client-lib → lib}/animation/index.cjs +1 -1
- package/lib/animation/index.js +8 -0
- package/lib/attribute/index.cjs +1 -0
- package/{client-lib → lib}/attribute/index.js +15 -20
- package/lib/canvas/index.cjs +1 -0
- package/lib/canvas/index.js +111 -0
- package/lib/checkbox/index.cjs +1 -0
- package/{client-lib → lib}/checkbox/index.js +20 -25
- package/lib/class-linked-status/index.cjs +1 -0
- package/lib/class-linked-status/index.js +45 -0
- package/lib/connector/index.cjs +1 -0
- package/{client-lib → lib}/connector/index.js +14 -18
- package/lib/controls/index.cjs +1 -0
- package/lib/controls/index.js +207 -0
- package/{client-lib/createStylesheet-BqjaCUhm.cjs → lib/createStylesheet-CaDI99iu.cjs} +1 -1
- package/{client-lib/createStylesheet-DNG2b5X4.js → lib/createStylesheet-DO5t5q-m.js} +1 -1
- package/lib/css-property/index.cjs +1 -0
- package/lib/css-property/index.js +58 -0
- package/lib/css-unit-parser/index.cjs +8 -0
- package/lib/css-unit-parser/index.js +31 -0
- package/{client-lib → lib}/dev/index.cjs +1 -1
- package/{client-lib → lib}/dev/index.js +1 -1
- package/{client-lib → lib}/device/index.cjs +1 -1
- package/{client-lib → lib}/device/index.js +1 -1
- package/{client-lib → lib}/element-constructor/index.cjs +1 -1
- package/{client-lib → lib}/element-constructor/index.js +2 -2
- package/lib/element-resizer/index.cjs +1 -0
- package/{client-lib → lib}/element-resizer/index.js +12 -16
- package/lib/en3/helpers/index.cjs +1 -0
- package/{client-lib → lib}/en3/helpers/index.js +612 -646
- package/{client-lib → lib}/en3/index.cjs +1 -1
- package/lib/en3/index.js +6 -0
- package/{client-lib → lib}/en3/libs/index.js +1 -2
- package/lib/en3/loaders/index.cjs +1 -0
- package/{client-lib → lib}/en3/loaders/index.js +152 -167
- package/lib/en3/misc/index.cjs +10 -0
- package/{client-lib → lib}/en3/misc/index.js +18 -23
- package/{client-lib → lib}/en3/utils/index.cjs +1 -1
- package/{client-lib → lib}/en3/utils/index.js +2 -2
- package/lib/en3-C1fLmsjs.cjs +8 -0
- package/{client-lib/en3-THFHEReu.js → lib/en3-x-Ki30MY.js} +59 -64
- package/{client-lib → lib}/image/index.cjs +1 -1
- package/{client-lib → lib}/image/index.js +1 -1
- package/{client-lib/index-BuvwT3dS.js → lib/index-BhbT9PrL.js} +35 -40
- package/lib/index-BpsQqM-8.cjs +9 -0
- package/lib/intersector/index.cjs +1 -0
- package/{client-lib → lib}/intersector/index.js +12 -16
- package/lib/ladder/index.cjs +1 -0
- package/{client-lib → lib}/ladder/index.js +20 -25
- package/lib/layout-box/index.cjs +1 -0
- package/lib/layout-box/index.js +318 -0
- package/lib/loading/index.cjs +1 -0
- package/{client-lib → lib}/loading/index.js +17 -21
- package/lib/media/index.cjs +1 -0
- package/lib/media/index.js +26 -0
- package/lib/modal/index.cjs +1 -0
- package/{client-lib → lib}/modal/index.js +22 -26
- package/lib/morph/index.cjs +1 -0
- package/lib/morph/index.js +225 -0
- package/lib/notifier/index.cjs +1 -0
- package/lib/notifier/index.js +36 -0
- package/lib/pointer/index.cjs +1 -0
- package/{client-lib → lib}/pointer/index.js +37 -41
- package/lib/popover/index.cjs +1 -0
- package/{client-lib → lib}/popover/index.js +71 -79
- package/lib/router/index.cjs +1 -0
- package/{client-lib → lib}/router/index.js +54 -60
- package/lib/scroll/index.cjs +1 -0
- package/lib/scroll/index.js +1131 -0
- package/lib/scroll-entries/index.cjs +1 -0
- package/{client-lib → lib}/scroll-entries/index.js +11 -15
- package/{client-lib → lib}/select/index.cjs +1 -1
- package/{client-lib → lib}/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -0
- package/{client-lib → lib}/sequence/index.js +26 -30
- package/lib/slicer/index.cjs +11 -0
- package/{client-lib → lib}/slicer/index.js +27 -31
- package/lib/source/index.cjs +5 -0
- package/{client-lib → lib}/source/index.js +19 -24
- package/lib/store/index.cjs +1 -0
- package/{client-lib → lib}/store/index.js +29 -33
- package/{client-lib → lib}/svg-path-data/index.js +3 -6
- package/lib/tags-4AoxVUe3.js +833 -0
- package/lib/tags-v-OSVkiQ.cjs +1 -0
- package/{client-lib → lib}/theme/index.cjs +1 -1
- package/{client-lib → lib}/theme/index.js +2 -2
- package/lib/ticker/index.cjs +1 -0
- package/lib/ticker/index.js +119 -0
- package/{client-lib/traverseMaterials-BtBXV88O.cjs → lib/traverseMaterials-CD_3_56D.cjs} +1 -1
- package/{client-lib/traverseMaterials-BKSwwNmo.js → lib/traverseMaterials-mGC2_FkG.js} +1 -1
- package/lib/tweaker/index.cjs +10 -0
- package/{client-lib → lib}/tweaker/index.js +271 -279
- package/{client-lib → lib}/utils/index.js +1 -2
- package/lib/video/index.cjs +1 -0
- package/{client-lib → lib}/video/index.js +13 -17
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/index.js +42 -0
- package/package.json +351 -378
- package/client-lib/Animation-BInSRYNr.cjs +0 -1
- package/client-lib/Composed-Fa7owymK.js +0 -35
- package/client-lib/Composed-Iihn8fT4.cjs +0 -1
- package/client-lib/Damped-Da3EnNN4.cjs +0 -1
- package/client-lib/Damped-yrNXlkDE.js +0 -57
- package/client-lib/Derived-CNbsNMn_.cjs +0 -1
- package/client-lib/Derived-rInkx3e4.js +0 -60
- package/client-lib/SourceManager-D6D2LVKf.cjs +0 -1
- package/client-lib/Store-Cr3VaD9G.cjs +0 -1
- package/client-lib/Tweened-CjgvoOwL.js +0 -48
- package/client-lib/Tweened-DksN-Rz6.cjs +0 -1
- package/client-lib/Viewport-BBYt1Ivy.cjs +0 -1
- package/client-lib/Viewport-Cgtq2I_K.js +0 -127
- package/client-lib/accordion/AccordionElement.d.ts +0 -30
- package/client-lib/accordion/index.cjs +0 -1
- package/client-lib/accordion/index.d.ts +0 -1
- package/client-lib/accordion/index.js +0 -176
- package/client-lib/animation/Animation.d.ts +0 -35
- package/client-lib/animation/Damped.d.ts +0 -19
- package/client-lib/animation/Tweened.d.ts +0 -15
- package/client-lib/animation/index.d.ts +0 -3
- package/client-lib/animation/index.js +0 -8
- package/client-lib/attribute/index.cjs +0 -1
- package/client-lib/attribute/index.d.ts +0 -15
- package/client-lib/canvas/index.cjs +0 -1
- package/client-lib/canvas/index.d.ts +0 -35
- package/client-lib/canvas/index.js +0 -119
- package/client-lib/checkbox/index.cjs +0 -1
- package/client-lib/checkbox/index.d.ts +0 -14
- package/client-lib/class-linked-status/index.cjs +0 -1
- package/client-lib/class-linked-status/index.d.ts +0 -12
- package/client-lib/class-linked-status/index.js +0 -49
- package/client-lib/connector/index.cjs +0 -1
- package/client-lib/connector/index.d.ts +0 -15
- package/client-lib/controls/AutoplayControls.d.ts +0 -17
- package/client-lib/controls/Controls.d.ts +0 -9
- package/client-lib/controls/DragControls.d.ts +0 -16
- package/client-lib/controls/KeyboardControls.d.ts +0 -14
- package/client-lib/controls/WheelControls.d.ts +0 -19
- package/client-lib/controls/index.cjs +0 -1
- package/client-lib/controls/index.d.ts +0 -5
- package/client-lib/controls/index.js +0 -213
- package/client-lib/counter/index.d.ts +0 -6
- package/client-lib/css-property/index.cjs +0 -1
- package/client-lib/css-property/index.d.ts +0 -17
- package/client-lib/css-property/index.js +0 -62
- package/client-lib/css-unit-parser/index.cjs +0 -8
- package/client-lib/css-unit-parser/index.d.ts +0 -6
- package/client-lib/css-unit-parser/index.js +0 -36
- package/client-lib/css-value-parser/index.d.ts +0 -6
- package/client-lib/dev/index.d.ts +0 -1
- package/client-lib/device/Device.d.ts +0 -19
- package/client-lib/device/Viewport.d.ts +0 -29
- package/client-lib/device/index.d.ts +0 -2
- package/client-lib/element-constructor/ElementConstructor.d.ts +0 -75
- package/client-lib/element-constructor/createStylesheet.d.ts +0 -3
- package/client-lib/element-constructor/createTheme.d.ts +0 -13
- package/client-lib/element-constructor/index.d.ts +0 -4
- package/client-lib/element-constructor/knownSvgTags.d.ts +0 -1
- package/client-lib/element-constructor/tags.d.ts +0 -119
- package/client-lib/element-resizer/index.cjs +0 -1
- package/client-lib/element-resizer/index.d.ts +0 -10
- package/client-lib/en3/core/En3Raycaster.d.ts +0 -21
- package/client-lib/en3/core/En3View.d.ts +0 -40
- package/client-lib/en3/core/en3.d.ts +0 -39
- package/client-lib/en3/core/en3Cache.d.ts +0 -4
- package/client-lib/en3/helpers/En3ComposerManager.d.ts +0 -5
- package/client-lib/en3/helpers/En3GridHelper.d.ts +0 -8
- package/client-lib/en3/helpers/En3Helpers.d.ts +0 -5
- package/client-lib/en3/helpers/En3Object3dManager.d.ts +0 -14
- package/client-lib/en3/helpers/En3OrbitControls.d.ts +0 -8
- package/client-lib/en3/helpers/En3ParametersManager.d.ts +0 -16
- package/client-lib/en3/helpers/En3TransformControls.d.ts +0 -8
- package/client-lib/en3/helpers/index.cjs +0 -1
- package/client-lib/en3/helpers/index.d.ts +0 -2
- package/client-lib/en3/index.d.ts +0 -3
- package/client-lib/en3/index.js +0 -6
- package/client-lib/en3/libs/MeshoptDecoder.d.ts +0 -1
- package/client-lib/en3/libs/index.d.ts +0 -1
- package/client-lib/en3/loaders/En3GLTFLoader.d.ts +0 -12
- package/client-lib/en3/loaders/En3TextureLoader.d.ts +0 -8
- package/client-lib/en3/loaders/index.cjs +0 -1
- package/client-lib/en3/loaders/index.d.ts +0 -3
- package/client-lib/en3/loaders/loaders.d.ts +0 -13
- package/client-lib/en3/misc/En3ModifiedMaterial.d.ts +0 -33
- package/client-lib/en3/misc/En3SourceManager.d.ts +0 -32
- package/client-lib/en3/misc/index.cjs +0 -10
- package/client-lib/en3/misc/index.d.ts +0 -2
- package/client-lib/en3/objects/En3Clip.d.ts +0 -15
- package/client-lib/en3/objects/En3ClipHelpers.d.ts +0 -6
- package/client-lib/en3/objects/En3GLTF.d.ts +0 -11
- package/client-lib/en3/objects/En3Image.d.ts +0 -8
- package/client-lib/en3/objects/En3ImageLike.d.ts +0 -25
- package/client-lib/en3/objects/En3SourceConsumer.d.ts +0 -5
- package/client-lib/en3/objects/En3Video.d.ts +0 -13
- package/client-lib/en3/objects/fluid/Advection.d.ts +0 -30
- package/client-lib/en3/objects/fluid/Divergence.d.ts +0 -23
- package/client-lib/en3/objects/fluid/En3Fluid.d.ts +0 -16
- package/client-lib/en3/objects/fluid/En3FluidElement.d.ts +0 -13
- package/client-lib/en3/objects/fluid/En3FluidPointer.d.ts +0 -13
- package/client-lib/en3/objects/fluid/ExternalForce.d.ts +0 -19
- package/client-lib/en3/objects/fluid/Poisson.d.ts +0 -24
- package/client-lib/en3/objects/fluid/Pressure.d.ts +0 -26
- package/client-lib/en3/objects/fluid/ShaderPass.d.ts +0 -24
- package/client-lib/en3/objects/fluid/Simulation.d.ts +0 -33
- package/client-lib/en3/objects/fluid/Viscous.d.ts +0 -30
- package/client-lib/en3/objects/fluid/index.d.ts +0 -3
- package/client-lib/en3/objects/index.d.ts +0 -7
- package/client-lib/en3/utils/coverTexture.d.ts +0 -7
- package/client-lib/en3/utils/dispose.d.ts +0 -3
- package/client-lib/en3/utils/getCurrentViewport.d.ts +0 -9
- package/client-lib/en3/utils/index.d.ts +0 -5
- package/client-lib/en3/utils/traverseMaterials.d.ts +0 -3
- package/client-lib/en3/utils/traverseMeshes.d.ts +0 -3
- package/client-lib/en3-CBBYE8rb.cjs +0 -8
- package/client-lib/image/index.d.ts +0 -11
- package/client-lib/index-Ctct2GyP.cjs +0 -9
- package/client-lib/intersector/index.cjs +0 -1
- package/client-lib/intersector/index.d.ts +0 -10
- package/client-lib/ladder/index.cjs +0 -1
- package/client-lib/ladder/index.d.ts +0 -24
- package/client-lib/layout-box/index.cjs +0 -1
- package/client-lib/layout-box/index.d.ts +0 -96
- package/client-lib/layout-box/index.js +0 -326
- package/client-lib/libs/path-data-polyfill.d.ts +0 -1
- package/client-lib/loading/index.cjs +0 -1
- package/client-lib/loading/index.d.ts +0 -39
- package/client-lib/media/index.cjs +0 -1
- package/client-lib/media/index.d.ts +0 -12
- package/client-lib/media/index.js +0 -30
- package/client-lib/modal/ModalElement.d.ts +0 -13
- package/client-lib/modal/index.cjs +0 -1
- package/client-lib/modal/index.d.ts +0 -1
- package/client-lib/morph/Link.d.ts +0 -7
- package/client-lib/morph/Morph.d.ts +0 -37
- package/client-lib/morph/index.cjs +0 -1
- package/client-lib/morph/index.d.ts +0 -1
- package/client-lib/morph/index.js +0 -235
- package/client-lib/notifier/index.cjs +0 -1
- package/client-lib/notifier/index.d.ts +0 -8
- package/client-lib/notifier/index.js +0 -40
- package/client-lib/order/index.d.ts +0 -22
- package/client-lib/pointer/Pointer.d.ts +0 -23
- package/client-lib/pointer/PointerElement.d.ts +0 -14
- package/client-lib/pointer/index.cjs +0 -1
- package/client-lib/pointer/index.d.ts +0 -2
- package/client-lib/popover/PopoverButtonElement.d.ts +0 -15
- package/client-lib/popover/PopoverElement.d.ts +0 -26
- package/client-lib/popover/index.cjs +0 -1
- package/client-lib/popover/index.d.ts +0 -2
- package/client-lib/router/Link.d.ts +0 -7
- package/client-lib/router/Route.d.ts +0 -21
- package/client-lib/router/Router.d.ts +0 -41
- package/client-lib/router/index.cjs +0 -1
- package/client-lib/router/index.d.ts +0 -2
- package/client-lib/scroll/ScrollBulletButtonsElement.d.ts +0 -12
- package/client-lib/scroll/ScrollButtonElement.d.ts +0 -6
- package/client-lib/scroll/ScrollElement.d.ts +0 -82
- package/client-lib/scroll/ScrollSection.d.ts +0 -23
- package/client-lib/scroll/ScrollSegmentElement.d.ts +0 -63
- package/client-lib/scroll/ScrollSetButtonElement.d.ts +0 -10
- package/client-lib/scroll/ScrollStepButtonElement.d.ts +0 -10
- package/client-lib/scroll/ScrollUserElement.d.ts +0 -7
- package/client-lib/scroll/ScrollbarElement.d.ts +0 -14
- package/client-lib/scroll/index.cjs +0 -1
- package/client-lib/scroll/index.d.ts +0 -6
- package/client-lib/scroll/index.js +0 -1154
- package/client-lib/scroll-entries/index.cjs +0 -1
- package/client-lib/scroll-entries/index.d.ts +0 -21
- package/client-lib/select/SelectElement.d.ts +0 -24
- package/client-lib/select/SelectHeadElement.d.ts +0 -13
- package/client-lib/select/SelectOptionElement.d.ts +0 -14
- package/client-lib/select/SelectUserElement.d.ts +0 -7
- package/client-lib/select/index.d.ts +0 -4
- package/client-lib/sequence/index.cjs +0 -1
- package/client-lib/sequence/index.d.ts +0 -21
- package/client-lib/slicer/DecoderElement.d.ts +0 -11
- package/client-lib/slicer/Letter.d.ts +0 -11
- package/client-lib/slicer/SlicerElement.d.ts +0 -21
- package/client-lib/slicer/Word.d.ts +0 -17
- package/client-lib/slicer/index.cjs +0 -11
- package/client-lib/slicer/index.d.ts +0 -4
- package/client-lib/source/SourceClass.d.ts +0 -11
- package/client-lib/source/SourceElement.d.ts +0 -25
- package/client-lib/source/SourceManager.d.ts +0 -14
- package/client-lib/source/SourceSet.d.ts +0 -9
- package/client-lib/source/index.cjs +0 -5
- package/client-lib/source/index.d.ts +0 -4
- package/client-lib/store/Cached.d.ts +0 -18
- package/client-lib/store/Composed.d.ts +0 -8
- package/client-lib/store/Derived.d.ts +0 -13
- package/client-lib/store/DerivedArray.d.ts +0 -13
- package/client-lib/store/Resource.d.ts +0 -12
- package/client-lib/store/Store.d.ts +0 -76
- package/client-lib/store/StoreRegistry.d.ts +0 -23
- package/client-lib/store/index.cjs +0 -1
- package/client-lib/store/index.d.ts +0 -7
- package/client-lib/svg-path-data/index.d.ts +0 -15
- package/client-lib/tags-B0do5eeb.cjs +0 -1
- package/client-lib/tags-wG5k157g.js +0 -860
- package/client-lib/test/starting-style/index.d.ts +0 -1
- package/client-lib/theme/index.d.ts +0 -35
- package/client-lib/ticker/index.cjs +0 -1
- package/client-lib/ticker/index.d.ts +0 -22
- package/client-lib/ticker/index.js +0 -125
- package/client-lib/tweaker/TweakerBooleanManagerElement.d.ts +0 -11
- package/client-lib/tweaker/TweakerColorManagerElement.d.ts +0 -11
- package/client-lib/tweaker/TweakerElement.d.ts +0 -18
- package/client-lib/tweaker/TweakerFieldElement.d.ts +0 -21
- package/client-lib/tweaker/TweakerFolderElement.d.ts +0 -24
- package/client-lib/tweaker/TweakerLinkManagerElement.d.ts +0 -11
- package/client-lib/tweaker/TweakerNumberManagerElement.d.ts +0 -14
- package/client-lib/tweaker/TweakerSelectManagerElement.d.ts +0 -11
- package/client-lib/tweaker/TweakerStoreManagerElement.d.ts +0 -10
- package/client-lib/tweaker/TweakerStringManagerElement.d.ts +0 -11
- package/client-lib/tweaker/index.cjs +0 -10
- package/client-lib/tweaker/index.d.ts +0 -1
- package/client-lib/tweaker/tweakerManagerConstructors.d.ts +0 -6
- package/client-lib/tweaker/tweakerStorage.d.ts +0 -23
- package/client-lib/utils/array.d.ts +0 -2
- package/client-lib/utils/attributes.d.ts +0 -2
- package/client-lib/utils/browser.d.ts +0 -1
- package/client-lib/utils/bytes.d.ts +0 -1
- package/client-lib/utils/canvas.d.ts +0 -7
- package/client-lib/utils/collisions.d.ts +0 -4
- package/client-lib/utils/coordinates.d.ts +0 -14
- package/client-lib/utils/cssom.d.ts +0 -5
- package/client-lib/utils/decoding.d.ts +0 -2
- package/client-lib/utils/dom.d.ts +0 -5
- package/client-lib/utils/easings.d.ts +0 -17
- package/client-lib/utils/events.d.ts +0 -8
- package/client-lib/utils/file.d.ts +0 -1
- package/client-lib/utils/function.d.ts +0 -2
- package/client-lib/utils/gestures.d.ts +0 -1
- package/client-lib/utils/index.d.ts +0 -26
- package/client-lib/utils/layout.d.ts +0 -3
- package/client-lib/utils/math.d.ts +0 -12
- package/client-lib/utils/number.d.ts +0 -3
- package/client-lib/utils/object.d.ts +0 -9
- package/client-lib/utils/polyfills.d.ts +0 -1
- package/client-lib/utils/promises.d.ts +0 -1
- package/client-lib/utils/string.d.ts +0 -8
- package/client-lib/utils/style.d.ts +0 -2
- package/client-lib/utils/ts-shape.d.ts +0 -20
- package/client-lib/utils/ts-utility.d.ts +0 -26
- package/client-lib/utils/url.d.ts +0 -9
- package/client-lib/video/index.cjs +0 -1
- package/client-lib/video/index.d.ts +0 -22
- package/client-lib/window-resizer/index.cjs +0 -1
- package/client-lib/window-resizer/index.d.ts +0 -10
- package/client-lib/window-resizer/index.js +0 -46
- package/server-lib/optimizer/FFmpeg.d.ts +0 -10
- package/server-lib/optimizer/generateFavicon.d.ts +0 -4
- package/server-lib/optimizer/generateSequence.d.ts +0 -3
- package/server-lib/optimizer/generateSprite.d.ts +0 -4
- package/server-lib/optimizer/index.d.ts +0 -10
- package/server-lib/optimizer/index.js +0 -404
- package/server-lib/optimizer/inputFiles.d.ts +0 -26
- package/server-lib/optimizer/optimize.d.ts +0 -13
- package/server-lib/optimizer/optimizeImage.d.ts +0 -4
- package/server-lib/optimizer/optimizeVideo.d.ts +0 -3
- package/server-lib/optimizer/optimizer.d.ts +0 -5
- package/server-lib/optimizer/types.d.ts +0 -51
- package/server-lib/optimizer/utils.d.ts +0 -1
- package/server-lib/utils/buffer.d.ts +0 -1
- package/server-lib/utils/fs.d.ts +0 -11
- package/server-lib/utils/index.d.ts +0 -5
- package/server-lib/utils/index.js +0 -65
- package/server-lib/utils/math.d.ts +0 -1
- package/server-lib/utils/path.d.ts +0 -3
- package/server-lib/utils/types.d.ts +0 -8
- /package/{client-lib → lib}/attributes-69we3byR.js +0 -0
- /package/{client-lib → lib}/attributes-Bf2svn4j.cjs +0 -0
- /package/{client-lib → lib}/browser-0zX67oeU.js +0 -0
- /package/{client-lib → lib}/browser-CpzFX2xg.cjs +0 -0
- /package/{client-lib → lib}/canvas-CU5Xjahf.cjs +0 -0
- /package/{client-lib → lib}/canvas-DeZ0SLUJ.js +0 -0
- /package/{client-lib → lib}/coordinates-CgdGoSYs.js +0 -0
- /package/{client-lib → lib}/coordinates-D8Np3cPD.cjs +0 -0
- /package/{client-lib → lib}/createTheme-CHnsCgAr.js +0 -0
- /package/{client-lib → lib}/createTheme-Cfaw9UmV.cjs +0 -0
- /package/{client-lib → lib}/css-value-parser/index.cjs +0 -0
- /package/{client-lib → lib}/css-value-parser/index.js +0 -0
- /package/{client-lib → lib}/dom-JBOkFLTh.cjs +0 -0
- /package/{client-lib → lib}/dom-P5QbAASX.js +0 -0
- /package/{client-lib → lib}/easings-BKi40vHz.js +0 -0
- /package/{client-lib → lib}/easings-DsS5-Kqc.cjs +0 -0
- /package/{client-lib → lib}/en3/libs/index.cjs +0 -0
- /package/{client-lib → lib}/events-BGwqaxVW.cjs +0 -0
- /package/{client-lib → lib}/events-CJTUMSLU.js +0 -0
- /package/{client-lib → lib}/file-EevnUtRj.cjs +0 -0
- /package/{client-lib → lib}/file-lxi_oXJf.js +0 -0
- /package/{client-lib → lib}/function-C10DGppn.js +0 -0
- /package/{client-lib → lib}/function-MthRj-GJ.cjs +0 -0
- /package/{client-lib → lib}/gestures-D2Fdra_G.js +0 -0
- /package/{client-lib → lib}/gestures-DHLrn6Q8.cjs +0 -0
- /package/{client-lib → lib}/layout-8ryRAMGJ.cjs +0 -0
- /package/{client-lib → lib}/layout-HoBT_Da2.js +0 -0
- /package/{client-lib → lib}/math-BOBiC4TN.js +0 -0
- /package/{client-lib → lib}/math-GDWEqu7y.cjs +0 -0
- /package/{client-lib → lib}/object-CCiXnER2.cjs +0 -0
- /package/{client-lib → lib}/object-D6MVWB4l.js +0 -0
- /package/{client-lib → lib}/order/index.cjs +0 -0
- /package/{client-lib → lib}/order/index.js +0 -0
- /package/{client-lib → lib}/polyfills-CM4SCDTt.cjs +0 -0
- /package/{client-lib → lib}/polyfills-X6KXuHg-.js +0 -0
- /package/{client-lib → lib}/string-DhgS_iFl.cjs +0 -0
- /package/{client-lib → lib}/string-f0Dnk0L1.js +0 -0
- /package/{client-lib → lib}/style-At6aDoqG.cjs +0 -0
- /package/{client-lib → lib}/style-j2TwriJ_.js +0 -0
- /package/{client-lib → lib}/svg-path-data/index.cjs +0 -0
- /package/{client-lib → lib}/url-C3dWnJQg.cjs +0 -0
- /package/{client-lib → lib}/url-DMNfW7uN.js +0 -0
- /package/{client-lib → lib}/utils/index.cjs +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var Y=(h,t,e)=>{if(!t.has(h))throw TypeError("Cannot "+e)};var y=(h,t,e)=>(Y(h,t,"read from private field"),e?e.call(h):t.get(h)),B=(h,t,e)=>{if(t.has(h))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(h):t.set(h,e)},K=(h,t,e,r)=>(Y(h,t,"write to private field"),r?r.call(h,e):t.set(h,e),e);var Q=(h,t,e)=>new Promise((r,n)=>{var s=o=>{try{a(e.next(o))}catch(c){n(c)}},i=o=>{try{a(e.throw(o))}catch(c){n(c)}},a=o=>o.done?r(o.value):Promise.resolve(o.value).then(s,i);a((e=e.apply(h,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("three"),L=require("../../en3-CBBYE8rb.cjs");function Z(h,t){if(t===u.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),h;if(t===u.TriangleFanDrawMode||t===u.TriangleStripDrawMode){let e=h.getIndex();if(e===null){const i=[],a=h.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)i.push(o);h.setIndex(i),e=h.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),h}const r=e.count-2,n=[];if(t===u.TriangleFanDrawMode)for(let i=1;i<=r;i++)n.push(e.getX(0)),n.push(e.getX(i)),n.push(e.getX(i+1));else for(let i=0;i<r;i++)i%2===0?(n.push(e.getX(i)),n.push(e.getX(i+1)),n.push(e.getX(i+2))):(n.push(e.getX(i+2)),n.push(e.getX(i+1)),n.push(e.getX(i)));n.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=h.clone();return s.setIndex(n),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),h}class re extends u.Loader{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new le(e)}),this.register(function(e){return new ue(e)}),this.register(function(e){return new Re(e)}),this.register(function(e){return new xe(e)}),this.register(function(e){return new Ee(e)}),this.register(function(e){return new he(e)}),this.register(function(e){return new fe(e)}),this.register(function(e){return new pe(e)}),this.register(function(e){return new me(e)}),this.register(function(e){return new ce(e)}),this.register(function(e){return new ge(e)}),this.register(function(e){return new de(e)}),this.register(function(e){return new Te(e)}),this.register(function(e){return new Ae(e)}),this.register(function(e){return new oe(e)}),this.register(function(e){return new Le(e)}),this.register(function(e){return new Me(e)})}load(t,e,r,n){const s=this;let i;if(this.resourcePath!=="")i=this.resourcePath;else if(this.path!==""){const c=u.LoaderUtils.extractUrlBase(t);i=u.LoaderUtils.resolveURL(c,this.path)}else i=u.LoaderUtils.extractUrlBase(t);this.manager.itemStart(t);const a=function(c){n?n(c):console.error(c),s.manager.itemError(t),s.manager.itemEnd(t)},o=new u.FileLoader(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(c){try{s.parse(c,i,function(d){e(d),s.manager.itemEnd(t)},a)}catch(d){a(d)}},r,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,r,n){let s;const i={},a={},o=new TextDecoder;if(typeof t=="string")s=JSON.parse(t);else if(t instanceof ArrayBuffer)if(o.decode(new Uint8Array(t,0,4))===ne){try{i[A.KHR_BINARY_GLTF]=new Se(t)}catch(l){n&&n(l);return}s=JSON.parse(i[A.KHR_BINARY_GLTF].content)}else s=JSON.parse(o.decode(t));else s=t;if(s.asset===void 0||s.asset.version[0]<2){n&&n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new ke(s,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const l=this.pluginCallbacks[d](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,i[l.name]=!0}if(s.extensionsUsed)for(let d=0;d<s.extensionsUsed.length;++d){const l=s.extensionsUsed[d],f=s.extensionsRequired||[];switch(l){case A.KHR_MATERIALS_UNLIT:i[l]=new ae;break;case A.KHR_DRACO_MESH_COMPRESSION:i[l]=new _e(s,this.dracoLoader);break;case A.KHR_TEXTURE_TRANSFORM:i[l]=new ye;break;case A.KHR_MESH_QUANTIZATION:i[l]=new we;break;default:f.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(i),c.setPlugins(a),c.parse(r,n)}parseAsync(t,e){const r=this;return new Promise(function(n,s){r.parse(t,e,n,s)})}}function ie(){let h={};return{get:function(t){return h[t]},add:function(t,e){h[t]=e},remove:function(t){delete h[t]},removeAll:function(){h={}}}}const A={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class oe{constructor(t){this.parser=t,this.name=A.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let r=0,n=e.length;r<n;r++){const s=e[r];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(t){const e=this.parser,r="light:"+t;let n=e.cache.get(r);if(n)return n;const s=e.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[t];let c;const d=new u.Color(16777215);o.color!==void 0&&d.setRGB(o.color[0],o.color[1],o.color[2],u.LinearSRGBColorSpace);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new u.DirectionalLight(d),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new u.PointLight(d),c.distance=l;break;case"spot":c=new u.SpotLight(d),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),c.decay=2,N(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+t),n=Promise.resolve(c),e.cache.add(r,n),n}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,r=this.parser,s=r.json.nodes[t],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return r._getNodeRef(e.cache,a,o)})}}class ae{constructor(){this.name=A.KHR_MATERIALS_UNLIT}getMaterialType(){return u.MeshBasicMaterial}extendParams(t,e,r){const n=[];t.color=new u.Color(1,1,1),t.opacity=1;const s=e.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const i=s.baseColorFactor;t.color.setRGB(i[0],i[1],i[2],u.LinearSRGBColorSpace),t.opacity=i[3]}s.baseColorTexture!==void 0&&n.push(r.assignTexture(t,"map",s.baseColorTexture,u.SRGBColorSpace))}return Promise.all(n)}}class ce{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name].emissiveStrength;return s!==void 0&&(e.emissiveIntensity=s),Promise.resolve()}}class le{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];if(i.clearcoatFactor!==void 0&&(e.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&s.push(r.assignTexture(e,"clearcoatMap",i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&s.push(r.assignTexture(e,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(s.push(r.assignTexture(e,"clearcoatNormalMap",i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){const a=i.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new u.Vector2(a,a)}return Promise.all(s)}}class ue{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_DISPERSION}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return e.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class de{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return i.iridescenceFactor!==void 0&&(e.iridescence=i.iridescenceFactor),i.iridescenceTexture!==void 0&&s.push(r.assignTexture(e,"iridescenceMap",i.iridescenceTexture)),i.iridescenceIor!==void 0&&(e.iridescenceIOR=i.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),i.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),i.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),i.iridescenceThicknessTexture!==void 0&&s.push(r.assignTexture(e,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(s)}}class he{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_SHEEN}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[];e.sheenColor=new u.Color(0,0,0),e.sheenRoughness=0,e.sheen=1;const i=n.extensions[this.name];if(i.sheenColorFactor!==void 0){const a=i.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace)}return i.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=i.sheenRoughnessFactor),i.sheenColorTexture!==void 0&&s.push(r.assignTexture(e,"sheenColorMap",i.sheenColorTexture,u.SRGBColorSpace)),i.sheenRoughnessTexture!==void 0&&s.push(r.assignTexture(e,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(s)}}class fe{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return i.transmissionFactor!==void 0&&(e.transmission=i.transmissionFactor),i.transmissionTexture!==void 0&&s.push(r.assignTexture(e,"transmissionMap",i.transmissionTexture)),Promise.all(s)}}class pe{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_VOLUME}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];e.thickness=i.thicknessFactor!==void 0?i.thicknessFactor:0,i.thicknessTexture!==void 0&&s.push(r.assignTexture(e,"thicknessMap",i.thicknessTexture)),e.attenuationDistance=i.attenuationDistance||1/0;const a=i.attenuationColor||[1,1,1];return e.attenuationColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),Promise.all(s)}}class me{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_IOR}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return e.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class ge{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_SPECULAR}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];e.specularIntensity=i.specularFactor!==void 0?i.specularFactor:1,i.specularTexture!==void 0&&s.push(r.assignTexture(e,"specularIntensityMap",i.specularTexture));const a=i.specularColorFactor||[1,1,1];return e.specularColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),i.specularColorTexture!==void 0&&s.push(r.assignTexture(e,"specularColorMap",i.specularColorTexture,u.SRGBColorSpace)),Promise.all(s)}}class Ae{constructor(t){this.parser=t,this.name=A.EXT_MATERIALS_BUMP}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return e.bumpScale=i.bumpFactor!==void 0?i.bumpFactor:1,i.bumpTexture!==void 0&&s.push(r.assignTexture(e,"bumpMap",i.bumpTexture)),Promise.all(s)}}class Te{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return i.anisotropyStrength!==void 0&&(e.anisotropy=i.anisotropyStrength),i.anisotropyRotation!==void 0&&(e.anisotropyRotation=i.anisotropyRotation),i.anisotropyTexture!==void 0&&s.push(r.assignTexture(e,"anisotropyMap",i.anisotropyTexture)),Promise.all(s)}}class Re{constructor(t){this.parser=t,this.name=A.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,r=e.json,n=r.textures[t];if(!n.extensions||!n.extensions[this.name])return null;const s=n.extensions[this.name],i=e.options.ktx2Loader;if(!i){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,s.source,i)}}class xe{constructor(t){this.parser=t,this.name=A.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,r=this.parser,n=r.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;const i=s.extensions[e],a=n.images[i.source];let o=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(t,i.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Ee{constructor(t){this.parser=t,this.name=A.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,r=this.parser,n=r.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;const i=s.extensions[e],a=n.images[i.source];let o=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(t,i.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Le{constructor(t){this.name=A.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,r=e.bufferViews[t];if(r.extensions&&r.extensions[this.name]){const n=r.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const o=n.byteOffset||0,c=n.byteLength||0,d=n.count,l=n.byteStride,f=new Uint8Array(a,o,c);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(d,l,f,n.mode,n.filter).then(function(p){return p.buffer}):i.ready.then(function(){const p=new ArrayBuffer(d*l);return i.decodeGltfBuffer(new Uint8Array(p),d,l,f,n.mode,n.filter),p})})}else return null}}class Me{constructor(t){this.name=A.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,r=e.nodes[t];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const n=e.meshes[r.mesh];for(const c of n.primitives)if(c.mode!==S.TRIANGLES&&c.mode!==S.TRIANGLE_STRIP&&c.mode!==S.TRIANGLE_FAN&&c.mode!==void 0)return null;const i=r.extensions[this.name].attributes,a=[],o={};for(const c in i)a.push(this.parser.getDependency("accessor",i[c]).then(d=>(o[c]=d,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),l=d.isGroup?d.children:[d],f=c[0].count,p=[];for(const m of l){const R=new u.Matrix4,g=new u.Vector3,T=new u.Quaternion,E=new u.Vector3(1,1,1),M=new u.InstancedMesh(m.geometry,m.material,f);for(let x=0;x<f;x++)o.TRANSLATION&&g.fromBufferAttribute(o.TRANSLATION,x),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,x),o.SCALE&&E.fromBufferAttribute(o.SCALE,x),M.setMatrixAt(x,R.compose(g,T,E));for(const x in o)if(x==="_COLOR_0"){const w=o[x];M.instanceColor=new u.InstancedBufferAttribute(w.array,w.itemSize,w.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&m.geometry.setAttribute(x,o[x]);u.Object3D.prototype.copy.call(M,m),this.parser.assignFinalMaterial(M),p.push(M)}return d.isGroup?(d.clear(),d.add(...p),d):p[0]}))}}const ne="glTF",H=12,J={JSON:1313821514,BIN:5130562};class Se{constructor(t){this.name=A.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,H),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==ne)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-H,s=new DataView(t,H);let i=0;for(;i<n;){const a=s.getUint32(i,!0);i+=4;const o=s.getUint32(i,!0);if(i+=4,o===J.JSON){const c=new Uint8Array(t,H+i,a);this.content=r.decode(c)}else if(o===J.BIN){const c=H+i;this.body=t.slice(c,c+a)}i+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class _e{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=A.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const r=this.json,n=this.dracoLoader,s=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,a={},o={},c={};for(const d in i){const l=q[d]||d.toLowerCase();a[l]=i[d]}for(const d in t.attributes){const l=q[d]||d.toLowerCase();if(i[d]!==void 0){const f=r.accessors[t.attributes[d]],p=G[f.componentType];c[l]=p.name,o[l]=f.normalized===!0}}return e.getDependency("bufferView",s).then(function(d){return new Promise(function(l,f){n.decodeDracoFile(d,function(p){for(const m in p.attributes){const R=p.attributes[m],g=o[m];g!==void 0&&(R.normalized=g)}l(p)},a,c,u.LinearSRGBColorSpace,f)})})}}class ye{constructor(){this.name=A.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class we{constructor(){this.name=A.KHR_MESH_QUANTIZATION}}class se extends u.Interpolant{constructor(t,e,r,n){super(t,e,r,n)}copySampleValue_(t){const e=this.resultBuffer,r=this.sampleValues,n=this.valueSize,s=t*n*3+n;for(let i=0;i!==n;i++)e[i]=r[s+i];return e}interpolate_(t,e,r,n){const s=this.resultBuffer,i=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,d=n-e,l=(r-e)/d,f=l*l,p=f*l,m=t*c,R=m-c,g=-2*p+3*f,T=p-f,E=1-g,M=T-f+l;for(let x=0;x!==a;x++){const w=i[R+x+a],I=i[R+x+o]*d,_=i[m+x+a],k=i[m+x]*d;s[x]=E*w+M*I+g*_+T*k}return s}}const be=new u.Quaternion;class Ne extends se{interpolate_(t,e,r,n){const s=super.interpolate_(t,e,r,n);return be.fromArray(s).normalize().toArray(s),s}}const S={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},G={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},$={9728:u.NearestFilter,9729:u.LinearFilter,9984:u.NearestMipmapNearestFilter,9985:u.LinearMipmapNearestFilter,9986:u.NearestMipmapLinearFilter,9987:u.LinearMipmapLinearFilter},ee={33071:u.ClampToEdgeWrapping,33648:u.MirroredRepeatWrapping,10497:u.RepeatWrapping},V={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},q={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},O={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Ie={CUBICSPLINE:void 0,LINEAR:u.InterpolateLinear,STEP:u.InterpolateDiscrete},X={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Ce(h){return h.DefaultMaterial===void 0&&(h.DefaultMaterial=new u.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:u.FrontSide})),h.DefaultMaterial}function D(h,t,e){for(const r in e.extensions)h[r]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=e.extensions[r])}function N(h,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(h.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Oe(h,t,e){let r=!1,n=!1,s=!1;for(let c=0,d=t.length;c<d;c++){const l=t[c];if(l.POSITION!==void 0&&(r=!0),l.NORMAL!==void 0&&(n=!0),l.COLOR_0!==void 0&&(s=!0),r&&n&&s)break}if(!r&&!n&&!s)return Promise.resolve(h);const i=[],a=[],o=[];for(let c=0,d=t.length;c<d;c++){const l=t[c];if(r){const f=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):h.attributes.position;i.push(f)}if(n){const f=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):h.attributes.normal;a.push(f)}if(s){const f=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):h.attributes.color;o.push(f)}}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o)]).then(function(c){const d=c[0],l=c[1],f=c[2];return r&&(h.morphAttributes.position=d),n&&(h.morphAttributes.normal=l),s&&(h.morphAttributes.color=f),h.morphTargetsRelative=!0,h})}function De(h,t){if(h.updateMorphTargets(),t.weights!==void 0)for(let e=0,r=t.weights.length;e<r;e++)h.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(h.morphTargetInfluences.length===e.length){h.morphTargetDictionary={};for(let r=0,n=e.length;r<n;r++)h.morphTargetDictionary[e[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Fe(h){let t;const e=h.extensions&&h.extensions[A.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+z(e.attributes):t=h.indices+":"+z(h.attributes)+":"+h.mode,h.targets!==void 0)for(let r=0,n=h.targets.length;r<n;r++)t+=":"+z(h.targets[r]);return t}function z(h){let t="";const e=Object.keys(h).sort();for(let r=0,n=e.length;r<n;r++)t+=e[r]+":"+h[e[r]]+";";return t}function W(h){switch(h){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Pe(h){return h.search(/\.jpe?g($|\?)/i)>0||h.search(/^data\:image\/jpeg/)===0?"image/jpeg":h.search(/\.webp($|\?)/i)>0||h.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const Ge=new u.Matrix4;class ke{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new ie,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,n=-1,s=!1,i=-1;if(typeof navigator!="undefined"){const a=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);n=r&&o?parseInt(o[1],10):-1,s=a.indexOf("Firefox")>-1,i=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap=="undefined"||r&&n<17||s&&i<98?this.textureLoader=new u.TextureLoader(this.options.manager):this.textureLoader=new u.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new u.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const r=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(i){return i._markDefs&&i._markDefs()}),Promise.all(this._invokeAll(function(i){return i.beforeRoot&&i.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(i){const a={scene:i[0][n.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:n.asset,parser:r,userData:{}};return D(s,a,n),N(a,n),Promise.all(r._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],r=this.json.meshes||[];for(let n=0,s=e.length;n<s;n++){const i=e[n].joints;for(let a=0,o=i.length;a<o;a++)t[i[a]].isBone=!0}for(let n=0,s=t.length;n<s;n++){const i=t[n];i.mesh!==void 0&&(this._addNodeRef(this.meshCache,i.mesh),i.skin!==void 0&&(r[i.mesh].isSkinnedMesh=!0)),i.camera!==void 0&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,r){if(t.refs[e]<=1)return r;const n=r.clone(),s=(i,a)=>{const o=this.associations.get(i);o!=null&&this.associations.set(a,o);for(const[c,d]of i.children.entries())s(d,a.children[c])};return s(r,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let r=0;r<e.length;r++){const n=t(e[r]);if(n)return n}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const r=[];for(let n=0;n<e.length;n++){const s=t(e[n]);s&&r.push(s)}return r}getDependency(t,e){const r=t+":"+e;let n=this.cache.get(r);if(!n){switch(t){case"scene":n=this.loadScene(e);break;case"node":n=this._invokeOne(function(s){return s.loadNode&&s.loadNode(e)});break;case"mesh":n=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(e)});break;case"accessor":n=this.loadAccessor(e);break;case"bufferView":n=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(e)});break;case"buffer":n=this.loadBuffer(e);break;case"material":n=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(e)});break;case"texture":n=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(e)});break;case"skin":n=this.loadSkin(e);break;case"animation":n=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(e)});break;case"camera":n=this.loadCamera(e);break;default:if(n=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(t,e)}),!n)throw new Error("Unknown type: "+t);break}this.cache.add(r,n)}return n}getDependencies(t){let e=this.cache.get(t);if(!e){const r=this,n=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(n.map(function(s,i){return r.getDependency(t,i)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],r=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[A.KHR_BINARY_GLTF].body);const n=this.options;return new Promise(function(s,i){r.load(u.LoaderUtils.resolveURL(e.uri,n.path),s,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(r){const n=e.byteLength||0,s=e.byteOffset||0;return r.slice(s,s+n)})}loadAccessor(t){const e=this,r=this.json,n=this.json.accessors[t];if(n.bufferView===void 0&&n.sparse===void 0){const i=V[n.type],a=G[n.componentType],o=n.normalized===!0,c=new a(n.count*i);return Promise.resolve(new u.BufferAttribute(c,i,o))}const s=[];return n.bufferView!==void 0?s.push(this.getDependency("bufferView",n.bufferView)):s.push(null),n.sparse!==void 0&&(s.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(s).then(function(i){const a=i[0],o=V[n.type],c=G[n.componentType],d=c.BYTES_PER_ELEMENT,l=d*o,f=n.byteOffset||0,p=n.bufferView!==void 0?r.bufferViews[n.bufferView].byteStride:void 0,m=n.normalized===!0;let R,g;if(p&&p!==l){const T=Math.floor(f/p),E="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+T+":"+n.count;let M=e.cache.get(E);M||(R=new c(a,T*p,n.count*p/d),M=new u.InterleavedBuffer(R,p/d),e.cache.add(E,M)),g=new u.InterleavedBufferAttribute(M,o,f%p/d,m)}else a===null?R=new c(n.count*o):R=new c(a,f,n.count*o),g=new u.BufferAttribute(R,o,m);if(n.sparse!==void 0){const T=V.SCALAR,E=G[n.sparse.indices.componentType],M=n.sparse.indices.byteOffset||0,x=n.sparse.values.byteOffset||0,w=new E(i[1],M,n.sparse.count*T),I=new c(i[2],x,n.sparse.count*o);a!==null&&(g=new u.BufferAttribute(g.array.slice(),g.itemSize,g.normalized));for(let _=0,k=w.length;_<k;_++){const C=w[_];if(g.setX(C,I[_*o]),o>=2&&g.setY(C,I[_*o+1]),o>=3&&g.setZ(C,I[_*o+2]),o>=4&&g.setW(C,I[_*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return g})}loadTexture(t){const e=this.json,r=this.options,s=e.textures[t].source,i=e.images[s];let a=this.textureLoader;if(i.uri){const o=r.manager.getHandler(i.uri);o!==null&&(a=o)}return this.loadTextureImage(t,s,a)}loadTextureImage(t,e,r){const n=this,s=this.json,i=s.textures[t],a=s.images[e],o=(a.uri||a.bufferView)+":"+i.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,r).then(function(d){d.flipY=!1,d.name=i.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(s.samplers||{})[i.sampler]||{};return d.magFilter=$[f.magFilter]||u.LinearFilter,d.minFilter=$[f.minFilter]||u.LinearMipmapLinearFilter,d.wrapS=ee[f.wrapS]||u.RepeatWrapping,d.wrapT=ee[f.wrapT]||u.RepeatWrapping,n.associations.set(d,{textures:t}),d}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(t,e){const r=this,n=this.json,s=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(l=>l.clone());const i=n.images[t],a=self.URL||self.webkitURL;let o=i.uri||"",c=!1;if(i.bufferView!==void 0)o=r.getDependency("bufferView",i.bufferView).then(function(l){c=!0;const f=new Blob([l],{type:i.mimeType});return o=a.createObjectURL(f),o});else if(i.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const d=Promise.resolve(o).then(function(l){return new Promise(function(f,p){let m=f;e.isImageBitmapLoader===!0&&(m=function(R){const g=new u.Texture(R);g.needsUpdate=!0,f(g)}),e.load(u.LoaderUtils.resolveURL(l,s.path),m,void 0,p)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),N(l,i),l.userData.mimeType=i.mimeType||Pe(i.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[t]=d,d}assignTexture(t,e,r,n){const s=this;return this.getDependency("texture",r.index).then(function(i){if(!i)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(i=i.clone(),i.channel=r.texCoord),s.extensions[A.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[A.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=s.associations.get(i);i=s.extensions[A.KHR_TEXTURE_TRANSFORM].extendTexture(i,a),s.associations.set(i,o)}}return n!==void 0&&(i.colorSpace=n),t[e]=i,i})}assignFinalMaterial(t){const e=t.geometry;let r=t.material;const n=e.attributes.tangent===void 0,s=e.attributes.color!==void 0,i=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+r.uuid;let o=this.cache.get(a);o||(o=new u.PointsMaterial,u.Material.prototype.copy.call(o,r),o.color.copy(r.color),o.map=r.map,o.sizeAttenuation=!1,this.cache.add(a,o)),r=o}else if(t.isLine){const a="LineBasicMaterial:"+r.uuid;let o=this.cache.get(a);o||(o=new u.LineBasicMaterial,u.Material.prototype.copy.call(o,r),o.color.copy(r.color),o.map=r.map,this.cache.add(a,o)),r=o}if(n||s||i){let a="ClonedMaterial:"+r.uuid+":";n&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),i&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=r.clone(),s&&(o.vertexColors=!0),i&&(o.flatShading=!0),n&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(r))),r=o}t.material=r}getMaterialType(){return u.MeshStandardMaterial}loadMaterial(t){const e=this,r=this.json,n=this.extensions,s=r.materials[t];let i;const a={},o=s.extensions||{},c=[];if(o[A.KHR_MATERIALS_UNLIT]){const l=n[A.KHR_MATERIALS_UNLIT];i=l.getMaterialType(),c.push(l.extendParams(a,s,e))}else{const l=s.pbrMetallicRoughness||{};if(a.color=new u.Color(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const f=l.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],u.LinearSRGBColorSpace),a.opacity=f[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,u.SRGBColorSpace)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),i=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(t)}),c.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(t,a)})))}s.doubleSided===!0&&(a.side=u.DoubleSide);const d=s.alphaMode||X.OPAQUE;if(d===X.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===X.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new u.Vector2(1,1),s.normalTexture.scale!==void 0)){const l=s.normalTexture.scale;a.normalScale.set(l,l)}if(s.occlusionTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&i!==u.MeshBasicMaterial){const l=s.emissiveFactor;a.emissive=new u.Color().setRGB(l[0],l[1],l[2],u.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&i!==u.MeshBasicMaterial&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,u.SRGBColorSpace)),Promise.all(c).then(function(){const l=new i(a);return s.name&&(l.name=s.name),N(l,s),e.associations.set(l,{materials:t}),s.extensions&&D(n,l,s),l})}createUniqueName(t){const e=u.PropertyBinding.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,r=this.extensions,n=this.primitiveCache;function s(a){return r[A.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return te(o,a,e)})}const i=[];for(let a=0,o=t.length;a<o;a++){const c=t[a],d=Fe(c),l=n[d];if(l)i.push(l.promise);else{let f;c.extensions&&c.extensions[A.KHR_DRACO_MESH_COMPRESSION]?f=s(c):f=te(new u.BufferGeometry,c,e),n[d]={primitive:c,promise:f},i.push(f)}}return Promise.all(i)}loadMesh(t){const e=this,r=this.json,n=this.extensions,s=r.meshes[t],i=s.primitives,a=[];for(let o=0,c=i.length;o<c;o++){const d=i[o].material===void 0?Ce(this.cache):this.getDependency("material",i[o].material);a.push(d)}return a.push(e.loadGeometries(i)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),d=o[o.length-1],l=[];for(let p=0,m=d.length;p<m;p++){const R=d[p],g=i[p];let T;const E=c[p];if(g.mode===S.TRIANGLES||g.mode===S.TRIANGLE_STRIP||g.mode===S.TRIANGLE_FAN||g.mode===void 0)T=s.isSkinnedMesh===!0?new u.SkinnedMesh(R,E):new u.Mesh(R,E),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),g.mode===S.TRIANGLE_STRIP?T.geometry=Z(T.geometry,u.TriangleStripDrawMode):g.mode===S.TRIANGLE_FAN&&(T.geometry=Z(T.geometry,u.TriangleFanDrawMode));else if(g.mode===S.LINES)T=new u.LineSegments(R,E);else if(g.mode===S.LINE_STRIP)T=new u.Line(R,E);else if(g.mode===S.LINE_LOOP)T=new u.LineLoop(R,E);else if(g.mode===S.POINTS)T=new u.Points(R,E);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+g.mode);Object.keys(T.geometry.morphAttributes).length>0&&De(T,s),T.name=e.createUniqueName(s.name||"mesh_"+t),N(T,s),g.extensions&&D(n,T,g),e.assignFinalMaterial(T),l.push(T)}for(let p=0,m=l.length;p<m;p++)e.associations.set(l[p],{meshes:t,primitives:p});if(l.length===1)return s.extensions&&D(n,l[0],s),l[0];const f=new u.Group;s.extensions&&D(n,f,s),e.associations.set(f,{meshes:t});for(let p=0,m=l.length;p<m;p++)f.add(l[p]);return f})}loadCamera(t){let e;const r=this.json.cameras[t],n=r[r.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return r.type==="perspective"?e=new u.PerspectiveCamera(u.MathUtils.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):r.type==="orthographic"&&(e=new u.OrthographicCamera(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),r.name&&(e.name=this.createUniqueName(r.name)),N(e,r),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],r=[];for(let n=0,s=e.joints.length;n<s;n++)r.push(this._loadNodeShallow(e.joints[n]));return e.inverseBindMatrices!==void 0?r.push(this.getDependency("accessor",e.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(n){const s=n.pop(),i=n,a=[],o=[];for(let c=0,d=i.length;c<d;c++){const l=i[c];if(l){a.push(l);const f=new u.Matrix4;s!==null&&f.fromArray(s.array,c*16),o.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new u.Skeleton(a,o)})}loadAnimation(t){const e=this.json,r=this,n=e.animations[t],s=n.name?n.name:"animation_"+t,i=[],a=[],o=[],c=[],d=[];for(let l=0,f=n.channels.length;l<f;l++){const p=n.channels[l],m=n.samplers[p.sampler],R=p.target,g=R.node,T=n.parameters!==void 0?n.parameters[m.input]:m.input,E=n.parameters!==void 0?n.parameters[m.output]:m.output;R.node!==void 0&&(i.push(this.getDependency("node",g)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",E)),c.push(m),d.push(R))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(d)]).then(function(l){const f=l[0],p=l[1],m=l[2],R=l[3],g=l[4],T=[];for(let E=0,M=f.length;E<M;E++){const x=f[E],w=p[E],I=m[E],_=R[E],k=g[E];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const C=r._createAnimationTracks(x,w,I,_,k);if(C)for(let j=0;j<C.length;j++)T.push(C[j])}return new u.AnimationClip(s,void 0,T)})}createNodeMesh(t){const e=this.json,r=this,n=e.nodes[t];return n.mesh===void 0?null:r.getDependency("mesh",n.mesh).then(function(s){const i=r._getNodeRef(r.meshCache,n.mesh,s);return n.weights!==void 0&&i.traverse(function(a){if(a.isMesh)for(let o=0,c=n.weights.length;o<c;o++)a.morphTargetInfluences[o]=n.weights[o]}),i})}loadNode(t){const e=this.json,r=this,n=e.nodes[t],s=r._loadNodeShallow(t),i=[],a=n.children||[];for(let c=0,d=a.length;c<d;c++)i.push(r.getDependency("node",a[c]));const o=n.skin===void 0?Promise.resolve(null):r.getDependency("skin",n.skin);return Promise.all([s,Promise.all(i),o]).then(function(c){const d=c[0],l=c[1],f=c[2];f!==null&&d.traverse(function(p){p.isSkinnedMesh&&p.bind(f,Ge)});for(let p=0,m=l.length;p<m;p++)d.add(l[p]);return d})}_loadNodeShallow(t){const e=this.json,r=this.extensions,n=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const s=e.nodes[t],i=s.name?n.createUniqueName(s.name):"",a=[],o=n._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(t)});return o&&a.push(o),s.camera!==void 0&&a.push(n.getDependency("camera",s.camera).then(function(c){return n._getNodeRef(n.cameraCache,s.camera,c)})),n._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(t)}).forEach(function(c){a.push(c)}),this.nodeCache[t]=Promise.all(a).then(function(c){let d;if(s.isBone===!0?d=new u.Bone:c.length>1?d=new u.Group:c.length===1?d=c[0]:d=new u.Object3D,d!==c[0])for(let l=0,f=c.length;l<f;l++)d.add(c[l]);if(s.name&&(d.userData.name=s.name,d.name=i),N(d,s),s.extensions&&D(r,d,s),s.matrix!==void 0){const l=new u.Matrix4;l.fromArray(s.matrix),d.applyMatrix4(l)}else s.translation!==void 0&&d.position.fromArray(s.translation),s.rotation!==void 0&&d.quaternion.fromArray(s.rotation),s.scale!==void 0&&d.scale.fromArray(s.scale);return n.associations.has(d)||n.associations.set(d,{}),n.associations.get(d).nodes=t,d}),this.nodeCache[t]}loadScene(t){const e=this.extensions,r=this.json.scenes[t],n=this,s=new u.Group;r.name&&(s.name=n.createUniqueName(r.name)),N(s,r),r.extensions&&D(e,s,r);const i=r.nodes||[],a=[];for(let o=0,c=i.length;o<c;o++)a.push(n.getDependency("node",i[o]));return Promise.all(a).then(function(o){for(let d=0,l=o.length;d<l;d++)s.add(o[d]);const c=d=>{const l=new Map;for(const[f,p]of n.associations)(f instanceof u.Material||f instanceof u.Texture)&&l.set(f,p);return d.traverse(f=>{const p=n.associations.get(f);p!=null&&l.set(f,p)}),l};return n.associations=c(s),s})}_createAnimationTracks(t,e,r,n,s){const i=[],a=t.name?t.name:t.uuid,o=[];O[s.path]===O.weights?t.traverse(function(f){f.morphTargetInfluences&&o.push(f.name?f.name:f.uuid)}):o.push(a);let c;switch(O[s.path]){case O.weights:c=u.NumberKeyframeTrack;break;case O.rotation:c=u.QuaternionKeyframeTrack;break;case O.position:case O.scale:c=u.VectorKeyframeTrack;break;default:switch(r.itemSize){case 1:c=u.NumberKeyframeTrack;break;case 2:case 3:default:c=u.VectorKeyframeTrack;break}break}const d=n.interpolation!==void 0?Ie[n.interpolation]:u.InterpolateLinear,l=this._getArrayFromAccessor(r);for(let f=0,p=o.length;f<p;f++){const m=new c(o[f]+"."+O[s.path],e.array,l,d);n.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(m),i.push(m)}return i}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const r=W(e.constructor),n=new Float32Array(e.length);for(let s=0,i=e.length;s<i;s++)n[s]=e[s]*r;e=n}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(r){const n=this instanceof u.QuaternionKeyframeTrack?Ne:se;return new n(this.times,this.values,this.getValueSize()/3,r)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Be(h,t,e){const r=t.attributes,n=new u.Box3;if(r.POSITION!==void 0){const a=e.json.accessors[r.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(n.set(new u.Vector3(o[0],o[1],o[2]),new u.Vector3(c[0],c[1],c[2])),a.normalized){const d=W(G[a.componentType]);n.min.multiplyScalar(d),n.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=t.targets;if(s!==void 0){const a=new u.Vector3,o=new u.Vector3;for(let c=0,d=s.length;c<d;c++){const l=s[c];if(l.POSITION!==void 0){const f=e.json.accessors[l.POSITION],p=f.min,m=f.max;if(p!==void 0&&m!==void 0){if(o.setX(Math.max(Math.abs(p[0]),Math.abs(m[0]))),o.setY(Math.max(Math.abs(p[1]),Math.abs(m[1]))),o.setZ(Math.max(Math.abs(p[2]),Math.abs(m[2]))),f.normalized){const R=W(G[f.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(a)}h.boundingBox=n;const i=new u.Sphere;n.getCenter(i.center),i.radius=n.min.distanceTo(n.max)/2,h.boundingSphere=i}function te(h,t,e){const r=t.attributes,n=[];function s(i,a){return e.getDependency("accessor",i).then(function(o){h.setAttribute(a,o)})}for(const i in r){const a=q[i]||i.toLowerCase();a in h.attributes||n.push(s(r[i],a))}if(t.indices!==void 0&&!h.index){const i=e.getDependency("accessor",t.indices).then(function(a){h.setIndex(a)});n.push(i)}return u.ColorManagement.workingColorSpace!==u.LinearSRGBColorSpace&&"COLOR_0"in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${u.ColorManagement.workingColorSpace}" not supported.`),N(h,t),Be(h,t,e),Promise.all(n).then(function(){return t.targets!==void 0?Oe(h,t.targets,e):h})}var F;class He{constructor(){B(this,F,new re)}get gltfLoader(){return y(this,F)}setLoaders(t){if(t!=null&&t.draco&&b.dracoLoader){const e=typeof t.draco=="boolean"?`${L.en3.CDNVersion}/examples/jsm/libs/draco/gltf/`:t.draco;b.dracoLoader.setDecoderPath(e),y(this,F).setDRACOLoader(b.dracoLoader)}if(t!=null&&t.ktx2&&b.ktx2Loader){const e=typeof t.ktx2=="boolean"?`${L.en3.CDNVersion}/examples/jsm/libs/basis/`:t.ktx2;b.ktx2Loader.setTranscoderPath(e),y(this,F).setKTX2Loader(b.ktx2Loader.detectSupport(L.en3.webglRenderer))}t!=null&&t.meshopt&&b.meshoptDecoder&&y(this,F).setMeshoptDecoder(b.meshoptDecoder)}load(...t){const[e,r,...n]=t;if(L.en3.cacheAssets&&L.en3Cache.has(e)){const s=L.en3Cache.get(e).data;r(s)}else this.gltfLoader.load(e,s=>{L.en3.cacheAssets&&L.en3Cache.set(e,{data:s,dispose:()=>{s.cameras.forEach(i=>L.dispose(i)),s.scenes.forEach(i=>{L.dispose(i)})}}),r(s)},...n)}}F=new WeakMap;var P,U,v;class Ue{constructor(){B(this,P,new u.TextureLoader);B(this,U,void 0);B(this,v,void 0);K(this,U,y(this,P).load.bind(y(this,P))),K(this,v,y(this,P).loadAsync.bind(y(this,P)))}load(...t){const[e,r,...n]=t;if(L.en3.cacheAssets&&L.en3Cache.has(e)){const s=L.en3Cache.get(e);return r==null||r(s.data),s.data}return y(this,U).call(this,e,s=>{L.en3.cacheAssets&&L.en3Cache.set(e,{data:s,dispose:()=>s.dispose()}),r==null||r(s)},...n)}loadSync(...t){return Q(this,null,function*(){const[e,...r]=t;if(L.en3.cacheAssets&&L.en3Cache.has(e))return L.en3Cache.get(e).data;const n=yield y(this,v).call(this,e,...r);return L.en3.cacheAssets&&L.en3Cache.set(e,{data:n,dispose:()=>n.dispose()}),n})}}P=new WeakMap,U=new WeakMap,v=new WeakMap;const b={gltfLoader:null,textureLoader:null,dracoLoader:null,ktx2Loader:null,meshoptDecoder:null};exports.En3GLTFLoader=He;exports.En3TextureLoader=Ue;exports.loaders=b;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
|
2
|
-
import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
|
|
3
|
-
import { MeshoptDecoder } from '../libs/MeshoptDecoder';
|
|
4
|
-
import { En3GLTFLoader } from './En3GLTFLoader';
|
|
5
|
-
import { En3TextureLoader } from './En3TextureLoader';
|
|
6
|
-
|
|
7
|
-
export declare const loaders: {
|
|
8
|
-
gltfLoader: En3GLTFLoader;
|
|
9
|
-
textureLoader: En3TextureLoader;
|
|
10
|
-
dracoLoader: DRACOLoader;
|
|
11
|
-
ktx2Loader: KTX2Loader;
|
|
12
|
-
meshoptDecoder: ReturnType<typeof MeshoptDecoder>;
|
|
13
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Material } from 'three';
|
|
2
|
-
|
|
3
|
-
export type En3VertexChunk = 'begin_vertex' | 'beginnormal_vertex' | 'clipping_planes_pars_vertex' | 'clipping_planes_vertex' | 'color_pars_vertex' | 'color_vertex' | 'default_vertex' | 'defaultnormal_vertex' | 'displacementmap_pars_vertex' | 'displacementmap_vertex' | 'envmap_pars_vertex' | 'envmap_vertex' | 'fog_pars_vertex' | 'fog_vertex' | 'lights_pars_begin' | 'logdepthbuf_pars_vertex' | 'logdepthbuf_vertex' | 'morphcolor_vertex' | 'morphnormal_vertex' | 'morphtarget_pars_vertex' | 'morphtarget_vertex' | 'normal_pars_vertex' | 'normal_vertex' | 'project_vertex' | 'shadowmap_pars_vertex' | 'shadowmap_vertex' | 'skinbase_vertex' | 'skinning_pars_vertex' | 'skinning_vertex' | 'skinnormal_vertex' | 'uv_pars_vertex' | 'uv_vertex' | 'worldpos_vertex';
|
|
4
|
-
export type En3FragmentChunk = 'alphahash_fragment' | 'alphahash_pars_fragment' | 'alphamap_fragment' | 'alphamap_pars_fragment' | 'alphatest_fragment' | 'alphatest_pars_fragment' | 'aomap_fragment' | 'aomap_pars_fragment' | 'bumpmap_pars_fragment' | 'clearcoat_normal_fragment_begin' | 'clearcoat_normal_fragment_maps' | 'clearcoat_pars_fragment' | 'clipping_planes_fragment' | 'clipping_planes_pars_fragment' | 'color_fragment' | 'color_pars_fragment' | 'colorspace_fragment' | 'colorspace_pars_fragment' | 'cube_uv_reflection_fragment' | 'default_fragment' | 'dithering_fragment' | 'dithering_pars_fragment' | 'emissivemap_fragment' | 'emissivemap_pars_fragment' | 'envmap_common_pars_fragment' | 'envmap_fragment' | 'envmap_pars_fragment' | 'envmap_physical_pars_fragment' | 'fog_fragment' | 'fog_pars_fragment' | 'gradientmap_pars_fragment' | 'iridescence_fragment' | 'iridescence_pars_fragment' | 'lightmap_fragment' | 'lightmap_pars_fragment' | 'lights_fragment_begin' | 'lights_fragment_end' | 'lights_fragment_maps' | 'lights_lambert_fragment' | 'lights_lambert_pars_fragment' | 'lights_phong_fragment' | 'lights_phong_pars_fragment' | 'lights_physical_fragment' | 'lights_physical_pars_fragment' | 'lights_toon_fragment' | 'lights_toon_pars_fragment' | 'logdepthbuf_fragment' | 'logdepthbuf_pars_fragment' | 'map_fragment' | 'map_pars_fragment' | 'map_particle_fragment' | 'map_particle_pars_fragment' | 'metalnessmap_fragment' | 'metalnessmap_pars_fragment' | 'normal_fragment_begin' | 'normal_fragment_maps' | 'normal_pars_fragment' | 'normalmap_pars_fragment' | 'opaque_fragment' | 'premultiplied_alpha_fragment' | 'roughnessmap_fragment' | 'roughnessmap_pars_fragment' | 'shadowmap_pars_fragment' | 'shadowmask_pars_fragment' | 'specularmap_fragment' | 'specularmap_pars_fragment' | 'tonemapping_fragment' | 'tonemapping_pars_fragment' | 'transmission_fragment' | 'transmission_pars_fragment' | 'uv_pars_fragment';
|
|
5
|
-
export type En3ModifiedMaterialUniforms = {
|
|
6
|
-
[key: string]: {
|
|
7
|
-
value: any;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export interface En3ModifiedMaterialParameters<TMaterial extends Material, Uniforms extends En3ModifiedMaterialUniforms = {}> {
|
|
11
|
-
material: TMaterial;
|
|
12
|
-
uniforms?: Uniforms;
|
|
13
|
-
vertextDeclarations?: string;
|
|
14
|
-
fragmentDeclarations?: string;
|
|
15
|
-
vertexChunk?: {
|
|
16
|
-
update?: En3VertexChunk;
|
|
17
|
-
replace?: En3VertexChunk;
|
|
18
|
-
content: string;
|
|
19
|
-
};
|
|
20
|
-
fragmentChunk?: {
|
|
21
|
-
update?: En3FragmentChunk;
|
|
22
|
-
replace?: En3FragmentChunk;
|
|
23
|
-
content: string;
|
|
24
|
-
};
|
|
25
|
-
log?: boolean;
|
|
26
|
-
onReady?: (modifiedMaterial: En3ModifiedMaterial<TMaterial, Uniforms>) => Function | void;
|
|
27
|
-
}
|
|
28
|
-
export declare class En3ModifiedMaterial<TMaterial extends Material, Uniforms extends En3ModifiedMaterialUniforms = {}> {
|
|
29
|
-
#private;
|
|
30
|
-
constructor(parameters: En3ModifiedMaterialParameters<TMaterial, Uniforms>);
|
|
31
|
-
get material(): TMaterial;
|
|
32
|
-
get uniforms(): Uniforms;
|
|
33
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { SourceManagerParameters, SourceManager } from '../../source';
|
|
2
|
-
import { Store } from '../../store';
|
|
3
|
-
import { EventDispatcher, Loader } from 'three';
|
|
4
|
-
|
|
5
|
-
export interface En3SourceManagerLoader<T> {
|
|
6
|
-
load: Loader<T>['load'];
|
|
7
|
-
}
|
|
8
|
-
export interface En3SourceManagerFullParameters<T> extends SourceManagerParameters {
|
|
9
|
-
keepSourceParameters?: boolean;
|
|
10
|
-
loader: En3SourceManagerLoader<T>;
|
|
11
|
-
lazy?: boolean;
|
|
12
|
-
consumer: EventDispatcher;
|
|
13
|
-
}
|
|
14
|
-
export type En3SourceManagerParameters<T> = Omit<En3SourceManagerFullParameters<T>, 'loader' | 'element' | 'consumer'>;
|
|
15
|
-
export type En3SourceManagerLoadingState = 'start' | 'complete' | 'error' | undefined;
|
|
16
|
-
export declare class En3SourceManager<T> extends SourceManager {
|
|
17
|
-
#private;
|
|
18
|
-
constructor(parameters: En3SourceManagerFullParameters<T>);
|
|
19
|
-
/**
|
|
20
|
-
* Resource store.
|
|
21
|
-
*/
|
|
22
|
-
get data(): Store<T | null | undefined, keyof import('../../store').StoreManagers>;
|
|
23
|
-
/**
|
|
24
|
-
* Loading store.
|
|
25
|
-
*/
|
|
26
|
-
get loading(): Store<En3SourceManagerLoadingState, keyof import('../../store').StoreManagers>;
|
|
27
|
-
/**
|
|
28
|
-
* Calling this method will start loading the resource.
|
|
29
|
-
*/
|
|
30
|
-
lazyLoad(): void;
|
|
31
|
-
processData?(data: T): T;
|
|
32
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";var D=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);var L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),y=require("../../SourceManager-D6D2LVKf.cjs"),b=require("../../Store-Cr3VaD9G.cjs");var u,l,v,k;class z{constructor(e){s(this,v);s(this,u,void 0);s(this,l,void 0);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
|
|
2
|
-
${e.vertextDeclarations}
|
|
3
|
-
${n.vertexShader}
|
|
4
|
-
`),e.fragmentDeclarations&&(n.fragmentShader=`
|
|
5
|
-
${e.fragmentDeclarations}
|
|
6
|
-
${n.fragmentShader}
|
|
7
|
-
`),L(this,v,k).call(this,n,"vertex",e),L(this,v,k).call(this,n,"fragment",e),t=(d=e.onReady)==null?void 0:d.call(e,this),e.log&&(console.log("VERTEX SHADER: ",n.vertexShader),console.log("FRAGMENT SHADER: ",n.fragmentShader))}}get material(){return i(this,u)}get uniforms(){return i(this,l)}}u=new WeakMap,l=new WeakMap,v=new WeakSet,k=function(e,t,r){const n=t==="vertex"?"vertexChunk":"fragmentChunk",d=t==="vertex"?"vertexShader":"fragmentShader";r[n]&&(r[n].replace?e[d]=e[d].replace(`#include <${r[n].replace}>`,r[n].content):r[n].update&&(e[d]=e[d].replace(`#include <${r[n].update}>`,`
|
|
8
|
-
#include <${r[n].update}>
|
|
9
|
-
${r[n].content}
|
|
10
|
-
`)))};var f,a,g,x,E,h,S,M;class T extends y.SourceManager{constructor(t){super(t);s(this,f,new b.Store(null));s(this,a,new b.Store(void 0));s(this,g,void 0);s(this,x,void 0);s(this,E,void 0);s(this,h,void 0);s(this,S,!1);s(this,M,()=>{if(!(i(this,h)&&!i(this,S))&&(this.current!==this.previous&&(i(this,f).current=null),this.current)){const t=i(this,E)?this.current.url:this.current.name+this.current.extension;i(this,h)||$.loading.setTotal(t,1),i(this,a).current="start",i(this,x).load(t,r=>{var n;i(this,f).current=((n=this.processData)==null?void 0:n.call(this,r))||r,i(this,a).current="complete",i(this,h)||$.loading.setLoaded(t,1)},void 0,()=>{i(this,h)||(i(this,a).current="error",$.loading.setError(t,t))})}});c(this,g,t.consumer),c(this,x,t.loader),c(this,E,t.keepSourceParameters||!1),c(this,h,t.lazy||!1),this.subscribe(i(this,M)),i(this,g).addEventListener("added",()=>{this.connect()}),i(this,g).addEventListener("removed",()=>{this.disconnect()})}get data(){return i(this,f)}get loading(){return i(this,a)}lazyLoad(){i(this,S)||(c(this,S,!0),i(this,M).call(this))}}f=new WeakMap,a=new WeakMap,g=new WeakMap,x=new WeakMap,E=new WeakMap,h=new WeakMap,S=new WeakMap,M=new WeakMap;exports.En3ModifiedMaterial=z;exports.En3SourceManager=T;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { En3ModifiedMaterial, type En3ModifiedMaterialParameters, type En3ModifiedMaterialUniforms, type En3FragmentChunk, type En3VertexChunk, } from './En3ModifiedMaterial';
|
|
2
|
-
export { En3SourceManager, type En3SourceManagerLoader, type En3SourceManagerFullParameters, type En3SourceManagerParameters, type En3SourceManagerLoadingState, } from './En3SourceManager';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LayoutBox } from '../../layout-box';
|
|
2
|
-
import { ElementOrSelector } from '../../utils';
|
|
3
|
-
import { Plane } from 'three';
|
|
4
|
-
|
|
5
|
-
export interface En3ClipOptions {
|
|
6
|
-
viewName?: string;
|
|
7
|
-
scale?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare class En3Clip {
|
|
10
|
-
#private;
|
|
11
|
-
constructor(elementOrSelector: ElementOrSelector<HTMLElement>, options?: En3ClipOptions);
|
|
12
|
-
get planes(): Plane[];
|
|
13
|
-
get layoutBox(): LayoutBox;
|
|
14
|
-
destroy(): void;
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Group } from 'three';
|
|
2
|
-
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
3
|
-
import { En3SourceManager, En3SourceManagerParameters } from '../misc/En3SourceManager';
|
|
4
|
-
import { En3SourceConsumer } from './En3SourceConsumer';
|
|
5
|
-
|
|
6
|
-
export declare class En3GLTF extends Group implements En3SourceConsumer<GLTF> {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(parameters: En3SourceManagerParameters<GLTF>);
|
|
9
|
-
get sourceManager(): En3SourceManager<GLTF>;
|
|
10
|
-
destroy(): void;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Texture } from 'three';
|
|
2
|
-
import { En3ImageLike, En3ImageLikeMaterial, En3ImageLikeParameters } from './En3ImageLike';
|
|
3
|
-
|
|
4
|
-
export interface En3ImageParameters<TMaterial extends En3ImageLikeMaterial<Texture>> extends Omit<En3ImageLikeParameters<Texture, TMaterial>, 'loader'> {
|
|
5
|
-
}
|
|
6
|
-
export declare class En3Image<TMaterial extends En3ImageLikeMaterial<Texture>> extends En3ImageLike<Texture, TMaterial> {
|
|
7
|
-
constructor(parameters: En3ImageParameters<TMaterial>);
|
|
8
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BufferGeometry, Material, Mesh, Texture } from 'three';
|
|
2
|
-
import { En3SourceManager, En3SourceManagerLoader, En3SourceManagerParameters } from '../misc/En3SourceManager';
|
|
3
|
-
import { En3SourceConsumer } from './En3SourceConsumer';
|
|
4
|
-
|
|
5
|
-
export type En3ImageLikeMaterial<TTexture extends Texture> = Material & {
|
|
6
|
-
map: TTexture | null;
|
|
7
|
-
};
|
|
8
|
-
export type En3ImageLikeFit = 'cover' | 'contain';
|
|
9
|
-
export interface En3ImageLikeParameters<TTexture extends Texture, TMaterial extends En3ImageLikeMaterial<TTexture>> extends En3SourceManagerParameters<TTexture> {
|
|
10
|
-
width?: number;
|
|
11
|
-
height?: number;
|
|
12
|
-
round?: number;
|
|
13
|
-
segments?: number;
|
|
14
|
-
material?: TMaterial;
|
|
15
|
-
fit?: En3ImageLikeFit;
|
|
16
|
-
loader: En3SourceManagerLoader<TTexture>;
|
|
17
|
-
}
|
|
18
|
-
export declare class En3ImageLike<TTexture extends Texture, TMaterial extends En3ImageLikeMaterial<TTexture>> extends Mesh<BufferGeometry, TMaterial> implements En3SourceConsumer<TTexture> {
|
|
19
|
-
#private;
|
|
20
|
-
constructor(parameters: En3ImageLikeParameters<TTexture, TMaterial>);
|
|
21
|
-
get sourceManager(): En3SourceManager<TTexture>;
|
|
22
|
-
destroy(): void;
|
|
23
|
-
updateTexture(): void;
|
|
24
|
-
protected onCoverResize(texture: TTexture): void;
|
|
25
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { VideoTexture } from 'three';
|
|
2
|
-
import { En3ImageLike, En3ImageLikeMaterial, En3ImageLikeParameters } from './En3ImageLike';
|
|
3
|
-
|
|
4
|
-
export interface En3VideoParameters<TMaterial extends En3ImageLikeMaterial<VideoTexture>> extends Omit<En3ImageLikeParameters<VideoTexture, TMaterial>, 'loader'> {
|
|
5
|
-
autoplay?: boolean;
|
|
6
|
-
muted?: boolean;
|
|
7
|
-
loop?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare class En3Video<TMaterial extends En3ImageLikeMaterial<VideoTexture>> extends En3ImageLike<VideoTexture, TMaterial> {
|
|
10
|
-
#private;
|
|
11
|
-
constructor(parameters: En3VideoParameters<TMaterial>);
|
|
12
|
-
protected onCoverResize(texture: VideoTexture): void;
|
|
13
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Texture, Vector2, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { ShaderPass } from './ShaderPass';
|
|
3
|
-
|
|
4
|
-
export interface AdvectionParameters {
|
|
5
|
-
cellScale: Vector2;
|
|
6
|
-
fboSize: Vector2;
|
|
7
|
-
dt: number;
|
|
8
|
-
src: WebGLRenderTarget<Texture>;
|
|
9
|
-
dst: WebGLRenderTarget<Texture>;
|
|
10
|
-
BFECC: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface AdvectionUpdateParameters {
|
|
13
|
-
dt: number;
|
|
14
|
-
isBounce: boolean;
|
|
15
|
-
BFECC: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface AdvectionUniforms {
|
|
18
|
-
boundarySpace: Vector2;
|
|
19
|
-
px: Vector2;
|
|
20
|
-
fboSize: Vector2;
|
|
21
|
-
velocity: Texture;
|
|
22
|
-
dt: number;
|
|
23
|
-
isBFECC: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare class Advection extends ShaderPass<AdvectionUniforms> {
|
|
26
|
-
#private;
|
|
27
|
-
constructor(parameters: AdvectionParameters);
|
|
28
|
-
update(parameters: AdvectionUpdateParameters): void;
|
|
29
|
-
protected init(): void;
|
|
30
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Texture, Vector2, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { ShaderPass } from './ShaderPass';
|
|
3
|
-
|
|
4
|
-
export interface DivergenceParameters {
|
|
5
|
-
boundarySpace: Vector2;
|
|
6
|
-
src: WebGLRenderTarget<Texture>;
|
|
7
|
-
cellScale: Vector2;
|
|
8
|
-
dt: number;
|
|
9
|
-
dst: WebGLRenderTarget<Texture>;
|
|
10
|
-
}
|
|
11
|
-
export interface DivergenceUpdateParameters {
|
|
12
|
-
vel: WebGLRenderTarget<Texture>;
|
|
13
|
-
}
|
|
14
|
-
export interface DivergenceUniforms {
|
|
15
|
-
boundarySpace: Vector2;
|
|
16
|
-
velocity: Texture;
|
|
17
|
-
px: Vector2;
|
|
18
|
-
dt: number;
|
|
19
|
-
}
|
|
20
|
-
export declare class Divergence extends ShaderPass<DivergenceUniforms> {
|
|
21
|
-
constructor(parameters: DivergenceParameters);
|
|
22
|
-
update(parameters: DivergenceUpdateParameters): void;
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Mesh, PlaneGeometry, RawShaderMaterial } from 'three';
|
|
2
|
-
import { Store } from '../../../store';
|
|
3
|
-
|
|
4
|
-
export declare class En3Fluid extends Mesh<PlaneGeometry, RawShaderMaterial> {
|
|
5
|
-
#private;
|
|
6
|
-
colorTweenDuration: number;
|
|
7
|
-
constructor();
|
|
8
|
-
get backgroundColor(): Store<string, keyof import('../../../store').StoreManagers>;
|
|
9
|
-
get backgroundMixThreshold(): Store<number, keyof import('../../../store').StoreManagers>;
|
|
10
|
-
get backgroundOpacity(): Store<number, keyof import('../../../store').StoreManagers>;
|
|
11
|
-
get fluidColor(): Store<string, keyof import('../../../store').StoreManagers>;
|
|
12
|
-
get fluidOpacity(): Store<number, keyof import('../../../store').StoreManagers>;
|
|
13
|
-
resize(): void;
|
|
14
|
-
update(): void;
|
|
15
|
-
dispose(): void;
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { En3Fluid } from './En3Fluid';
|
|
2
|
-
|
|
3
|
-
export declare class En3FluidElement extends HTMLElement {
|
|
4
|
-
#private;
|
|
5
|
-
get fluid(): En3Fluid;
|
|
6
|
-
protected connectedCallback(): void;
|
|
7
|
-
protected disconnectedCallback(): void;
|
|
8
|
-
}
|
|
9
|
-
declare global {
|
|
10
|
-
interface HTMLElementTagNameMap {
|
|
11
|
-
'e-fluid': En3FluidElement;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
declare class En3FluidPointer {
|
|
3
|
-
#private;
|
|
4
|
-
disabled: boolean;
|
|
5
|
-
init(): void;
|
|
6
|
-
dispose(): void;
|
|
7
|
-
get coords(): THREE.Vector2;
|
|
8
|
-
get diff(): THREE.Vector2;
|
|
9
|
-
updateCoords(x?: number, y?: number): void;
|
|
10
|
-
update(): void;
|
|
11
|
-
}
|
|
12
|
-
export declare const en3FluidPointer: En3FluidPointer;
|
|
13
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Texture, Vector2, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { ShaderPass } from './ShaderPass';
|
|
3
|
-
|
|
4
|
-
export interface ExternalForceParameters {
|
|
5
|
-
cellScale: Vector2;
|
|
6
|
-
pointerSize: number;
|
|
7
|
-
dst: WebGLRenderTarget<Texture>;
|
|
8
|
-
}
|
|
9
|
-
export interface ExternalForceUpdateParameters {
|
|
10
|
-
cellScale: Vector2;
|
|
11
|
-
pointerForce: number;
|
|
12
|
-
pointerSize: number;
|
|
13
|
-
}
|
|
14
|
-
export declare class ExternalForce extends ShaderPass {
|
|
15
|
-
#private;
|
|
16
|
-
constructor(parameters: ExternalForceParameters);
|
|
17
|
-
update(parameters: ExternalForceUpdateParameters): void;
|
|
18
|
-
protected init(parameters: ExternalForceParameters): void;
|
|
19
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Texture, Vector2, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { ShaderPass } from './ShaderPass';
|
|
3
|
-
|
|
4
|
-
export interface PoissonParameters {
|
|
5
|
-
boundarySpace: Vector2;
|
|
6
|
-
dst: WebGLRenderTarget<Texture>;
|
|
7
|
-
dst_: WebGLRenderTarget<Texture>;
|
|
8
|
-
src: WebGLRenderTarget<Texture>;
|
|
9
|
-
cellScale: Vector2;
|
|
10
|
-
}
|
|
11
|
-
export interface PoissonUpdateParameters {
|
|
12
|
-
iterations: number;
|
|
13
|
-
}
|
|
14
|
-
export interface PoissonUniforms {
|
|
15
|
-
boundarySpace: Vector2;
|
|
16
|
-
pressure: Texture;
|
|
17
|
-
divergence: Texture;
|
|
18
|
-
px: Vector2;
|
|
19
|
-
}
|
|
20
|
-
export declare class Poisson extends ShaderPass<PoissonUniforms> {
|
|
21
|
-
#private;
|
|
22
|
-
constructor(parameters: PoissonParameters);
|
|
23
|
-
update(parameters: PoissonUpdateParameters): WebGLRenderTarget<Texture>;
|
|
24
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Texture, Vector2, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { ShaderPass } from './ShaderPass';
|
|
3
|
-
|
|
4
|
-
export interface PressureParameters {
|
|
5
|
-
boundarySpace: Vector2;
|
|
6
|
-
srcP: WebGLRenderTarget<Texture>;
|
|
7
|
-
srcV: WebGLRenderTarget<Texture>;
|
|
8
|
-
dst: WebGLRenderTarget<Texture>;
|
|
9
|
-
cellScale: Vector2;
|
|
10
|
-
dt: number;
|
|
11
|
-
}
|
|
12
|
-
export interface PressureUpdateParameters {
|
|
13
|
-
vel: WebGLRenderTarget<Texture>;
|
|
14
|
-
pressure: WebGLRenderTarget<Texture>;
|
|
15
|
-
}
|
|
16
|
-
export interface PressureUniforms {
|
|
17
|
-
boundarySpace: Vector2;
|
|
18
|
-
pressure: Texture;
|
|
19
|
-
velocity: Texture;
|
|
20
|
-
px: Vector2;
|
|
21
|
-
dt: number;
|
|
22
|
-
}
|
|
23
|
-
export declare class Pressure extends ShaderPass<PressureUniforms> {
|
|
24
|
-
constructor(parameters: PressureParameters);
|
|
25
|
-
update(parameters: PressureUpdateParameters): void;
|
|
26
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Camera, Scene, ShaderMaterialParameters, Texture, WebGLRenderTarget } from 'three';
|
|
2
|
-
|
|
3
|
-
export interface ShaderPassParameters<Uniforms extends ShaderPassDefaultUniforms = ShaderPassDefaultUniforms> {
|
|
4
|
-
material?: Omit<ShaderMaterialParameters, 'uniforms'> & {
|
|
5
|
-
uniforms?: Uniforms;
|
|
6
|
-
};
|
|
7
|
-
output: WebGLRenderTarget<Texture>;
|
|
8
|
-
}
|
|
9
|
-
export type ShaderPassDefaultUniforms = {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
|
-
export declare class ShaderPass<Uniforms extends ShaderPassDefaultUniforms = ShaderPassDefaultUniforms> {
|
|
13
|
-
#private;
|
|
14
|
-
output: WebGLRenderTarget<Texture>;
|
|
15
|
-
constructor(parameters: ShaderPassParameters<Uniforms>);
|
|
16
|
-
get scene(): Scene;
|
|
17
|
-
get camera(): Camera;
|
|
18
|
-
get uniforms(): { [K in keyof Uniforms]: {
|
|
19
|
-
value: Uniforms[K];
|
|
20
|
-
}; };
|
|
21
|
-
update(..._args: any[]): void;
|
|
22
|
-
dispose(): void;
|
|
23
|
-
protected init(..._args: any[]): void;
|
|
24
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Store } from '../../../store';
|
|
2
|
-
import { WebGLRenderTarget } from 'three';
|
|
3
|
-
|
|
4
|
-
export interface SimulationFBOS {
|
|
5
|
-
vel0: WebGLRenderTarget;
|
|
6
|
-
vel1: WebGLRenderTarget;
|
|
7
|
-
velViscous0: WebGLRenderTarget;
|
|
8
|
-
velViscous1: WebGLRenderTarget;
|
|
9
|
-
div: WebGLRenderTarget;
|
|
10
|
-
pressure0: WebGLRenderTarget;
|
|
11
|
-
pressure1: WebGLRenderTarget;
|
|
12
|
-
}
|
|
13
|
-
export declare class Simulation {
|
|
14
|
-
#private;
|
|
15
|
-
constructor();
|
|
16
|
-
get parameters(): {
|
|
17
|
-
isViscous: Store<boolean, keyof import('../../../store').StoreManagers>;
|
|
18
|
-
viscous: Store<number, keyof import('../../../store').StoreManagers>;
|
|
19
|
-
iterationsViscous: Store<number, keyof import('../../../store').StoreManagers>;
|
|
20
|
-
pointerForce: Store<number, keyof import('../../../store').StoreManagers>;
|
|
21
|
-
pointerSize: Store<number, keyof import('../../../store').StoreManagers>;
|
|
22
|
-
dt: Store<number, keyof import('../../../store').StoreManagers>;
|
|
23
|
-
iterationsPoisson: Store<number, keyof import('../../../store').StoreManagers>;
|
|
24
|
-
resolution: Store<number, keyof import('../../../store').StoreManagers>;
|
|
25
|
-
isBounce: Store<boolean, keyof import('../../../store').StoreManagers>;
|
|
26
|
-
BFECC: Store<boolean, keyof import('../../../store').StoreManagers>;
|
|
27
|
-
};
|
|
28
|
-
get fbos(): SimulationFBOS;
|
|
29
|
-
resize(): void;
|
|
30
|
-
update(): void;
|
|
31
|
-
dispose(): void;
|
|
32
|
-
protected init(): void;
|
|
33
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ShaderPass } from './ShaderPass';
|
|
2
|
-
import { Texture, Vector2, WebGLRenderTarget } from 'three';
|
|
3
|
-
|
|
4
|
-
export interface ViscousParameters {
|
|
5
|
-
boundarySpace: Vector2;
|
|
6
|
-
src: WebGLRenderTarget<Texture>;
|
|
7
|
-
dst_: WebGLRenderTarget<Texture>;
|
|
8
|
-
viscous: number;
|
|
9
|
-
cellScale: Vector2;
|
|
10
|
-
dt: number;
|
|
11
|
-
dst: WebGLRenderTarget<Texture>;
|
|
12
|
-
}
|
|
13
|
-
export interface ViscousUpdateParameters {
|
|
14
|
-
viscous: number;
|
|
15
|
-
iterations: number;
|
|
16
|
-
dt: number;
|
|
17
|
-
}
|
|
18
|
-
export interface ViscousUniforms {
|
|
19
|
-
boundarySpace: Vector2;
|
|
20
|
-
velocity: Texture;
|
|
21
|
-
velocity_new: Texture;
|
|
22
|
-
v: number;
|
|
23
|
-
px: Vector2;
|
|
24
|
-
dt: number;
|
|
25
|
-
}
|
|
26
|
-
export declare class Viscous extends ShaderPass<ViscousUniforms> {
|
|
27
|
-
#private;
|
|
28
|
-
constructor(parameters: ViscousParameters);
|
|
29
|
-
update(parameters: ViscousUpdateParameters): WebGLRenderTarget<Texture>;
|
|
30
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { En3Fluid, En3FluidElement, en3FluidPointer } from './fluid';
|
|
2
|
-
export { En3Clip, type En3ClipOptions } from './En3Clip';
|
|
3
|
-
export { En3ClipHelpers } from './En3ClipHelpers';
|
|
4
|
-
export { En3GLTF } from './En3GLTF';
|
|
5
|
-
export { En3Image, type En3ImageParameters } from './En3Image';
|
|
6
|
-
export { En3ImageLike, type En3ImageLikeParameters, type En3ImageLikeMaterial, type En3ImageLikeFit, } from './En3ImageLike';
|
|
7
|
-
export { En3Video, type En3VideoParameters } from './En3Video';
|