gdcore-tools 2.0.0-gd-v5.5.242-autobuild → 2.0.0-gd-v5.5.243-autobuild
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/CustomRuntimeObject.js +1 -1
- package/dist/Runtime/CustomRuntimeObject.js.map +2 -2
- 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/Cube3DRuntimeObject.js +1 -1
- package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js.map +2 -2
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3D.js +1 -1
- package/dist/Runtime/Extensions/3D/CustomRuntimeObject3D.js.map +2 -2
- package/dist/Runtime/Extensions/3D/JsExtension.js +5 -0
- 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/BBText/bbtextruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/DebuggerTools/JsExtension.js +3 -1
- package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/Multiplayer/messageManager.js +1 -1
- package/dist/Runtime/Extensions/Multiplayer/messageManager.js.map +2 -2
- package/dist/Runtime/Extensions/Multiplayer/multiplayerobjectruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/Multiplayer/multiplayerobjectruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.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/pathfindingruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js +1 -1
- package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Physics3DBehavior/Physics3DRuntimeBehavior.js +1 -1
- package/dist/Runtime/Extensions/Physics3DBehavior/Physics3DRuntimeBehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Physics3DBehavior/PhysicsCar3DRuntimeBehavior.js +1 -1
- package/dist/Runtime/Extensions/Physics3DBehavior/PhysicsCar3DRuntimeBehavior.js.map +2 -2
- package/dist/Runtime/Extensions/Physics3DBehavior/PhysicsCharacter3DRuntimeBehavior.js +1 -1
- package/dist/Runtime/Extensions/Physics3DBehavior/PhysicsCharacter3DRuntimeBehavior.js.map +2 -2
- 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/PrimitiveDrawing/shapepainterruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/SaveState/JsExtension.js +488 -0
- package/dist/Runtime/Extensions/SaveState/SaveConfigurationRuntimeBehavior.js +2 -0
- package/dist/Runtime/Extensions/SaveState/SaveConfigurationRuntimeBehavior.js.map +7 -0
- package/dist/Runtime/Extensions/SaveState/SaveStateTools.js +2 -0
- package/dist/Runtime/Extensions/SaveState/SaveStateTools.js.map +7 -0
- package/dist/Runtime/Extensions/Spine/spineruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/Spine/spineruntimeobject.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/textruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TextObject/textruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts +4 -4
- package/dist/Runtime/Extensions/TileMap/simpletilemapruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TileMap/simpletilemapruntimeobject.js.map +2 -2
- 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/tiledspriteruntimeobject.js +1 -1
- package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js.map +2 -2
- package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js +1 -1
- package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js.map +2 -2
- package/dist/Runtime/Extensions/TweenBehavior/TweenManager.js +2 -2
- package/dist/Runtime/Extensions/TweenBehavior/TweenManager.js.map +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/TweenBehavior/tweentools.js +1 -1
- package/dist/Runtime/Extensions/TweenBehavior/tweentools.js.map +2 -2
- 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/RuntimeLayer.js +1 -1
- package/dist/Runtime/RuntimeLayer.js.map +2 -2
- 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/gd.js +1 -1
- package/dist/Runtime/gd.js.map +2 -2
- package/dist/Runtime/howler-sound-manager/howler-sound-manager.js +1 -1
- package/dist/Runtime/howler-sound-manager/howler-sound-manager.js.map +2 -2
- package/dist/Runtime/indexeddb.js +2 -0
- package/dist/Runtime/indexeddb.js.map +7 -0
- package/dist/Runtime/oncetriggers.js +1 -1
- package/dist/Runtime/oncetriggers.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/timemanager.js +1 -1
- package/dist/Runtime/timemanager.js.map +2 -2
- package/dist/Runtime/timer.js +1 -1
- package/dist/Runtime/timer.js.map +2 -2
- package/dist/Runtime/types/global-types.d.ts +29 -0
- package/dist/Runtime/types/project-data.d.ts +144 -3
- package/dist/Runtime/types/save-state.d.ts +9 -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 +1 -1
- package/dist/lib/libGD.wasm +0 -0
- package/dist/loaders.cjs +1 -1
- package/gd.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../GDevelop/Extensions/PlatformBehavior/platformruntimebehavior.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nGDevelop - Platform Behavior Extension\nCopyright (c) 2013-2016 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n declare var rbush: any;\n type SearchArea = { minX: float; minY: float; maxX: float; maxY: float };\n\n /**\n * Manages the common objects shared by objects having a\n * platform behavior: in particular, the platforms behaviors are required to\n * declare themselves (see PlatformObjectsManager.addPlatform) to the manager\n * of their associated container (see PlatformRuntimeBehavior.getManager).\n */\n export class PlatformObjectsManager {\n private _platformRBush: any;\n\n constructor(instanceContainer: gdjs.RuntimeInstanceContainer) {\n this._platformRBush = new rbush();\n }\n\n /**\n * Get the platforms manager of an instance container.\n */\n static getManager(instanceContainer: gdjs.RuntimeInstanceContainer) {\n // @ts-ignore\n if (!instanceContainer.platformsObjectsManager) {\n //Create the shared manager if necessary.\n // @ts-ignore\n instanceContainer.platformsObjectsManager =\n new gdjs.PlatformObjectsManager(instanceContainer);\n }\n // @ts-ignore\n return instanceContainer.platformsObjectsManager;\n }\n\n /**\n * Add a platform to the list of existing platforms.\n */\n addPlatform(platformBehavior: gdjs.PlatformRuntimeBehavior) {\n if (platformBehavior.currentRBushAABB)\n platformBehavior.currentRBushAABB.updateAABBFromOwner();\n else\n platformBehavior.currentRBushAABB = new gdjs.BehaviorRBushAABB(\n platformBehavior\n );\n this._platformRBush.insert(platformBehavior.currentRBushAABB);\n }\n\n /**\n * Remove a platform from the list of existing platforms. Be sure that the platform was\n * added before.\n */\n removePlatform(platformBehavior: gdjs.PlatformRuntimeBehavior) {\n this._platformRBush.remove(platformBehavior.currentRBushAABB);\n }\n\n /**\n * Returns all the platforms around the specified object.\n * @param maxMovementLength The maximum distance, in pixels, the object is going to do.\n * @return An array with all platforms near the object.\n */\n getAllPlatformsAround(\n object: gdjs.RuntimeObject,\n maxMovementLength: number,\n result: PlatformRuntimeBehavior[]\n ): any {\n // TODO: This would better be done using the object AABB (getAABB), as (`getCenterX`;`getCenterY`) point\n // is not necessarily in the middle of the object (for sprites for example).\n const ow = object.getWidth();\n const oh = object.getHeight();\n const x = object.getDrawableX() + object.getCenterX();\n const y = object.getDrawableY() + object.getCenterY();\n const searchArea: SearchArea = gdjs.staticObject(\n PlatformObjectsManager.prototype.getAllPlatformsAround\n ) as SearchArea;\n searchArea.minX = x - ow / 2 - maxMovementLength;\n searchArea.minY = y - oh / 2 - maxMovementLength;\n searchArea.maxX = x + ow / 2 + maxMovementLength;\n searchArea.maxY = y + oh / 2 + maxMovementLength;\n const nearbyPlatforms: gdjs.BehaviorRBushAABB<PlatformRuntimeBehavior>[] =\n this._platformRBush.search(searchArea);\n\n result.length = 0;\n\n // Extra check on the platform owner AABB\n // TODO: PR https://github.com/4ian/GDevelop/pull/2602 should remove the need\n // for this extra check once merged.\n for (let i = 0; i < nearbyPlatforms.length; i++) {\n const platform = nearbyPlatforms[i].behavior;\n const platformAABB = platform.owner.getAABB();\n const platformIsStillAround =\n platformAABB.min[0] <= searchArea.maxX &&\n platformAABB.min[1] <= searchArea.maxY &&\n platformAABB.max[0] >= searchArea.minX &&\n platformAABB.max[1] >= searchArea.minY;\n // Filter platforms that are not in the searched area anymore.\n // This can happen because platforms are not updated in the RBush before that\n // characters movement are being processed.\n if (platformIsStillAround) {\n result.push(platform);\n }\n }\n }\n }\n\n /**\n * PlatformRuntimeBehavior represents a behavior allowing objects to be\n * considered as a platform by objects having PlatformerObject Behavior.\n */\n export class PlatformRuntimeBehavior extends gdjs.RuntimeBehavior {\n //Load the platform type\n _platformType: integer;\n _canBeGrabbed: boolean;\n _yGrabOffset: float;\n\n //Note that we can't use getX(), getWidth()... of owner here: The owner is not fully constructed.\n _oldX: float = 0;\n _oldY: float = 0;\n _oldWidth: float = 0;\n _oldHeight: float = 0;\n _oldAngle: float = 0;\n currentRBushAABB: gdjs.BehaviorRBushAABB<PlatformRuntimeBehavior> | null =\n null;\n _manager: gdjs.PlatformObjectsManager;\n _registeredInManager: boolean = false;\n\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n behaviorData,\n owner: gdjs.RuntimeObject\n ) {\n super(instanceContainer, behaviorData, owner);\n this._platformType = behaviorData.platformType;\n if (behaviorData.platformType === 'Ladder') {\n this._platformType = PlatformRuntimeBehavior.LADDER;\n } else if (behaviorData.platformType === 'Jumpthru') {\n this._platformType = PlatformRuntimeBehavior.JUMPTHRU;\n } else {\n this._platformType = PlatformRuntimeBehavior.NORMALPLATFORM;\n }\n this._canBeGrabbed = behaviorData.canBeGrabbed || false;\n this._yGrabOffset = behaviorData.yGrabOffset || 0;\n this._manager = PlatformObjectsManager.getManager(instanceContainer);\n }\n\n updateFromBehaviorData(oldBehaviorData, newBehaviorData): boolean {\n if (oldBehaviorData.platformType !== newBehaviorData.platformType) {\n this.changePlatformType(newBehaviorData.platformType);\n }\n if (oldBehaviorData.canBeGrabbed !== newBehaviorData.canBeGrabbed) {\n this._canBeGrabbed = newBehaviorData.canBeGrabbed;\n }\n if (oldBehaviorData.yGrabOffset !== newBehaviorData.yGrabOffset) {\n this._yGrabOffset = newBehaviorData.yGrabOffset;\n }\n return true;\n }\n\n onDestroy() {\n if (this._manager && this._registeredInManager) {\n this._manager.removePlatform(this);\n }\n }\n\n doStepPreEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {\n //Scene change is not supported\n /*if ( parentScene != &scene ) //Parent scene has changed\n {\n if ( sceneManager ) //Remove the object from any old scene manager.\n sceneManager->RemovePlatform(this);\n parentScene = &scene;\n sceneManager = parentScene ? &ScenePlatformObjectsManager::managers[&scene] : NULL;\n registeredInManager = false;\n }*/\n\n //Make sure the platform is or is not in the platforms manager.\n if (!this.activated() && this._registeredInManager) {\n this._manager.removePlatform(this);\n this._registeredInManager = false;\n } else {\n if (this.activated() && !this._registeredInManager) {\n this._manager.addPlatform(this);\n this._registeredInManager = true;\n }\n }\n\n //Track changes in size or position\n if (\n this._oldX !== this.owner.getX() ||\n this._oldY !== this.owner.getY() ||\n this._oldWidth !== this.owner.getWidth() ||\n this._oldHeight !== this.owner.getHeight() ||\n this._oldAngle !== this.owner.getAngle()\n ) {\n if (this._registeredInManager) {\n this._manager.removePlatform(this);\n this._manager.addPlatform(this);\n }\n this._oldX = this.owner.getX();\n this._oldY = this.owner.getY();\n this._oldWidth = this.owner.getWidth();\n this._oldHeight = this.owner.getHeight();\n this._oldAngle = this.owner.getAngle();\n }\n }\n\n doStepPostEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {}\n\n onActivate() {\n if (this._registeredInManager) {\n return;\n }\n this._manager.addPlatform(this);\n this._registeredInManager = true;\n }\n\n onDeActivate() {\n if (!this._registeredInManager) {\n return;\n }\n this._manager.removePlatform(this);\n this._registeredInManager = false;\n }\n\n changePlatformType(platformType: string) {\n if (platformType === 'Ladder') {\n this._platformType = PlatformRuntimeBehavior.LADDER;\n } else if (platformType === 'Jumpthru') {\n this._platformType = PlatformRuntimeBehavior.JUMPTHRU;\n } else {\n this._platformType = PlatformRuntimeBehavior.NORMALPLATFORM;\n }\n }\n\n getPlatformType() {\n return this._platformType;\n }\n\n canBeGrabbed() {\n return this._canBeGrabbed;\n }\n\n getYGrabOffset() {\n return this._yGrabOffset;\n }\n\n static NORMALPLATFORM = 0;\n /** @deprecated Use NORMALPLATFORM instead. */\n static NORMALPLAFTORM = PlatformRuntimeBehavior.NORMALPLATFORM;\n static JUMPTHRU = 1;\n static LADDER = 2;\n\n static isOnPlatformTest(\n object1: gdjs.RuntimeObject,\n object2: gdjs.RuntimeObject,\n behaviorName: string\n ): boolean {\n const behavior1 = object1.getBehavior(\n behaviorName\n ) as PlatformerObjectRuntimeBehavior;\n if (!behavior1) {\n return false;\n }\n return behavior1.isOnFloorObject(object2);\n }\n }\n gdjs.registerBehavior(\n 'PlatformBehavior::PlatformBehavior',\n gdjs.PlatformRuntimeBehavior\n );\n}\n"],
|
|
5
|
-
"mappings": "AAIA,GAAU,MAAV,UAAU,EAAV,CAUS,OAA6B,CAGlC,YAAY,EAAkD,CAC5D,KAAK,eAAiB,GAAI,aAMrB,YAAW,EAAkD,CAElE,MAAK,GAAkB,yBAGrB,GAAkB,wBAChB,GAAI,GAAK,uBAAuB,IAG7B,EAAkB,wBAM3B,YAAY,EAAgD,CAC1D,AAAI,EAAiB,iBACnB,EAAiB,iBAAiB,sBAElC,EAAiB,iBAAmB,GAAI,GAAK,kBAC3C,GAEJ,KAAK,eAAe,OAAO,EAAiB,kBAO9C,eAAe,EAAgD,CAC7D,KAAK,eAAe,OAAO,EAAiB,kBAQ9C,sBACE,EACA,EACA,EACK,CAGL,KAAM,GAAK,EAAO,WACZ,EAAK,EAAO,YACZ,EAAI,EAAO,eAAiB,EAAO,aACn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ior Extension\nCopyright (c) 2013-2016 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n declare var rbush: any;\n type SearchArea = { minX: float; minY: float; maxX: float; maxY: float };\n\n /**\n * Manages the common objects shared by objects having a\n * platform behavior: in particular, the platforms behaviors are required to\n * declare themselves (see PlatformObjectsManager.addPlatform) to the manager\n * of their associated container (see PlatformRuntimeBehavior.getManager).\n */\n export class PlatformObjectsManager {\n private _platformRBush: any;\n\n constructor(instanceContainer: gdjs.RuntimeInstanceContainer) {\n this._platformRBush = new rbush();\n }\n\n /**\n * Get the platforms manager of an instance container.\n */\n static getManager(instanceContainer: gdjs.RuntimeInstanceContainer) {\n // @ts-ignore\n if (!instanceContainer.platformsObjectsManager) {\n //Create the shared manager if necessary.\n // @ts-ignore\n instanceContainer.platformsObjectsManager =\n new gdjs.PlatformObjectsManager(instanceContainer);\n }\n // @ts-ignore\n return instanceContainer.platformsObjectsManager;\n }\n\n /**\n * Add a platform to the list of existing platforms.\n */\n addPlatform(platformBehavior: gdjs.PlatformRuntimeBehavior) {\n if (platformBehavior.currentRBushAABB)\n platformBehavior.currentRBushAABB.updateAABBFromOwner();\n else\n platformBehavior.currentRBushAABB = new gdjs.BehaviorRBushAABB(\n platformBehavior\n );\n this._platformRBush.insert(platformBehavior.currentRBushAABB);\n }\n\n /**\n * Remove a platform from the list of existing platforms. Be sure that the platform was\n * added before.\n */\n removePlatform(platformBehavior: gdjs.PlatformRuntimeBehavior) {\n this._platformRBush.remove(platformBehavior.currentRBushAABB);\n }\n\n /**\n * Returns all the platforms around the specified object.\n * @param maxMovementLength The maximum distance, in pixels, the object is going to do.\n * @return An array with all platforms near the object.\n */\n getAllPlatformsAround(\n object: gdjs.RuntimeObject,\n maxMovementLength: number,\n result: PlatformRuntimeBehavior[]\n ): any {\n // TODO: This would better be done using the object AABB (getAABB), as (`getCenterX`;`getCenterY`) point\n // is not necessarily in the middle of the object (for sprites for example).\n const ow = object.getWidth();\n const oh = object.getHeight();\n const x = object.getDrawableX() + object.getCenterX();\n const y = object.getDrawableY() + object.getCenterY();\n const searchArea: SearchArea = gdjs.staticObject(\n PlatformObjectsManager.prototype.getAllPlatformsAround\n ) as SearchArea;\n searchArea.minX = x - ow / 2 - maxMovementLength;\n searchArea.minY = y - oh / 2 - maxMovementLength;\n searchArea.maxX = x + ow / 2 + maxMovementLength;\n searchArea.maxY = y + oh / 2 + maxMovementLength;\n const nearbyPlatforms: gdjs.BehaviorRBushAABB<PlatformRuntimeBehavior>[] =\n this._platformRBush.search(searchArea);\n\n result.length = 0;\n\n // Extra check on the platform owner AABB\n // TODO: PR https://github.com/4ian/GDevelop/pull/2602 should remove the need\n // for this extra check once merged.\n for (let i = 0; i < nearbyPlatforms.length; i++) {\n const platform = nearbyPlatforms[i].behavior;\n const platformAABB = platform.owner.getAABB();\n const platformIsStillAround =\n platformAABB.min[0] <= searchArea.maxX &&\n platformAABB.min[1] <= searchArea.maxY &&\n platformAABB.max[0] >= searchArea.minX &&\n platformAABB.max[1] >= searchArea.minY;\n // Filter platforms that are not in the searched area anymore.\n // This can happen because platforms are not updated in the RBush before that\n // characters movement are being processed.\n if (platformIsStillAround) {\n result.push(platform);\n }\n }\n }\n }\n\n /**\n * PlatformRuntimeBehavior represents a behavior allowing objects to be\n * considered as a platform by objects having PlatformerObject Behavior.\n */\n export class PlatformRuntimeBehavior extends gdjs.RuntimeBehavior {\n //Load the platform type\n _platformType: integer;\n _canBeGrabbed: boolean;\n _yGrabOffset: float;\n\n //Note that we can't use getX(), getWidth()... of owner here: The owner is not fully constructed.\n _oldX: float = 0;\n _oldY: float = 0;\n _oldWidth: float = 0;\n _oldHeight: float = 0;\n _oldAngle: float = 0;\n currentRBushAABB: gdjs.BehaviorRBushAABB<PlatformRuntimeBehavior> | null =\n null;\n _manager: gdjs.PlatformObjectsManager;\n _registeredInManager: boolean = false;\n\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n behaviorData,\n owner: gdjs.RuntimeObject\n ) {\n super(instanceContainer, behaviorData, owner);\n this._platformType = behaviorData.platformType;\n if (behaviorData.platformType === 'Ladder') {\n this._platformType = PlatformRuntimeBehavior.LADDER;\n } else if (behaviorData.platformType === 'Jumpthru') {\n this._platformType = PlatformRuntimeBehavior.JUMPTHRU;\n } else {\n this._platformType = PlatformRuntimeBehavior.NORMALPLATFORM;\n }\n this._canBeGrabbed = behaviorData.canBeGrabbed || false;\n this._yGrabOffset = behaviorData.yGrabOffset || 0;\n this._manager = PlatformObjectsManager.getManager(instanceContainer);\n }\n\n updateFromBehaviorData(oldBehaviorData, newBehaviorData): boolean {\n if (oldBehaviorData.platformType !== newBehaviorData.platformType) {\n this.changePlatformType(newBehaviorData.platformType);\n }\n if (oldBehaviorData.canBeGrabbed !== newBehaviorData.canBeGrabbed) {\n this._canBeGrabbed = newBehaviorData.canBeGrabbed;\n }\n if (oldBehaviorData.yGrabOffset !== newBehaviorData.yGrabOffset) {\n this._yGrabOffset = newBehaviorData.yGrabOffset;\n }\n return true;\n }\n\n trackChangesAndUpdateManagerIfNeeded() {\n if (!this.activated() && this._registeredInManager) {\n this._manager.removePlatform(this);\n this._registeredInManager = false;\n } else {\n if (this.activated() && !this._registeredInManager) {\n this._manager.addPlatform(this);\n this._registeredInManager = true;\n }\n }\n\n if (\n this._oldX !== this.owner.getX() ||\n this._oldY !== this.owner.getY() ||\n this._oldWidth !== this.owner.getWidth() ||\n this._oldHeight !== this.owner.getHeight() ||\n this._oldAngle !== this.owner.getAngle()\n ) {\n if (this._registeredInManager) {\n this._manager.removePlatform(this);\n this._manager.addPlatform(this);\n }\n this._oldX = this.owner.getX();\n this._oldY = this.owner.getY();\n this._oldWidth = this.owner.getWidth();\n this._oldHeight = this.owner.getHeight();\n this._oldAngle = this.owner.getAngle();\n }\n }\n\n getNetworkSyncData(\n syncOptions: GetNetworkSyncDataOptions\n ): BehaviorNetworkSyncData {\n return super.getNetworkSyncData(syncOptions);\n }\n\n updateFromNetworkSyncData(\n networkSyncData: BehaviorNetworkSyncData,\n options: UpdateFromNetworkSyncDataOptions\n ): void {\n super.updateFromNetworkSyncData(networkSyncData, options);\n\n this.trackChangesAndUpdateManagerIfNeeded();\n }\n\n onCreated(): void {\n // Register it right away if activated,\n // so it can be used by platformer objects in that same frame.\n this.trackChangesAndUpdateManagerIfNeeded();\n }\n\n onDestroy() {\n if (this._manager && this._registeredInManager) {\n this._manager.removePlatform(this);\n }\n }\n\n doStepPreEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {\n //Scene change is not supported\n /*if ( parentScene != &scene ) //Parent scene has changed\n {\n if ( sceneManager ) //Remove the object from any old scene manager.\n sceneManager->RemovePlatform(this);\n parentScene = &scene;\n sceneManager = parentScene ? &ScenePlatformObjectsManager::managers[&scene] : NULL;\n registeredInManager = false;\n }*/\n\n //Make sure the platform is or is not in the platforms manager.\n this.trackChangesAndUpdateManagerIfNeeded();\n }\n\n doStepPostEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {}\n\n onActivate() {\n if (this._registeredInManager) {\n return;\n }\n this._manager.addPlatform(this);\n this._registeredInManager = true;\n }\n\n onDeActivate() {\n if (!this._registeredInManager) {\n return;\n }\n this._manager.removePlatform(this);\n this._registeredInManager = false;\n }\n\n changePlatformType(platformType: string) {\n if (platformType === 'Ladder') {\n this._platformType = PlatformRuntimeBehavior.LADDER;\n } else if (platformType === 'Jumpthru') {\n this._platformType = PlatformRuntimeBehavior.JUMPTHRU;\n } else {\n this._platformType = PlatformRuntimeBehavior.NORMALPLATFORM;\n }\n }\n\n getPlatformType() {\n return this._platformType;\n }\n\n canBeGrabbed() {\n return this._canBeGrabbed;\n }\n\n getYGrabOffset() {\n return this._yGrabOffset;\n }\n\n static NORMALPLATFORM = 0;\n /** @deprecated Use NORMALPLATFORM instead. */\n static NORMALPLAFTORM = PlatformRuntimeBehavior.NORMALPLATFORM;\n static JUMPTHRU = 1;\n static LADDER = 2;\n\n static isOnPlatformTest(\n object1: gdjs.RuntimeObject,\n object2: gdjs.RuntimeObject,\n behaviorName: string\n ): boolean {\n const behavior1 = object1.getBehavior(\n behaviorName\n ) as PlatformerObjectRuntimeBehavior;\n if (!behavior1) {\n return false;\n }\n return behavior1.isOnFloorObject(object2);\n }\n }\n gdjs.registerBehavior(\n 'PlatformBehavior::PlatformBehavior',\n gdjs.PlatformRuntimeBehavior\n );\n}\n"],
|
|
5
|
+
"mappings": "AAIA,GAAU,MAAV,UAAU,EAAV,CAUS,OAA6B,CAGlC,YAAY,EAAkD,CAC5D,KAAK,eAAiB,GAAI,aAMrB,YAAW,EAAkD,CAElE,MAAK,GAAkB,yBAGrB,GAAkB,wBAChB,GAAI,GAAK,uBAAuB,IAG7B,EAAkB,wBAM3B,YAAY,EAAgD,CAC1D,AAAI,EAAiB,iBACnB,EAAiB,iBAAiB,sBAElC,EAAiB,iBAAmB,GAAI,GAAK,kBAC3C,GAEJ,KAAK,eAAe,OAAO,EAAiB,kBAO9C,eAAe,EAAgD,CAC7D,KAAK,eAAe,OAAO,EAAiB,kBAQ9C,sBACE,EACA,EACA,EACK,CAGL,KAAM,GAAK,EAAO,WACZ,EAAK,EAAO,YACZ,EAAI,EAAO,eAAiB,EAAO,aACnC,EAAI,EAAO,eAAiB,EAAO,aACnC,EAAyB,EAAK,aAClC,EAAuB,UAAU,uBAEnC,EAAW,KAAO,EAAI,EAAK,EAAI,EAC/B,EAAW,KAAO,EAAI,EAAK,EAAI,EAC/B,EAAW,KAAO,EAAI,EAAK,EAAI,EAC/B,EAAW,KAAO,EAAI,EAAK,EAAI,EAC/B,KAAM,GACJ,KAAK,eAAe,OAAO,GAE7B,EAAO,OAAS,EAKhB,OAAS,GAAI,EAAG,EAAI,EAAgB,OAAQ,IAAK,CAC/C,KAAM,GAAW,EAAgB,GAAG,SAC9B,EAAe,EAAS,MAAM,UASpC,AAAI,AAPF,EAAa,IAAI,IAAM,EAAW,MAClC,EAAa,IAAI,IAAM,EAAW,MAClC,EAAa,IAAI,IAAM,EAAW,MAClC,EAAa,IAAI,IAA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C,mBACE,EACyB,CACzB,MAAO,OAAM,mBAAmB,GAGlC,0BACE,EACA,EACM,CACN,MAAM,0BAA0B,EAAiB,GAEjD,KAAK,uCAGP,WAAkB,CAGhB,KAAK,uCAGP,WAAY,CACV,AAAI,KAAK,UAAY,KAAK,sBACxB,KAAK,SAAS,eAAe,MAIjC,gBAAgB,EAAkD,CAYhE,KAAK,uCAGP,iBAAiB,EAAkD,EAEnE,YAAa,CACX,AAAI,KAAK,sBAGT,MAAK,SAAS,YAAY,MAC1B,KAAK,qBAAuB,IAG9B,cAAe,CACb,AAAI,CAAC,KAAK,sBAGV,MAAK,SAAS,eAAe,MAC7B,KAAK,qBAAuB,IAG9B,mBAAmB,EAAsB,CACvC,AAAI,IAAiB,SACnB,KAAK,cAAgB,EAAwB,OACxC,AAAI,IAAiB,WAC1B,KAAK,cAAgB,EAAwB,SAE7C,KAAK,cAAgB,EAAwB,eAIjD,iBAAkB,CAChB,MAAO,MAAK,cAGd,cAAe,CACb,MAAO,MAAK,cAGd,gBAAiB,CACf,MAAO,MAAK,mBASP,kBACL,EACA,EACA,EACS,CACT,KAAM,GAAY,EAAQ,YACxB,GAEF,MAAK,GAGE,EAAU,gBAAgB,GAFxB,KAhLN,QAiKE,AAjKF,EAiKE,eAAiB,EAEjB,AAnKF,EAmKE,eAAiB,EAAwB,eACzC,AApKF,EAoKE,SAAW,EACX,AArKF,EAqKE,OAAS,EArKX,EAAM,0BAqLb,EAAK,iBACH,qCACA,EAAK,2BAjSC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var gdjs;(function(s){const a=class extends s.RuntimeObject{constructor(e,t){super(e,t);this._scaleX=1;this._scaleY=1;this._blendMode=0;this._flippedX=!1;this._flippedY=!1;this._customCenter=null;this._customCollisionMask=null;this._fillColor=typeof t.fillColor=="string"?s.rgbOrHexStringToNumber(t.fillColor):parseInt(s.rgbToHex(t.fillColor.r,t.fillColor.g,t.fillColor.b),16),this._outlineColor=typeof t.outlineColor=="string"?s.rgbOrHexStringToNumber(t.outlineColor):parseInt(s.rgbToHex(t.outlineColor.r,t.outlineColor.g,t.outlineColor.b),16),this._fillOpacity=t.fillOpacity,this._outlineOpacity=t.outlineOpacity,this._outlineSize=t.outlineSize,this._useAbsoluteCoordinates=t.absoluteCoordinates,this._clearBetweenFrames=t.clearBetweenFrames,this._antialiasing=t.antialiasing,this._renderer=new s.ShapePainterRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(e,t){return typeof t.fillColor=="string"&&e.fillColor!==t.fillColor&&this.setFillColor(t.fillColor),typeof e.fillColor!="string"&&typeof t.fillColor!="string"&&(e.fillColor.r!==t.fillColor.r||e.fillColor.g!==t.fillColor.g||e.fillColor.b!==t.fillColor.b)&&this.setFillColor(""+t.fillColor.r+";"+t.fillColor.g+";"+t.fillColor.b),typeof t.outlineColor=="string"&&e.outlineColor!==t.outlineColor&&this.setOutlineColor(t.outlineColor),typeof e.outlineColor!="string"&&typeof t.outlineColor!="string"&&(e.outlineColor.r!==t.outlineColor.r||e.outlineColor.g!==t.outlineColor.g||e.outlineColor.b!==t.outlineColor.b)&&this.setOutlineColor(""+t.outlineColor.r+";"+t.outlineColor.g+";"+t.outlineColor.b),e.fillOpacity!==t.fillOpacity&&this.setFillOpacity(t.fillOpacity),e.outlineOpacity!==t.outlineOpacity&&this.setOutlineOpacity(t.outlineOpacity),e.outlineSize!==t.outlineSize&&this.setOutlineSize(t.outlineSize),e.absoluteCoordinates!==t.absoluteCoordinates&&(this._useAbsoluteCoordinates=t.absoluteCoordinates,this._renderer.updatePositionX(),this._renderer.updatePositionY(),this._renderer.updateAngle(),this._renderer.updateScaleX(),this._renderer.updateScaleY()),e.clearBetweenFrames!==t.clearBetweenFrames&&(this._clearBetweenFrames=t.clearBetweenFrames),e.antialiasing!==t.antialiasing&&this.setAntialiasing(t.antialiasing),!0}extraInitializationFromInitialInstance(e){e.flippedX&&this.flipX(e.flippedX),e.flippedY&&this.flipY(e.flippedY)}stepBehaviorsPreEvents(e){this._clearBetweenFrames&&this.clear(),super.stepBehaviorsPreEvents(e)}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}clear(){this._renderer.clear()}getVisibilityAABB(){return this._useAbsoluteCoordinates?null:this.getAABB()}drawRectangle(e,t,i,o){this._renderer.drawRectangle(e,t,i,o)}drawCircle(e,t,i){this._renderer.drawCircle(e,t,i)}drawLine(e,t,i,o,r){this._renderer.drawLine(e,t,i,o,r)}drawLineV2(e,t,i,o,r){this._renderer.drawLineV2(e,t,i,o,r)}drawEllipse(e,t,i,o){this._renderer.drawEllipse(e,t,i,o)}drawFilletRectangle(e,t,i,o,r){this._renderer.drawFilletRectangle(e,t,i,o,r)}drawRoundedRectangle(e,t,i,o,r){this._renderer.drawRoundedRectangle(e,t,i,o,r)}drawChamferRectangle(e,t,i,o,r){this._renderer.drawChamferRectangle(e,t,i,o,r)}drawTorus(e,t,i,o,r,l){this._renderer.drawTorus(e,t,i,o,r,l)}drawRegularPolygon(e,t,i,o,r){this._renderer.drawRegularPolygon(e,t,i,o,r)}drawStar(e,t,i,o,r,l){this._renderer.drawStar(e,t,i,o,r,l)}drawArc(e,t,i,o,r,l,n){this._renderer.drawArc(e,t,i,o,r,l,n)}drawBezierCurve(e,t,i,o,r,l,n,f){this._renderer.drawBezierCurve(e,t,i,o,r,l,n,f)}drawQuadraticCurve(e,t,i,o,r,l){this._renderer.drawQuadraticCurve(e,t,i,o,r,l)}beginFillPath(e,t){this._renderer.beginFillPath(),this._renderer.drawPathMoveTo(e,t)}endFillPath(){this._renderer.endFillPath()}drawPathMoveTo(e,t){this._renderer.drawPathMoveTo(e,t)}drawPathLineTo(e,t){this._renderer.drawPathLineTo(e,t)}drawPathBezierCurveTo(e,t,i,o,r,l){this._renderer.drawPathBezierCurveTo(e,t,i,o,r,l)}drawPathArc(e,t,i,o,r,l){this._renderer.drawPathArc(e,t,i,o,r,l)}drawPathQuadraticCurveTo(e,t,i,o){this._renderer.drawPathQuadraticCurveTo(e,t,i,o)}closePath(){this._renderer.closePath()}setClearBetweenFrames(e){this._clearBetweenFrames=e}isClearedBetweenFrames(){return this._clearBetweenFrames}setAntialiasing(e){this._antialiasing=e,this._renderer.updateAntialiasing()}getAntialiasing(){return this._antialiasing}checkAntialiasing(e){return this._antialiasing===e}setCoordinatesRelative(e){this._useAbsoluteCoordinates=!e}areCoordinatesRelative(){return!this._useAbsoluteCoordinates}setFillColor(e){this._fillColor=s.rgbOrHexStringToNumber(e)}getFillColorR(){return s.hexNumberToRGB(this._fillColor).r}getFillColorG(){return s.hexNumberToRGB(this._fillColor).g}getFillColorB(){return s.hexNumberToRGB(this._fillColor).b}setOutlineColor(e){this._outlineColor=s.rgbOrHexStringToNumber(e),this._renderer.updateOutline()}getOutlineColorR(){return s.hexNumberToRGB(this._outlineColor).r}getOutlineColorG(){return s.hexNumberToRGB(this._outlineColor).g}getOutlineColorB(){return s.hexNumberToRGB(this._outlineColor).b}setOutlineSize(e){this._outlineSize=e,this._renderer.updateOutline()}getOutlineSize(){return this._outlineSize}setFillOpacity(e){this._fillOpacity=e}getFillOpacity(){return this._fillOpacity}setOutlineOpacity(e){this._outlineOpacity=e,this._renderer.updateOutline()}getOutlineOpacity(){return this._outlineOpacity}setX(e){e!==this.x&&(super.setX(e),this._renderer.updatePositionX())}setY(e){e!==this.y&&(super.setY(e),this._renderer.updatePositionY())}setAngle(e){e!==this.angle&&(super.setAngle(e),this._renderer.updateAngle(),this.invalidateHitboxes())}setRotationCenter(e,t){this._customCenter||(this._customCenter=[0,0]),this._customCenter[0]=e,this._customCenter[1]=t,this._renderer.updateRotationCenter()}getRotationCenterX(){return this._customCenter?this._customCenter[0]:this._renderer.getUnscaledWidth()/2-this._renderer.getFrameRelativeOriginX()}getRotationCenterY(){return this._customCenter?this._customCenter[1]:this._renderer.getUnscaledHeight()/2-this._renderer.getFrameRelativeOriginY()}getCenterX(){return this._customCenter?this._customCenter[0]*Math.abs(this._scaleX)+this.getX()-this.getDrawableX():super.getCenterX()}getCenterY(){return this._customCenter?this._customCenter[1]*Math.abs(this._scaleY)+this.getY()-this.getDrawableY():super.getCenterY()}setWidth(e){const t=this._renderer.getUnscaledWidth();t!==0&&this.setScaleX(e/t)}setHeight(e){const t=this._renderer.getUnscaledHeight();t!==0&&this.setScaleY(e/t)}setSize(e,t){this.setWidth(e),this.setHeight(t)}setScale(e){this.setScaleX(e),this.setScaleY(e)}setScaleX(e){e<0&&(e=0),e!==Math.abs(this._scaleX)&&(this._scaleX=e*(this._flippedX?-1:1),this._renderer.updateScaleX(),this.invalidateHitboxes())}setScaleY(e){e<0&&(e=0),e!==Math.abs(this._scaleY)&&(this._scaleY=e*(this._flippedY?-1:1),this._renderer.updateScaleY(),this.invalidateHitboxes())}flipX(e){e!==this._flippedX&&(this._scaleX*=-1,this._flippedX=e,this._renderer.updateScaleX(),this.invalidateHitboxes())}flipY(e){e!==this._flippedY&&(this._scaleY*=-1,this._flippedY=e,this._renderer.updateScaleY(),this.invalidateHitboxes())}isFlippedX(){return this._flippedX}isFlippedY(){return this._flippedY}getScale(){const e=Math.abs(this._scaleX),t=Math.abs(this._scaleY);return e===t?e:Math.sqrt(e*t)}getScaleY(){return Math.abs(this._scaleY)}getScaleX(){return Math.abs(this._scaleX)}invalidateBounds(){this.invalidateHitboxes()}getDrawableX(){return this._renderer.getDrawableX()}getDrawableY(){return this._renderer.getDrawableY()}getWidth(){return this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}updatePreRender(e){this._renderer.updatePreRender()}transformToDrawing(e,t){const i=a._pointForTransformation;return i[0]=e,i[1]=t,this._renderer.transformToDrawing(i)}transformToScene(e,t){const i=a._pointForTransformation;return i[0]=e,i[1]=t,this._renderer.transformToScene(i)}transformToDrawingX(e,t){return this.transformToDrawing(e,t)[0]}transformToDrawingY(e,t){return this.transformToDrawing(e,t)[1]}transformToSceneX(e,t){return this.transformToScene(e,t)[0]}transformToSceneY(e,t){return this.transformToScene(e,t)[1]}setRectangularCollisionMask(e,t,i,o){if(!this._customCollisionMask){const l=new s.Polygon;l.vertices.push([0,0]),l.vertices.push([0,0]),l.vertices.push([0,0]),l.vertices.push([0,0]),this._customCollisionMask=[l]}const r=this._customCollisionMask[0].vertices;r[0][0]=e,r[0][1]=t,r[1][0]=i,r[1][1]=t,r[2][0]=i,r[2][1]=o,r[3][0]=e,r[3][1]=o,this.invalidateHitboxes()}updateHitBoxes(){this.hitBoxes=this._defaultHitBoxes;const e=this.getWidth(),t=this.getHeight(),i=this.getCenterX(),o=this.getCenterY(),r=this.hitBoxes[0].vertices;if(this._customCollisionMask){const l=this._customCollisionMask[0].vertices;for(let n=0;n<4;n++){const f=this.transformToScene(l[n][0],l[n][1]);r[n][0]=f[0],r[n][1]=f[1]}}else i===e/2&&o===t/2?(r[0][0]=-i,r[0][1]=-o,r[1][0]=+i,r[1][1]=-o,r[2][0]=+i,r[2][1]=+o,r[3][0]=-i,r[3][1]=+o):(r[0][0]=0-i,r[0][1]=0-o,r[1][0]=e-i,r[1][1]=0-o,r[2][0]=e-i,r[2][1]=t-o,r[3][0]=0-i,r[3][1]=t-o),this._useAbsoluteCoordinates||this.hitBoxes[0].rotate(s.toRad(this.getAngle())),this.hitBoxes[0].move(this.getDrawableX()+i,this.getDrawableY()+o)}};let h=a;h._pointForTransformation=[0,0],s.ShapePainterRuntimeObject=h,s.registerObject("PrimitiveDrawing::Drawer",s.ShapePainterRuntimeObject),h.supportsReinitialization=!1})(gdjs||(gdjs={}));
|
|
1
|
+
var gdjs;(function(s){const n=class extends s.RuntimeObject{constructor(e,t){super(e,t);this._scaleX=1;this._scaleY=1;this._blendMode=0;this._flippedX=!1;this._flippedY=!1;this._customCenter=null;this._customCollisionMask=null;this._fillColor=typeof t.fillColor=="string"?s.rgbOrHexStringToNumber(t.fillColor):parseInt(s.rgbToHex(t.fillColor.r,t.fillColor.g,t.fillColor.b),16),this._outlineColor=typeof t.outlineColor=="string"?s.rgbOrHexStringToNumber(t.outlineColor):parseInt(s.rgbToHex(t.outlineColor.r,t.outlineColor.g,t.outlineColor.b),16),this._fillOpacity=t.fillOpacity,this._outlineOpacity=t.outlineOpacity,this._outlineSize=t.outlineSize,this._useAbsoluteCoordinates=t.absoluteCoordinates,this._clearBetweenFrames=t.clearBetweenFrames,this._antialiasing=t.antialiasing,this._renderer=new s.ShapePainterRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(e,t){return typeof t.fillColor=="string"&&e.fillColor!==t.fillColor&&this.setFillColor(t.fillColor),typeof e.fillColor!="string"&&typeof t.fillColor!="string"&&(e.fillColor.r!==t.fillColor.r||e.fillColor.g!==t.fillColor.g||e.fillColor.b!==t.fillColor.b)&&this.setFillColor(""+t.fillColor.r+";"+t.fillColor.g+";"+t.fillColor.b),typeof t.outlineColor=="string"&&e.outlineColor!==t.outlineColor&&this.setOutlineColor(t.outlineColor),typeof e.outlineColor!="string"&&typeof t.outlineColor!="string"&&(e.outlineColor.r!==t.outlineColor.r||e.outlineColor.g!==t.outlineColor.g||e.outlineColor.b!==t.outlineColor.b)&&this.setOutlineColor(""+t.outlineColor.r+";"+t.outlineColor.g+";"+t.outlineColor.b),e.fillOpacity!==t.fillOpacity&&this.setFillOpacity(t.fillOpacity),e.outlineOpacity!==t.outlineOpacity&&this.setOutlineOpacity(t.outlineOpacity),e.outlineSize!==t.outlineSize&&this.setOutlineSize(t.outlineSize),e.absoluteCoordinates!==t.absoluteCoordinates&&(this._useAbsoluteCoordinates=t.absoluteCoordinates,this._renderer.updatePositionX(),this._renderer.updatePositionY(),this._renderer.updateAngle(),this._renderer.updateScaleX(),this._renderer.updateScaleY()),e.clearBetweenFrames!==t.clearBetweenFrames&&(this._clearBetweenFrames=t.clearBetweenFrames),e.antialiasing!==t.antialiasing&&this.setAntialiasing(t.antialiasing),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),cbf:this._clearBetweenFrames,aa:this._antialiasing,ac:this._useAbsoluteCoordinates,fc:this._fillColor,oc:this._outlineColor,os:this._outlineSize,fo:this._fillOpacity,oo:this._outlineOpacity,scaleX:this.getScaleX(),scaleY:this.getScaleY(),ifx:this._flippedX,ify:this._flippedY}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.cbf!==void 0&&(this._clearBetweenFrames=e.cbf),e.aa!==void 0&&this.setAntialiasing(e.aa),e.ac!==void 0&&this.setCoordinatesRelative(!e.ac),e.fc!==void 0&&(this._fillColor=e.fc),e.oc!==void 0&&(this._outlineColor=e.oc),e.os!==void 0&&this.setOutlineSize(e.os),e.fo!==void 0&&this.setFillOpacity(e.fo),e.oo!==void 0&&this.setOutlineOpacity(e.oo),e.scaleX!==void 0&&this.setScaleX(e.scaleX),e.scaleY!==void 0&&this.setScaleY(e.scaleY),e.ifx!==void 0&&this.flipX(e.ifx),e.ify!==void 0&&this.flipY(e.ify)}extraInitializationFromInitialInstance(e){e.flippedX&&this.flipX(e.flippedX),e.flippedY&&this.flipY(e.flippedY)}stepBehaviorsPreEvents(e){this._clearBetweenFrames&&this.clear(),super.stepBehaviorsPreEvents(e)}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}clear(){this._renderer.clear()}getVisibilityAABB(){return this._useAbsoluteCoordinates?null:this.getAABB()}drawRectangle(e,t,i,o){this._renderer.drawRectangle(e,t,i,o)}drawCircle(e,t,i){this._renderer.drawCircle(e,t,i)}drawLine(e,t,i,o,r){this._renderer.drawLine(e,t,i,o,r)}drawLineV2(e,t,i,o,r){this._renderer.drawLineV2(e,t,i,o,r)}drawEllipse(e,t,i,o){this._renderer.drawEllipse(e,t,i,o)}drawFilletRectangle(e,t,i,o,r){this._renderer.drawFilletRectangle(e,t,i,o,r)}drawRoundedRectangle(e,t,i,o,r){this._renderer.drawRoundedRectangle(e,t,i,o,r)}drawChamferRectangle(e,t,i,o,r){this._renderer.drawChamferRectangle(e,t,i,o,r)}drawTorus(e,t,i,o,r,l){this._renderer.drawTorus(e,t,i,o,r,l)}drawRegularPolygon(e,t,i,o,r){this._renderer.drawRegularPolygon(e,t,i,o,r)}drawStar(e,t,i,o,r,l){this._renderer.drawStar(e,t,i,o,r,l)}drawArc(e,t,i,o,r,l,a){this._renderer.drawArc(e,t,i,o,r,l,a)}drawBezierCurve(e,t,i,o,r,l,a,f){this._renderer.drawBezierCurve(e,t,i,o,r,l,a,f)}drawQuadraticCurve(e,t,i,o,r,l){this._renderer.drawQuadraticCurve(e,t,i,o,r,l)}beginFillPath(e,t){this._renderer.beginFillPath(),this._renderer.drawPathMoveTo(e,t)}endFillPath(){this._renderer.endFillPath()}drawPathMoveTo(e,t){this._renderer.drawPathMoveTo(e,t)}drawPathLineTo(e,t){this._renderer.drawPathLineTo(e,t)}drawPathBezierCurveTo(e,t,i,o,r,l){this._renderer.drawPathBezierCurveTo(e,t,i,o,r,l)}drawPathArc(e,t,i,o,r,l){this._renderer.drawPathArc(e,t,i,o,r,l)}drawPathQuadraticCurveTo(e,t,i,o){this._renderer.drawPathQuadraticCurveTo(e,t,i,o)}closePath(){this._renderer.closePath()}setClearBetweenFrames(e){this._clearBetweenFrames=e}isClearedBetweenFrames(){return this._clearBetweenFrames}setAntialiasing(e){this._antialiasing=e,this._renderer.updateAntialiasing()}getAntialiasing(){return this._antialiasing}checkAntialiasing(e){return this._antialiasing===e}setCoordinatesRelative(e){this._useAbsoluteCoordinates=!e}areCoordinatesRelative(){return!this._useAbsoluteCoordinates}setFillColor(e){this._fillColor=s.rgbOrHexStringToNumber(e)}getFillColorR(){return s.hexNumberToRGB(this._fillColor).r}getFillColorG(){return s.hexNumberToRGB(this._fillColor).g}getFillColorB(){return s.hexNumberToRGB(this._fillColor).b}setOutlineColor(e){this._outlineColor=s.rgbOrHexStringToNumber(e),this._renderer.updateOutline()}getOutlineColorR(){return s.hexNumberToRGB(this._outlineColor).r}getOutlineColorG(){return s.hexNumberToRGB(this._outlineColor).g}getOutlineColorB(){return s.hexNumberToRGB(this._outlineColor).b}setOutlineSize(e){this._outlineSize=e,this._renderer.updateOutline()}getOutlineSize(){return this._outlineSize}setFillOpacity(e){this._fillOpacity=e}getFillOpacity(){return this._fillOpacity}setOutlineOpacity(e){this._outlineOpacity=e,this._renderer.updateOutline()}getOutlineOpacity(){return this._outlineOpacity}setX(e){e!==this.x&&(super.setX(e),this._renderer.updatePositionX())}setY(e){e!==this.y&&(super.setY(e),this._renderer.updatePositionY())}setAngle(e){e!==this.angle&&(super.setAngle(e),this._renderer.updateAngle(),this.invalidateHitboxes())}setRotationCenter(e,t){this._customCenter||(this._customCenter=[0,0]),this._customCenter[0]=e,this._customCenter[1]=t,this._renderer.updateRotationCenter()}getRotationCenterX(){return this._customCenter?this._customCenter[0]:this._renderer.getUnscaledWidth()/2-this._renderer.getFrameRelativeOriginX()}getRotationCenterY(){return this._customCenter?this._customCenter[1]:this._renderer.getUnscaledHeight()/2-this._renderer.getFrameRelativeOriginY()}getCenterX(){return this._customCenter?this._customCenter[0]*Math.abs(this._scaleX)+this.getX()-this.getDrawableX():super.getCenterX()}getCenterY(){return this._customCenter?this._customCenter[1]*Math.abs(this._scaleY)+this.getY()-this.getDrawableY():super.getCenterY()}setWidth(e){const t=this._renderer.getUnscaledWidth();t!==0&&this.setScaleX(e/t)}setHeight(e){const t=this._renderer.getUnscaledHeight();t!==0&&this.setScaleY(e/t)}setSize(e,t){this.setWidth(e),this.setHeight(t)}setScale(e){this.setScaleX(e),this.setScaleY(e)}setScaleX(e){e<0&&(e=0),e!==Math.abs(this._scaleX)&&(this._scaleX=e*(this._flippedX?-1:1),this._renderer.updateScaleX(),this.invalidateHitboxes())}setScaleY(e){e<0&&(e=0),e!==Math.abs(this._scaleY)&&(this._scaleY=e*(this._flippedY?-1:1),this._renderer.updateScaleY(),this.invalidateHitboxes())}flipX(e){e!==this._flippedX&&(this._scaleX*=-1,this._flippedX=e,this._renderer.updateScaleX(),this.invalidateHitboxes())}flipY(e){e!==this._flippedY&&(this._scaleY*=-1,this._flippedY=e,this._renderer.updateScaleY(),this.invalidateHitboxes())}isFlippedX(){return this._flippedX}isFlippedY(){return this._flippedY}getScale(){const e=Math.abs(this._scaleX),t=Math.abs(this._scaleY);return e===t?e:Math.sqrt(e*t)}getScaleY(){return Math.abs(this._scaleY)}getScaleX(){return Math.abs(this._scaleX)}invalidateBounds(){this.invalidateHitboxes()}getDrawableX(){return this._renderer.getDrawableX()}getDrawableY(){return this._renderer.getDrawableY()}getWidth(){return this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}updatePreRender(e){this._renderer.updatePreRender()}transformToDrawing(e,t){const i=n._pointForTransformation;return i[0]=e,i[1]=t,this._renderer.transformToDrawing(i)}transformToScene(e,t){const i=n._pointForTransformation;return i[0]=e,i[1]=t,this._renderer.transformToScene(i)}transformToDrawingX(e,t){return this.transformToDrawing(e,t)[0]}transformToDrawingY(e,t){return this.transformToDrawing(e,t)[1]}transformToSceneX(e,t){return this.transformToScene(e,t)[0]}transformToSceneY(e,t){return this.transformToScene(e,t)[1]}setRectangularCollisionMask(e,t,i,o){if(!this._customCollisionMask){const l=new s.Polygon;l.vertices.push([0,0]),l.vertices.push([0,0]),l.vertices.push([0,0]),l.vertices.push([0,0]),this._customCollisionMask=[l]}const r=this._customCollisionMask[0].vertices;r[0][0]=e,r[0][1]=t,r[1][0]=i,r[1][1]=t,r[2][0]=i,r[2][1]=o,r[3][0]=e,r[3][1]=o,this.invalidateHitboxes()}updateHitBoxes(){this.hitBoxes=this._defaultHitBoxes;const e=this.getWidth(),t=this.getHeight(),i=this.getCenterX(),o=this.getCenterY(),r=this.hitBoxes[0].vertices;if(this._customCollisionMask){const l=this._customCollisionMask[0].vertices;for(let a=0;a<4;a++){const f=this.transformToScene(l[a][0],l[a][1]);r[a][0]=f[0],r[a][1]=f[1]}}else i===e/2&&o===t/2?(r[0][0]=-i,r[0][1]=-o,r[1][0]=+i,r[1][1]=-o,r[2][0]=+i,r[2][1]=+o,r[3][0]=-i,r[3][1]=+o):(r[0][0]=0-i,r[0][1]=0-o,r[1][0]=e-i,r[1][1]=0-o,r[2][0]=e-i,r[2][1]=t-o,r[3][0]=0-i,r[3][1]=t-o),this._useAbsoluteCoordinates||this.hitBoxes[0].rotate(s.toRad(this.getAngle())),this.hitBoxes[0].move(this.getDrawableX()+i,this.getDrawableY()+o)}};let h=n;h._pointForTransformation=[0,0],s.ShapePainterRuntimeObject=h,s.registerObject("PrimitiveDrawing::Drawer",s.ShapePainterRuntimeObject),h.supportsReinitialization=!1})(gdjs||(gdjs={}));
|
|
2
2
|
//# sourceMappingURL=shapepainterruntimeobject.js.map
|
|
@@ -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 of the inner part of the painted shape */\n fillColor: RGBColor | string;\n /** The color of the outline of the painted shape */\n outlineColor: RGBColor | string;\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 {\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 =\n typeof shapePainterObjectData.fillColor === 'string'\n ? gdjs.rgbOrHexStringToNumber(shapePainterObjectData.fillColor)\n : parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.fillColor.r,\n shapePainterObjectData.fillColor.g,\n shapePainterObjectData.fillColor.b\n ),\n 16\n );\n this._outlineColor =\n typeof shapePainterObjectData.outlineColor === 'string'\n ? gdjs.rgbOrHexStringToNumber(shapePainterObjectData.outlineColor)\n : 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 (typeof newObjectData.fillColor === 'string') {\n if (oldObjectData.fillColor !== newObjectData.fillColor) {\n this.setFillColor(newObjectData.fillColor);\n }\n }\n if (\n typeof oldObjectData.fillColor !== 'string' &&\n typeof newObjectData.fillColor !== 'string' &&\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 (typeof newObjectData.outlineColor === 'string') {\n if (oldObjectData.outlineColor !== newObjectData.outlineColor) {\n this.setOutlineColor(newObjectData.outlineColor);\n }\n }\n if (\n typeof oldObjectData.outlineColor !== 'string' &&\n typeof newObjectData.outlineColor !== 'string' &&\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 if (oldObjectData.antialiasing !== newObjectData.antialiasing) {\n this.setAntialiasing(newObjectData.antialiasing);\n }\n\n return true;\n }\n\n /**\n * Initialize the extra parameters that could be set for an instance.\n * @param initialInstanceData The extra parameters\n */\n extraInitializationFromInitialInstance(initialInstanceData: InstanceData) {\n if (initialInstanceData.flippedX) {\n this.flipX(initialInstanceData.flippedX);\n }\n if (initialInstanceData.flippedY) {\n this.flipY(initialInstanceData.flippedY);\n }\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 setFillColor(color: string): void {\n this._fillColor = gdjs.rgbOrHexStringToNumber(color);\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 setOutlineColor(rgbColor: string): void {\n this._outlineColor = gdjs.rgbOrHexStringToNumber(rgbColor);\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 =\n this._customCollisionMask[0].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,
|
|
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 of the inner part of the painted shape */\n fillColor: RGBColor | string;\n /** The color of the outline of the painted shape */\n outlineColor: RGBColor | string;\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 type ShapePainterNetworkSyncDataType = {\n cbf: boolean; // clearBetweenFrames\n aa: Antialiasing; // antialiasing\n ac: boolean; // absoluteCoordinates\n fc: integer; // fillColor\n oc: integer; // outlineColor\n os: float; // outlineSize\n fo: float; // fillOpacity\n oo: float; // outlineOpacity\n scaleX: number;\n scaleY: number;\n ifx: boolean; // isFlippedX\n ify: boolean; // isFlippedY\n };\n\n export type ShapePainterNetworkSyncData = ObjectNetworkSyncData &\n ShapePainterNetworkSyncDataType;\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 {\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 =\n typeof shapePainterObjectData.fillColor === 'string'\n ? gdjs.rgbOrHexStringToNumber(shapePainterObjectData.fillColor)\n : parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.fillColor.r,\n shapePainterObjectData.fillColor.g,\n shapePainterObjectData.fillColor.b\n ),\n 16\n );\n this._outlineColor =\n typeof shapePainterObjectData.outlineColor === 'string'\n ? gdjs.rgbOrHexStringToNumber(shapePainterObjectData.outlineColor)\n : 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 (typeof newObjectData.fillColor === 'string') {\n if (oldObjectData.fillColor !== newObjectData.fillColor) {\n this.setFillColor(newObjectData.fillColor);\n }\n }\n if (\n typeof oldObjectData.fillColor !== 'string' &&\n typeof newObjectData.fillColor !== 'string' &&\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 (typeof newObjectData.outlineColor === 'string') {\n if (oldObjectData.outlineColor !== newObjectData.outlineColor) {\n this.setOutlineColor(newObjectData.outlineColor);\n }\n }\n if (\n typeof oldObjectData.outlineColor !== 'string' &&\n typeof newObjectData.outlineColor !== 'string' &&\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 if (oldObjectData.antialiasing !== newObjectData.antialiasing) {\n this.setAntialiasing(newObjectData.antialiasing);\n }\n\n return true;\n }\n\n getNetworkSyncData(\n syncOptions: GetNetworkSyncDataOptions\n ): ShapePainterNetworkSyncData {\n return {\n ...super.getNetworkSyncData(syncOptions),\n cbf: this._clearBetweenFrames,\n aa: this._antialiasing,\n ac: this._useAbsoluteCoordinates,\n fc: this._fillColor,\n oc: this._outlineColor,\n os: this._outlineSize,\n fo: this._fillOpacity,\n oo: this._outlineOpacity,\n scaleX: this.getScaleX(),\n scaleY: this.getScaleY(),\n ifx: this._flippedX,\n ify: this._flippedY,\n };\n }\n\n updateFromNetworkSyncData(\n networkSyncData: ShapePainterNetworkSyncData,\n options: UpdateFromNetworkSyncDataOptions\n ): void {\n super.updateFromNetworkSyncData(networkSyncData, options);\n\n if (networkSyncData.cbf !== undefined) {\n this._clearBetweenFrames = networkSyncData.cbf;\n }\n if (networkSyncData.aa !== undefined) {\n this.setAntialiasing(networkSyncData.aa);\n }\n if (networkSyncData.ac !== undefined) {\n this.setCoordinatesRelative(!networkSyncData.ac);\n }\n if (networkSyncData.fc !== undefined) {\n this._fillColor = networkSyncData.fc;\n }\n if (networkSyncData.oc !== undefined) {\n this._outlineColor = networkSyncData.oc;\n }\n if (networkSyncData.os !== undefined) {\n this.setOutlineSize(networkSyncData.os);\n }\n if (networkSyncData.fo !== undefined) {\n this.setFillOpacity(networkSyncData.fo);\n }\n if (networkSyncData.oo !== undefined) {\n this.setOutlineOpacity(networkSyncData.oo);\n }\n if (networkSyncData.scaleX !== undefined) {\n this.setScaleX(networkSyncData.scaleX);\n }\n if (networkSyncData.scaleY !== undefined) {\n this.setScaleY(networkSyncData.scaleY);\n }\n if (networkSyncData.ifx !== undefined) {\n this.flipX(networkSyncData.ifx);\n }\n if (networkSyncData.ify !== undefined) {\n this.flipY(networkSyncData.ify);\n }\n }\n\n /**\n * Initialize the extra parameters that could be set for an instance.\n * @param initialInstanceData The extra parameters\n */\n extraInitializationFromInitialInstance(initialInstanceData: InstanceData) {\n if (initialInstanceData.flippedX) {\n this.flipX(initialInstanceData.flippedX);\n }\n if (initialInstanceData.flippedY) {\n this.flipY(initialInstanceData.flippedY);\n }\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 setFillColor(color: string): void {\n this._fillColor = gdjs.rgbOrHexStringToNumber(color);\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 setOutlineColor(rgbColor: string): void {\n this._outlineColor = gdjs.rgbOrHexStringToNumber(rgbColor);\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 =\n this._customCollisionMask[0].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,CAwDS,qBACG,GAAK,aAEf,CAyBE,YACE,EACA,EACA,CACA,MAAM,EAAmB,GA5B3B,aAAkB,EAClB,aAAkB,EAClB,gBAAqB,EACrB,eAAqB,GACrB,eAAqB,GACrB,mBAAmC,KACnC,0BAAyC,KAuBvC,KAAK,WACH,MAAO,GAAuB,WAAc,SACxC,EAAK,uBAAuB,EAAuB,WACnD,SACE,EAAK,SACH,EAAuB,UAAU,EACjC,EAAuB,UAAU,EACjC,EAAuB,UAAU,GAEnC,IAER,KAAK,cACH,MAAO,GAAuB,cAAiB,SAC3C,EAAK,uBAAuB,EAAuB,cACnD,SACE,EAAK,SACH,EAAuB,aAAa,EACpC,EAAuB,aAAa,EACpC,EAAuB,aAAa,GAEtC,IAER,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,G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5C,KAAK,UAAU,WAAW,EAAG,EAAG,GAGlC,SAAS,EAAW,EAAW,EAAW,EAAW,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,oBACE,EACA,EACA,EACA,EACA,EACA,CACA,KAAK,UAAU,oBACb,EACA,EACA,EACA,EACA,GAIJ,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,EAA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