gdcore-tools 2.0.0-beta3 → 2.0.0-beta4
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/dist/Runtime/AsyncTasksManager.js +2 -2
- package/dist/Runtime/AsyncTasksManager.js.map +2 -2
- package/dist/Runtime/Cordova/config.xml +23 -1
- package/dist/Runtime/Cordova/www/LICENSE.GDevelop.txt +2 -0
- package/dist/Runtime/Cordova/www/index.html +1 -1
- package/dist/Runtime/CustomRuntimeObject.js +1 -1
- package/dist/Runtime/CustomRuntimeObject.js.map +2 -2
- package/dist/Runtime/CustomRuntimeObject2D.js +2 -0
- package/dist/Runtime/CustomRuntimeObject2D.js.map +7 -0
- package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js +1 -1
- package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js.map +2 -2
- package/dist/Runtime/Electron/LICENSE.GDevelop.txt +2 -0
- package/dist/Runtime/Electron/package.json +3 -0
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js +1 -1
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js.map +2 -2
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js +1 -1
- package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js.map +2 -2
- package/dist/Runtime/Extensions/3D/AmbientLight.js +1 -1
- package/dist/Runtime/Extensions/3D/AmbientLight.js.map +2 -2
- package/dist/Runtime/Extensions/3D/Base3DBehavior.js +1 -1
- package/dist/Runtime/Extensions/3D/Base3DBehavior.js.map +2 -2
- package/dist/Runtime/Extensions/3D/BloomEffect.js +1 -1
- package/dist/Runtime/Extensions/3D/BloomEffect.js.map +2 -2
- package/dist/Runtime/Extensions/3D/BrightnessAndContrastEffect.js +1 -1
- package/dist/Runtime/Extensions/3D/BrightnessAndContrastEffect.js.map +2 -2
- package/dist/Runtime/Extensions/3D/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js +1 -1
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js.map +2 -2
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3D.js +2 -0
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3D.js.map +7 -0
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3DRenderer.js +2 -0
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3DRenderer.js.map +7 -0
- package/dist/Runtime/Extensions/3D/DirectionalLight.js +1 -1
- package/dist/Runtime/Extensions/3D/DirectionalLight.js.map +2 -2
- package/dist/Runtime/Extensions/3D/ExponentialFog.js +1 -1
- package/dist/Runtime/Extensions/3D/ExponentialFog.js.map +2 -2
- package/dist/Runtime/Extensions/3D/ExposureEffect.js +1 -1
- package/dist/Runtime/Extensions/3D/ExposureEffect.js.map +2 -2
- package/dist/Runtime/Extensions/3D/HemisphereLight.js +1 -1
- package/dist/Runtime/Extensions/3D/HemisphereLight.js.map +2 -2
- package/dist/Runtime/Extensions/3D/HueAndSaturationEffect.js +1 -1
- package/dist/Runtime/Extensions/3D/HueAndSaturationEffect.js.map +2 -2
- package/dist/Runtime/Extensions/3D/JsExtension.js +56 -24
- package/dist/Runtime/Extensions/3D/LinearFog.js +1 -1
- package/dist/Runtime/Extensions/3D/LinearFog.js.map +2 -2
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js +1 -1
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js.map +2 -2
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js +1 -1
- package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js.map +2 -2
- package/dist/Runtime/Extensions/AdMob/JsExtension.js +11 -10
- package/dist/Runtime/Extensions/AdMob/admobtools.js +1 -1
- package/dist/Runtime/Extensions/AdMob/admobtools.js.map +2 -2
- package/dist/Runtime/Extensions/AnchorBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/BBText/JsExtension.js +20 -11
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/BitmapText/JsExtension.js +2 -8
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/CMakeLists.txt +35 -0
- package/dist/Runtime/Extensions/CMakeUtils.txt +81 -0
- package/dist/Runtime/Extensions/DestroyOutsideBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/DialogueTree/bondage.js/version.txt +5 -0
- package/dist/Runtime/Extensions/DraggableBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/hsl-adjustment-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/hsl-adjustment-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js +2 -2
- package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/motion-blur-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/motion-blur-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/night-pixi-filter.js +2 -2
- package/dist/Runtime/Extensions/Effects/night-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/shockwave-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/shockwave-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js +1 -1
- package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js.map +2 -2
- package/dist/Runtime/Extensions/ExampleJsExtension/JsExtension.js +2 -11
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js +1 -1
- package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js.map +2 -2
- package/dist/Runtime/Extensions/FileSystem/JsExtension.js +22 -0
- package/dist/Runtime/Extensions/FileSystem/filesystemtools.js +1 -1
- package/dist/Runtime/Extensions/FileSystem/filesystemtools.js.map +2 -2
- package/dist/Runtime/Extensions/Firebase/A_firebasejs/NOTICE.txt +6 -0
- package/dist/Runtime/Extensions/Inventory/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/JsExtensionTypes.d.ts +13 -4
- package/dist/Runtime/Extensions/Leaderboards/JsExtension.js +42 -1
- package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js +1 -1
- package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js.map +2 -2
- package/dist/Runtime/Extensions/Lighting/JsExtension.js +2 -11
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/LinkedObjects/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js +1 -1
- package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js.map +2 -2
- package/dist/Runtime/Extensions/Multiplayer/JsExtension.js +1130 -0
- package/dist/Runtime/Extensions/Multiplayer/messageManager.js +2 -0
- package/dist/Runtime/Extensions/Multiplayer/messageManager.js.map +7 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayerVariablesManager.js +2 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayerVariablesManager.js.map +7 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayercomponents.js +2 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayercomponents.js.map +7 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayerobjectruntimebehavior.js +2 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayerobjectruntimebehavior.js.map +7 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayertools.js +2 -0
- package/dist/Runtime/Extensions/Multiplayer/multiplayertools.js.map +7 -0
- package/dist/Runtime/Extensions/Multiplayer/peer.js +10 -0
- package/dist/Runtime/Extensions/Multiplayer/peer.js.map +1 -0
- package/dist/Runtime/Extensions/Multiplayer/peerJsHelper.js +2 -0
- package/dist/Runtime/Extensions/Multiplayer/peerJsHelper.js.map +7 -0
- package/dist/Runtime/Extensions/Multiplayer/peerjs.d.ts +509 -0
- package/dist/Runtime/Extensions/P2P/A_peer.js +8 -2
- package/dist/Runtime/Extensions/P2P/A_peer.js.map +1 -1
- package/dist/Runtime/Extensions/P2P/B_p2ptools.js +1 -1
- package/dist/Runtime/Extensions/P2P/B_p2ptools.js.map +2 -2
- package/dist/Runtime/Extensions/P2P/JsExtension.js +27 -0
- package/dist/Runtime/Extensions/PanelSpriteObject/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/ParticleSystem/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js +1 -1
- package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js.map +2 -2
- package/dist/Runtime/Extensions/PathfindingBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Physics2Behavior/JsExtension.js +47 -4
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js +1 -1
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/PhysicsBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/PlatformBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/PlayerAuthentication/JsExtension.js +6 -3
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js +4 -4
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js.map +2 -2
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js +1 -1
- package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js.map +2 -2
- package/dist/Runtime/Extensions/PrimitiveDrawing/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/Shopify/CMakeLists.txt +26 -0
- package/dist/Runtime/Extensions/Spine/CMakeLists.txt +20 -0
- package/dist/Runtime/Extensions/Spine/JsExtension.js +11 -2
- package/dist/Runtime/Extensions/Spine/managers/pixi-spine-atlas-manager.js +1 -1
- package/dist/Runtime/Extensions/Spine/managers/pixi-spine-atlas-manager.js.map +2 -2
- package/dist/Runtime/Extensions/Spine/managers/pixi-spine-manager.js +1 -1
- package/dist/Runtime/Extensions/Spine/managers/pixi-spine-manager.js.map +2 -2
- package/dist/Runtime/Extensions/Spine/pixi-spine/Spine-Runtimes-License-Agreement.txt +11 -0
- package/dist/Runtime/Extensions/Spine/pixi-spine/pixi-spine.js +5 -3
- package/dist/Runtime/Extensions/Spine/spineruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Spine/spineruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/SystemInfo/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/TextEntryObject/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/TextInput/JsExtension.js +3 -10
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TextObject/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/JsExtension.js +834 -23
- package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js +1 -1
- package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js +1 -1
- package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.d.ts +2 -0
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js.map +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts +12 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts.map +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts +119 -5
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts.map +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts +25 -0
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts.map +1 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts +16 -1
- package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts.map +1 -1
- package/dist/Runtime/Extensions/TileMap/simpletilemapruntimeobject.js +2 -0
- package/dist/Runtime/Extensions/TileMap/simpletilemapruntimeobject.js.map +7 -0
- package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TiledSpriteObject/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TopDownMovementBehavior/CMakeLists.txt +23 -0
- package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/TweenBehavior/JsExtension.js +2 -2
- package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Video/JsExtension.js +2 -11
- package/dist/Runtime/Extensions/Video/videoruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Video/videoruntimeobject.js.map +2 -2
- package/dist/Runtime/RuntimeInstanceContainer.js +1 -1
- package/dist/Runtime/RuntimeInstanceContainer.js.map +2 -2
- package/dist/Runtime/SpriteAnimator.js +2 -0
- package/dist/Runtime/SpriteAnimator.js.map +7 -0
- package/dist/Runtime/debugger-client/hot-reloader.js +1 -1
- package/dist/Runtime/debugger-client/hot-reloader.js.map +2 -2
- package/dist/Runtime/events-tools/objecttools.js +1 -1
- package/dist/Runtime/events-tools/objecttools.js.map +2 -2
- package/dist/Runtime/events-tools/runtimescenetools.js +1 -1
- package/dist/Runtime/events-tools/runtimescenetools.js.map +2 -2
- package/dist/Runtime/force.js +1 -1
- package/dist/Runtime/force.js.map +2 -2
- package/dist/Runtime/object-capabilities/TextContainerBehavior.js.map +1 -1
- package/dist/Runtime/pixi-renderers/CustomRuntimeObject2DPixiRenderer.js +2 -0
- package/dist/Runtime/pixi-renderers/CustomRuntimeObject2DPixiRenderer.js.map +7 -0
- package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js +1 -1
- package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js.map +2 -2
- package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js +2 -2
- package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js.map +2 -2
- package/dist/Runtime/pixi-renderers/pixi-filters-tools.js +1 -1
- package/dist/Runtime/pixi-renderers/pixi-filters-tools.js.map +2 -2
- package/dist/Runtime/pixi-renderers/pixi-image-manager.js.map +2 -2
- package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js +1 -1
- package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js.map +2 -2
- package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js +1 -1
- package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js.map +2 -2
- package/dist/Runtime/polygon.js +1 -1
- package/dist/Runtime/polygon.js.map +2 -2
- package/dist/Runtime/runtimebehavior.js +1 -1
- package/dist/Runtime/runtimebehavior.js.map +2 -2
- package/dist/Runtime/runtimegame.js +1 -1
- package/dist/Runtime/runtimegame.js.map +2 -2
- package/dist/Runtime/runtimeobject.js +1 -1
- package/dist/Runtime/runtimeobject.js.map +2 -2
- package/dist/Runtime/runtimescene.js +1 -1
- package/dist/Runtime/runtimescene.js.map +2 -2
- package/dist/Runtime/scenestack.js +1 -1
- package/dist/Runtime/scenestack.js.map +2 -2
- package/dist/Runtime/spriteruntimeobject.js +1 -1
- package/dist/Runtime/spriteruntimeobject.js.map +2 -2
- package/dist/Runtime/timer.js +1 -1
- package/dist/Runtime/timer.js.map +2 -2
- package/dist/Runtime/types/project-data.d.ts +115 -0
- package/dist/Runtime/variable.js +1 -1
- package/dist/Runtime/variable.js.map +2 -2
- package/dist/Runtime/variablescontainer.js +1 -1
- package/dist/Runtime/variablescontainer.js.map +2 -2
- package/dist/lib/libGD.cjs +2 -1
- package/dist/lib/libGD.d.cts +5 -0
- package/dist/lib/libGD.wasm +0 -0
- package/dist/loaders.cjs +2 -1
- package/dist/loaders.d.cts +2 -0
- package/gd.d.ts +217 -223
- package/package.json +8 -6
- package/src/index.js +2 -0
- package/types/index.d.ts +2 -2
- package/types/open_project.d.ts +4 -4
- package/dist/Runtime/Extensions/Spine/pixi-spine/pixi-spine.js.map +0 -7
- package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js +0 -2
- package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../GDevelop/Extensions/PrimitiveDrawing/shapepainterruntimeobject.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * GDevelop JS Platform\n * 2013 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n /** Represents a color in RGB Format */\n export type RGBColor = {\n /** The Red component of the color, from 0 to 255. */\n r: integer;\n /** The Green component of the color, from 0 to 255. */\n g: integer;\n /** The Blue component of the color, from 0 to 255. */\n b: integer;\n };\n\n export type Antialiasing = 'none' | 'low' | 'medium' | 'high';\n\n /** Initial properties for a for {@link gdjs.ShapePainterRuntimeObject}. */\n export type ShapePainterObjectDataType = {\n /** The color (in RGB format) of the inner part of the painted shape */\n fillColor: RGBColor;\n /** The color (in RGB format) of the outline of the painted shape */\n outlineColor: RGBColor;\n /** The opacity of the inner part of the painted shape, from 0 to 255 */\n fillOpacity: float;\n /** The opacity of the outline of the painted shape, from 0 to 255 */\n outlineOpacity: float;\n /** The size of the outline of the painted shape, in pixels. */\n outlineSize: float;\n /** Use absolute coordinates? */\n absoluteCoordinates: boolean;\n /** Clear the previous render before the next draw? */\n clearBetweenFrames: boolean;\n /** The type of anti-aliasing to apply at rendering. */\n antialiasing: Antialiasing;\n };\n\n export type ShapePainterObjectData = ObjectData & ShapePainterObjectDataType;\n\n /**\n * The ShapePainterRuntimeObject allows to draw graphics shapes on screen.\n */\n export class ShapePainterRuntimeObject\n extends gdjs.RuntimeObject\n implements gdjs.Resizable, gdjs.Scalable, gdjs.Flippable {\n _scaleX: number = 1;\n _scaleY: number = 1;\n _blendMode: number = 0;\n _flippedX: boolean = false;\n _flippedY: boolean = false;\n _customCenter: FloatPoint | null = null;\n _customCollisionMask: Polygon[] | null = null;\n\n _fillColor: integer;\n _outlineColor: integer;\n _fillOpacity: float;\n _outlineOpacity: float;\n _outlineSize: float;\n _useAbsoluteCoordinates: boolean;\n _clearBetweenFrames: boolean;\n _antialiasing: Antialiasing;\n _renderer: gdjs.ShapePainterRuntimeObjectRenderer;\n\n private static readonly _pointForTransformation: FloatPoint = [0, 0];\n\n /**\n * @param instanceContainer The container the object belongs to.\n * @param shapePainterObjectData The initial properties of the object\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n shapePainterObjectData: ShapePainterObjectData\n ) {\n super(instanceContainer, shapePainterObjectData);\n this._fillColor = parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.fillColor.r,\n shapePainterObjectData.fillColor.g,\n shapePainterObjectData.fillColor.b\n ),\n 16\n );\n this._outlineColor = parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.outlineColor.r,\n shapePainterObjectData.outlineColor.g,\n shapePainterObjectData.outlineColor.b\n ),\n 16\n );\n this._fillOpacity = shapePainterObjectData.fillOpacity;\n this._outlineOpacity = shapePainterObjectData.outlineOpacity;\n this._outlineSize = shapePainterObjectData.outlineSize;\n this._useAbsoluteCoordinates = shapePainterObjectData.absoluteCoordinates;\n this._clearBetweenFrames = shapePainterObjectData.clearBetweenFrames;\n this._antialiasing = shapePainterObjectData.antialiasing;\n this._renderer = new gdjs.ShapePainterRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n getRendererObject() {\n return this._renderer.getRendererObject();\n }\n\n updateFromObjectData(\n oldObjectData: ShapePainterObjectData,\n newObjectData: ShapePainterObjectData\n ): boolean {\n if (\n oldObjectData.fillColor.r !== newObjectData.fillColor.r ||\n oldObjectData.fillColor.g !== newObjectData.fillColor.g ||\n oldObjectData.fillColor.b !== newObjectData.fillColor.b\n ) {\n this.setFillColor(\n '' +\n newObjectData.fillColor.r +\n ';' +\n newObjectData.fillColor.g +\n ';' +\n newObjectData.fillColor.b\n );\n }\n if (\n oldObjectData.outlineColor.r !== newObjectData.outlineColor.r ||\n oldObjectData.outlineColor.g !== newObjectData.outlineColor.g ||\n oldObjectData.outlineColor.b !== newObjectData.outlineColor.b\n ) {\n this.setOutlineColor(\n '' +\n newObjectData.outlineColor.r +\n ';' +\n newObjectData.outlineColor.g +\n ';' +\n newObjectData.outlineColor.b\n );\n }\n if (oldObjectData.fillOpacity !== newObjectData.fillOpacity) {\n this.setFillOpacity(newObjectData.fillOpacity);\n }\n if (oldObjectData.outlineOpacity !== newObjectData.outlineOpacity) {\n this.setOutlineOpacity(newObjectData.outlineOpacity);\n }\n if (oldObjectData.outlineSize !== newObjectData.outlineSize) {\n this.setOutlineSize(newObjectData.outlineSize);\n }\n if (\n oldObjectData.absoluteCoordinates !== newObjectData.absoluteCoordinates\n ) {\n this._useAbsoluteCoordinates = newObjectData.absoluteCoordinates;\n this._renderer.updatePositionX();\n this._renderer.updatePositionY();\n this._renderer.updateAngle();\n this._renderer.updateScaleX();\n this._renderer.updateScaleY();\n }\n if (\n oldObjectData.clearBetweenFrames !== newObjectData.clearBetweenFrames\n ) {\n this._clearBetweenFrames = newObjectData.clearBetweenFrames;\n }\n return true;\n }\n\n stepBehaviorsPreEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {\n //We redefine stepBehaviorsPreEvents just to clear the graphics before running events.\n if (this._clearBetweenFrames) {\n this.clear();\n }\n super.stepBehaviorsPreEvents(instanceContainer);\n }\n\n onDestroyed(): void {\n super.onDestroyed();\n this._renderer.destroy();\n }\n\n /**\n * Clear the graphics.\n */\n clear() {\n this._renderer.clear();\n }\n\n getVisibilityAABB() {\n return this._useAbsoluteCoordinates ? null : this.getAABB();\n }\n\n drawRectangle(x1: float, y1: float, x2: float, y2: float) {\n this._renderer.drawRectangle(x1, y1, x2, y2);\n }\n\n drawCircle(x: float, y: float, radius: float) {\n this._renderer.drawCircle(x, y, radius);\n }\n\n drawLine(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._renderer.drawLine(x1, y1, x2, y2, thickness);\n }\n\n drawLineV2(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._renderer.drawLineV2(x1, y1, x2, y2, thickness);\n }\n\n drawEllipse(centerX: float, centerY: float, width: float, height: float) {\n this._renderer.drawEllipse(centerX, centerY, width, height);\n }\n\n drawRoundedRectangle(\n startX1: float,\n startY1: float,\n endX2: float,\n endY2: float,\n radius: float\n ) {\n this._renderer.drawRoundedRectangle(\n startX1,\n startY1,\n endX2,\n endY2,\n radius\n );\n }\n\n drawChamferRectangle(\n startX1: float,\n startY1: float,\n endX2: float,\n endY2: float,\n chamfer: float\n ) {\n this._renderer.drawChamferRectangle(\n startX1,\n startY1,\n endX2,\n endY2,\n chamfer\n );\n }\n\n drawTorus(\n centerX: float,\n centerY: float,\n innerRadius: float,\n outerRadius: float,\n startArc: float,\n endArc: float\n ) {\n this._renderer.drawTorus(\n centerX,\n centerY,\n innerRadius,\n outerRadius,\n startArc,\n endArc\n );\n }\n\n drawRegularPolygon(\n centerX: float,\n centerY: float,\n sides: float,\n radius: float,\n rotation: float\n ) {\n this._renderer.drawRegularPolygon(\n centerX,\n centerY,\n sides,\n radius,\n rotation\n );\n }\n\n drawStar(\n centerX: float,\n centerY: float,\n points: float,\n radius: float,\n innerRadius: float,\n rotation: float\n ) {\n this._renderer.drawStar(\n centerX,\n centerY,\n points,\n radius,\n innerRadius,\n rotation\n );\n }\n\n drawArc(\n centerX: float,\n centerY: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean,\n closePath: boolean\n ) {\n this._renderer.drawArc(\n centerX,\n centerY,\n radius,\n startAngle,\n endAngle,\n anticlockwise,\n closePath\n );\n }\n\n drawBezierCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n x2: float,\n y2: float\n ) {\n this._renderer.drawBezierCurve(x1, y1, cpX, cpY, cpX2, cpY2, x2, y2);\n }\n\n drawQuadraticCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n x2: float,\n y2: float\n ) {\n this._renderer.drawQuadraticCurve(x1, y1, cpX, cpY, x2, y2);\n }\n\n beginFillPath(x1: float, y1: float) {\n this._renderer.beginFillPath();\n this._renderer.drawPathMoveTo(x1, y1);\n }\n\n endFillPath() {\n this._renderer.endFillPath();\n }\n\n drawPathMoveTo(x1: float, y1: float) {\n this._renderer.drawPathMoveTo(x1, y1);\n }\n\n drawPathLineTo(x1: float, y1: float) {\n this._renderer.drawPathLineTo(x1, y1);\n }\n\n drawPathBezierCurveTo(\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n toX: float,\n toY: float\n ) {\n this._renderer.drawPathBezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY);\n }\n\n drawPathArc(\n cx: float,\n cy: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean\n ) {\n this._renderer.drawPathArc(\n cx,\n cy,\n radius,\n startAngle,\n endAngle,\n anticlockwise\n );\n }\n\n drawPathQuadraticCurveTo(cpX: float, cpY: float, toX: float, toY: float) {\n this._renderer.drawPathQuadraticCurveTo(cpX, cpY, toX, toY);\n }\n\n closePath() {\n this._renderer.closePath();\n }\n\n setClearBetweenFrames(value: boolean): void {\n this._clearBetweenFrames = value;\n }\n\n isClearedBetweenFrames(): boolean {\n return this._clearBetweenFrames;\n }\n\n setAntialiasing(value: Antialiasing): void {\n this._antialiasing = value;\n this._renderer.updateAntialiasing();\n }\n\n getAntialiasing(): Antialiasing {\n return this._antialiasing;\n }\n\n checkAntialiasing(valueToCompare: Antialiasing): boolean {\n return this._antialiasing === valueToCompare;\n }\n\n setCoordinatesRelative(value: boolean): void {\n this._useAbsoluteCoordinates = !value;\n }\n\n areCoordinatesRelative(): boolean {\n return !this._useAbsoluteCoordinates;\n }\n\n /**\n *\n * @param rgbColor semicolon separated decimal values\n */\n setFillColor(rgbColor: string): void {\n const colors = rgbColor.split(';');\n if (colors.length < 3) {\n return;\n }\n this._fillColor = parseInt(\n gdjs.rgbToHex(\n parseInt(colors[0], 10),\n parseInt(colors[1], 10),\n parseInt(colors[2], 10)\n ),\n 16\n );\n }\n\n getFillColorR(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).r;\n }\n getFillColorG(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).g;\n }\n getFillColorB(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).b;\n }\n\n /**\n *\n * @param rgbColor semicolon separated decimal values\n */\n setOutlineColor(rgbColor: string): void {\n const colors = rgbColor.split(';');\n if (colors.length < 3) {\n return;\n }\n this._outlineColor = parseInt(\n gdjs.rgbToHex(\n parseInt(colors[0], 10),\n parseInt(colors[1], 10),\n parseInt(colors[2], 10)\n ),\n 16\n );\n this._renderer.updateOutline();\n }\n\n getOutlineColorR(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).r;\n }\n getOutlineColorG(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).g;\n }\n getOutlineColorB(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).b;\n }\n\n setOutlineSize(size: float): void {\n this._outlineSize = size;\n this._renderer.updateOutline();\n }\n\n getOutlineSize() {\n return this._outlineSize;\n }\n\n /**\n *\n * @param opacity from 0 to 255\n */\n setFillOpacity(opacity: float): void {\n this._fillOpacity = opacity;\n }\n\n /**\n *\n * @returns an opacity value from 0 to 255.\n */\n getFillOpacity() {\n return this._fillOpacity;\n }\n\n /**\n *\n * @param opacity from 0 to 255\n */\n setOutlineOpacity(opacity: float): void {\n this._outlineOpacity = opacity;\n this._renderer.updateOutline();\n }\n\n /**\n *\n * @returns an opacity value from 0 to 255.\n */\n getOutlineOpacity() {\n return this._outlineOpacity;\n }\n\n setX(x: float): void {\n if (x === this.x) {\n return;\n }\n super.setX(x);\n this._renderer.updatePositionX();\n }\n\n setY(y: float): void {\n if (y === this.y) {\n return;\n }\n super.setY(y);\n this._renderer.updatePositionY();\n }\n\n setAngle(angle: float): void {\n if (angle === this.angle) {\n return;\n }\n super.setAngle(angle);\n this._renderer.updateAngle();\n this.invalidateHitboxes();\n }\n\n /**\n * The center of rotation is defined relatively\n * to the drawing origin (the object position).\n * This avoids the center to move on the drawing\n * when new shapes push the bounds.\n *\n * When no custom center is defined, it will move\n * to stay at the center of the drawable bounds.\n *\n * @param x coordinate of the custom center\n * @param y coordinate of the custom center\n */\n setRotationCenter(x: float, y: float): void {\n if (!this._customCenter) {\n this._customCenter = [0, 0];\n }\n this._customCenter[0] = x;\n this._customCenter[1] = y;\n this._renderer.updateRotationCenter();\n }\n\n /**\n * @returns The center X relatively to the drawing origin\n * (whereas `getCenterX()` is relative to the top left drawable bound and scaled).\n */\n getRotationCenterX(): float {\n return this._customCenter\n ? this._customCenter[0]\n : this._renderer.getUnscaledWidth() / 2 -\n this._renderer.getFrameRelativeOriginX();\n }\n\n /**\n * @returns The center Y relatively to the drawing origin\n * (whereas `getCenterY()` is relative to the top left drawable bound and scaled).\n */\n getRotationCenterY(): float {\n return this._customCenter\n ? this._customCenter[1]\n : this._renderer.getUnscaledHeight() / 2 -\n this._renderer.getFrameRelativeOriginY();\n }\n\n getCenterX(): float {\n if (!this._customCenter) {\n return super.getCenterX();\n }\n return (\n this._customCenter[0] * Math.abs(this._scaleX) +\n this.getX() -\n this.getDrawableX()\n );\n }\n\n getCenterY(): float {\n if (!this._customCenter) {\n return super.getCenterY();\n }\n return (\n this._customCenter[1] * Math.abs(this._scaleY) +\n this.getY() -\n this.getDrawableY()\n );\n }\n\n setWidth(newWidth: float): void {\n const unscaledWidth = this._renderer.getUnscaledWidth();\n if (unscaledWidth !== 0) {\n this.setScaleX(newWidth / unscaledWidth);\n }\n }\n\n setHeight(newHeight: float): void {\n const unscaledHeight = this._renderer.getUnscaledHeight();\n if (unscaledHeight !== 0) {\n this.setScaleY(newHeight / unscaledHeight);\n }\n }\n\n setSize(newWidth: float, newHeight: float): void {\n this.setWidth(newWidth);\n this.setHeight(newHeight);\n }\n\n /**\n * Change the scale on X and Y axis of the object.\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScale(newScale: float): void {\n this.setScaleX(newScale);\n this.setScaleY(newScale);\n }\n\n /**\n * Change the scale on X axis of the object (changing its width).\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScaleX(newScale: float): void {\n if (newScale < 0) {\n newScale = 0;\n }\n if (newScale === Math.abs(this._scaleX)) {\n return;\n }\n this._scaleX = newScale * (this._flippedX ? -1 : 1);\n this._renderer.updateScaleX();\n this.invalidateHitboxes();\n }\n\n /**\n * Change the scale on Y axis of the object (changing its width).\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScaleY(newScale: float): void {\n if (newScale < 0) {\n newScale = 0;\n }\n if (newScale === Math.abs(this._scaleY)) {\n return;\n }\n this._scaleY = newScale * (this._flippedY ? -1 : 1);\n this._renderer.updateScaleY();\n this.invalidateHitboxes();\n }\n\n flipX(enable: boolean): void {\n if (enable !== this._flippedX) {\n this._scaleX *= -1;\n this._flippedX = enable;\n this._renderer.updateScaleX();\n this.invalidateHitboxes();\n }\n }\n\n flipY(enable: boolean): void {\n if (enable !== this._flippedY) {\n this._scaleY *= -1;\n this._flippedY = enable;\n this._renderer.updateScaleY();\n this.invalidateHitboxes();\n }\n }\n\n isFlippedX(): boolean {\n return this._flippedX;\n }\n\n isFlippedY(): boolean {\n return this._flippedY;\n }\n\n /**\n * Get the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n */\n getScale(): number {\n const scaleX = Math.abs(this._scaleX);\n const scaleY = Math.abs(this._scaleY);\n return scaleX === scaleY ? scaleX : Math.sqrt(scaleX * scaleY);\n }\n\n /**\n * Get the scale of the object on Y axis.\n *\n * @return the scale of the object on Y axis\n */\n getScaleY(): float {\n return Math.abs(this._scaleY);\n }\n\n /**\n * Get the scale of the object on X axis.\n *\n * @return the scale of the object on X axis\n */\n getScaleX(): float {\n return Math.abs(this._scaleX);\n }\n\n invalidateBounds() {\n this.invalidateHitboxes();\n }\n\n getDrawableX(): float {\n return this._renderer.getDrawableX();\n }\n\n getDrawableY(): float {\n return this._renderer.getDrawableY();\n }\n\n getWidth(): float {\n return this._renderer.getWidth();\n }\n\n getHeight(): float {\n return this._renderer.getHeight();\n }\n\n updatePreRender(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n this._renderer.updatePreRender();\n }\n\n transformToDrawing(x: float, y: float) {\n const point = ShapePainterRuntimeObject._pointForTransformation;\n point[0] = x;\n point[1] = y;\n return this._renderer.transformToDrawing(point);\n }\n\n transformToScene(x: float, y: float) {\n const point = ShapePainterRuntimeObject._pointForTransformation;\n point[0] = x;\n point[1] = y;\n return this._renderer.transformToScene(point);\n }\n\n transformToDrawingX(x: float, y: float) {\n return this.transformToDrawing(x, y)[0];\n }\n\n transformToDrawingY(x: float, y: float) {\n return this.transformToDrawing(x, y)[1];\n }\n\n transformToSceneX(x: float, y: float) {\n return this.transformToScene(x, y)[0];\n }\n\n transformToSceneY(x: float, y: float) {\n return this.transformToScene(x, y)[1];\n }\n\n setRectangularCollisionMask(\n left: float,\n top: float,\n right: float,\n bottom: float\n ) {\n if (!this._customCollisionMask) {\n const rectangle = new gdjs.Polygon();\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n this._customCollisionMask = [rectangle];\n }\n const rectangle = this._customCollisionMask[0].vertices;\n\n rectangle[0][0] = left;\n rectangle[0][1] = top;\n\n rectangle[1][0] = right;\n rectangle[1][1] = top;\n\n rectangle[2][0] = right;\n rectangle[2][1] = bottom;\n\n rectangle[3][0] = left;\n rectangle[3][1] = bottom;\n\n this.invalidateHitboxes();\n }\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 const vertices = this.hitBoxes[0].vertices;\n if (this._customCollisionMask) {\n const customCollisionMaskVertices = this._customCollisionMask[0]\n .vertices;\n for (let i = 0; i < 4; i++) {\n const point = this.transformToScene(\n customCollisionMaskVertices[i][0],\n customCollisionMaskVertices[i][1]\n );\n vertices[i][0] = point[0];\n vertices[i][1] = point[1];\n }\n } else {\n if (centerX === width / 2 && centerY === height / 2) {\n vertices[0][0] = -centerX;\n vertices[0][1] = -centerY;\n vertices[1][0] = +centerX;\n vertices[1][1] = -centerY;\n vertices[2][0] = +centerX;\n vertices[2][1] = +centerY;\n vertices[3][0] = -centerX;\n vertices[3][1] = +centerY;\n } else {\n vertices[0][0] = 0 - centerX;\n vertices[0][1] = 0 - centerY;\n vertices[1][0] = width - centerX;\n vertices[1][1] = 0 - centerY;\n vertices[2][0] = width - centerX;\n vertices[2][1] = height - centerY;\n vertices[3][0] = 0 - centerX;\n vertices[3][1] = height - centerY;\n }\n if (!this._useAbsoluteCoordinates) {\n this.hitBoxes[0].rotate(gdjs.toRad(this.getAngle()));\n }\n this.hitBoxes[0].move(\n this.getDrawableX() + centerX,\n this.getDrawableY() + centerY\n );\n }\n }\n }\n gdjs.registerObject(\n 'PrimitiveDrawing::Drawer',\n gdjs.ShapePainterRuntimeObject\n );\n ShapePainterRuntimeObject.supportsReinitialization = false;\n}\n"],
|
|
5
|
-
"mappings": "AAIA,GAAU,MAAV,UAAU,EAAV,CAsCS,qBACG,GAAK,aAC4C,CAyBzD,YACE,EACA,EACA,CACA,MAAM,EAAmB,GA5B3B,aAAkB,EAClB,aAAkB,EAClB,gBAAqB,EACrB,eAAqB,GACrB,eAAqB,GACrB,mBAAmC,KACnC,0BAAyC,KAuBvC,KAAK,WAAa,SAChB,EAAK,SACH,EAAuB,UAAU,EACjC,EAAuB,UAAU,EACjC,EAAuB,UAAU,GAEnC,IAEF,KAAK,cAAgB,SACnB,EAAK,SACH,EAAuB,aAAa,EACpC,EAAuB,aAAa,EACpC,EAAuB,aAAa,GAEtC,IAEF,KAAK,aAAe,EAAuB,YAC3C,KAAK,gBAAkB,EAAuB,eAC9C,KAAK,aAAe,EAAuB,YAC3C,KAAK,wBAA0B,EAAuB,oBACtD,KAAK,oBAAsB,EAAuB,mBAClD,KAAK,cAAgB,EAAuB,aAC5C,KAAK,UAAY,GAAI,GAAK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AW,EAAkB,CACrE,KAAK,UAAU,SAAS,EAAI,EAAI,EAAI,EAAI,GAG1C,WAAW,EAAW,EAAW,EAAW,EAAW,EAAkB,CACvE,KAAK,UAAU,WAAW,EAAI,EAAI,EAAI,EAAI,GAG5C,YAAY,EAAgB,EAAgB,EAAc,EAAe,CACvE,KAAK,UAAU,YAAY,EAAS,EAAS,EAAO,GAGtD,qBACE,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,qBACb,EACA,EACA,EACA,EACA,GAIJ,qBACE,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,qBACb,EACA,EACA,EACA,EACA,GAIJ,UACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,UACb,EACA,EACA,EACA,EACA,EACA,GAIJ,mBACE,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,mBACb,EACA,EACA,EACA,EACA,GAIJ,SACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,SACb,EACA,EACA,EACA,EACA,EACA,GAIJ,QACE,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,QACb,EACA,EACA,EACA,EACA,EACA,EACA,GAIJ,gBACE,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,gBAAgB,EAAI,EAAI,EAAK,EAAK,EAAM,EAAM,EAAI,GAGnE,mBACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,mBAAmB,EAAI,EAAI,EAAK,EAAK,EAAI,GAG1D,cAAc,EAAW,EAAW,CAClC,KAAK,UAAU,gBACf,KAAK,UAAU,eAAe,EAAI,GAGpC,aAAc,CACZ,KAAK,UAAU,cAGjB,eAAe,EAAW,EAAW,CACnC,KAAK,UAAU,eAAe,EAAI,GAGpC,eAAe,EAAW,EAAW,CACnC,KAAK,UAAU,eAAe,EAAI,GAGpC,sBACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,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G,IAAK,CAC1B,KAAM,GAAQ,KAAK,iBACjB,EAA4B,GAAG,GAC/B,EAA4B,GAAG,IAEjC,EAAS,GAAG,GAAK,EAAM,GACvB,EAAS,GAAG,GAAK,EAAM,QAGzB,AAAI,KAAY,EAAQ,GAAK,IAAY,EAAS,EAChD,GAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,GAElB,GAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAQ,EACzB,EAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAQ,EACzB,EAAS,GAAG,GAAK,EAAS,EAC1B,EAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAS,GAEvB,KAAK,yBACR,KAAK,SAAS,GAAG,OAAO,EAAK,MAAM,KAAK,aAE1C,KAAK,SAAS,GAAG,KACf,KAAK,eAAiB,EACtB,KAAK,eAAiB,
|
|
4
|
+
"sourcesContent": ["/*\n * GDevelop JS Platform\n * 2013 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n /** Represents a color in RGB Format */\n export type RGBColor = {\n /** The Red component of the color, from 0 to 255. */\n r: integer;\n /** The Green component of the color, from 0 to 255. */\n g: integer;\n /** The Blue component of the color, from 0 to 255. */\n b: integer;\n };\n\n export type Antialiasing = 'none' | 'low' | 'medium' | 'high';\n\n /** Initial properties for a for {@link gdjs.ShapePainterRuntimeObject}. */\n export type ShapePainterObjectDataType = {\n /** The color (in RGB format) of the inner part of the painted shape */\n fillColor: RGBColor;\n /** The color (in RGB format) of the outline of the painted shape */\n outlineColor: RGBColor;\n /** The opacity of the inner part of the painted shape, from 0 to 255 */\n fillOpacity: float;\n /** The opacity of the outline of the painted shape, from 0 to 255 */\n outlineOpacity: float;\n /** The size of the outline of the painted shape, in pixels. */\n outlineSize: float;\n /** Use absolute coordinates? */\n absoluteCoordinates: boolean;\n /** Clear the previous render before the next draw? */\n clearBetweenFrames: boolean;\n /** The type of anti-aliasing to apply at rendering. */\n antialiasing: Antialiasing;\n };\n\n export type ShapePainterObjectData = ObjectData & ShapePainterObjectDataType;\n\n /**\n * The ShapePainterRuntimeObject allows to draw graphics shapes on screen.\n */\n export class ShapePainterRuntimeObject\n extends gdjs.RuntimeObject\n implements gdjs.Resizable, gdjs.Scalable, gdjs.Flippable {\n _scaleX: number = 1;\n _scaleY: number = 1;\n _blendMode: number = 0;\n _flippedX: boolean = false;\n _flippedY: boolean = false;\n _customCenter: FloatPoint | null = null;\n _customCollisionMask: Polygon[] | null = null;\n\n _fillColor: integer;\n _outlineColor: integer;\n _fillOpacity: float;\n _outlineOpacity: float;\n _outlineSize: float;\n _useAbsoluteCoordinates: boolean;\n _clearBetweenFrames: boolean;\n _antialiasing: Antialiasing;\n _renderer: gdjs.ShapePainterRuntimeObjectRenderer;\n\n private static readonly _pointForTransformation: FloatPoint = [0, 0];\n\n /**\n * @param instanceContainer The container the object belongs to.\n * @param shapePainterObjectData The initial properties of the object\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n shapePainterObjectData: ShapePainterObjectData\n ) {\n super(instanceContainer, shapePainterObjectData);\n this._fillColor = parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.fillColor.r,\n shapePainterObjectData.fillColor.g,\n shapePainterObjectData.fillColor.b\n ),\n 16\n );\n this._outlineColor = parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.outlineColor.r,\n shapePainterObjectData.outlineColor.g,\n shapePainterObjectData.outlineColor.b\n ),\n 16\n );\n this._fillOpacity = shapePainterObjectData.fillOpacity;\n this._outlineOpacity = shapePainterObjectData.outlineOpacity;\n this._outlineSize = shapePainterObjectData.outlineSize;\n this._useAbsoluteCoordinates = shapePainterObjectData.absoluteCoordinates;\n this._clearBetweenFrames = shapePainterObjectData.clearBetweenFrames;\n this._antialiasing = shapePainterObjectData.antialiasing;\n this._renderer = new gdjs.ShapePainterRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n getRendererObject() {\n return this._renderer.getRendererObject();\n }\n\n updateFromObjectData(\n oldObjectData: ShapePainterObjectData,\n newObjectData: ShapePainterObjectData\n ): boolean {\n if (\n oldObjectData.fillColor.r !== newObjectData.fillColor.r ||\n oldObjectData.fillColor.g !== newObjectData.fillColor.g ||\n oldObjectData.fillColor.b !== newObjectData.fillColor.b\n ) {\n this.setFillColor(\n '' +\n newObjectData.fillColor.r +\n ';' +\n newObjectData.fillColor.g +\n ';' +\n newObjectData.fillColor.b\n );\n }\n if (\n oldObjectData.outlineColor.r !== newObjectData.outlineColor.r ||\n oldObjectData.outlineColor.g !== newObjectData.outlineColor.g ||\n oldObjectData.outlineColor.b !== newObjectData.outlineColor.b\n ) {\n this.setOutlineColor(\n '' +\n newObjectData.outlineColor.r +\n ';' +\n newObjectData.outlineColor.g +\n ';' +\n newObjectData.outlineColor.b\n );\n }\n if (oldObjectData.fillOpacity !== newObjectData.fillOpacity) {\n this.setFillOpacity(newObjectData.fillOpacity);\n }\n if (oldObjectData.outlineOpacity !== newObjectData.outlineOpacity) {\n this.setOutlineOpacity(newObjectData.outlineOpacity);\n }\n if (oldObjectData.outlineSize !== newObjectData.outlineSize) {\n this.setOutlineSize(newObjectData.outlineSize);\n }\n if (\n oldObjectData.absoluteCoordinates !== newObjectData.absoluteCoordinates\n ) {\n this._useAbsoluteCoordinates = newObjectData.absoluteCoordinates;\n this._renderer.updatePositionX();\n this._renderer.updatePositionY();\n this._renderer.updateAngle();\n this._renderer.updateScaleX();\n this._renderer.updateScaleY();\n }\n if (\n oldObjectData.clearBetweenFrames !== newObjectData.clearBetweenFrames\n ) {\n this._clearBetweenFrames = newObjectData.clearBetweenFrames;\n }\n return true;\n }\n\n stepBehaviorsPreEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {\n //We redefine stepBehaviorsPreEvents just to clear the graphics before running events.\n if (this._clearBetweenFrames) {\n this.clear();\n }\n super.stepBehaviorsPreEvents(instanceContainer);\n }\n\n onDestroyed(): void {\n super.onDestroyed();\n this._renderer.destroy();\n }\n\n /**\n * Clear the graphics.\n */\n clear() {\n this._renderer.clear();\n }\n\n getVisibilityAABB() {\n return this._useAbsoluteCoordinates ? null : this.getAABB();\n }\n\n drawRectangle(x1: float, y1: float, x2: float, y2: float) {\n this._renderer.drawRectangle(x1, y1, x2, y2);\n }\n\n drawCircle(x: float, y: float, radius: float) {\n this._renderer.drawCircle(x, y, radius);\n }\n\n drawLine(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._renderer.drawLine(x1, y1, x2, y2, thickness);\n }\n\n drawLineV2(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._renderer.drawLineV2(x1, y1, x2, y2, thickness);\n }\n\n drawEllipse(centerX: float, centerY: float, width: float, height: float) {\n this._renderer.drawEllipse(centerX, centerY, width, height);\n }\n\n drawFilletRectangle(\n startX1: float,\n startY1: float,\n endX2: float,\n endY2: float,\n fillet: float\n ) {\n this._renderer.drawFilletRectangle(\n startX1,\n startY1,\n endX2,\n endY2,\n fillet\n );\n }\n\n drawRoundedRectangle(\n startX1: float,\n startY1: float,\n endX2: float,\n endY2: float,\n radius: float\n ) {\n this._renderer.drawRoundedRectangle(\n startX1,\n startY1,\n endX2,\n endY2,\n radius\n );\n }\n\n drawChamferRectangle(\n startX1: float,\n startY1: float,\n endX2: float,\n endY2: float,\n chamfer: float\n ) {\n this._renderer.drawChamferRectangle(\n startX1,\n startY1,\n endX2,\n endY2,\n chamfer\n );\n }\n\n drawTorus(\n centerX: float,\n centerY: float,\n innerRadius: float,\n outerRadius: float,\n startArc: float,\n endArc: float\n ) {\n this._renderer.drawTorus(\n centerX,\n centerY,\n innerRadius,\n outerRadius,\n startArc,\n endArc\n );\n }\n\n drawRegularPolygon(\n centerX: float,\n centerY: float,\n sides: float,\n radius: float,\n rotation: float\n ) {\n this._renderer.drawRegularPolygon(\n centerX,\n centerY,\n sides,\n radius,\n rotation\n );\n }\n\n drawStar(\n centerX: float,\n centerY: float,\n points: float,\n radius: float,\n innerRadius: float,\n rotation: float\n ) {\n this._renderer.drawStar(\n centerX,\n centerY,\n points,\n radius,\n innerRadius,\n rotation\n );\n }\n\n drawArc(\n centerX: float,\n centerY: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean,\n closePath: boolean\n ) {\n this._renderer.drawArc(\n centerX,\n centerY,\n radius,\n startAngle,\n endAngle,\n anticlockwise,\n closePath\n );\n }\n\n drawBezierCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n x2: float,\n y2: float\n ) {\n this._renderer.drawBezierCurve(x1, y1, cpX, cpY, cpX2, cpY2, x2, y2);\n }\n\n drawQuadraticCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n x2: float,\n y2: float\n ) {\n this._renderer.drawQuadraticCurve(x1, y1, cpX, cpY, x2, y2);\n }\n\n beginFillPath(x1: float, y1: float) {\n this._renderer.beginFillPath();\n this._renderer.drawPathMoveTo(x1, y1);\n }\n\n endFillPath() {\n this._renderer.endFillPath();\n }\n\n drawPathMoveTo(x1: float, y1: float) {\n this._renderer.drawPathMoveTo(x1, y1);\n }\n\n drawPathLineTo(x1: float, y1: float) {\n this._renderer.drawPathLineTo(x1, y1);\n }\n\n drawPathBezierCurveTo(\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n toX: float,\n toY: float\n ) {\n this._renderer.drawPathBezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY);\n }\n\n drawPathArc(\n cx: float,\n cy: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean\n ) {\n this._renderer.drawPathArc(\n cx,\n cy,\n radius,\n startAngle,\n endAngle,\n anticlockwise\n );\n }\n\n drawPathQuadraticCurveTo(cpX: float, cpY: float, toX: float, toY: float) {\n this._renderer.drawPathQuadraticCurveTo(cpX, cpY, toX, toY);\n }\n\n closePath() {\n this._renderer.closePath();\n }\n\n setClearBetweenFrames(value: boolean): void {\n this._clearBetweenFrames = value;\n }\n\n isClearedBetweenFrames(): boolean {\n return this._clearBetweenFrames;\n }\n\n setAntialiasing(value: Antialiasing): void {\n this._antialiasing = value;\n this._renderer.updateAntialiasing();\n }\n\n getAntialiasing(): Antialiasing {\n return this._antialiasing;\n }\n\n checkAntialiasing(valueToCompare: Antialiasing): boolean {\n return this._antialiasing === valueToCompare;\n }\n\n setCoordinatesRelative(value: boolean): void {\n this._useAbsoluteCoordinates = !value;\n }\n\n areCoordinatesRelative(): boolean {\n return !this._useAbsoluteCoordinates;\n }\n\n /**\n *\n * @param rgbColor semicolon separated decimal values\n */\n setFillColor(rgbColor: string): void {\n const colors = rgbColor.split(';');\n if (colors.length < 3) {\n return;\n }\n this._fillColor = parseInt(\n gdjs.rgbToHex(\n parseInt(colors[0], 10),\n parseInt(colors[1], 10),\n parseInt(colors[2], 10)\n ),\n 16\n );\n }\n\n getFillColorR(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).r;\n }\n getFillColorG(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).g;\n }\n getFillColorB(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).b;\n }\n\n /**\n *\n * @param rgbColor semicolon separated decimal values\n */\n setOutlineColor(rgbColor: string): void {\n const colors = rgbColor.split(';');\n if (colors.length < 3) {\n return;\n }\n this._outlineColor = parseInt(\n gdjs.rgbToHex(\n parseInt(colors[0], 10),\n parseInt(colors[1], 10),\n parseInt(colors[2], 10)\n ),\n 16\n );\n this._renderer.updateOutline();\n }\n\n getOutlineColorR(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).r;\n }\n getOutlineColorG(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).g;\n }\n getOutlineColorB(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).b;\n }\n\n setOutlineSize(size: float): void {\n this._outlineSize = size;\n this._renderer.updateOutline();\n }\n\n getOutlineSize() {\n return this._outlineSize;\n }\n\n /**\n *\n * @param opacity from 0 to 255\n */\n setFillOpacity(opacity: float): void {\n this._fillOpacity = opacity;\n }\n\n /**\n *\n * @returns an opacity value from 0 to 255.\n */\n getFillOpacity() {\n return this._fillOpacity;\n }\n\n /**\n *\n * @param opacity from 0 to 255\n */\n setOutlineOpacity(opacity: float): void {\n this._outlineOpacity = opacity;\n this._renderer.updateOutline();\n }\n\n /**\n *\n * @returns an opacity value from 0 to 255.\n */\n getOutlineOpacity() {\n return this._outlineOpacity;\n }\n\n setX(x: float): void {\n if (x === this.x) {\n return;\n }\n super.setX(x);\n this._renderer.updatePositionX();\n }\n\n setY(y: float): void {\n if (y === this.y) {\n return;\n }\n super.setY(y);\n this._renderer.updatePositionY();\n }\n\n setAngle(angle: float): void {\n if (angle === this.angle) {\n return;\n }\n super.setAngle(angle);\n this._renderer.updateAngle();\n this.invalidateHitboxes();\n }\n\n /**\n * The center of rotation is defined relatively\n * to the drawing origin (the object position).\n * This avoids the center to move on the drawing\n * when new shapes push the bounds.\n *\n * When no custom center is defined, it will move\n * to stay at the center of the drawable bounds.\n *\n * @param x coordinate of the custom center\n * @param y coordinate of the custom center\n */\n setRotationCenter(x: float, y: float): void {\n if (!this._customCenter) {\n this._customCenter = [0, 0];\n }\n this._customCenter[0] = x;\n this._customCenter[1] = y;\n this._renderer.updateRotationCenter();\n }\n\n /**\n * @returns The center X relatively to the drawing origin\n * (whereas `getCenterX()` is relative to the top left drawable bound and scaled).\n */\n getRotationCenterX(): float {\n return this._customCenter\n ? this._customCenter[0]\n : this._renderer.getUnscaledWidth() / 2 -\n this._renderer.getFrameRelativeOriginX();\n }\n\n /**\n * @returns The center Y relatively to the drawing origin\n * (whereas `getCenterY()` is relative to the top left drawable bound and scaled).\n */\n getRotationCenterY(): float {\n return this._customCenter\n ? this._customCenter[1]\n : this._renderer.getUnscaledHeight() / 2 -\n this._renderer.getFrameRelativeOriginY();\n }\n\n getCenterX(): float {\n if (!this._customCenter) {\n return super.getCenterX();\n }\n return (\n this._customCenter[0] * Math.abs(this._scaleX) +\n this.getX() -\n this.getDrawableX()\n );\n }\n\n getCenterY(): float {\n if (!this._customCenter) {\n return super.getCenterY();\n }\n return (\n this._customCenter[1] * Math.abs(this._scaleY) +\n this.getY() -\n this.getDrawableY()\n );\n }\n\n setWidth(newWidth: float): void {\n const unscaledWidth = this._renderer.getUnscaledWidth();\n if (unscaledWidth !== 0) {\n this.setScaleX(newWidth / unscaledWidth);\n }\n }\n\n setHeight(newHeight: float): void {\n const unscaledHeight = this._renderer.getUnscaledHeight();\n if (unscaledHeight !== 0) {\n this.setScaleY(newHeight / unscaledHeight);\n }\n }\n\n setSize(newWidth: float, newHeight: float): void {\n this.setWidth(newWidth);\n this.setHeight(newHeight);\n }\n\n /**\n * Change the scale on X and Y axis of the object.\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScale(newScale: float): void {\n this.setScaleX(newScale);\n this.setScaleY(newScale);\n }\n\n /**\n * Change the scale on X axis of the object (changing its width).\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScaleX(newScale: float): void {\n if (newScale < 0) {\n newScale = 0;\n }\n if (newScale === Math.abs(this._scaleX)) {\n return;\n }\n this._scaleX = newScale * (this._flippedX ? -1 : 1);\n this._renderer.updateScaleX();\n this.invalidateHitboxes();\n }\n\n /**\n * Change the scale on Y axis of the object (changing its width).\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScaleY(newScale: float): void {\n if (newScale < 0) {\n newScale = 0;\n }\n if (newScale === Math.abs(this._scaleY)) {\n return;\n }\n this._scaleY = newScale * (this._flippedY ? -1 : 1);\n this._renderer.updateScaleY();\n this.invalidateHitboxes();\n }\n\n flipX(enable: boolean): void {\n if (enable !== this._flippedX) {\n this._scaleX *= -1;\n this._flippedX = enable;\n this._renderer.updateScaleX();\n this.invalidateHitboxes();\n }\n }\n\n flipY(enable: boolean): void {\n if (enable !== this._flippedY) {\n this._scaleY *= -1;\n this._flippedY = enable;\n this._renderer.updateScaleY();\n this.invalidateHitboxes();\n }\n }\n\n isFlippedX(): boolean {\n return this._flippedX;\n }\n\n isFlippedY(): boolean {\n return this._flippedY;\n }\n\n /**\n * Get the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n */\n getScale(): number {\n const scaleX = Math.abs(this._scaleX);\n const scaleY = Math.abs(this._scaleY);\n return scaleX === scaleY ? scaleX : Math.sqrt(scaleX * scaleY);\n }\n\n /**\n * Get the scale of the object on Y axis.\n *\n * @return the scale of the object on Y axis\n */\n getScaleY(): float {\n return Math.abs(this._scaleY);\n }\n\n /**\n * Get the scale of the object on X axis.\n *\n * @return the scale of the object on X axis\n */\n getScaleX(): float {\n return Math.abs(this._scaleX);\n }\n\n invalidateBounds() {\n this.invalidateHitboxes();\n }\n\n getDrawableX(): float {\n return this._renderer.getDrawableX();\n }\n\n getDrawableY(): float {\n return this._renderer.getDrawableY();\n }\n\n getWidth(): float {\n return this._renderer.getWidth();\n }\n\n getHeight(): float {\n return this._renderer.getHeight();\n }\n\n updatePreRender(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n this._renderer.updatePreRender();\n }\n\n transformToDrawing(x: float, y: float) {\n const point = ShapePainterRuntimeObject._pointForTransformation;\n point[0] = x;\n point[1] = y;\n return this._renderer.transformToDrawing(point);\n }\n\n transformToScene(x: float, y: float) {\n const point = ShapePainterRuntimeObject._pointForTransformation;\n point[0] = x;\n point[1] = y;\n return this._renderer.transformToScene(point);\n }\n\n transformToDrawingX(x: float, y: float) {\n return this.transformToDrawing(x, y)[0];\n }\n\n transformToDrawingY(x: float, y: float) {\n return this.transformToDrawing(x, y)[1];\n }\n\n transformToSceneX(x: float, y: float) {\n return this.transformToScene(x, y)[0];\n }\n\n transformToSceneY(x: float, y: float) {\n return this.transformToScene(x, y)[1];\n }\n\n setRectangularCollisionMask(\n left: float,\n top: float,\n right: float,\n bottom: float\n ) {\n if (!this._customCollisionMask) {\n const rectangle = new gdjs.Polygon();\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n this._customCollisionMask = [rectangle];\n }\n const rectangle = this._customCollisionMask[0].vertices;\n\n rectangle[0][0] = left;\n rectangle[0][1] = top;\n\n rectangle[1][0] = right;\n rectangle[1][1] = top;\n\n rectangle[2][0] = right;\n rectangle[2][1] = bottom;\n\n rectangle[3][0] = left;\n rectangle[3][1] = bottom;\n\n this.invalidateHitboxes();\n }\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 const vertices = this.hitBoxes[0].vertices;\n if (this._customCollisionMask) {\n const customCollisionMaskVertices = this._customCollisionMask[0]\n .vertices;\n for (let i = 0; i < 4; i++) {\n const point = this.transformToScene(\n customCollisionMaskVertices[i][0],\n customCollisionMaskVertices[i][1]\n );\n vertices[i][0] = point[0];\n vertices[i][1] = point[1];\n }\n } else {\n if (centerX === width / 2 && centerY === height / 2) {\n vertices[0][0] = -centerX;\n vertices[0][1] = -centerY;\n vertices[1][0] = +centerX;\n vertices[1][1] = -centerY;\n vertices[2][0] = +centerX;\n vertices[2][1] = +centerY;\n vertices[3][0] = -centerX;\n vertices[3][1] = +centerY;\n } else {\n vertices[0][0] = 0 - centerX;\n vertices[0][1] = 0 - centerY;\n vertices[1][0] = width - centerX;\n vertices[1][1] = 0 - centerY;\n vertices[2][0] = width - centerX;\n vertices[2][1] = height - centerY;\n vertices[3][0] = 0 - centerX;\n vertices[3][1] = height - centerY;\n }\n if (!this._useAbsoluteCoordinates) {\n this.hitBoxes[0].rotate(gdjs.toRad(this.getAngle()));\n }\n this.hitBoxes[0].move(\n this.getDrawableX() + centerX,\n this.getDrawableY() + centerY\n );\n }\n }\n }\n gdjs.registerObject(\n 'PrimitiveDrawing::Drawer',\n gdjs.ShapePainterRuntimeObject\n );\n ShapePainterRuntimeObject.supportsReinitialization = false;\n}\n"],
|
|
5
|
+
"mappings": "AAIA,GAAU,MAAV,UAAU,EAAV,CAsCS,qBACG,GAAK,aAC4C,CAyBzD,YACE,EACA,EACA,CACA,MAAM,EAAmB,GA5B3B,aAAkB,EAClB,aAAkB,EAClB,gBAAqB,EACrB,eAAqB,GACrB,eAAqB,GACrB,mBAAmC,KACnC,0BAAyC,KAuBvC,KAAK,WAAa,SAChB,EAAK,SACH,EAAuB,UAAU,EACjC,EAAuB,UAAU,EACjC,EAAuB,UAAU,GAEnC,IAEF,KAAK,cAAgB,SACnB,EAAK,SACH,EAAuB,aAAa,EACpC,EAAuB,aAAa,EACpC,EAAuB,aAAa,GAEtC,IAEF,KAAK,aAAe,EAAuB,YAC3C,KAAK,gBAAkB,EAAuB,eAC9C,KAAK,aAAe,EAAuB,YAC3C,KAAK,wBAA0B,EAAuB,oBACtD,KAAK,oBAAsB,EAAuB,mBAClD,KAAK,cAAgB,EAAuB,aAC5C,KAAK,UAAY,GAAI,GAAK,kCACxB,KACA,GAIF,KAAK,YAGP,mBAAoB,CAClB,MAAO,MAAK,UAAU,oBAGxB,qBACE,EACA,EACS,CACT,MACE,GAAc,UAAU,IAAM,EAAc,UAAU,GACtD,EAAc,UAAU,IAAM,EAAc,UAAU,GACtD,EAAc,UAAU,IAAM,EAAc,UAAU,IAEtD,KAAK,aACH,GACE,EAAc,UAAU,EACxB,IACA,EAAc,UAAU,EACxB,IACA,EAAc,UAAU,GAI5B,GAAc,aAAa,IAAM,EAAc,aAAa,GAC5D,EAAc,aAAa,IAAM,EAAc,aAAa,GAC5D,EAAc,aAAa,IAAM,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A,EACA,EACA,GAIJ,qBACE,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,qBACb,EACA,EACA,EACA,EACA,GAIJ,UACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,UACb,EACA,EACA,EACA,EACA,EACA,GAIJ,mBACE,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,mBACb,EACA,EACA,EACA,EACA,GAIJ,SACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,SACb,EACA,EACA,EACA,EACA,EACA,GAIJ,QACE,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,QACb,EACA,EACA,EACA,EACA,EACA,EACA,GAIJ,gBACE,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,gBAAgB,EAAI,EAAI,EAAK,EAAK,EAAM,EAAM,EAAI,GAGnE,mBACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,mBAAmB,EAAI,EAAI,EAAK,EAAK,EAAI,GAG1D,cAAc,EAAW,EAAW,CAClC,KAAK,UAAU,gBACf,KAAK,UAAU,eAAe,EAAI,GAGpC,aAAc,CACZ,KAAK,UAAU,cAGjB,eAAe,EAAW,EAAW,CACnC,KAAK,UAAU,eAAe,EAAI,GAGpC,eAAe,EAAW,EAAW,CACnC,KAAK,UAAU,eAAe,EAAI,GAGpC,sBACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,sBAAsB,EAAK,EAAK,EAAM,EAAM,EAAK,GAGlE,YACE,EACA,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,YACb,EACA,EACA,EACA,EACA,EACA,GAIJ,yBAAyB,EAAY,EAAY,EAAY,EAAY,CACvE,KAAK,UAAU,yBAAyB,EAAK,EAAK,EAAK,GAGzD,WAAY,CACV,KAAK,UAAU,YAGjB,sBAAsB,EAAsB,CAC1C,KAAK,oBAAsB,EAG7B,wBAAkC,C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,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,EAClB,EAAS,GAAG,GAAK,CAAC,GAElB,GAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAQ,EACzB,EAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAQ,EACzB,EAAS,GAAG,GAAK,EAAS,EAC1B,EAAS,GAAG,GAAK,EAAI,EACrB,EAAS,GAAG,GAAK,EAAS,GAEvB,KAAK,yBACR,KAAK,SAAS,GAAG,OAAO,EAAK,MAAM,KAAK,aAE1C,KAAK,SAAS,GAAG,KACf,KAAK,eAAiB,EACtB,KAAK,eAAiB,KAl0BvB,QAqBmB,AArBnB,EAqBmB,wBAAsC,CAAC,EAAG,GArB7D,EAAM,4BAu0Bb,EAAK,eACH,2BACA,EAAK,2BAEP,EAA0B,yBAA2B,KAj3B7C",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.5)
|
|
2
|
+
|
|
3
|
+
project(Shopify)
|
|
4
|
+
gd_add_extension_includes()
|
|
5
|
+
|
|
6
|
+
# Defines
|
|
7
|
+
#
|
|
8
|
+
gd_add_extension_definitions(Shopify)
|
|
9
|
+
|
|
10
|
+
# The targets
|
|
11
|
+
#
|
|
12
|
+
include_directories(.)
|
|
13
|
+
file(
|
|
14
|
+
GLOB
|
|
15
|
+
source_files
|
|
16
|
+
*.cpp
|
|
17
|
+
*.h)
|
|
18
|
+
gd_add_extension_target(
|
|
19
|
+
Shopify
|
|
20
|
+
"${source_files}"
|
|
21
|
+
"JsPlatform")
|
|
22
|
+
gd_add_clang_utils(Shopify "${source_files}")
|
|
23
|
+
|
|
24
|
+
# Linker files for the IDE extension
|
|
25
|
+
#
|
|
26
|
+
gd_extension_link_libraries(Shopify)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 2.6)
|
|
2
|
+
cmake_policy(SET CMP0015 NEW)
|
|
3
|
+
|
|
4
|
+
project(SpineObject)
|
|
5
|
+
gd_add_extension_includes()
|
|
6
|
+
|
|
7
|
+
#Defines
|
|
8
|
+
###
|
|
9
|
+
gd_add_extension_definitions(SpineObject)
|
|
10
|
+
|
|
11
|
+
#The targets
|
|
12
|
+
###
|
|
13
|
+
include_directories(.)
|
|
14
|
+
file(GLOB source_files *.cpp *.h)
|
|
15
|
+
gd_add_clang_utils(SpineObject "${source_files}")
|
|
16
|
+
gd_add_extension_target(SpineObject "${source_files}")
|
|
17
|
+
|
|
18
|
+
#Linker files for the IDE extension
|
|
19
|
+
###
|
|
20
|
+
gd_extension_link_libraries(SpineObject)
|
|
@@ -114,7 +114,6 @@ module.exports = {
|
|
|
114
114
|
|
|
115
115
|
constructor(
|
|
116
116
|
project,
|
|
117
|
-
layout,
|
|
118
117
|
instance,
|
|
119
118
|
associatedObjectConfiguration,
|
|
120
119
|
pixiContainer,
|
|
@@ -122,7 +121,6 @@ module.exports = {
|
|
|
122
121
|
) {
|
|
123
122
|
super(
|
|
124
123
|
project,
|
|
125
|
-
layout,
|
|
126
124
|
instance,
|
|
127
125
|
associatedObjectConfiguration,
|
|
128
126
|
pixiContainer,
|
|
@@ -148,6 +146,9 @@ module.exports = {
|
|
|
148
146
|
this._instance.getX(),
|
|
149
147
|
this._instance.getY()
|
|
150
148
|
);
|
|
149
|
+
this._pixiObject.rotation = RenderedInstance.toRad(
|
|
150
|
+
this._instance.getAngle()
|
|
151
|
+
);
|
|
151
152
|
|
|
152
153
|
this.setAnimation(this._instance.getRawDoubleProperty('animation'));
|
|
153
154
|
|
|
@@ -188,6 +189,14 @@ module.exports = {
|
|
|
188
189
|
return -this._spineOriginOffsetY;
|
|
189
190
|
}
|
|
190
191
|
|
|
192
|
+
getCenterX() {
|
|
193
|
+
return this.getOriginX();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
getCenterY() {
|
|
197
|
+
return this.getOriginY();
|
|
198
|
+
}
|
|
199
|
+
|
|
191
200
|
/**
|
|
192
201
|
* @param {number} index - animation index
|
|
193
202
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var gdjs;(function(
|
|
1
|
+
var gdjs;(function(d){const c=["atlas"];class g{constructor(e,s){this._loadedSpineAtlases=new d.ResourceCache;this._loadingSpineAtlases=new d.ResourceCache;this._resourceLoader=e,this._imageManager=s}getResourceKinds(){return c}async processResource(e){}async loadResource(e){await this.getOrLoad(e)}getOrLoad(e){const s=this._getAtlasResource(e);if(!s)return Promise.reject(`Unable to find atlas for resource '${e}'.`);let t=this._loadingSpineAtlases.get(s);return t||(t=new Promise((n,a)=>{const o=(i,r)=>{if(i)return a(`Error while preloading a spine atlas resource: ${i}`);if(!r)return a(`Cannot reach texture atlas for resource '${e}'.`);n(r)};this.load(s,o)}),this._loadingSpineAtlases.set(s,t)),t}load(e,s){const t=this._resourceLoader.getRuntimeGame(),n=t.getEmbeddedResourcesNames(e.name);if(!n.length)return s(new Error(`${e.name} do not have image metadata!`));const a=n.reduce((r,l)=>{const u=t.resolveEmbeddedResource(e.name,l);return r[l]=this._imageManager.getOrLoadPIXITexture(u),r},{}),o=r=>{this._loadedSpineAtlases.set(e,r),s(null,r)},i=this._resourceLoader.getFullUrl(e.file);PIXI.Assets.setPreferences({preferWorkers:!1,crossOrigin:this._resourceLoader.checkIfCredentialsRequired(i)?"use-credentials":"anonymous"}),PIXI.Assets.add(e.name,i,{images:a}),PIXI.Assets.load(e.name).then(r=>{typeof r=="string"?new pixi_spine.TextureAtlas(r,(l,u)=>u(a[l].baseTexture),o):o(r)})}isLoaded(e){return!!this._loadedSpineAtlases.getFromName(e)}getAtlasTexture(e){return this._loadedSpineAtlases.getFromName(e)}_getAtlasResource(e){const s=this._resourceLoader.getResource(e);return s&&this.getResourceKinds().includes(s.kind)?s:null}}d.SpineAtlasManager=g})(gdjs||(gdjs={}));
|
|
2
2
|
//# sourceMappingURL=pixi-spine-atlas-manager.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../GDevelop/Extensions/Spine/managers/pixi-spine-atlas-manager.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * GDevelop JS Platform\n * Copyright 2013-present Florian Rival (Florian.Rival@gmail.com). All rights reserved.\n * This project is released under the MIT License.\n */\nnamespace gdjs {\n /** The callback called when a text that was requested is loaded (or an error occurred). */\n export type SpineAtlasManagerRequestCallback = (\n error: Error | null,\n content?: pixi_spine.TextureAtlas\n ) => void;\n\n const atlasKinds: ResourceKind[] = ['atlas'];\n\n /**\n * AtlasManager loads atlas files with pixi loader, using the \"atlas\" resources\n * registered in the game resources and process them to Pixi TextureAtlas.\n *\n * Contrary to audio/fonts, text files are loaded asynchronously, when requested.\n * You should properly handle errors, and give the developer/player a way to know\n * that loading failed.\n */\n export class SpineAtlasManager implements gdjs.ResourceManager {\n private _imageManager: ImageManager;\n private _resourceLoader: ResourceLoader;\n private _loadedSpineAtlases = new gdjs.ResourceCache<\n pixi_spine.TextureAtlas\n >();\n private _loadingSpineAtlases = new gdjs.ResourceCache<\n Promise<pixi_spine.TextureAtlas>\n >();\n\n /**\n * @param resources The resources data of the game.\n * @param resourcesLoader The resources loader of the game.\n */\n constructor(\n resourceLoader: gdjs.ResourceLoader,\n imageManager: ImageManager\n ) {\n this._resourceLoader = resourceLoader;\n this._imageManager = imageManager;\n }\n\n getResourceKinds(): ResourceKind[] {\n return atlasKinds;\n }\n\n async processResource(resourceName: string): Promise<void> {\n // Do nothing because pixi-spine parses resources by itself.\n }\n\n async loadResource(resourceName: string): Promise<void> {\n await this.getOrLoad(resourceName);\n }\n\n /**\n * Returns promisified loaded atlas resource if it is availble, loads it otherwise.\n *\n * @param resources The data of resource to load.\n */\n getOrLoad(resourceName: string): Promise<pixi_spine.TextureAtlas> {\n const resource = this._getAtlasResource(resourceName);\n\n if (!resource) {\n return Promise.reject(\n `Unable to find atlas for resource '${resourceName}'.`\n );\n }\n\n let loadingPromise = this._loadingSpineAtlases.get(resource);\n\n if (!loadingPromise) {\n loadingPromise = new Promise<pixi_spine.TextureAtlas>(\n (resolve, reject) => {\n const onLoad: SpineAtlasManagerRequestCallback = (\n error,\n content\n ) => {\n if (error) {\n return reject(\n `Error while preloading a spine atlas resource: ${error}`\n );\n }\n if (!content) {\n return reject(\n `Cannot reach texture atlas for resource '${resourceName}'.`\n );\n }\n\n resolve(content);\n };\n\n this.load(resource, onLoad);\n }\n );\n\n this._loadingSpineAtlases.set(resource, loadingPromise);\n }\n\n return loadingPromise;\n }\n\n /**\n * Load specified atlas resource and pass it to callback once it is loaded.\n *\n * @param resources The data of resource to load.\n * @param callback The callback to pass atlas to it once it is loaded.\n */\n load(\n resource: ResourceData,\n callback: SpineAtlasManagerRequestCallback\n ): void {\n const game = this._resourceLoader.getRuntimeGame();\n const embeddedResourcesNames = game.getEmbeddedResourcesNames(\n resource.name\n );\n\n if (!embeddedResourcesNames.length)\n return callback(\n new Error(`${resource.name} do not have image metadata!`)\n );\n\n const images = embeddedResourcesNames.reduce<{\n [key: string]: PIXI.Texture;\n }>((imagesMap, embeddedResourceName) => {\n const mappedResourceName = game.resolveEmbeddedResource(\n resource.name,\n embeddedResourceName\n );\n imagesMap[\n embeddedResourceName\n ] = this._imageManager.getOrLoadPIXITexture(mappedResourceName);\n\n return imagesMap;\n }, {});\n const onLoad = (atlas: pixi_spine.TextureAtlas) => {\n this._loadedSpineAtlases.set(resource, atlas);\n callback(null, atlas);\n };\n\n PIXI.Assets.setPreferences({\n preferWorkers: false,\n crossOrigin: this._resourceLoader.checkIfCredentialsRequired(
|
|
5
|
-
"mappings": "AAKA,GAAU,MAAV,UAAU,EAAV,CAOE,KAAM,GAA6B,CAAC,SAU7B,OAAwD,CAc7D,YACE,EACA,EACA,CAdM,yBAAsB,GAAI,GAAK,cAG/B,0BAAuB,GAAI,GAAK,cAYtC,KAAK,gBAAkB,EACvB,KAAK,cAAgB,EAGvB,kBAAmC,CACjC,MAAO,QAGH,iBAAgB,EAAqC,OAIrD,cAAa,EAAqC,CACtD,KAAM,MAAK,UAAU,GAQvB,UAAU,EAAwD,CAChE,KAAM,GAAW,KAAK,kBAAkB,GAExC,GAAI,CAAC,EACH,MAAO,SAAQ,OACb,sCAAsC,OAI1C,GAAI,GAAiB,KAAK,qBAAqB,IAAI,GAEnD,MAAK,IACH,GAAiB,GAAI,SACnB,CAAC,EAAS,IAAW,CACnB,KAAM,GAA2C,CAC/C,EACA,IACG,CACH,GAAI,EACF,MAAO,GACL,kDAAkD,KAGtD,GAAI,CAAC,EACH,MAAO,GACL,4CAA4C,OAIhD,EAAQ,IAGV,KAAK,KAAK,EAAU,KAIxB,KAAK,qBAAqB,IAAI,EAAU,IAGnC,EAST,KACE,EACA,EACM,CACN,KAAM,GAAO,KAAK,gBAAgB,iBAC5B,EAAyB,EAAK,0BAClC,EAAS,MAGX,GAAI,CAAC,EAAuB,OAC1B,MAAO,GACL,GAAI,OAAM,GAAG,EAAS,qCAG1B,KAAM,GAAS,EAAuB,OAEnC,CAAC,EAAW,IAAyB,CACtC,KAAM,GAAqB,EAAK,wBAC9B,EAAS,KACT,GAEF,SACE,GACE,KAAK,cAAc,qBAAqB,GAErC,GACN,IACG,EAAS,AAAC,GAAmC,CACjD,KAAK,oBAAoB,IAAI,EAAU,GACvC,EAAS,KAAM,
|
|
4
|
+
"sourcesContent": ["/*\n * GDevelop JS Platform\n * Copyright 2013-present Florian Rival (Florian.Rival@gmail.com). All rights reserved.\n * This project is released under the MIT License.\n */\nnamespace gdjs {\n /** The callback called when a text that was requested is loaded (or an error occurred). */\n export type SpineAtlasManagerRequestCallback = (\n error: Error | null,\n content?: pixi_spine.TextureAtlas\n ) => void;\n\n const atlasKinds: ResourceKind[] = ['atlas'];\n\n /**\n * AtlasManager loads atlas files with pixi loader, using the \"atlas\" resources\n * registered in the game resources and process them to Pixi TextureAtlas.\n *\n * Contrary to audio/fonts, text files are loaded asynchronously, when requested.\n * You should properly handle errors, and give the developer/player a way to know\n * that loading failed.\n */\n export class SpineAtlasManager implements gdjs.ResourceManager {\n private _imageManager: ImageManager;\n private _resourceLoader: ResourceLoader;\n private _loadedSpineAtlases = new gdjs.ResourceCache<\n pixi_spine.TextureAtlas\n >();\n private _loadingSpineAtlases = new gdjs.ResourceCache<\n Promise<pixi_spine.TextureAtlas>\n >();\n\n /**\n * @param resources The resources data of the game.\n * @param resourcesLoader The resources loader of the game.\n */\n constructor(\n resourceLoader: gdjs.ResourceLoader,\n imageManager: ImageManager\n ) {\n this._resourceLoader = resourceLoader;\n this._imageManager = imageManager;\n }\n\n getResourceKinds(): ResourceKind[] {\n return atlasKinds;\n }\n\n async processResource(resourceName: string): Promise<void> {\n // Do nothing because pixi-spine parses resources by itself.\n }\n\n async loadResource(resourceName: string): Promise<void> {\n await this.getOrLoad(resourceName);\n }\n\n /**\n * Returns promisified loaded atlas resource if it is availble, loads it otherwise.\n *\n * @param resources The data of resource to load.\n */\n getOrLoad(resourceName: string): Promise<pixi_spine.TextureAtlas> {\n const resource = this._getAtlasResource(resourceName);\n\n if (!resource) {\n return Promise.reject(\n `Unable to find atlas for resource '${resourceName}'.`\n );\n }\n\n let loadingPromise = this._loadingSpineAtlases.get(resource);\n\n if (!loadingPromise) {\n loadingPromise = new Promise<pixi_spine.TextureAtlas>(\n (resolve, reject) => {\n const onLoad: SpineAtlasManagerRequestCallback = (\n error,\n content\n ) => {\n if (error) {\n return reject(\n `Error while preloading a spine atlas resource: ${error}`\n );\n }\n if (!content) {\n return reject(\n `Cannot reach texture atlas for resource '${resourceName}'.`\n );\n }\n\n resolve(content);\n };\n\n this.load(resource, onLoad);\n }\n );\n\n this._loadingSpineAtlases.set(resource, loadingPromise);\n }\n\n return loadingPromise;\n }\n\n /**\n * Load specified atlas resource and pass it to callback once it is loaded.\n *\n * @param resources The data of resource to load.\n * @param callback The callback to pass atlas to it once it is loaded.\n */\n load(\n resource: ResourceData,\n callback: SpineAtlasManagerRequestCallback\n ): void {\n const game = this._resourceLoader.getRuntimeGame();\n const embeddedResourcesNames = game.getEmbeddedResourcesNames(\n resource.name\n );\n\n if (!embeddedResourcesNames.length)\n return callback(\n new Error(`${resource.name} do not have image metadata!`)\n );\n\n const images = embeddedResourcesNames.reduce<{\n [key: string]: PIXI.Texture;\n }>((imagesMap, embeddedResourceName) => {\n const mappedResourceName = game.resolveEmbeddedResource(\n resource.name,\n embeddedResourceName\n );\n imagesMap[\n embeddedResourceName\n ] = this._imageManager.getOrLoadPIXITexture(mappedResourceName);\n\n return imagesMap;\n }, {});\n const onLoad = (atlas: pixi_spine.TextureAtlas) => {\n this._loadedSpineAtlases.set(resource, atlas);\n callback(null, atlas);\n };\n const url = this._resourceLoader.getFullUrl(resource.file);\n\n PIXI.Assets.setPreferences({\n preferWorkers: false,\n crossOrigin: this._resourceLoader.checkIfCredentialsRequired(url)\n ? 'use-credentials'\n : 'anonymous',\n });\n PIXI.Assets.add(resource.name, url, { images });\n PIXI.Assets.load<pixi_spine.TextureAtlas | string>(resource.name).then(\n (atlas) => {\n /**\n * Ideally atlas of TextureAtlas should be passed here\n * but there is known issue in case of preloaded images (see https://github.com/pixijs/spine/issues/537)\n *\n * Here covered all possible ways to make it work fine if issue is fixed in pixi-spine or after migration to spine-pixi\n */\n if (typeof atlas === 'string') {\n new pixi_spine.TextureAtlas(\n atlas,\n (textureName, textureCb) =>\n textureCb(images[textureName].baseTexture),\n onLoad\n );\n } else {\n onLoad(atlas);\n }\n }\n );\n }\n\n /**\n * Check if the given atlas resource was loaded (preloaded or loaded with `load`).\n * @param resourceName The name of the atlas resource.\n * @returns true if the content of the atlas resource is loaded, false otherwise.\n */\n isLoaded(resourceName: string): boolean {\n return !!this._loadedSpineAtlases.getFromName(resourceName);\n }\n\n /**\n * Get the Pixi TextureAtlas for the given resource that is already loaded (preloaded or loaded with `load`).\n * If the resource is not loaded, `null` will be returned.\n * @param resourceName The name of the atlas resource.\n * @returns the TextureAtlas of the atlas if loaded, `null` otherwise.\n */\n getAtlasTexture(resourceName: string): pixi_spine.TextureAtlas | null {\n return this._loadedSpineAtlases.getFromName(resourceName);\n }\n\n private _getAtlasResource(resourceName: string): ResourceData | null {\n const resource = this._resourceLoader.getResource(resourceName);\n return resource && this.getResourceKinds().includes(resource.kind)\n ? resource\n : null;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAKA,GAAU,MAAV,UAAU,EAAV,CAOE,KAAM,GAA6B,CAAC,SAU7B,OAAwD,CAc7D,YACE,EACA,EACA,CAdM,yBAAsB,GAAI,GAAK,cAG/B,0BAAuB,GAAI,GAAK,cAYtC,KAAK,gBAAkB,EACvB,KAAK,cAAgB,EAGvB,kBAAmC,CACjC,MAAO,QAGH,iBAAgB,EAAqC,OAIrD,cAAa,EAAqC,CACtD,KAAM,MAAK,UAAU,GAQvB,UAAU,EAAwD,CAChE,KAAM,GAAW,KAAK,kBAAkB,GAExC,GAAI,CAAC,EACH,MAAO,SAAQ,OACb,sCAAsC,OAI1C,GAAI,GAAiB,KAAK,qBAAqB,IAAI,GAEnD,MAAK,IACH,GAAiB,GAAI,SACnB,CAAC,EAAS,IAAW,CACnB,KAAM,GAA2C,CAC/C,EACA,IACG,CACH,GAAI,EACF,MAAO,GACL,kDAAkD,KAGtD,GAAI,CAAC,EACH,MAAO,GACL,4CAA4C,OAIhD,EAAQ,IAGV,KAAK,KAAK,EAAU,KAIxB,KAAK,qBAAqB,IAAI,EAAU,IAGnC,EAST,KACE,EACA,EACM,CACN,KAAM,GAAO,KAAK,gBAAgB,iBAC5B,EAAyB,EAAK,0BAClC,EAAS,MAGX,GAAI,CAAC,EAAuB,OAC1B,MAAO,GACL,GAAI,OAAM,GAAG,EAAS,qCAG1B,KAAM,GAAS,EAAuB,OAEnC,CAAC,EAAW,IAAyB,CACtC,KAAM,GAAqB,EAAK,wBAC9B,EAAS,KACT,GAEF,SACE,GACE,KAAK,cAAc,qBAAqB,GAErC,GACN,IACG,EAAS,AAAC,GAAmC,CACjD,KAAK,oBAAoB,IAAI,EAAU,GACvC,EAAS,KAAM,IAEX,EAAM,KAAK,gBAAgB,WAAW,EAAS,MAErD,KAAK,OAAO,eAAe,CACzB,cAAe,GACf,YAAa,KAAK,gBAAgB,2BAA2B,GACzD,kBACA,cAEN,KAAK,OAAO,IAAI,EAAS,KAAM,EAAK,CAAE,WACtC,KAAK,OAAO,KAAuC,EAAS,MAAM,KAChE,AAAC,GAAU,CAOT,AAAI,MAAO,IAAU,SACnB,GAAI,YAAW,aACb,EACA,CAAC,EAAa,IACZ,EAAU,EAAO,GAAa,aAChC,GAGF,EAAO,KAWf,SAAS,EAA+B,CACtC,MAAO,CAAC,CAAC,KAAK,oBAAoB,YAAY,GAShD,gBAAgB,EAAsD,CACpE,MAAO,MAAK,oBAAoB,YAAY,GAGtC,kBAAkB,EAA2C,CACnE,KAAM,GAAW,KAAK,gBAAgB,YAAY,GAClD,MAAO,IAAY,KAAK,mBAAmB,SAAS,EAAS,MACzD,EACA,MA5KD,EAAM,sBAjBL",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var gdjs;(function(
|
|
1
|
+
var gdjs;(function(o){const s=new o.Logger("Spine Manager"),c=["spine"];class l{constructor(r,e){this._loadedSpines=new o.ResourceCache;this._resourceLoader=r,this._spineAtlasManager=e}getResourceKinds(){return c}async processResource(r){}async loadResource(r){const e=this._getSpineResource(r);if(!e)return s.error(`Unable to find spine json for resource ${r}.`);try{const n=this._resourceLoader.getRuntimeGame(),a=n.getEmbeddedResourcesNames(e.name);if(a.length!==1)return s.error(`Unable to find atlas metadata for resource spine json ${r}.`);const d=n.resolveEmbeddedResource(e.name,a[0]),u=await this._spineAtlasManager.getOrLoad(d),t=this._resourceLoader.getFullUrl(e.file);PIXI.Assets.setPreferences({preferWorkers:!1,crossOrigin:this._resourceLoader.checkIfCredentialsRequired(t)?"use-credentials":"anonymous"}),PIXI.Assets.add(e.name,t,{spineAtlas:u});const i=await PIXI.Assets.load(e.name);i.spineData?this._loadedSpines.set(e,i.spineData):s.error(`Loader cannot process spine resource ${e.name} correctly.`)}catch(n){s.error(`Error while preloading spine resource ${e.name}: ${n}`)}}getSpine(r){return this._loadedSpines.getFromName(r)}isSpineLoaded(r){return!!this._loadedSpines.getFromName(r)}_getSpineResource(r){const e=this._resourceLoader.getResource(r);return e&&this.getResourceKinds().includes(e.kind)?e:null}}o.SpineManager=l})(gdjs||(gdjs={}));
|
|
2
2
|
//# sourceMappingURL=pixi-spine-manager.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../GDevelop/Extensions/Spine/managers/pixi-spine-manager.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * GDevelop JS Platform\n * Copyright 2013-present 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('Spine Manager');\n\n const resourceKinds: ResourceKind[] = ['spine'];\n\n /**\n * SpineManager manages pixi spine skeleton data.\n */\n export class SpineManager implements gdjs.ResourceManager {\n private _spineAtlasManager: SpineAtlasManager;\n private _resourceLoader: ResourceLoader;\n private _loadedSpines = new gdjs.ResourceCache<pixi_spine.ISkeletonData>();\n\n /**\n * @param resourceDataArray The resources data of the game.\n * @param resourcesLoader The resources loader of the game.\n */\n constructor(\n resourceLoader: gdjs.ResourceLoader,\n spineAtlasManager: SpineAtlasManager\n ) {\n this._resourceLoader = resourceLoader;\n this._spineAtlasManager = spineAtlasManager;\n }\n\n getResourceKinds(): ResourceKind[] {\n return resourceKinds;\n }\n\n async processResource(resourceName: string): Promise<void> {\n // Do nothing because pixi-spine parses resources by itself.\n }\n\n async loadResource(resourceName: string): Promise<void> {\n const resource = this._getSpineResource(resourceName);\n\n if (!resource) {\n return logger.error(\n `Unable to find spine json for resource ${resourceName}.`\n );\n }\n\n try {\n const game = this._resourceLoader.getRuntimeGame();\n const embeddedResourcesNames = game.getEmbeddedResourcesNames(\n resource.name\n );\n\n // there should be exactly one file which is pointing to atlas\n if (embeddedResourcesNames.length !== 1) {\n return logger.error(\n `Unable to find atlas metadata for resource spine json ${resourceName}.`\n );\n }\n\n const atlasResourceName = game.resolveEmbeddedResource(\n resource.name,\n embeddedResourcesNames[0]\n );\n const spineAtlas = await this._spineAtlasManager.getOrLoad(\n atlasResourceName\n );\n PIXI.Assets.setPreferences({\n preferWorkers: false,\n crossOrigin: this._resourceLoader.checkIfCredentialsRequired(
|
|
5
|
-
"mappings": "AAKA,GAAU,MAAV,UAAU,EAAV,CACE,KAAM,GAAS,GAAI,GAAK,OAAO,iBAEzB,EAAgC,CAAC,SAKhC,OAAmD,CASxD,YACE,EACA,EACA,CATM,mBAAgB,GAAI,GAAK,cAU/B,KAAK,gBAAkB,EACvB,KAAK,mBAAqB,EAG5B,kBAAmC,CACjC,MAAO,QAGH,iBAAgB,EAAqC,OAIrD,cAAa,EAAqC,CACtD,KAAM,GAAW,KAAK,kBAAkB,GAExC,GAAI,CAAC,EACH,MAAO,GAAO,MACZ,0CAA0C,MAI9C,GAAI,CACF,KAAM,GAAO,KAAK,gBAAgB,iBAC5B,EAAyB,EAAK,0BAClC,EAAS,MAIX,GAAI,EAAuB,SAAW,EACpC,MAAO,GAAO,MACZ,yDAAyD,MAI7D,KAAM,GAAoB,EAAK,wBAC7B,EAAS,KACT,EAAuB,IAEnB,EAAa,KAAM,MAAK,mBAAmB,UAC/C,
|
|
4
|
+
"sourcesContent": ["/*\n * GDevelop JS Platform\n * Copyright 2013-present 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('Spine Manager');\n\n const resourceKinds: ResourceKind[] = ['spine'];\n\n /**\n * SpineManager manages pixi spine skeleton data.\n */\n export class SpineManager implements gdjs.ResourceManager {\n private _spineAtlasManager: SpineAtlasManager;\n private _resourceLoader: ResourceLoader;\n private _loadedSpines = new gdjs.ResourceCache<pixi_spine.ISkeletonData>();\n\n /**\n * @param resourceDataArray The resources data of the game.\n * @param resourcesLoader The resources loader of the game.\n */\n constructor(\n resourceLoader: gdjs.ResourceLoader,\n spineAtlasManager: SpineAtlasManager\n ) {\n this._resourceLoader = resourceLoader;\n this._spineAtlasManager = spineAtlasManager;\n }\n\n getResourceKinds(): ResourceKind[] {\n return resourceKinds;\n }\n\n async processResource(resourceName: string): Promise<void> {\n // Do nothing because pixi-spine parses resources by itself.\n }\n\n async loadResource(resourceName: string): Promise<void> {\n const resource = this._getSpineResource(resourceName);\n\n if (!resource) {\n return logger.error(\n `Unable to find spine json for resource ${resourceName}.`\n );\n }\n\n try {\n const game = this._resourceLoader.getRuntimeGame();\n const embeddedResourcesNames = game.getEmbeddedResourcesNames(\n resource.name\n );\n\n // there should be exactly one file which is pointing to atlas\n if (embeddedResourcesNames.length !== 1) {\n return logger.error(\n `Unable to find atlas metadata for resource spine json ${resourceName}.`\n );\n }\n\n const atlasResourceName = game.resolveEmbeddedResource(\n resource.name,\n embeddedResourcesNames[0]\n );\n const spineAtlas = await this._spineAtlasManager.getOrLoad(\n atlasResourceName\n );\n const url = this._resourceLoader.getFullUrl(resource.file);\n PIXI.Assets.setPreferences({\n preferWorkers: false,\n crossOrigin: this._resourceLoader.checkIfCredentialsRequired(url)\n ? 'use-credentials'\n : 'anonymous',\n });\n PIXI.Assets.add(resource.name, url, { spineAtlas });\n const loadedJson = await PIXI.Assets.load(resource.name);\n\n if (loadedJson.spineData) {\n this._loadedSpines.set(resource, loadedJson.spineData);\n } else {\n logger.error(\n `Loader cannot process spine resource ${resource.name} correctly.`\n );\n }\n } catch (error) {\n logger.error(\n `Error while preloading spine resource ${resource.name}: ${error}`\n );\n }\n }\n\n /**\n * Get the object for the given resource that is already loaded (preloaded or loaded with `loadJson`).\n * If the resource is not loaded, `null` will be returned.\n *\n * @param resourceName The name of the spine skeleton.\n * @returns the spine skeleton if loaded, `null` otherwise.\n */\n getSpine(resourceName: string): pixi_spine.ISkeletonData | null {\n return this._loadedSpines.getFromName(resourceName);\n }\n\n /**\n * Check if the given spine skeleton was loaded.\n * @param resourceName The name of the spine skeleton.\n * @returns true if the content of the spine skeleton is loaded, false otherwise.\n */\n isSpineLoaded(resourceName: string): boolean {\n return !!this._loadedSpines.getFromName(resourceName);\n }\n\n private _getSpineResource(resourceName: string): ResourceData | null {\n const resource = this._resourceLoader.getResource(resourceName);\n return resource && this.getResourceKinds().includes(resource.kind)\n ? resource\n : null;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAKA,GAAU,MAAV,UAAU,EAAV,CACE,KAAM,GAAS,GAAI,GAAK,OAAO,iBAEzB,EAAgC,CAAC,SAKhC,OAAmD,CASxD,YACE,EACA,EACA,CATM,mBAAgB,GAAI,GAAK,cAU/B,KAAK,gBAAkB,EACvB,KAAK,mBAAqB,EAG5B,kBAAmC,CACjC,MAAO,QAGH,iBAAgB,EAAqC,OAIrD,cAAa,EAAqC,CACtD,KAAM,GAAW,KAAK,kBAAkB,GAExC,GAAI,CAAC,EACH,MAAO,GAAO,MACZ,0CAA0C,MAI9C,GAAI,CACF,KAAM,GAAO,KAAK,gBAAgB,iBAC5B,EAAyB,EAAK,0BAClC,EAAS,MAIX,GAAI,EAAuB,SAAW,EACpC,MAAO,GAAO,MACZ,yDAAyD,MAI7D,KAAM,GAAoB,EAAK,wBAC7B,EAAS,KACT,EAAuB,IAEnB,EAAa,KAAM,MAAK,mBAAmB,UAC/C,GAEI,EAAM,KAAK,gBAAgB,WAAW,EAAS,MACrD,KAAK,OAAO,eAAe,CACzB,cAAe,GACf,YAAa,KAAK,gBAAgB,2BAA2B,GACzD,kBACA,cAEN,KAAK,OAAO,IAAI,EAAS,KAAM,EAAK,CAAE,eACtC,KAAM,GAAa,KAAM,MAAK,OAAO,KAAK,EAAS,MAEnD,AAAI,EAAW,UACb,KAAK,cAAc,IAAI,EAAU,EAAW,WAE5C,EAAO,MACL,wCAAwC,EAAS,yBAG9C,EAAP,CACA,EAAO,MACL,yCAAyC,EAAS,SAAS,MAYjE,SAAS,EAAuD,CAC9D,MAAO,MAAK,cAAc,YAAY,GAQxC,cAAc,EAA+B,CAC3C,MAAO,CAAC,CAAC,KAAK,cAAc,YAAY,GAGlC,kBAAkB,EAA2C,CACnE,KAAM,GAAW,KAAK,gBAAgB,YAAY,GAClD,MAAO,IAAY,KAAK,mBAAmB,SAAS,EAAS,MACzD,EACA,MAtGD,EAAM,iBARL",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Spine Runtimes License Agreement
|
|
2
|
+
Last updated February 20, 2024. Replaces all prior versions.
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2013-2024, Esoteric Software LLC
|
|
5
|
+
|
|
6
|
+
Integration of the Spine Runtimes into software or otherwise creating derivative works of the Spine Runtimes is permitted under the terms and conditions of Section 2 of the Spine Editor License Agreement:
|
|
7
|
+
http://esotericsoftware.com/spine-editor-license
|
|
8
|
+
|
|
9
|
+
Otherwise, it is permitted to integrate the Spine Runtimes into software or otherwise create derivative works of the Spine Runtimes (collectively, "Products"), provided that each user of the Products must obtain their own Spine Editor license and redistribution of the Products in any form must include this license and copyright notice.
|
|
10
|
+
|
|
11
|
+
THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|