gdcore-tools 1.0.5 → 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/WrappedGD.js +159 -138
- 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/package-lock.json +0 -223
- 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/runtimeobject.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 */\nnamespace gdjs {\n /** An axis-aligned bounding box. Used to represents a box around an object for example. */\n export type AABB = {\n /** The [x,y] coordinates of the top left point */\n min: FloatPoint;\n /** The [x,y] coordinates of the bottom right point */\n max: FloatPoint;\n };\n\n export type RendererObjectInterface = {\n visible: boolean;\n };\n\n /**\n * Return the squared bounding radius of an object given its width/height and its center of rotation\n * (relative to the top-left of the object). The radius is relative to the center of rotation.\n */\n const computeSqBoundingRadius = (\n width: float,\n height: float,\n centerX: float,\n centerY: float\n ) => {\n const radiusX = Math.max(centerX, width - centerX);\n const radiusY = Math.max(centerY, height - centerY);\n return Math.pow(radiusX, 2) + Math.pow(radiusY, 2);\n };\n\n /**\n * Arrays and data structure that are (re)used by\n * {@link RuntimeObject.separateFromObjects} to avoid any allocation.\n */\n const separateFromObjectsStatics: {\n moveXArray: Array<float>;\n moveYArray: Array<float>;\n } = {\n moveXArray: [],\n moveYArray: [],\n };\n\n /**\n * Data structure that are (re)used by\n * {@link RuntimeObject.raycastTest} to avoid any allocation.\n */\n const raycastTestStatics: {\n result: RaycastTestResult;\n } = {\n result: gdjs.Polygon.makeNewRaycastTestResult(),\n };\n\n /**\n * Move the object using the results from collisionTest call.\n * This moves the object according to the direction of the longest vector,\n * and projects the others on the orthogonal vector.\n *\n * See {@link RuntimeObject.separateFromObjects}\n *\n * @param object The object to move.\n * @param moveXArray The X coordinates of the vectors to move the object.\n * @param moveYArray The Y coordinates of the vectors to move the object.\n * @return true if the object was moved.\n */\n const moveFollowingSeparatingVectors = (\n object: gdjs.RuntimeObject,\n moveXArray: Array<float>,\n moveYArray: Array<float>\n ): boolean => {\n if (moveXArray.length === 0) {\n moveXArray.length = 0;\n moveYArray.length = 0;\n return false;\n }\n if (moveXArray.length === 1) {\n // Move according to the results returned by the collision algorithm.\n object.setPosition(\n object.getX() + moveXArray[0],\n object.getY() + moveYArray[0]\n );\n moveXArray.length = 0;\n moveYArray.length = 0;\n return true;\n }\n\n // Find the longest vector\n let squaredDistanceMax = 0;\n let distanceMaxIndex = 0;\n for (let index = 0; index < moveXArray.length; index++) {\n const moveX = moveXArray[index];\n const moveY = moveYArray[index];\n\n const squaredDistance = moveX * moveX + moveY * moveY;\n if (squaredDistance > squaredDistanceMax) {\n squaredDistanceMax = squaredDistance;\n distanceMaxIndex = index;\n }\n }\n\n const distanceMax = Math.sqrt(squaredDistanceMax);\n // unit vector of the longest vector\n const uX = moveXArray[distanceMaxIndex] / distanceMax;\n const uY = moveYArray[distanceMaxIndex] / distanceMax;\n\n // normal vector of the longest vector\n const vX = -uY;\n const vY = uX;\n\n // Project other vectors on the normal\n let scalarProductMin = 0;\n let scalarProductMax = 0;\n for (let index = 0; index < moveXArray.length; index++) {\n const moveX = moveXArray[index];\n const moveY = moveYArray[index];\n\n const scalarProduct = moveX * vX + moveY * vY;\n scalarProductMin = Math.min(scalarProductMin, scalarProduct);\n scalarProductMax = Math.max(scalarProductMax, scalarProduct);\n }\n\n // Apply the longest vector\n let deltaX = moveXArray[distanceMaxIndex];\n let deltaY = moveYArray[distanceMaxIndex];\n\n // Apply the longest projected vector if they all are in the same direction\n // Some projections could have rounding errors,\n // they are considered negligible under a 1 for 1,000,000 ratio.\n const scalarProductMinIsNegligible =\n -scalarProductMin < scalarProductMax / 1048576;\n const scalarProductMaxIsNegligible =\n scalarProductMax < -scalarProductMin / 1048576;\n if (scalarProductMinIsNegligible !== scalarProductMaxIsNegligible) {\n if (scalarProductMaxIsNegligible) {\n deltaX += scalarProductMin * vX;\n deltaY += scalarProductMin * vY;\n } else {\n deltaX += scalarProductMax * vX;\n deltaY += scalarProductMax * vY;\n }\n }\n object.setPosition(object.getX() + deltaX, object.getY() + deltaY);\n moveXArray.length = 0;\n moveYArray.length = 0;\n return true;\n };\n\n /**\n * RuntimeObject represents an object being used on a RuntimeScene.\n *\n * A `gdjs.RuntimeObject` should not be instantiated directly, always a child class\n * (because gdjs.RuntimeObject don't call onCreated at the end of its constructor).\n */\n export class RuntimeObject implements EffectsTarget {\n name: string;\n type: string;\n x: float = 0;\n y: float = 0;\n angle: float = 0;\n zOrder: integer = 0;\n hidden: boolean = false;\n layer: string = '';\n protected _nameId: integer;\n protected _livingOnScene: boolean = true;\n\n readonly id: integer;\n private destroyCallbacks = new Set<() => void>();\n _runtimeScene: gdjs.RuntimeInstanceContainer;\n\n /**\n * An optional UUID associated to the object to be used\n * for hot reload. Don't modify or use otherwise.\n */\n persistentUuid: string | null = null;\n\n /**\n * A property to be used by external algorithms to indicate if the\n * object is picked or not in an object selection. By construction, this is\n * not \"thread safe\" or \"re-entrant algorithm\" safe.\n */\n pick: boolean = false;\n\n //Hit boxes:\n protected _defaultHitBoxes: gdjs.Polygon[] = [];\n protected hitBoxes: gdjs.Polygon[];\n protected hitBoxesDirty: boolean = true;\n protected aabb: AABB = { min: [0, 0], max: [0, 0] };\n protected _isIncludedInParentCollisionMask = true;\n\n //Variables:\n protected _variables: gdjs.VariablesContainer;\n\n //Effects:\n protected _rendererEffects: Record<\n string,\n gdjs.PixiFiltersTools.Filter\n > = {};\n\n //Forces:\n protected _forces: gdjs.Force[] = [];\n _averageForce: gdjs.Force;\n\n /**\n * Contains the behaviors of the object.\n */\n protected _behaviors: gdjs.RuntimeBehavior[] = [];\n protected _behaviorsTable: Hashtable<gdjs.RuntimeBehavior>;\n protected _timers: Hashtable<gdjs.Timer>;\n\n /**\n * @param runtimeScene The scene the object belongs to..\n * @param objectData The initial properties of the object.\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n objectData: ObjectData & any\n ) {\n this.name = objectData.name || '';\n this.type = objectData.type || '';\n this._nameId = RuntimeObject.getNameIdentifier(this.name);\n this.id = instanceContainer.getScene().createNewUniqueId();\n this._runtimeScene = instanceContainer;\n this._defaultHitBoxes.push(gdjs.Polygon.createRectangle(0, 0));\n this.hitBoxes = this._defaultHitBoxes;\n this._variables = new gdjs.VariablesContainer(\n objectData ? objectData.variables : undefined\n );\n this._averageForce = new gdjs.Force(0, 0, 0);\n this._behaviorsTable = new Hashtable();\n for (let i = 0; i < objectData.effects.length; ++i) {\n this._runtimeScene\n .getGame()\n .getEffectsManager()\n .initializeEffect(objectData.effects[i], this._rendererEffects, this);\n this.updateAllEffectParameters(objectData.effects[i]);\n }\n\n //Also contains the behaviors: Used when a behavior is accessed by its name ( see getBehavior ).\n for (let i = 0, len = objectData.behaviors.length; i < len; ++i) {\n const autoData = objectData.behaviors[i];\n const Ctor = gdjs.getBehaviorConstructor(autoData.type);\n this._behaviors.push(new Ctor(instanceContainer, autoData, this));\n this._behaviorsTable.put(autoData.name, this._behaviors[i]);\n }\n this._timers = new Hashtable();\n }\n\n //Common members functions related to the object and its runtimeScene :\n /**\n * To be called by the child classes in their constructor, at the very end.\n * Notify the behaviors that they have been constructed (this must be done when\n * the object is ready, otherwise behaviors can do operations on the object which\n * could be not initialized yet).\n *\n * If you redefine this function, **make sure to call the original method**\n * (`RuntimeObject.prototype.onCreated.call(this);`).\n */\n onCreated(): void {\n const rendererObject = this.getRendererObject();\n if (rendererObject) {\n for (const effectName in this._rendererEffects) {\n this._rendererEffects[effectName].applyEffect(this);\n }\n }\n\n for (let i = 0; i < this._behaviors.length; ++i) {\n this._behaviors[i].onCreated();\n }\n }\n\n /**\n * Called to reset the object to its default state. This is used for objects that are\n * \"recycled\": they are dismissed (at which point `onDestroyFromScene` is called) but still\n * stored in a cache to be reused next time an object must be created. At this point,\n * `reinitialize` will be called. The object must then work as if it was a newly constructed\n * object.\n *\n * To implement this in your object:\n * * Set `gdjs.YourRuntimeObject.supportsReinitialization = true;` to declare support for recycling.\n * * Implement `reinitialize`. It **must** call the `reinitialize` of `gdjs.RuntimeObject`, and call `this.onCreated();`\n * at the end of `reinitialize`.\n * * It must reset the object as if it was newly constructed (be careful about your renderers and any global state).\n * * The `_runtimeScene`, `_nameId`, `name` and `type` are guaranteed to stay the same and do not\n * need to be set again.\n *\n */\n reinitialize(objectData: ObjectData): void {\n const runtimeScene = this._runtimeScene;\n this.x = 0;\n this.y = 0;\n this.angle = 0;\n this.zOrder = 0;\n this.hidden = false;\n this.layer = '';\n this._livingOnScene = true;\n //@ts-ignore Reinitialize is like a constructor, it can overwrite the readonly property.\n this.id = runtimeScene.createNewUniqueId();\n this.persistentUuid = null;\n this.pick = false;\n this.hitBoxesDirty = true;\n this._defaultHitBoxes.length = 0;\n this._defaultHitBoxes.push(gdjs.Polygon.createRectangle(0, 0));\n this.aabb.min[0] = 0;\n this.aabb.min[1] = 0;\n this.aabb.max[0] = 0;\n this.aabb.max[1] = 0;\n this._variables = new gdjs.VariablesContainer(objectData.variables);\n this.clearForces();\n\n // Reinitialize behaviors.\n this._behaviorsTable.clear();\n let i = 0;\n for (const len = objectData.behaviors.length; i < len; ++i) {\n const behaviorData = objectData.behaviors[i];\n const Ctor = gdjs.getBehaviorConstructor(behaviorData.type);\n if (i < this._behaviors.length) {\n // TODO: Add support for behavior recycling with a `reinitialize` method.\n this._behaviors[i] = new Ctor(runtimeScene, behaviorData, this);\n } else {\n this._behaviors.push(new Ctor(runtimeScene, behaviorData, this));\n }\n this._behaviorsTable.put(behaviorData.name, this._behaviors[i]);\n }\n this._behaviors.length = i;\n\n // Reinitialize effects.\n for (let i = 0; i < objectData.effects.length; ++i) {\n this._runtimeScene\n .getGame()\n .getEffectsManager()\n .initializeEffect(objectData.effects[i], this._rendererEffects, this);\n this.updateAllEffectParameters(objectData.effects[i]);\n }\n\n // Make sure to delete existing timers.\n this._timers.clear();\n\n this.destroyCallbacks.clear();\n\n this.invalidateHitboxes();\n }\n\n static supportsReinitialization = false;\n\n /**\n * Return the time elapsed since the last frame,\n * in milliseconds, for the object.\n *\n * Objects can have different elapsed time if they are on layers with different time scales.\n *\n * @param instanceContainer The instance container the object belongs to (deprecated - can be omitted).\n */\n getElapsedTime(instanceContainer?: gdjs.RuntimeInstanceContainer): float {\n const theLayer = this._runtimeScene.getLayer(this.layer);\n return theLayer.getElapsedTime();\n }\n\n /**\n * The gdjs.RuntimeScene the object belongs to.\n */\n getParent(): gdjs.RuntimeInstanceContainer {\n return this._runtimeScene;\n }\n\n /**\n * The gdjs.RuntimeScene the object belongs to.\n */\n getRuntimeScene(): gdjs.RuntimeScene {\n return this._runtimeScene.getScene();\n }\n\n /**\n * The container the object belongs to.\n */\n getInstanceContainer(): gdjs.RuntimeInstanceContainer {\n return this._runtimeScene;\n }\n\n /**\n * Called once during the game loop, before events and rendering.\n * @param instanceContainer The container the object belongs to.\n */\n update(instanceContainer: gdjs.RuntimeInstanceContainer): void {}\n\n /**\n * Called once during the game loop, after events and before rendering.\n * @param instanceContainer The container the object belongs to.\n */\n updatePreRender(instanceContainer: gdjs.RuntimeInstanceContainer): void {}\n\n /**\n * Called when the object is created from an initial instance at the startup of the scene.<br>\n * Note that common properties (position, angle, z order...) have already been setup.\n *\n * @param initialInstanceData The data of the initial instance.\n */\n extraInitializationFromInitialInstance(\n initialInstanceData: InstanceData\n ): void {}\n\n /**\n * Called when the object must be updated using the specified objectData. This is the\n * case during hot-reload, and is only called if the object was modified.\n *\n * @param oldObjectData The previous data for the object.\n * @param newObjectData The new data for the object.\n * @returns true if the object was updated, false if it could not (i.e: hot-reload is not supported).\n */\n updateFromObjectData(\n oldObjectData: ObjectData,\n newObjectData: ObjectData\n ): boolean {\n // If not redefined, mark by default the hot-reload as failed.\n return false;\n }\n\n /**\n * Remove an object from a scene.\n *\n * Do not change/redefine this method. Instead, redefine the onDestroyFromScene method.\n * @param instanceContainer The container owning the object.\n */\n deleteFromScene(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n if (this._livingOnScene) {\n instanceContainer.markObjectForDeletion(this);\n this._livingOnScene = false;\n }\n }\n\n registerDestroyCallback(callback: () => void) {\n this.destroyCallbacks.add(callback);\n }\n\n unregisterDestroyCallback(callback: () => void) {\n this.destroyCallbacks.delete(callback);\n }\n\n /**\n * Called when the object is destroyed (because it is removed from a scene or the scene\n * is being unloaded). If you redefine this function, **make sure to call the original method**\n * (`RuntimeObject.prototype.onDestroyFromScene.call(this, runtimeScene);`).\n *\n * @param instanceContainer The container owning the object.\n */\n onDestroyFromScene(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n const theLayer = instanceContainer.getLayer(this.layer);\n const rendererObject = this.getRendererObject();\n if (rendererObject) {\n theLayer.getRenderer().removeRendererObject(rendererObject);\n }\n const rendererObject3D = this.get3DRendererObject();\n if (rendererObject3D) {\n theLayer.getRenderer().remove3DRendererObject(rendererObject3D);\n }\n for (let j = 0, lenj = this._behaviors.length; j < lenj; ++j) {\n this._behaviors[j].onDestroy();\n }\n this.destroyCallbacks.forEach((c) => c());\n this.clearEffects();\n }\n\n /**\n * Called whenever the scene owning the object is paused.\n * This should *not* impact objects, but some may need to inform their renderer.\n *\n * @param runtimeScene The scene owning the object.\n */\n onScenePaused(runtimeScene: gdjs.RuntimeScene): void {}\n\n /**\n * Called whenever the scene owning the object is resumed after a pause.\n * This should *not* impact objects, but some may need to inform their renderer.\n *\n * @param runtimeScene The scene owning the object.\n */\n onSceneResumed(runtimeScene: gdjs.RuntimeScene): void {}\n\n //Rendering:\n /**\n * @return The internal object for a 2D rendering (PIXI.DisplayObject...)\n */\n getRendererObject(): RendererObjectInterface | null | undefined {\n return undefined;\n }\n\n /**\n * @return The internal object for a 3D rendering (PIXI.DisplayObject...)\n */\n get3DRendererObject(): THREE.Object3D | null | undefined {\n return undefined;\n }\n\n //Common properties:\n /**\n * Get the name of the object.\n * @return The object's name.\n */\n getName(): string {\n return this.name;\n }\n\n /**\n * Get the name identifier of the object.\n * @return The object's name identifier.\n */\n getNameId(): integer {\n return this._nameId;\n }\n\n /**\n * Get the unique identifier of the object.<br>\n * The identifier is set by the runtimeScene owning the object.<br>\n * You can also use the id property (this._object.id) for increased efficiency instead of\n * calling this method.\n *\n * @return The object identifier\n */\n getUniqueId(): integer {\n return this.id;\n }\n\n /**\n * Set the position of the object.\n *\n * @param x The new X position\n * @param y The new Y position\n */\n setPosition(x: float, y: float): void {\n this.setX(x);\n this.setY(y);\n }\n\n /**\n * Set the X position of the object.\n *\n * @param x The new X position\n */\n setX(x: float): void {\n if (x === this.x) {\n return;\n }\n this.x = x;\n this.invalidateHitboxes();\n }\n\n /**\n * Send a signal that the object hitboxes are no longer up to date.\n *\n * The signal is propagated to parents so\n * {@link gdjs.RuntimeObject.hitBoxesDirty} should never be modified\n * directly.\n */\n invalidateHitboxes(): void {\n // TODO EBO Check that no community extension set hitBoxesDirty to true\n // directly.\n this.hitBoxesDirty = true;\n this._runtimeScene.onChildrenLocationChanged();\n }\n\n /**\n * Get the X position of the object.\n *\n * @return The X position of the object\n */\n getX(): float {\n return this.x;\n }\n\n /**\n * Set the Y position of the object.\n *\n * @param y The new Y position\n */\n setY(y: float): void {\n if (y === this.y) {\n return;\n }\n this.y = y;\n this.invalidateHitboxes();\n }\n\n /**\n * Get the Y position of the object.\n *\n * @return The Y position of the object\n */\n getY(): float {\n return this.y;\n }\n\n /**\n * Get the X position of the rendered object.\n *\n * For most objects, this will returns the same value as getX(). But if the object\n * has an origin that is not the same as the point (0,0) of the object displayed,\n * getDrawableX will differ.\n *\n * @return The X position of the rendered object.\n */\n getDrawableX(): float {\n return this.getX();\n }\n\n /**\n * Get the Y position of the rendered object.\n *\n * For most objects, this will returns the same value as getY(). But if the object\n * has an origin that is not the same as the point (0,0) of the object displayed,\n * getDrawableY will differ.\n *\n * @return The Y position of the rendered object.\n */\n getDrawableY(): float {\n return this.getY();\n }\n\n rotateTowardPosition(\n x: float,\n y: float,\n speed: float,\n scene: gdjs.RuntimeScene\n ): void {\n this.rotateTowardAngle(\n gdjs.toDegrees(\n Math.atan2(\n y - (this.getDrawableY() + this.getCenterY()),\n x - (this.getDrawableX() + this.getCenterX())\n )\n ),\n speed,\n scene\n );\n }\n\n /**\n * @param angle The targeted direction angle.\n * @param speed The rotation speed.\n * @param instanceContainer The container the object belongs to (deprecated - can be omitted).\n */\n rotateTowardAngle(\n angle: float,\n speed: float,\n instanceContainer?: gdjs.RuntimeInstanceContainer\n ): void {\n if (speed === 0) {\n this.setAngle(angle);\n return;\n }\n const angularDiff = gdjs.evtTools.common.angleDifference(\n this.getAngle(),\n angle\n );\n const diffWasPositive = angularDiff >= 0;\n let newAngle =\n this.getAngle() +\n ((diffWasPositive ? -1.0 : 1.0) * speed * this.getElapsedTime()) / 1000;\n\n if (\n // @ts-ignore\n (gdjs.evtTools.common.angleDifference(newAngle, angle) > 0) ^\n diffWasPositive\n ) {\n newAngle = angle;\n }\n this.setAngle(newAngle);\n if (\n //Objects like sprite in 8 directions does not handle small increments...\n this.getAngle() !== newAngle\n ) {\n this.setAngle(\n //...so force them to be in the path angle anyway.\n angle\n );\n }\n }\n\n /**\n * Rotate the object at the given speed\n *\n * @param speed The speed, in degrees per second.\n * @param instanceContainer The container the object belongs to (deprecated - can be omitted).\n */\n rotate(\n speed: float,\n instanceContainer?: gdjs.RuntimeInstanceContainer\n ): void {\n this.setAngle(this.getAngle() + (speed * this.getElapsedTime()) / 1000);\n }\n\n /**\n * Set the angle of the object.\n *\n * @param angle The new angle of the object\n */\n setAngle(angle: float): void {\n if (this.angle === angle) {\n return;\n }\n this.angle = angle;\n this.invalidateHitboxes();\n }\n\n /**\n * Get the rotation of the object.\n *\n * @return The rotation of the object, in degrees.\n */\n getAngle(): float {\n return this.angle;\n }\n\n /**\n * Set the layer of the object.\n *\n * @param layer The new layer of the object\n */\n setLayer(layer: string): void {\n if (layer === this.layer) {\n return;\n }\n const oldLayer = this._runtimeScene.getLayer(this.layer);\n this.layer = layer;\n const newLayer = this._runtimeScene.getLayer(this.layer);\n const rendererObject = this.getRendererObject();\n if (rendererObject) {\n oldLayer.getRenderer().removeRendererObject(rendererObject);\n newLayer.getRenderer().addRendererObject(rendererObject, this.zOrder);\n }\n const rendererObject3D = this.get3DRendererObject();\n if (rendererObject3D) {\n oldLayer.getRenderer().remove3DRendererObject(rendererObject3D);\n newLayer.getRenderer().add3DRendererObject(rendererObject3D);\n }\n }\n\n /**\n * Get the layer of the object.\n *\n * @return The layer of the object\n */\n getLayer(): string {\n return this.layer;\n }\n\n /**\n * Return true if the object is on the specified layer\n *\n * @param layer The layer to be tested.\n * @return true if the object is on the specified layer\n */\n isOnLayer(layer: string): boolean {\n return this.layer === layer;\n }\n\n /**\n * Set the Z order of the object.\n *\n * @param z The new Z order position of the object\n */\n setZOrder(z: integer): void {\n if (z === this.zOrder) {\n return;\n }\n this.zOrder = z;\n const rendererObject = this.getRendererObject();\n if (rendererObject) {\n const theLayer = this._runtimeScene.getLayer(this.layer);\n theLayer.getRenderer().changeRendererObjectZOrder(rendererObject, z);\n }\n }\n\n /**\n * Get the Z order of the object.\n *\n * @return The Z order of the object\n */\n getZOrder(): float {\n return this.zOrder;\n }\n\n /**\n * Get the container of the object variables\n * @return The variables of the object\n */\n getVariables(): gdjs.VariablesContainer {\n return this._variables;\n }\n\n /**\n * Get the value of a variable considered as a number. Equivalent of variable.getAsNumber()\n * @param variable The variable to be accessed\n * @return The value of the specified variable\n * @static\n */\n static getVariableNumber(variable: gdjs.Variable): number {\n return variable.getAsNumber();\n }\n\n /**\n * Return the variable passed as argument without any change.\n * Only for usage by events.\n *\n * @param variable The variable to be accessed\n * @return The specified variable\n * @static\n */\n static returnVariable(variable: gdjs.Variable): gdjs.Variable {\n return variable;\n }\n\n /**\n * Get the value of a variable considered as a string. Equivalent of variable.getAsString()\n * @param variable The variable to be accessed\n * @return The string of the specified variable\n * @static\n */\n static getVariableString(variable: gdjs.Variable): string {\n return variable.getAsString();\n }\n\n /**\n * Shortcut to set the value of a variable considered as a boolean.\n * This shortcut function is needed for events code generation.\n *\n * @private\n * @param {gdjs.Variable} variable\n * @param {boolean} newValue\n */\n static setVariableBoolean = function (\n variable: gdjs.Variable,\n newValue: boolean\n ) {\n variable.setBoolean(newValue);\n };\n\n /**\n * Shortcut to compare the value of a variable considered as a boolean.\n * This shortcut function is needed for events code generation.\n *\n * @private\n * @param {gdjs.Variable} variable\n * @param {boolean} compareWith\n * @returns {boolean}\n */\n static getVariableBoolean = function (\n variable: gdjs.Variable,\n compareWith: boolean\n ): boolean {\n return gdjs.evtTools.common.getVariableBoolean(variable, compareWith);\n };\n\n /**\n * Toggles a variable.\n * This shortcut function is needed for events code generation.\n *\n * @private\n * @param {gdjs.Variable} variable\n * @see {gdjs.evtTools.common.toggleVariableBoolean}\n */\n static toggleVariableBoolean = function (variable: gdjs.Variable) {\n gdjs.evtTools.common.toggleVariableBoolean(variable);\n };\n\n /**\n * Get the number of children from a variable\n * @param variable The variable to be accessed\n * @return The number of children\n * @static\n */\n static getVariableChildCount(variable: gdjs.Variable): integer {\n return variable.getChildrenCount();\n }\n\n /**\n * Shortcut to set the value of a variable considered as a number\n * @param variable The variable to be changed\n * @param newValue The value to be set\n */\n static setVariableNumber(variable: gdjs.Variable, newValue: float): void {\n variable.setNumber(newValue);\n }\n\n /**\n * Shortcut to set the value of a variable considered as a string\n * @param variable The variable to be changed\n * @param newValue {String} The value to be set\n */\n static setVariableString(variable: gdjs.Variable, newValue: string) {\n variable.setString(newValue);\n }\n\n /**\n * @static\n * @param variable The variable to be tested\n * @param childName The name of the child\n */\n private static variableChildExists(\n variable: gdjs.Variable,\n childName: string\n ): boolean {\n return variable.hasChild(childName);\n }\n\n /**\n * @static\n * @param variable The variable to be changed\n * @param childName The name of the child\n */\n private static variableRemoveChild(\n variable: gdjs.Variable,\n childName: string\n ): void {\n variable.removeChild(childName);\n }\n\n /**\n * @static\n * @param variable The variable to be cleared\n */\n private static variableClearChildren(variable: gdjs.Variable): void {\n variable.clearChildren();\n }\n\n /**\n * This shortcut function is needed for events code generation.\n * @private\n */\n static variablePushCopy = function (\n array: gdjs.Variable,\n variable: gdjs.Variable\n ) {\n array.pushVariableCopy(variable);\n };\n\n /**\n * This shortcut function is needed for events code generation.\n * @private\n */\n static valuePush = function (\n array: gdjs.Variable,\n value: string | float | boolean\n ) {\n array.pushValue(value);\n };\n\n /**\n * This shortcut function is needed for events code generation.\n * @private\n */\n static variableRemoveAt = function (array: gdjs.Variable, index: number) {\n array.removeAtIndex(index);\n };\n\n /**\n * Shortcut to get the first value of an array variable as a string.\n */\n static getFirstVariableString = function (array: gdjs.Variable): string {\n if (array.getChildrenCount() === 0) {\n return '';\n }\n return array.getAllChildrenArray()[0].getAsString();\n };\n\n /**\n * Shortcut to get the first value of an array variable as a number.\n */\n static getFirstVariableNumber = function (array: gdjs.Variable): number {\n if (array.getChildrenCount() === 0) {\n return 0;\n }\n return array.getAllChildrenArray()[0].getAsNumber();\n };\n\n /**\n * Shortcut to get the last value of an array variable as a string.\n */\n static getLastVariableString = function (array: gdjs.Variable): string {\n const children = array.getAllChildrenArray();\n return children.length === 0\n ? ''\n : children[children.length - 1].getAsString();\n };\n\n /**\n * Shortcut to get the last value of an array variable as a number.\n */\n static getLastVariableNumber = function (array: gdjs.Variable): number {\n const children = array.getAllChildrenArray();\n return children.length === 0\n ? 0\n : children[children.length - 1].getAsNumber();\n };\n\n /**\n * Shortcut to test if a variable exists for the object.\n * @param name The variable to be tested\n * @return true if the variable exists.\n */\n hasVariable(name: string): boolean {\n return this._variables.has(name);\n }\n\n /**\n * Returns the collection of effects to be rendered by the\n * underlying renderer.\n * @returns The renderer effects.\n */\n getRendererEffects() {\n return this._rendererEffects;\n }\n\n /**\n * Add a new effect, or replace the one with the same name.\n * @param effectData The data describing the effect to add.\n */\n addEffect(effectData: EffectData): boolean {\n const rendererObject = this.getRendererObject();\n if (!rendererObject) return false;\n\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .addEffect(effectData, this._rendererEffects, this);\n }\n\n /**\n * Remove the effect with the specified name\n * @param effectName The name of the effect.\n */\n removeEffect(effectName: string): boolean {\n const rendererObject = this.getRendererObject();\n if (!rendererObject) return false;\n\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .removeEffect(this._rendererEffects, this, effectName);\n }\n\n /**\n * Remove all effects.\n */\n clearEffects(): boolean {\n const rendererObject = this.getRendererObject();\n if (!rendererObject) return false;\n\n this._rendererEffects = {};\n return (\n this._runtimeScene\n .getGame()\n .getEffectsManager()\n // @ts-expect-error - the effects manager is typed with the PIXI object.\n .clearEffects(rendererObject)\n );\n }\n\n /**\n * Change an effect parameter value (for parameters that are numbers).\n * @param name The name of the effect to update.\n * @param parameterName The name of the parameter to update.\n * @param value The new value (number).\n */\n setEffectDoubleParameter(\n name: string,\n parameterName: string,\n value: float\n ): boolean {\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .setEffectDoubleParameter(\n this._rendererEffects,\n name,\n parameterName,\n value\n );\n }\n\n /**\n * Change an effect parameter value (for parameters that are strings).\n * @param name The name of the effect to update.\n * @param parameterName The name of the parameter to update.\n * @param value The new value (string).\n */\n setEffectStringParameter(\n name: string,\n parameterName: string,\n value: string\n ): boolean {\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .setEffectStringParameter(\n this._rendererEffects,\n name,\n parameterName,\n value\n );\n }\n\n /**\n * Change an effect parameter value (for parameters that are booleans).\n * @param name The name of the effect to update.\n * @param parameterName The name of the parameter to update.\n * @param value The new value (boolean).\n */\n setEffectBooleanParameter(\n name: string,\n parameterName: string,\n value: boolean\n ): boolean {\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .setEffectBooleanParameter(\n this._rendererEffects,\n name,\n parameterName,\n value\n );\n }\n\n /**\n * Updates all the parameters of an effect.\n * @param effectData The data describing the effect\n */\n updateAllEffectParameters(effectData: EffectData): boolean {\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .updateAllEffectParameters(this._rendererEffects, effectData);\n }\n\n /**\n * Enable or disable an effect.\n * @param name The name of the effect to enable or disable.\n * @param enable true to enable, false to disable\n */\n enableEffect(name: string, enable: boolean): void {\n this._runtimeScene\n .getGame()\n .getEffectsManager()\n .enableEffect(this._rendererEffects, this, name, enable);\n }\n\n /**\n * Check if an effect is enabled\n * @param name The name of the effect\n * @return true if the effect is enabled, false otherwise.\n */\n isEffectEnabled(name: string): boolean {\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .isEffectEnabled(this._rendererEffects, this, name);\n }\n\n /**\n * Check if an effect exists on this object\n * @param name The name of the effect\n * @return true if the effect exists, false otherwise.\n */\n hasEffect(name: string): boolean {\n return this._runtimeScene\n .getGame()\n .getEffectsManager()\n .hasEffect(this._rendererEffects, name);\n }\n\n /**\n * Hide (or show) the object.\n * @param enable Set it to true to hide the object, false to show it.\n */\n hide(enable: boolean): void {\n if (enable === undefined) {\n enable = true;\n }\n this.hidden = enable;\n }\n\n /**\n * Return true if the object is not hidden.\n *\n * Note: This is unrelated to the actual visibility of the object on the screen.\n * For this, see `getVisibilityAABB` to get the bounding boxes of the object as displayed\n * on the scene.\n *\n * @return true if the object is not hidden.\n */\n isVisible(): boolean {\n return !this.hidden;\n }\n\n /**\n * Return true if the object is hidden.\n * @return true if the object is hidden.\n */\n isHidden(): boolean {\n return this.hidden;\n }\n\n /**\n * Set the width of the object, if applicable.\n * @param width The new width in pixels.\n */\n setWidth(width: float): void {}\n\n /**\n * Set the height of the object, if applicable.\n * @param height The new height in pixels.\n */\n setHeight(height: float): void {}\n\n /**\n * Return the width of the object.\n * @return The width of the object\n */\n getWidth(): float {\n return 0;\n }\n\n /**\n * Return the width of the object.\n * @return The height of the object\n */\n getHeight(): float {\n return 0;\n }\n\n /**\n * Return the X position of the object center, **relative to the object X position** (`getDrawableX`).\n * Use `getCenterXInScene` to get the position of the center in the scene.\n *\n * @return the X position of the object center, relative to `getDrawableX()`.\n */\n getCenterX(): float {\n return this.getWidth() / 2;\n }\n\n /**\n * Return the Y position of the object center, **relative to the object position** (`getDrawableY`).\n * Use `getCenterYInScene` to get the position of the center in the scene.\n *\n * @return the Y position of the object center, relative to `getDrawableY()`.\n */\n getCenterY(): float {\n return this.getHeight() / 2;\n }\n\n /**\n * Return the X position of the object center, **relative to the scene origin**.\n * @returns the X position of the object center, **relative to the scene origin**.\n */\n getCenterXInScene(): float {\n return this.getDrawableX() + this.getCenterX();\n }\n\n /**\n * Return the Y position of the object center, **relative to the scene origin**.\n * @returns the Y position of the object center, **relative to the scene origin**.\n */\n getCenterYInScene(): float {\n return this.getDrawableY() + this.getCenterY();\n }\n\n /**\n * Change the object center position in the scene.\n * @param x The new X position of the center in the scene.\n * @param y The new Y position of the center in the scene.\n */\n setCenterPositionInScene(x: float, y: float): void {\n this.setX(x + this.x - (this.getDrawableX() + this.getCenterX()));\n this.setY(y + this.y - (this.getDrawableY() + this.getCenterY()));\n }\n\n /**\n * Change the object center X position in the scene.\n * @param x The new X position of the center in the scene.\n */\n setCenterXInScene(x: float): void {\n this.setX(x + this.x - (this.getDrawableX() + this.getCenterX()));\n }\n\n /**\n * Change the object center Y position in the scene.\n * @param x The new Y position of the center in the scene.\n */\n setCenterYInScene(y: float): void {\n this.setY(y + this.y - (this.getDrawableY() + this.getCenterY()));\n }\n\n //Forces :\n /**\n * Get a force from the garbage, or create a new force is garbage is empty.<br>\n * To be used each time a force is created so as to avoid temporaries objects.\n *\n * @param x The x coordinates of the force\n * @param y The y coordinates of the force\n * @param multiplier Set the force multiplier\n */\n private _getRecycledForce(\n x: float,\n y: float,\n multiplier: integer\n ): gdjs.Force {\n if (RuntimeObject.forcesGarbage.length === 0) {\n return new gdjs.Force(x, y, multiplier);\n } else {\n const recycledForce = RuntimeObject.forcesGarbage.pop() as gdjs.Force;\n recycledForce.setX(x);\n recycledForce.setY(y);\n recycledForce.setMultiplier(multiplier);\n return recycledForce;\n }\n }\n\n /**\n * Add a force to the object to move it.\n * @param x The x coordinates of the force\n * @param y The y coordinates of the force\n * @param multiplier Set the force multiplier\n */\n addForce(x: float, y: float, multiplier: integer): void {\n this._forces.push(this._getRecycledForce(x, y, multiplier));\n }\n\n /**\n * Add a force using polar coordinates.\n * @param angle The angle of the force, in degrees.\n * @param len The length of the force, in pixels.\n * @param multiplier Set the force multiplier\n */\n addPolarForce(angle: float, len: float, multiplier: integer): void {\n const angleInRadians = gdjs.toRad(angle);\n\n //TODO: Benchmark with Math.PI\n const forceX = Math.cos(angleInRadians) * len;\n const forceY = Math.sin(angleInRadians) * len;\n this._forces.push(this._getRecycledForce(forceX, forceY, multiplier));\n }\n\n /**\n * Add a force oriented toward a position\n * @param x The target x position\n * @param y The target y position\n * @param len The force length, in pixels.\n * @param multiplier Set the force multiplier\n */\n addForceTowardPosition(\n x: float,\n y: float,\n len: float,\n multiplier: integer\n ): void {\n const angleInRadians = Math.atan2(\n y - (this.getDrawableY() + this.getCenterY()),\n x - (this.getDrawableX() + this.getCenterX())\n );\n const forceX = Math.cos(angleInRadians) * len;\n const forceY = Math.sin(angleInRadians) * len;\n this._forces.push(this._getRecycledForce(forceX, forceY, multiplier));\n }\n\n /**\n * Add a force oriented toward another object.<br>\n * (Shortcut for addForceTowardPosition)\n * @param object The target object\n * @param len The force length, in pixels.\n * @param multiplier Set the force multiplier\n */\n addForceTowardObject(\n object: gdjs.RuntimeObject,\n len: float,\n multiplier: integer\n ): void {\n if (object == null) {\n return;\n }\n this.addForceTowardPosition(\n object.getDrawableX() + object.getCenterX(),\n object.getDrawableY() + object.getCenterY(),\n len,\n multiplier\n );\n }\n\n /**\n * Deletes all forces applied on the object\n */\n clearForces(): void {\n RuntimeObject.forcesGarbage.push.apply(\n RuntimeObject.forcesGarbage,\n this._forces\n );\n this._forces.length = 0;\n }\n\n /**\n * Return true if no forces are applied on the object.\n * @return true if no forces are applied on the object.\n */\n hasNoForces(): boolean {\n return this._forces.length === 0;\n }\n\n /**\n * Called once a step by runtimeScene to update forces magnitudes and\n * remove null ones.\n */\n updateForces(elapsedTime: float): void {\n for (let i = 0; i < this._forces.length; ) {\n const force = this._forces[i];\n const multiplier = force.getMultiplier();\n if (multiplier === 1) {\n // Permanent force\n ++i;\n } else {\n if (\n multiplier === 0 ||\n // Instant or force disappearing\n force.getLength() <= 0.001\n ) {\n RuntimeObject.forcesGarbage.push(force);\n this._forces.splice(i, 1);\n } else {\n // Deprecated way of updating forces progressively.\n force.setLength(\n force.getLength() -\n force.getLength() * (1 - multiplier) * elapsedTime\n );\n ++i;\n }\n }\n }\n }\n\n /**\n * Return a force which is the sum of all forces applied on the object.\n *\n * @return A force object.\n */\n getAverageForce(): gdjs.Force {\n let averageX = 0;\n let averageY = 0;\n for (let i = 0, len = this._forces.length; i < len; ++i) {\n averageX += this._forces[i].getX();\n averageY += this._forces[i].getY();\n }\n this._averageForce.setX(averageX);\n this._averageForce.setY(averageY);\n return this._averageForce;\n }\n\n /**\n * Return true if the average angle of the forces applied on the object\n * is in a given range.\n *\n * @param angle The angle to be tested.\n * @param toleranceInDegrees The length of the range :\n * @return true if the difference between the average angle of the forces\n * and the angle parameter is inferior to toleranceInDegrees parameter.\n */\n averageForceAngleIs(angle: float, toleranceInDegrees: float): boolean {\n let averageAngle = this.getAverageForce().getAngle();\n if (averageAngle < 0) {\n averageAngle += 360;\n }\n return Math.abs(angle - averageAngle) < toleranceInDegrees / 2;\n }\n\n //Hit boxes and collision :\n /**\n * Get all the hit boxes for the object.\n *\n * For collision checks, {@link getHitBoxesAround} should be used instead.\n *\n * The default implementation returns a basic bounding box based the size (getWidth and\n * getHeight) and the center point of the object (getCenterX and getCenterY).\n *\n * You should probably redefine {@link updateHitBoxes} instead of this function.\n *\n * @return An array composed of polygon.\n */\n getHitBoxes(): gdjs.Polygon[] {\n //Avoid a naive implementation requiring to recreate temporaries each time\n //the function is called:\n //(var rectangle = gdjs.Polygon.createRectangle(this.getWidth(), this.getHeight());\n //...)\n if (this.hitBoxesDirty) {\n this.updateHitBoxes();\n this.updateAABB();\n this.hitBoxesDirty = false;\n }\n return this.hitBoxes;\n }\n\n /**\n * Return at least all the hit boxes that overlap a given area.\n *\n * The hit boxes don't need to actually overlap the area,\n * (i.e: it's correct to return more hit boxes than those in the specified area)\n * but the ones that do must be returned.\n *\n * The default implementation returns the same as {@link getHitBoxes}.\n *\n * This method can be overridden by grid based objects (or other objects\n * that can quickly compute which hitboxes are touching a given area)\n * to optimize collision checks.\n *\n * When overriding this method, the following ones should be overridden too:\n * * {@link getHitBoxes}\n * * {@link getAABB}\n * * {@link updateHitBoxes}\n * * {@link updateAABB}\n *\n * @param left bound of the area in scene coordinates\n * @param top bound of the area in scene coordinates\n * @param right bound of the area in scene coordinates\n * @param bottom bound of the area in scene coordinates\n *\n * @return at least all the hit boxes that overlap a given area.\n */\n getHitBoxesAround(\n left: float,\n top: float,\n right: float,\n bottom: float\n ): Iterable<gdjs.Polygon> {\n return this.getHitBoxes();\n }\n\n /**\n * Update the hit boxes for the object.\n *\n * The default implementation set a basic bounding box based on the size (getWidth and\n * getHeight) and the center point of the object (getCenterX and getCenterY).\n * Result is cached until invalidated (by a position change, angle change...).\n *\n * You should not call this function by yourself, it is called when necessary by getHitBoxes method.\n * However, you can redefine it if your object need custom hit boxes.\n */\n updateHitBoxes(): void {\n this.hitBoxes = this._defaultHitBoxes;\n const width = this.getWidth();\n const height = this.getHeight();\n const centerX = this.getCenterX();\n const centerY = this.getCenterY();\n if (centerX === width / 2 && centerY === height / 2) {\n this.hitBoxes[0].vertices[0][0] = -centerX;\n this.hitBoxes[0].vertices[0][1] = -centerY;\n this.hitBoxes[0].vertices[1][0] = +centerX;\n this.hitBoxes[0].vertices[1][1] = -centerY;\n this.hitBoxes[0].vertices[2][0] = +centerX;\n this.hitBoxes[0].vertices[2][1] = +centerY;\n this.hitBoxes[0].vertices[3][0] = -centerX;\n this.hitBoxes[0].vertices[3][1] = +centerY;\n } else {\n this.hitBoxes[0].vertices[0][0] = 0 - centerX;\n this.hitBoxes[0].vertices[0][1] = 0 - centerY;\n this.hitBoxes[0].vertices[1][0] = width - centerX;\n this.hitBoxes[0].vertices[1][1] = 0 - centerY;\n this.hitBoxes[0].vertices[2][0] = width - centerX;\n this.hitBoxes[0].vertices[2][1] = height - centerY;\n this.hitBoxes[0].vertices[3][0] = 0 - centerX;\n this.hitBoxes[0].vertices[3][1] = height - centerY;\n }\n this.hitBoxes[0].rotate(gdjs.toRad(this.getAngle()));\n this.hitBoxes[0].move(\n this.getDrawableX() + centerX,\n this.getDrawableY() + centerY\n );\n }\n\n isIncludedInParentCollisionMask(): boolean {\n return this._isIncludedInParentCollisionMask;\n }\n\n setIncludedInParentCollisionMask(isIncluded: boolean): void {\n const wasIncluded = this._isIncludedInParentCollisionMask;\n this._isIncludedInParentCollisionMask = isIncluded;\n if (wasIncluded !== isIncluded) {\n this._runtimeScene.onChildrenLocationChanged();\n }\n }\n\n /**\n * Get the AABB (axis aligned bounding box) for the object.\n *\n * The default implementation uses either the position/size of the object (when angle is 0) or\n * hitboxes (when angle is not 0) to compute the bounding box.\n * Result is cached until invalidated (by a position change, angle change...).\n *\n * You should probably redefine updateAABB instead of this function.\n *\n * @return The bounding box\n */\n getAABB(): AABB {\n if (this.hitBoxesDirty) {\n this.updateHitBoxes();\n this.updateAABB();\n this.hitBoxesDirty = false;\n }\n return this.aabb;\n }\n\n /**\n * Get the AABB (axis aligned bounding box) to be used to determine if the object\n * is visible on screen. The gdjs.RuntimeScene will hide the renderer object if\n * the object is not visible on screen (\"culling\").\n *\n * The default implementation uses the AABB returned by getAABB.\n *\n * If `null` is returned, the object is assumed to be always visible.\n *\n * @return The bounding box or `null`.\n */\n getVisibilityAABB(): AABB | null {\n return this.getAABB();\n }\n\n /**\n * Update the AABB (axis aligned bounding box) for the object.\n *\n * Default implementation uses either the position/size of the object (when angle is 0) or\n * hitboxes (when angle is not 0) to compute the bounding box.\n *\n * You should not call this function by yourself, it is called when necessary by getAABB method.\n * However, you can redefine it if your object can have a faster implementation.\n */\n updateAABB(): void {\n if (this.getAngle() === 0) {\n // Fast/simple computation of AABB for non rotated object\n // (works even for object with non default center/origin\n // because we're using getDrawableX/Y)\n this.aabb.min[0] = this.getDrawableX();\n this.aabb.min[1] = this.getDrawableY();\n this.aabb.max[0] = this.aabb.min[0] + this.getWidth();\n this.aabb.max[1] = this.aabb.min[1] + this.getHeight();\n } else {\n // Use hitboxes if object is rotated to ensure that the AABB\n // is properly bounding the whole object.\n // Slower (10-15% slower).\n let first = true;\n for (let i = 0; i < this.hitBoxes.length; i++) {\n for (let j = 0; j < this.hitBoxes[i].vertices.length; j++) {\n const vertex = this.hitBoxes[i].vertices[j];\n if (first) {\n this.aabb.min[0] = vertex[0];\n this.aabb.max[0] = vertex[0];\n this.aabb.min[1] = vertex[1];\n this.aabb.max[1] = vertex[1];\n first = false;\n } else {\n this.aabb.min[0] = Math.min(this.aabb.min[0], vertex[0]);\n this.aabb.max[0] = Math.max(this.aabb.max[0], vertex[0]);\n this.aabb.min[1] = Math.min(this.aabb.min[1], vertex[1]);\n this.aabb.max[1] = Math.max(this.aabb.max[1], vertex[1]);\n }\n }\n }\n }\n }\n\n /**\n * Shortcut for `getAABB().min[0]`.\n * See {@link getAABB}.\n */\n getAABBLeft(): float {\n return this.getAABB().min[0];\n }\n\n /**\n * Shortcut for `getAABB().min[1]`.\n * See {@link getAABB}.\n */\n getAABBTop(): float {\n return this.getAABB().min[1];\n }\n\n /**\n * Shortcut for `getAABB().max[0]`.\n * See {@link getAABB}.\n */\n getAABBRight(): float {\n return this.getAABB().max[0];\n }\n\n /**\n * Shortcut for `getAABB().max[1]`.\n * See {@link getAABB}.\n */\n getAABBBottom(): float {\n return this.getAABB().max[1];\n }\n\n /**\n * Shortcut for getting the center on the X coordinates of the object AABB.\n * See {@link getAABB}.\n */\n getAABBCenterX(): float {\n return this.getAABB().min[0] / 2 + this.getAABB().max[0] / 2;\n }\n\n /**\n * Shortcut for getting the center on the Y coordinates of the object AABB.\n * See {@link getAABB}.\n */\n getAABBCenterY(): float {\n return this.getAABB().min[1] / 2 + this.getAABB().max[1] / 2;\n }\n\n //Behaviors:\n /**\n * Call each behavior stepPreEvents method.\n */\n stepBehaviorsPreEvents(\n instanceContainer: gdjs.RuntimeInstanceContainer\n ): void {\n for (let i = 0, len = this._behaviors.length; i < len; ++i) {\n this._behaviors[i].stepPreEvents(instanceContainer);\n }\n }\n\n /**\n * Call each behavior stepPostEvents method.\n */\n stepBehaviorsPostEvents(\n instanceContainer: gdjs.RuntimeInstanceContainer\n ): void {\n for (let i = 0, len = this._behaviors.length; i < len; ++i) {\n this._behaviors[i].stepPostEvents(instanceContainer);\n }\n }\n\n /**\n * Called when the object was hot reloaded, to notify behaviors\n * that the object was modified. Useful for behaviors that\n */\n notifyBehaviorsObjectHotReloaded(): void {\n for (let i = 0, len = this._behaviors.length; i < len; ++i) {\n this._behaviors[i].onObjectHotReloaded();\n }\n }\n\n /**\n * Get a behavior from its name.\n * If the behavior does not exists, `undefined` is returned.\n *\n * **Never keep a reference** to a behavior, as they can be hot-reloaded. Instead,\n * always call getBehavior on the object.\n *\n * @param name {String} The behavior name.\n * @return The behavior with the given name, or undefined.\n */\n getBehavior(name: string): gdjs.RuntimeBehavior | null {\n return this._behaviorsTable.get(name);\n }\n\n /**\n * Check if a behavior is used by the object.\n *\n * @param name {String} The behavior name.\n */\n hasBehavior(name: string): boolean {\n return this._behaviorsTable.containsKey(name);\n }\n\n /**\n * De/activate a behavior of the object.\n *\n * @param name {String} The behavior name.\n * @param enable {boolean} true to activate the behavior\n */\n activateBehavior(name: string, enable: boolean): void {\n if (this._behaviorsTable.containsKey(name)) {\n this._behaviorsTable.get(name).activate(enable);\n }\n }\n\n /**\n * Check if a behavior is activated\n *\n * @param name The behavior name.\n * @return true if the behavior is activated.\n */\n behaviorActivated(name: string): boolean {\n if (this._behaviorsTable.containsKey(name)) {\n return this._behaviorsTable.get(name).activated();\n }\n return false;\n }\n\n /**\n * Remove the behavior with the given name. Usually only used by\n * hot-reloading, as performance of this operation is not guaranteed\n * (in the future, this could lead to re-organization of arrays\n * holding behaviors).\n *\n * @param name The name of the behavior to remove.\n * @returns true if the behavior was properly removed, false otherwise.\n */\n removeBehavior(name: string): boolean {\n const behavior = this._behaviorsTable.get(name);\n if (!behavior) {\n return false;\n }\n behavior.onDestroy();\n const behaviorIndex = this._behaviors.indexOf(behavior);\n if (behaviorIndex !== -1) {\n this._behaviors.splice(behaviorIndex, 1);\n }\n this._behaviorsTable.remove(name);\n return true;\n }\n\n /**\n * Create the behavior described by the given BehaviorData\n *\n * @param behaviorData The data to be used to construct the behavior.\n * @returns true if the behavior was properly created, false otherwise.\n */\n addNewBehavior(behaviorData: BehaviorData): boolean {\n const Ctor = gdjs.getBehaviorConstructor(behaviorData.type);\n if (!Ctor) {\n return false;\n }\n const newRuntimeBehavior = new Ctor(\n this._runtimeScene,\n behaviorData,\n this\n );\n this._behaviors.push(newRuntimeBehavior);\n this._behaviorsTable.put(behaviorData.name, newRuntimeBehavior);\n return true;\n }\n\n //Timers:\n /**\n * Updates the object timers. Called once during the game loop, before events and rendering.\n * @param elapsedTime The elapsed time since the previous frame in milliseconds.\n */\n updateTimers(elapsedTime: float): void {\n for (const name in this._timers.items) {\n if (this._timers.items.hasOwnProperty(name)) {\n this._timers.items[name].updateTime(elapsedTime);\n }\n }\n }\n\n /**\n * Compare a timer elapsed time. If the timer does not exist, it is created.\n *\n * @deprecated prefer using `getTimerElapsedTimeInSecondsOrNaN`.\n *\n * @param timerName The timer name.\n * @param timeInSeconds The time value to check in seconds.\n * @return True if the timer exists and its value is greater than or equal than the given time, false otherwise.\n */\n timerElapsedTime(timerName: string, timeInSeconds: float): boolean {\n if (!this._timers.containsKey(timerName)) {\n this._timers.put(timerName, new gdjs.Timer(timerName));\n return false;\n }\n return this.getTimerElapsedTimeInSeconds(timerName) >= timeInSeconds;\n }\n\n /**\n * Test a if a timer is paused.\n * @param timerName The timer name.\n * @return True if the timer exists and is paused, false otherwise.\n */\n timerPaused(timerName: string): boolean {\n if (!this._timers.containsKey(timerName)) {\n return false;\n }\n return this._timers.get(timerName).isPaused();\n }\n\n /**\n * Reset a timer. If the timer doesn't exist it is created.\n * @param timerName The timer name.\n */\n resetTimer(timerName: string): void {\n if (!this._timers.containsKey(timerName)) {\n this._timers.put(timerName, new gdjs.Timer(timerName));\n }\n this._timers.get(timerName).reset();\n }\n\n /**\n * Pause a timer. If the timer doesn't exist it is created.\n * @param timerName The timer name.\n */\n pauseTimer(timerName: string): void {\n if (!this._timers.containsKey(timerName)) {\n this._timers.put(timerName, new gdjs.Timer(timerName));\n }\n this._timers.get(timerName).setPaused(true);\n }\n\n /**\n * Unpause a timer. If the timer doesn't exist it is created.\n * @param timerName The timer name.\n */\n unpauseTimer(timerName: string): void {\n if (!this._timers.containsKey(timerName)) {\n this._timers.put(timerName, new gdjs.Timer(timerName));\n }\n this._timers.get(timerName).setPaused(false);\n }\n\n /**\n * Remove a timer\n * @param timerName The timer name.\n */\n removeTimer(timerName: string): void {\n if (this._timers.containsKey(timerName)) {\n this._timers.remove(timerName);\n }\n }\n\n /**\n * Get a timer elapsed time.\n *\n * This is used by expressions to return 0 when a timer doesn't exist\n * because numeric expressions must always return a number.\n *\n * @param timerName The timer name.\n * @return The timer elapsed time in seconds, 0 if the timer doesn't exist.\n */\n getTimerElapsedTimeInSeconds(timerName: string): float {\n if (!this._timers.containsKey(timerName)) {\n return 0;\n }\n return this._timers.get(timerName).getTime() / 1000.0;\n }\n\n /**\n * Get a timer elapsed time.\n *\n * This is used by conditions to return false when a timer doesn't exist,\n * no matter the relational operator.\n *\n * @param timerName The timer name.\n * @return The timer elapsed time in seconds, NaN if the timer doesn't exist.\n */\n getTimerElapsedTimeInSecondsOrNaN(timerName: string): float {\n if (!this._timers.containsKey(timerName)) {\n return Number.NaN;\n }\n return this._timers.get(timerName).getTime() / 1000.0;\n }\n\n //Other :\n /**\n * Separate the object from others objects, using their hitboxes.\n * @param objects Objects\n * @param ignoreTouchingEdges If true, then edges that are touching each other, without the hitbox polygons actually overlapping, won't be considered in collision.\n * @return true if the object was moved\n */\n separateFromObjects(\n objects: gdjs.RuntimeObject[],\n ignoreTouchingEdges: boolean\n ): boolean {\n let moveXArray: Array<float> = separateFromObjectsStatics.moveXArray;\n let moveYArray: Array<float> = separateFromObjectsStatics.moveYArray;\n moveXArray.length = 0;\n moveYArray.length = 0;\n\n // We can assume that the moving object is not grid based,\n // so there is no need for optimization:\n // getHitBoxes can be called directly.\n const hitBoxes = this.getHitBoxes();\n let aabb: AABB | null = null;\n\n // Check if there is a collision with each object\n for (const otherObject of objects) {\n if (otherObject.id === this.id) {\n continue;\n }\n let otherHitBoxesArray = otherObject.getHitBoxes();\n let otherHitBoxes: Iterable<gdjs.Polygon> = otherHitBoxesArray;\n if (otherHitBoxesArray.length > 4) {\n // The other object has a lot of hit boxes.\n // Try to reduce the amount of hitboxes to check.\n if (!aabb) {\n aabb = this.getAABB();\n }\n otherHitBoxes = otherObject.getHitBoxesAround(\n aabb.min[0],\n aabb.min[1],\n aabb.max[0],\n aabb.max[1]\n );\n }\n for (const hitBox of hitBoxes) {\n for (const otherHitBox of otherHitBoxes) {\n const result = gdjs.Polygon.collisionTest(\n hitBox,\n otherHitBox,\n ignoreTouchingEdges\n );\n if (result.collision) {\n moveXArray.push(result.move_axis[0]);\n moveYArray.push(result.move_axis[1]);\n }\n }\n }\n }\n return moveFollowingSeparatingVectors(this, moveXArray, moveYArray);\n }\n\n /**\n * Separate the object from others objects, using their hitboxes.\n * @param objectsLists Tables of objects\n * @param ignoreTouchingEdges If true, then edges that are touching each other, without the hitbox polygons actually overlapping, won't be considered in collision.\n * @return true if the object was moved\n */\n separateFromObjectsList(\n objectsLists: ObjectsLists,\n ignoreTouchingEdges: boolean\n ): boolean {\n let moveXArray: Array<float> = separateFromObjectsStatics.moveXArray;\n let moveYArray: Array<float> = separateFromObjectsStatics.moveYArray;\n moveXArray.length = 0;\n moveYArray.length = 0;\n\n // We can assume that the moving object is not grid based\n // So there is no need for optimization\n // getHitBoxes can be called directly.\n const hitBoxes = this.getHitBoxes();\n let aabb: AABB | null = null;\n\n for (const name in objectsLists.items) {\n if (objectsLists.items.hasOwnProperty(name)) {\n const otherObjects = objectsLists.items[name];\n\n // Check if their is a collision with each object\n for (const otherObject of otherObjects) {\n if (otherObject.id === this.id) {\n continue;\n }\n let otherHitBoxesArray = otherObject.getHitBoxes();\n let otherHitBoxes: Iterable<gdjs.Polygon> = otherHitBoxesArray;\n if (otherHitBoxesArray.length > 4) {\n // The other object has a lot of hit boxes.\n // Try to reduce the amount of hitboxes to check.\n if (!aabb) {\n aabb = this.getAABB();\n }\n otherHitBoxes = otherObject.getHitBoxesAround(\n aabb.min[0],\n aabb.min[1],\n aabb.max[0],\n aabb.max[1]\n );\n }\n for (const hitBox of hitBoxes) {\n for (const otherHitBox of otherHitBoxes) {\n const result = gdjs.Polygon.collisionTest(\n hitBox,\n otherHitBox,\n ignoreTouchingEdges\n );\n if (result.collision) {\n moveXArray.push(result.move_axis[0]);\n moveYArray.push(result.move_axis[1]);\n }\n }\n }\n }\n }\n }\n return moveFollowingSeparatingVectors(this, moveXArray, moveYArray);\n }\n\n /**\n * Get the distance, in pixels, between *the center* of this object and another object.\n * @param otherObject The other object\n */\n getDistanceToObject(otherObject: gdjs.RuntimeObject): float {\n return Math.sqrt(this.getSqDistanceToObject(otherObject));\n }\n\n /**\n * Get the squared distance, in pixels, between *the center* of this object and another object.\n * @param otherObject The other object\n */\n getSqDistanceToObject(otherObject: gdjs.RuntimeObject): float {\n if (otherObject === null) {\n return 0;\n }\n const x =\n this.getDrawableX() +\n this.getCenterX() -\n (otherObject.getDrawableX() + otherObject.getCenterX());\n const y =\n this.getDrawableY() +\n this.getCenterY() -\n (otherObject.getDrawableY() + otherObject.getCenterY());\n return x * x + y * y;\n }\n\n /**\n * Get the distance, in pixels, between *the center* of this object and a position.\n * @param targetX Target X position\n * @param targetY Target Y position\n */\n getDistanceToPosition(targetX: float, targetY: float): float {\n return Math.sqrt(this.getSqDistanceToPosition(targetX, targetY));\n }\n\n /**\n * Get the squared distance, in pixels, between *the center* of this object and a position.\n * @param targetX Target X position\n * @param targetY Target Y position\n */\n getSqDistanceToPosition(targetX: float, targetY: float): float {\n const x = this.getDrawableX() + this.getCenterX() - targetX;\n const y = this.getDrawableY() + this.getCenterY() - targetY;\n return x * x + y * y;\n }\n\n /**\n * Get the angle, in degrees, from the *object center* to another object.\n * @param otherObject The other object\n */\n getAngleToObject(otherObject: gdjs.RuntimeObject): float {\n if (otherObject === null) {\n return 0;\n }\n const x =\n this.getDrawableX() +\n this.getCenterX() -\n (otherObject.getDrawableX() + otherObject.getCenterX());\n const y =\n this.getDrawableY() +\n this.getCenterY() -\n (otherObject.getDrawableY() + otherObject.getCenterY());\n return gdjs.toDegrees(Math.atan2(-y, -x));\n }\n\n /**\n * Compute the X position when given an angle and distance relative to the starting object.\n * This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.\n * @param angle The angle, in degrees.\n * @param distance The distance from the object, in pixels\n */\n getXFromAngleAndDistance(angle: float, distance: float): float {\n return (\n this.getDrawableX() +\n this.getCenterX() +\n distance * Math.cos(gdjs.toRad(angle))\n );\n }\n\n /**\n * Compute the Y position when given an angle and distance relative to the starting object.\n * This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.\n * @param angle The angle, in degrees.\n * @param distance The distance from the object, in pixels\n */\n getYFromAngleAndDistance(angle: float, distance: float): float {\n return (\n this.getDrawableY() +\n this.getCenterY() +\n distance * Math.sin(gdjs.toRad(angle))\n );\n }\n\n /**\n * Get the angle, in degrees, from the *object center* to a position.\n * @param targetX Target X position\n * @param targetY Target Y position\n */\n getAngleToPosition(targetX: float, targetY: float): float {\n const x = this.getDrawableX() + this.getCenterX() - targetX;\n const y = this.getDrawableY() + this.getCenterY() - targetY;\n return gdjs.toDegrees(Math.atan2(-y, -x));\n }\n\n /**\n * Put the object around a position, with a specific distance and angle.\n * The distance and angle are computed between the position and *the center of the object*.\n *\n * @param x The x position of the target\n * @param y The y position of the target\n * @param distance The distance between the object and the target, in pixels.\n * @param angleInDegrees The angle between the object and the target, in degrees.\n */\n putAround(\n x: float,\n y: float,\n distance: float,\n angleInDegrees: float\n ): void {\n const angleInRadians = gdjs.toRad(angleInDegrees);\n\n this.setCenterXInScene(x + Math.cos(angleInRadians) * distance);\n this.setCenterYInScene(y + Math.sin(angleInRadians) * distance);\n }\n\n /**\n * Put the object around another object, with a specific distance and angle.\n * The distance and angle are computed between *the centers of the objects*.\n *\n * @param obj The target object\n * @param distance The distance between the object and the target\n * @param angleInDegrees The angle between the object and the target, in degrees.\n */\n putAroundObject(\n obj: gdjs.RuntimeObject,\n distance: float,\n angleInDegrees: float\n ): void {\n this.putAround(\n obj.getDrawableX() + obj.getCenterX(),\n obj.getDrawableY() + obj.getCenterY(),\n distance,\n angleInDegrees\n );\n }\n\n /**\n * @deprecated\n * @param objectsLists Tables of objects\n */\n separateObjectsWithoutForces(objectsLists: ObjectsLists): void {\n //Prepare the list of objects to iterate over.\n const objects = gdjs.staticArray(\n RuntimeObject.prototype.separateObjectsWithoutForces\n );\n objects.length = 0;\n const lists = gdjs.staticArray2(\n RuntimeObject.prototype.separateObjectsWithoutForces\n );\n objectsLists.values(lists);\n for (let i = 0, len = lists.length; i < len; ++i) {\n objects.push.apply(objects, lists[i]);\n }\n for (let i = 0, len = objects.length; i < len; ++i) {\n if (objects[i].id != this.id) {\n if (this.getDrawableX() < objects[i].getDrawableX()) {\n this.setX(objects[i].getDrawableX() - this.getWidth());\n } else {\n if (\n this.getDrawableX() + this.getWidth() >\n objects[i].getDrawableX() + objects[i].getWidth()\n ) {\n this.setX(objects[i].getDrawableX() + objects[i].getWidth());\n }\n }\n if (this.getDrawableY() < objects[i].getDrawableY()) {\n this.setY(objects[i].getDrawableY() - this.getHeight());\n } else {\n if (\n this.getDrawableY() + this.getHeight() >\n objects[i].getDrawableY() + objects[i].getHeight()\n ) {\n this.setY(objects[i].getDrawableY() + objects[i].getHeight());\n }\n }\n }\n }\n }\n\n /**\n * @deprecated\n * @param objectsLists Tables of objects\n */\n separateObjectsWithForces(objectsLists: ObjectsLists): void {\n //Prepare the list of objects to iterate over.\n const objects = gdjs.staticArray(\n RuntimeObject.prototype.separateObjectsWithForces\n );\n objects.length = 0;\n const lists = gdjs.staticArray2(\n RuntimeObject.prototype.separateObjectsWithForces\n );\n objectsLists.values(lists);\n for (let i = 0, len = lists.length; i < len; ++i) {\n objects.push.apply(objects, lists[i]);\n }\n for (let i = 0, len = objects.length; i < len; ++i) {\n if (objects[i].id != this.id) {\n if (\n this.getDrawableX() + this.getCenterX() <\n objects[i].getDrawableX() + objects[i].getCenterX()\n ) {\n let av = this.hasNoForces() ? 0 : this.getAverageForce().getX();\n this.addForce(-av - 10, 0, 0);\n } else {\n let av = this.hasNoForces() ? 0 : this.getAverageForce().getX();\n this.addForce(-av + 10, 0, 0);\n }\n if (\n this.getDrawableY() + this.getCenterY() <\n objects[i].getDrawableY() + objects[i].getCenterY()\n ) {\n let av = this.hasNoForces() ? 0 : this.getAverageForce().getY();\n this.addForce(0, -av - 10, 0);\n } else {\n let av = this.hasNoForces() ? 0 : this.getAverageForce().getY();\n this.addForce(0, -av + 10, 0);\n }\n }\n }\n }\n\n /**\n * Return true if the hitboxes of two objects are overlapping\n * @static\n * @param obj1 The first runtimeObject\n * @param obj2 The second runtimeObject\n * @param ignoreTouchingEdges If true, then edges that are touching each other, without the hitbox polygons actually overlapping, won't be considered in collision.\n * @return true if obj1 and obj2 are in collision\n */\n static collisionTest(\n obj1: gdjs.RuntimeObject,\n obj2: gdjs.RuntimeObject,\n ignoreTouchingEdges: boolean\n ): boolean {\n //First check if bounding circle are too far.\n const o1centerX = obj1.getCenterX();\n const o1centerY = obj1.getCenterY();\n const obj1BoundingRadius = Math.sqrt(\n computeSqBoundingRadius(\n obj1.getWidth(),\n obj1.getHeight(),\n o1centerX,\n o1centerY\n )\n );\n\n const o2centerX = obj2.getCenterX();\n const o2centerY = obj2.getCenterY();\n const obj2BoundingRadius = Math.sqrt(\n computeSqBoundingRadius(\n obj2.getWidth(),\n obj2.getHeight(),\n o2centerX,\n o2centerY\n )\n );\n\n const o1AbsoluteCenterX = obj1.getDrawableX() + o1centerX;\n const o1AbsoluteCenterY = obj1.getDrawableY() + o1centerY;\n const o2AbsoluteCenterX = obj2.getDrawableX() + o2centerX;\n const o2AbsoluteCenterY = obj2.getDrawableY() + o2centerY;\n\n const diffX = o1AbsoluteCenterX - o2AbsoluteCenterX;\n const diffY = o1AbsoluteCenterY - o2AbsoluteCenterY;\n if (\n Math.sqrt(diffX * diffX + diffY * diffY) >\n obj1BoundingRadius + obj2BoundingRadius\n ) {\n return false;\n }\n\n // Do a real check if necessary.\n const hitBoxes1 = obj1.getHitBoxesAround(\n o2AbsoluteCenterX - obj2BoundingRadius,\n o2AbsoluteCenterY - obj2BoundingRadius,\n o2AbsoluteCenterX + obj2BoundingRadius,\n o2AbsoluteCenterY + obj2BoundingRadius\n );\n const hitBoxes2 = obj2.getHitBoxesAround(\n o1AbsoluteCenterX - obj1BoundingRadius,\n o1AbsoluteCenterY - obj1BoundingRadius,\n o1AbsoluteCenterX + obj1BoundingRadius,\n o1AbsoluteCenterY + obj1BoundingRadius\n );\n\n for (const hitBox1 of hitBoxes1) {\n for (const hitBox2 of hitBoxes2) {\n if (\n gdjs.Polygon.collisionTest(hitBox1, hitBox2, ignoreTouchingEdges)\n .collision\n ) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @param x The raycast source X\n * @param y The raycast source Y\n * @param endX The raycast end position X\n * @param endY The raycast end position Y\n * @param closest Get the closest or farthest collision mask result?\n * @return A raycast result with the contact points and distances\n */\n raycastTest(\n x: float,\n y: float,\n endX: float,\n endY: float,\n closest: boolean\n ): RaycastTestResult {\n // First check if bounding circles are too far\n const objCenterX = this.getCenterX();\n const objCenterY = this.getCenterY();\n const objSqBoundingRadius = computeSqBoundingRadius(\n this.getWidth(),\n this.getHeight(),\n objCenterX,\n objCenterY\n );\n\n const rayCenterWorldX = (x + endX) / 2;\n const rayCenterWorldY = (y + endY) / 2;\n const raySqBoundingRadius =\n (endX - x) * (endX - x) + (endY - y) * (endY - y);\n\n const diffX = this.getDrawableX() + objCenterX - rayCenterWorldX;\n const diffY = this.getDrawableY() + objCenterY - rayCenterWorldY;\n\n let result = raycastTestStatics.result;\n result.collision = false;\n if (\n // As an optimization, avoid computing the square root of the two boundings radius\n // and the distance by comparing the squared values instead.\n diffX * diffX + diffY * diffY >\n objSqBoundingRadius +\n raySqBoundingRadius +\n 2 * Math.sqrt(raySqBoundingRadius * objSqBoundingRadius)\n ) {\n return result;\n }\n\n // Do a real check if necessary.\n if (closest) {\n let sqDistMin = Number.MAX_VALUE;\n const hitBoxes = this.getHitBoxesAround(x, y, endX, endY);\n for (const hitBox of hitBoxes) {\n const res = gdjs.Polygon.raycastTest(hitBox, x, y, endX, endY);\n if (res.collision && res.closeSqDist < sqDistMin) {\n sqDistMin = res.closeSqDist;\n gdjs.Polygon.copyRaycastTestResult(res, result);\n }\n }\n } else {\n let sqDistMax = -Number.MAX_VALUE;\n const hitBoxes = this.getHitBoxesAround(x, y, endX, endY);\n for (const hitBox of hitBoxes) {\n const res = gdjs.Polygon.raycastTest(hitBox, x, y, endX, endY);\n if (\n res.collision &&\n res.farSqDist > sqDistMax &&\n res.farSqDist <= raySqBoundingRadius\n ) {\n sqDistMax = res.farSqDist;\n gdjs.Polygon.copyRaycastTestResult(res, result);\n }\n }\n }\n\n return result;\n }\n\n /**\n * Return true if the specified position is inside object bounding box.\n *\n * The position should be in \"world\" coordinates, i.e use gdjs.Layer.convertCoords\n * if you need to pass the mouse or a touch position that you get from gdjs.InputManager.\n * To check if a point is inside the object collision mask, you can use `isCollidingWithPoint` instead.\n *\n */\n insideObject(x: float, y: float): boolean {\n if (this.hitBoxesDirty) {\n this.updateHitBoxes();\n this.updateAABB();\n this.hitBoxesDirty = false;\n }\n return (\n this.aabb.min[0] <= x &&\n this.aabb.max[0] >= x &&\n this.aabb.min[1] <= y &&\n this.aabb.max[1] >= y\n );\n }\n\n /**\n * Check the distance between two objects.\n * @static\n */\n static distanceTest(\n obj1: RuntimeObject,\n obj2: RuntimeObject,\n distance: float\n ): boolean {\n return obj1.getSqDistanceToObject(obj2) <= distance;\n }\n\n /**\n * Return true if the cursor, or any touch, is on the object.\n *\n * @return true if the cursor, or any touch, is on the object.\n */\n cursorOnObject(instanceContainer: gdjs.RuntimeInstanceContainer): boolean {\n const workingPoint: FloatPoint = gdjs.staticArray(\n RuntimeObject.prototype.cursorOnObject\n ) as FloatPoint;\n workingPoint.length = 2;\n const inputManager = instanceContainer.getGame().getInputManager();\n const layer = instanceContainer.getLayer(this.layer);\n const mousePos = layer.convertCoords(\n inputManager.getCursorX(),\n inputManager.getCursorY(),\n 0,\n workingPoint\n );\n if (this.insideObject(mousePos[0], mousePos[1])) {\n return true;\n }\n const touchIds = inputManager.getAllTouchIdentifiers();\n for (let i = 0; i < touchIds.length; ++i) {\n const touchPos = layer.convertCoords(\n inputManager.getTouchX(touchIds[i]),\n inputManager.getTouchY(touchIds[i]),\n 0,\n workingPoint\n );\n if (this.insideObject(touchPos[0], touchPos[1])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if a point is inside the object collision hitboxes.\n * @param pointX The point x coordinate.\n * @param pointY The point y coordinate.\n * @return true if the point is inside the object collision hitboxes.\n */\n isCollidingWithPoint(pointX: float, pointY: float): boolean {\n const hitBoxes = this.getHitBoxesAround(pointX, pointY, pointX, pointY);\n for (const hitBox of hitBoxes) {\n if (gdjs.Polygon.isPointInside(hitBox, pointX, pointY)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the identifier associated to an object name.\n * Some features may want to compare objects name a large number of time. In this case,\n * it may be more efficient to compare objects name identifiers.\n *\n * @static\n */\n static getNameIdentifier(name: string): integer {\n if (RuntimeObject._identifiers.containsKey(name)) {\n return RuntimeObject._identifiers.get(name);\n }\n RuntimeObject._newId = (RuntimeObject._newId || 0) + 1;\n const newIdentifier = RuntimeObject._newId;\n RuntimeObject._identifiers.put(name, newIdentifier);\n return newIdentifier;\n }\n\n /**\n * Table containing the id corresponding to an object name. Do not use directly or modify.\n * @static\n */\n static _identifiers = new Hashtable<integer>();\n\n /**\n * The next available unique identifier for an object. Do not use directly or modify.\n * @static\n */\n static _newId = 0;\n\n /**\n * Global container for unused forces, avoiding recreating forces each tick.\n * @static\n */\n static forcesGarbage: Array<gdjs.Force> = [];\n\n getVariableNumber = RuntimeObject.getVariableNumber;\n returnVariable = RuntimeObject.returnVariable;\n getVariableString = RuntimeObject.getVariableString;\n setVariableNumber = RuntimeObject.setVariableNumber;\n setVariableString = RuntimeObject.setVariableString;\n getVariableBoolean = RuntimeObject.getVariableBoolean;\n setVariableBoolean = RuntimeObject.setVariableBoolean;\n getVariableChildCount = RuntimeObject.getVariableChildCount;\n getFirstVariableNumber = RuntimeObject.getFirstVariableNumber;\n getFirstVariableString = RuntimeObject.getFirstVariableString;\n getLastVariableNumber = RuntimeObject.getLastVariableNumber;\n getLastVariableString = RuntimeObject.getLastVariableString;\n toggleVariableBoolean = RuntimeObject.toggleVariableBoolean;\n variableChildExists = RuntimeObject.variableChildExists;\n variableRemoveChild = RuntimeObject.variableRemoveChild;\n variableClearChildren = RuntimeObject.variableClearChildren;\n variablePushCopy = RuntimeObject.variablePushCopy;\n valuePush = RuntimeObject.valuePush;\n variableRemoveAt = RuntimeObject.variableRemoveAt;\n\n /**\n * Get the squared distance, in pixels, from the *object center* to a position.\n * @param pointX X position\n * @param pointY Y position\n * @deprecated Use `getSqDistanceToPosition` instead.\n */\n getSqDistanceTo = RuntimeObject.prototype.getSqDistanceToPosition;\n }\n gdjs.registerObject('', gdjs.RuntimeObject);\n}\n"],
|
|
5
|
+
"mappings": "AAKA,IAAU,MAAAA,GAAV,CAiBE,MAAMC,EAA0B,CAC9BC,EACAC,EACAC,EACAC,IACG,CACH,MAAMC,EAAU,KAAK,IAAIF,EAASF,EAAQE,CAAO,EAC3CG,EAAU,KAAK,IAAIF,EAASF,EAASE,CAAO,EAClD,OAAO,KAAK,IAAIC,EAAS,CAAC,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AsBA,EAAc,oBACpC,sBAAwBA,EAAc,sBACtC,iBAAmBA,EAAc,iBACjC,UAAYA,EAAc,UAC1B,iBAAmBA,EAAc,iBAQjC,gBAAkBA,EAAc,UAAU,uBAC5C,CAz5EO/B,EAAM,cAAA+B,EA05Eb/B,EAAK,eAAe,GAAIA,EAAK,aAAa,IAhjFlC",
|
|
6
|
+
"names": ["gdjs", "computeSqBoundingRadius", "width", "height", "centerX", "centerY", "radiusX", "radiusY", "separateFromObjectsStatics", "raycastTestStatics", "moveFollowingSeparatingVectors", "object", "moveXArray", "moveYArray", "squaredDistanceMax", "distanceMaxIndex", "index", "moveX", "moveY", "squaredDistance", "distanceMax", "uX", "vX", "vY", "scalarProductMin", "scalarProductMax", "scalarProduct", "deltaX", "deltaY", "scalarProductMinIsNegligible", "scalarProductMaxIsNegligible", "RuntimeObject", "instanceContainer", "objectData", "len", "autoData", "Ctor", "effectName", "i", "runtimeScene", "behaviorData", "initialInstanceData", "oldObjectData", "newObjectData", "callback", "theLayer", "rendererObject", "rendererObject3D", "j", "lenj", "c", "x", "y", "speed", "scene", "angle", "diffWasPositive", "newAngle", "layer", "oldLayer", "newLayer", "z", "variable", "newValue", "compareWith", "childName", "array", "value", "children", "name", "effectData", "parameterName", "enable", "multiplier", "recycledForce", "angleInRadians", "forceX", "forceY", "elapsedTime", "force", "averageX", "averageY", "toleranceInDegrees", "averageAngle", "left", "top", "right", "bottom", "isIncluded", "wasIncluded", "first", "vertex", "behavior", "behaviorIndex", "newRuntimeBehavior", "timerName", "timeInSeconds", "objects", "ignoreTouchingEdges", "hitBoxes", "aabb", "otherObject", "otherHitBoxesArray", "otherHitBoxes", "hitBox", "otherHitBox", "result", "objectsLists", "otherObjects", "targetX", "targetY", "distance", "angleInDegrees", "obj", "lists", "av", "obj1", "obj2", "o1centerX", "o1centerY", "obj1BoundingRadius", "o2centerX", "o2centerY", "obj2BoundingRadius", "o1AbsoluteCenterX", "o1AbsoluteCenterY", "o2AbsoluteCenterX", "o2AbsoluteCenterY", "diffX", "diffY", "hitBoxes1", "hitBoxes2", "hitBox1", "hitBox2", "endX", "endY", "closest", "objCenterX", "objCenterY", "objSqBoundingRadius", "rayCenterWorldX", "rayCenterWorldY", "raySqBoundingRadius", "sqDistMin", "res", "sqDistMax", "workingPoint", "inputManager", "mousePos", "touchIds", "touchPos", "pointX", "pointY", "newIdentifier"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var gdjs;(r=>{const l=new r.Logger("RuntimeScene"),h=new r.Logger("RuntimeScene (setup warnings)");class c extends r.RuntimeInstanceContainer{_eventsFunction=null;_renderer;_debuggerRenderer;_variables;_runtimeGame;_lastId=0;_name="";_timeManager;_gameStopRequested=!1;_requestedScene="";_asyncTasksManager=new r.AsyncTasksManager;_isLoaded=!1;_isJustResumed=!1;_requestedChange;_backgroundColor=0;_onceTriggers;_profiler=null;_onProfilerStopped=null;_cachedGameResolutionWidth;_cachedGameResolutionHeight;constructor(t){super(),this._runtimeGame=t,this._variables=new r.VariablesContainer,this._timeManager=new r.TimeManager,this._onceTriggers=new r.OnceTriggers,this._requestedChange=0,this._cachedGameResolutionWidth=t?t.getGameResolutionWidth():0,this._cachedGameResolutionHeight=t?t.getGameResolutionHeight():0,this._renderer=new r.RuntimeSceneRenderer(this,t?t.getRenderer():null),this._debuggerRenderer=new r.DebuggerRenderer(this),this.onGameResolutionResized()}addLayer(t){const e=new r.Layer(t,this);this._layers.put(t.name,e),this._orderedLayers.push(e)}onGameResolutionResized(){const t=this.getViewportOriginX(),e=this.getViewportOriginY();this._cachedGameResolutionWidth=this._runtimeGame?this._runtimeGame.getGameResolutionWidth():0,this._cachedGameResolutionHeight=this._runtimeGame?this._runtimeGame.getGameResolutionHeight():0;for(const i in this._layers.items)this._layers.items.hasOwnProperty(i)&&this._layers.items[i].onGameResolutionResized(t,e);this._renderer.onGameResolutionResized()}loadFromScene(t){if(!t){l.error("loadFromScene was called without a scene");return}this._isLoaded&&this.unloadScene(),this._runtimeGame&&this._runtimeGame.getRenderer().setWindowTitle(t.title),this._name=t.name,this.setBackgroundColor(t.r,t.v,t.b);for(let i=0,s=t.layers.length;i<s;++i)this.addLayer(t.layers[i]);this._variables=new r.VariablesContainer(t.variables);for(let i=0,s=t.behaviorsSharedData.length;i<s;++i){const o=t.behaviorsSharedData[i];this.setInitialSharedDataForBehavior(o.name,o)}const e=this.getGame().getInitialObjectsData();for(let i=0,s=e.length;i<s;++i)this.registerObject(e[i]);for(let i=0,s=t.objects.length;i<s;++i)this.registerObject(t.objects[i]);if(this.createObjectsFrom(t.instances,0,0,!0),this._setLayerDefaultZOrders(),this.setEventsGeneratedCodeFunction(t),this._onceTriggers=new r.OnceTriggers,this._runtimeGame&&!this._runtimeGame.wasFirstSceneLoaded())for(let i=0;i<r.callbacksFirstRuntimeSceneLoaded.length;++i)r.callbacksFirstRuntimeSceneLoaded[i](this);for(let i=0;i<r.callbacksRuntimeSceneLoaded.length;++i)r.callbacksRuntimeSceneLoaded[i](this);t.stopSoundsOnStartup&&this._runtimeGame&&this._runtimeGame.getSoundManager().clearAll(),this._isLoaded=!0,this._timeManager.reset()}getInitialSharedDataForBehavior(t){const e=super.getInitialSharedDataForBehavior(t);return e||l.error("Can't find shared data for behavior with name: "+t),e}onPause(){const t=this.getAdhocListOfAllInstances();for(let e=0,i=t.length;e<i;++e)t[e].onScenePaused(this);for(let e=0;e<r.callbacksRuntimeScenePaused.length;++e)r.callbacksRuntimeScenePaused[e](this)}onResume(){this._isJustResumed=!0;const t=this.getAdhocListOfAllInstances();for(let e=0,i=t.length;e<i;++e)t[e].onSceneResumed(this);for(let e=0;e<r.callbacksRuntimeSceneResumed.length;++e)r.callbacksRuntimeSceneResumed[e](this)}unloadScene(){if(!this._isLoaded)return;this._profiler&&this.stopProfiler();for(let e=0;e<r.callbacksRuntimeSceneUnloading.length;++e)r.callbacksRuntimeSceneUnloading[e](this);const t=this.getAdhocListOfAllInstances();for(let e=0,i=t.length;e<i;++e)t[e].onDestroyFromScene(this);this._renderer&&this._renderer.onSceneUnloaded();for(let e=0;e<r.callbacksRuntimeSceneUnloaded.length;++e)r.callbacksRuntimeSceneUnloaded[e](this);this._destroy(),this._isLoaded=!1,this.onGameResolutionResized()}_destroy(){super._destroy(),this._variables=new r.VariablesContainer,this._initialBehaviorSharedData=new Hashtable,this._eventsFunction=null,this._lastId=0,this._onceTriggers=null}setEventsGeneratedCodeFunction(t){const e=r[t.mangledName+"Code"];e&&e.func?this._eventsFunction=e.func:(h.warn("No function found for running logic of scene "+this._name),this._eventsFunction=function(){})}setEventsFunction(t){this._eventsFunction=t}renderAndStep(t){this._profiler&&this._profiler.beginFrame(),this._requestedChange=0,this._timeManager.update(t,this._runtimeGame.getMinimalFramerate()),this._profiler&&this._profiler.begin("asynchronous actions (wait action, etc...)"),this._asyncTasksManager.processTasks(this),this._profiler&&this._profiler.end("asynchronous actions (wait action, etc...)"),this._profiler&&this._profiler.begin("objects (pre-events)"),this._updateObjectsPreEvents(),this._profiler&&this._profiler.end("objects (pre-events)"),this._profiler&&this._profiler.begin("callbacks and extensions (pre-events)");for(let e=0;e<r.callbacksRuntimeScenePreEvents.length;++e)r.callbacksRuntimeScenePreEvents[e](this);this._profiler&&this._profiler.end("callbacks and extensions (pre-events)"),this._profiler&&this._profiler.begin("events"),this._eventsFunction!==null&&this._eventsFunction(this),this._profiler&&this._profiler.end("events"),this._profiler&&this._profiler.begin("objects (post-events)"),this._updateObjectsPostEvents(),this._profiler&&this._profiler.end("objects (post-events)"),this._profiler&&this._profiler.begin("callbacks and extensions (post-events)");for(let e=0;e<r.callbacksRuntimeScenePostEvents.length;++e)r.callbacksRuntimeScenePostEvents[e](this);return this._profiler&&this._profiler.end("callbacks and extensions (post-events)"),this._profiler&&this._profiler.begin("objects (pre-render, effects update)"),this._updateObjectsPreRender(),this._profiler&&this._profiler.end("objects (pre-render, effects update)"),this._profiler&&this._profiler.begin("layers (effects update)"),this._updateLayersPreRender(),this._profiler&&this._profiler.end("layers (effects update)"),this._profiler&&this._profiler.begin("render"),this._debugDrawEnabled&&this._debuggerRenderer.renderDebugDraw(this.getAdhocListOfAllInstances(),this._debugDrawShowHiddenInstances,this._debugDrawShowPointsNames,this._debugDrawShowCustomPoints),this._isJustResumed=!1,this.render(),this._profiler&&this._profiler.end("render"),this._profiler&&this._profiler.endFrame(),!!this.getRequestedChange()}render(){this._renderer.render()}_updateObjectsPreRender(){if(this._timeManager.isFirstFrame()){super._updateObjectsPreRender();return}else{this._updateLayersCameraCoordinates(2);const t=this.getAdhocListOfAllInstances();for(let e=0,i=t.length;e<i;++e){const s=t[e],o=s.getRendererObject();if(o){if(s.isHidden())o.visible=!1;else{const n=this._layersCameraCoordinates[s.getLayer()];if(!n)continue;const a=s.getVisibilityAABB();o.visible=!a||!(a.min[0]>n[2]||a.min[1]>n[3]||a.max[0]<n[0]||a.max[1]<n[1])}o.visible&&(this._runtimeGame.getEffectsManager().updatePreRender(s.getRendererEffects(),s),s.updatePreRender(this))}else s.updatePreRender(this)}}}setBackgroundColor(t,e,i){this._backgroundColor=parseInt(r.rgbToHex(t,e,i),16)}getBackgroundColor(){return this._backgroundColor}getName(){return this._name}createNewUniqueId(){return this._lastId++,this._lastId}getRenderer(){return this._renderer}getDebuggerRenderer(){return this._debuggerRenderer}getGame(){return this._runtimeGame}getScene(){return this}getViewportWidth(){return this._cachedGameResolutionWidth}getViewportHeight(){return this._cachedGameResolutionHeight}getViewportOriginX(){return this._cachedGameResolutionWidth/2}getViewportOriginY(){return this._cachedGameResolutionHeight/2}convertCoords(t,e,i){const s=i||[0,0];return s[0]=t,s[1]=e,s}convertInverseCoords(t,e,i){const s=i||[0,0];return s[0]=t,s[1]=e,s}onChildrenLocationChanged(){}getVariables(){return this._variables}getTimeManager(){return this._timeManager}getElapsedTime(){return this._timeManager.getElapsedTime()}getSoundManager(){return this._runtimeGame.getSoundManager()}getAsyncTasksManager(){return this._asyncTasksManager}getRequestedChange(){return this._requestedChange}getRequestedScene(){return this._requestedScene}requestChange(t,e){this._requestedChange=t,e&&(this._requestedScene=e)}getProfiler(){return this._profiler}startProfiler(t){this._profiler||(this._profiler=new r.Profiler,this._onProfilerStopped=t)}stopProfiler(){if(!this._profiler)return;const t=this._profiler,e=this._onProfilerStopped;this._profiler=null,this._onProfilerStopped=null,e&&e(t)}getOnceTriggers(){return this._onceTriggers}sceneJustResumed(){return this._isJustResumed}}r.RuntimeScene=c;let d;(n=>(n[n.CONTINUE=0]="CONTINUE",n[n.PUSH_SCENE=1]="PUSH_SCENE",n[n.POP_SCENE=2]="POP_SCENE",n[n.REPLACE_SCENE=3]="REPLACE_SCENE",n[n.CLEAR_SCENES=4]="CLEAR_SCENES",n[n.STOP_GAME=5]="STOP_GAME"))(d=r.SceneChangeRequest||={})})(gdjs||={});
|
|
2
|
+
//# sourceMappingURL=runtimescene.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../GDevelop/GDJS/Runtime/runtimescene.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 */\nnamespace gdjs {\n const logger = new gdjs.Logger('RuntimeScene');\n const setupWarningLogger = new gdjs.Logger('RuntimeScene (setup warnings)');\n\n /**\n * A scene being played, containing instances of objects rendered on screen.\n */\n export class RuntimeScene extends gdjs.RuntimeInstanceContainer {\n _eventsFunction: null | ((runtimeScene: RuntimeScene) => void) = null;\n\n _renderer: RuntimeSceneRenderer;\n _debuggerRenderer: gdjs.DebuggerRenderer;\n _variables: gdjs.VariablesContainer;\n _runtimeGame: gdjs.RuntimeGame;\n _lastId: integer = 0;\n _name: string = '';\n _timeManager: TimeManager;\n _gameStopRequested: boolean = false;\n _requestedScene: string = '';\n private _asyncTasksManager = new gdjs.AsyncTasksManager();\n\n /** True if loadFromScene was called and the scene is being played. */\n _isLoaded: boolean = false;\n /** True in the first frame after resuming the paused scene */\n _isJustResumed: boolean = false;\n\n _requestedChange: SceneChangeRequest;\n /** Black background by default. */\n _backgroundColor: integer = 0;\n _onceTriggers: OnceTriggers;\n _profiler: gdjs.Profiler | null = null;\n\n // Set to `new gdjs.Profiler()` to have profiling done on the scene.\n _onProfilerStopped: null | ((oldProfiler: gdjs.Profiler) => void) = null;\n\n _cachedGameResolutionWidth: integer;\n _cachedGameResolutionHeight: integer;\n\n /**\n * @param runtimeGame The game associated to this scene.\n */\n constructor(runtimeGame: gdjs.RuntimeGame) {\n super();\n this._runtimeGame = runtimeGame;\n this._variables = new gdjs.VariablesContainer();\n this._timeManager = new gdjs.TimeManager();\n this._onceTriggers = new gdjs.OnceTriggers();\n this._requestedChange = SceneChangeRequest.CONTINUE;\n this._cachedGameResolutionWidth = runtimeGame\n ? runtimeGame.getGameResolutionWidth()\n : 0;\n this._cachedGameResolutionHeight = runtimeGame\n ? runtimeGame.getGameResolutionHeight()\n : 0;\n\n this._renderer = new gdjs.RuntimeSceneRenderer(\n this,\n // @ts-ignore This is needed because of test. They should mock RuntimeGame instead.\n runtimeGame ? runtimeGame.getRenderer() : null\n );\n this._debuggerRenderer = new gdjs.DebuggerRenderer(this);\n\n // What to do after the frame is rendered.\n\n // The callback function to call when the profiler is stopped.\n this.onGameResolutionResized();\n }\n\n addLayer(layerData: LayerData) {\n const layer = new gdjs.Layer(layerData, this);\n this._layers.put(layerData.name, layer);\n this._orderedLayers.push(layer);\n }\n\n /**\n * Should be called when the canvas where the scene is rendered has been resized.\n * See gdjs.RuntimeGame.startGameLoop in particular.\n */\n onGameResolutionResized() {\n const oldGameResolutionOriginX = this.getViewportOriginX();\n const oldGameResolutionOriginY = this.getViewportOriginY();\n this._cachedGameResolutionWidth = this._runtimeGame\n ? this._runtimeGame.getGameResolutionWidth()\n : 0;\n this._cachedGameResolutionHeight = this._runtimeGame\n ? this._runtimeGame.getGameResolutionHeight()\n : 0;\n for (const name in this._layers.items) {\n if (this._layers.items.hasOwnProperty(name)) {\n const theLayer: gdjs.RuntimeLayer = this._layers.items[name];\n theLayer.onGameResolutionResized(\n oldGameResolutionOriginX,\n oldGameResolutionOriginY\n );\n }\n }\n this._renderer.onGameResolutionResized();\n }\n\n /**\n * Load the runtime scene from the given scene.\n * @param sceneData An object containing the scene data.\n * @see gdjs.RuntimeGame#getSceneData\n */\n loadFromScene(sceneData: LayoutData | null) {\n if (!sceneData) {\n logger.error('loadFromScene was called without a scene');\n return;\n }\n\n if (this._isLoaded) {\n this.unloadScene();\n }\n\n //Setup main properties\n if (this._runtimeGame) {\n this._runtimeGame.getRenderer().setWindowTitle(sceneData.title);\n }\n this._name = sceneData.name;\n this.setBackgroundColor(sceneData.r, sceneData.v, sceneData.b);\n\n //Load layers\n for (let i = 0, len = sceneData.layers.length; i < len; ++i) {\n this.addLayer(sceneData.layers[i]);\n }\n\n //Load variables\n this._variables = new gdjs.VariablesContainer(sceneData.variables);\n\n //Cache the initial shared data of the behaviors\n for (\n let i = 0, len = sceneData.behaviorsSharedData.length;\n i < len;\n ++i\n ) {\n const behaviorSharedData = sceneData.behaviorsSharedData[i];\n this.setInitialSharedDataForBehavior(\n behaviorSharedData.name,\n behaviorSharedData\n );\n }\n\n //Registering objects: Global objects first...\n const initialGlobalObjectsData = this.getGame().getInitialObjectsData();\n for (let i = 0, len = initialGlobalObjectsData.length; i < len; ++i) {\n this.registerObject(initialGlobalObjectsData[i]);\n }\n\n //...then the scene objects\n for (let i = 0, len = sceneData.objects.length; i < len; ++i) {\n this.registerObject(sceneData.objects[i]);\n }\n\n //Create initial instances of objects\n this.createObjectsFrom(\n sceneData.instances,\n 0,\n 0,\n /*trackByPersistentUuid=*/\n true\n );\n\n // Set up the default z order (for objects created from events)\n this._setLayerDefaultZOrders();\n\n //Set up the function to be executed at each tick\n this.setEventsGeneratedCodeFunction(sceneData);\n this._onceTriggers = new gdjs.OnceTriggers();\n\n // Notify the global callbacks\n if (this._runtimeGame && !this._runtimeGame.wasFirstSceneLoaded()) {\n for (let i = 0; i < gdjs.callbacksFirstRuntimeSceneLoaded.length; ++i) {\n gdjs.callbacksFirstRuntimeSceneLoaded[i](this);\n }\n }\n for (let i = 0; i < gdjs.callbacksRuntimeSceneLoaded.length; ++i) {\n gdjs.callbacksRuntimeSceneLoaded[i](this);\n }\n if (sceneData.stopSoundsOnStartup && this._runtimeGame) {\n this._runtimeGame.getSoundManager().clearAll();\n }\n this._isLoaded = true;\n this._timeManager.reset();\n }\n\n getInitialSharedDataForBehavior(name: string): BehaviorSharedData | null {\n // TODO Move this error in RuntimeInstanceContainer after deciding\n // what to do with shared data in custom object.\n const behaviorSharedData = super.getInitialSharedDataForBehavior(name);\n if (!behaviorSharedData) {\n logger.error(\"Can't find shared data for behavior with name: \" + name);\n }\n return behaviorSharedData;\n }\n\n /**\n * Called when a scene is \"paused\", i.e it will be not be rendered again\n * for some time, until it's resumed or unloaded.\n */\n onPause() {\n // Notify the objects that the scene is being paused. Objects should not\n // do anything special, but some object renderers might want to know about this.\n const allInstancesList = this.getAdhocListOfAllInstances();\n for (let i = 0, len = allInstancesList.length; i < len; ++i) {\n const object = allInstancesList[i];\n object.onScenePaused(this);\n }\n\n for (let i = 0; i < gdjs.callbacksRuntimeScenePaused.length; ++i) {\n gdjs.callbacksRuntimeScenePaused[i](this);\n }\n }\n\n /**\n * Called when a scene is \"resumed\", i.e it will be rendered again\n * on screen after having being paused.\n */\n onResume() {\n this._isJustResumed = true;\n\n // Notify the objects that the scene is being resumed. Objects should not\n // do anything special, but some object renderers might want to know about this.\n const allInstancesList = this.getAdhocListOfAllInstances();\n for (let i = 0, len = allInstancesList.length; i < len; ++i) {\n const object = allInstancesList[i];\n object.onSceneResumed(this);\n }\n\n for (let i = 0; i < gdjs.callbacksRuntimeSceneResumed.length; ++i) {\n gdjs.callbacksRuntimeSceneResumed[i](this);\n }\n }\n\n /**\n * Called before a scene is removed from the stack of scenes\n * rendered on the screen.\n */\n unloadScene() {\n if (!this._isLoaded) {\n return;\n }\n if (this._profiler) {\n this.stopProfiler();\n }\n\n // Notify the global callbacks (which should not release resources yet,\n // as other callbacks might still refer to the objects/scene).\n for (let i = 0; i < gdjs.callbacksRuntimeSceneUnloading.length; ++i) {\n gdjs.callbacksRuntimeSceneUnloading[i](this);\n }\n\n // Notify the objects they are being destroyed\n const allInstancesList = this.getAdhocListOfAllInstances();\n for (let i = 0, len = allInstancesList.length; i < len; ++i) {\n const object = allInstancesList[i];\n object.onDestroyFromScene(this);\n }\n\n // Notify the renderer\n if (this._renderer) {\n this._renderer.onSceneUnloaded();\n }\n\n // Notify the global callbacks (after notifying objects and renderer, because\n // callbacks from extensions might want to free resources - which can't be done\n // safely before destroying objects and the renderer).\n for (let i = 0; i < gdjs.callbacksRuntimeSceneUnloaded.length; ++i) {\n gdjs.callbacksRuntimeSceneUnloaded[i](this);\n }\n\n this._destroy();\n\n this._isLoaded = false;\n this.onGameResolutionResized();\n }\n\n _destroy() {\n // It should not be necessary to reset these variables, but this help\n // ensuring that all memory related to the RuntimeScene is released immediately.\n super._destroy();\n this._variables = new gdjs.VariablesContainer();\n this._initialBehaviorSharedData = new Hashtable();\n this._eventsFunction = null;\n this._lastId = 0;\n // @ts-ignore We are deleting the object\n this._onceTriggers = null;\n }\n\n /**\n * Set the function called each time the scene is stepped to be the events generated code,\n * which is by convention assumed to be a function in `gdjs` with a name based on the scene\n * mangled name.\n *\n * @param sceneData The scene data, used to find where the code was generated.\n */\n setEventsGeneratedCodeFunction(sceneData: LayoutData): void {\n const module = gdjs[sceneData.mangledName + 'Code'];\n if (module && module.func) {\n this._eventsFunction = module.func;\n } else {\n setupWarningLogger.warn(\n 'No function found for running logic of scene ' + this._name\n );\n this._eventsFunction = function () {};\n }\n }\n\n /**\n * Set the function called each time the scene is stepped.\n * The function will be passed the `runtimeScene` as argument.\n *\n * Note that this is already set up by the gdjs.RuntimeScene constructor and that you should\n * not need to use this method.\n *\n * @param func The function to be called.\n */\n setEventsFunction(func: () => void): void {\n this._eventsFunction = func;\n }\n\n /**\n * Step and render the scene.\n * @param elapsedTime In milliseconds\n * @return true if the game loop should continue, false if a scene change/push/pop\n * or a game stop was requested.\n */\n renderAndStep(elapsedTime: float): boolean {\n if (this._profiler) {\n this._profiler.beginFrame();\n }\n this._requestedChange = SceneChangeRequest.CONTINUE;\n this._timeManager.update(\n elapsedTime,\n this._runtimeGame.getMinimalFramerate()\n );\n if (this._profiler) {\n this._profiler.begin('asynchronous actions (wait action, etc...)');\n }\n this._asyncTasksManager.processTasks(this);\n if (this._profiler) {\n this._profiler.end('asynchronous actions (wait action, etc...)');\n }\n if (this._profiler) {\n this._profiler.begin('objects (pre-events)');\n }\n this._updateObjectsPreEvents();\n if (this._profiler) {\n this._profiler.end('objects (pre-events)');\n }\n if (this._profiler) {\n this._profiler.begin('callbacks and extensions (pre-events)');\n }\n for (let i = 0; i < gdjs.callbacksRuntimeScenePreEvents.length; ++i) {\n gdjs.callbacksRuntimeScenePreEvents[i](this);\n }\n if (this._profiler) {\n this._profiler.end('callbacks and extensions (pre-events)');\n }\n if (this._profiler) {\n this._profiler.begin('events');\n }\n if (this._eventsFunction !== null) this._eventsFunction(this);\n if (this._profiler) {\n this._profiler.end('events');\n }\n if (this._profiler) {\n this._profiler.begin('objects (post-events)');\n }\n this._updateObjectsPostEvents();\n if (this._profiler) {\n this._profiler.end('objects (post-events)');\n }\n if (this._profiler) {\n this._profiler.begin('callbacks and extensions (post-events)');\n }\n for (let i = 0; i < gdjs.callbacksRuntimeScenePostEvents.length; ++i) {\n gdjs.callbacksRuntimeScenePostEvents[i](this);\n }\n if (this._profiler) {\n this._profiler.end('callbacks and extensions (post-events)');\n }\n if (this._profiler) {\n this._profiler.begin('objects (pre-render, effects update)');\n }\n this._updateObjectsPreRender();\n if (this._profiler) {\n this._profiler.end('objects (pre-render, effects update)');\n }\n if (this._profiler) {\n this._profiler.begin('layers (effects update)');\n }\n this._updateLayersPreRender();\n if (this._profiler) {\n this._profiler.end('layers (effects update)');\n }\n if (this._profiler) {\n this._profiler.begin('render');\n }\n\n // Set to true to enable debug rendering (look for the implementation in the renderer\n // to see what is rendered).\n if (this._debugDrawEnabled) {\n this._debuggerRenderer.renderDebugDraw(\n this.getAdhocListOfAllInstances(),\n this._debugDrawShowHiddenInstances,\n this._debugDrawShowPointsNames,\n this._debugDrawShowCustomPoints\n );\n }\n\n this._isJustResumed = false;\n this.render();\n if (this._profiler) {\n this._profiler.end('render');\n }\n if (this._profiler) {\n this._profiler.endFrame();\n }\n return !!this.getRequestedChange();\n }\n\n /**\n * Render the PIXI container associated to the runtimeScene.\n */\n render() {\n this._renderer.render();\n }\n\n /**\n * Called to update visibility of the renderers of objects\n * rendered on the scene (\"culling\"), update effects (of visible objects)\n * and give a last chance for objects to update before rendering.\n *\n * Visibility is set to false if object is hidden, or if\n * object is too far from the camera of its layer (\"culling\").\n */\n _updateObjectsPreRender() {\n if (this._timeManager.isFirstFrame()) {\n super._updateObjectsPreRender();\n return;\n } else {\n // After first frame, optimise rendering by setting only objects\n // near camera as visible.\n // TODO: For compatibility, pass a scale of `2`,\n // meaning that size of cameras will be multiplied by 2 and so objects\n // will be hidden if they are outside of this *larger* camera area.\n // This is useful for:\n // - objects not properly reporting their visibility AABB,\n // (so we have a \"safety margin\") but these objects should be fixed\n // instead.\n // - objects having effects rendering outside of their visibility AABB.\n\n // TODO (3D) culling - add support for 3D object culling?\n this._updateLayersCameraCoordinates(2);\n const allInstancesList = this.getAdhocListOfAllInstances();\n for (let i = 0, len = allInstancesList.length; i < len; ++i) {\n const object = allInstancesList[i];\n const rendererObject = object.getRendererObject();\n if (rendererObject) {\n if (object.isHidden()) {\n rendererObject.visible = false;\n } else {\n const cameraCoords = this._layersCameraCoordinates[\n object.getLayer()\n ];\n if (!cameraCoords) {\n continue;\n }\n const aabb = object.getVisibilityAABB();\n rendererObject.visible =\n // If no AABB is returned, the object should always be visible\n !aabb ||\n // If an AABB is there, it must be at least partially inside\n // the camera bounds.\n !(\n aabb.min[0] > cameraCoords[2] ||\n aabb.min[1] > cameraCoords[3] ||\n aabb.max[0] < cameraCoords[0] ||\n aabb.max[1] < cameraCoords[1]\n );\n }\n\n // Update effects, only for visible objects.\n if (rendererObject.visible) {\n this._runtimeGame\n .getEffectsManager()\n .updatePreRender(object.getRendererEffects(), object);\n\n // Perform pre-render update only if the object is visible\n // (including if there is no visibility AABB returned previously).\n object.updatePreRender(this);\n }\n } else {\n // Perform pre-render update, always for objects not having an\n // associated renderer object (so it must handle visibility on its own).\n object.updatePreRender(this);\n }\n }\n }\n }\n\n /**\n * Change the background color, by setting the RGB components.\n * Internally, the color is stored as an hexadecimal number.\n *\n * @param r The color red component (0-255).\n * @param g The color green component (0-255).\n * @param b The color blue component (0-255).\n */\n setBackgroundColor(r: integer, g: integer, b: integer): void {\n this._backgroundColor = parseInt(gdjs.rgbToHex(r, g, b), 16);\n }\n\n /**\n * Get the background color, as an hexadecimal number.\n * @returns The current background color.\n */\n getBackgroundColor(): number {\n return this._backgroundColor;\n }\n\n /**\n * Get the name of the scene.\n */\n getName(): string {\n return this._name;\n }\n\n /**\n * Create an identifier for a new object of the scene.\n */\n createNewUniqueId(): integer {\n this._lastId++;\n return this._lastId;\n }\n\n getRenderer(): gdjs.RuntimeScenePixiRenderer {\n return this._renderer;\n }\n\n getDebuggerRenderer() {\n return this._debuggerRenderer;\n }\n\n getGame() {\n return this._runtimeGame;\n }\n\n getScene() {\n return this;\n }\n\n getViewportWidth(): float {\n return this._cachedGameResolutionWidth;\n }\n\n getViewportHeight(): float {\n return this._cachedGameResolutionHeight;\n }\n\n getViewportOriginX(): float {\n return this._cachedGameResolutionWidth / 2;\n }\n\n getViewportOriginY(): float {\n return this._cachedGameResolutionHeight / 2;\n }\n\n convertCoords(x: float, y: float, result: FloatPoint): FloatPoint {\n // The result parameter used to be optional.\n const point = result || [0, 0];\n point[0] = x;\n point[1] = y;\n return point;\n }\n\n convertInverseCoords(\n sceneX: float,\n sceneY: float,\n result: FloatPoint\n ): FloatPoint {\n const point = result || [0, 0];\n point[0] = sceneX;\n point[1] = sceneY;\n return point;\n }\n\n onChildrenLocationChanged(): void {\n // Scenes don't maintain bounds.\n }\n\n /**\n * Get the variables of the runtimeScene.\n * @return The container holding the variables of the scene.\n */\n getVariables() {\n return this._variables;\n }\n\n /**\n * Get the TimeManager of the scene.\n * @return The gdjs.TimeManager of the scene.\n */\n getTimeManager(): gdjs.TimeManager {\n return this._timeManager;\n }\n\n /**\n * Return the time elapsed since the last frame,\n * in milliseconds, for objects on the layer.\n */\n getElapsedTime(): float {\n return this._timeManager.getElapsedTime();\n }\n\n /**\n * Shortcut to get the SoundManager of the game.\n * @return The gdjs.SoundManager of the game.\n */\n getSoundManager(): gdjs.SoundManager {\n return this._runtimeGame.getSoundManager();\n }\n\n /**\n * @returns The scene's async tasks manager.\n */\n getAsyncTasksManager() {\n return this._asyncTasksManager;\n }\n\n /**\n * Return the value of the scene change that is requested.\n */\n getRequestedChange(): SceneChangeRequest {\n return this._requestedChange;\n }\n\n /**\n * Return the name of the new scene to be launched.\n *\n * See requestChange.\n */\n getRequestedScene(): string {\n return this._requestedScene;\n }\n\n /**\n * Request a scene change to be made. The change is handled externally (see gdjs.SceneStack)\n * thanks to getRequestedChange and getRequestedScene methods.\n * @param change One of RuntimeScene.CONTINUE|PUSH_SCENE|POP_SCENE|REPLACE_SCENE|CLEAR_SCENES|STOP_GAME.\n * @param sceneName The name of the new scene to launch, if applicable.\n */\n requestChange(change: SceneChangeRequest, sceneName?: string) {\n this._requestedChange = change;\n if (sceneName) this._requestedScene = sceneName;\n }\n\n /**\n * Get the profiler associated with the scene, or null if none.\n */\n getProfiler(): gdjs.Profiler | null {\n return this._profiler;\n }\n\n /**\n * Start a new profiler to measures the time passed in sections of the engine\n * in the scene.\n * @param onProfilerStopped Function to be called when the profiler is stopped. Will be passed the profiler as argument.\n */\n startProfiler(onProfilerStopped: (oldProfiler: gdjs.Profiler) => void) {\n if (this._profiler) {\n return;\n }\n this._profiler = new gdjs.Profiler();\n this._onProfilerStopped = onProfilerStopped;\n }\n\n /**\n * Stop the profiler being run on the scene.\n */\n stopProfiler() {\n if (!this._profiler) {\n return;\n }\n const oldProfiler = this._profiler;\n const onProfilerStopped = this._onProfilerStopped;\n this._profiler = null;\n this._onProfilerStopped = null;\n if (onProfilerStopped) {\n onProfilerStopped(oldProfiler);\n }\n }\n\n /**\n * Get the structure containing the triggers for \"Trigger once\" conditions.\n */\n getOnceTriggers() {\n return this._onceTriggers;\n }\n\n /**\n * Check if the scene was just resumed.\n * This is true during the first frame after the scene has been unpaused.\n *\n * @returns true if the scene was just resumed\n */\n sceneJustResumed(): boolean {\n return this._isJustResumed;\n }\n }\n\n //The flags to describe the change request by a scene:\n export enum SceneChangeRequest {\n CONTINUE,\n PUSH_SCENE,\n POP_SCENE,\n REPLACE_SCENE,\n CLEAR_SCENES,\n STOP_GAME,\n }\n}\n"],
|
|
5
|
+
"mappings": "AAKA,IAAU,MAAAA,GAAV,CACE,MAAMC,EAAS,IAAID,EAAK,OAAO,cAAc,EACvCE,EAAqB,IAAIF,EAAK,OAAO,+BAA+B,EAKnE,MAAMG,UAAqBH,EAAK,wBAAyB,CAC9D,gBAAiE,KAEjE,UACA,kBACA,WACA,aACA,QAAmB,EACnB,MAAgB,GAChB,aACA,mBAA8B,GAC9B,gBAA0B,GAClB,mBAAqB,IAAIA,EAAK,kBAGtC,UAAqB,GAErB,eAA0B,GAE1B,iBAEA,iBAA4B,EAC5B,cACA,UAAkC,KAGlC,mBAAoE,KAEpE,2BACA,4BAKA,YAAYI,EAA+B,CACzC,MAAM,EACN,KAAK,aAAeA,EACpB,KAAK,WAAa,IAAIJ,EAAK,mBAC3B,KAAK,aAAe,IAAIA,EAAK,YAC7B,KAAK,cAAgB,IAAIA,EAAK,aAC9B,KAAK,iBAAmB,EACxB,KAAK,2BAA6BI,EAC9BA,EAAY,uBAAuB,EACnC,EACJ,KAAK,4BAA8BA,EAC/BA,EAAY,wBAAwB,EACpC,EAEJ,K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KAAK,mBAAqBkC,EAC5B,CAKA,cAAe,CACb,GAAI,CAAC,KAAK,UACR,OAEF,MAAMC,EAAc,KAAK,UACnBD,EAAoB,KAAK,mBAC/B,KAAK,UAAY,KACjB,KAAK,mBAAqB,KACtBA,GACFA,EAAkBC,CAAW,CAEjC,CAKA,iBAAkB,CAChB,OAAO,KAAK,aACd,CAQA,kBAA4B,CAC1B,OAAO,KAAK,cACd,CACF,CA9rBOnC,EAAM,aAAAG,EAisBN,IAAKiC,OACVA,IAAA,uBACAA,IAAA,2BACAA,IAAA,yBACAA,IAAA,iCACAA,IAAA,+BACAA,IAAA,2BANUA,EAAApC,EAAA,2BAxsBJ",
|
|
6
|
+
"names": ["gdjs", "logger", "setupWarningLogger", "RuntimeScene", "runtimeGame", "layerData", "layer", "oldGameResolutionOriginX", "oldGameResolutionOriginY", "name", "sceneData", "len", "behaviorSharedData", "initialGlobalObjectsData", "allInstancesList", "i", "module", "func", "elapsedTime", "object", "rendererObject", "cameraCoords", "aabb", "r", "g", "b", "x", "y", "result", "point", "sceneX", "sceneY", "change", "sceneName", "onProfilerStopped", "oldProfiler", "SceneChangeRequest"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var gdjs;(a=>{let n;(r=>{class s{_gameRenderer;_isDevEnvironment;_placement;_showAtStartup;_authorUsername;_gameId;_linkElement=null;_containerElement=null;_backgroundElement=null;_svgElement=null;_usernameTextElement=null;_madeWithTextElement=null;_resizeObserver=null;_displayDuration=20;_changeTextDelay=7;_fadeInDelayAfterGameLoaded=1;_fadeDuration=.3;_fadeOutTimeout=null;_hideTimeout=null;_fadeOutFirstTextTimeout=null;_fadeInSecondTextTimeout=null;_textFontSize=14;_logoWidth=56;_logoHeight=45;_backgroundHeight=150;_margin=10;constructor(e,t,i){this._gameId=e._data.properties.projectUuid,this._gameRenderer=e.getRenderer(),this._authorUsername=t[0],this._placement=i.placement,this._showAtStartup=i.showWatermark,this._isDevEnvironment=e.isUsingGDevelopDevelopmentEnvironment(),this.addStyle()}displayAtStartup(){this._showAtStartup&&this.display()}display(){const e=this._gameRenderer.getDomElementContainer();e&&(this.addWatermarkToGameContainer(e),this._resizeObserver=new ResizeObserver(()=>{const t=e.getBoundingClientRect();this.onResizeGameContainer(t.height)}),this._resizeObserver.observe(e))}updateFontSize(e){this._textFontSize=Math.max(.025*e,12)}updateLogoSize(e){this._logoWidth=Math.max(.06*e,25),this._logoHeight=Math.round(45/56*this._logoWidth)}updateBackgroundHeight(e){this._backgroundHeight=Math.max(.13*e,45)}updateMargin(e){this._margin=Math.max(.025*e,8)}onResizeGameContainer(e){this.updateFontSize(e),this._madeWithTextElement&&(this._madeWithTextElement.style.fontSize=`${this._textFontSize}px`),this._usernameTextElement&&(this._usernameTextElement.style.fontSize=`${this._textFontSize}px`),this.updateLogoSize(e),this._svgElement&&(this._svgElement.setAttribute("height",this._logoHeight.toString()),this._svgElement.setAttribute("width",this._logoWidth.toString())),this.updateBackgroundHeight(e),this._backgroundElement&&(this._backgroundElement.style.height=`${this._backgroundHeight}px`),this.updateMargin(e),this._linkElement&&this.updateElementMargins(this._linkElement)}addWatermarkToGameContainer(e){const t=e.getBoundingClientRect();this.updateFontSize(t.height),this.updateLogoSize(t.height),this.updateBackgroundHeight(t.height),this._containerElement=this.createDivContainer(),this.createBackground();const i=document.createElement("div");this.generateSVGLogo(t.height),this.createMadeWithTextElement(),this.createUsernameTextElement(),this._linkElement=this.createLinkElement(),this._svgElement&&this._containerElement.appendChild(this._svgElement),this._madeWithTextElement&&i.appendChild(this._madeWithTextElement),this._usernameTextElement&&i.appendChild(this._usernameTextElement),this._containerElement.appendChild(i),this._backgroundElement&&e.appendChild(this._backgroundElement),this._linkElement.append(this._containerElement),e.appendChild(this._linkElement),this.setupAnimations()}createBackground(){this._backgroundElement=document.createElement("div"),this._backgroundElement.setAttribute("id","watermark-background"),this._backgroundElement.style.height=`${this._backgroundHeight}px`,this._backgroundElement.style.opacity="0",this._placement.startsWith("top")?(this._backgroundElement.style.top="0",this._backgroundElement.style.backgroundImage="linear-gradient(180deg, rgba(38, 38, 38, .6) 0%, rgba(38, 38, 38, 0) 100% )"):(this._backgroundElement.style.bottom="0",this._backgroundElement.style.backgroundImage="linear-gradient(0deg, rgba(38, 38, 38, .6) 0%, rgba(38, 38, 38, 0) 100% )")}setupAnimations(){requestAnimationFrame(()=>{setTimeout(()=>{!this._containerElement||!this._backgroundElement||!this._linkElement||(this._containerElement.style.opacity="1",this._backgroundElement.style.opacity="1",this._linkElement.style.pointerEvents="all",this._svgElement&&this._svgElement.classList.add("spinning"))},this._fadeInDelayAfterGameLoaded*1e3)}),this._fadeOutTimeout=setTimeout(()=>{!this._containerElement||!this._backgroundElement||(this._containerElement.style.opacity="0",this._backgroundElement.style.opacity="0",this._hideTimeout=setTimeout(()=>{!this._containerElement||!this._backgroundElement||!this._linkElement||(this._linkElement.style.pointerEvents="none",this._containerElement.style.display="none",this._backgroundElement.style.display="none",this._resizeObserver&&this._resizeObserver.disconnect())},this._fadeDuration*1e3))},(this._fadeInDelayAfterGameLoaded+this._displayDuration)*1e3),this._fadeOutFirstTextTimeout=setTimeout(()=>{const{_madeWithTextElement:e,_usernameTextElement:t}=this;e&&t&&(e.style.opacity="0",this._fadeInSecondTextTimeout=setTimeout(()=>{t.style.lineHeight="normal",t.style.opacity="1",e.style.lineHeight="0"},this._fadeDuration*1e3))},(this._fadeInDelayAfterGameLoaded+this._changeTextDelay)*1e3)}createMadeWithTextElement(){this._madeWithTextElement=document.createElement("span"),this._madeWithTextElement.innerText="Made with GDevelop",this._madeWithTextElement.style.fontSize=`${this._textFontSize}px`}createUsernameTextElement(){this._authorUsername&&(this._usernameTextElement=document.createElement("span"),this._usernameTextElement.innerText=`@${this._authorUsername}`,this._usernameTextElement.style.fontSize=`${this._textFontSize}px`,this._usernameTextElement.style.opacity="0",this._usernameTextElement.style.lineHeight="0")}updateElementMargins(e){switch(this._placement){case"top-left":e.style.top=`${this._margin}px`,e.style.left=`${this._margin}px`;break;case"top-right":e.style.top=`${this._margin}px`,e.style.right=`${this._margin}px`;break;case"bottom-left":e.style.bottom=`${this._margin}px`,e.style.left=`${this._margin}px`;break;case"bottom-right":e.style.bottom=`${this._margin}px`,e.style.right=`${this._margin}px`;break;case"top":e.style.top=`${this._margin}px`,e.style.left="50%",e.style.transform="translate(-50%, 0)";break;case"bottom":default:e.style.bottom=`${this._margin}px`,e.style.left="50%",e.style.transform="translate(-50%, 0)";break}}createLinkElement(){const e=document.createElement("a");e.id="watermark-link";let t=this._authorUsername?new URL(`https://gd.games/${this._authorUsername}`):new URL("https://gd.games");return this._isDevEnvironment?t.searchParams.set("dev","true"):(t.searchParams.set("utm_source","gdevelop-game"),t.searchParams.set("utm_medium","game-watermark"),this._gameId&&t.searchParams.set("utm_campaign",this._gameId)),e.href=t.href,e.target="_blank",this.updateElementMargins(e),e}createDivContainer(){const e=document.createElement("div");return e.setAttribute("id","watermark"),e.style.opacity="0",e}generateSVGLogo(e){this._svgElement=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.updateLogoSize(e),this._svgElement.setAttribute("height",this._logoHeight.toString()),this._svgElement.setAttribute("width",this._logoWidth.toString()),this._svgElement.setAttribute("viewBox","-2 -2 59 48"),this._svgElement.setAttribute("fill","none");const t=document.createElementNS("http://www.w3.org/2000/svg","path"),i=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d","M29.3447 33C25.1061 33 21.0255 31.8475 17.4207 29.3381C14.9081 27.5897 12 23.6418 12 16.9488C12 4.53178 18.3074 0 30.9827 0H53.8027L56 7.07232H32.7217C24.3558 7.07232 19.3813 7.72835 19.3813 16.9488C19.3813 19.9944 20.2354 22.1618 21.9933 23.574C24.9642 25.9612 30.7388 26.0628 34.2673 25.7208C34.2673 25.7208 35.715 21.0394 35.9534 20.2794C36.2327 19.3888 36.1104 19.1763 35.2392 19.1763C33.9808 19.1763 31.7185 19.1763 29.3175 19.1763C27.6349 19.1763 25.9818 18.3247 25.9818 16.2793C25.9818 14.3039 27.5198 13.1573 29.6281 13.1573C33.2786 13.1573 40.7969 13.1573 42.2041 13.1573C44.0489 13.1573 45.9315 13.4233 44.971 16.3601L39.8842 31.8734C39.8845 31.8738 35.7287 33 29.3447 33Z"),i.setAttribute("d","M43.3039 35.3278C40.7894 37.1212 37.0648 38.1124 30.7449 38.1124C19.852 38.1124 11.8797 34.1251 8.62927 26.3952C7.0925 22.7415 7.24041 18.6005 7.24041 13H0.00129513C0.00129513 18.9056 -0.0984386 23.5361 1.45249 27.8011C5.51933 38.989 15.992 45 30.0606 45C43.6783 45 49.3213 41.0443 53 35.3278H43.3039Z"),this._svgElement.appendChild(t),this._svgElement.appendChild(i)}addStyle(){const e=document.createElement("style");e.innerHTML=`
|
|
2
|
+
@keyframes spin {
|
|
3
|
+
0% {
|
|
4
|
+
transform: rotate(0deg);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
5% {
|
|
8
|
+
transform: rotate(-10deg);
|
|
9
|
+
animation-timing-function: ease-out;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
17% {
|
|
13
|
+
transform: rotate(370deg);
|
|
14
|
+
animation-timing-function: ease-in-out;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
20% {
|
|
18
|
+
transform: rotate(360deg);
|
|
19
|
+
animation-timing-function: ease-in-out;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
100% {
|
|
23
|
+
transform: rotate(360deg);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
#watermark-background {
|
|
28
|
+
position: absolute;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
width: 100%;
|
|
31
|
+
transition-property: opacity;
|
|
32
|
+
transition-duration: ${this._fadeDuration}s;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#watermark-link {
|
|
36
|
+
all: unset;
|
|
37
|
+
position: absolute;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
user-select: none;
|
|
41
|
+
|
|
42
|
+
/* For Safari */
|
|
43
|
+
-webkit-user-select: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
#watermark {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: row;
|
|
49
|
+
align-items: center;
|
|
50
|
+
transition-property: opacity;
|
|
51
|
+
transition-duration: ${this._fadeDuration}s;
|
|
52
|
+
transition-timing-function: ease-out;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#watermark > div {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
margin-left: 5px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#watermark span {
|
|
62
|
+
color: white;
|
|
63
|
+
font-family: 'Tahoma', 'Gill sans', 'Helvetica', 'Arial';
|
|
64
|
+
font-size: ${this._textFontSize}px;
|
|
65
|
+
transition: opacity;
|
|
66
|
+
transition-duration: ${this._fadeDuration}s;
|
|
67
|
+
|
|
68
|
+
/* For Safari */
|
|
69
|
+
-webkit-transition: opacity;
|
|
70
|
+
-webkit-transition-duration: ${this._fadeDuration}s;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#watermark svg.spinning {
|
|
74
|
+
animation-name: spin;
|
|
75
|
+
animation-direction: normal;
|
|
76
|
+
animation-duration: 5s;
|
|
77
|
+
animation-iteration-count: 3;
|
|
78
|
+
animation-delay: 1.5s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#watermark svg path {
|
|
82
|
+
fill: white;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (hover: hover) {
|
|
86
|
+
#watermark span {
|
|
87
|
+
text-decoration: underline;
|
|
88
|
+
text-decoration-style: solid;
|
|
89
|
+
text-decoration-color: transparent;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
#watermark:hover span {
|
|
93
|
+
text-decoration-color: white;
|
|
94
|
+
|
|
95
|
+
/* For Safari */
|
|
96
|
+
-webkit-text-decoration-color: white;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`,document.head.appendChild(e)}}r.RuntimeWatermark=s})(n=a.watermark||={})})(gdjs||={});
|
|
100
|
+
//# sourceMappingURL=runtimewatermark.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../GDevelop/GDJS/Runtime/runtimewatermark.ts"],
|
|
4
|
+
"sourcesContent": ["namespace gdjs {\n export namespace watermark {\n export class RuntimeWatermark {\n _gameRenderer: RuntimeGameRenderer;\n _isDevEnvironment: boolean;\n\n // Configuration\n _placement:\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom'\n | 'top';\n _showAtStartup: boolean;\n _authorUsername: string | undefined;\n _gameId: string | undefined;\n\n // Dom elements\n _linkElement: HTMLAnchorElement | null = null;\n _containerElement: HTMLDivElement | null = null;\n _backgroundElement: HTMLDivElement | null = null;\n _svgElement: SVGElement | null = null;\n _usernameTextElement: HTMLSpanElement | null = null;\n _madeWithTextElement: HTMLSpanElement | null = null;\n\n _resizeObserver: ResizeObserver | null = null;\n\n // Durations in seconds\n _displayDuration: number = 20;\n _changeTextDelay: number = 7;\n _fadeInDelayAfterGameLoaded: number = 1;\n _fadeDuration: number = 0.3;\n\n // Timeout registration\n _fadeOutTimeout: NodeJS.Timeout | null = null;\n _hideTimeout: NodeJS.Timeout | null = null;\n _fadeOutFirstTextTimeout: NodeJS.Timeout | null = null;\n _fadeInSecondTextTimeout: NodeJS.Timeout | null = null;\n\n // Sizes\n _textFontSize: number = 14;\n _logoWidth: number = 56;\n _logoHeight: number = 45;\n _backgroundHeight: number = 150;\n _margin: number = 10;\n\n constructor(\n game: RuntimeGame,\n authorUsernames: Array<string>,\n watermarkData: WatermarkData\n ) {\n this._gameId = game._data.properties.projectUuid;\n this._gameRenderer = game.getRenderer();\n this._authorUsername = authorUsernames[0];\n this._placement = watermarkData.placement;\n this._showAtStartup = watermarkData.showWatermark;\n this._isDevEnvironment = game.isUsingGDevelopDevelopmentEnvironment();\n this.addStyle();\n }\n\n displayAtStartup() {\n if (this._showAtStartup) {\n this.display();\n }\n }\n\n display() {\n const gameContainer = this._gameRenderer.getDomElementContainer();\n if (gameContainer) {\n this.addWatermarkToGameContainer(gameContainer);\n this._resizeObserver = new ResizeObserver(() => {\n const gameContainerRectangle = gameContainer.getBoundingClientRect();\n this.onResizeGameContainer(gameContainerRectangle.height);\n });\n this._resizeObserver.observe(gameContainer);\n }\n }\n\n private updateFontSize(height: number) {\n this._textFontSize = Math.max(0.025 * height, 12);\n }\n private updateLogoSize(height: number) {\n this._logoWidth = Math.max(0.06 * height, 25);\n this._logoHeight = Math.round((45 / 56) * this._logoWidth);\n }\n private updateBackgroundHeight(height: number) {\n this._backgroundHeight = Math.max(0.13 * height, 45);\n }\n private updateMargin(height: number) {\n this._margin = Math.max(0.025 * height, 8);\n }\n\n private onResizeGameContainer(height: number) {\n this.updateFontSize(height);\n if (this._madeWithTextElement) {\n this._madeWithTextElement.style.fontSize = `${this._textFontSize}px`;\n }\n if (this._usernameTextElement) {\n this._usernameTextElement.style.fontSize = `${this._textFontSize}px`;\n }\n this.updateLogoSize(height);\n if (this._svgElement) {\n this._svgElement.setAttribute('height', this._logoHeight.toString());\n this._svgElement.setAttribute('width', this._logoWidth.toString());\n }\n this.updateBackgroundHeight(height);\n if (this._backgroundElement) {\n this._backgroundElement.style.height = `${this._backgroundHeight}px`;\n }\n this.updateMargin(height);\n if (this._linkElement) {\n this.updateElementMargins(this._linkElement);\n }\n }\n\n private addWatermarkToGameContainer(container: HTMLElement) {\n const gameContainerRectangle = container.getBoundingClientRect();\n this.updateFontSize(gameContainerRectangle.height);\n this.updateLogoSize(gameContainerRectangle.height);\n this.updateBackgroundHeight(gameContainerRectangle.height);\n\n this._containerElement = this.createDivContainer();\n this.createBackground();\n const textContainer = document.createElement('div');\n\n this.generateSVGLogo(gameContainerRectangle.height);\n this.createMadeWithTextElement();\n this.createUsernameTextElement();\n\n this._linkElement = this.createLinkElement();\n\n if (this._svgElement)\n this._containerElement.appendChild(this._svgElement);\n if (this._madeWithTextElement)\n textContainer.appendChild(this._madeWithTextElement);\n if (this._usernameTextElement)\n textContainer.appendChild(this._usernameTextElement);\n this._containerElement.appendChild(textContainer);\n if (this._backgroundElement)\n container.appendChild(this._backgroundElement);\n\n this._linkElement.append(this._containerElement);\n container.appendChild(this._linkElement);\n\n this.setupAnimations();\n }\n\n private createBackground() {\n this._backgroundElement = document.createElement('div');\n this._backgroundElement.setAttribute('id', 'watermark-background');\n this._backgroundElement.style.height = `${this._backgroundHeight}px`;\n this._backgroundElement.style.opacity = '0';\n if (this._placement.startsWith('top')) {\n this._backgroundElement.style.top = '0';\n this._backgroundElement.style.backgroundImage =\n 'linear-gradient(180deg, rgba(38, 38, 38, .6) 0%, rgba(38, 38, 38, 0) 100% )';\n } else {\n this._backgroundElement.style.bottom = '0';\n this._backgroundElement.style.backgroundImage =\n 'linear-gradient(0deg, rgba(38, 38, 38, .6) 0%, rgba(38, 38, 38, 0) 100% )';\n }\n }\n\n private setupAnimations() {\n // Necessary to trigger fade in transition\n requestAnimationFrame(() => {\n // Display the watermark\n setTimeout(() => {\n if (\n !this._containerElement ||\n !this._backgroundElement ||\n !this._linkElement\n )\n return;\n this._containerElement.style.opacity = '1';\n this._backgroundElement.style.opacity = '1';\n this._linkElement.style.pointerEvents = 'all';\n if (this._svgElement) this._svgElement.classList.add('spinning');\n }, this._fadeInDelayAfterGameLoaded * 1000);\n });\n\n // Hide the watermark\n this._fadeOutTimeout = setTimeout(() => {\n if (!this._containerElement || !this._backgroundElement) {\n return;\n }\n this._containerElement.style.opacity = '0';\n this._backgroundElement.style.opacity = '0';\n\n // Completely remove the watermark once the fade out duration has ended.\n this._hideTimeout = setTimeout(\n () => {\n if (\n !this._containerElement ||\n !this._backgroundElement ||\n !this._linkElement\n )\n return;\n this._linkElement.style.pointerEvents = 'none';\n this._containerElement.style.display = 'none';\n this._backgroundElement.style.display = 'none';\n if (this._resizeObserver) this._resizeObserver.disconnect();\n },\n // Deactivate all interaction possibilities with watermark at\n // the end of the animation to make sure it doesn't deactivate too early\n this._fadeDuration * 1000\n );\n }, (this._fadeInDelayAfterGameLoaded + this._displayDuration) * 1000);\n\n // Change text below watermark\n this._fadeOutFirstTextTimeout = setTimeout(() => {\n const { _madeWithTextElement, _usernameTextElement } = this;\n if (!_madeWithTextElement) return;\n\n // Do not hide madeWith text if there is no author username to display.\n if (_usernameTextElement) {\n _madeWithTextElement.style.opacity = '0';\n this._fadeInSecondTextTimeout = setTimeout(() => {\n _usernameTextElement.style.lineHeight = 'normal';\n _usernameTextElement.style.opacity = '1';\n _madeWithTextElement.style.lineHeight = '0';\n }, this._fadeDuration * 1000);\n }\n }, (this._fadeInDelayAfterGameLoaded + this._changeTextDelay) * 1000);\n }\n\n private createMadeWithTextElement() {\n this._madeWithTextElement = document.createElement('span');\n this._madeWithTextElement.innerText = 'Made with GDevelop';\n this._madeWithTextElement.style.fontSize = `${this._textFontSize}px`;\n }\n\n private createUsernameTextElement() {\n if (!this._authorUsername) return;\n this._usernameTextElement = document.createElement('span');\n this._usernameTextElement.innerText = `@${this._authorUsername}`;\n this._usernameTextElement.style.fontSize = `${this._textFontSize}px`;\n this._usernameTextElement.style.opacity = '0';\n this._usernameTextElement.style.lineHeight = '0';\n }\n\n private updateElementMargins(element: HTMLElement) {\n switch (this._placement) {\n case 'top-left':\n element.style.top = `${this._margin}px`;\n element.style.left = `${this._margin}px`;\n break;\n case 'top-right':\n element.style.top = `${this._margin}px`;\n element.style.right = `${this._margin}px`;\n break;\n case 'bottom-left':\n element.style.bottom = `${this._margin}px`;\n element.style.left = `${this._margin}px`;\n break;\n case 'bottom-right':\n element.style.bottom = `${this._margin}px`;\n element.style.right = `${this._margin}px`;\n break;\n case 'top':\n element.style.top = `${this._margin}px`;\n element.style.left = '50%';\n element.style.transform = 'translate(-50%, 0)';\n break;\n case 'bottom':\n default:\n element.style.bottom = `${this._margin}px`;\n element.style.left = '50%';\n element.style.transform = 'translate(-50%, 0)';\n break;\n }\n }\n\n private createLinkElement(): HTMLAnchorElement {\n const linkElement = document.createElement('a');\n linkElement.id = 'watermark-link';\n\n let targetUrl = this._authorUsername\n ? new URL(`https://gd.games/${this._authorUsername}`)\n : new URL('https://gd.games');\n\n if (this._isDevEnvironment) {\n targetUrl.searchParams.set('dev', 'true');\n } else {\n targetUrl.searchParams.set('utm_source', 'gdevelop-game');\n targetUrl.searchParams.set('utm_medium', 'game-watermark');\n\n if (this._gameId) {\n targetUrl.searchParams.set('utm_campaign', this._gameId);\n }\n }\n linkElement.href = targetUrl.href;\n linkElement.target = '_blank';\n\n this.updateElementMargins(linkElement);\n\n return linkElement;\n }\n\n private createDivContainer(): HTMLDivElement {\n const divContainer = document.createElement('div');\n divContainer.setAttribute('id', 'watermark');\n\n divContainer.style.opacity = '0';\n return divContainer;\n }\n\n private generateSVGLogo(height: number) {\n this._svgElement = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'svg'\n );\n\n this.updateLogoSize(height);\n this._svgElement.setAttribute('height', this._logoHeight.toString());\n this._svgElement.setAttribute('width', this._logoWidth.toString());\n this._svgElement.setAttribute('viewBox', '-2 -2 59 48');\n this._svgElement.setAttribute('fill', 'none');\n const path1 = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'path'\n );\n const path2 = document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'path'\n );\n path1.setAttribute(\n 'd',\n 'M29.3447 33C25.1061 33 21.0255 31.8475 17.4207 29.3381C14.9081 27.5897 12 23.6418 12 16.9488C12 4.53178 18.3074 0 30.9827 0H53.8027L56 7.07232H32.7217C24.3558 7.07232 19.3813 7.72835 19.3813 16.9488C19.3813 19.9944 20.2354 22.1618 21.9933 23.574C24.9642 25.9612 30.7388 26.0628 34.2673 25.7208C34.2673 25.7208 35.715 21.0394 35.9534 20.2794C36.2327 19.3888 36.1104 19.1763 35.2392 19.1763C33.9808 19.1763 31.7185 19.1763 29.3175 19.1763C27.6349 19.1763 25.9818 18.3247 25.9818 16.2793C25.9818 14.3039 27.5198 13.1573 29.6281 13.1573C33.2786 13.1573 40.7969 13.1573 42.2041 13.1573C44.0489 13.1573 45.9315 13.4233 44.971 16.3601L39.8842 31.8734C39.8845 31.8738 35.7287 33 29.3447 33Z'\n );\n path2.setAttribute(\n 'd',\n 'M43.3039 35.3278C40.7894 37.1212 37.0648 38.1124 30.7449 38.1124C19.852 38.1124 11.8797 34.1251 8.62927 26.3952C7.0925 22.7415 7.24041 18.6005 7.24041 13H0.00129513C0.00129513 18.9056 -0.0984386 23.5361 1.45249 27.8011C5.51933 38.989 15.992 45 30.0606 45C43.6783 45 49.3213 41.0443 53 35.3278H43.3039Z'\n );\n this._svgElement.appendChild(path1);\n this._svgElement.appendChild(path2);\n }\n\n private addStyle() {\n const styleElement = document.createElement('style');\n styleElement.innerHTML = `\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 5% {\n transform: rotate(-10deg);\n animation-timing-function: ease-out;\n }\n\n 17% {\n transform: rotate(370deg);\n animation-timing-function: ease-in-out;\n }\n\n 20% {\n transform: rotate(360deg);\n animation-timing-function: ease-in-out;\n }\n\n 100% {\n transform: rotate(360deg);\n }\n }\n\n #watermark-background {\n position: absolute;\n pointer-events: none;\n width: 100%;\n transition-property: opacity;\n transition-duration: ${this._fadeDuration}s;\n }\n\n #watermark-link {\n all: unset;\n position: absolute;\n cursor: pointer;\n pointer-events: none;\n user-select: none;\n\n /* For Safari */\n -webkit-user-select: none;\n }\n\n #watermark {\n display: flex;\n flex-direction: row;\n align-items: center;\n transition-property: opacity;\n transition-duration: ${this._fadeDuration}s;\n transition-timing-function: ease-out;\n }\n\n #watermark > div {\n display: flex;\n flex-direction: column;\n margin-left: 5px;\n }\n\n #watermark span {\n color: white;\n font-family: 'Tahoma', 'Gill sans', 'Helvetica', 'Arial';\n font-size: ${this._textFontSize}px;\n transition: opacity;\n transition-duration: ${this._fadeDuration}s;\n\n /* For Safari */\n -webkit-transition: opacity;\n -webkit-transition-duration: ${this._fadeDuration}s;\n }\n\n #watermark svg.spinning {\n animation-name: spin;\n animation-direction: normal;\n animation-duration: 5s;\n animation-iteration-count: 3;\n animation-delay: 1.5s;\n }\n\n #watermark svg path {\n fill: white;\n }\n\n @media (hover: hover) {\n #watermark span {\n text-decoration: underline;\n text-decoration-style: solid;\n text-decoration-color: transparent;\n }\n\n #watermark:hover span {\n text-decoration-color: white;\n\n /* For Safari */\n -webkit-text-decoration-color: white;\n }\n }\n `;\n document.head.appendChild(styleElement);\n }\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,IAAU,MAAAA,GAAV,CACS,IAAUC,MAAV,CACE,MAAMC,CAAiB,CAC5B,cACA,kBAGA,WAOA,eACA,gBACA,QAGA,aAAyC,KACzC,kBAA2C,KAC3C,mBAA4C,KAC5C,YAAiC,KACjC,qBAA+C,KAC/C,qBAA+C,KAE/C,gBAAyC,KAGzC,iBAA2B,GAC3B,iBAA2B,EAC3B,4BAAsC,EACtC,cAAwB,GAGxB,gBAAyC,KACzC,aAAsC,KACtC,yBAAkD,KAClD,yBAAkD,KAGlD,cAAwB,GACxB,WAAqB,GACrB,YAAsB,GACtB,kBAA4B,IAC5B,QAAkB,GAElB,YACEC,EACAC,EACAC,EACA,CACA,KAAK,QAAUF,EAAK,MAAM,WAAW,YACrC,KAAK,cAAgBA,EAAK,YAAY,EACtC,KAAK,gBAAkBC,EAAgB,CAAC,EACxC,KAAK,WAAaC,EAAc,UAChC,KAAK,eAAiBA,EAAc,cACpC,KAAK,kBAAoBF,EAAK,sCAAsC,EACpE,KAAK,SAAS,CAChB,CAEA,kBAAmB,CACb,KAAK,gBACP,KAAK,QAAQ,CAEjB,CAEA,SAAU,CACR,MAAMG,EAAgB,KAAK,cAAc,uBAAuB,EAC5DA,IACF,KAAK,4BAA4BA,CAAa,EAC9C,KAAK,gBAAkB,IAAI,eAAe,IAAM,CAC9C,MA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ernames", "watermarkData", "gameContainer", "gameContainerRectangle", "height", "container", "textContainer", "_madeWithTextElement", "_usernameTextElement", "element", "linkElement", "targetUrl", "divContainer", "path1", "path2", "styleElement"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var gdjs;(s=>{const r=new s.Logger("Scene stack");class a{_runtimeGame;_stack=[];_wasFirstSceneLoaded=!1;constructor(e){if(!e)throw"SceneStack must be constructed with a gdjs.RuntimeGame.";this._runtimeGame=e}onGameResolutionResized(){for(let e=0;e<this._stack.length;++e)this._stack[e].onGameResolutionResized()}step(e){if(this._stack.length===0)return!1;const n=this._stack[this._stack.length-1];if(n.renderAndStep(e)){const t=n.getRequestedChange();if(t===s.SceneChangeRequest.STOP_GAME)return this._runtimeGame.getRenderer().stopGame(),!0;if(t===s.SceneChangeRequest.POP_SCENE)this.pop();else if(t===s.SceneChangeRequest.PUSH_SCENE)this.push(n.getRequestedScene());else if(t===s.SceneChangeRequest.REPLACE_SCENE)this.replace(n.getRequestedScene());else if(t===s.SceneChangeRequest.CLEAR_SCENES)this.replace(n.getRequestedScene(),!0);else return r.error("Unrecognized change in scene stack: "+t),!1}return!0}renderWithoutStep(){return this._stack.length===0?!1:(this._stack[this._stack.length-1].render(),!0)}pop(){if(this._stack.length<=1)return null;const e=this._stack.pop();if(!e)return null;e.unloadScene();const n=this._stack[this._stack.length-1];return n&&n.onResume(),e}push(e,n){const t=this._stack[this._stack.length-1];t&&t.onPause();const c=new s.RuntimeScene(this._runtimeGame);if(c.loadFromScene(this._runtimeGame.getSceneData(e)),this._wasFirstSceneLoaded=!0,n){const i=this._runtimeGame.getExternalLayoutData(n);i&&c.createObjectsFrom(i.instances,0,0,!0)}return this._stack.push(c),c}replace(e,n){if(n)for(;this._stack.length!==0;){let t=this._stack.pop();t&&t.unloadScene()}else if(this._stack.length!==0){let t=this._stack.pop();t&&t.unloadScene()}return this.push(e)}getCurrentScene(){return this._stack.length===0?null:this._stack[this._stack.length-1]}wasFirstSceneLoaded(){return this._wasFirstSceneLoaded}}s.SceneStack=a})(gdjs||={});
|
|
2
|
+
//# sourceMappingURL=scenestack.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../GDevelop/GDJS/Runtime/scenestack.ts"],
|
|
4
|
+
"sourcesContent": ["namespace gdjs {\n const logger = new gdjs.Logger('Scene stack');\n\n /**\n * Hold the stack of scenes ({@link gdjs.RuntimeScene}) being played.\n */\n export class SceneStack {\n _runtimeGame: gdjs.RuntimeGame;\n _stack: gdjs.RuntimeScene[] = [];\n _wasFirstSceneLoaded: boolean = false;\n\n /**\n * @param runtimeGame The runtime game that is using the scene stack\n */\n constructor(runtimeGame: gdjs.RuntimeGame) {\n if (!runtimeGame) {\n throw 'SceneStack must be constructed with a gdjs.RuntimeGame.';\n }\n this._runtimeGame = runtimeGame;\n }\n\n /**\n * Called by the RuntimeGame when the game resolution is changed.\n * Useful to notify scene and layers that resolution is changed, as they\n * might be caching it.\n */\n onGameResolutionResized(): void {\n for (let i = 0; i < this._stack.length; ++i) {\n this._stack[i].onGameResolutionResized();\n }\n }\n\n step(elapsedTime: float): boolean {\n if (this._stack.length === 0) {\n return false;\n }\n const currentScene = this._stack[this._stack.length - 1];\n if (currentScene.renderAndStep(elapsedTime)) {\n const request = currentScene.getRequestedChange();\n\n //Something special was requested by the current scene.\n if (request === gdjs.SceneChangeRequest.STOP_GAME) {\n this._runtimeGame.getRenderer().stopGame();\n return true;\n } else if (request === gdjs.SceneChangeRequest.POP_SCENE) {\n this.pop();\n } else if (request === gdjs.SceneChangeRequest.PUSH_SCENE) {\n this.push(currentScene.getRequestedScene());\n } else if (request === gdjs.SceneChangeRequest.REPLACE_SCENE) {\n this.replace(currentScene.getRequestedScene());\n } else if (request === gdjs.SceneChangeRequest.CLEAR_SCENES) {\n this.replace(currentScene.getRequestedScene(), true);\n } else {\n logger.error('Unrecognized change in scene stack: ' + request);\n return false;\n }\n }\n return true;\n }\n\n renderWithoutStep(): boolean {\n if (this._stack.length === 0) {\n return false;\n }\n const currentScene = this._stack[this._stack.length - 1];\n currentScene.render();\n return true;\n }\n\n pop(): gdjs.RuntimeScene | null {\n if (this._stack.length <= 1) {\n return null;\n }\n\n // Unload the current scene\n const scene = this._stack.pop();\n if (!scene) {\n return null;\n }\n scene.unloadScene();\n\n // Tell the new current scene it's being resumed\n const currentScene = this._stack[this._stack.length - 1];\n if (currentScene) {\n currentScene.onResume();\n }\n return scene;\n }\n\n /**\n * Pause the scene currently being played and start the new scene that is specified.\n * If `externalLayoutName` is set, also instantiate the objects from this external layout.\n */\n push(newSceneName: string, externalLayoutName?: string): gdjs.RuntimeScene {\n // Tell the scene it's being paused\n const currentScene = this._stack[this._stack.length - 1];\n if (currentScene) {\n currentScene.onPause();\n }\n\n // Load the new one\n const newScene = new gdjs.RuntimeScene(this._runtimeGame);\n newScene.loadFromScene(this._runtimeGame.getSceneData(newSceneName));\n this._wasFirstSceneLoaded = true;\n\n // Optionally create the objects from an external layout.\n if (externalLayoutName) {\n const externalLayoutData = this._runtimeGame.getExternalLayoutData(\n externalLayoutName\n );\n if (externalLayoutData) {\n newScene.createObjectsFrom(\n externalLayoutData.instances,\n 0,\n 0,\n /*trackByPersistentUuid=*/\n true\n );\n }\n }\n this._stack.push(newScene);\n return newScene;\n }\n\n /**\n * Start the specified scene, replacing the one currently being played.\n * If `clear` is set to true, all running scenes are also removed from the stack of scenes.\n */\n replace(newSceneName: string, clear?: boolean): gdjs.RuntimeScene {\n if (!!clear) {\n // Unload all the scenes\n while (this._stack.length !== 0) {\n let scene = this._stack.pop();\n if (scene) {\n scene.unloadScene();\n }\n }\n } else {\n // Unload the current scene\n if (this._stack.length !== 0) {\n let scene = this._stack.pop();\n if (scene) {\n scene.unloadScene();\n }\n }\n }\n return this.push(newSceneName);\n }\n\n /**\n * Return the current gdjs.RuntimeScene being played, or null if none is run.\n */\n getCurrentScene(): gdjs.RuntimeScene | null {\n if (this._stack.length === 0) {\n return null;\n }\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * Return true if a scene was loaded, false otherwise (i.e: game not yet started).\n */\n wasFirstSceneLoaded(): boolean {\n return this._wasFirstSceneLoaded;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,IAAU,MAAAA,GAAV,CACE,MAAMC,EAAS,IAAID,EAAK,OAAO,aAAa,EAKrC,MAAME,CAAW,CACtB,aACA,OAA8B,CAAC,EAC/B,qBAAgC,GAKhC,YAAYC,EAA+B,CACzC,GAAI,CAACA,EACH,KAAM,0DAER,KAAK,aAAeA,CACtB,CAOA,yBAAgC,CAC9B,QAASC,EAAI,EAAGA,EAAI,KAAK,OAAO,OAAQ,EAAEA,EACxC,KAAK,OAAOA,CAAC,EAAE,wBAAwB,CAE3C,CAEA,KAAKC,EAA6B,CAChC,GAAI,KAAK,OAAO,SAAW,EACzB,MAAO,GAET,MAAMC,EAAe,KAAK,OAAO,KAAK,OAAO,OAAS,CAAC,EACvD,GAAIA,EAAa,cAAcD,CAAW,EAAG,CAC3C,MAAME,EAAUD,EAAa,mBAAmB,EAGhD,GAAIC,IAAYP,EAAK,mBAAmB,UACtC,YAAK,aAAa,YAAY,EAAE,SAAS,EAClC,GACF,GAAIO,IAAYP,EAAK,mBAAmB,UAC7C,KAAK,IAAI,UACAO,IAAYP,EAAK,mBAAmB,WAC7C,KAAK,KAAKM,EAAa,kBAAkB,CAAC,UACjCC,IAAYP,EAAK,mBAAmB,cAC7C,KAAK,QAAQM,EAAa,kBAAkB,CAAC,UACpCC,IAAYP,EAAK,mBAAmB,aAC7C,KAAK,QAAQM,EAAa,kBAAkB,EAAG,EAAI,MAEnD,QAAAL,EAAO,MAAM,uCAAyCM,CAAO,EACtD,EAEX,CACA,MAAO,EACT,CAEA,mBAA6B,CAC3B,OAAI,KAAK,OAAO,SAAW,EAClB,IAEY,KAAK,OAAO,KAAK,OAAO,OAAS,CAAC,EAC1C,OAAO,EACb,GACT,CAEA,KAAgC,CAC9B,GAAI,KAAK,OAAO,QAAU,EACxB,OAAO,KAIT,MAAMC,EAAQ,KAAK,OAAO,IAAI,EAC9B,GAAI,CAACA,EACH,OAAO,KAETA,EAAM,YAAY,EAGlB,MAAMF,EAAe,KAAK,OAAO,KAAK,OAAO,OAAS,CAAC,EACvD,OAAIA,GACFA,EAAa,SAAS,EAEjBE,CACT,CAMA,KAAKC,EAAsBC,EAAgD,CAEzE,MAAMJ,EAAe,KAAK,OAAO,KAAK,OAAO,OAAS,CAAC,EACnDA,GACFA,EAAa,QAAQ,EAIvB,MAAMK,EAAW,IAAIX,EAAK,aAAa,KAAK,YAAY,EAKxD,GAJAW,EAAS,cAAc,KAAK,aAAa,aAAaF,CAAY,CAAC,EACnE,KAAK,qBAAuB,GAGxBC,EAAoB,CACtB,MAAME,EAAqB,KAAK,aAAa,sBAC3CF,CACF,EACIE,GACFD,EAAS,kBACPC,EAAmB,UACnB,EACA,EAEA,EACF,CAEJ,CACA,YAAK,OAAO,KAAKD,CAAQ,EAClBA,CACT,CAMA,QAAQF,EAAsBI,EAAoC,CAChE,GAAMA,EAEJ,KAAO,KAAK,OAAO,SAAW,GAAG,CAC/B,IAAIL,EAAQ,KAAK,OAAO,IAAI,EACxBA,GACFA,EAAM,YAAY,CAEtB,SAGI,KAAK,OAAO,SAAW,EAAG,CAC5B,IAAIA,EAAQ,KAAK,OAAO,IAAI,EACxBA,GACFA,EAAM,YAAY,CAEtB,CAEF,OAAO,KAAK,KAAKC,CAAY,CAC/B,CAKA,iBAA4C,CAC1C,OAAI,KAAK,OAAO,SAAW,EAClB,KAEF,KAAK,OAAO,KAAK,OAAO,OAAS,CAAC,CAC3C,CAKA,qBAA+B,CAC7B,OAAO,KAAK,oBACd,CACF,CA/JOT,EAAM,WAAAE,IANL",
|
|
6
|
+
"names": ["gdjs", "logger", "SceneStack", "runtimeGame", "i", "elapsedTime", "currentScene", "request", "scene", "newSceneName", "externalLayoutName", "newScene", "externalLayoutData", "clear"]
|
|
7
|
+
}
|