gdcore-tools 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GDevelop/ExtLibs/7za.exe +0 -0
- package/GDevelop/ExtLibs/curl.exe +0 -0
- package/GDevelop/scripts/libgettextlib-0-17.dll +0 -0
- package/GDevelop/scripts/libgettextsrc-0-17.dll +0 -0
- package/LICENSE +1 -1
- package/dist/Runtime/AsyncTasksManager.js +5 -0
- package/dist/Runtime/AsyncTasksManager.js.map +7 -0
- package/dist/Runtime/Cordova/config.xml +44 -0
- package/dist/Runtime/Cordova/package.json +22 -0
- package/dist/Runtime/Cordova/www/index.html +45 -0
- package/dist/Runtime/CustomRuntimeObject.js +2 -0
- package/dist/Runtime/CustomRuntimeObject.js.map +7 -0
- package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js +2 -0
- package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js.map +7 -0
- package/dist/Runtime/Electron/main.js +65 -0
- package/dist/Runtime/Electron/package.json +26 -0
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js +2 -0
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js.map +7 -0
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js +2 -0
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js.map +7 -0
- package/dist/Runtime/Extensions/3D/AmbientLight.js +2 -0
- package/dist/Runtime/Extensions/3D/AmbientLight.js.map +7 -0
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js +2 -0
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js.map +7 -0
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js +2 -0
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js.map +7 -0
- package/dist/Runtime/Extensions/3D/DirectionalLight.js +2 -0
- package/dist/Runtime/Extensions/3D/DirectionalLight.js.map +7 -0
- package/dist/Runtime/Extensions/3D/ExponentialFog.js +2 -0
- package/dist/Runtime/Extensions/3D/ExponentialFog.js.map +7 -0
- package/dist/Runtime/Extensions/3D/HemisphereLight.js +2 -0
- package/dist/Runtime/Extensions/3D/HemisphereLight.js.map +7 -0
- package/dist/Runtime/Extensions/3D/JsExtension.js +2809 -0
- package/dist/Runtime/Extensions/3D/LinearFog.js +2 -0
- package/dist/Runtime/Extensions/3D/LinearFog.js.map +7 -0
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js +2 -0
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js.map +7 -0
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js +2 -0
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js.map +7 -0
- package/dist/Runtime/Extensions/3D/Scene3DTools.js +2 -0
- package/dist/Runtime/Extensions/3D/Scene3DTools.js.map +7 -0
- package/dist/Runtime/Extensions/AdMob/JsExtension.js +798 -0
- package/dist/Runtime/Extensions/AdMob/admobtools.js +2 -0
- package/dist/Runtime/Extensions/AdMob/admobtools.js.map +7 -0
- package/dist/Runtime/Extensions/AdvancedWindow/JsExtension.js +719 -0
- package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js +2 -0
- package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js.map +7 -0
- package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/BBText/JsExtension.js +639 -0
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/BBText/pixi-multistyle-text/dist/pixi-multistyle-text.umd.js +1 -0
- package/dist/Runtime/Extensions/BitmapText/JsExtension.js +756 -0
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/DebuggerTools/JsExtension.js +123 -0
- package/dist/Runtime/Extensions/DebuggerTools/debuggertools.js +2 -0
- package/dist/Runtime/Extensions/DebuggerTools/debuggertools.js.map +7 -0
- package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/DeviceSensors/JsExtension.js +461 -0
- package/dist/Runtime/Extensions/DeviceSensors/devicesensortools.js +2 -0
- package/dist/Runtime/Extensions/DeviceSensors/devicesensortools.js.map +7 -0
- package/dist/Runtime/Extensions/DeviceVibration/JsExtension.js +108 -0
- package/dist/Runtime/Extensions/DeviceVibration/devicevibrationtools.js +2 -0
- package/dist/Runtime/Extensions/DeviceVibration/devicevibrationtools.js.map +7 -0
- package/dist/Runtime/Extensions/DialogueTree/JsExtension.js +730 -0
- package/dist/Runtime/Extensions/DialogueTree/bondage.js/dist/bondage.min.js +11 -0
- package/dist/Runtime/Extensions/DialogueTree/dialoguetools.js +3 -0
- package/dist/Runtime/Extensions/DialogueTree/dialoguetools.js.map +7 -0
- package/dist/Runtime/Extensions/DraggableBehavior/draggableruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/DraggableBehavior/draggableruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/JsExtension.js +1197 -0
- package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js +3 -0
- package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/night-pixi-filter.js +3 -0
- package/dist/Runtime/Extensions/Effects/night-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-adjustment.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-advanced-bloom.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-ascii.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-bevel.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-bulge-pinch.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-color-map.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-color-replace.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-crt.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-dot.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-drop-shadow.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-glitch.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-glow.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-godray.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-kawase-blur.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-old-film.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-outline.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-pixelate.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-radial-blur.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-reflection.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-rgb-split.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-tilt-shift.js +171 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-twist.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/filter-zoom-blur.js +8 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/adjustment/types.d.ts +29 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/advanced-bloom/types.d.ts +30 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/ascii/types.d.ts +11 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/bevel/types.d.ts +25 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/bloom/types.d.ts +18 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/bulge-pinch/types.d.ts +24 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-map/types.d.ts +22 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-overlay/types.d.ts +11 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-replace/types.d.ts +17 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/convolution/types.d.ts +13 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/cross-hatch/types.d.ts +10 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/crt/types.d.ts +35 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/dot/types.d.ts +12 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/drop-shadow/types.d.ts +33 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/emboss/types.d.ts +11 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/glitch/types.d.ts +38 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/glow/types.d.ts +23 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/godray/types.d.ts +27 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/kawase-blur/types.d.ts +15 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/motion-blur/types.d.ts +17 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/multi-color-replace/types.d.ts +18 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/old-film/types.d.ts +33 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/outline/types.d.ts +13 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/pixelate/types.d.ts +11 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/radial-blur/types.d.ts +19 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/reflection/types.d.ts +25 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/rgb-split/types.d.ts +13 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/shockwave/types.d.ts +25 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/simple-lightmap/types.d.ts +13 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/tilt-shift/types.d.ts +19 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/twist/types.d.ts +13 -0
- package/dist/Runtime/Extensions/Effects/pixi-filters/types/zoom-blur/types.d.ts +28 -0
- package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js +2 -0
- package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js.map +7 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/JsExtension.js +589 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js +3 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js.map +7 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummywithshareddataruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/dummywithshareddataruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/examplejsextensiontools.js +2 -0
- package/dist/Runtime/Extensions/ExampleJsExtension/examplejsextensiontools.js.map +7 -0
- package/dist/Runtime/Extensions/FacebookInstantGames/FBInstant.d.ts +2 -0
- package/dist/Runtime/Extensions/FacebookInstantGames/JsExtension.js +379 -0
- package/dist/Runtime/Extensions/FacebookInstantGames/facebookinstantgamestools.js +2 -0
- package/dist/Runtime/Extensions/FacebookInstantGames/facebookinstantgamestools.js.map +7 -0
- package/dist/Runtime/Extensions/FileSystem/JsExtension.js +559 -0
- package/dist/Runtime/Extensions/FileSystem/filesystemtools.js +2 -0
- package/dist/Runtime/Extensions/FileSystem/filesystemtools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/A_firebase-base.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/A_firebase-base.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-analytics.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-analytics.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-auth.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-auth.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-database.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-database.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-firestore.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-firestore.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-functions.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-functions.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-messaging.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-messaging.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-performance.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-performance.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-remote-config.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-remote-config.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-storage.js +2 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-storage.js.map +1 -0
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/firebase.d.ts +10191 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_analyticstools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_analyticstools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_authtools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_authtools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_cloudfirestoretools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_cloudfirestoretools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_databasetools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_databasetools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_functionstools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_functionstools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_performancetools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_performancetools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_remoteconfigtools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_remoteconfigtools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_storagetools.js +2 -0
- package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_storagetools.js.map +7 -0
- package/dist/Runtime/Extensions/Firebase/JsExtension.js +2323 -0
- package/dist/Runtime/Extensions/Inventory/inventory.js +2 -0
- package/dist/Runtime/Extensions/Inventory/inventory.js.map +7 -0
- package/dist/Runtime/Extensions/Inventory/inventorytools.js +2 -0
- package/dist/Runtime/Extensions/Inventory/inventorytools.js.map +7 -0
- package/dist/Runtime/Extensions/JsExtensionTypes.flow.js +34 -0
- package/dist/Runtime/Extensions/Leaderboards/JsExtension.js +299 -0
- package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js +2 -0
- package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js.map +7 -0
- package/dist/Runtime/Extensions/Leaderboards/sha256.d.ts +234 -0
- package/dist/Runtime/Extensions/Leaderboards/sha256.js +21 -0
- package/dist/Runtime/Extensions/Lighting/JsExtension.js +371 -0
- package/dist/Runtime/Extensions/Lighting/lightobstacleruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/Lighting/lightobstacleruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js +40 -0
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js +2 -0
- package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js.map +7 -0
- package/dist/Runtime/Extensions/P2P/A_peer.js +4 -0
- package/dist/Runtime/Extensions/P2P/A_peer.js.map +1 -0
- package/dist/Runtime/Extensions/P2P/B_p2ptools.js +2 -0
- package/dist/Runtime/Extensions/P2P/B_p2ptools.js.map +7 -0
- package/dist/Runtime/Extensions/P2P/JsExtension.js +483 -0
- package/dist/Runtime/Extensions/P2P/peerjs.d.ts +509 -0
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js +2 -0
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js.map +7 -0
- package/dist/Runtime/Extensions/ParticleSystem/pixi-particles-pixi-renderer.min.js +3 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/PathTools.js +2 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/PathTools.js.map +7 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingobstacleruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingobstacleruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.js +2 -0
- package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.js.map +7 -0
- package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.wasm +0 -0
- package/dist/Runtime/Extensions/Physics2Behavior/JsExtension.js +4072 -0
- package/dist/Runtime/Extensions/Physics2Behavior/box2d.d.ts +1804 -0
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js +2 -0
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/Physics2Behavior/physics2tools.js +2 -0
- package/dist/Runtime/Extensions/Physics2Behavior/physics2tools.js.map +7 -0
- package/dist/Runtime/Extensions/PhysicsBehavior/box2djs/box2d.js +804 -0
- package/dist/Runtime/Extensions/PhysicsBehavior/physicsruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/PhysicsBehavior/physicsruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/PlatformBehavior/benchmarks/platformerobjectruntimebehavior.benchmark.js +2 -0
- package/dist/Runtime/Extensions/PlatformBehavior/benchmarks/platformerobjectruntimebehavior.benchmark.js.map +7 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformtools.js +2 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformtools.js.map +7 -0
- package/dist/Runtime/Extensions/PlayerAuthentication/JsExtension.js +218 -0
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js +5 -0
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js.map +7 -0
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js +2 -0
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js.map +7 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.min.js +10 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.min.js.map +1 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/Screenshot/JsExtension.js +68 -0
- package/dist/Runtime/Extensions/Screenshot/screenshottools.js +2 -0
- package/dist/Runtime/Extensions/Screenshot/screenshottools.js.map +7 -0
- package/dist/Runtime/Extensions/Shopify/shopify-buy.umd.polyfilled.min.js +2 -0
- package/dist/Runtime/Extensions/Shopify/shopifytools.js +2 -0
- package/dist/Runtime/Extensions/Shopify/shopifytools.js.map +7 -0
- package/dist/Runtime/Extensions/SpatialSound/JsExtension.js +92 -0
- package/dist/Runtime/Extensions/SpatialSound/howler.spatial.min.js +2 -0
- package/dist/Runtime/Extensions/SpatialSound/spatialsoundtools.js +2 -0
- package/dist/Runtime/Extensions/SpatialSound/spatialsoundtools.js.map +7 -0
- package/dist/Runtime/Extensions/SystemInfo/systeminfotools.js +2 -0
- package/dist/Runtime/Extensions/SystemInfo/systeminfotools.js.map +7 -0
- package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TextInput/JsExtension.js +790 -0
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/JsExtension.js +1653 -0
- package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js +2 -0
- package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/collision/TileMapCollisionMaskRenderer.js +2 -0
- package/dist/Runtime/Extensions/TileMap/collision/TileMapCollisionMaskRenderer.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js +2 -0
- package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/example/anotherIsland.json +5769 -0
- package/dist/Runtime/Extensions/TileMap/example/island.json +5823 -0
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.d.ts +25 -0
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js +2 -0
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/index.d.ts +16 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/index.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapFileContent.d.ts +12 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapFileContent.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapLoader.d.ts +18 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapLoader.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkFormat.d.ts +589 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkFormat.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoader.d.ts +16 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoader.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoaderHelper.d.ts +5 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoaderHelper.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledFormat.d.ts +343 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledFormat.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.d.ts +16 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.spec.d.ts +2 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.spec.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoaderHelper.d.ts +37 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoaderHelper.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts +5 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/GID.d.ts +45 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/GID.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts +361 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/ResourceCache.d.ts +27 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/ResourceCache.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts +70 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts +56 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileTextureCache.d.ts +24 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileTextureCache.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/ldtk/LDtkPixiHelper.d.ts +26 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/ldtk/LDtkPixiHelper.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/tiled/TiledPixiHelper.d.ts +21 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/tiled/TiledPixiHelper.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/types/index.d.ts +12 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/types/index.d.ts.map +1 -0
- package/dist/Runtime/Extensions/TileMap/pako/dist/pako.d.ts +166 -0
- package/dist/Runtime/Extensions/TileMap/pako/dist/pako.min.js +2 -0
- package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/global-pixi-tilemap.d.ts +23 -0
- package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.d.ts +270 -0
- package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.umd.js +74 -0
- package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.umd.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/TweenBehavior/JsExtension.js +1087 -0
- package/dist/Runtime/Extensions/TweenBehavior/shifty.d.ts +839 -0
- package/dist/Runtime/Extensions/TweenBehavior/shifty.js +5 -0
- package/dist/Runtime/Extensions/TweenBehavior/shifty.js.map +1 -0
- package/dist/Runtime/Extensions/TweenBehavior/shifty_setup.js +2 -0
- package/dist/Runtime/Extensions/TweenBehavior/shifty_setup.js.map +7 -0
- package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/TweenBehavior/tweentools.js +2 -0
- package/dist/Runtime/Extensions/TweenBehavior/tweentools.js.map +7 -0
- package/dist/Runtime/Extensions/Video/JsExtension.js +694 -0
- package/dist/Runtime/Extensions/Video/videoruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/Extensions/Video/videoruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/Extensions/Video/videoruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/Video/videoruntimeobject.js.map +7 -0
- package/dist/Runtime/FacebookInstantGames/fbapp-config.json +17 -0
- package/dist/Runtime/FacebookInstantGames/index.html +68 -0
- package/dist/Runtime/Model3DManager.js +2 -0
- package/dist/Runtime/Model3DManager.js.map +7 -0
- package/dist/Runtime/RuntimeCustomObjectLayer.js +2 -0
- package/dist/Runtime/RuntimeCustomObjectLayer.js.map +7 -0
- package/dist/Runtime/RuntimeInstanceContainer.js +2 -0
- package/dist/Runtime/RuntimeInstanceContainer.js.map +7 -0
- package/dist/Runtime/RuntimeLayer.js +2 -0
- package/dist/Runtime/RuntimeLayer.js.map +7 -0
- package/dist/Runtime/affinetransformation.js +2 -0
- package/dist/Runtime/affinetransformation.js.map +7 -0
- package/dist/Runtime/debugger-client/abstract-debugger-client.js +2 -0
- package/dist/Runtime/debugger-client/abstract-debugger-client.js.map +7 -0
- package/dist/Runtime/debugger-client/hot-reloader.js +2 -0
- package/dist/Runtime/debugger-client/hot-reloader.js.map +7 -0
- package/dist/Runtime/debugger-client/websocket-debugger-client.js +2 -0
- package/dist/Runtime/debugger-client/websocket-debugger-client.js.map +7 -0
- package/dist/Runtime/debugger-client/window-message-debugger-client.js +2 -0
- package/dist/Runtime/debugger-client/window-message-debugger-client.js.map +7 -0
- package/dist/Runtime/events-tools/cameratools.js +2 -0
- package/dist/Runtime/events-tools/cameratools.js.map +7 -0
- package/dist/Runtime/events-tools/commontools.js +2 -0
- package/dist/Runtime/events-tools/commontools.js.map +7 -0
- package/dist/Runtime/events-tools/inputtools.js +2 -0
- package/dist/Runtime/events-tools/inputtools.js.map +7 -0
- package/dist/Runtime/events-tools/networktools.js +2 -0
- package/dist/Runtime/events-tools/networktools.js.map +7 -0
- package/dist/Runtime/events-tools/objecttools.js +2 -0
- package/dist/Runtime/events-tools/objecttools.js.map +7 -0
- package/dist/Runtime/events-tools/runtimescenetools.js +2 -0
- package/dist/Runtime/events-tools/runtimescenetools.js.map +7 -0
- package/dist/Runtime/events-tools/soundtools.js +2 -0
- package/dist/Runtime/events-tools/soundtools.js.map +7 -0
- package/dist/Runtime/events-tools/storagetools.js +2 -0
- package/dist/Runtime/events-tools/storagetools.js.map +7 -0
- package/dist/Runtime/events-tools/stringtools.js +3 -0
- package/dist/Runtime/events-tools/stringtools.js.map +7 -0
- package/dist/Runtime/events-tools/variabletools.js +2 -0
- package/dist/Runtime/events-tools/variabletools.js.map +7 -0
- package/dist/Runtime/events-tools/windowtools.js +2 -0
- package/dist/Runtime/events-tools/windowtools.js.map +7 -0
- package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver-font-manager.js +2 -0
- package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver-font-manager.js.map +7 -0
- package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver.js +16 -0
- package/dist/Runtime/force.js +2 -0
- package/dist/Runtime/force.js.map +7 -0
- package/dist/Runtime/gd.js +2 -0
- package/dist/Runtime/gd.js.map +7 -0
- package/dist/Runtime/howler-sound-manager/howler-sound-manager.js +2 -0
- package/dist/Runtime/howler-sound-manager/howler-sound-manager.js.map +7 -0
- package/dist/Runtime/howler-sound-manager/howler.min.js +3 -0
- package/dist/Runtime/index.html +55 -0
- package/dist/Runtime/inputmanager.js +2 -0
- package/dist/Runtime/inputmanager.js.map +7 -0
- package/dist/Runtime/jsonmanager.js +2 -0
- package/dist/Runtime/jsonmanager.js.map +7 -0
- package/dist/Runtime/layer.js +2 -0
- package/dist/Runtime/layer.js.map +7 -0
- package/dist/Runtime/libs/CocoonJS/cocoon.min.js +4 -0
- package/dist/Runtime/libs/jshashtable.js +2 -0
- package/dist/Runtime/libs/jshashtable.js.map +7 -0
- package/dist/Runtime/libs/rbush.js +624 -0
- package/dist/Runtime/logger.js +2 -0
- package/dist/Runtime/logger.js.map +7 -0
- package/dist/Runtime/oncetriggers.js +2 -0
- package/dist/Runtime/oncetriggers.js.map +7 -0
- package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js +2 -0
- package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js +2 -0
- package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/RuntimeInstanceContainerPixiRenderer.js +1 -0
- package/dist/Runtime/pixi-renderers/RuntimeInstanceContainerPixiRenderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/ThreeAddons.js +2 -0
- package/dist/Runtime/pixi-renderers/draco/gltf/draco_decoder.wasm +0 -0
- package/dist/Runtime/pixi-renderers/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js +15 -0
- package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/loadingscreen-pixi-renderer.js +2 -0
- package/dist/Runtime/pixi-renderers/loadingscreen-pixi-renderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/pixi-bitmapfont-manager.js +2 -0
- package/dist/Runtime/pixi-renderers/pixi-bitmapfont-manager.js.map +7 -0
- package/dist/Runtime/pixi-renderers/pixi-effects-manager.js +2 -0
- package/dist/Runtime/pixi-renderers/pixi-effects-manager.js.map +7 -0
- package/dist/Runtime/pixi-renderers/pixi-filters-tools.js +2 -0
- package/dist/Runtime/pixi-renderers/pixi-filters-tools.js.map +7 -0
- package/dist/Runtime/pixi-renderers/pixi-image-manager.js +2 -0
- package/dist/Runtime/pixi-renderers/pixi-image-manager.js.map +7 -0
- package/dist/Runtime/pixi-renderers/pixi.js +11 -0
- package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js +2 -0
- package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/runtimescene-pixi-renderer.js +3 -0
- package/dist/Runtime/pixi-renderers/runtimescene-pixi-renderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js +2 -0
- package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/three.js +7 -0
- package/dist/Runtime/polygon.js +2 -0
- package/dist/Runtime/polygon.js.map +7 -0
- package/dist/Runtime/profiler.js +2 -0
- package/dist/Runtime/profiler.js.map +7 -0
- package/dist/Runtime/runtimebehavior.js +2 -0
- package/dist/Runtime/runtimebehavior.js.map +7 -0
- package/dist/Runtime/runtimegame.js +2 -0
- package/dist/Runtime/runtimegame.js.map +7 -0
- package/dist/Runtime/runtimeobject.js +2 -0
- package/dist/Runtime/runtimeobject.js.map +7 -0
- package/dist/Runtime/runtimescene.js +2 -0
- package/dist/Runtime/runtimescene.js.map +7 -0
- package/dist/Runtime/runtimewatermark.js +100 -0
- package/dist/Runtime/runtimewatermark.js.map +7 -0
- package/dist/Runtime/scenestack.js +2 -0
- package/dist/Runtime/scenestack.js.map +7 -0
- package/dist/Runtime/splash/gd-logo-dark-colored.js +2 -0
- package/dist/Runtime/splash/gd-logo-dark-colored.js.map +7 -0
- package/dist/Runtime/splash/gd-logo-dark.js +2 -0
- package/dist/Runtime/splash/gd-logo-dark.js.map +7 -0
- package/dist/Runtime/splash/gd-logo-light-colored.js +2 -0
- package/dist/Runtime/splash/gd-logo-light-colored.js.map +7 -0
- package/dist/Runtime/splash/gd-logo-light.js +2 -0
- package/dist/Runtime/splash/gd-logo-light.js.map +7 -0
- package/dist/Runtime/spriteruntimeobject.js +2 -0
- package/dist/Runtime/spriteruntimeobject.js.map +7 -0
- package/dist/Runtime/timemanager.js +2 -0
- package/dist/Runtime/timemanager.js.map +7 -0
- package/dist/Runtime/timer.js +2 -0
- package/dist/Runtime/timer.js.map +7 -0
- package/dist/Runtime/types/global-pixi.d.ts +22 -0
- package/dist/Runtime/types/global-three-addons.d.ts +9 -0
- package/dist/Runtime/types/global-three.d.ts +3 -0
- package/dist/Runtime/types/global-types.d.ts +61 -0
- package/dist/Runtime/types/howler.d.ts +313 -0
- package/dist/Runtime/types/project-data.d.ts +276 -0
- package/dist/Runtime/variable.js +2 -0
- package/dist/Runtime/variable.js.map +7 -0
- package/dist/Runtime/variablescontainer.js +2 -0
- package/dist/Runtime/variablescontainer.js.map +7 -0
- package/dist/lib/libGD.cjs +22 -0
- package/dist/lib/libGD.wasm +0 -0
- package/dist/loaders.js +1 -0
- package/package.json +24 -10
- package/src/downloadGD.js +0 -70
- package/src/index.js +21 -14
- package/examples/create-objects-from-json/assets/Blank button.png +0 -0
- package/examples/create-objects-from-json/game.json +0 -258
- package/examples/create-objects-from-json/index.js +0 -50
- package/examples/create-objects-from-json/mylist.json +0 -7
- package/examples/export-game/game.json +0 -205
- package/examples/export-game/index.js +0 -13
- package/src/CaseSensitiveSlug.js +0 -34
- package/src/EventsFunctionsExtensionsLoader/LocalEventsFunctionCodeWriter.js +0 -56
- package/src/EventsFunctionsExtensionsLoader/MetadataDeclarationHelpers.js +0 -489
- package/src/EventsFunctionsExtensionsLoader/index.js +0 -451
- package/src/JsExtensionsLoader/LocalJsExtensionsFinder.js +0 -42
- package/src/JsExtensionsLoader/LocalJsExtensionsLoader.js +0 -57
- package/src/JsExtensionsLoader/index.js +0 -101
- package/src/LocalFileSystem.js +0 -158
- package/src/LocalProjectOpener.js +0 -46
- package/src/LocalProjectWriter.js +0 -96
- package/src/MapFor.js +0 -46
- package/src/ObjectSplitter.js +0 -187
- package/src/Serializer.js +0 -35
- package/src/build.js +0 -51
- package/src/runtime-files-list.js +0 -143
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../GDevelop/GDJS/Runtime/pixi-renderers/CustomObjectPixiRenderer.ts"],
|
|
4
|
+
"sourcesContent": ["namespace gdjs {\n import PIXI = GlobalPIXIModule.PIXI;\n\n /**\n * The renderer for a {@link gdjs.CustomRuntimeObject} using Pixi.js.\n */\n export class CustomObjectPixiRenderer\n implements gdjs.RuntimeInstanceContainerPixiRenderer {\n _object: gdjs.CustomRuntimeObject;\n _instanceContainer: gdjs.CustomRuntimeObjectInstanceContainer;\n _pixiContainer: PIXI.Container;\n _threeGroup: THREE.Group | null;\n _isContainerDirty: boolean = true;\n _debugDraw: PIXI.Graphics | null = null;\n _debugDrawContainer: PIXI.Container | null = null;\n _debugDrawRenderedObjectsPoints: Record<\n number,\n {\n wasRendered: boolean;\n points: Record<string, PIXI.Text>;\n }\n >;\n\n constructor(\n object: gdjs.CustomRuntimeObject,\n instanceContainer: gdjs.CustomRuntimeObjectInstanceContainer,\n parent: gdjs.RuntimeInstanceContainer\n ) {\n this._object = object;\n this._instanceContainer = instanceContainer;\n\n // TODO (3D) - optimization: don't create a PixiJS container if only 3D objects.\n // And same, in reverse, for 2D only objects.\n this._pixiContainer = new PIXI.Container();\n this._threeGroup =\n typeof THREE !== 'undefined' ? new THREE.Group() : null;\n this._debugDrawRenderedObjectsPoints = {};\n\n // Contains the layers of the scene (and, optionally, debug PIXI objects).\n this._pixiContainer.sortableChildren = true;\n this._debugDraw = null;\n\n const layer = parent.getLayer('');\n if (layer) {\n layer\n .getRenderer()\n .addRendererObject(this._pixiContainer, object.getZOrder());\n if (this._threeGroup) {\n layer.getRenderer().add3DRendererObject(this._threeGroup);\n }\n }\n }\n\n reinitialize(\n object: gdjs.CustomRuntimeObject,\n parent: gdjs.RuntimeInstanceContainer\n ) {\n this._object = object;\n this._isContainerDirty = true;\n const layer = parent.getLayer('');\n if (layer) {\n layer\n .getRenderer()\n .addRendererObject(this._pixiContainer, object.getZOrder());\n if (this._threeGroup) {\n layer.getRenderer().add3DRendererObject(this._threeGroup);\n }\n }\n }\n\n getRendererObject() {\n return this._pixiContainer;\n }\n\n get3DRendererObject(): THREE.Object3D | null {\n return this._threeGroup;\n }\n\n /**\n * Update the internal PIXI.Container position, angle...\n */\n _updatePIXIContainer() {\n this._pixiContainer.pivot.x = this._object.getUnscaledCenterX();\n this._pixiContainer.pivot.y = this._object.getUnscaledCenterY();\n this._pixiContainer.position.x =\n this._object.getX() +\n this._pixiContainer.pivot.x * Math.abs(this._object._scaleX);\n this._pixiContainer.position.y =\n this._object.getY() +\n this._pixiContainer.pivot.y * Math.abs(this._object._scaleY);\n\n this._pixiContainer.rotation = gdjs.toRad(this._object.angle);\n this._pixiContainer.scale.x = this._object._scaleX;\n this._pixiContainer.scale.y = this._object._scaleY;\n this._pixiContainer.visible = !this._object.hidden;\n this._pixiContainer.alpha = this._object.opacity / 255;\n\n this._isContainerDirty = false;\n }\n\n _updateThreeGroup() {\n if (!this._threeGroup) return;\n\n const pivotX = this._object.getUnscaledCenterX();\n const pivotY = this._object.getUnscaledCenterY();\n\n // TODO (3D): fix the pivot point for custom objects.\n this._threeGroup.position.x =\n this._object.getX() + pivotX * Math.abs(this._object._scaleX);\n this._threeGroup.position.y =\n this._object.getY() + pivotY * Math.abs(this._object._scaleY);\n\n this._threeGroup.rotation.z = gdjs.toRad(this._object.angle);\n this._threeGroup.scale.x = this._object._scaleX;\n this._threeGroup.scale.y = this._object._scaleY;\n this._threeGroup.visible = !this._object.hidden;\n }\n\n /**\n * Call this to make sure the sprite is ready to be rendered.\n */\n ensureUpToDate() {\n if (this._isContainerDirty) {\n this._updatePIXIContainer();\n this._updateThreeGroup();\n }\n }\n\n update(): void {\n this._isContainerDirty = true;\n }\n\n updateX(): void {\n this._pixiContainer.position.x =\n this._object.x +\n this._pixiContainer.pivot.x * Math.abs(this._object._scaleX);\n\n if (this._threeGroup)\n this._threeGroup.position.x =\n this._object.getX() +\n /*this._threeGroup.pivot.x*/ 0.5 * Math.abs(this._object._scaleX);\n }\n\n updateY(): void {\n this._pixiContainer.position.y =\n this._object.y +\n this._pixiContainer.pivot.y * Math.abs(this._object._scaleY);\n\n if (this._threeGroup)\n this._threeGroup.position.y =\n this._object.getY() +\n /*this._threeGroup.pivot.y*/ 0.5 * Math.abs(this._object._scaleY);\n }\n\n updateAngle(): void {\n this._pixiContainer.rotation = gdjs.toRad(this._object.angle);\n if (this._threeGroup)\n this._threeGroup.rotation.z = gdjs.toRad(this._object.angle);\n }\n\n updateOpacity(): void {\n this._pixiContainer.alpha = this._object.opacity / 255;\n }\n\n updateVisibility(): void {\n this._pixiContainer.visible = !this._object.hidden;\n if (this._threeGroup) this._threeGroup.visible = !this._object.hidden;\n }\n\n getPIXIContainer() {\n return this._pixiContainer;\n }\n\n getPIXIRenderer() {\n return null;\n }\n\n setLayerIndex(layer: gdjs.RuntimeLayer, index: float): void {\n const layerPixiRenderer: gdjs.LayerPixiRenderer = layer.getRenderer();\n let layerPixiObject:\n | PIXI.Container\n | PIXI.Sprite\n | null = layerPixiRenderer.getRendererObject();\n if (layer.isLightingLayer()) {\n layerPixiObject = layerPixiRenderer.getLightingSprite();\n }\n if (!layerPixiObject) {\n return;\n }\n if (this._pixiContainer.children.indexOf(layerPixiObject) === index) {\n return;\n }\n this._pixiContainer.removeChild(layerPixiObject);\n this._pixiContainer.addChildAt(layerPixiObject, index);\n }\n }\n\n // Register the class to let the engine use it.\n export type CustomObjectRenderer = gdjs.CustomObjectPixiRenderer;\n export const CustomObjectRenderer = gdjs.CustomObjectPixiRenderer;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["gdjs", "PIXI", "CustomObjectPixiRenderer", "object", "instanceContainer", "parent", "layer", "pivotX", "pivotY", "index", "layerPixiRenderer", "layerPixiObject"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var gdjs;(g=>{const h=GlobalPIXIModule.PIXI;class y{_instanceContainer;_debugDraw=null;_debugDrawContainer=null;_debugDrawRenderedObjectsPoints;constructor(l){this._instanceContainer=l,this._debugDrawRenderedObjectsPoints={},this._debugDraw=null}getRendererObject(){return this._debugDrawContainer}renderDebugDraw(l,p,_,P){const R=this._instanceContainer.getRenderer().getRendererObject();(!this._debugDraw||!this._debugDrawContainer)&&(this._debugDrawContainer=new h.Container,this._debugDraw=new h.Graphics,this._debugDrawContainer.addChild(this._debugDraw),R.addChild(this._debugDrawContainer));const t=this._debugDraw;for(let i in this._debugDrawRenderedObjectsPoints)this._debugDrawRenderedObjectsPoints[i].wasRendered=!1;const u=(i,e,n,c,r)=>{t.line.color=n,t.fill.color=n,t.drawCircle(c,r,3),_&&(i[e]||(i[e]=new h.Text(e,{fill:n,fontSize:12}),this._debugDrawContainer.addChild(i[e])),i[e].position.set(c,r))};t.clear(),t.beginFill(),t.alpha=.8,t.lineStyle(2,255,1);const s=[0,0];for(let i=0;i<l.length;i++){const e=l[i],n=this._instanceContainer.getLayer(e.getLayer());if((!e.isVisible()||!n.isVisible())&&!p||!e.getRendererObject())continue;const r=e.getAABB();t.fill.alpha=.2,t.line.color=7835368,t.fill.color=7835368;const o=[];o.push.apply(o,n.applyLayerTransformation(r.min[0],r.min[1],0,s)),o.push.apply(o,n.applyLayerTransformation(r.max[0],r.min[1],0,s)),o.push.apply(o,n.applyLayerTransformation(r.max[0],r.max[1],0,s)),o.push.apply(o,n.applyLayerTransformation(r.min[0],r.max[1],0,s)),t.drawPolygon(o)}for(let i=0;i<l.length;i++){const e=l[i],n=this._instanceContainer.getLayer(e.getLayer());if((!e.isVisible()||!n.isVisible())&&!p||!e.getRendererObject())continue;const r=e.id;this._debugDrawRenderedObjectsPoints[r]||(this._debugDrawRenderedObjectsPoints[r]={wasRendered:!0,points:{}});const o=this._debugDrawRenderedObjectsPoints[r];o.wasRendered=!0;const w=e.getHitBoxes();for(let a=0;a<w.length;a++){const d=[];w[a].vertices.forEach(b=>{b=n.applyLayerTransformation(b[0],b[1],0,s),d.push(b[0]),d.push(b[1])}),t.fill.alpha=0,t.line.alpha=.5,t.line.color=16711680,t.drawPolygon(d)}t.fill.alpha=.3;const D=n.applyLayerTransformation(e.getCenterXInScene(),e.getCenterYInScene(),0,s);u(o.points,"Center",16776960,D[0],D[1]);const f=n.applyLayerTransformation(e.getX(),e.getY(),0,s);if(u(o.points,"Position",16711680,f[0],f[1]),e instanceof g.SpriteRuntimeObject){let a=e.getPointPosition("origin");(Math.abs(a[0]-f[0])>=1||Math.abs(a[1]-f[1])>=1)&&(a=n.applyLayerTransformation(a[0],a[1],0,s),u(o.points,"Origin",16711680,a[0],a[1]))}if(P&&e instanceof g.SpriteRuntimeObject){if(!e._animationFrame)continue;for(const a in e._animationFrame.points.items){let d=e.getPointPosition(a);d=n.applyLayerTransformation(d[0],d[1],0,s),u(o.points,a,255,d[0],d[1])}}}for(const i in this._debugDrawRenderedObjectsPoints){const e=this._debugDrawRenderedObjectsPoints[i];if(e.wasRendered)continue;const n=e.points;for(const c in n)this._debugDrawContainer.removeChild(n[c])}t.endFill()}clearDebugDraw(){this._debugDraw&&this._debugDraw.clear(),this._debugDrawContainer&&(this._debugDrawContainer.destroy({children:!0}),this._instanceContainer.getRenderer().getRendererObject().removeChild(this._debugDrawContainer)),this._debugDraw=null,this._debugDrawContainer=null,this._debugDrawRenderedObjectsPoints={}}}g.DebuggerPixiRenderer=y,g.DebuggerRenderer=g.DebuggerPixiRenderer})(gdjs||={});
|
|
2
|
+
//# sourceMappingURL=DebuggerPixiRenderer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../GDevelop/GDJS/Runtime/pixi-renderers/DebuggerPixiRenderer.ts"],
|
|
4
|
+
"sourcesContent": ["namespace gdjs {\n import PIXI = GlobalPIXIModule.PIXI;\n\n /**\n * A renderer for debug instances location of a container using Pixi.js.\n *\n * @see gdjs.CustomObjectPixiRenderer\n */\n export class DebuggerPixiRenderer {\n _instanceContainer: gdjs.RuntimeInstanceContainer;\n _debugDraw: PIXI.Graphics | null = null;\n _debugDrawContainer: PIXI.Container | null = null;\n _debugDrawRenderedObjectsPoints: Record<\n number,\n {\n wasRendered: boolean;\n points: Record<string, PIXI.Text>;\n }\n >;\n\n constructor(instanceContainer: gdjs.RuntimeInstanceContainer) {\n this._instanceContainer = instanceContainer;\n this._debugDrawRenderedObjectsPoints = {};\n this._debugDraw = null;\n }\n\n getRendererObject() {\n return this._debugDrawContainer;\n }\n\n /**\n * Render graphics for debugging purpose. Activate this in `gdjs.RuntimeScene`,\n * in the `renderAndStep` method.\n * @see gdjs.RuntimeInstanceContainer#enableDebugDraw\n */\n renderDebugDraw(\n instances: gdjs.RuntimeObject[],\n showHiddenInstances: boolean,\n showPointsNames: boolean,\n showCustomPoints: boolean\n ) {\n const pixiContainer = this._instanceContainer\n .getRenderer()\n .getRendererObject();\n if (!this._debugDraw || !this._debugDrawContainer) {\n this._debugDrawContainer = new PIXI.Container();\n this._debugDraw = new PIXI.Graphics();\n\n // Add on top of all layers:\n this._debugDrawContainer.addChild(this._debugDraw);\n pixiContainer.addChild(this._debugDrawContainer);\n }\n const debugDraw = this._debugDraw;\n\n // Reset the boolean \"wasRendered\" of all points of objects to false:\n for (let id in this._debugDrawRenderedObjectsPoints) {\n this._debugDrawRenderedObjectsPoints[id].wasRendered = false;\n }\n\n const renderObjectPoint = (\n points: Record<string, PIXI.Text>,\n name: string,\n fillColor: integer,\n x: float,\n y: float\n ) => {\n debugDraw.line.color = fillColor;\n debugDraw.fill.color = fillColor;\n debugDraw.drawCircle(x, y, 3);\n\n if (showPointsNames) {\n if (!points[name]) {\n points[name] = new PIXI.Text(name, {\n fill: fillColor,\n fontSize: 12,\n });\n\n this._debugDrawContainer!.addChild(points[name]);\n }\n\n points[name].position.set(x, y);\n }\n };\n\n debugDraw.clear();\n debugDraw.beginFill();\n debugDraw.alpha = 0.8;\n debugDraw.lineStyle(2, 0x0000ff, 1);\n\n // Draw AABB\n const workingPoint: FloatPoint = [0, 0];\n for (let i = 0; i < instances.length; i++) {\n const object = instances[i];\n const layer = this._instanceContainer.getLayer(object.getLayer());\n\n if (\n (!object.isVisible() || !layer.isVisible()) &&\n !showHiddenInstances\n ) {\n continue;\n }\n\n const rendererObject = object.getRendererObject();\n if (!rendererObject) {\n continue;\n }\n const aabb = object.getAABB();\n debugDraw.fill.alpha = 0.2;\n debugDraw.line.color = 0x778ee8;\n debugDraw.fill.color = 0x778ee8;\n\n const polygon: float[] = [];\n polygon.push.apply(\n polygon,\n layer.applyLayerTransformation(\n aabb.min[0],\n aabb.min[1],\n 0,\n workingPoint\n )\n );\n polygon.push.apply(\n polygon,\n layer.applyLayerTransformation(\n aabb.max[0],\n aabb.min[1],\n 0,\n workingPoint\n )\n );\n polygon.push.apply(\n polygon,\n layer.applyLayerTransformation(\n aabb.max[0],\n aabb.max[1],\n 0,\n workingPoint\n )\n );\n polygon.push.apply(\n polygon,\n layer.applyLayerTransformation(\n aabb.min[0],\n aabb.max[1],\n 0,\n workingPoint\n )\n );\n\n debugDraw.drawPolygon(polygon);\n }\n\n // Draw hitboxes and points\n for (let i = 0; i < instances.length; i++) {\n const object = instances[i];\n const layer = this._instanceContainer.getLayer(object.getLayer());\n\n if (\n (!object.isVisible() || !layer.isVisible()) &&\n !showHiddenInstances\n ) {\n continue;\n }\n\n const rendererObject = object.getRendererObject();\n if (!rendererObject) {\n continue;\n }\n\n // Create the structure to store the points in memory\n const id = object.id;\n if (!this._debugDrawRenderedObjectsPoints[id]) {\n this._debugDrawRenderedObjectsPoints[id] = {\n wasRendered: true,\n points: {},\n };\n }\n const renderedObjectPoints = this._debugDrawRenderedObjectsPoints[id];\n renderedObjectPoints.wasRendered = true;\n\n // Draw hitboxes (sub-optimal performance)\n const hitboxes = object.getHitBoxes();\n for (let j = 0; j < hitboxes.length; j++) {\n // Note that this conversion is sub-optimal, but we don't care\n // as this is for debug draw.\n const polygon: float[] = [];\n hitboxes[j].vertices.forEach((point) => {\n point = layer.applyLayerTransformation(\n point[0],\n point[1],\n 0,\n workingPoint\n );\n\n polygon.push(point[0]);\n polygon.push(point[1]);\n });\n debugDraw.fill.alpha = 0;\n debugDraw.line.alpha = 0.5;\n debugDraw.line.color = 0xff0000;\n debugDraw.drawPolygon(polygon);\n }\n\n // Draw points\n debugDraw.fill.alpha = 0.3;\n\n // Draw Center point\n const centerPoint = layer.applyLayerTransformation(\n object.getCenterXInScene(),\n object.getCenterYInScene(),\n 0,\n workingPoint\n );\n\n renderObjectPoint(\n renderedObjectPoints.points,\n 'Center',\n 0xffff00,\n centerPoint[0],\n centerPoint[1]\n );\n\n // Draw position point\n const positionPoint = layer.applyLayerTransformation(\n object.getX(),\n object.getY(),\n 0,\n workingPoint\n );\n\n renderObjectPoint(\n renderedObjectPoints.points,\n 'Position',\n 0xff0000,\n positionPoint[0],\n positionPoint[1]\n );\n\n // Draw Origin point\n if (object instanceof gdjs.SpriteRuntimeObject) {\n let originPoint = object.getPointPosition('origin');\n // When there is neither rotation nor flipping,\n // the origin point is over the position point.\n if (\n Math.abs(originPoint[0] - positionPoint[0]) >= 1 ||\n Math.abs(originPoint[1] - positionPoint[1]) >= 1\n ) {\n originPoint = layer.applyLayerTransformation(\n originPoint[0],\n originPoint[1],\n 0,\n workingPoint\n );\n\n renderObjectPoint(\n renderedObjectPoints.points,\n 'Origin',\n 0xff0000,\n originPoint[0],\n originPoint[1]\n );\n }\n }\n\n // Draw custom point\n if (showCustomPoints && object instanceof gdjs.SpriteRuntimeObject) {\n if (!object._animationFrame) continue;\n\n for (const customPointName in object._animationFrame.points.items) {\n let customPoint = object.getPointPosition(customPointName);\n\n customPoint = layer.applyLayerTransformation(\n customPoint[0],\n customPoint[1],\n 0,\n workingPoint\n );\n\n renderObjectPoint(\n renderedObjectPoints.points,\n customPointName,\n 0x0000ff,\n customPoint[0],\n customPoint[1]\n );\n }\n }\n }\n\n // Clean any point text from an object that is not rendered.\n for (const objectID in this._debugDrawRenderedObjectsPoints) {\n const renderedObjectPoints = this._debugDrawRenderedObjectsPoints[\n objectID\n ];\n if (renderedObjectPoints.wasRendered) continue;\n\n const points = renderedObjectPoints.points;\n for (const name in points) {\n this._debugDrawContainer.removeChild(points[name]);\n }\n }\n\n debugDraw.endFill();\n }\n\n clearDebugDraw(): void {\n if (this._debugDraw) {\n this._debugDraw.clear();\n }\n\n if (this._debugDrawContainer) {\n this._debugDrawContainer.destroy({\n children: true,\n });\n const pixiContainer: PIXI.Container = this._instanceContainer\n .getRenderer()\n .getRendererObject();\n pixiContainer.removeChild(this._debugDrawContainer);\n }\n this._debugDraw = null;\n this._debugDrawContainer = null;\n this._debugDrawRenderedObjectsPoints = {};\n }\n }\n\n // Register the class to let the engine use it.\n export type DebuggerRenderer = gdjs.DebuggerPixiRenderer;\n export const DebuggerRenderer = gdjs.DebuggerPixiRenderer;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["gdjs", "PIXI", "DebuggerPixiRenderer", "instanceContainer", "instances", "showHiddenInstances", "showPointsNames", "showCustomPoints", "pixiContainer", "debugDraw", "id", "renderObjectPoint", "points", "name", "fillColor", "x", "y", "workingPoint", "object", "layer", "aabb", "polygon", "renderedObjectPoints", "hitboxes", "j", "point", "centerPoint", "positionPoint", "originPoint", "customPointName", "customPoint", "objectID"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=RuntimeInstanceContainerPixiRenderer.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("three")):"function"==typeof define&&define.amd?define(["exports","three"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).THREE_ADDONS={},e.THREE)}(this,(function(e,t){"use strict";function s(e,s){if(s===t.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(s===t.TriangleFanDrawMode||s===t.TriangleStripDrawMode){let r=e.getIndex();if(null===r){const t=[],s=e.getAttribute("position");if(void 0===s)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<s.count;e++)t.push(e);e.setIndex(t),r=e.getIndex()}const n=r.count-2,o=[];if(s===t.TriangleFanDrawMode)for(let e=1;e<=n;e++)o.push(r.getX(0)),o.push(r.getX(e)),o.push(r.getX(e+1));else for(let e=0;e<n;e++)e%2==0?(o.push(r.getX(e)),o.push(r.getX(e+1)),o.push(r.getX(e+2))):(o.push(r.getX(e+2)),o.push(r.getX(e+1)),o.push(r.getX(e)));o.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=e.clone();return i.setIndex(o),i.clearGroups(),i}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",s),e}class r extends t.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new l(e)})),this.register((function(e){return new A(e)})),this.register((function(e){return new g(e)})),this.register((function(e){return new T(e)})),this.register((function(e){return new h(e)})),this.register((function(e){return new d(e)})),this.register((function(e){return new p(e)})),this.register((function(e){return new m(e)})),this.register((function(e){return new c(e)})),this.register((function(e){return new f(e)})),this.register((function(e){return new u(e)})),this.register((function(e){return new i(e)})),this.register((function(e){return new x(e)})),this.register((function(e){return new R(e)}))}load(e,s,r,n){const o=this;let i;i=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:t.LoaderUtils.extractUrlBase(e),this.manager.itemStart(e);const a=function(t){n?n(t):console.error(t),o.manager.itemError(e),o.manager.itemEnd(e)},c=new t.FileLoader(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,(function(t){try{o.parse(t,i,(function(t){s(t),o.manager.itemEnd(e)}),a)}catch(e){a(e)}}),r,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,s,r){let n;const i={},c={},l=new TextDecoder;if("string"==typeof e)n=JSON.parse(e);else if(e instanceof ArrayBuffer){if(l.decode(new Uint8Array(e,0,4))===y){try{i[o.KHR_BINARY_GLTF]=new v(e)}catch(e){return void(r&&r(e))}n=JSON.parse(i[o.KHR_BINARY_GLTF].content)}else n=JSON.parse(l.decode(e))}else n=e;if(void 0===n.asset||n.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const u=new Q(n,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](u);c[t.name]=t,i[t.name]=!0}if(n.extensionsUsed)for(let e=0;e<n.extensionsUsed.length;++e){const t=n.extensionsUsed[e],s=n.extensionsRequired||[];switch(t){case o.KHR_MATERIALS_UNLIT:i[t]=new a;break;case o.KHR_DRACO_MESH_COMPRESSION:i[t]=new E(n,this.dracoLoader);break;case o.KHR_TEXTURE_TRANSFORM:i[t]=new M;break;case o.KHR_MESH_QUANTIZATION:i[t]=new b;break;default:s.indexOf(t)>=0&&void 0===c[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}u.setExtensions(i),u.setPlugins(c),u.parse(s,r)}parseAsync(e,t){const s=this;return new Promise((function(r,n){s.parse(e,t,r,n)}))}}function n(){let e={};return{get:function(t){return e[t]},add:function(t,s){e[t]=s},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const o={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_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_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_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 i{constructor(e){this.parser=e,this.name=o.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let s=0,r=t.length;s<r;s++){const r=t[s];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const s=this.parser,r="light:"+e;let n=s.cache.get(r);if(n)return n;const o=s.json,i=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e];let a;const c=new t.Color(16777215);void 0!==i.color&&c.fromArray(i.color);const l=void 0!==i.range?i.range:0;switch(i.type){case"directional":a=new t.DirectionalLight(c),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new t.PointLight(c),a.distance=l;break;case"spot":a=new t.SpotLight(c),a.distance=l,i.spot=i.spot||{},i.spot.innerConeAngle=void 0!==i.spot.innerConeAngle?i.spot.innerConeAngle:0,i.spot.outerConeAngle=void 0!==i.spot.outerConeAngle?i.spot.outerConeAngle:Math.PI/4,a.angle=i.spot.outerConeAngle,a.penumbra=1-i.spot.innerConeAngle/i.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+i.type)}return a.position.set(0,0,0),a.decay=2,K(a,i),void 0!==i.intensity&&(a.intensity=i.intensity),a.name=s.createUniqueName(i.name||"light_"+e),n=Promise.resolve(a),s.cache.add(r,n),n}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,s=this.parser,r=s.json.nodes[e],n=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===n?null:this._loadLight(n).then((function(e){return s._getNodeRef(t.cache,n,e)}))}}class a{constructor(){this.name=o.KHR_MATERIALS_UNLIT}getMaterialType(){return t.MeshBasicMaterial}extendParams(e,s,r){const n=[];e.color=new t.Color(1,1,1),e.opacity=1;const o=s.pbrMetallicRoughness;if(o){if(Array.isArray(o.baseColorFactor)){const t=o.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==o.baseColorTexture&&n.push(r.assignTexture(e,"map",o.baseColorTexture,t.SRGBColorSpace))}return Promise.all(n)}}class c{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class l{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,s){const r=this.parser,n=r.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const o=[],i=n.extensions[this.name];if(void 0!==i.clearcoatFactor&&(s.clearcoat=i.clearcoatFactor),void 0!==i.clearcoatTexture&&o.push(r.assignTexture(s,"clearcoatMap",i.clearcoatTexture)),void 0!==i.clearcoatRoughnessFactor&&(s.clearcoatRoughness=i.clearcoatRoughnessFactor),void 0!==i.clearcoatRoughnessTexture&&o.push(r.assignTexture(s,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),void 0!==i.clearcoatNormalTexture&&(o.push(r.assignTexture(s,"clearcoatNormalMap",i.clearcoatNormalTexture)),void 0!==i.clearcoatNormalTexture.scale)){const e=i.clearcoatNormalTexture.scale;s.clearcoatNormalScale=new t.Vector2(e,e)}return Promise.all(o)}}class u{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,r=s.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const n=[],o=r.extensions[this.name];return void 0!==o.iridescenceFactor&&(t.iridescence=o.iridescenceFactor),void 0!==o.iridescenceTexture&&n.push(s.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),void 0!==o.iridescenceIor&&(t.iridescenceIOR=o.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==o.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),void 0!==o.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),void 0!==o.iridescenceThicknessTexture&&n.push(s.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(n)}}class h{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_SHEEN}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,s){const r=this.parser,n=r.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const o=[];s.sheenColor=new t.Color(0,0,0),s.sheenRoughness=0,s.sheen=1;const i=n.extensions[this.name];return void 0!==i.sheenColorFactor&&s.sheenColor.fromArray(i.sheenColorFactor),void 0!==i.sheenRoughnessFactor&&(s.sheenRoughness=i.sheenRoughnessFactor),void 0!==i.sheenColorTexture&&o.push(r.assignTexture(s,"sheenColorMap",i.sheenColorTexture,t.SRGBColorSpace)),void 0!==i.sheenRoughnessTexture&&o.push(r.assignTexture(s,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(o)}}class d{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser,r=s.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const n=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&n.push(s.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(n)}}class p{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_VOLUME}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,s){const r=this.parser,n=r.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const o=[],i=n.extensions[this.name];s.thickness=void 0!==i.thicknessFactor?i.thicknessFactor:0,void 0!==i.thicknessTexture&&o.push(r.assignTexture(s,"thicknessMap",i.thicknessTexture)),s.attenuationDistance=i.attenuationDistance||1/0;const a=i.attenuationColor||[1,1,1];return s.attenuationColor=new t.Color(a[0],a[1],a[2]),Promise.all(o)}}class m{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_IOR}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class f{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_SPECULAR}getMaterialType(e){const s=this.parser.json.materials[e];return s.extensions&&s.extensions[this.name]?t.MeshPhysicalMaterial:null}extendMaterialParams(e,s){const r=this.parser,n=r.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const o=[],i=n.extensions[this.name];s.specularIntensity=void 0!==i.specularFactor?i.specularFactor:1,void 0!==i.specularTexture&&o.push(r.assignTexture(s,"specularIntensityMap",i.specularTexture));const a=i.specularColorFactor||[1,1,1];return s.specularColor=new t.Color(a[0],a[1],a[2]),void 0!==i.specularColorTexture&&o.push(r.assignTexture(s,"specularColorMap",i.specularColorTexture,t.SRGBColorSpace)),Promise.all(o)}}class A{constructor(e){this.parser=e,this.name=o.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,s=t.json,r=s.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const n=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,n.source,o)}}class g{constructor(e){this.parser=e,this.name=o.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,r=s.json,n=r.textures[e];if(!n.extensions||!n.extensions[t])return null;const o=n.extensions[t],i=r.images[o.source];let a=s.textureLoader;if(i.uri){const e=s.options.manager.getHandler(i.uri);null!==e&&(a=e)}return this.detectSupport().then((function(n){if(n)return s.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return s.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class T{constructor(e){this.parser=e,this.name=o.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,r=s.json,n=r.textures[e];if(!n.extensions||!n.extensions[t])return null;const o=n.extensions[t],i=r.images[o.source];let a=s.textureLoader;if(i.uri){const e=s.options.manager.getHandler(i.uri);null!==e&&(a=e)}return this.detectSupport().then((function(n){if(n)return s.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return s.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class x{constructor(e){this.name=o.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,s=t.bufferViews[e];if(s.extensions&&s.extensions[this.name]){const e=s.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const s=e.byteOffset||0,r=e.byteLength||0,o=e.count,i=e.byteStride,a=new Uint8Array(t,s,r);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(o,i,a,e.mode,e.filter).then((function(e){return e.buffer})):n.ready.then((function(){const t=new ArrayBuffer(o*i);return n.decodeGltfBuffer(new Uint8Array(t),o,i,a,e.mode,e.filter),t}))}))}return null}}class R{constructor(e){this.name=o.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const s=this.parser.json,r=s.nodes[e];if(!r.extensions||!r.extensions[this.name]||void 0===r.mesh)return null;const n=s.meshes[r.mesh];for(const e of n.primitives)if(e.mode!==C.TRIANGLES&&e.mode!==C.TRIANGLE_STRIP&&e.mode!==C.TRIANGLE_FAN&&void 0!==e.mode)return null;const o=r.extensions[this.name].attributes,i=[],a={};for(const e in o)i.push(this.parser.getDependency("accessor",o[e]).then((t=>(a[e]=t,a[e]))));return i.length<1?null:(i.push(this.parser.createNodeMesh(e)),Promise.all(i).then((e=>{const s=e.pop(),r=s.isGroup?s.children:[s],n=e[0].count,o=[];for(const e of r){const s=new t.Matrix4,r=new t.Vector3,i=new t.Quaternion,c=new t.Vector3(1,1,1),l=new t.InstancedMesh(e.geometry,e.material,n);for(let e=0;e<n;e++)a.TRANSLATION&&r.fromBufferAttribute(a.TRANSLATION,e),a.ROTATION&&i.fromBufferAttribute(a.ROTATION,e),a.SCALE&&c.fromBufferAttribute(a.SCALE,e),l.setMatrixAt(e,s.compose(r,i,c));for(const t in a)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,a[t]);t.Object3D.prototype.copy.call(l,e),this.parser.assignFinalMaterial(l),o.push(l)}return s.isGroup?(s.clear(),s.add(...o),s):o[0]})))}}const y="glTF",w=1313821514,_=5130562;class v{constructor(e){this.name=o.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==y)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-12,n=new DataView(e,12);let i=0;for(;i<r;){const t=n.getUint32(i,!0);i+=4;const r=n.getUint32(i,!0);if(i+=4,r===w){const r=new Uint8Array(e,12+i,t);this.content=s.decode(r)}else if(r===_){const s=12+i;this.body=e.slice(s,s+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class E{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=o.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const s=this.json,r=this.dracoLoader,n=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,i={},a={},c={};for(const e in o){const t=D[e]||e.toLowerCase();i[t]=o[e]}for(const t in e.attributes){const r=D[t]||t.toLowerCase();if(void 0!==o[t]){const n=s.accessors[e.attributes[t]],o=P[n.componentType];c[r]=o.name,a[r]=!0===n.normalized}}return t.getDependency("bufferView",n).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const s=e.attributes[t],r=a[t];void 0!==r&&(s.normalized=r)}t(e)}),i,c)}))}))}}class M{constructor(){this.name=o.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&t.texCoord!==e.channel||void 0!==t.offset||void 0!==t.rotation||void 0!==t.scale?(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e):e}}class b{constructor(){this.name=o.KHR_MESH_QUANTIZATION}}class L extends t.Interpolant{constructor(e,t,s,r){super(e,t,s,r)}copySampleValue_(e){const t=this.resultBuffer,s=this.sampleValues,r=this.valueSize,n=e*r*3+r;for(let e=0;e!==r;e++)t[e]=s[n+e];return t}interpolate_(e,t,s,r){const n=this.resultBuffer,o=this.sampleValues,i=this.valueSize,a=2*i,c=3*i,l=r-t,u=(s-t)/l,h=u*u,d=h*u,p=e*c,m=p-c,f=-2*d+3*h,A=d-h,g=1-f,T=A-h+u;for(let e=0;e!==i;e++){const t=o[m+e+i],s=o[m+e+a]*l,r=o[p+e+i],c=o[p+e]*l;n[e]=g*t+T*s+f*r+A*c}return n}}const S=new t.Quaternion;class I extends L{interpolate_(e,t,s,r){const n=super.interpolate_(e,t,s,r);return S.fromArray(n).normalize().toArray(n),n}}const C={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},P={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},N={9728:t.NearestFilter,9729:t.LinearFilter,9984:t.NearestMipmapNearestFilter,9985:t.LinearMipmapNearestFilter,9986:t.NearestMipmapLinearFilter,9987:t.LinearMipmapLinearFilter},O={33071:t.ClampToEdgeWrapping,33648:t.MirroredRepeatWrapping,10497:t.RepeatWrapping},k={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},D={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"},F={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},H={CUBICSPLINE:void 0,LINEAR:t.InterpolateLinear,STEP:t.InterpolateDiscrete},U="OPAQUE",B="MASK",G="BLEND";function j(e,t,s){for(const r in s.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=s.extensions[r])}function K(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function V(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let s=0,r=t.weights.length;s<r;s++)e.morphTargetInfluences[s]=t.weights[s];if(t.extras&&Array.isArray(t.extras.targetNames)){const s=t.extras.targetNames;if(e.morphTargetInfluences.length===s.length){e.morphTargetDictionary={};for(let t=0,r=s.length;t<r;t++)e.morphTargetDictionary[s[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function X(e){const t=e.extensions&&e.extensions[o.KHR_DRACO_MESH_COMPRESSION];let s;return s=t?"draco:"+t.bufferView+":"+t.indices+":"+W(t.attributes):e.indices+":"+W(e.attributes)+":"+e.mode,s}function W(e){let t="";const s=Object.keys(e).sort();for(let r=0,n=s.length;r<n;r++)t+=s[r]+":"+e[s[r]]+";";return t}function q(e){switch(e){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.")}}const z=new t.Matrix4;class Q{constructor(e={},s={}){this.json=e,this.extensions={},this.plugins={},this.options=s,this.cache=new n,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,o=!1,i=-1;"undefined"!=typeof navigator&&(r=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o=navigator.userAgent.indexOf("Firefox")>-1,i=o?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||r||o&&i<98?this.textureLoader=new t.TextureLoader(this.options.manager):this.textureLoader=new t.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new t.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const s=this,r=this.json,n=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])})).then((function(t){const o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:s,userData:{}};j(n,o,r),K(o,r),Promise.all(s._invokeAll((function(e){return e.afterRoot&&e.afterRoot(o)}))).then((function(){e(o)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],s=this.json.meshes||[];for(let s=0,r=t.length;s<r;s++){const r=t[s].joints;for(let t=0,s=r.length;t<s;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(s[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,s){if(e.refs[t]<=1)return s;const r=s.clone(),n=(e,t)=>{const s=this.associations.get(e);null!=s&&this.associations.set(t,s);for(const[s,r]of e.children.entries())n(r,t.children[s])};return n(s,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let s=0;s<t.length;s++){const r=e(t[s]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const s=[];for(let r=0;r<t.length;r++){const n=e(t[r]);n&&s.push(n)}return s}getDependency(e,t){const s=e+":"+t;let r=this.cache.get(s);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne((function(e){return e.loadNode&&e.loadNode(t)}));break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne((function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)})),!r)throw new Error("Unknown type: "+e)}this.cache.add(s,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const s=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return s.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const s=this.json.buffers[e],r=this.fileLoader;if(s.type&&"arraybuffer"!==s.type)throw new Error("THREE.GLTFLoader: "+s.type+" buffer type is not supported.");if(void 0===s.uri&&0===e)return Promise.resolve(this.extensions[o.KHR_BINARY_GLTF].body);const n=this.options;return new Promise((function(e,o){r.load(t.LoaderUtils.resolveURL(s.uri,n.path),e,void 0,(function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+s.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const s=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+s)}))}loadAccessor(e){const s=this,r=this.json,n=this.json.accessors[e];if(void 0===n.bufferView&&void 0===n.sparse){const e=k[n.type],s=P[n.componentType],r=!0===n.normalized,o=new s(n.count*e);return Promise.resolve(new t.BufferAttribute(o,e,r))}const o=[];return void 0!==n.bufferView?o.push(this.getDependency("bufferView",n.bufferView)):o.push(null),void 0!==n.sparse&&(o.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),o.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(o).then((function(e){const o=e[0],i=k[n.type],a=P[n.componentType],c=a.BYTES_PER_ELEMENT,l=c*i,u=n.byteOffset||0,h=void 0!==n.bufferView?r.bufferViews[n.bufferView].byteStride:void 0,d=!0===n.normalized;let p,m;if(h&&h!==l){const e=Math.floor(u/h),r="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+e+":"+n.count;let l=s.cache.get(r);l||(p=new a(o,e*h,n.count*h/c),l=new t.InterleavedBuffer(p,h/c),s.cache.add(r,l)),m=new t.InterleavedBufferAttribute(l,i,u%h/c,d)}else p=null===o?new a(n.count*i):new a(o,u,n.count*i),m=new t.BufferAttribute(p,i,d);if(void 0!==n.sparse){const s=k.SCALAR,r=P[n.sparse.indices.componentType],c=n.sparse.indices.byteOffset||0,l=n.sparse.values.byteOffset||0,u=new r(e[1],c,n.sparse.count*s),h=new a(e[2],l,n.sparse.count*i);null!==o&&(m=new t.BufferAttribute(m.array.slice(),m.itemSize,m.normalized));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(m.setX(t,h[e*i]),i>=2&&m.setY(t,h[e*i+1]),i>=3&&m.setZ(t,h[e*i+2]),i>=4&&m.setW(t,h[e*i+3]),i>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m}))}loadTexture(e){const t=this.json,s=this.options,r=t.textures[e].source,n=t.images[r];let o=this.textureLoader;if(n.uri){const e=s.manager.getHandler(n.uri);null!==e&&(o=e)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,s,r){const n=this,o=this.json,i=o.textures[e],a=o.images[s],c=(a.uri||a.bufferView)+":"+i.sampler;if(this.textureCache[c])return this.textureCache[c];const l=this.loadImageSource(s,r).then((function(s){s.flipY=!1,s.name=i.name||a.name||"",""===s.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(s.name=a.uri);const r=(o.samplers||{})[i.sampler]||{};return s.magFilter=N[r.magFilter]||t.LinearFilter,s.minFilter=N[r.minFilter]||t.LinearMipmapLinearFilter,s.wrapS=O[r.wrapS]||t.RepeatWrapping,s.wrapT=O[r.wrapT]||t.RepeatWrapping,n.associations.set(s,{textures:e}),s})).catch((function(){return null}));return this.textureCache[c]=l,l}loadImageSource(e,s){const r=this,n=this.json,o=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const i=n.images[e],a=self.URL||self.webkitURL;let c=i.uri||"",l=!1;if(void 0!==i.bufferView)c=r.getDependency("bufferView",i.bufferView).then((function(e){l=!0;const t=new Blob([e],{type:i.mimeType});return c=a.createObjectURL(t),c}));else if(void 0===i.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(c).then((function(e){return new Promise((function(r,n){let i=r;!0===s.isImageBitmapLoader&&(i=function(e){const s=new t.Texture(e);s.needsUpdate=!0,r(s)}),s.load(t.LoaderUtils.resolveURL(e,o.path),i,void 0,n)}))})).then((function(e){var t;return!0===l&&a.revokeObjectURL(c),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),e}));return this.sourceCache[e]=u,u}assignTexture(e,t,s,r){const n=this;return this.getDependency("texture",s.index).then((function(i){if(!i)return null;if(void 0!==s.texCoord&&s.texCoord>0&&((i=i.clone()).channel=s.texCoord),n.extensions[o.KHR_TEXTURE_TRANSFORM]){const e=void 0!==s.extensions?s.extensions[o.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=n.associations.get(i);i=n.extensions[o.KHR_TEXTURE_TRANSFORM].extendTexture(i,e),n.associations.set(i,t)}}return void 0!==r&&(i.colorSpace=r),e[t]=i,i}))}assignFinalMaterial(e){const s=e.geometry;let r=e.material;const n=void 0===s.attributes.tangent,o=void 0!==s.attributes.color,i=void 0===s.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+r.uuid;let s=this.cache.get(e);s||(s=new t.PointsMaterial,t.Material.prototype.copy.call(s,r),s.color.copy(r.color),s.map=r.map,s.sizeAttenuation=!1,this.cache.add(e,s)),r=s}else if(e.isLine){const e="LineBasicMaterial:"+r.uuid;let s=this.cache.get(e);s||(s=new t.LineBasicMaterial,t.Material.prototype.copy.call(s,r),s.color.copy(r.color),s.map=r.map,this.cache.add(e,s)),r=s}if(n||o||i){let e="ClonedMaterial:"+r.uuid+":";n&&(e+="derivative-tangents:"),o&&(e+="vertex-colors:"),i&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=r.clone(),o&&(t.vertexColors=!0),i&&(t.flatShading=!0),n&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(r))),r=t}e.material=r}getMaterialType(){return t.MeshStandardMaterial}loadMaterial(e){const s=this,r=this.json,n=this.extensions,i=r.materials[e];let a;const c={},l=[];if((i.extensions||{})[o.KHR_MATERIALS_UNLIT]){const e=n[o.KHR_MATERIALS_UNLIT];a=e.getMaterialType(),l.push(e.extendParams(c,i,s))}else{const r=i.pbrMetallicRoughness||{};if(c.color=new t.Color(1,1,1),c.opacity=1,Array.isArray(r.baseColorFactor)){const e=r.baseColorFactor;c.color.fromArray(e),c.opacity=e[3]}void 0!==r.baseColorTexture&&l.push(s.assignTexture(c,"map",r.baseColorTexture,t.SRGBColorSpace)),c.metalness=void 0!==r.metallicFactor?r.metallicFactor:1,c.roughness=void 0!==r.roughnessFactor?r.roughnessFactor:1,void 0!==r.metallicRoughnessTexture&&(l.push(s.assignTexture(c,"metalnessMap",r.metallicRoughnessTexture)),l.push(s.assignTexture(c,"roughnessMap",r.metallicRoughnessTexture))),a=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),l.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,c)}))))}!0===i.doubleSided&&(c.side=t.DoubleSide);const u=i.alphaMode||U;if(u===G?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,u===B&&(c.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&a!==t.MeshBasicMaterial&&(l.push(s.assignTexture(c,"normalMap",i.normalTexture)),c.normalScale=new t.Vector2(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;c.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&a!==t.MeshBasicMaterial&&(l.push(s.assignTexture(c,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(c.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&a!==t.MeshBasicMaterial&&(c.emissive=(new t.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&a!==t.MeshBasicMaterial&&l.push(s.assignTexture(c,"emissiveMap",i.emissiveTexture,t.SRGBColorSpace)),Promise.all(l).then((function(){const t=new a(c);return i.name&&(t.name=i.name),K(t,i),s.associations.set(t,{materials:e}),i.extensions&&j(n,t,i),t}))}createUniqueName(e){const s=t.PropertyBinding.sanitizeNodeName(e||"");let r=s;for(let e=1;this.nodeNamesUsed[r];++e)r=s+"_"+e;return this.nodeNamesUsed[r]=!0,r}loadGeometries(e){const s=this,r=this.extensions,n=this.primitiveCache;function i(e){return r[o.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,s).then((function(t){return Y(t,e,s)}))}const a=[];for(let r=0,c=e.length;r<c;r++){const c=e[r],l=X(c),u=n[l];if(u)a.push(u.promise);else{let e;e=c.extensions&&c.extensions[o.KHR_DRACO_MESH_COMPRESSION]?i(c):Y(new t.BufferGeometry,c,s),n[l]={primitive:c,promise:e},a.push(e)}}return Promise.all(a)}loadMesh(e){const r=this,n=this.json,o=this.extensions,i=n.meshes[e],a=i.primitives,c=[];for(let e=0,s=a.length;e<s;e++){const s=void 0===a[e].material?(void 0===(l=this.cache).DefaultMaterial&&(l.DefaultMaterial=new t.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:t.FrontSide})),l.DefaultMaterial):this.getDependency("material",a[e].material);c.push(s)}var l;return c.push(r.loadGeometries(a)),Promise.all(c).then((function(n){const c=n.slice(0,n.length-1),l=n[n.length-1],u=[];for(let n=0,h=l.length;n<h;n++){const h=l[n],d=a[n];let p;const m=c[n];if(d.mode===C.TRIANGLES||d.mode===C.TRIANGLE_STRIP||d.mode===C.TRIANGLE_FAN||void 0===d.mode)p=!0===i.isSkinnedMesh?new t.SkinnedMesh(h,m):new t.Mesh(h,m),!0===p.isSkinnedMesh&&p.normalizeSkinWeights(),d.mode===C.TRIANGLE_STRIP?p.geometry=s(p.geometry,t.TriangleStripDrawMode):d.mode===C.TRIANGLE_FAN&&(p.geometry=s(p.geometry,t.TriangleFanDrawMode));else if(d.mode===C.LINES)p=new t.LineSegments(h,m);else if(d.mode===C.LINE_STRIP)p=new t.Line(h,m);else if(d.mode===C.LINE_LOOP)p=new t.LineLoop(h,m);else{if(d.mode!==C.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+d.mode);p=new t.Points(h,m)}Object.keys(p.geometry.morphAttributes).length>0&&V(p,i),p.name=r.createUniqueName(i.name||"mesh_"+e),K(p,i),d.extensions&&j(o,p,d),r.assignFinalMaterial(p),u.push(p)}for(let t=0,s=u.length;t<s;t++)r.associations.set(u[t],{meshes:e,primitives:t});if(1===u.length)return u[0];const h=new t.Group;r.associations.set(h,{meshes:e});for(let e=0,t=u.length;e<t;e++)h.add(u[e]);return h}))}loadCamera(e){let s;const r=this.json.cameras[e],n=r[r.type];if(n)return"perspective"===r.type?s=new t.PerspectiveCamera(t.MathUtils.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):"orthographic"===r.type&&(s=new t.OrthographicCamera(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),r.name&&(s.name=this.createUniqueName(r.name)),K(s,r),Promise.resolve(s);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const s=this.json.skins[e],r=[];for(let e=0,t=s.joints.length;e<t;e++)r.push(this._loadNodeShallow(s.joints[e]));return void 0!==s.inverseBindMatrices?r.push(this.getDependency("accessor",s.inverseBindMatrices)):r.push(null),Promise.all(r).then((function(e){const r=e.pop(),n=e,o=[],i=[];for(let e=0,a=n.length;e<a;e++){const a=n[e];if(a){o.push(a);const s=new t.Matrix4;null!==r&&s.fromArray(r.array,16*e),i.push(s)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',s.joints[e])}return new t.Skeleton(o,i)}))}loadAnimation(e){const s=this.json.animations[e],r=s.name?s.name:"animation_"+e,n=[],o=[],i=[],a=[],c=[];for(let e=0,t=s.channels.length;e<t;e++){const t=s.channels[e],r=s.samplers[t.sampler],l=t.target,u=l.node,h=void 0!==s.parameters?s.parameters[r.input]:r.input,d=void 0!==s.parameters?s.parameters[r.output]:r.output;void 0!==l.node&&(n.push(this.getDependency("node",u)),o.push(this.getDependency("accessor",h)),i.push(this.getDependency("accessor",d)),a.push(r),c.push(l))}return Promise.all([Promise.all(n),Promise.all(o),Promise.all(i),Promise.all(a),Promise.all(c)]).then((function(e){const s=e[0],n=e[1],o=e[2],i=e[3],a=e[4],c=[];for(let e=0,r=s.length;e<r;e++){const r=s[e],l=n[e],u=o[e],h=i[e],d=a[e];if(void 0===r)continue;let p;switch(r.updateMatrix(),F[d.path]){case F.weights:p=t.NumberKeyframeTrack;break;case F.rotation:p=t.QuaternionKeyframeTrack;break;default:p=t.VectorKeyframeTrack}const m=r.name?r.name:r.uuid,f=void 0!==h.interpolation?H[h.interpolation]:t.InterpolateLinear,A=[];F[d.path]===F.weights?r.traverse((function(e){e.morphTargetInfluences&&A.push(e.name?e.name:e.uuid)})):A.push(m);let g=u.array;if(u.normalized){const e=q(g.constructor),t=new Float32Array(g.length);for(let s=0,r=g.length;s<r;s++)t[s]=g[s]*e;g=t}for(let e=0,s=A.length;e<s;e++){const s=new p(A[e]+"."+F[d.path],l.array,g,f);"CUBICSPLINE"===h.interpolation&&(s.createInterpolant=function(e){return new(this instanceof t.QuaternionKeyframeTrack?I:L)(this.times,this.values,this.getValueSize()/3,e)},s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),c.push(s)}}return new t.AnimationClip(r,void 0,c)}))}createNodeMesh(e){const t=this.json,s=this,r=t.nodes[e];return void 0===r.mesh?null:s.getDependency("mesh",r.mesh).then((function(e){const t=s._getNodeRef(s.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,s=r.weights.length;t<s;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this,s=this.json.nodes[e],r=t._loadNodeShallow(e),n=[],o=s.children||[];for(let e=0,s=o.length;e<s;e++)n.push(t.getDependency("node",o[e]));const i=void 0===s.skin?Promise.resolve(null):t.getDependency("skin",s.skin);return Promise.all([r,Promise.all(n),i]).then((function(e){const t=e[0],s=e[1],r=e[2];null!==r&&t.traverse((function(e){e.isSkinnedMesh&&e.bind(r,z)}));for(let e=0,r=s.length;e<r;e++)t.add(s[e]);return t}))}_loadNodeShallow(e){const s=this.json,r=this.extensions,n=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const o=s.nodes[e],i=o.name?n.createUniqueName(o.name):"",a=[],c=n._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return c&&a.push(c),void 0!==o.camera&&a.push(n.getDependency("camera",o.camera).then((function(e){return n._getNodeRef(n.cameraCache,o.camera,e)}))),n._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){a.push(e)})),this.nodeCache[e]=Promise.all(a).then((function(s){let a;if(a=!0===o.isBone?new t.Bone:s.length>1?new t.Group:1===s.length?s[0]:new t.Object3D,a!==s[0])for(let e=0,t=s.length;e<t;e++)a.add(s[e]);if(o.name&&(a.userData.name=o.name,a.name=i),K(a,o),o.extensions&&j(r,a,o),void 0!==o.matrix){const e=new t.Matrix4;e.fromArray(o.matrix),a.applyMatrix4(e)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return n.associations.has(a)||n.associations.set(a,{}),n.associations.get(a).nodes=e,a})),this.nodeCache[e]}loadScene(e){const s=this.extensions,r=this.json.scenes[e],n=this,o=new t.Group;r.name&&(o.name=n.createUniqueName(r.name)),K(o,r),r.extensions&&j(s,o,r);const i=r.nodes||[],a=[];for(let e=0,t=i.length;e<t;e++)a.push(n.getDependency("node",i[e]));return Promise.all(a).then((function(e){for(let t=0,s=e.length;t<s;t++)o.add(e[t]);return n.associations=(e=>{const s=new Map;for(const[e,r]of n.associations)(e instanceof t.Material||e instanceof t.Texture)&&s.set(e,r);return e.traverse((e=>{const t=n.associations.get(e);null!=t&&s.set(e,t)})),s})(o),o}))}}function Y(e,s,r){const n=s.attributes,o=[];function i(t,s){return r.getDependency("accessor",t).then((function(t){e.setAttribute(s,t)}))}for(const t in n){const s=D[t]||t.toLowerCase();s in e.attributes||o.push(i(n[t],s))}if(void 0!==s.indices&&!e.index){const t=r.getDependency("accessor",s.indices).then((function(t){e.setIndex(t)}));o.push(t)}return K(e,s),function(e,s,r){const n=s.attributes,o=new t.Box3;if(void 0===n.POSITION)return;{const e=r.json.accessors[n.POSITION],s=e.min,i=e.max;if(void 0===s||void 0===i)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(o.set(new t.Vector3(s[0],s[1],s[2]),new t.Vector3(i[0],i[1],i[2])),e.normalized){const t=q(P[e.componentType]);o.min.multiplyScalar(t),o.max.multiplyScalar(t)}}const i=s.targets;if(void 0!==i){const e=new t.Vector3,s=new t.Vector3;for(let t=0,n=i.length;t<n;t++){const n=i[t];if(void 0!==n.POSITION){const t=r.json.accessors[n.POSITION],o=t.min,i=t.max;if(void 0!==o&&void 0!==i){if(s.setX(Math.max(Math.abs(o[0]),Math.abs(i[0]))),s.setY(Math.max(Math.abs(o[1]),Math.abs(i[1]))),s.setZ(Math.max(Math.abs(o[2]),Math.abs(i[2]))),t.normalized){const e=q(P[t.componentType]);s.multiplyScalar(e)}e.max(s)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}o.expandByVector(e)}e.boundingBox=o;const a=new t.Sphere;o.getCenter(a.center),a.radius=o.min.distanceTo(o.max)/2,e.boundingSphere=a}(e,s,r),Promise.all(o).then((function(){return void 0!==s.targets?function(e,t,s){let r=!1,n=!1,o=!1;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(void 0!==s.POSITION&&(r=!0),void 0!==s.NORMAL&&(n=!0),void 0!==s.COLOR_0&&(o=!0),r&&n&&o)break}if(!r&&!n&&!o)return Promise.resolve(e);const i=[],a=[],c=[];for(let l=0,u=t.length;l<u;l++){const u=t[l];if(r){const t=void 0!==u.POSITION?s.getDependency("accessor",u.POSITION):e.attributes.position;i.push(t)}if(n){const t=void 0!==u.NORMAL?s.getDependency("accessor",u.NORMAL):e.attributes.normal;a.push(t)}if(o){const t=void 0!==u.COLOR_0?s.getDependency("accessor",u.COLOR_0):e.attributes.color;c.push(t)}}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(c)]).then((function(t){const s=t[0],i=t[1],a=t[2];return r&&(e.morphAttributes.position=s),n&&(e.morphAttributes.normal=i),o&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,s.targets,r):e}))}const Z=new WeakMap;class J extends t.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,s,r,n){const o=new t.FileLoader(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(e=>{this.parse(e,s,n)}),r,n)}parse(e,s,r){this.decodeDracoFile(e,s,null,null,t.SRGBColorSpace).catch(r)}decodeDracoFile(e,s,r,n,o=t.LinearSRGBColorSpace){const i={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!r,vertexColorSpace:o};return this.decodeGeometry(e,i).then(s)}decodeGeometry(e,t){const s=JSON.stringify(t);if(Z.has(e)){const t=Z.get(e);if(t.key===s)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const n=this.workerNextTaskID++,o=e.byteLength,i=this._getWorker(n,o).then((s=>(r=s,new Promise(((s,o)=>{r._callbacks[n]={resolve:s,reject:o},r.postMessage({type:"decode",id:n,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return i.catch((()=>!0)).then((()=>{r&&n&&this._releaseTask(r,n)})),Z.set(e,{key:s,promise:i}),i}_createGeometry(e){const s=new t.BufferGeometry;e.index&&s.setIndex(new t.BufferAttribute(e.index.array,1));for(let r=0;r<e.attributes.length;r++){const n=e.attributes[r],o=n.name,i=n.array,a=n.itemSize,c=new t.BufferAttribute(i,a);"color"===o&&this._assignVertexColorSpace(c,n.vertexColorSpace),s.setAttribute(o,c)}return s}_assignVertexColorSpace(e,s){if(s!==t.SRGBColorSpace)return;const r=new t.Color;for(let t=0,s=e.count;t<s;t++)r.fromBufferAttribute(e,t).convertSRGBToLinear(),e.setXYZ(t,r.r,r.g,r.b)}_loadLibrary(e,s){const r=new t.FileLoader(this.manager);return r.setPath(this.decoderPath),r.setResponseType(s),r.setWithCredentials(this.withCredentials),new Promise(((t,s)=>{r.load(e,t,void 0,s)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const s=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=$.toString(),n=["/* draco decoder */",s,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const s=t.data;switch(s.type){case"decode":e._callbacks[s.id].resolve(s);break;case"error":e._callbacks[s.id].reject(s);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+s.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const s=this.workerPool[this.workerPool.length-1];return s._taskCosts[e]=t,s._taskLoad+=t,s}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,""!==this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),this}}function $(){let e,t;function s(e,t,s,r,n,o){const i=o.num_components(),a=s.num_points()*i,c=a*n.BYTES_PER_ELEMENT,l=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,n),u=e._malloc(c);t.GetAttributeDataArrayForAllPoints(s,o,l,c,u);const h=new n(e.HEAPF32.buffer,u,a).slice();return e._free(u),{name:r,array:h,itemSize:i}}onmessage=function(r){const n=r.data;switch(n.type){case"init":e=n.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const r=n.buffer,o=n.taskConfig;t.then((e=>{const t=e.draco,i=new t.Decoder;try{const e=function(e,t,r,n){const o=n.attributeIDs,i=n.attributeTypes;let a,c;const l=t.GetEncodedGeometryType(r);if(l===e.TRIANGULAR_MESH)a=new e.Mesh,c=t.DecodeArrayToMesh(r,r.byteLength,a);else{if(l!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new e.PointCloud,c=t.DecodeArrayToPointCloud(r,r.byteLength,a)}if(!c.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+c.error_msg());const u={index:null,attributes:[]};for(const r in o){const c=self[i[r]];let l,h;if(n.useUniqueIDs)h=o[r],l=t.GetAttributeByUniqueId(a,h);else{if(h=t.GetAttributeId(a,e[o[r]]),-1===h)continue;l=t.GetAttribute(a,h)}const d=s(e,t,a,r,c,l);"color"===r&&(d.vertexColorSpace=n.vertexColorSpace),u.attributes.push(d)}l===e.TRIANGULAR_MESH&&(u.index=function(e,t,s){const r=s.num_faces(),n=3*r,o=4*n,i=e._malloc(o);t.GetTrianglesUInt32Array(s,o,i);const a=new Uint32Array(e.HEAPF32.buffer,i,n).slice();return e._free(i),{array:a,itemSize:1}}(e,t,a));return e.destroy(a),u}(t,i,new Int8Array(r),o),a=e.attributes.map((e=>e.array.buffer));e.index&&a.push(e.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:e},a)}catch(e){console.error(e),self.postMessage({type:"error",id:n.id,error:e.message})}finally{t.destroy(i)}}))}}}function ee(e,s,r={}){const n=new t.Vector3,o=new t.Quaternion,i=new t.Vector3,a=new t.Matrix4,c=new t.Matrix4,l=new t.Matrix4;r.preserveMatrix=void 0===r.preserveMatrix||r.preserveMatrix,r.preservePosition=void 0===r.preservePosition||r.preservePosition,r.preserveHipPosition=void 0!==r.preserveHipPosition&&r.preserveHipPosition,r.useTargetMatrix=void 0!==r.useTargetMatrix&&r.useTargetMatrix,r.hip=void 0!==r.hip?r.hip:"hip",r.names=r.names||{};const u=s.isObject3D?s.skeleton.bones:se(s),h=e.isObject3D?e.skeleton.bones:se(e);let d,p,m,f,A;if(e.isObject3D?e.skeleton.pose():(r.useTargetMatrix=!0,r.preserveMatrix=!1),r.preservePosition){A=[];for(let e=0;e<h.length;e++)A.push(h[e].position.clone())}if(r.preserveMatrix){e.updateMatrixWorld(),e.matrixWorld.identity();for(let t=0;t<e.children.length;++t)e.children[t].updateMatrixWorld(!0)}if(r.offsets){d=[];for(let e=0;e<h.length;++e)p=h[e],m=r.names[p.name]||p.name,r.offsets[m]&&(p.matrix.multiply(r.offsets[m]),p.matrix.decompose(p.position,p.quaternion,p.scale),p.updateMatrixWorld()),d.push(p.matrixWorld.clone())}for(let t=0;t<h.length;++t){if(p=h[t],m=r.names[p.name]||p.name,f=te(m,u),l.copy(p.matrixWorld),f){if(f.updateMatrixWorld(),r.useTargetMatrix?c.copy(f.matrixWorld):(c.copy(e.matrixWorld).invert(),c.multiply(f.matrixWorld)),i.setFromMatrixScale(c),c.scale(i.set(1/i.x,1/i.y,1/i.z)),l.makeRotationFromQuaternion(o.setFromRotationMatrix(c)),e.isObject3D){const t=h.indexOf(p),s=d?d[t]:a.copy(e.skeleton.boneInverses[t]).invert();l.multiply(s)}l.copyPosition(c)}p.parent&&p.parent.isBone?(p.matrix.copy(p.parent.matrixWorld).invert(),p.matrix.multiply(l)):p.matrix.copy(l),r.preserveHipPosition&&m===r.hip&&p.matrix.setPosition(n.set(0,p.position.y,0)),p.matrix.decompose(p.position,p.quaternion,p.scale),p.updateMatrixWorld()}if(r.preservePosition)for(let e=0;e<h.length;++e)p=h[e],m=r.names[p.name]||p.name,m!==r.hip&&p.position.copy(A[e]);r.preserveMatrix&&e.updateMatrixWorld(!0)}function te(e,t){for(let s=0,r=se(t);s<r.length;s++)if(e===r[s].name)return r[s]}function se(e){return Array.isArray(e)?e:e.bones}function re(e,t,s){s(e,t);for(let r=0;r<e.children.length;r++)re(e.children[r],t.children[r],s)}var ne=Object.freeze({__proto__:null,retarget:ee,retargetClip:function(e,s,r,n={}){n.useFirstFramePosition=void 0!==n.useFirstFramePosition&&n.useFirstFramePosition,n.fps=void 0!==n.fps?n.fps:30,n.names=n.names||[],s.isObject3D||(s=function(e){const s=new t.SkeletonHelper(e.bones[0]);return s.skeleton=e,s}(s));const o=Math.round(r.duration*(n.fps/1e3)*1e3),i=1/n.fps,a=[],c=new t.AnimationMixer(s),l=se(e.skeleton),u=[];let h,d,p,m,f;c.clipAction(r).play(),c.update(0),s.updateMatrixWorld();for(let t=0;t<o;++t){const r=t*i;ee(e,s,n);for(let e=0;e<l.length;++e)f=n.names[l[e].name]||l[e].name,p=te(f,s.skeleton),p&&(d=l[e],m=u[e]=u[e]||{bone:d},n.hip===f&&(m.pos||(m.pos={times:new Float32Array(o),values:new Float32Array(3*o)}),n.useFirstFramePosition&&(0===t&&(h=d.position.clone()),d.position.sub(h)),m.pos.times[t]=r,d.position.toArray(m.pos.values,3*t)),m.quat||(m.quat={times:new Float32Array(o),values:new Float32Array(4*o)}),m.quat.times[t]=r,d.quaternion.toArray(m.quat.values,4*t));c.update(i),s.updateMatrixWorld()}for(let e=0;e<u.length;++e)m=u[e],m&&(m.pos&&a.push(new t.VectorKeyframeTrack(".bones["+m.bone.name+"].position",m.pos.times,m.pos.values)),a.push(new t.QuaternionKeyframeTrack(".bones["+m.bone.name+"].quaternion",m.quat.times,m.quat.values)));return c.uncacheAction(r),new t.AnimationClip(r.name,-1,a)},clone:function(e){const t=new Map,s=new Map,r=e.clone();return re(e,r,(function(e,r){t.set(r,e),s.set(e,r)})),r.traverse((function(e){if(!e.isSkinnedMesh)return;const r=e,n=t.get(e),o=n.skeleton.bones;r.skeleton=n.skeleton.clone(),r.bindMatrix.copy(n.bindMatrix),r.skeleton.bones=o.map((function(e){return s.get(e)})),r.bind(r.skeleton,r.bindMatrix)})),r}});e.DRACOLoader=J,e.GLTFLoader=r,e.SkeletonUtils=ne,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
|
+
//# sourceMappingURL=ThreeAddons.js.map
|
|
Binary file
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(h){var n=0;return function(){return n<h.length?{done:!1,value:h[n++]}:{done:!0}}};$jscomp.arrayIterator=function(h){return{next:$jscomp.arrayIteratorImpl(h)}};$jscomp.makeIterator=function(h){var n="undefined"!=typeof Symbol&&Symbol.iterator&&h[Symbol.iterator];return n?n.call(h):$jscomp.arrayIterator(h)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
|
|
2
|
+
$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.getGlobal=function(h){h=["object"==typeof globalThis&&globalThis,h,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<h.length;++n){var k=h[n];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
|
3
|
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(h,n,k){if(h==Array.prototype||h==Object.prototype)return h;h[n]=k.value;return h};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";
|
|
4
|
+
var $jscomp$lookupPolyfilledValue=function(h,n){var k=$jscomp.propertyToPolyfillSymbol[n];if(null==k)return h[n];k=h[k];return void 0!==k?k:h[n]};$jscomp.polyfill=function(h,n,k,p){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(h,n,k,p):$jscomp.polyfillUnisolated(h,n,k,p))};
|
|
5
|
+
$jscomp.polyfillUnisolated=function(h,n,k,p){k=$jscomp.global;h=h.split(".");for(p=0;p<h.length-1;p++){var l=h[p];if(!(l in k))return;k=k[l]}h=h[h.length-1];p=k[h];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(k,h,{configurable:!0,writable:!0,value:n})};
|
|
6
|
+
$jscomp.polyfillIsolated=function(h,n,k,p){var l=h.split(".");h=1===l.length;p=l[0];p=!h&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<l.length-1;y++){var f=l[y];if(!(f in p))return;p=p[f]}l=l[l.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?p[l]:null;n=n(k);null!=n&&(h?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:n}):n!==k&&(void 0===$jscomp.propertyToPolyfillSymbol[l]&&(k=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE?
|
|
7
|
+
$jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+k+"$"+l),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:n})))};
|
|
8
|
+
$jscomp.polyfill("Promise",function(h){function n(){this.batch_=null}function k(f){return f instanceof l?f:new l(function(q,u){q(f)})}if(h&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return h;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)};
|
|
9
|
+
var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q<f.length;++q){var u=f[q];f[q]=null;try{u()}catch(A){this.asyncThrow_(A)}}}this.batch_=null};n.prototype.asyncThrow_=function(f){this.asyncExecuteFunction(function(){throw f;})};var l=function(f){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_();
|
|
10
|
+
try{f(q.resolve,q.reject)}catch(u){q.reject(u)}};l.prototype.createResolveAndReject_=function(){function f(A){return function(F){u||(u=!0,A.call(q,F))}}var q=this,u=!1;return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};l.prototype.resolveTo_=function(f){if(f===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof l)this.settleSameAsPromise_(f);else{a:switch(typeof f){case "object":var q=null!=f;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(f):
|
|
11
|
+
this.fulfill_(f)}};l.prototype.resolveToNonPromiseObj_=function(f){var q=void 0;try{q=f.then}catch(u){this.reject_(u);return}"function"==typeof q?this.settleSameAsThenable_(q,f):this.fulfill_(f)};l.prototype.reject_=function(f){this.settle_(2,f)};l.prototype.fulfill_=function(f){this.settle_(1,f)};l.prototype.settle_=function(f,q){if(0!=this.state_)throw Error("Cannot settle("+f+", "+q+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
|
|
12
|
+
this.executeOnSettledCallbacks_()};l.prototype.scheduleUnhandledRejectionCheck_=function(){var f=this;p(function(){if(f.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(f.result_)}},1)};l.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var f=$jscomp.global.CustomEvent,q=$jscomp.global.Event,u=$jscomp.global.dispatchEvent;if("undefined"===typeof u)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):
|
|
13
|
+
"function"===typeof q?f=new q("unhandledrejection",{cancelable:!0}):(f=$jscomp.global.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.result_;return u(f)};l.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)y.asyncExecute(this.onSettledCallbacks_[f]);this.onSettledCallbacks_=null}};var y=new n;l.prototype.settleSameAsPromise_=function(f){var q=this.createResolveAndReject_();
|
|
14
|
+
f.callWhenSettled_(q.resolve,q.reject)};l.prototype.settleSameAsThenable_=function(f,q){var u=this.createResolveAndReject_();try{f.call(q,u.resolve,u.reject)}catch(A){u.reject(A)}};l.prototype.then=function(f,q){function u(w,B){return"function"==typeof w?function(R){try{A(w(R))}catch(Z){F(Z)}}:B}var A,F,v=new l(function(w,B){A=w;F=B});this.callWhenSettled_(u(f,A),u(q,F));return v};l.prototype.catch=function(f){return this.then(void 0,f)};l.prototype.callWhenSettled_=function(f,q){function u(){switch(A.state_){case 1:f(A.result_);
|
|
15
|
+
break;case 2:q(A.result_);break;default:throw Error("Unexpected state: "+A.state_);}}var A=this;null==this.onSettledCallbacks_?y.asyncExecute(u):this.onSettledCallbacks_.push(u);this.isRejectionHandled_=!0};l.resolve=k;l.reject=function(f){return new l(function(q,u){u(f)})};l.race=function(f){return new l(function(q,u){for(var A=$jscomp.makeIterator(f),F=A.next();!F.done;F=A.next())k(F.value).callWhenSettled_(q,u)})};l.all=function(f){var q=$jscomp.makeIterator(f),u=q.next();return u.done?k([]):new l(function(A,
|
|
16
|
+
F){function v(R){return function(Z){w[R]=Z;B--;0==B&&A(w)}}var w=[],B=0;do w.push(void 0),B++,k(u.value).callWhenSettled_(v(w.length-1),F),u=q.next();while(!u.done)})};return l},"es6","es3");$jscomp.owns=function(h,n){return Object.prototype.hasOwnProperty.call(h,n)};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(h,n){for(var k=1;k<arguments.length;k++){var p=arguments[k];if(p)for(var l in p)$jscomp.owns(p,l)&&(h[l]=p[l])}return h};
|
|
17
|
+
$jscomp.polyfill("Object.assign",function(h){return h||$jscomp.assign},"es6","es3");$jscomp.checkStringArgs=function(h,n,k){if(null==h)throw new TypeError("The 'this' value for String.prototype."+k+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+k+" must not be a regular expression");return h+""};
|
|
18
|
+
$jscomp.polyfill("String.prototype.startsWith",function(h){return h?h:function(n,k){var p=$jscomp.checkStringArgs(this,n,"startsWith");n+="";var l=p.length,y=n.length;k=Math.max(0,Math.min(k|0,p.length));for(var f=0;f<y&&k<l;)if(p[k++]!=n[f++])return!1;return f>=y}},"es6","es3");
|
|
19
|
+
$jscomp.polyfill("Array.prototype.copyWithin",function(h){function n(k){k=Number(k);return Infinity===k||-Infinity===k?k:k|0}return h?h:function(k,p,l){var y=this.length;k=n(k);p=n(p);l=void 0===l?y:n(l);k=0>k?Math.max(y+k,0):Math.min(k,y);p=0>p?Math.max(y+p,0):Math.min(p,y);l=0>l?Math.max(y+l,0):Math.min(l,y);if(k<p)for(;p<l;)p in this?this[k++]=this[p++]:(delete this[k++],p++);else for(l=Math.min(l,y+p-k),k+=l-p;l>p;)--l in this?this[--k]=this[l]:delete this[--k];return this}},"es6","es3");
|
|
20
|
+
$jscomp.typedArrayCopyWithin=function(h){return h?h:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
|
|
21
|
+
$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
|
|
22
|
+
var DracoDecoderModule=function(){var h="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(h=h||__filename);return function(n){function k(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b){if(e){var c=ia;var d=e+b;for(b=e;c[b]&&!(b>=d);)++b;if(16<b-e&&c.buffer&&ra)c=ra.decode(c.subarray(e,b));else{for(d="";e<b;){var g=c[e++];if(g&128){var t=c[e++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|t);else{var aa=c[e++]&
|
|
23
|
+
63;g=224==(g&240)?(g&15)<<12|t<<6|aa:(g&7)<<18|t<<12|aa<<6|c[e++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}c=d}}else c="";return c}function l(){var e=ja.buffer;a.HEAP8=W=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ia=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=Y=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function y(e){if(a.onAbort)a.onAbort(e);
|
|
24
|
+
e="Aborted("+e+")";da(e);sa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function f(e){try{if(e==P&&ea)return new Uint8Array(ea);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){y(b)}}function q(){if(!ea&&(ta||fa)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return f(P)});
|
|
25
|
+
if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return f(P)})}function u(e){for(;0<e.length;)e.shift()(a)}function A(e){this.excPtr=e;this.ptr=e-24;this.set_type=function(b){Y[this.ptr+4>>2]=b};this.get_type=function(){return Y[this.ptr+4>>2]};this.set_destructor=function(b){Y[this.ptr+8>>2]=b};this.get_destructor=function(){return Y[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){W[this.ptr+
|
|
26
|
+
12>>0]=b?1:0};this.get_caught=function(){return 0!=W[this.ptr+12>>0]};this.set_rethrown=function(b){W[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=W[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){Y[this.ptr+
|
|
27
|
+
16>>2]=b};this.get_adjusted_ptr=function(){return Y[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ua(this.get_type()))return Y[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function F(){function e(){if(!la&&(la=!0,a.calledRun=!0,!sa)){va=!0;u(oa);wa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)xa.unshift(a.postRun.shift());u(xa)}}if(!(0<ba)){if(a.preRun)for("function"==
|
|
28
|
+
typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)ya.unshift(a.preRun.shift());u(ya);0<ba||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);e()},1)):e())}}function v(){}function w(e){return(e||v).__cache__}function B(e,b){var c=w(b),d=c[e];if(d)return d;d=Object.create((b||v).prototype);d.ptr=e;return c[e]=d}function R(e){if("string"===typeof e){for(var b=0,c=0;c<e.length;++c){var d=e.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=
|
|
29
|
+
d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0<d){d=c+d-1;for(var g=0;g<e.length;++g){var t=e.charCodeAt(g);if(55296<=t&&57343>=t){var aa=e.charCodeAt(++g);t=65536+((t&1023)<<10)|aa&1023}if(127>=t){if(c>=d)break;b[c++]=t}else{if(2047>=t){if(c+1>=d)break;b[c++]=192|t>>6}else{if(65535>=t){if(c+2>=d)break;b[c++]=224|t>>12}else{if(c+3>=d)break;b[c++]=240|t>>18;b[c++]=128|t>>12&63}b[c++]=128|t>>6&63}b[c++]=128|t&63}}b[c]=0}e=r.alloc(b,W);r.copy(b,W,e);return e}return e}function Z(e){if("object"===
|
|
30
|
+
typeof e){var b=r.alloc(e,W);r.copy(e,W,b);return b}return e}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=za();w(S)[this.ptr]=this}function Q(){this.ptr=Aa();w(Q)[this.ptr]=this}function V(){this.ptr=Ba();w(V)[this.ptr]=this}function x(){this.ptr=Ca();w(x)[this.ptr]=this}function D(){this.ptr=Da();w(D)[this.ptr]=this}function G(){this.ptr=Ea();w(G)[this.ptr]=this}function H(){this.ptr=Fa();w(H)[this.ptr]=this}function E(){this.ptr=Ga();w(E)[this.ptr]=
|
|
31
|
+
this}function T(){this.ptr=Ha();w(T)[this.ptr]=this}function C(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=Ia();w(I)[this.ptr]=this}function J(){this.ptr=Ja();w(J)[this.ptr]=this}function K(){this.ptr=Ka();w(K)[this.ptr]=this}function L(){this.ptr=La();w(L)[this.ptr]=this}function M(){this.ptr=Ma();w(M)[this.ptr]=this}function N(){this.ptr=Na();w(N)[this.ptr]=this}function O(){this.ptr=Oa();w(O)[this.ptr]=this}function z(){this.ptr=Pa();w(z)[this.ptr]=this}function m(){this.ptr=
|
|
32
|
+
Qa();w(m)[this.ptr]=this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},wa,ka;a.ready=new Promise(function(e,b){wa=e;ka=b});var Ra=!1,Sa=!1;a.onRuntimeInitialized=function(){Ra=!0;if(Sa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Sa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3<e.length?!1:1==e[0]&&0<=e[1]&&5>=e[1]?!0:0!=e[0]||10<
|
|
33
|
+
e[1]?!1:!0};var Ta=Object.assign({},a),ta="object"==typeof window,fa="function"==typeof importScripts,Ua="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,U="";if(Ua){var Va=require("fs"),pa=require("path");U=fa?pa.dirname(U)+"/":__dirname+"/";var Wa=function(e,b){e=e.startsWith("file://")?new URL(e):pa.normalize(e);return Va.readFileSync(e,b?void 0:"utf8")};var ma=function(e){e=Wa(e,!0);e.buffer||(e=new Uint8Array(e));return e};var na=function(e,
|
|
34
|
+
b,c){e=e.startsWith("file://")?new URL(e):pa.normalize(e);Va.readFile(e,function(d,g){d?c(d):b(g.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(ta||fa)fa?U=self.location.href:"undefined"!=typeof document&&document.currentScript&&(U=document.currentScript.src),h&&(U=h),U=0!==U.indexOf("blob:")?U.substr(0,U.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Wa=function(e){var b=new XMLHttpRequest;b.open("GET",
|
|
35
|
+
e,!1);b.send(null);return b.responseText},fa&&(ma=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),na=function(e,b,c){var d=new XMLHttpRequest;d.open("GET",e,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};a.print||console.log.bind(console);var da=a.printErr||console.warn.bind(console);Object.assign(a,Ta);Ta=null;var ea;a.wasmBinary&&
|
|
36
|
+
(ea=a.wasmBinary);"object"!=typeof WebAssembly&&y("no native wasm support detected");var ja,sa=!1,ra="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,W,ia,ca,Y,ya=[],oa=[],xa=[],va=!1,ba=0,qa=null,ha=null;var P="draco_decoder_gltf.wasm";P.startsWith("data:application/octet-stream;base64,")||(P=k(P));var pd=0,qd={b:function(e,b,c){(new A(e)).init(b,c);pd++;throw e;},a:function(){y("")},d:function(e,b,c){ia.copyWithin(e,b,b+c)},c:function(e){var b=ia.length;e>>>=0;if(2147483648<e)return!1;
|
|
37
|
+
for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);l();var t=1;break a}catch(aa){}t=void 0}if(t)return!0}return!1}};(function(){function e(g,t){a.asm=g.exports;ja=a.asm.e;l();oa.unshift(a.asm.f);ba--;a.monitorRunDependencies&&a.monitorRunDependencies(ba);0==ba&&(null!==qa&&(clearInterval(qa),qa=null),ha&&(g=ha,ha=null,g()))}function b(g){e(g.instance)}
|
|
38
|
+
function c(g){return q().then(function(t){return WebAssembly.instantiate(t,d)}).then(function(t){return t}).then(g,function(t){da("failed to asynchronously prepare wasm: "+t);y(t)})}var d={a:qd};ba++;a.monitorRunDependencies&&a.monitorRunDependencies(ba);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return ea||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||
|
|
39
|
+
P.startsWith("file://")||Ua||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(t){da("wasm streaming compile failed: "+t);da("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ka);return{}})();var Xa=a._emscripten_bind_VoidPtr___destroy___0=function(){return(Xa=a._emscripten_bind_VoidPtr___destroy___0=a.asm.h).apply(null,arguments)},za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=
|
|
40
|
+
function(){return(za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.i).apply(null,arguments)},Ya=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(Ya=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.j).apply(null,arguments)},Za=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Za=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.k).apply(null,arguments)},Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
|
|
41
|
+
a.asm.l).apply(null,arguments)},$a=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return($a=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.m).apply(null,arguments)},ab=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(ab=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.n).apply(null,arguments)},Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=
|
|
42
|
+
a.asm.o).apply(null,arguments)},bb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(bb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.p).apply(null,arguments)},Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.q).apply(null,arguments)},cb=a._emscripten_bind_PointAttribute_size_0=function(){return(cb=a._emscripten_bind_PointAttribute_size_0=a.asm.r).apply(null,arguments)},db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=
|
|
43
|
+
function(){return(db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.s).apply(null,arguments)},eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(eb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.t).apply(null,arguments)},fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(fb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.u).apply(null,arguments)},gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(gb=a._emscripten_bind_PointAttribute_num_components_0=
|
|
44
|
+
a.asm.v).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(hb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.w).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(ib=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.x).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(jb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.y).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_unique_id_0=
|
|
45
|
+
function(){return(kb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.z).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(lb=a._emscripten_bind_PointAttribute___destroy___0=a.asm.A).apply(null,arguments)},Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.B).apply(null,arguments)},mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=
|
|
46
|
+
function(){return(mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.C).apply(null,arguments)},nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.D).apply(null,arguments)},ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.E).apply(null,arguments)},pb=
|
|
47
|
+
a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(pb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.F).apply(null,arguments)},qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.G).apply(null,arguments)},Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=
|
|
48
|
+
a.asm.H).apply(null,arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.I).apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.J).apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(tb=
|
|
49
|
+
a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.K).apply(null,arguments)},Fa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Fa=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.L).apply(null,arguments)},ub=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(ub=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.M).apply(null,arguments)},vb=a._emscripten_bind_PointCloud_num_points_0=function(){return(vb=a._emscripten_bind_PointCloud_num_points_0=a.asm.N).apply(null,
|
|
50
|
+
arguments)},wb=a._emscripten_bind_PointCloud___destroy___0=function(){return(wb=a._emscripten_bind_PointCloud___destroy___0=a.asm.O).apply(null,arguments)},Ga=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ga=a._emscripten_bind_Mesh_Mesh_0=a.asm.P).apply(null,arguments)},xb=a._emscripten_bind_Mesh_num_faces_0=function(){return(xb=a._emscripten_bind_Mesh_num_faces_0=a.asm.Q).apply(null,arguments)},yb=a._emscripten_bind_Mesh_num_attributes_0=function(){return(yb=a._emscripten_bind_Mesh_num_attributes_0=
|
|
51
|
+
a.asm.R).apply(null,arguments)},zb=a._emscripten_bind_Mesh_num_points_0=function(){return(zb=a._emscripten_bind_Mesh_num_points_0=a.asm.S).apply(null,arguments)},Ab=a._emscripten_bind_Mesh___destroy___0=function(){return(Ab=a._emscripten_bind_Mesh___destroy___0=a.asm.T).apply(null,arguments)},Ha=a._emscripten_bind_Metadata_Metadata_0=function(){return(Ha=a._emscripten_bind_Metadata_Metadata_0=a.asm.U).apply(null,arguments)},Bb=a._emscripten_bind_Metadata___destroy___0=function(){return(Bb=a._emscripten_bind_Metadata___destroy___0=
|
|
52
|
+
a.asm.V).apply(null,arguments)},Cb=a._emscripten_bind_Status_code_0=function(){return(Cb=a._emscripten_bind_Status_code_0=a.asm.W).apply(null,arguments)},Db=a._emscripten_bind_Status_ok_0=function(){return(Db=a._emscripten_bind_Status_ok_0=a.asm.X).apply(null,arguments)},Eb=a._emscripten_bind_Status_error_msg_0=function(){return(Eb=a._emscripten_bind_Status_error_msg_0=a.asm.Y).apply(null,arguments)},Fb=a._emscripten_bind_Status___destroy___0=function(){return(Fb=a._emscripten_bind_Status___destroy___0=
|
|
53
|
+
a.asm.Z).apply(null,arguments)},Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm._).apply(null,arguments)},Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.$).apply(null,arguments)},Hb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Hb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.aa).apply(null,arguments)},Ib=
|
|
54
|
+
a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ib=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ba).apply(null,arguments)},Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.ca).apply(null,arguments)},Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.da).apply(null,arguments)},Kb=a._emscripten_bind_DracoInt8Array_size_0=
|
|
55
|
+
function(){return(Kb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ea).apply(null,arguments)},Lb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Lb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.fa).apply(null,arguments)},Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ga).apply(null,arguments)},Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=
|
|
56
|
+
a.asm.ha).apply(null,arguments)},Nb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Nb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.ia).apply(null,arguments)},Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ja).apply(null,arguments)},La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.ka).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=
|
|
57
|
+
function(){return(Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.la).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Qb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.ma).apply(null,arguments)},Rb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Rb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.na).apply(null,arguments)},Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=
|
|
58
|
+
a.asm.oa).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.pa).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Tb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.qa).apply(null,arguments)},Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ra).apply(null,arguments)},Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=
|
|
59
|
+
function(){return(Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.sa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.ta).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt32Array_size_0=function(){return(Wb=a._emscripten_bind_DracoInt32Array_size_0=a.asm.ua).apply(null,arguments)},Xb=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Xb=a._emscripten_bind_DracoInt32Array___destroy___0=
|
|
60
|
+
a.asm.va).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.wa).apply(null,arguments)},Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.xa).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(Zb=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.ya).apply(null,arguments)},$b=a._emscripten_bind_DracoUInt32Array___destroy___0=
|
|
61
|
+
function(){return($b=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.za).apply(null,arguments)},Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Aa).apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ba).apply(null,arguments)},bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=
|
|
62
|
+
a.asm.Ca).apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.Da).apply(null,arguments)},dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ea).apply(null,arguments)},ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Fa).apply(null,
|
|
63
|
+
arguments)},fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ga).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ha).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(hc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.Ia).apply(null,arguments)},Qa=a._emscripten_bind_Decoder_Decoder_0=
|
|
64
|
+
function(){return(Qa=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ja).apply(null,arguments)},ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Ka).apply(null,arguments)},jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.La).apply(null,arguments)},kc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(kc=a._emscripten_bind_Decoder_GetAttributeId_2=
|
|
65
|
+
a.asm.Ma).apply(null,arguments)},lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.Na).apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Oa).apply(null,arguments)},nc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(nc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Pa).apply(null,arguments)},
|
|
66
|
+
oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Qa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(pc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ra).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Sa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=
|
|
67
|
+
function(){return(rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Ta).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Ua).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Va).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(uc=
|
|
68
|
+
a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Wa).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.Xa).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.Ya).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=
|
|
69
|
+
a.asm.Za).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm._a).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.$a).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=
|
|
70
|
+
a.asm.ab).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.bb).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.cb).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=
|
|
71
|
+
a.asm.db).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.eb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.fb).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=
|
|
72
|
+
a.asm.gb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.hb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.ib).apply(null,arguments)},Jc=a._emscripten_bind_Decoder___destroy___0=function(){return(Jc=a._emscripten_bind_Decoder___destroy___0=a.asm.jb).apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=
|
|
73
|
+
function(){return(Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.kb).apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.lb).apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=
|
|
74
|
+
a.asm.mb).apply(null,arguments)},Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.nb).apply(null,arguments)},Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.ob).apply(null,arguments)},Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
|
|
75
|
+
a.asm.pb).apply(null,arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.qb).apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.rb).apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=
|
|
76
|
+
a.asm.sb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.tb).apply(null,arguments)},Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.ub).apply(null,arguments)},Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=
|
|
77
|
+
a.asm.vb).apply(null,arguments)},Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.wb).apply(null,arguments)},Xc=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Xc=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.xb).apply(null,arguments)},Yc=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(Yc=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.yb).apply(null,arguments)},Zc=
|
|
78
|
+
a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Zc=a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.zb).apply(null,arguments)},$c=a._emscripten_enum_draco_DataType_DT_INT16=function(){return($c=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Ab).apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(ad=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Bb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INT32=
|
|
79
|
+
a.asm.Cb).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(cd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Db).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(dd=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Eb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(ed=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Fb).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=
|
|
80
|
+
function(){return(fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Gb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Hb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(hd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Ib).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=
|
|
81
|
+
a.asm.Jb).apply(null,arguments)},jd=a._emscripten_enum_draco_StatusCode_OK=function(){return(jd=a._emscripten_enum_draco_StatusCode_OK=a.asm.Kb).apply(null,arguments)},kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Lb).apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Mb).apply(null,arguments)},md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
|
|
82
|
+
function(){return(md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=a.asm.Nb).apply(null,arguments)},nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Ob).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Pb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Qb).apply(null,arguments)};
|
|
83
|
+
a._free=function(){return(a._free=a.asm.Rb).apply(null,arguments)};var ua=function(){return(ua=a.asm.Sb).apply(null,arguments)};a.___start_em_js=11660;a.___stop_em_js=11758;var la;ha=function b(){la||F();la||(ha=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();F();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=w;a.wrapPointer=B;a.castObject=function(b,
|
|
84
|
+
c){return B(b.ptr,c)};a.NULL=B(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";b.__destroy__();delete w(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var r={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(r.needed){for(var b=0;b<r.temps.length;b++)a._free(r.temps[b]);r.temps.length=0;a._free(r.buffer);r.buffer=0;r.size+=
|
|
85
|
+
r.needed;r.needed=0}r.buffer||(r.size+=128,r.buffer=a._malloc(r.size),r.buffer||y(void 0));r.pos=0},alloc:function(b,c){r.buffer||y(void 0);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;r.pos+b>=r.size?(0<b||y(void 0),r.needed+=b,c=a._malloc(b),r.temps.push(c)):(c=r.buffer+r.pos,r.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;g<b.length;g++)c[d+g]=b[g]}};X.prototype=Object.create(v.prototype);X.prototype.constructor=
|
|
86
|
+
X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){Xa(this.ptr)};S.prototype=Object.create(v.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.DecoderBuffer=S;S.prototype.Init=S.prototype.Init=function(b,c){var d=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);Ya(d,b,c)};S.prototype.__destroy__=S.prototype.__destroy__=function(){Za(this.ptr)};Q.prototype=Object.create(v.prototype);
|
|
87
|
+
Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.AttributeTransformData=Q;Q.prototype.transform_type=Q.prototype.transform_type=function(){return $a(this.ptr)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){ab(this.ptr)};V.prototype=Object.create(v.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){bb(this.ptr)};x.prototype=Object.create(v.prototype);x.prototype.constructor=
|
|
88
|
+
x;x.prototype.__class__=x;x.__cache__={};a.PointAttribute=x;x.prototype.size=x.prototype.size=function(){return cb(this.ptr)};x.prototype.GetAttributeTransformData=x.prototype.GetAttributeTransformData=function(){return B(db(this.ptr),Q)};x.prototype.attribute_type=x.prototype.attribute_type=function(){return eb(this.ptr)};x.prototype.data_type=x.prototype.data_type=function(){return fb(this.ptr)};x.prototype.num_components=x.prototype.num_components=function(){return gb(this.ptr)};x.prototype.normalized=
|
|
89
|
+
x.prototype.normalized=function(){return!!hb(this.ptr)};x.prototype.byte_stride=x.prototype.byte_stride=function(){return ib(this.ptr)};x.prototype.byte_offset=x.prototype.byte_offset=function(){return jb(this.ptr)};x.prototype.unique_id=x.prototype.unique_id=function(){return kb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){lb(this.ptr)};D.prototype=Object.create(v.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.AttributeQuantizationTransform=
|
|
90
|
+
D;D.prototype.InitFromAttribute=D.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!mb(c,b)};D.prototype.quantization_bits=D.prototype.quantization_bits=function(){return nb(this.ptr)};D.prototype.min_value=D.prototype.min_value=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return ob(c,b)};D.prototype.range=D.prototype.range=function(){return pb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){qb(this.ptr)};G.prototype=
|
|
91
|
+
Object.create(v.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.AttributeOctahedronTransform=G;G.prototype.InitFromAttribute=G.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!rb(c,b)};G.prototype.quantization_bits=G.prototype.quantization_bits=function(){return sb(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){tb(this.ptr)};H.prototype=Object.create(v.prototype);H.prototype.constructor=H;H.prototype.__class__=
|
|
92
|
+
H;H.__cache__={};a.PointCloud=H;H.prototype.num_attributes=H.prototype.num_attributes=function(){return ub(this.ptr)};H.prototype.num_points=H.prototype.num_points=function(){return vb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){wb(this.ptr)};E.prototype=Object.create(v.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return xb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=
|
|
93
|
+
function(){return yb(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return zb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Ab(this.ptr)};T.prototype=Object.create(v.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.Metadata=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){Bb(this.ptr)};C.prototype=Object.create(v.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Status=C;C.prototype.code=
|
|
94
|
+
C.prototype.code=function(){return Cb(this.ptr)};C.prototype.ok=C.prototype.ok=function(){return!!Db(this.ptr)};C.prototype.error_msg=C.prototype.error_msg=function(){return p(Eb(this.ptr))};C.prototype.__destroy__=C.prototype.__destroy__=function(){Fb(this.ptr)};I.prototype=Object.create(v.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoFloat32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gb(c,
|
|
95
|
+
b)};I.prototype.size=I.prototype.size=function(){return Hb(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Ib(this.ptr)};J.prototype=Object.create(v.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt8Array=J;J.prototype.GetValue=J.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Jb(c,b)};J.prototype.size=J.prototype.size=function(){return Kb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Lb(this.ptr)};
|
|
96
|
+
K.prototype=Object.create(v.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoUInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Mb(c,b)};K.prototype.size=K.prototype.size=function(){return Nb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Ob(this.ptr)};L.prototype=Object.create(v.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=
|
|
97
|
+
L;L.prototype.GetValue=L.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Pb(c,b)};L.prototype.size=L.prototype.size=function(){return Qb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){Rb(this.ptr)};M.prototype=Object.create(v.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoUInt16Array=M;M.prototype.GetValue=M.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Sb(c,b)};
|
|
98
|
+
M.prototype.size=M.prototype.size=function(){return Tb(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){Ub(this.ptr)};N.prototype=Object.create(v.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Vb(c,b)};N.prototype.size=N.prototype.size=function(){return Wb(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){Xb(this.ptr)};
|
|
99
|
+
O.prototype=Object.create(v.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.DracoUInt32Array=O;O.prototype.GetValue=O.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Yb(c,b)};O.prototype.size=O.prototype.size=function(){return Zb(this.ptr)};O.prototype.__destroy__=O.prototype.__destroy__=function(){$b(this.ptr)};z.prototype=Object.create(v.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.MetadataQuerier=
|
|
100
|
+
z;z.prototype.HasEntry=z.prototype.HasEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return!!ac(d,b,c)};z.prototype.GetIntEntry=z.prototype.GetIntEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return bc(d,b,c)};z.prototype.GetIntEntryArray=z.prototype.GetIntEntryArray=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===
|
|
101
|
+
typeof c?c.ptr:R(c);d&&"object"===typeof d&&(d=d.ptr);cc(g,b,c,d)};z.prototype.GetDoubleEntry=z.prototype.GetDoubleEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return dc(d,b,c)};z.prototype.GetStringEntry=z.prototype.GetStringEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return p(ec(d,b,c))};z.prototype.NumEntries=z.prototype.NumEntries=function(b){var c=this.ptr;
|
|
102
|
+
b&&"object"===typeof b&&(b=b.ptr);return fc(c,b)};z.prototype.GetEntryName=z.prototype.GetEntryName=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return p(gc(d,b,c))};z.prototype.__destroy__=z.prototype.__destroy__=function(){hc(this.ptr)};m.prototype=Object.create(v.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.DecodeArrayToPointCloud=m.prototype.DecodeArrayToPointCloud=function(b,c,d){var g=
|
|
103
|
+
this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(ic(g,b,c,d),C)};m.prototype.DecodeArrayToMesh=m.prototype.DecodeArrayToMesh=function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(jc(g,b,c,d),C)};m.prototype.GetAttributeId=m.prototype.GetAttributeId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
|
|
104
|
+
(c=c.ptr);return kc(d,b,c)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return lc(d,b,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);d=d&&"object"===typeof d?d.ptr:R(d);return mc(g,b,c,d)};m.prototype.GetAttribute=
|
|
105
|
+
m.prototype.GetAttribute=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(nc(d,b,c),x)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(oc(d,b,c),x)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return B(pc(c,b),T)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=
|
|
106
|
+
function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(qc(d,b,c),T)};m.prototype.GetFaceFromMesh=m.prototype.GetFaceFromMesh=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!rc(g,b,c,d)};m.prototype.GetTriangleStripsFromMesh=m.prototype.GetTriangleStripsFromMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
|
|
107
|
+
return sc(d,b,c)};m.prototype.GetTrianglesUInt16Array=m.prototype.GetTrianglesUInt16Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!tc(g,b,c,d)};m.prototype.GetTrianglesUInt32Array=m.prototype.GetTrianglesUInt32Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!uc(g,b,c,d)};m.prototype.GetAttributeFloat=m.prototype.GetAttributeFloat=
|
|
108
|
+
function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!vc(g,b,c,d)};m.prototype.GetAttributeFloatForAllPoints=m.prototype.GetAttributeFloatForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!wc(g,b,c,d)};m.prototype.GetAttributeIntForAllPoints=m.prototype.GetAttributeIntForAllPoints=function(b,c,d){var g=this.ptr;
|
|
109
|
+
b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!xc(g,b,c,d)};m.prototype.GetAttributeInt8ForAllPoints=m.prototype.GetAttributeInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yc(g,b,c,d)};m.prototype.GetAttributeUInt8ForAllPoints=m.prototype.GetAttributeUInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=
|
|
110
|
+
b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(g,b,c,d)};m.prototype.GetAttributeInt16ForAllPoints=m.prototype.GetAttributeInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(g,b,c,d)};m.prototype.GetAttributeUInt16ForAllPoints=m.prototype.GetAttributeUInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
|
|
111
|
+
(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(g,b,c,d)};m.prototype.GetAttributeInt32ForAllPoints=m.prototype.GetAttributeInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(g,b,c,d)};m.prototype.GetAttributeUInt32ForAllPoints=m.prototype.GetAttributeUInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===
|
|
112
|
+
typeof d&&(d=d.ptr);return!!Dc(g,b,c,d)};m.prototype.GetAttributeDataArrayForAllPoints=m.prototype.GetAttributeDataArrayForAllPoints=function(b,c,d,g,t){var aa=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);g&&"object"===typeof g&&(g=g.ptr);t&&"object"===typeof t&&(t=t.ptr);return!!Ec(aa,b,c,d,g,t)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Fc(c,
|
|
113
|
+
b)};m.prototype.GetEncodedGeometryType_Deprecated=m.prototype.GetEncodedGeometryType_Deprecated=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gc(c,b)};m.prototype.DecodeBufferToPointCloud=m.prototype.DecodeBufferToPointCloud=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(Hc(d,b,c),C)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===
|
|
114
|
+
typeof c&&(c=c.ptr);return B(Ic(d,b,c),C)};m.prototype.__destroy__=m.prototype.__destroy__=function(){Jc(this.ptr)};(function(){function b(){a.ATTRIBUTE_INVALID_TRANSFORM=Kc();a.ATTRIBUTE_NO_TRANSFORM=Lc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Mc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Nc();a.INVALID=Oc();a.POSITION=Pc();a.NORMAL=Qc();a.COLOR=Rc();a.TEX_COORD=Sc();a.GENERIC=Tc();a.INVALID_GEOMETRY_TYPE=Uc();a.POINT_CLOUD=Vc();a.TRIANGULAR_MESH=Wc();a.DT_INVALID=Xc();a.DT_INT8=Yc();a.DT_UINT8=Zc();a.DT_INT16=
|
|
115
|
+
$c();a.DT_UINT16=ad();a.DT_INT32=bd();a.DT_UINT32=cd();a.DT_INT64=dd();a.DT_UINT64=ed();a.DT_FLOAT32=fd();a.DT_FLOAT64=gd();a.DT_BOOL=hd();a.DT_TYPES_COUNT=id();a.OK=jd();a.DRACO_ERROR=kd();a.IO_ERROR=ld();a.INVALID_PARAMETER=md();a.UNSUPPORTED_VERSION=nd();a.UNKNOWN_VERSION=od()}va?b():oa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(b){if(b.__class__&&b.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);
|
|
116
|
+
if(8>b.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var gdjs;(s=>{const o=GlobalPIXIModule.PIXI,u=new s.Logger("LayerPixiRenderer");class l{_pixiContainer;_layer;_lightingSprite=null;_isLightingLayer;_clearColor;_renderTexture=null;_oldWidth=null;_oldHeight=null;_threeGroup=null;_threeScene=null;_threeCamera=null;_threeCameraDirty=!1;_threePlaneTexture=null;_threePlaneGeometry=null;_threePlaneMaterial=null;_threePlaneMesh=null;static zeroZOrderForPixi=Math.pow(2,-24);static vectorForProjections=null;constructor(e,t,r){this._pixiContainer=new o.Container,this._pixiContainer.sortableChildren=!0,this._layer=e,this._isLightingLayer=e.isLightingLayer(),t.getRendererObject().addChild(this._pixiContainer),this._pixiContainer.filters=[];const i=r.getPIXIRenderer();this._isLightingLayer?(this._clearColor=e.getClearColor(),this._setupLightingRendering(i,t)):(this._clearColor=[...s.hexNumberToRGBArray(this._layer.getRuntimeScene().getBackgroundColor()),0],this._setup3DRendering(i,t))}onCreated(){this._update3DCameraAspectAndPosition()}onGameResolutionResized(){this._update3DCameraAspectAndPosition()}_update3DCameraAspectAndPosition(){this._threeCamera&&(this._threeCamera.aspect=this._layer.getWidth()/this._layer.getHeight(),this._threeCamera.updateProjectionMatrix(),this.updatePosition())}getRendererObject(){return this._pixiContainer}getThreeScene(){return this._threeScene}getThreeCamera(){return this._threeCamera}getLightingSprite(){return this._lightingSprite}_setup3DRendering(e,t){if(!(typeof THREE>"u"))if(this._layer instanceof s.Layer){if(this._layer.getRenderingType()===s.RuntimeLayerRenderingType.THREE_D||this._layer.getRenderingType()===s.RuntimeLayerRenderingType.TWO_D_PLUS_THREE_D){if(this._threeScene||this._threeGroup||this._threeCamera)throw new Error("Tried to setup 3D rendering for a layer that is already set up.");if(this._threeScene=new THREE.Scene,this._threeScene.scale.y=-1,this._threeGroup=new THREE.Group,this._threeScene.add(this._threeGroup),this._threeCamera=new THREE.PerspectiveCamera(this._layer.getInitialCamera3DFieldOfView(),1,this._layer.getInitialCamera3DNearPlaneDistance(),this._layer.getInitialCamera3DFarPlaneDistance()),this._threeCamera.rotation.order="ZYX",this._layer.getRenderingType()===s.RuntimeLayerRenderingType.TWO_D_PLUS_THREE_D){if(this._renderTexture||this._threePlaneGeometry||this._threePlaneMaterial||this._threePlaneTexture||this._threePlaneMesh)throw new Error("Tried to setup PixiJS plane for 2D rendering in 3D for a layer that is already set up.");this._createPixiRenderTexture(e),this._threePlaneGeometry=new THREE.PlaneGeometry(1,1);const r=1,i=1,n=r*i,h=new Uint8Array(4*n),_=new THREE.DataTexture(h,r,i);_.needsUpdate=!0,this._threePlaneTexture=_,this._threePlaneTexture.generateMipmaps=!1;const d=this._layer.getRuntimeScene().getGame().getScaleMode()==="nearest"?THREE.NearestFilter:THREE.LinearFilter;this._threePlaneTexture.minFilter=d,this._threePlaneTexture.magFilter=d,this._threePlaneTexture.wrapS=THREE.ClampToEdgeWrapping,this._threePlaneTexture.wrapT=THREE.ClampToEdgeWrapping;const a={vertexShader:`
|
|
2
|
+
varying vec2 vUv;
|
|
3
|
+
void main() {
|
|
4
|
+
vUv = uv;
|
|
5
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
6
|
+
}
|
|
7
|
+
`,fragmentShader:`
|
|
8
|
+
uniform sampler2D map;
|
|
9
|
+
varying vec2 vUv;
|
|
10
|
+
void main() {
|
|
11
|
+
vec4 texel = texture2D(map, vUv);
|
|
12
|
+
gl_FragColor = texel;
|
|
13
|
+
}
|
|
14
|
+
`,uniforms:{map:{value:this._threePlaneTexture}},side:THREE.FrontSide,transparent:!0};this._threePlaneMaterial=new THREE.ShaderMaterial(a),this._threePlaneMaterial,this._threePlaneMesh=new THREE.Mesh(this._threePlaneGeometry,this._threePlaneMaterial),this._threePlaneMesh.renderOrder=Number.MAX_SAFE_INTEGER,this._threeScene.add(this._threePlaneMesh)}}}else{const r=t.get3DRendererObject();if(!r)return;this._threeGroup||(this._threeGroup=new THREE.Group,r.add(this._threeGroup))}}setThreeCameraDirty(e){this._threeCameraDirty=e}show2DRenderingPlane(e){this._threePlaneMesh&&this._threePlaneMesh.visible!==e&&(this._threePlaneMesh.visible=e)}updatePosition(){const e=-s.toRad(this._layer.getCameraRotation()),t=this._layer.getCameraZoom();this._pixiContainer.rotation=e,this._pixiContainer.scale.x=t,this._pixiContainer.scale.y=t;const r=Math.cos(e),i=Math.sin(e),n=this._layer.getCameraX()*t*r-this._layer.getCameraY()*t*i,h=this._layer.getCameraX()*t*i+this._layer.getCameraY()*t*r;this._pixiContainer.position.x=this._layer.getWidth()/2-n,this._pixiContainer.position.y=this._layer.getHeight()/2-h,this._layer.getRuntimeScene().getGame().getPixelsRounding()&&(r===0||i===0)&&Number.isInteger(t)&&(this._pixiContainer.position.x=Math.ceil(this._pixiContainer.position.x),this._pixiContainer.position.y=Math.ceil(this._pixiContainer.position.y)),this._threeCamera&&(this._threeCamera.position.x=this._layer.getCameraX(),this._threeCamera.position.y=-this._layer.getCameraY(),this._threeCamera.rotation.z=e,this._threeCamera.position.z=this._layer.getCameraZ(this._threeCamera.fov),this._threePlaneMesh&&(this._threePlaneMesh.scale.x=this._layer.getWidth()/t,this._threePlaneMesh.scale.y=this._layer.getHeight()/t,this._threePlaneMesh.position.x=this._threeCamera.position.x,this._threePlaneMesh.position.y=-this._threeCamera.position.y,this._threePlaneMesh.rotation.z=-e))}isCameraRotatedIn3D(){return this._threeCamera&&(this._threeCamera.rotation.x!==0||this._threeCamera.rotation.y!==0)}transformTo3DWorld(e,t,r,i,n){const h=this._threeCamera;if(!h)return n[0]=0,n[1]=0,n;const _=this._layer.getWidth(),d=this._layer.getHeight();let a=l.vectorForProjections;a||(a=new THREE.Vector3,l.vectorForProjections=a),a.set(e/_*2-1,-(t/d)*2+1,.5),a.unproject(h),a.sub(h.position).normalize();const c=(r-h.position.z)/a.z;return a.multiplyScalar(c),!Number.isFinite(a.x)||!Number.isFinite(a.y)?(n[0]=0,n[1]=0,n):(n[0]=h.position.x+a.x,n[1]=-(h.position.y+a.y),n)}updateVisibility(e){this._pixiContainer.visible=!!e,this._threeGroup&&(this._threeGroup.visible=!!e)}updatePreRender(){if(this._threeCameraDirty){const e=this.getThreeCamera();e&&e.updateProjectionMatrix(),this._threeCameraDirty=!1}}addRendererObject(e,t){const r=e;r.zIndex=t||l.zeroZOrderForPixi,this._pixiContainer.addChild(r)}changeRendererObjectZOrder(e,t){const r=e;r.zIndex=t}removeRendererObject(e){this._pixiContainer.removeChild(e)}has3DObjects(){return!!this._threeGroup&&this._threeGroup.children.length>0}has2DObjects(){return this._pixiContainer.children.length>0}add3DRendererObject(e){this._threeGroup&&this._threeGroup.add(e)}remove3DRendererObject(e){this._threeGroup&&this._threeGroup.remove(e)}updateClearColor(){this._clearColor=this._layer.getClearColor()}_createPixiRenderTexture(e){if(!e||e.type!==o.RENDERER_TYPE.WEBGL)return;if(this._renderTexture){u.error("Tried to create a PixiJS RenderTexture for a layer that already has one.");return}this._oldWidth=e.screen.width,this._oldHeight=e.screen.height;const t=this._oldWidth,r=this._oldHeight,i=e.resolution;this._renderTexture=o.RenderTexture.create({width:t,height:r,resolution:i}),this._renderTexture.baseTexture.scaleMode=o.SCALE_MODES.LINEAR,u.info(`RenderTexture created for layer ${this._layer.getName()}.`)}renderOnPixiRenderTexture(e){if(!this._renderTexture)return;(this._oldWidth!==e.screen.width||this._oldHeight!==e.screen.height)&&(this._renderTexture.resize(e.screen.width,e.screen.height),this._oldWidth=e.screen.width,this._oldHeight=e.screen.height);const t=e.renderTexture.current,r=e.renderTexture.sourceFrame;e.renderTexture.bind(this._renderTexture),this._clearColor[3]=this._isLightingLayer?1:0,e.renderTexture.clear(this._clearColor),e.render(this._pixiContainer,{renderTexture:this._renderTexture,clear:!1}),e.renderTexture.bind(t,r,void 0)}updateThreePlaneTextureFromPixiRenderTexture(e,t){if(!this._threePlaneTexture||!this._renderTexture)return;const r=this._renderTexture.baseTexture._glTextures[t.CONTEXT_UID];if(r){const i=e.properties.get(this._threePlaneTexture);i.__webglTexture=r.texture}}_setupLightingRendering(e,t){if(this._createPixiRenderTexture(e),!this._renderTexture)return;this._lightingSprite=new o.Sprite(this._renderTexture),this._lightingSprite.blendMode=o.BLEND_MODES.MULTIPLY;const r=t.getRendererObject(),i=r.getChildIndex(this._pixiContainer);r.addChildAt(this._lightingSprite,i),r.removeChild(this._pixiContainer)}}s.LayerPixiRenderer=l,s.LayerRenderer=s.LayerPixiRenderer})(gdjs||={});
|
|
15
|
+
//# sourceMappingURL=layer-pixi-renderer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../GDevelop/GDJS/Runtime/pixi-renderers/layer-pixi-renderer.ts"],
|
|
4
|
+
"sourcesContent": ["/*\n * GDevelop JS Platform\n * Copyright 2013-2016 Florian Rival (Florian.Rival@gmail.com). All rights reserved.\n * This project is released under the MIT License.\n */\n\nnamespace gdjs {\n import PIXI = GlobalPIXIModule.PIXI;\n\n const logger = new gdjs.Logger('LayerPixiRenderer');\n\n /**\n * The renderer for a gdjs.Layer using Pixi.js.\n */\n export class LayerPixiRenderer {\n private _pixiContainer: PIXI.Container;\n\n private _layer: gdjs.RuntimeLayer;\n\n /** For a lighting layer, the sprite used to display the render texture. */\n private _lightingSprite: PIXI.Sprite | null = null;\n private _isLightingLayer: boolean;\n private _clearColor: Array<integer>;\n\n /**\n * The render texture where the whole 2D layer is rendered.\n * The render texture is then used for lighting (if it's a light layer)\n * or to be rendered in a 3D scene (for a 2D+3D layer).\n */\n private _renderTexture: PIXI.RenderTexture | null = null;\n\n // Width and height are tracked when a render texture is used.\n private _oldWidth: float | null = null;\n private _oldHeight: float | null = null;\n\n // For a 3D (or 2D+3D) layer:\n private _threeGroup: THREE.Group | null = null;\n private _threeScene: THREE.Scene | null = null;\n private _threeCamera: THREE.PerspectiveCamera | null = null;\n private _threeCameraDirty: boolean = false;\n\n // For a 2D+3D layer, the 2D rendering is done on the render texture\n // and then must be displayed on a plane in the 3D world:\n private _threePlaneTexture: THREE.Texture | null = null;\n private _threePlaneGeometry: THREE.PlaneGeometry | null = null;\n private _threePlaneMaterial: THREE.ShaderMaterial | null = null;\n private _threePlaneMesh: THREE.Mesh | null = null;\n\n /**\n * Pixi doesn't sort children with zIndex == 0.\n */\n private static readonly zeroZOrderForPixi = Math.pow(2, -24);\n\n private static vectorForProjections: THREE.Vector3 | null = null;\n\n /**\n * @param layer The layer\n * @param runtimeInstanceContainerRenderer The scene renderer\n */\n constructor(\n layer: gdjs.RuntimeLayer,\n runtimeInstanceContainerRenderer: gdjs.RuntimeInstanceContainerRenderer,\n runtimeGameRenderer: gdjs.RuntimeGameRenderer\n ) {\n this._pixiContainer = new PIXI.Container();\n this._pixiContainer.sortableChildren = true;\n this._layer = layer;\n this._isLightingLayer = layer.isLightingLayer();\n runtimeInstanceContainerRenderer\n .getRendererObject()\n .addChild(this._pixiContainer);\n this._pixiContainer.filters = [];\n\n // Setup rendering for lighting or 3D rendering:\n const pixiRenderer = runtimeGameRenderer.getPIXIRenderer();\n if (this._isLightingLayer) {\n this._clearColor = layer.getClearColor();\n this._setupLightingRendering(\n pixiRenderer,\n runtimeInstanceContainerRenderer\n );\n } else {\n // Clear color is used as background color of transparent sprites.\n this._clearColor = [\n ...gdjs.hexNumberToRGBArray(\n this._layer.getRuntimeScene().getBackgroundColor()\n ),\n 0,\n ];\n this._setup3DRendering(pixiRenderer, runtimeInstanceContainerRenderer);\n }\n }\n\n onCreated() {\n // The layer is now fully initialized. Adapt the 3D camera position\n // (which we could not do before in `_setup3DRendering`).\n this._update3DCameraAspectAndPosition();\n }\n\n onGameResolutionResized() {\n // Ensure the 3D camera aspect is updated:\n this._update3DCameraAspectAndPosition();\n }\n\n private _update3DCameraAspectAndPosition() {\n if (this._threeCamera) {\n this._threeCamera.aspect =\n this._layer.getWidth() / this._layer.getHeight();\n this._threeCamera.updateProjectionMatrix();\n\n this.updatePosition();\n }\n }\n\n getRendererObject(): PIXI.Container {\n return this._pixiContainer;\n }\n\n getThreeScene(): THREE.Scene | null {\n return this._threeScene;\n }\n\n getThreeCamera(): THREE.PerspectiveCamera | null {\n return this._threeCamera;\n }\n\n /**\n * The sprite, displaying the \"render texture\" of the layer, to display\n * for a lighting layer.\n */\n getLightingSprite(): PIXI.Sprite | null {\n return this._lightingSprite;\n }\n\n /**\n * Create, or re-create, Three.js objects for 3D rendering of this layer.\n */\n private _setup3DRendering(\n pixiRenderer: PIXI.Renderer | null,\n runtimeInstanceContainerRenderer: gdjs.RuntimeInstanceContainerRenderer\n ): void {\n if (typeof THREE === 'undefined') {\n return;\n }\n // TODO (3D): ideally we would avoid the need for this check at all,\n // maybe by having separate rendering classes for custom object layers and scene layers.\n if (this._layer instanceof gdjs.Layer) {\n if (\n this._layer.getRenderingType() ===\n gdjs.RuntimeLayerRenderingType.THREE_D ||\n this._layer.getRenderingType() ===\n gdjs.RuntimeLayerRenderingType.TWO_D_PLUS_THREE_D\n ) {\n if (this._threeScene || this._threeGroup || this._threeCamera) {\n throw new Error(\n 'Tried to setup 3D rendering for a layer that is already set up.'\n );\n }\n\n this._threeScene = new THREE.Scene();\n\n // Use a mirroring on the Y axis to follow the same axis as in the 2D, PixiJS, rendering.\n // We use a mirroring rather than a camera rotation so that the Z order is not changed.\n this._threeScene.scale.y = -1;\n\n this._threeGroup = new THREE.Group();\n this._threeScene.add(this._threeGroup);\n\n this._threeCamera = new THREE.PerspectiveCamera(\n this._layer.getInitialCamera3DFieldOfView(),\n 1,\n this._layer.getInitialCamera3DNearPlaneDistance(),\n this._layer.getInitialCamera3DFarPlaneDistance()\n );\n this._threeCamera.rotation.order = 'ZYX';\n\n if (\n this._layer.getRenderingType() ===\n gdjs.RuntimeLayerRenderingType.TWO_D_PLUS_THREE_D\n ) {\n if (\n this._renderTexture ||\n this._threePlaneGeometry ||\n this._threePlaneMaterial ||\n this._threePlaneTexture ||\n this._threePlaneMesh\n )\n throw new Error(\n 'Tried to setup PixiJS plane for 2D rendering in 3D for a layer that is already set up.'\n );\n\n // If we have both 2D and 3D objects to be rendered, create a render texture that PixiJS will use\n // to render, and that will be projected on a plane by Three.js\n this._createPixiRenderTexture(pixiRenderer);\n\n // Create the plane that will show this texture.\n this._threePlaneGeometry = new THREE.PlaneGeometry(1, 1);\n\n // Create the texture to project on the plane.\n // Use a buffer to create a \"fake\" DataTexture, just so the texture\n // is considered initialized by Three.js.\n const width = 1;\n const height = 1;\n const size = width * height;\n const data = new Uint8Array(4 * size);\n const texture = new THREE.DataTexture(data, width, height);\n texture.needsUpdate = true;\n\n this._threePlaneTexture = texture;\n this._threePlaneTexture.generateMipmaps = false;\n const filter =\n this._layer.getRuntimeScene().getGame().getScaleMode() ===\n 'nearest'\n ? THREE.NearestFilter\n : THREE.LinearFilter;\n this._threePlaneTexture.minFilter = filter;\n this._threePlaneTexture.magFilter = filter;\n this._threePlaneTexture.wrapS = THREE.ClampToEdgeWrapping;\n this._threePlaneTexture.wrapT = THREE.ClampToEdgeWrapping;\n // This disable the gamma correction done by THREE as PIXI is already doing it.\n const noGammaCorrectionShader: THREE.ShaderMaterialParameters = {\n vertexShader: `\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n uniform sampler2D map;\n varying vec2 vUv;\n void main() {\n vec4 texel = texture2D(map, vUv);\n gl_FragColor = texel;\n }\n `,\n uniforms: {\n map: { value: this._threePlaneTexture },\n },\n side: THREE.FrontSide,\n transparent: true,\n };\n this._threePlaneMaterial = new THREE.ShaderMaterial(\n noGammaCorrectionShader\n );\n this._threePlaneMaterial;\n\n // Finally, create the mesh shown in the scene.\n this._threePlaneMesh = new THREE.Mesh(\n this._threePlaneGeometry,\n this._threePlaneMaterial\n );\n\n // Force to render the mesh last (after the rest of 3D objects, including\n // transparent ones). In most cases, the 2D rendering is composed of a lot\n // of transparent areas, and we can't risk it being displayed first and wrongly\n // occluding 3D objects shown behind.\n this._threePlaneMesh.renderOrder = Number.MAX_SAFE_INTEGER;\n this._threeScene.add(this._threePlaneMesh);\n }\n\n // Note: we can not update the position of the camera at this point,\n // because the layer might not be fully constructed.\n // See `onCreated`.\n }\n } else {\n // This is a layer of a custom object.\n\n const parentThreeObject = runtimeInstanceContainerRenderer.get3DRendererObject();\n if (!parentThreeObject) {\n // No parent 3D renderer object, 3D is disabled.\n return;\n }\n\n if (!this._threeGroup) {\n // TODO (3D) - optimization: do not create a THREE.Group if no 3D object are contained inside.\n this._threeGroup = new THREE.Group();\n parentThreeObject.add(this._threeGroup);\n }\n }\n }\n\n setThreeCameraDirty(enable: boolean) {\n this._threeCameraDirty = enable;\n }\n\n show2DRenderingPlane(enable: boolean) {\n if (!this._threePlaneMesh) return;\n if (this._threePlaneMesh.visible === enable) return;\n this._threePlaneMesh.visible = enable;\n }\n\n /**\n * Update the position of the PIXI container. To be called after each change\n * made to position, zoom or rotation of the camera.\n */\n updatePosition(): void {\n const angle = -gdjs.toRad(this._layer.getCameraRotation());\n const zoomFactor = this._layer.getCameraZoom();\n this._pixiContainer.rotation = angle;\n this._pixiContainer.scale.x = zoomFactor;\n this._pixiContainer.scale.y = zoomFactor;\n const cosValue = Math.cos(angle);\n const sinValue = Math.sin(angle);\n const centerX =\n this._layer.getCameraX() * zoomFactor * cosValue -\n this._layer.getCameraY() * zoomFactor * sinValue;\n const centerY =\n this._layer.getCameraX() * zoomFactor * sinValue +\n this._layer.getCameraY() * zoomFactor * cosValue;\n this._pixiContainer.position.x = this._layer.getWidth() / 2 - centerX;\n this._pixiContainer.position.y = this._layer.getHeight() / 2 - centerY;\n\n if (\n this._layer.getRuntimeScene().getGame().getPixelsRounding() &&\n (cosValue === 0 || sinValue === 0) &&\n Number.isInteger(zoomFactor)\n ) {\n // Camera rounding is important for pixel perfect games.\n // Otherwise, the camera position fractional part is added to\n // the sprite one and it changes in which direction sprites are rounded.\n // It makes sprites rounding inconsistent with each other\n // and they seem to move on pixel left and right.\n //\n // PIXI uses a floor function on sprites position on the screen,\n // so a floor must be applied on the camera position too.\n // According to the above calculus,\n // _pixiContainer.position is the opposite of the camera,\n // this is why the ceil function is used floor(x) = -ceil(-x).\n //\n // When the camera directly follows an object,\n // given this object dimension is even,\n // the decimal part of onScenePosition and cameraPosition are the same.\n //\n // Doing the calculus without rounding:\n // onScreenPosition = onScenePosition - cameraPosition\n // onScreenPosition = 980.75 - 200.75\n // onScreenPosition = 780\n //\n // Doing the calculus with rounding:\n // onScreenPosition = floor(onScenePosition + ceil(-cameraPosition))\n // onScreenPosition = floor(980.75 + ceil(-200.75))\n // onScreenPosition = floor(980.75 - 200)\n // onScreenPosition = floor(780.75)\n // onScreenPosition = 780\n this._pixiContainer.position.x = Math.ceil(\n this._pixiContainer.position.x\n );\n this._pixiContainer.position.y = Math.ceil(\n this._pixiContainer.position.y\n );\n }\n\n if (this._threeCamera) {\n // TODO (3D) - improvement: handle camera rounding like down for PixiJS?\n this._threeCamera.position.x = this._layer.getCameraX();\n this._threeCamera.position.y = -this._layer.getCameraY(); // Inverted because the scene is mirrored on Y axis.\n this._threeCamera.rotation.z = angle;\n\n this._threeCamera.position.z = this._layer.getCameraZ(\n this._threeCamera.fov\n );\n\n if (this._threePlaneMesh) {\n // Adapt the plane size so that it covers the whole screen.\n this._threePlaneMesh.scale.x = this._layer.getWidth() / zoomFactor;\n this._threePlaneMesh.scale.y = this._layer.getHeight() / zoomFactor;\n\n // Adapt the plane position so that it's always displayed on the whole screen.\n this._threePlaneMesh.position.x = this._threeCamera.position.x;\n this._threePlaneMesh.position.y = -this._threeCamera.position.y; // Inverted because the scene is mirrored on Y axis.\n this._threePlaneMesh.rotation.z = -angle;\n }\n }\n }\n\n isCameraRotatedIn3D() {\n return (\n this._threeCamera &&\n (this._threeCamera.rotation.x !== 0 ||\n this._threeCamera.rotation.y !== 0)\n );\n }\n\n transformTo3DWorld(\n screenX: float,\n screenY: float,\n worldZ: float,\n cameraId: integer,\n result: FloatPoint\n ): FloatPoint {\n const camera = this._threeCamera;\n if (!camera) {\n result[0] = 0;\n result[1] = 0;\n return result;\n }\n const width = this._layer.getWidth();\n const height = this._layer.getHeight();\n\n let vector = LayerPixiRenderer.vectorForProjections;\n if (!vector) {\n vector = new THREE.Vector3();\n LayerPixiRenderer.vectorForProjections = vector;\n }\n\n // https://stackoverflow.com/questions/13055214/mouse-canvas-x-y-to-three-js-world-x-y-z\n vector.set((screenX / width) * 2 - 1, -(screenY / height) * 2 + 1, 0.5);\n vector.unproject(camera);\n vector.sub(camera.position).normalize();\n const distance = (worldZ - camera.position.z) / vector.z;\n vector.multiplyScalar(distance);\n\n // The plane z == worldZ may not be visible on the camera.\n if (!Number.isFinite(vector.x) || !Number.isFinite(vector.y)) {\n result[0] = 0;\n result[1] = 0;\n return result;\n }\n\n result[0] = camera.position.x + vector.x;\n result[1] = -(camera.position.y + vector.y);\n return result;\n }\n\n updateVisibility(visible: boolean): void {\n this._pixiContainer.visible = !!visible;\n if (this._threeGroup) this._threeGroup.visible = !!visible;\n }\n\n updatePreRender(): void {\n if (this._threeCameraDirty) {\n const camera = this.getThreeCamera();\n if (camera) {\n camera.updateProjectionMatrix();\n }\n this._threeCameraDirty = false;\n }\n }\n\n /**\n * Add a child to the pixi container associated to the layer.\n * All objects which are on this layer must be children of this container.\n *\n * @param pixiChild The child (PIXI object) to be added.\n * @param zOrder The z order of the associated object.\n */\n addRendererObject(pixiChild, zOrder: float): void {\n const child = pixiChild as PIXI.DisplayObject;\n child.zIndex = zOrder || LayerPixiRenderer.zeroZOrderForPixi;\n this._pixiContainer.addChild(child);\n }\n\n /**\n * Change the z order of a child associated to an object.\n *\n * @param pixiChild The child (PIXI object) to be modified.\n * @param newZOrder The z order of the associated object.\n */\n changeRendererObjectZOrder(pixiChild, newZOrder: float): void {\n const child = pixiChild as PIXI.DisplayObject;\n child.zIndex = newZOrder;\n }\n\n /**\n * Remove a child from the internal pixi container.\n * Should be called when an object is deleted or removed from the layer.\n *\n * @param child The child (PIXI object) to be removed.\n */\n removeRendererObject(child): void {\n this._pixiContainer.removeChild(child);\n }\n\n has3DObjects(): boolean {\n return !!this._threeGroup && this._threeGroup.children.length > 0;\n }\n\n has2DObjects(): boolean {\n return this._pixiContainer.children.length > 0;\n }\n\n add3DRendererObject(object: THREE.Object3D): void {\n if (!this._threeGroup) return;\n\n this._threeGroup.add(object);\n }\n\n remove3DRendererObject(object: THREE.Object3D): void {\n if (!this._threeGroup) return;\n\n this._threeGroup.remove(object);\n }\n\n updateClearColor(): void {\n this._clearColor = this._layer.getClearColor();\n // this._createPixiRenderTexture(); // TODO: Check this was useless\n }\n\n /**\n * Create the PixiJS RenderTexture used to display the whole layer.\n * Can be used either for lighting or for rendering the layer in a texture\n * so it can then be consumed by Three.js to render it in 3D.\n */\n private _createPixiRenderTexture(pixiRenderer: PIXI.Renderer | null): void {\n if (!pixiRenderer || pixiRenderer.type !== PIXI.RENDERER_TYPE.WEBGL) {\n return;\n }\n if (this._renderTexture) {\n logger.error(\n 'Tried to create a PixiJS RenderTexture for a layer that already has one.'\n );\n return;\n }\n\n this._oldWidth = pixiRenderer.screen.width;\n this._oldHeight = pixiRenderer.screen.height;\n const width = this._oldWidth;\n const height = this._oldHeight;\n const resolution = pixiRenderer.resolution;\n this._renderTexture = PIXI.RenderTexture.create({\n width,\n height,\n resolution,\n });\n this._renderTexture.baseTexture.scaleMode = PIXI.SCALE_MODES.LINEAR;\n logger.info(`RenderTexture created for layer ${this._layer.getName()}.`);\n }\n\n /**\n * Render the layer of the PixiJS RenderTexture, so that it can be then displayed\n * with a blend mode (for a lighting layer) or consumed by Three.js (for 2D+3D layers).\n */\n renderOnPixiRenderTexture(pixiRenderer: PIXI.Renderer) {\n if (!this._renderTexture) {\n return;\n }\n if (\n this._oldWidth !== pixiRenderer.screen.width ||\n this._oldHeight !== pixiRenderer.screen.height\n ) {\n this._renderTexture.resize(\n pixiRenderer.screen.width,\n pixiRenderer.screen.height\n );\n this._oldWidth = pixiRenderer.screen.width;\n this._oldHeight = pixiRenderer.screen.height;\n }\n const oldRenderTexture = pixiRenderer.renderTexture.current;\n const oldSourceFrame = pixiRenderer.renderTexture.sourceFrame;\n pixiRenderer.renderTexture.bind(this._renderTexture);\n\n // The background is the ambient color for lighting layers\n // and transparent for 2D+3D layers.\n this._clearColor[3] = this._isLightingLayer ? 1 : 0;\n pixiRenderer.renderTexture.clear(this._clearColor);\n\n pixiRenderer.render(this._pixiContainer, {\n renderTexture: this._renderTexture,\n clear: false,\n });\n pixiRenderer.renderTexture.bind(\n oldRenderTexture,\n oldSourceFrame,\n undefined\n );\n }\n\n /**\n * Set the texture of the 2D plane in the 3D world to be the same WebGL texture\n * as the PixiJS RenderTexture - so that the 2D rendering can be shown in the 3D world.\n */\n updateThreePlaneTextureFromPixiRenderTexture(\n threeRenderer: THREE.WebGLRenderer,\n pixiRenderer: PIXI.Renderer\n ): void {\n if (!this._threePlaneTexture || !this._renderTexture) {\n return;\n }\n\n const glTexture = this._renderTexture.baseTexture._glTextures[\n pixiRenderer.CONTEXT_UID\n ];\n if (glTexture) {\n // \"Hack\" into the Three.js renderer by getting the internal WebGL texture for the PixiJS plane,\n // and set it so that it's the same as the WebGL texture for the PixiJS RenderTexture.\n // This works because PixiJS and Three.js are using the same WebGL context.\n const texture = threeRenderer.properties.get(this._threePlaneTexture);\n texture.__webglTexture = glTexture.texture;\n }\n }\n\n /**\n * Enable the use of a PIXI.RenderTexture to render the PIXI.Container\n * of the layer and, in the scene PIXI container, replace the container\n * of the layer by a sprite showing this texture.\n * used only in lighting for now as the sprite could have MULTIPLY blend mode.\n */\n private _setupLightingRendering(\n pixiRenderer: PIXI.Renderer | null,\n runtimeInstanceContainerRenderer: gdjs.RuntimeInstanceContainerRenderer\n ): void {\n this._createPixiRenderTexture(pixiRenderer);\n if (!this._renderTexture) {\n return;\n }\n\n this._lightingSprite = new PIXI.Sprite(this._renderTexture);\n this._lightingSprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;\n const parentPixiContainer = runtimeInstanceContainerRenderer.getRendererObject();\n const index = parentPixiContainer.getChildIndex(this._pixiContainer);\n parentPixiContainer.addChildAt(this._lightingSprite, index);\n parentPixiContainer.removeChild(this._pixiContainer);\n }\n }\n\n //Register the class to let the engine use it.\n export type LayerRenderer = gdjs.LayerPixiRenderer;\n export const LayerRenderer = gdjs.LayerPixiRenderer;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["gdjs", "PIXI", "logger", "LayerPixiRenderer", "layer", "runtimeInstanceContainerRenderer", "runtimeGameRenderer", "pixiRenderer", "width", "height", "size", "data", "texture", "filter", "noGammaCorrectionShader", "parentThreeObject", "enable", "angle", "zoomFactor", "cosValue", "sinValue", "centerX", "centerY", "screenX", "screenY", "worldZ", "cameraId", "result", "camera", "vector", "distance", "visible", "pixiChild", "zOrder", "child", "newZOrder", "object", "resolution", "oldRenderTexture", "oldSourceFrame", "threeRenderer", "glTexture", "parentPixiContainer", "index"]
|
|
7
|
+
}
|