From a02c81d7c40d58b3bcd2c96b6df54ce4e06a6a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 28 Mar 2026 18:07:51 +0100 Subject: [PATCH 1/9] Test the spot light --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 16283 +++++++++++----- .../3d-car-coin-hunt/assets/LightGlow.png | Bin 0 -> 1673 bytes 2 files changed, 10921 insertions(+), 5362 deletions(-) create mode 100644 examples/3d-car-coin-hunt/assets/LightGlow.png diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index a762c7f90..fca7ba961 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 253, + "build": 262, "major": 5, "minor": 6, "revision": 0 @@ -687,6 +687,26 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/3D City Kit (Roads)/Ground/0ecdbe600c3efca2dfce618286081460c6a079cff0dce79f21ae9514ca4a2896_Road Slant Curve.glb", "name": "Road Slant Curve.glb" } + }, + { + "file": "assets/New image.png", + "kind": "image", + "metadata": "{\"extension\":\".png\",\"pskl\":{},\"localFilePath\":\"assets/New image.png\"}", + "name": "New image", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/LightGlow.png", + "kind": "image", + "metadata": "", + "name": "LightGlow.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/3D Particles/c17e2d500015e598624b763f4942b26e3aac96efca094cd20257a61e15b27fcb_LightGlow.png", + "name": "LightGlow.png" + } } ] }, @@ -1212,10 +1232,10 @@ "gridColor": 10401023, "gridAlpha": 0.5, "snap": true, - "zoomFactor": 0.2550455473354349, + "zoomFactor": 0.5117784035210203, "windowMask": false, "selectedLayer": "", - "gameEditorMode": "embedded-game" + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -2756,12 +2776,14 @@ "initialVariables": [] }, { - "angle": 61, + "angle": 53, "customSize": false, "height": 0, "layer": "", "name": "CommonTree", "persistentUuid": "10990ae3-86ae-4dc3-af87-9f72cfbed80e", + "rotationX": 24, + "rotationY": 324, "width": 0, "x": -230, "y": 958, @@ -3077,6 +3099,7 @@ "layer": "", "name": "LargeBuildingA", "persistentUuid": "7fbca3aa-2a94-4cb9-b9e1-60168fcdd3a6", + "rotationX": 2, "width": 0, "x": -192, "y": 0, @@ -5824,9 +5847,83 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 209, + "layer": "", + "name": "NewSpotLight", + "persistentUuid": "1841bf79-51ac-4a73-89ec-ac26e2c86e5f", + "rotationX": 337, + "rotationY": 90, + "width": 2889, + "x": -640, + "y": 1280, + "z": 576, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 15, + "customSize": false, + "height": 229.99999999999997, + "keepRatio": true, + "layer": "", + "name": "CarWithLight", + "persistentUuid": "2a179987-fdc0-449f-a695-861669abf036", + "width": 84, + "x": -128, + "y": 1024, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ + { + "assetStoreId": "", + "name": "CarWithLight", + "persistentUuid": "8c68bc8b-a967-4437-aded-55676b77618b", + "type": "CarWithLight::CarWithLight", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Dynamic", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 5, + "friction": 0.5, + "restitution": 0.2, + "linearDamping": 7, + "angularDamping": 4, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": {} + }, { "assetStoreId": "", "name": "Dust", @@ -6259,6 +6356,7 @@ { "assetStoreId": "cddab55130dbd5a0b36f763200e876fb514aa608e1b057a136ebdb5f80006e2c", "name": "Player", + "persistentUuid": "1191f784-512d-4be4-812e-dafc9fc90438", "type": "Scene3D::Model3DObject", "variables": [ { @@ -6450,6 +6548,7 @@ { "assetStoreId": "541d82997e1d0e79b20a617cfcc249d1169d838db8512612894f18d64ea7374f", "name": "LargeBuildingF", + "persistentUuid": "c2cefe95-bc71-422b-b02c-bd5add6a5ece", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6504,6 +6603,7 @@ { "assetStoreId": "479c508ead309e45d684605c3539fd2b3a3a3a1ea8a277f102e8366873aad249", "name": "LargeBuildingA", + "persistentUuid": "7b48ac43-d7c0-4a54-9f78-3a478c31f5a9", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6558,6 +6658,7 @@ { "assetStoreId": "fcb1a484380a00837bfc40406681f434dd57cce8bdf94694b237fc809bf7b4fb", "name": "SuvLuxury", + "persistentUuid": "8c3ec4d2-5fb2-4c24-a3e0-16fedb3d34b5", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6612,6 +6713,7 @@ { "assetStoreId": "0d7e7a700fe654df077830ff50844449cdaddbb46dbe23de65f970569e6a983b", "name": "Van", + "persistentUuid": "1b6bca7b-4c49-447e-bd6f-e01f6984557c", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6701,6 +6803,7 @@ { "assetStoreId": "bbdd1d6c7d452e1847310eb327cddabe057cb893886f3a7a1af1c38e353eac92", "name": "RoadStraight", + "persistentUuid": "942e6569-1aba-4fb8-b074-8f0a7898d9e6", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6755,6 +6858,7 @@ { "assetStoreId": "ae09642f549122b398405ffda9bd787c20f0fdfcb555a4535c710a3f218c8130", "name": "RoadCrossroadPath", + "persistentUuid": "01e095c5-60d6-4098-a600-f8f1ffc71b6c", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6830,6 +6934,7 @@ { "assetStoreId": "16fac9714ba0a9eb3c83984910c70b11affca1b4e6a8bed49c22af1d30f957da", "name": "CommonTree", + "persistentUuid": "bb29ff81-6779-40ec-9237-7e1f1c58ec30", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -7059,6 +7164,7 @@ { "assetStoreId": "0e3ee52ba8369c68fe75e3b34a056876ba39b1d0dbb9de6e83e1f2ea0e6f94ac", "name": "Coin", + "persistentUuid": "05ccb89d-e333-4fd9-bceb-ce4e2e070ad4", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -7144,6 +7250,50 @@ "width": 768, "animations": [] } + }, + { + "assetStoreId": "", + "name": "NewSpotLight", + "persistentUuid": "603e3582-a594-4477-b5a4-9662dc5b1c13", + "type": "SpotLight3D::SpotLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "content": { + "Color": "255;0;0", + "Smoothing": 0, + "Image": "New image", + "ShadowQuality": "Low", + "ConeAngle": 30 + } + }, + { + "assetStoreId": "", + "name": "NewMyObject", + "persistentUuid": "fec09ba1-5902-4c82-823b-3674de8a2bf6", + "type": "UntitledExtension::MyObject", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + }, + { + "assetStoreId": "", + "name": "NewMyObject2", + "persistentUuid": "87b23a22-256f-4a00-9451-786380e34c12", + "type": "UntitledExtension::MyObject2", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} } ], "objectsFolderStructure": { @@ -7241,6 +7391,18 @@ }, { "objectName": "Coin" + }, + { + "objectName": "NewMyObject" + }, + { + "objectName": "NewMyObject2" + }, + { + "objectName": "NewSpotLight" + }, + { + "objectName": "CarWithLight" } ] }, @@ -7282,6 +7444,53 @@ "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularFloodFill::CreateObjectsOverRectangle" + }, + "parameters": [ + "", + "NewSpotLight", + "8", + "8", + "Player.X()", + "Player.Y()", + "1000", + "1000", + "", + "0", + "" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::TurnAroundY" + }, + "parameters": [ + "NewSpotLight", + "Object3D", + "90" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "NewSpotLight", + "Object3D", + "=", + "400" + ] + } + ] + } ] }, { @@ -8464,6 +8673,138 @@ "parameters": [] } ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "NewSpotLight", + "30", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "NewSpotLight", + "Object3D", + "+", + "30 * TimeDelta()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "NewSpotLight", + "0", + "20", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpotLight3D::SpotLight3D::LookAtObject" + }, + "parameters": [ + "NewSpotLight", + "Player", + "Object3D", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::IsPlaying" + }, + "parameters": [ + "NewSpotLight", + "Tween", + "\"Color\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetColor" + }, + "parameters": [ + "NewSpotLight", + "=", + "\"208;2;27\"", + "" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectColorTween2" + }, + "parameters": [ + "NewSpotLight", + "Tween", + "\"Color\"", + "\"248;231;28\"", + "\"linear\"", + "3", + "", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "ToString(NewSpotLight.Width()) + \" \" + ToString(NewSpotLight.Height()) + \" \" + ToString(NewSpotLight.Object3D::Depth())", + "\"info\"", + "" + ] + } + ] } ], "layers": [ @@ -8502,12 +8843,12 @@ "distanceFromCamera": 1500, "elevation": 40, "frustumSize": 4000, - "intensity": 0.75, + "intensity": 0.3, "minimumShadowBias": 0, "rotation": 300 }, "stringParameters": { - "color": "255;255;255", + "color": "52;100;255", "shadowQuality": "medium", "top": "Z+" }, @@ -8522,7 +8863,7 @@ "density": 0.0006 }, "stringParameters": { - "color": "239;254;255" + "color": "22;42;105" }, "booleanParameters": {} }, @@ -8531,12 +8872,12 @@ "name": "HemisphereLight", "doubleParameters": { "elevation": 80, - "intensity": 0.33, + "intensity": 0.2, "rotation": 120 }, "stringParameters": { - "groundColor": "128;128;128", - "skyColor": "255;255;255", + "groundColor": "0;0;0", + "skyColor": "52;100;255", "top": "Z+" }, "booleanParameters": {} @@ -8723,6 +9064,10 @@ { "name": "ThirdPersonCamera", "type": "ThirdPersonCamera::ThirdPersonCamera" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ] }, @@ -9283,124 +9628,802 @@ "type": "ScreenWrap::ScreenWrap" } ] - } - ], - "externalEvents": [], - "eventsFunctionsExtensions": [ + }, { - "author": "", - "category": "Input", - "extensionNamespace": "", - "fullName": "Screen Orientation Checker", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", - "name": "ScreenOrientationChecker", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", - "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.2.2", - "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "origin": { - "identifier": "ScreenOrientationChecker", - "name": "gdevelop-extension-store" + "b": 83, + "disableInputWhenNotFocused": true, + "mangledName": "Untitled_32scene", + "name": "Untitled scene", + "r": 83, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 83, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.546875, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "embedded-game" }, - "tags": [ - "screen", - "orientation" + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 100, + "layer": "", + "name": "NewMyObject", + "persistentUuid": "a688ee58-a45a-41ea-9991-69edc29534d1", + "width": 100, + "x": 0, + "y": 0, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + "objects": [ + { + "assetStoreId": "", + "name": "NewMyObject2", + "persistentUuid": "4d95a9bf-32e5-43fc-ad8b-774d0c9d0d8d", + "type": "UntitledExtension::MyObject2", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + }, + { + "assetStoreId": "", + "name": "NewMyObject", + "persistentUuid": "1b73ba89-d129-41e4-8383-147a19ab77bb", + "type": "UntitledExtension::MyObject", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + } ], - "dependencies": [], - "globalVariables": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "NewMyObject2" + }, + { + "objectName": "NewMyObject" + } + ] + }, + "events": [ { - "name": "TargetOrientation", - "type": "string", - "value": "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ], - "sceneVariables": [], - "eventsFunctions": [ + "layers": [ { - "description": "Check if the events are running for the editor.", - "fullName": "Editor is running", - "functionType": "Condition", - "name": "IsInGameEdition", - "private": true, - "sentence": "Events are running for the editor", - "events": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const game = runtimeScene.getGame();\r", - "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "parameters": [], - "objectGroups": [] - }, - { - "fullName": "Get game target orientation", - "functionType": "StringExpression", - "name": "ProjectOrientation", - "private": true, - "sentence": "", - "events": [ + "effects": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = runtimeScene.getGame().getGameData().properties.orientation;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "effectType": "Scene3D::HemisphereLight", + "name": "3D Ambient Hemisphere Light", + "doubleParameters": { + "elevation": 40, + "intensity": 0.33, + "rotation": 300 + }, + "stringParameters": { + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" + }, + "booleanParameters": {} + }, + { + "effectType": "Scene3D::DirectionalLight", + "name": "3D Sun Light", + "doubleParameters": { + "distanceFromCamera": 1500, + "elevation": 40, + "frustumSize": 4000, + "intensity": 0.75, + "minimumShadowBias": 0, + "rotation": 300 + }, + "stringParameters": { + "color": "255;255;255", + "shadowQuality": "medium", + "top": "Z+" + }, + "booleanParameters": { + "isCastingShadow": true + } } - ], - "expressionType": { - "type": "string" - }, - "parameters": [], - "objectGroups": [] + ] + } + ], + "behaviorsSharedData": [ + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" }, { - "fullName": "", - "functionType": "Action", - "name": "onFirstSceneLoaded", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "ScreenOrientationChecker::ProjectOrientation()" - ] - } - ] - } - ], - "parameters": [], - "objectGroups": [] + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + } + ] + }, + { + "b": 95, + "disableInputWhenNotFocused": true, + "mangledName": "Untitled_32scene2", + "name": "Untitled scene2", + "r": 95, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 95, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.546875, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "LargeBuildingF", + "persistentUuid": "95953695-4e00-4bb9-8418-59cb2bf09ce3", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [ + "objects": [ { - "areaMaxX": 400, - "areaMaxY": 200, - "areaMaxZ": 0, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "", + "assetStoreId": "541d82997e1d0e79b20a617cfcc249d1169d838db8512612894f18d64ea7374f", + "name": "LargeBuildingF", + "persistentUuid": "e50997fc-f8fc-4710-9b25-39c410ce2aec", + "type": "Scene3D::Model3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 5, + "friction": 0.01, + "restitution": 0.01, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, + "depth": 282, + "height": 128, + "isCastingShadow": true, + "isReceivingShadow": true, + "keepAspectRatio": false, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "Large Building F2.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": 0, + "width": 384, + "animations": [] + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "LargeBuildingF" + } + ] + }, + "events": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [ + { + "effectType": "Scene3D::HemisphereLight", + "name": "3D Ambient Hemisphere Light", + "doubleParameters": { + "elevation": 40, + "intensity": 0.33, + "rotation": 300 + }, + "stringParameters": { + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" + }, + "booleanParameters": {} + }, + { + "effectType": "Scene3D::DirectionalLight", + "name": "3D Sun Light", + "doubleParameters": { + "distanceFromCamera": 1500, + "elevation": 40, + "frustumSize": 4000, + "intensity": 0.75, + "minimumShadowBias": 0, + "rotation": 300 + }, + "stringParameters": { + "color": "255;255;255", + "shadowQuality": "medium", + "top": "Z+" + }, + "booleanParameters": { + "isCastingShadow": true + } + } + ] + } + ], + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "gravityX": 0, + "gravityY": 0, + "gravityZ": -9.8, + "worldScale": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + } + ] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "", + "dimension": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "CarWithLight", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 84, + "areaMaxY": 45, + "areaMaxZ": 39, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", + "description": "", + "fullName": "", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "CarWithLight", + "objects": [ + { + "assetStoreId": "fcb1a484380a00837bfc40406681f434dd57cce8bdf94694b237fc809bf7b4fb", + "name": "SuvLuxury2", + "persistentUuid": "3828f041-2098-4d60-96a7-eb69bbab4072", + "type": "Scene3D::Model3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, + "depth": 84, + "height": 84, + "isCastingShadow": true, + "isReceivingShadow": true, + "keepAspectRatio": true, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "Suv Luxury5.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": -90, + "width": 84, + "animations": [] + } + }, + { + "assetStoreId": "", + "name": "NewSpotLight", + "persistentUuid": "eeb6eabc-7138-4c11-b928-a4c84341087d", + "type": "SpotLight3D::SpotLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "content": { + "Color": "255;0;0", + "Smoothing": 0, + "Image": "New image" + } + }, + { + "assetStoreId": "351f05a136c91ee1d9d6ff4f9cfbc4d40b3744d7c7ea74212b4853862d52d974", + "name": "RedFlame", + "persistentUuid": "2bc4ffe0-28c2-4aca-89d0-02c449ec6be5", + "type": "ParticleEmitter3D::ParticleEmitter3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "EndColor": "128;0;0", + "StartColor": "160;80;40", + "StartOpacity": 204, + "SpayConeAngle": 30, + "StartSizeMin": 64, + "StartSizeMax": 64, + "EndScale": 0.375, + "Flow": 80, + "LifespanMin": 2, + "LifespanMax": 2, + "Duration": 123456, + "StartSpeedMin": 300, + "StartSpeedMax": 600, + "ShouldAutodestruct": true, + "EndOpacity": 48 + }, + "childrenContent": { + "Particle": { + "adaptCollisionMaskAutomatically": true, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Image", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "LightGlow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SuvLuxury2" + }, + { + "objectName": "NewSpotLight" + }, + { + "objectName": "RedFlame" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 45, + "layer": "", + "name": "SuvLuxury2", + "persistentUuid": "2effbf27-6e9a-459f-84da-7ee97fbce52c", + "width": 84, + "x": 42, + "y": 22.5, + "z": 6.6613381477509385e-15, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "NewSpotLight", + "persistentUuid": "836edb61-77b1-405d-9486-6e89f77402c4", + "width": 0, + "x": 87, + "y": 23, + "z": 24, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 32, + "layer": "", + "name": "RedFlame", + "persistentUuid": "32d80c42-1b6a-4def-a073-d647936b6f5a", + "rotationY": 90, + "width": 32, + "x": 82, + "y": 23, + "z": 24, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.587369443325651, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "embedded-game" + }, + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + }, + "variants": [] + } + ] + }, + { + "author": "", + "category": "Input", + "dimension": "", + "extensionNamespace": "", + "fullName": "Screen Orientation Checker", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", + "name": "ScreenOrientationChecker", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", + "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", + "version": "0.2.2", + "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", + "origin": { + "identifier": "ScreenOrientationChecker", + "name": "gdevelop-extension-store" + }, + "tags": [ + "screen", + "orientation" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + ], + "dependencies": [], + "globalVariables": [ + { + "name": "TargetOrientation", + "type": "string", + "value": "" + } + ], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Get game target orientation", + "functionType": "StringExpression", + "name": "ProjectOrientation", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = runtimeScene.getGame().getGameData().properties.orientation;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "ScreenOrientationChecker::ProjectOrientation()" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "ProjectOrientation" + }, + { + "functionName": "onFirstSceneLoaded" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", "description": "Automatically display a screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Set up Anchor behavior on this object so that top/bottom/left/right edges are anchored to the screen top/bottom/left/right.", "fullName": "Screen Orientation Checker", "isInnerAreaFollowingParentSize": true, @@ -10389,6 +11412,32 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "DrawBackground" + }, + { + "functionName": "IsForceShown" + }, + { + "functionName": "SetIsForceShown" + }, + { + "functionName": "Message" + }, + { + "functionName": "SetMessage" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10720,6 +11769,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -12928,6 +13978,104 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", @@ -13417,6 +14565,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13643,6 +14799,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13848,6 +15012,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14212,6 +15384,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -14292,6 +15465,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -14372,6 +15546,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -14452,6 +15627,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -14532,6 +15708,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -14612,6 +15789,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -14692,6 +15870,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -14772,6 +15951,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -14852,6 +16032,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -14888,6 +16069,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15357,6 +16623,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -16048,6 +17322,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -16143,6 +17425,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -18127,6 +19410,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", @@ -19031,6 +20393,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -19111,6 +20474,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -19191,6 +20555,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -19283,6 +20648,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -19850,6 +21285,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -20105,6 +21560,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20269,6 +21732,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20422,6 +21893,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20732,6 +22211,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -20812,6 +22292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -20892,6 +22373,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -20972,6 +22454,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -21052,6 +22535,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -21132,6 +22616,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -21212,6 +22697,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -21292,6 +22778,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -21372,6 +22859,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -21408,6 +22896,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -21712,6 +23285,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -22308,6 +23889,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -23460,6 +25049,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -23532,6 +25122,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -23604,6 +25195,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -23637,6 +25229,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -23751,6 +25422,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "3D car keyboard mapper", "gdevelopVersion": ">=5.5.222", @@ -23775,6 +25447,9 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Control a 3D physics car with a keyboard.", @@ -23931,6 +25606,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24003,6 +25686,7 @@ { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "3D object shake", "gdevelopVersion": ">=5.5.222", @@ -25325,6 +27009,71 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "Noise2d" + }, + { + "functionName": "Noise3d" + }, + { + "functionName": "Noise4d" + }, + { + "functionName": "Create" + }, + { + "functionName": "Delete" + }, + { + "functionName": "DeleteAll" + }, + { + "functionName": "SetSeed" + }, + { + "functionName": "SetLoopPeriodX" + }, + { + "functionName": "SetLoopPeriodY" + }, + { + "functionName": "SetFrequency" + }, + { + "functionName": "SetOctaves" + }, + { + "functionName": "SetPersistence" + }, + { + "functionName": "SetLacunarity" + }, + { + "functionName": "Seed" + }, + { + "functionName": "Frequency" + }, + { + "functionName": "Octaves" + }, + { + "functionName": "Persistence" + }, + { + "functionName": "Lacunarity" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Shake 3D objects with translation and rotation.", @@ -26379,6 +28128,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Frequency", + "group": "ShakeObject3D configuration", "name": "SetFrequency", "sentence": "", "events": [ @@ -26612,6 +28362,52 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "Shake" + }, + { + "functionName": "StartShaking" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + }, + { + "functionName": "IsStopping" + }, + { + "folderName": "ShakeObject3D configuration", + "children": [ + { + "functionName": "Frequency" + }, + { + "functionName": "SetFrequency" + } + ] + }, + { + "functionName": "StartEasingFactor" + }, + { + "functionName": "StopEasingFactor" + } + ] + }, "propertyDescriptors": [ { "value": "0", @@ -26844,6 +28640,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Third person camera", "gdevelopVersion": ">=5.5.222", @@ -27385,6 +29182,34 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "LookFromDistanceAtPosition" + }, + { + "functionName": "LookFromDistanceAtObject" + }, + { + "functionName": "LookFromDistanceAtPosition3D" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromDistanceAtObject3D" + } + ] + }, + { + "functionName": "RotatedX" + }, + { + "functionName": "RotatedY" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Smoothly follow an object at a distance.", @@ -28116,6 +29941,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationHalfwayDuration", + "group": "Third person camera configuration", "name": "SetRotationHalfwayDuration", "sentence": "", "events": [ @@ -28218,6 +30044,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ElevationHalfwayDuration", + "group": "Third person camera configuration", "name": "SetElevationHalfwayDuration", "sentence": "", "events": [ @@ -28320,6 +30147,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TranslationZHalfwayDuration", + "group": "Third person camera configuration", "name": "SetTranslationZHalfwayDuration", "sentence": "", "events": [ @@ -28506,6 +30334,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FollowFreeAreaZMax", + "group": "Third person camera configuration", "name": "SetFollowFreeAreaZMax", "sentence": "", "events": [ @@ -28586,6 +30415,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FollowFreeAreaZMin", + "group": "Third person camera configuration", "name": "SetFollowFreeAreaZMin", "sentence": "", "events": [ @@ -28666,6 +30496,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Distance", + "group": "Third person camera configuration", "name": "SetDistance", "sentence": "", "events": [ @@ -28746,6 +30577,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Third person camera configuration", "name": "SetOffsetX", "sentence": "", "events": [ @@ -28826,6 +30658,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Third person camera configuration", "name": "SetOffsetY", "sentence": "", "events": [ @@ -28906,6 +30739,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "Third person camera configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -28986,6 +30820,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationAngleOffset", + "group": "Third person camera configuration", "name": "SetRotationAngleOffset", "sentence": "", "events": [ @@ -29066,6 +30901,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ElevationAngleOffset", + "group": "Third person camera configuration", "name": "SetElevationAngleOffset", "sentence": "", "events": [ @@ -29146,6 +30982,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TargetedRotationAngle", + "group": "Third person camera configuration", "name": "SetTargetedRotationAngle", "sentence": "", "events": [ @@ -29192,6 +31029,120 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "JumpToTargetedRotation" + }, + { + "functionName": "RotationAngle" + }, + { + "functionName": "SetCameraRotation" + }, + { + "folderName": "Third person camera configuration", + "children": [ + { + "functionName": "RotationHalfwayDuration" + }, + { + "functionName": "SetRotationHalfwayDuration" + }, + { + "functionName": "ElevationHalfwayDuration" + }, + { + "functionName": "SetElevationHalfwayDuration" + }, + { + "functionName": "TranslationZHalfwayDuration" + }, + { + "functionName": "SetTranslationZHalfwayDuration" + }, + { + "functionName": "FollowFreeAreaZMax" + }, + { + "functionName": "SetFollowFreeAreaZMax" + }, + { + "functionName": "FollowFreeAreaZMin" + }, + { + "functionName": "SetFollowFreeAreaZMin" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SetDistance" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + }, + { + "functionName": "RotationAngleOffset" + }, + { + "functionName": "SetRotationAngleOffset" + }, + { + "functionName": "ElevationAngleOffset" + }, + { + "functionName": "SetElevationAngleOffset" + }, + { + "functionName": "TargetedRotationAngle" + }, + { + "functionName": "SetTargetedRotationAngle" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaZMin" + }, + { + "functionName": "FreeAreaZMax" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -29462,6 +31413,7 @@ { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -36329,6 +38281,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "onScenePreEvents" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -37395,6 +39358,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Z", + "group": "Position", "name": "SetZ", "private": true, "sentence": "", @@ -37467,6 +39431,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationX", + "group": "Angle", "name": "SetRotationX", "private": true, "sentence": "", @@ -37550,6 +39515,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationY", + "group": "Angle", "name": "SetRotationY", "private": true, "sentence": "", @@ -37632,6 +39598,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartColor", + "group": "3D particle emitter color configuration", "name": "SetStartColor", "sentence": "", "events": [ @@ -37714,6 +39681,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndColor", + "group": "3D particle emitter color configuration", "name": "SetEndColor", "sentence": "", "events": [ @@ -37796,6 +39764,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartOpacity", + "group": "3D particle emitter color configuration", "name": "SetStartOpacity", "sentence": "", "events": [ @@ -37878,6 +39847,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndOpacity", + "group": "3D particle emitter color configuration", "name": "SetEndOpacity", "sentence": "", "events": [ @@ -37960,6 +39930,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Flow", + "group": "3D particle emitter configuration", "name": "SetFlow", "sentence": "", "events": [ @@ -38043,6 +40014,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSizeMin", + "group": "3D particle emitter configuration", "name": "SetStartSizeMin", "sentence": "", "events": [ @@ -38125,6 +40097,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSizeMax", + "group": "3D particle emitter configuration", "name": "SetStartSizeMax", "sentence": "", "events": [ @@ -38208,6 +40181,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndScale", + "group": "3D particle emitter configuration", "name": "SetEndScale", "sentence": "", "events": [ @@ -38291,6 +40265,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSpeedMin", + "group": "3D particle emitter speed configuration", "name": "SetStartSpeedMin", "sentence": "", "events": [ @@ -38373,6 +40348,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSpeedMax", + "group": "3D particle emitter speed configuration", "name": "SetStartSpeedMax", "sentence": "", "events": [ @@ -38455,6 +40431,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LifespanMin", + "group": "3D particle emitter configuration", "name": "SetLifespanMin", "sentence": "", "events": [ @@ -38538,6 +40515,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LifespanMax", + "group": "3D particle emitter configuration", "name": "SetLifespanMax", "sentence": "", "events": [ @@ -38621,6 +40599,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Duration", + "group": "3D particle emitter configuration", "name": "SetDuration", "sentence": "", "events": [ @@ -38842,6 +40821,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "SpayConeAngle", + "group": "3D particle emitter configuration", "name": "SetSpayConeAngle", "sentence": "", "events": [ @@ -38926,6 +40906,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Blending", + "group": "3D particle emitter color configuration", "name": "SetBlending", "private": true, "sentence": "", @@ -39011,6 +40992,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "GravityTop", + "group": "3D particle emitter speed configuration", "name": "SetGravityTop", "sentence": "", "events": [ @@ -39094,6 +41076,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Gravity", + "group": "3D particle emitter speed configuration", "name": "SetGravity", "sentence": "", "events": [ @@ -39263,6 +41246,201 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "RegisterInLayer" + }, + { + "functionName": "Delete" + }, + { + "functionName": "HasEnded" + }, + { + "functionName": "Restart" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "Z" + }, + { + "functionName": "SetZ" + } + ] + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "RotationX" + }, + { + "functionName": "SetRotationX" + }, + { + "functionName": "RotationY" + }, + { + "functionName": "SetRotationY" + } + ] + }, + { + "folderName": "3D particle emitter color configuration", + "children": [ + { + "functionName": "StartColor" + }, + { + "functionName": "SetStartColor" + }, + { + "functionName": "EndColor" + }, + { + "functionName": "SetEndColor" + }, + { + "functionName": "StartOpacity" + }, + { + "functionName": "SetStartOpacity" + }, + { + "functionName": "EndOpacity" + }, + { + "functionName": "SetEndOpacity" + }, + { + "functionName": "Blending" + }, + { + "functionName": "SetBlending" + } + ] + }, + { + "folderName": "3D particle emitter configuration", + "children": [ + { + "functionName": "Flow" + }, + { + "functionName": "SetFlow" + }, + { + "functionName": "StartSizeMin" + }, + { + "functionName": "SetStartSizeMin" + }, + { + "functionName": "StartSizeMax" + }, + { + "functionName": "SetStartSizeMax" + }, + { + "functionName": "EndScale" + }, + { + "functionName": "SetEndScale" + }, + { + "functionName": "LifespanMin" + }, + { + "functionName": "SetLifespanMin" + }, + { + "functionName": "LifespanMax" + }, + { + "functionName": "SetLifespanMax" + }, + { + "functionName": "Duration" + }, + { + "functionName": "SetDuration" + }, + { + "functionName": "SpayConeAngle" + }, + { + "functionName": "SetSpayConeAngle" + }, + { + "functionName": "ShouldAutodestruct" + }, + { + "functionName": "SetShouldAutodestruct" + } + ] + }, + { + "folderName": "3D particle emitter speed configuration", + "children": [ + { + "functionName": "StartSpeedMin" + }, + { + "functionName": "SetStartSpeedMin" + }, + { + "functionName": "StartSpeedMax" + }, + { + "functionName": "SetStartSpeedMax" + }, + { + "functionName": "AreParticlesRelative" + }, + { + "functionName": "SetAreParticlesRelative" + }, + { + "functionName": "GravityTop" + }, + { + "functionName": "SetGravityTop" + }, + { + "functionName": "Gravity" + }, + { + "functionName": "SetGravity" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "255;0;0", @@ -39572,826 +41750,652 @@ ] }, { - "author": "@Bouh", - "category": "User interface", + "author": "", + "category": "Visual effect", + "dimension": "3D", "extensionNamespace": "", - "fullName": "Time formatting", - "gdevelopVersion": "", + "fullName": "3D spot light", + "gdevelopVersion": ">=5.5.222", "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", - "name": "TimeFormatter", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/clock-digital.svg", - "shortDescription": "Converts seconds into standard time formats, such as HH:MM:SS. ", - "version": "0.0.2", - "description": [ - "Ideal for displaying timers on screen.", - "", - "Formats included:", - "* HH:MM:SS", - "* HH:MM:SS.000 (displays milliseconds)" - ], - "origin": { - "identifier": "TimeFormatter", - "name": "gdevelop-extension-store" - }, + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNobGlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxMEw2LDVIMThMMTUsMTBIOU0xOCw0SDZWMkgxOFY0TTksMjJWMTFIMTVWMjJIOU0xMiwxM0ExLDEgMCAwLDAgMTEsMTRBMSwxIDAgMCwwIDEyLDE1QTEsMSAwIDAsMCAxMywxNEExLDEgMCAwLDAgMTIsMTNaIiAvPjwvc3ZnPg==", + "name": "SpotLight3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/b627f8e676b3aac26945b2c38db0cfa787d34d2eff23755d4eb1289452f6cd28_flashlight.svg", + "shortDescription": "Light up a cone like a flashlight.", + "version": "1.0.0", + "description": "Light up a cone like a flashlight.", "tags": [ - "time", - "timer", - "format", - "hours", - "minutes", - "seconds", - "milliseconds" + "3d", + "light" ], "authorIds": [ - "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], "sceneVariables": [], "eventsFunctions": [ { - "description": "Format time in seconds to HH:MM:SS.", - "fullName": "Format time in seconds to HH:MM:SS", - "functionType": "StringExpression", - "name": "SecondsToHHMMSS", - "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "var format_time = function (time_second) {\r", - " date = new Date(null);\r", - " date.setSeconds(time_second);\r", - " if (time_second >= 3600) {\r", - " return date.toISOString().substr(11, 8); // MM:SS\r", - " } else {\r", - " return date.toISOString().substr(14, 5); // HH:MM:SS\r", - " }\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" + "//@ts-ignore", + "if (gdjs.__spotLight3DExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "const game = runtimeScene.getGame();", + "", + "const visibleLightCountMax = 10;", + "const editorVisibleLightCountMax = 4;", + "let visibleLightCount = 0;", + "gdjs.registerRuntimeScenePreEventsCallback(", + " runtimeScene => {", + " visibleLightCount = 0;", + " });", + "if (gdjs.registerInGameEditorPostStepCallback) {", + " gdjs.registerInGameEditorPostStepCallback(", + " runtimeScene => {", + " visibleLightCount = 0;", + " });", + "}", + "", + "class SpotLight3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", + " constructor(", + " object,", + " instanceContainer,", + " parent", + " ) {", + " super(object, instanceContainer, parent);", + " }", + "", + " _updateThreeGroup() {", + " const object = this._object;", + " /** @type {THREE.SpotLight} */", + " //@ts-ignore", + " const threeObject3D = this.get3DRendererObject();", + "", + " threeObject3D.rotation.set(", + " gdjs.toRad(object.getRotationX()),", + " gdjs.toRad(object.getRotationY()),", + " gdjs.toRad(object.angle)", + " );", + "", + " threeObject3D.position.set(", + " object.getX(),", + " object.getY(),", + " object.getZ()", + " );", + "", + " // Force the scale to 1 because the light doesn't really has a size.", + " threeObject3D.scale.set(", + " object.isFlippedX() ? -1 : 1,", + " object.isFlippedY() ? -1 : 1,", + " object.isFlippedZ() ? -1 : 1", + " );", + "", + " threeObject3D.visible = !this._object.hidden;", + "", + " const editor = game.getInGameEditor ? game.getInGameEditor() : null;", + "", + " if (editor) {", + " const selectedObject = editor._selection.getLastSelectedObject();", + " let parentObject = object;", + " let isSelected = parentObject === selectedObject;", + " const isDirectlySelected = isSelected;", + " while (!isSelected && parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " parentObject = parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " isSelected = parentObject === selectedObject;", + " }", + " /** @type {THREE.SpotLight} */", + " //@ts-ignore", + " const spotLight = object.__spotLight;", + " spotLight.visible = isDirectlySelected || (isSelected && visibleLightCount < editorVisibleLightCountMax);", + " if (spotLight.visible) {", + " visibleLightCount++;", + " }", + " }", + " else if (object.isHidden()) {", + " threeObject3D.visible = false;", + " }", + " else if (visibleLightCount >= visibleLightCountMax) {", + " threeObject3D.visible = false;", + " } else {", + " let rootObject = object;", + " while (rootObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " rootObject = rootObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " }", + " const layerName = rootObject.getLayer();", + "", + " const runtimeScene = object.getRuntimeScene();", + " const cameraX = gdjs.evtTools.camera.getCameraX(runtimeScene, layerName, 0);", + " const cameraY = gdjs.evtTools.camera.getCameraY(runtimeScene, layerName, 0);", + " const cameraZ = gdjs.scene3d.camera.getCameraZ(runtimeScene, layerName, 0);", + " const deltaX = rootObject.getX() - cameraX;", + " const deltaY = rootObject.getY() - cameraY;", + " const deltaZ = rootObject.getZ() - cameraZ;", + " //@ts-ignore", + " const distanceMax = object._getVisibilityDistanceMax();", + " const isWithInRange = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ <= distanceMax * distanceMax;", + " threeObject3D.visible = isWithInRange;", + " if (isWithInRange) {", + " visibleLightCount++;", + " }", + " }", + "", + " // Force the visibility to be checked every frame", + " this._isContainerDirty = true;", + " }", + "}", + "", + "const coneLength = 64;", + "", + "class SpotLightHelper extends THREE.Object3D {", + " /** @type {gdjs.CustomRuntimeObject3D} */", + " object;", + " /** @type {THREE.LineSegments} */", + " cone;", + " /** @type {THREE.LineSegments} */", + " centerLine;", + " /** @type {THREE.Mesh} */", + " originBox;", + "", + "\t/**", + " * @param {gdjs.CustomRuntimeObject3D} object", + "\t */", + " constructor(object) {", + " super();", + " this.object = object;", + " this.type = 'SpotLightHelper';", + "", + " const coneGeometry = new THREE.BufferGeometry();", + " const conePositions = [", + " 0, 0, 0, 1, 0, 0,", + " 0, 0, 0, 1, 1, 0,", + " 0, 0, 0, 1, - 1, 0,", + " 0, 0, 0, 1, 0, 1,", + " 0, 0, 0, 1, 0, - 1", + " ];", + " for (let i = 0, j = 1, l = 32; i < l; i++ , j++) {", + " const p1 = (i / l) * Math.PI * 2;", + " const p2 = (j / l) * Math.PI * 2;", + " conePositions.push(", + " 1, Math.cos(p1), Math.sin(p1),", + " 1, Math.cos(p2), Math.sin(p2)", + " );", + " }", + " coneGeometry.setAttribute('position', new THREE.Float32BufferAttribute(conePositions, 3));", + " this.cone = new THREE.LineSegments(", + " coneGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.cone);", + " const centerLineGeometry = new THREE.BufferGeometry();", + " centerLineGeometry.setAttribute('position', new THREE.Float32BufferAttribute([", + " 0, 0, 0, coneLength, 0, 0", + " ], 3));", + " this.centerLine = new THREE.LineSegments(", + " centerLineGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.centerLine);", + "", + " this.originBox = new THREE.Mesh(", + " new THREE.BoxGeometry(16, 16, 16),", + " new THREE.MeshBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.originBox);", + " this.update();", + "", + " //@ts-ignore", + " this.originBox.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + " this.cone.geometry.dispose();", + " //@ts-ignore", + " this.cone.material.dispose();", + " this.centerLine.geometry.dispose();", + " //@ts-ignore", + " this.centerLine.material.dispose();", + " this.originBox.geometry.dispose();", + " //@ts-ignore", + " this.originBox.material.dispose();", + " }", + "", + " update() {", + " /** @type {number} */", + " //@ts-ignore", + " const coneAngle = gdjs.toRad(this.object._getConeAngle());", + " const coneWidth = coneLength * Math.sin(coneAngle);", + " const coneHeight = coneLength * Math.cos(coneAngle);", + " this.cone.scale.set(coneHeight, coneWidth, coneWidth);", + " /** @type {number} */", + " //@ts-ignore", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor())", + " /** @type {THREE.LineBasicMaterial} */", + " //@ts-ignore", + " const coneMaterial = this.cone.material;", + " coneMaterial.color.set(color);", + " /** @type {THREE.LineBasicMaterial} */", + " //@ts-ignore", + " const centerLineMaterial = this.centerLine.material;", + " centerLineMaterial.color.set(color);", + " /** @type {THREE.MeshBasicMaterial} */", + " //@ts-ignore", + " const originBoxMaterial = this.originBox.material;", + " originBoxMaterial.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class SpotLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param spotLight {THREE.SpotLight}", + " */", + " constructor(object, spotLight) {", + " this.object = object;", + " this.spotLight = spotLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.spotLight.parent;", + " this.spotLight.parent = null;", + " this.spotLight.lookAt(targetX, targetY, targetZ);", + " this.spotLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.spotLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.spotLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.spotLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.spotLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.spotLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.spotLight.decay = decay;", + " }", + "", + " /**", + " * @param coneAngle {number}", + " */", + " setConeAngle(coneAngle) {", + " this.spotLight.angle = coneAngle * Math.PI / 180;", + " }", + "", + " /**", + " * @param smoothing {number}", + " */", + " setSmoothing(smoothing) {", + " this.spotLight.penumbra = smoothing;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " this.spotLight.castShadow = isCastingShadow;", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 256;", + " break;", + " case \"Medium\":", + " size = 512;", + " break;", + " case \"High\":", + " size = 1024;", + " break;", + " }", + " this.spotLight.shadow.mapSize.width = size;", + " this.spotLight.shadow.mapSize.height = size;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.spotLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.spotLight.shadow.camera.far = value;", + " }", + "", + " /**", + " * @param resourceName {string}", + " */", + " setImage(resourceName) {", + " if (!resourceName) {", + " this.spotLight.map = null;", + " return;", + " }", + " const texture = game.getImageManager().getThreeTexture(resourceName);", + " this.spotLight.map = texture;", + " }", + "}", + "", + "", + "", + "//@ts-ignore", + "gdjs.__spotLight3DExtension = {", + " SpotLight3DRenderer,", + " SpotLightAdapter,", + " SpotLightHelper,", + "}" ], "parameterObjects": "", - "useStrict": false, - "eventsSheetExpanded": false - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Time, in seconds", - "name": "TimeInSeconds", - "type": "expression" + "useStrict": true, + "eventsSheetExpanded": true } ], + "parameters": [], "objectGroups": [] - }, + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ { - "description": "Format time in seconds to HH:MM:SS.000, including milliseconds.", - "fullName": "Format time in seconds to HH:MM:SS.000", - "functionType": "StringExpression", - "name": "SecondsToHHMMSS000", - "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", - "events": [ + "areaMaxX": 40, + "areaMaxY": 40, + "areaMaxZ": 40, + "areaMinX": -40, + "areaMinY": -40, + "areaMinZ": -40, + "defaultName": "SpotLight", + "description": "Light up a cone like a flashlight.", + "fullName": "3D spot light", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "SpotLight3D", + "objects": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "var format_time = function (time_second) {\r", - " date = new Date(null);\r", - " date.setMilliseconds(1000*time_second);\r", - " if (time_second >= 3600) {\r", - " return date.toISOString().substr(11, 12); // MM:SS.000\r", - " } else {\r", - " return date.toISOString().substr(14, 9); // HH:MM:SS.000\r", - " }\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" - ], - "parameterObjects": "", - "useStrict": false, - "eventsSheetExpanded": false + "assetStoreId": "", + "name": "Placeholder", + "persistentUuid": "6786eefd-3c18-4fcb-b3ae-95b07f953045", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 80, + "height": 80, + "depth": 80, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "Basic", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": false + } } ], - "expressionType": { - "type": "string" + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Placeholder" + } + ] }, - "parameters": [ + "objectsGroups": [], + "layers": [ { - "description": "Time, in seconds", - "name": "TimeInSeconds", - "type": "expression" + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Panel sprite button", - "gdevelopVersion": ">=5.5.230", - "helpPath": "/objects/button", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", - "name": "PanelSpriteButton", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", - "shortDescription": "A button that can be customized.", - "version": "2.1.1", - "description": [ - "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", - "", - "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." - ], - "origin": { - "identifier": "PanelSpriteButton", - "name": "gdevelop-extension-store" - }, - "tags": [ - "button", - "ui" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "changelog": [ - { - "version": "2.0.0", - "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." - } - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Check if the events are running for the editor.", - "fullName": "Editor is running", - "functionType": "Condition", - "name": "IsInGameEdition", - "private": true, - "sentence": "Events are running for the editor", - "events": [ + "instances": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const game = runtimeScene.getGame();\r", - "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "angle": 0, + "customSize": true, + "depth": 80, + "height": 80, + "layer": "", + "name": "Placeholder", + "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", + "width": 80, + "x": -40, + "y": -40, + "z": -40, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "parameters": [], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [ - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.204424638835088, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::IsInGameEdition" + "value": "SpotLight3D::DefineHelperClasses" }, "parameters": [ "", "" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const {", + " SpotLightAdapter,", + " SpotLight3DRenderer,", + " SpotLightHelper,", + " //@ts-ignore", + "} = gdjs.__spotLight3DExtension;", + "", + "/** @type {gdjs.CustomRuntimeObject3D} */", + "//@ts-ignore", + "const object = objects[0];", + "", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "const game = runtimeScene.getGame();", + "", + "// This is a hack that may break in future releases.", + "// Replace the group that would hold children objects by the emmiter.", + "const layer = object.getInstanceContainer().getLayer(object.getLayer());", + "const group = object.getRenderer()._threeGroup;", + "layer.getRenderer().remove3DRendererObject(group);", + "", + "const spotLight = new THREE.SpotLight(0xffffff);", + "spotLight.position.copy(group.position);", + "spotLight.rotation.copy(group.rotation);", + "spotLight.add(spotLight.target);", + "spotLight.target.position.x = 100;", + "spotLight.up.set(0, 0, 1);", + "spotLight.shadow.camera.up.set(0, 0, 1);", + "//@ts-ignore", + "object.__spotLight = spotLight;", + "//@ts-ignore", + "object.__spotLightAdapter = new SpotLightAdapter(object, spotLight);", + "", + "const spotLight3DRenderer = new SpotLight3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "object._renderer = spotLight3DRenderer;", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const spotLightHelper = new SpotLightHelper(object);", + " spotLightHelper.add(spotLight);", + " spotLight3DRenderer._threeGroup = spotLightHelper;", + " layer.getRenderer().add3DRendererObject(spotLightHelper);", + "}", + "else {", + " spotLight3DRenderer._threeGroup = spotLight;", + " // The light is added in Three.js scene from doStepPostEvents", + " spotLight3DRenderer._threeGroup = spotLight;", + " layer.getRenderer().add3DRendererObject(spotLight);", + "}", + "", + "spotLight.updateMatrixWorld(true);", + "", + "// Allow to tween the light color.", + "//@ts-ignore", + "if (!object.setColor && !object.getColor) {", + " const prototype = Object.getPrototypeOf(object);", + " prototype.setColor = function(tint) {", + " this.SetColor(tint, eventsFunctionContext);", + " }", + " prototype.getColor = function() {", + " return this.Color(eventsFunctionContext);", + " }", + "}", + "" ], - "actions": [], - "events": [ + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "MouseIsInside", - "False", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldCheckHovering", - "True", - "" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "MouseIsInside", - "True", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "TouchIsInside", - "False", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "TouchId", - "!=", - "0" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(TouchId, Object.Layer(), 0)", - "TouchY(TouchId, Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "TouchIsInside", - "True", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Index", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "TouchId", - "=", - "StartedTouchOrMouseId(Index)" - ] - }, - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "TouchIsInside", - "True", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Index", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "MouseIsInside", - "True", - "" - ] - }, - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "MouseIsInside", - "True", - "" - ] - }, - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "TouchIsInside", - "True", - "" - ] - }, - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "TouchIsInside", - "True", - "" - ] - }, - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "TouchId" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "TouchId", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"Validated\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"PressedInside\"" - ] - }, - { - "type": { - "inverted": true, - "value": "StringVariable" - }, - "parameters": [ - "State", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "State", - "=", - "\"Idle\"" - ] - } - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] + "type": { + "value": "SpotLight3D::SpotLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] } ] } @@ -40400,13 +42404,41 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" - }, + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject} */", + "const object = objects[0];", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "", + "object.__spotLight.dispose();", + "object.get3DRendererObject().dispose();", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" } ], "objectGroups": [] @@ -40414,7 +42446,7 @@ { "fullName": "", "functionType": "Action", - "name": "onDeActivate", + "name": "onHotReloading", "sentence": "", "events": [ { @@ -40423,11 +42455,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::ResetState" + "value": "SpotLight3D::SpotLight3D::UpdateFromProperties" }, "parameters": [ "Object", - "Behavior", "" ] } @@ -40438,24 +42469,19 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "Reset the state of the button.", - "fullName": "Reset state", + "description": "Update from properties.", + "fullName": "Update from properties", "functionType": "Action", - "name": "ResetState", + "name": "UpdateFromProperties", "private": true, - "sentence": "Reset the button state of _PARAM0_", + "sentence": "Update from properties of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -40463,118 +42489,162 @@ "actions": [ { "type": { - "value": "SetStringVariable" + "value": "SpotLight3D::SpotLight3D::SetColor" }, "parameters": [ - "State", + "Object", "=", - "\"Idle\"" + "Color", + "" ] }, { "type": { - "value": "SetNumberVariable" + "value": "SpotLight3D::SpotLight3D::SetIntensity" }, "parameters": [ - "TouchId", + "Object", "=", - "0" + "Intensity", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetDecay" + }, + "parameters": [ + "Object", + "=", + "Decay", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetConeAngle" + }, + "parameters": [ + "Object", + "=", + "ConeAngle", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetSmoothing" + }, + "parameters": [ + "Object", + "=", + "Smoothing", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetShadowQuality" + }, + "parameters": [ + "Object", + "=", + "ShadowQuality", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetShadowCameraNearPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraNearPlane", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::SetShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraFarPlane", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::UpdateImage" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SpotLight3D::SpotLight3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", + "IsCastingShadow", "=", - "\"Idle\"" + "" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SpotLight3D::SpotLight3D::SetCastingShadow" }, "parameters": [ - "True" + "Object", + "no", + "" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", - "=", - "\"Validated\"" + "IsCastingShadow", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SpotLight3D::SpotLight3D::SetCastingShadow" }, "parameters": [ - "True" + "Object", + "yes", + "" ] } ] @@ -40584,204 +42654,500 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" - }, + } + ], + "objectGroups": [] + }, + { + "fullName": "Update helper", + "functionType": "Action", + "name": "UpdateHelper", + "private": true, + "sentence": "Update graphical helper of _PARAM0_", + "events": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const spotLightHelper = objects[0].get3DRendererObject();", + " spotLightHelper.update();", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "Update image", + "functionType": "Action", + "name": "UpdateImage", + "private": true, + "sentence": "Update the image of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */\r", + "const object = objects[0];\r", + "const resourceName = object._getImage();\r", + "object.__spotLightAdapter.setImage(resourceName);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the cone angle of the light.", + "fullName": "Cone angle", + "functionType": "ExpressionAndCondition", + "name": "ConeAngle", + "sentence": "the cone angle", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringVariable" + "value": "SetReturnNumber" }, "parameters": [ - "State", + "ConeAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ConeAngle", + "name": "SetConeAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ConeAngle", "=", - "\"Hovered\"" + "Value" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const coneAngle = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setConeAngle(coneAngle);\r", + "" ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the color of the light.", + "fullName": "Color", + "functionType": "ExpressionAndCondition", + "name": "Color", + "sentence": "the color", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "Color" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Color", + "name": "SetColor", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringVariable" + "value": "SetStringVariable" }, "parameters": [ - "State", + "Color", "=", - "\"Hovered\"" + "Value" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const color = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setColor(color);" ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the smoothing of the light . Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "fullName": "Smoothing", + "functionType": "ExpressionAndCondition", + "name": "Smoothing", + "sentence": "the smoothing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "Smoothing" ] } ] - }, + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Smoothing", + "name": "SetSmoothing", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringVariable" + "value": "SetNumberVariable" }, "parameters": [ - "State", + "Smoothing", "=", - "\"PressedOutside\"" + "Value" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setSmoothing(value);" ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the intensity of the light.", + "fullName": "Intensity", + "functionType": "ExpressionAndCondition", + "name": "Intensity", + "sentence": "the intensity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "Intensity" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Intensity", + "name": "SetIntensity", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringVariable" + "value": "SetNumberVariable" }, "parameters": [ - "State", + "Intensity", "=", - "\"PressedInside\"" + "Value" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setIntensity(value);\r", + "" ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the decay of the light. The amount the light dims along the distance of the light.", + "fullName": "Decay", + "functionType": "ExpressionAndCondition", + "name": "Decay", + "sentence": "the decay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "Decay" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Decay", + "name": "SetDecay", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Decay", + "=", + "Value" + ] + } + ] }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setSmoothing(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", + "description": "Check if the light is casting shadows.", + "fullName": "Shadow casting", "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + "group": "3D spot light shadow configuration", + "name": "IsCastingShadow", + "sentence": "_PARAM0_ casting shadows", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", - "=", - "\"PressedOutside\"" + "IsCastingShadow", + "True", + "" ] } ], @@ -40801,660 +43167,315 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", + "description": "Change if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Action", + "group": "3D spot light shadow configuration", + "name": "SetCastingShadow", + "sentence": "_PARAM0_ casting shadows: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetBooleanVariable" }, "parameters": [ - "TouchId" + "IsCastingShadow", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setCastingShadow(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "defaultValue": "yes", + "description": "Shadow casting", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "hidden": true, - "name": "ShouldCheckHovering" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "choices": [ + "description": "Rotate the light to light up a position.", + "fullName": "Look at position", + "functionType": "Action", + "group": "Angle", + "name": "LookAtPosition", + "sentence": "_PARAM0_ look at _PARAM1_ ; _PARAM2_ ; _PARAM3_", + "events": [ { - "label": "Idle", - "value": "Idle" - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const targetX = eventsFunctionContext.getArgument(\"TargetX\");\r", + "const targetY = eventsFunctionContext.getArgument(\"TargetY\");\r", + "const targetZ = eventsFunctionContext.getArgument(\"TargetZ\");\r", + "\r", + "object.__spotLightAdapter.lookAtPosition(targetX, targetY, targetZ);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ { - "label": "Hovered", - "value": "Hovered" + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" }, { - "label": "PressedInside", - "value": "PressedInside" + "description": "Target X", + "name": "TargetX", + "type": "expression" }, { - "label": "PressedOutside", - "value": "PressedOutside" + "description": "Target Y", + "name": "TargetY", + "type": "expression" }, { - "label": "Validated", - "value": "Validated" + "description": "Target Z", + "name": "TargetZ", + "type": "expression" } ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "hidden": true, - "name": "TouchIsInside" - }, - { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "hidden": true, - "name": "MouseIsInside" + "objectGroups": [] }, { - "value": "", - "type": "Number", - "label": "", - "hidden": true, - "name": "Index" - } - ], - "propertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "ShouldCheckHovering" - }, - { - "propertyName": "State" - }, - { - "propertyName": "TouchId" - }, - { - "propertyName": "TouchIsInside" - }, - { - "propertyName": "MouseIsInside" - }, - { - "propertyName": "Index" - } - ] - } - } - ], - "eventsBasedObjects": [ - { - "areaMaxX": 256, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "isInnerAreaFollowingParentSize": true, - "isUsingLegacyInstancesRenderer": false, - "name": "PanelSpriteButton", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "topEdgeAnchor": 4, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Text", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Text", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "center", - "characterSize": 20, - "lineHeight": 0, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "description": "Rotate the light to light up an object.", + "fullName": "Look at object", + "functionType": "Action", + "group": "Angle", + "name": "LookAtObject", + "sentence": "_PARAM0_ look at _PARAM1_", + "events": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpotLight3D::SpotLight3D::LookAtPosition" + }, + "parameters": [ + "Object", + "Target.CenterX()", + "Target.CenterY()", + "Target.Object3D::CenterZ()", + "" + ] + } + ] } ], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Target", + "type": "objectList" }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "assetStoreId": "", - "name": "BitmapLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "topEdgeAnchor": 4, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] } ], - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "BitmapLabel" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - }, - { - "name": "Labels", - "objects": [ - { - "name": "Label" - }, - { - "name": "BitmapLabel" - } - ] - } - ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "parameters": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpotLight3D::SpotLight3D", + "type": "object" } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 64, - "layer": "", - "name": "Idle", - "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", - "width": 256, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "objectGroups": [] }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 64, - "layer": "", - "name": "Label", - "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", - "width": 256, - "x": 0, - "y": 32, - "zOrder": 2, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "editionSettings": {}, - "eventsFunctions": [ { "fullName": "", - "functionType": "Action", - "name": "onCreated", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D spot light shadow configuration", + "name": "SetShadowQuality", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ResizableCapability::ResizableBehavior::SetSize" - }, - "parameters": [ - "Hovered", - "Resizable", - "Idle.Width()", - "Idle.Height()" - ] - }, - { - "type": { - "value": "ResizableCapability::ResizableBehavior::SetSize" - }, - "parameters": [ - "Pressed", - "Resizable", - "Idle.Width()", - "Idle.Height()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Hovered", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Pressed", - "=", - "1" - ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "SetStringVariable" }, "parameters": [ - "Labels", - "Text", + "ShadowQuality", "=", - "LabelText" + "Value" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "onHotReloading", - "sentence": "", + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" - }, - "parameters": [ - "Object", - "=", - "PressedLabelOffsetY", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Labels", - "Text", - "=", - "LabelText" + "ShadowCameraNearPlane" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" } ], @@ -41462,1290 +43483,3665 @@ }, { "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraNearPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraNearPlane", "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply states", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show the right background accordingly to the new state." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" - }, - "parameters": [ - "Object", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Idle", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Visible" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "HoveredFadeOutDuration", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectOpacityTween2" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"", - "0", - "\"linear\"", - "HoveredFadeOutDuration", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "HoveredFadeOutDuration", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "OpacityCapability::OpacityBehavior::Value" - }, - "parameters": [ - "Hovered", - "Opacity", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" - }, - "parameters": [ - "Hovered", - "Opacity", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" - }, - "parameters": [ - "Object", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"" - ] - }, - { - "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" - }, - "parameters": [ - "Hovered", - "Opacity", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" - }, - "parameters": [ - "Object", - "=", - "PressedLabelOffsetY", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Pressed", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" - }, - "parameters": [ - "Object", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "ShadowCameraNearPlane", + "=", + "Value" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraNearPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "ShadowCameraFarPlane" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraFarPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraFarPlane", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "ShadowCameraFarPlane", + "=", + "Value" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraFarPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "SpotLight3D::SpotLight3D", "type": "object" } ], "objectGroups": [] - }, + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "LookAtPosition" + }, + { + "functionName": "LookAtObject" + } + ] + }, + { + "functionName": "Color" + }, + { + "functionName": "SetColor" + }, + { + "functionName": "Intensity" + }, + { + "functionName": "SetIntensity" + }, + { + "functionName": "Decay" + }, + { + "functionName": "SetDecay" + }, + { + "functionName": "ConeAngle" + }, + { + "functionName": "SetConeAngle" + }, + { + "functionName": "Smoothing" + }, + { + "functionName": "SetSmoothing" + }, + { + "folderName": "3D spot light shadow configuration", + "children": [ + { + "functionName": "IsCastingShadow" + }, + { + "functionName": "SetCastingShadow" + }, + { + "functionName": "ShadowQuality" + }, + { + "functionName": "SetShadowQuality" + }, + { + "functionName": "ShadowCameraNearPlane" + }, + { + "functionName": "SetShadowCameraNearPlane" + }, + { + "functionName": "ShadowCameraFarPlane" + }, + { + "functionName": "SetShadowCameraFarPlane" + } + ] + } + ] + }, + "propertyDescriptors": [ { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] + "value": "255;255;255", + "type": "Color", + "label": "Color", + "name": "Color" }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] + "value": "30", + "type": "Number", + "unit": "DegreeAngle", + "label": "Cone angle", + "group": "Cone", + "name": "ConeAngle" }, { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "private": true, - "sentence": "Change the text of _PARAM0_ to _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Labels", - "Text", - "=", - "Value" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - }, - { - "description": "Text", - "name": "Value", - "type": "string" - } - ], - "objectGroups": [] + "value": "1", + "type": "Number", + "label": "Intensity", + "name": "Intensity" }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LabelText", - "name": "SetLabelTextOp", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Labels", - "Text", - "=", - "Value" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] + "value": "1", + "type": "Number", + "label": "Smoothing", + "description": "Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "group": "Cone", + "name": "Smoothing" }, { - "description": "the label text.", - "fullName": "Label text", - "functionType": "ExpressionAndCondition", - "name": "LabelText", - "sentence": "the label text", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Labels.Text::Value()" - ] - } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] + "value": "2", + "type": "Number", + "label": "Decay", + "description": "The amount the light dims along the distance of the light.", + "name": "Decay" }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "no" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" - } + "value": "", + "type": "Resource", + "label": "Image", + "description": "Shadow casting must be enable for the image to have any effect.", + "group": "Shadow", + "extraInformation": [ + "image" ], - "objectGroups": [] + "choices": [], + "advanced": true, + "name": "Image" }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] + "value": "true", + "type": "Boolean", + "label": "Shadow casting", + "group": "Shadow", + "name": "IsCastingShadow" }, { - "description": "the labelOffset of the object.", - "fullName": "LabelOffset", - "functionType": "ExpressionAndCondition", - "name": "LabelOffset", - "private": true, - "sentence": "the labelOffset", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "LabelOffset" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] + "value": "1000", + "type": "Number", + "label": "Visibilty distance", + "name": "VisibilityDistanceMax" }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LabelOffset", - "name": "SetLabelOffset", - "private": true, - "sentence": "", - "events": [ + "value": "Medium", + "type": "Choice", + "label": "Shadow quality", + "group": "Shadow", + "choices": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Labels", - "+", - "Value - LabelOffset" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "LabelOffset", - "=", - "Value" - ] - } - ] - } - ], - "parameters": [ + "label": "", + "value": "Low" + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "label": "", + "value": "Medium" + }, + { + "label": "", + "value": "High" } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "MultilineString", - "label": "Label", - "name": "LabelText" - }, - { - "value": "0.25", - "type": "Number", - "unit": "Second", - "label": "Hovered fade out duration", - "group": "States", - "name": "HoveredFadeOutDuration" + "name": "ShadowQuality" }, { - "value": "0", + "value": "100", "type": "Number", "unit": "Pixel", - "label": "Label offset on Y axis when pressed", - "group": "States", - "name": "PressedLabelOffsetY" + "label": "Shadow camera near plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraNearPlane" }, { - "value": "0", + "value": "2000", "type": "Number", "unit": "Pixel", - "label": "", - "hidden": true, - "name": "LabelOffset" - }, - { - "value": "", - "type": "Choice", - "label": "", - "choices": [ - { - "label": "Label.Text=LabelText", - "value": "Label.Text=LabelText" - }, - { - "label": "BitmapLabel.Text=LabelText", - "value": "BitmapLabel.Text=LabelText" - } - ], - "hidden": true, - "name": "_PropertyMapping" + "label": "Shadow camera far plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraFarPlane" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "LabelText" + "propertyName": "Color" }, { - "folderName": "States", - "children": [ + "propertyName": "Intensity" + }, + { + "propertyName": "Decay" + }, + { + "propertyName": "VisibilityDistanceMax" + }, + { + "folderName": "Cone", + "children": [ { - "propertyName": "HoveredFadeOutDuration" + "propertyName": "ConeAngle" }, { - "propertyName": "PressedLabelOffsetY" + "propertyName": "Smoothing" } ] }, { - "propertyName": "LabelOffset" - }, - { - "propertyName": "_PropertyMapping" - } - ] - }, - "variants": [ - { - "areaMaxX": 256, - "areaMaxY": 106, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "name": "Yellow button 2", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "topEdgeAnchor": 4, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Button", - "font": "Chango-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Button", - "font": "Chango-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "center", - "characterSize": 40, - "lineHeight": 0, - "color": "139;87;42" - } - }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "name": "Idle", - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 256, - "variables": [ - { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" - } - ], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "name": "Hovered", - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 256, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "name": "Pressed", - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "type": "PanelSpriteObject::PanelSprite", - "width": 256, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", + "folderName": "Shadow", "children": [ { - "objectName": "Label" + "propertyName": "IsCastingShadow" }, { - "objectName": "Idle" + "propertyName": "ShadowQuality" }, { - "objectName": "Hovered" + "propertyName": "Image" }, { - "objectName": "Pressed" + "propertyName": "ShadowCameraNearPlane" + }, + { + "propertyName": "ShadowCameraFarPlane" } ] - }, - "objectsGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } + } + ] + }, + "variants": [] + } + ] + }, + { + "author": "@Bouh", + "category": "User interface", + "dimension": "", + "extensionNamespace": "", + "fullName": "Time formatting", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", + "name": "TimeFormatter", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/clock-digital.svg", + "shortDescription": "Converts seconds into standard time formats, such as HH:MM:SS. ", + "version": "0.0.2", + "description": [ + "Ideal for displaying timers on screen.", + "", + "Formats included:", + "* HH:MM:SS", + "* HH:MM:SS.000 (displays milliseconds)" + ], + "origin": { + "identifier": "TimeFormatter", + "name": "gdevelop-extension-store" + }, + "tags": [ + "time", + "timer", + "format", + "hours", + "minutes", + "seconds", + "milliseconds" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Format time in seconds to HH:MM:SS.", + "fullName": "Format time in seconds to HH:MM:SS", + "functionType": "StringExpression", + "name": "SecondsToHHMMSS", + "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var format_time = function (time_second) {\r", + " date = new Date(null);\r", + " date.setSeconds(time_second);\r", + " if (time_second >= 3600) {\r", + " return date.toISOString().substr(11, 8); // MM:SS\r", + " } else {\r", + " return date.toISOString().substr(14, 5); // HH:MM:SS\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } + "parameterObjects": "", + "useStrict": false, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time, in seconds", + "name": "TimeInSeconds", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Format time in seconds to HH:MM:SS.000, including milliseconds.", + "fullName": "Format time in seconds to HH:MM:SS.000", + "functionType": "StringExpression", + "name": "SecondsToHHMMSS000", + "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var format_time = function (time_second) {\r", + " date = new Date(null);\r", + " date.setMilliseconds(1000*time_second);\r", + " if (time_second >= 3600) {\r", + " return date.toISOString().substr(11, 12); // MM:SS.000\r", + " } else {\r", + " return date.toISOString().substr(14, 9); // HH:MM:SS.000\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" ], - "instances": [ - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 106, - "layer": "", - "name": "Idle", - "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", - "width": 256, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 81, - "layer": "", - "name": "Label", - "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", - "width": 240, - "x": 8, - "y": 48, - "zOrder": 2, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } + "parameterObjects": "", + "useStrict": false, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time, in seconds", + "name": "TimeInSeconds", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SecondsToHHMMSS" + }, + { + "functionName": "SecondsToHHMMSS000" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "dimension": "", + "extensionNamespace": "", + "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", + "name": "PanelSpriteButton", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", + "shortDescription": "A button that can be customized.", + "version": "2.1.1", + "description": [ + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "", + "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." + ], + "origin": { + "identifier": "PanelSpriteButton", + "name": "gdevelop-extension-store" + }, + "tags": [ + "button", + "ui" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" ], - "editionSettings": {} - }, + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ { - "areaMaxX": 256, - "areaMaxY": 128, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "assetStoreAssetId": "72c8adcfb9187ebb5fcfbcd75bc18c74d6af5507e7c482cadcfad28f8011b387", - "assetStoreOriginalName": "Orange Bubble Button", - "name": "Orange Bubble Button", - "objects": [ + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - } - ], + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Hovered", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Pressed", + "=", + "1" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the right background accordingly to the new state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Idle", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"", + "0", + "\"linear\"", + "HoveredFadeOutDuration", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "OpacityCapability::OpacityBehavior::Value" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsFocused" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsPressed" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Labels.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "SetLabelText" + }, + { + "functionName": "SetLabelTextOp" + }, + { + "functionName": "LabelText" + }, + { + "functionName": "Activate" + }, + { + "functionName": "IsActivated" + }, + { + "functionName": "LabelOffset" + }, + { + "functionName": "SetLabelOffset" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "LabelText" + }, + { + "folderName": "States", + "children": [ + { + "propertyName": "HoveredFadeOutDuration" + }, + { + "propertyName": "PressedLabelOffsetY" + } + ] + }, + { + "propertyName": "LabelOffset" + }, + { + "propertyName": "_PropertyMapping" + } + ] + }, + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Yellow button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 106, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} + }, + { + "areaMaxX": 256, + "areaMaxY": 128, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "72c8adcfb9187ebb5fcfbcd75bc18c74d6af5507e7c482cadcfad28f8011b387", + "assetStoreOriginalName": "Orange Bubble Button", + "name": "Orange Bubble Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], "string": "Button", "font": "Poppins-Medium.ttf", "textAlignment": "center", @@ -43255,6 +47651,7 @@ { "author": "D8H", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Stick objects to others", "gdevelopVersion": ">=5.5.222", @@ -43620,6 +48017,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "IsStuck" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Stick the object to another. Use the action to stick the object, or unstick it later.", @@ -43881,6 +48289,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Stick" + }, + { + "functionName": "Unstick" + }, + { + "functionName": "onDestroy" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -43913,6 +48344,7 @@ { "author": "Tristan Rhodes (tristan@victrisgames.com), Entropy", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Screen wrap", "gdevelopVersion": ">=5.5.222", @@ -43947,6 +48379,9 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Teleport the object when leaving one side of the screen so that it immediately reappears on the opposite side, maintaining speed and trajectory.", @@ -44969,6 +49404,59 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsHorizontalWrapping" + }, + { + "functionName": "IsVerticalWrapping" + }, + { + "functionName": "EnableHorizontalWrapping" + }, + { + "functionName": "EnableVerticalWrapping" + }, + { + "functionName": "BorderTop" + }, + { + "functionName": "BorderLeft" + }, + { + "functionName": "BorderRight" + }, + { + "functionName": "BorderBottom" + }, + { + "functionName": "TriggerOffset" + }, + { + "functionName": "SetTopBorder" + }, + { + "functionName": "SetLeftBorder" + }, + { + "functionName": "SetBottomBorder" + }, + { + "functionName": "SetRightBorder" + }, + { + "functionName": "SetTriggerOffset" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -46281,6 +50769,65 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsHorizontalWrapping" + }, + { + "functionName": "IsVerticalWrapping" + }, + { + "functionName": "EnableHorizontalWrapping" + }, + { + "functionName": "EnableVerticalWrapping" + }, + { + "functionName": "BorderTop" + }, + { + "functionName": "BorderLeft" + }, + { + "functionName": "BorderRight" + }, + { + "functionName": "BorderBottom" + }, + { + "functionName": "TriggerOffset" + }, + { + "functionName": "SetTopBorder" + }, + { + "functionName": "SetLeftBorder" + }, + { + "functionName": "SetBottomBorder" + }, + { + "functionName": "SetRightBorder" + }, + { + "functionName": "SetTriggerOffset" + }, + { + "functionName": "SaveCurrentVelocities" + }, + { + "functionName": "ApplySavedVelocities" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -46408,6 +50955,7 @@ { "author": "Silver-Streak, @Bouh, Tristan Rhodes", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Object \"Is On Screen\" Detection", "gdevelopVersion": "", @@ -46442,6 +50990,9 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "This behavior provides a condition to check if the object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.\nNote that object visibility, such as being hidden or 0 opacity, is not considered (but you can use those existing conditions in addition to this behavior).", @@ -46532,6 +51083,14 @@ ] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsOnScreen" + } + ] + }, "propertyDescriptors": [], "propertiesFolderStructure": { "folderName": "__ROOT" @@ -46543,6 +51102,7 @@ { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D collision", "gdevelopVersion": ">=5.5.222", @@ -47451,12 +52011,63 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "onFirstSceneLoaded" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "AreWithinDistance" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SqDistance" + }, + { + "functionName": "DistanceToPosition" + }, + { + "functionName": "SqDistanceToPosition" + }, + { + "functionName": "SeparateFromObjects" + } + ] + }, + { + "folderName": "Objects", + "children": [ + { + "functionName": "PickNearest" + } + ] + }, + { + "folderName": "Collision", + "children": [ + { + "functionName": "AreInCollision" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "", "gdevelopVersion": "", @@ -47540,6 +52151,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onScenePreEvents" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Rotate continuously and make a sound when deleted.", @@ -47603,1091 +52222,1696 @@ ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", - "type": "object" - }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Collectible::Collectible", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Rotating the coins in game." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "Object", + "RotationSpeed", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Collectible::Collectible", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onDestroy" + }, + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "50", + "type": "Number", + "unit": "AngularSpeed", + "label": "Rotation speed", + "name": "RotationSpeed" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "RotationSpeed" + } + ] + } + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "dimension": "", + "extensionNamespace": "", + "fullName": "Leaderboard dialog", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", + "name": "LeaderboardDialog", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", + "version": "1.0.1", + "description": "Display the player score and allow to submit it to a leaderboard.", + "origin": { + "identifier": "LeaderboardDialog", + "name": "gdevelop-extension-store" + }, + "tags": [ + "" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", + "functionType": "StringExpression", + "name": "FormatTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(Time)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(floor(Time * 1000))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS.ms\"" + ] + } + ], + "actions": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Collectible::Collectible", - "type": "behavior" + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] } - ], - "objectGroups": [] + ] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "StringVariable" }, - "comment": "Rotating the coins in game." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Rotate" - }, - "parameters": [ - "Object", - "RotationSpeed", - "" - ] - } + "parameters": [ + "Format", + "=", + "\"HH:MM:SS\"" ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", - "type": "object" - }, + "actions": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Collectible::Collectible", - "type": "behavior" + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ + "expressionType": { + "type": "string" + }, + "parameters": [ { - "value": "50", - "type": "Number", - "unit": "AngularSpeed", - "label": "Rotation speed", - "name": "RotationSpeed" + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Format", + "name": "Format", + "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", + "type": "stringWithSelector" } ], - "propertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "RotationSpeed" - } - ] - } - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Leaderboard dialog", - "gdevelopVersion": "", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", - "name": "LeaderboardDialog", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "Display the player score and allow to submit it to a leaderboard.", - "version": "1.0.1", - "description": "Display the player score and allow to submit it to a leaderboard.", - "origin": { - "identifier": "LeaderboardDialog", - "name": "gdevelop-extension-store" - }, - "tags": [ - "" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ + "objectGroups": [] + }, { - "description": "Check if the events are running for the editor.", - "fullName": "Editor is running", - "functionType": "Condition", - "name": "IsInGameEdition", + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "To fixed", + "functionType": "StringExpression", + "name": "ToFixed", "private": true, - "sentence": "Events are running for the editor", + "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const game = runtimeScene.getGame();\r", - "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" ], "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false } ], - "parameters": [], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], "objectGroups": [] }, { - "description": "Return a formated time for a given timestamp", - "fullName": "Format time", + "fullName": "Pad start", "functionType": "StringExpression", - "name": "FormatTime", + "name": "PadStart", "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], - "actions": [ + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", + "const padString = eventsFunctionContext.getArgument(\"PadString\");", + "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Text", + "name": "Value", + "type": "string" + }, + { + "description": "Target length", + "name": "TargetLength", + "type": "expression" + }, + { + "description": "Pad string", + "name": "PadString", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "FormatTime" + }, + { + "functionName": "ToFixed" + }, + { + "functionName": "PadStart" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "LeaderboardDialog", + "description": "Displays the player score and allows to submit it to a leaderboard.", + "fullName": "Leaderboard dialog", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "LeaderboardDialog", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Score:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "ToString(Time)" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"MM:SS.ms\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" - ] - } - ] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"MM:SS\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" - ] - } - ] + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" }, - "parameters": [ - "Format", - "=", - "\"SS\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnString" + { + "objectName": "BitmapScoreLabel" }, - "parameters": [ - "LeaderboardDialog::ToFixed(Time, 3)" - ] - } - ] - }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "ActionTextButton", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"SS.ms\"" - ] - } - ], - "actions": [ + "name": "RetryTextButton" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::ToFixed(Time, 3)" - ] + "name": "BackTextButton" + }, + { + "name": "NextTextButton" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Titles", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"ms\"" - ] - } - ], - "actions": [ + "name": "Title" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "ToString(floor(Time * 1000))" - ] + "name": "BitmapTitle" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "ScoreLabels", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"HH:MM:SS.ms\"" - ] - } - ], - "actions": [ + "name": "ScoreLabel" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" - ] + "name": "BitmapScoreLabel" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "BestScoreLabels", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"HH:MM:SS\"" - ] - } - ], - "actions": [ + "name": "BestScoreLabel" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" - ] + "name": "BitmapBestScoreLabel" } ] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Time", - "name": "Time", - "type": "expression" - }, - { - "description": "Format", - "name": "Format", - "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Formats a number to a string with the specified number of decimal places.", - "fullName": "To fixed", - "functionType": "StringExpression", - "name": "ToFixed", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "layers": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", - "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", - "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "effects": [] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ + "instances": [ { - "description": "The value to be rounded", - "name": "ValueToBeRounded", - "type": "expression" + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Number of decimal places", - "name": "NumberOfDecimalPlaces", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "fullName": "Pad start", - "functionType": "StringExpression", - "name": "PadStart", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const value = eventsFunctionContext.getArgument(\"Value\");", - "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", - "const padString = eventsFunctionContext.getArgument(\"PadString\");", - "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Text", - "name": "Value", - "type": "string" + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Target length", - "name": "TargetLength", - "type": "expression" + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Pad string", - "name": "PadString", - "type": "string" + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [ - { - "areaMaxX": 688, - "areaMaxY": 480, - "areaMaxZ": 48, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "LeaderboardDialog", - "description": "Displays the player score and allows to submit it to a leaderboard.", - "fullName": "Leaderboard dialog", - "isInnerAreaFollowingParentSize": true, - "isUsingLegacyInstancesRenderer": false, - "name": "LeaderboardDialog", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Score:", - "font": "", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Score:", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.0174418604651163, + "windowMask": false, + "selectedLayer": "" + }, + "eventsFunctions": [ { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "DefaultPlayerName", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } + ] + } + ] } ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Send" - } + "objectGroups": [] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RetryTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitTextButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + } + ] } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Restart" - } + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [ + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Score" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - ] + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Title", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Score", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabels", + "Text", + "=", + "ScoreLabelText + Object.FormatScore(Value)" + ] + } + ] } ], - "string": "Game over", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game over", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "BackTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Back" - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Medal", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [] + "objectGroups": [] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "NextTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the best score of the object.", + "fullName": "Best score", + "functionType": "ExpressionAndCondition", + "name": "BestScore", + "sentence": "the best score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "BestScore" + ] + } + ] } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Next" - } - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "BestScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Best:", - "font": "", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 + "expressionType": { + "type": "expression" }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Best:", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "BitmapTitle", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "text": "Game over", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "top" - } - }, - { - "assetStoreId": "", - "name": "BitmapScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Score:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } + "objectGroups": [] }, { - "assetStoreId": "", - "name": "BitmapBestScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Best:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Bitmap labels", - "children": [ - { - "objectName": "BitmapTitle" - }, - { - "objectName": "BitmapScoreLabel" - }, - { - "objectName": "BitmapBestScoreLabel" - } - ] - }, - { - "objectName": "Title" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "BestScoreLabel" - }, - { - "objectName": "Medal" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitTextButton" - }, - { - "objectName": "RetryTextButton" - }, - { - "objectName": "BackTextButton" - }, - { - "objectName": "NextTextButton" - }, - { - "objectName": "Panel" - } - ] - }, - "objectsGroups": [ - { - "name": "ActionTextButton", - "objects": [ - { - "name": "RetryTextButton" - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BestScore", + "name": "SetBestScore", + "sentence": "", + "events": [ { - "name": "BackTextButton" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BestScore", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "BestScoreLabels", + "Text", + "=", + "BestScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ { - "name": "NextTextButton" + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - ] + ], + "objectGroups": [] }, { - "name": "Titles", - "objects": [ + "description": "Return the formated score.", + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "private": true, + "sentence": "", + "events": [ { - "name": "Title" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" + ] + } + ] }, { - "name": "BitmapTitle" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "!=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" + ] + } + ] } - ] - }, - { - "name": "ScoreLabels", - "objects": [ + ], + "expressionType": { + "type": "string" + }, + "parameters": [ { - "name": "ScoreLabel" + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" }, { - "name": "BitmapScoreLabel" + "description": "Score", + "name": "Value", + "type": "expression" } - ] + ], + "objectGroups": [] }, { - "name": "BestScoreLabels", - "objects": [ - { - "name": "BestScoreLabel" - }, + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ { - "name": "BitmapBestScoreLabel" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "DefaultPlayerName" + ] + } + ] } - ] - } - ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + ], + "expressionType": { + "type": "string" + }, + "parameters": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": false, - "height": 71, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", - "width": 606, - "x": 36, - "y": 41, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 96, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", - "width": 360, - "x": 40, - "y": 160, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RetryTextButton", - "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", - "width": 0, - "x": 224, - "y": 320, - "zOrder": 35, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 48, - "height": 106, - "layer": "", - "name": "SubmitTextButton", - "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", - "width": 216, - "x": 432, - "y": 150, - "zOrder": 37, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "objectGroups": [] }, - { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 480, - "layer": "", - "name": "Panel", - "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", - "width": 688, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "editionSettings": { - "grid": false, - "gridType": "rectangular", - "gridWidth": 32, - "gridHeight": 32, - "gridOffsetX": 0, - "gridOffsetY": 0, - "gridColor": 10401023, - "gridAlpha": 0.8, - "snap": false, - "zoomFactor": 1.0174418604651163, - "windowMask": false, - "selectedLayer": "" - }, - "eventsFunctions": [ { "fullName": "", - "functionType": "Action", - "name": "onCreated", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", "sentence": "", "events": [ { @@ -48696,38 +53920,113 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "DefaultPlayerName", "=", - "0", - "" + "Value" ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] }, { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + "value": "StringVariable" }, "parameters": [ - "Object", - "=", "DefaultPlayerName", - "" + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "DefaultPlayerName" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PlayerNameInput.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "LeaderboardDialog::IsInGameEdition" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ - "", + "RetryTextButton", "" ] } @@ -48735,45 +54034,18 @@ "actions": [ { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ "" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -48790,188 +54062,149 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "description": "Check if the next button of the dialog is clicked.", + "fullName": "Next button clicked", + "functionType": "Condition", + "name": "IsNextClicked", + "sentence": "Next button of _PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "LeaderboardDialog::IsInGameEdition" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ - "", + "NextTextButton", "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the back button of the dialog is clicked.", + "fullName": "Back button clicked", + "functionType": "Condition", + "name": "IsBackClicked", + "sentence": "Back button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + "parameters": [ + "BackTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitTextButton", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" - ] - } - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -48988,11 +54221,11 @@ "objectGroups": [] }, { - "description": "the score.", - "fullName": "Score", + "description": "the leaderboard of the object.", + "fullName": "Leaderboard", "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", + "name": "LeaderboardId", + "sentence": "the leaderboard", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -49000,17 +54233,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Score" + "LeaderboardId" ] } ] } ], "expressionType": { - "type": "expression" + "type": "leaderboardId" }, "parameters": [ { @@ -49025,8 +54258,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", + "getterName": "LeaderboardId", + "name": "SetLeaderboardId", "sentence": "", "events": [ { @@ -49035,24 +54268,13 @@ "actions": [ { "type": { - "value": "SetNumberVariable" + "value": "SetStringVariable" }, "parameters": [ - "Score", + "LeaderboardId", "=", "Value" ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "ScoreLabels", - "Text", - "=", - "ScoreLabelText + Object.FormatScore(Value)" - ] } ] } @@ -49068,11 +54290,12 @@ "objectGroups": [] }, { - "description": "the best score of the object.", - "fullName": "Best score", + "description": "the title of the object.", + "fullName": "Title", "functionType": "ExpressionAndCondition", - "name": "BestScore", - "sentence": "the best score", + "name": "Title", + "private": true, + "sentence": "the title", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -49080,17 +54303,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "BestScore" + "Title.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -49105,33 +54328,23 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "BestScore", - "name": "SetBestScore", + "getterName": "Title", + "name": "SetTitle", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "BestScore", - "=", - "Value" - ] - }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "BestScoreLabels", + "Title", "Text", "=", - "BestScoreLabelText + Object.FormatScore(Value)" + "Value" ] } ] @@ -49146,358 +54359,1001 @@ } ], "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Score" + }, + { + "functionName": "SetScore" + }, + { + "functionName": "BestScore" + }, + { + "functionName": "SetBestScore" + }, + { + "functionName": "FormatScore" + }, + { + "functionName": "DefaultPlayerName" + }, + { + "functionName": "SetDefaultPlayerName" + }, + { + "functionName": "PlayerName" + }, + { + "functionName": "IsRestartClicked" + }, + { + "functionName": "IsNextClicked" + }, + { + "functionName": "IsBackClicked" + }, + { + "functionName": "IsScoreSubmitted" + }, + { + "functionName": "LeaderboardId" + }, + { + "functionName": "SetLeaderboardId" + }, + { + "functionName": "Title" + }, + { + "functionName": "SetTitle" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" }, { - "description": "Return the formated score.", - "fullName": "Format score", - "functionType": "StringExpression", - "name": "FormatScore", - "private": true, - "sentence": "", - "events": [ + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Best score", + "hidden": true, + "name": "BestScore" + }, + { + "value": "Number", + "type": "Choice", + "label": "Format", + "group": "Score format", + "choices": [ + { + "label": "Number", + "value": "Number" + }, + { + "label": "MM:SS.ms", + "value": "MM:SS.ms" + }, + { + "label": "MM:SS", + "value": "MM:SS" + }, + { + "label": "SS.ms", + "value": "SS.ms" + }, + { + "label": "SS", + "value": "SS" + }, + { + "label": "ms", + "value": "ms" + }, + { + "label": "HH:MM:SS.ms", + "value": "HH:MM:SS.ms" + }, + { + "label": "HH:MM:SS", + "value": "HH:MM:SS" + } + ], + "name": "Format" + }, + { + "value": "", + "type": "String", + "label": "Prefix", + "group": "Score format", + "name": "Prefix" + }, + { + "value": "", + "type": "String", + "label": "Suffix", + "group": "Score format", + "name": "Suffix" + }, + { + "value": "3", + "type": "Number", + "label": "Round to decimal point", + "group": "Score format", + "name": "NumberDecimalPoint" + }, + { + "value": "Score: ", + "type": "String", + "label": "Score label", + "name": "ScoreLabelText" + }, + { + "value": "Best: ", + "type": "String", + "label": "Best score label", + "name": "BestScoreLabelText" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "DefaultPlayerName" + }, + { + "propertyName": "LeaderboardId" + }, + { + "propertyName": "Score" + }, + { + "propertyName": "BestScore" + }, + { + "folderName": "Score format", + "children": [ + { + "propertyName": "Format" + }, + { + "propertyName": "Prefix" + }, + { + "propertyName": "Suffix" + }, + { + "propertyName": "NumberDecimalPoint" + } + ] + }, + { + "propertyName": "ScoreLabelText" + }, + { + "propertyName": "BestScoreLabelText" + } + ] + }, + "variants": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Grey and yellow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Time:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "Chango-Regular.ttf", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "assets\\Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"Number\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" - ] - } - ] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "!=", - "\"Number\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } }, { - "description": "Score", - "name": "Value", - "type": "expression" + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } } ], - "objectGroups": [] - }, - { - "description": "the default player name.", - "fullName": "Default player name", - "functionType": "ExpressionAndCondition", - "name": "DefaultPlayerName", - "sentence": "the default player name", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" }, - "parameters": [ - "DefaultPlayerName" - ] - } - ] - } - ], - "expressionType": { - "type": "string" + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "DefaultPlayerName", - "name": "SetDefaultPlayerName", - "sentence": "", - "events": [ + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "ActionTextButton", + "objects": [ { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "DefaultPlayerName", - "=", - "Value" - ] + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Titles", + "objects": [ { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] + "name": "Title" }, { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "DefaultPlayerName", - "!=", - "\"0\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "DefaultPlayerName" - ] + "name": "BitmapTitle" } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the player name.", - "fullName": "Player name", - "functionType": "ExpressionAndCondition", - "name": "PlayerName", - "sentence": "the player name", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "ScoreLabels", + "objects": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "PlayerNameInput.Text::Value()" - ] + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" } ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the restart button of the dialog is clicked.", - "fullName": "Restart button clicked", - "functionType": "Condition", - "name": "IsRestartClicked", - "sentence": "Restart button of _PARAM0_ is clicked", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "RetryTextButton", - "" - ] - } - ], - "actions": [ + "name": "BestScoreLabels", + "objects": [ { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] + "name": "BestScoreLabel" }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "BitmapBestScoreLabel" } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the next button of the dialog is clicked.", - "fullName": "Next button clicked", - "functionType": "Condition", - "name": "IsNextClicked", - "sentence": "Next button of _PARAM0_ is clicked", - "events": [ + "layers": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "NextTextButton", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } - ] + ], + "effects": [] } ], - "parameters": [ + "instances": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] - }, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.0174418604651163, + "windowMask": false, + "selectedLayer": "" + } + } + ] + } + ] + }, + { + "author": "", + "category": "", + "dimension": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "AirControl3D", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Turn and move objects forward.", + "fullName": "3D air control", + "name": "AirControl3D", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ { - "description": "Check if the back button of the dialog is clicked.", - "fullName": "Back button clicked", - "functionType": "Condition", - "name": "IsBackClicked", - "sentence": "Back button of _PARAM0_ is clicked", + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "BackTextButton", - "" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveBackward", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveForward", + "True", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveBackward", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForce", + "=", + "-Force" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveForward", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForce", + "=", + "Force" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Physics3D::Physics3DBehavior::ApplyForceAtCenter" + }, + "parameters": [ + "Object", + "Physics3D", + "XFromAngleAndDistance(Object.Angle(), CurrentForce)", + "YFromAngleAndDistance(Object.Angle(), CurrentForce)", + "0" + ] + } + ] + } + ], + "variables": [ + { + "name": "CurrentForce", + "type": "number", + "value": 0 + } ] } ] @@ -49507,196 +55363,133 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AirControl3D::AirControl3D", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", - "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", + "description": "Simulate a press of the move backward key.", + "fullName": "Simulate move backward key press", + "functionType": "Action", + "group": "Top-down walk state", + "name": "SimulateMoveBackwardKey", + "sentence": "Simulate pressing move backward key for _PARAM0_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Allow to try and submit again in case of error." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" - }, - "parameters": [] - }, - { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "LeaderboardId" + "HadPressedMoveBackward", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "True" + "HasPressedMoveBackwardLast", + "True", + "" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the leaderboard of the object.", - "fullName": "Leaderboard", - "functionType": "ExpressionAndCondition", - "name": "LeaderboardId", - "sentence": "the leaderboard", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetBooleanVariable" }, "parameters": [ - "LeaderboardId" + "HasPressedMoveBackward", + "True", + "" ] } ] } ], - "expressionType": { - "type": "leaderboardId" - }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AirControl3D::AirControl3D", + "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LeaderboardId", - "name": "SetLeaderboardId", - "sentence": "", + "description": "Simulate a press of the move forward key.", + "fullName": "Simulate move forward key press", + "functionType": "Action", + "group": "Top-down walk state", + "name": "SimulateMoveForwardKey", + "sentence": "Simulate pressing move forward key for _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "SetStringVariable" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "LeaderboardId", - "=", - "Value" + "HadPressedMoveForward", + "True", + "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the title of the object.", - "fullName": "Title", - "functionType": "ExpressionAndCondition", - "name": "Title", - "private": true, - "sentence": "the title", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + ], "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetBooleanVariable" }, "parameters": [ - "Title.Text::Value()" + "HasPressedMoveBackwardLast", + "False", + "" ] } ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Title", - "name": "SetTitle", - "sentence": "", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "SetBooleanVariable" }, "parameters": [ - "Title", - "Text", - "=", - "Value" + "HasPressedMoveForward", + "True", + "" ] } ] @@ -49705,1179 +55498,945 @@ "parameters": [ { "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "name": "DefaultPlayerName" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "name": "LeaderboardId" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "hidden": true, - "name": "Score" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "Best score", - "hidden": true, - "name": "BestScore" - }, - { - "value": "Number", - "type": "Choice", - "label": "Format", - "group": "Score format", - "choices": [ - { - "label": "Number", - "value": "Number" - }, - { - "label": "MM:SS.ms", - "value": "MM:SS.ms" - }, - { - "label": "MM:SS", - "value": "MM:SS" - }, - { - "label": "SS.ms", - "value": "SS.ms" - }, - { - "label": "SS", - "value": "SS" - }, - { - "label": "ms", - "value": "ms" - }, - { - "label": "HH:MM:SS.ms", - "value": "HH:MM:SS.ms" + "name": "Object", + "type": "object" }, { - "label": "HH:MM:SS", - "value": "HH:MM:SS" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AirControl3D::AirControl3D", + "type": "behavior" } ], - "name": "Format" - }, - { - "value": "", - "type": "String", - "label": "Prefix", - "group": "Score format", - "name": "Prefix" - }, + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Top-down walk state", + "children": [ + { + "functionName": "SimulateMoveBackwardKey" + }, + { + "functionName": "SimulateMoveForwardKey" + } + ] + } + ] + }, + "propertyDescriptors": [ { "value": "", - "type": "String", - "label": "Suffix", - "group": "Score format", - "name": "Suffix" + "type": "Behavior", + "label": "3D physics engine", + "extraInformation": [ + "Physics3D::Physics3DBehavior" + ], + "choices": [], + "name": "Physics3D" }, { - "value": "3", + "value": "4000", "type": "Number", - "label": "Round to decimal point", - "group": "Score format", - "name": "NumberDecimalPoint" + "unit": "Newton", + "label": "Force", + "name": "Force" }, { - "value": "Score: ", - "type": "String", - "label": "Score label", - "name": "ScoreLabelText" + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasPressedMoveForward" }, { - "value": "Best: ", - "type": "String", - "label": "Best score label", - "name": "BestScoreLabelText" + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasPressedMoveBackward" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "DefaultPlayerName" - }, - { - "propertyName": "LeaderboardId" + "propertyName": "Physics3D" }, { - "propertyName": "Score" + "propertyName": "Force" }, { - "propertyName": "BestScore" + "propertyName": "HasPressedMoveForward" }, { - "folderName": "Score format", - "children": [ - { - "propertyName": "Format" - }, - { - "propertyName": "Prefix" - }, - { - "propertyName": "Suffix" - }, - { - "propertyName": "NumberDecimalPoint" - } - ] - }, + "propertyName": "HasPressedMoveBackward" + } + ] + }, + "sharedPropertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "Cos" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "Sin" + } + ], + "sharedPropertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ { - "propertyName": "ScoreLabelText" + "propertyName": "Cos" }, { - "propertyName": "BestScoreLabelText" + "propertyName": "Sin" } ] - }, - "variants": [ - { - "areaMaxX": 688, - "areaMaxY": 480, - "areaMaxZ": 48, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "name": "Grey and yellow", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Time:", - "font": "Chango-Regular.ttf", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Time:", - "font": "Chango-Regular.ttf", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "Chango-Regular.ttf", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Send" - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RetryTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Restart" - } - }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - } - ] - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Title", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Game over", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game over", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "BackTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Back" - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Medal", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [] - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "NextTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Next" - } - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "BestScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Best:", - "font": "", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Best:", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "BitmapTitle", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "text": "Game over", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "top" - } - }, + } + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "", + "dimension": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "UntitledExtension", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 100, + "areaMaxY": 100, + "areaMaxZ": 100, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", + "description": "", + "fullName": "", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "MyObject", + "objects": [ + { + "assetStoreId": "", + "name": "New3DBox", + "persistentUuid": "6bc25717-cae1-4924-8624-86120af32b61", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 100, + "height": 100, + "depth": 100, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "New3DBox" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "assetStoreId": "", - "name": "BitmapScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Score:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } - }, + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "New3DBox", + "persistentUuid": "8915f36f-608f-4f98-abad-b884378980c8", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.180511245667042, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + }, + "variants": [] + }, + { + "areaMaxX": 50, + "areaMaxY": 50, + "areaMaxZ": 50, + "areaMinX": -50, + "areaMinY": -50, + "areaMinZ": -50, + "defaultName": "", + "description": "", + "fullName": "", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "MyObject2", + "objects": [ + { + "assetStoreId": "", + "name": "New3DBox", + "persistentUuid": "6bc25717-cae1-4924-8624-86120af32b61", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 100, + "height": 100, + "depth": 100, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "New3DBox" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "assetStoreId": "", - "name": "BitmapBestScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Best:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Bitmap labels", - "children": [ - { - "objectName": "BitmapTitle" - }, - { - "objectName": "BitmapScoreLabel" - }, - { - "objectName": "BitmapBestScoreLabel" - } - ] - }, - { - "objectName": "Title" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "BestScoreLabel" - }, - { - "objectName": "Medal" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitTextButton" - }, - { - "objectName": "RetryTextButton" - }, - { - "objectName": "BackTextButton" - }, - { - "objectName": "NextTextButton" - }, - { - "objectName": "Panel" - } - ] + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "New3DBox", + "persistentUuid": "8915f36f-608f-4f98-abad-b884378980c8", + "width": 0, + "x": -50, + "y": -50, + "z": -50, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 5.2729153475416, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + }, + "variants": [] + } + ] + }, + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Game mechanic", + "dimension": "2D", + "extensionNamespace": "", + "fullName": "Rectangular flood fill", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGc+DQoJPHJlY3QgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjgiLz4NCgk8cmVjdCB4PSIxMiIgeT0iMTIiIHdpZHRoPSI4IiBoZWlnaHQ9IjgiLz4NCgk8cmVjdCB4PSIyIiB5PSIxMiIgd2lkdGg9IjgiIGhlaWdodD0iOCIvPg0KCTxyZWN0IHg9IjEyIiB5PSIyMiIgd2lkdGg9IjgiIGhlaWdodD0iOCIvPg0KCTxyZWN0IHg9IjIyIiB5PSIxMiIgd2lkdGg9IjgiIGhlaWdodD0iOCIvPg0KCTxwYXRoIGQ9Ik0yMiwyMnY4aDdjMC42LDAsMS0wLjQsMS0xdi03SDIyeiIvPg0KCTxwYXRoIGQ9Ik0xMCwyMkgydjdjMCwwLjYsMC40LDEsMSwxaDdWMjJ6Ii8+DQoJPHBhdGggZD0iTTEwLDEwVjJIM0MyLjQsMiwyLDIuNCwyLDN2N0gxMHoiLz4NCgk8cGF0aCBkPSJNMjIsMTBoOFYzYzAtMC42LTAuNC0xLTEtMWgtN1YxMHoiLz4NCjwvZz4NCjwvc3ZnPg0K", + "name": "RectangularFloodFill", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Graphic Design/Graphic Design_grid.svg", + "shortDescription": "Create objects as a grid to cover a rectangular area or an other object.", + "version": "2.1.0", + "description": [ + "This extension can be used to create multiple copies of an object in a wide variety of 2D arrangements, including:", + "- horizontal row(s)", + "- vertical column(s)", + "- a solid rectangle or square", + "- an evenly spaced grid", + "- a grid with different spacing between rows and columns", + "", + "How To Use:", + "- Place target objects in the scene in the places you want fill objects to be created", + "- This action only needs to be run once (at the beginning of the scene or using \"Trigger Once\")", + "", + "Object variables (automatically added on Fill objects): ", + "- \"CreationID\" (number)", + "- \"RowID\" (number)", + "- \"ColumnID\" (number)", + "", + "Tips:", + "- Use fill objects that are the same size as the scene editor grid. This will make sure the fill objects fit exactly inside the target objects.", + "- Hide target objects at the beginning of the scene if you don't want them to be visible.", + "- Keep the default origin point (top-left corner) on fill objects them to line up exactly with target objects.", + "", + "Watch this [tutorial video](https://youtu.be/rlGSlNSRR9w) to see examples of how to use this extension." + ], + "origin": { + "identifier": "RectangularFloodFill", + "name": "gdevelop-extension-store" + }, + "tags": [ + "create", + "grid" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "changelog": [ + { + "version": "2.0.0", + "breaking": [ + "- The action no longer set \"BatchID\" variables. It can be done on the created objects after calling the action.", + "- Spacing parameters have been inverted." + ] + } + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Create fill objects that cover the rectangular area of target objects.", + "fullName": "Create objects to flood fill other objects", + "functionType": "Action", + "name": "RectangularFloodFill", + "sentence": "Create _PARAM2_ to cover _PARAM1_ with _PARAM3_ pixels between columns and _PARAM4_ pixels between rows on layer: _PARAM5_ at Z-order: _PARAM6_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "objectsGroups": [ + "comment": "Create a temp object to determine size of fill object, then delete it" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "ActionTextButton", - "objects": [ - { - "name": "RetryTextButton" - }, - { - "name": "BackTextButton" - }, - { - "name": "NextTextButton" - } + "type": { + "value": "Create" + }, + "parameters": [ + "", + "FillObject", + "0", + "0", + "" ] }, { - "name": "Titles", - "objects": [ - { - "name": "Title" - }, - { - "name": "BitmapTitle" - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectWidth", + "=", + "FillObject.Width()" ] }, { - "name": "ScoreLabels", - "objects": [ - { - "name": "ScoreLabel" - }, - { - "name": "BitmapScoreLabel" - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectHeight", + "=", + "FillObject.Height()" ] }, { - "name": "BestScoreLabels", - "objects": [ - { - "name": "BestScoreLabel" - }, - { - "name": "BitmapBestScoreLabel" - } + "type": { + "value": "Delete" + }, + "parameters": [ + "FillObject", + "Floor" ] } ], - "layers": [ + "events": [ { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create permanent objects using the Create Multiple Copies of Object extension" + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "TargetObject", + "conditions": [], + "actions": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "type": { + "value": "RectangularFloodFill::CreateObjectsOverRectangle" + }, + "parameters": [ + "", + "FillObject", + "floor(TargetObject.Width() / (ObjectWidth + SpaceBetweenColumns))", + "floor(TargetObject.Height() / (ObjectHeight + SpaceBetweenRows))", + "TargetObject.CenterX() - TargetObject.Width() / 2", + "TargetObject.CenterY() - TargetObject.Height() / 2", + "SpaceBetweenColumns", + "SpaceBetweenRows", + "Layer", + "Zorder", + "Zorder" + ] } - ], - "effects": [] + ] } ], - "instances": [ - { - "angle": 0, - "customSize": false, - "height": 71, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", - "width": 606, - "x": 36, - "y": 41, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, + "variables": [ { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 96, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", - "width": 360, - "x": 40, - "y": 160, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "name": "ObjectWidth", + "type": "number", + "value": 0 }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RetryTextButton", - "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", - "width": 0, - "x": 224, - "y": 320, - "zOrder": 35, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "name": "ObjectHeight", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Target object", + "longDescription": "Rectangular area that will be covered by fill objects", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Fill object", + "longDescription": "Object that is created to cover the rectangular area of target objects", + "name": "FillObject", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "Space between columns (pixels)", + "name": "SpaceBetweenColumns", + "type": "expression" + }, + { + "description": "Space between rows (pixels)", + "name": "SpaceBetweenRows", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + }, + { + "description": "Z order", + "name": "Zorder", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Create multiple copies of an object.", + "fullName": "Create objects to flood fill a rectanglular area", + "functionType": "Action", + "name": "CreateObjectsOverRectangle", + "sentence": "Create _PARAM2_ columns and _PARAM3_ rows of _PARAM1_ with top-left corner at _PARAM4_ ; _PARAM5_ and _PARAM6_ pixels between columns and _PARAM7_ pixels between rows on layer: _PARAM8_ at Z-order: _PARAM9_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Temp object is created to record its width and height (which is needed to calculate spacing)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Object", + "0", + "0", + "" + ] }, { - "angle": 0, - "customSize": true, - "depth": 48, - "height": 106, - "layer": "", - "name": "SubmitTextButton", - "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", - "width": 216, - "x": 432, - "y": 150, - "zOrder": 37, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectWidth", + "=", + "Object.Width()" + ] }, { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 480, - "layer": "", - "name": "Panel", - "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", - "width": 688, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectHeight", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Object", + "Floor" + ] } ], - "editionSettings": { - "grid": false, - "gridType": "rectangular", - "gridWidth": 32, - "gridHeight": 32, - "gridOffsetX": 0, - "gridOffsetY": 0, - "gridColor": 10401023, - "gridAlpha": 0.8, - "snap": false, - "zoomFactor": 1.0174418604651163, - "windowMask": false, - "selectedLayer": "" - } - } - ] - } - ] - }, - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "", - "gdevelopVersion": "", - "helpPath": "", - "iconUrl": "", - "name": "AirControl3D", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Turn and move objects forward.", - "fullName": "3D air control", - "name": "AirControl3D", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Starting at top left, create objects in grid." + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "NumberOfRows", + "conditions": [], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "SetNumberVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "x", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "NumberOfColumns", + "conditions": [], + "actions": [ { "type": { - "value": "BooleanVariable" + "value": "Create" }, "parameters": [ - "HasPressedMoveBackward", - "True", - "" + "", + "Object", + "StartingPositionX + x * (ObjectWidth + ColumnSpacing)", + "StartingPositionY + y * (ObjectHeight + RowSpacing)", + "Layer" ] }, { "type": { - "value": "BooleanVariable" + "value": "ModVarObjet" }, "parameters": [ - "HasPressedMoveForward", - "True", - "" + "Object", + "RowID", + "=", + "y + 1" ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackward", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentForce", - "=", - "-Force" - ] - } + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "ColumnID", + "=", + "x + 1" ] }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "CreationID", + "=", + "CreationID" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "x", + "+", + "1" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CreationID", + "+", + "1" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "NumberVariable" }, "parameters": [ - "HasPressedMoveForward", - "True", - "" + "Zorder", + "!=", + "0" ] } ], "actions": [ { "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentForce", - "=", - "Force" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Physics3D::Physics3DBehavior::ApplyForceAtCenter" + "value": "ChangePlan" }, "parameters": [ "Object", - "Physics3D", - "XFromAngleAndDistance(Object.Angle(), CurrentForce)", - "YFromAngleAndDistance(Object.Angle(), CurrentForce)", - "0" + "=", + "Zorder" ] } ] } - ], - "variables": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "CurrentForce", - "type": "number", - "value": 0 + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "y", + "+", + "1" + ] } ] } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "AirControl3D::AirControl3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Simulate a press of the move backward key.", - "fullName": "Simulate move backward key press", - "functionType": "Action", - "group": "Top-down walk state", - "name": "SimulateMoveBackwardKey", - "sentence": "Simulate pressing move backward key for _PARAM0_", - "events": [ + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "HadPressedMoveBackward", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackwardLast", - "True", - "" - ] - } - ] + "name": "ObjectWidth", + "type": "number", + "value": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackward", - "True", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "name": "ObjectHeight", + "type": "number", + "value": 0 }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "AirControl3D::AirControl3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Simulate a press of the move forward key.", - "fullName": "Simulate move forward key press", - "functionType": "Action", - "group": "Top-down walk state", - "name": "SimulateMoveForwardKey", - "sentence": "Simulate pressing move forward key for _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "HadPressedMoveForward", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackwardLast", - "False", - "" - ] - } - ] + "name": "x", + "type": "number", + "value": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveForward", - "True", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "name": "y", + "type": "number", + "value": 0 }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "AirControl3D::AirControl3D", - "type": "behavior" + "name": "CreationID", + "type": "number", + "value": 1 } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ + "parameters": [ { - "value": "", - "type": "Behavior", - "label": "3D physics engine", - "extraInformation": [ - "Physics3D::Physics3DBehavior" - ], - "choices": [], - "name": "Physics3D" + "description": "Object", + "name": "Object", + "type": "objectListOrEmptyIfJustDeclared" }, { - "value": "4000", - "type": "Number", - "unit": "Newton", - "label": "Force", - "name": "Force" + "description": "Number of columns (default: 1)", + "name": "NumberOfColumns", + "type": "expression" }, { - "value": "", - "type": "Boolean", - "label": "", - "hidden": true, - "name": "HasPressedMoveForward" + "description": "Number of rows (default: 1)", + "name": "NumberOfRows", + "type": "expression" }, { - "value": "", - "type": "Boolean", - "label": "", - "hidden": true, - "name": "HasPressedMoveBackward" - } - ], - "propertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "Physics3D" - }, - { - "propertyName": "Force" - }, - { - "propertyName": "HasPressedMoveForward" - }, - { - "propertyName": "HasPressedMoveBackward" - } - ] - }, - "sharedPropertyDescriptors": [ + "description": "Top-left starting position (X) (default: 0)", + "name": "StartingPositionX", + "type": "expression" + }, { - "value": "0", - "type": "Number", - "label": "", - "hidden": true, - "name": "Cos" + "description": "Top-left starting position (Y) (default: 0)", + "name": "StartingPositionY", + "type": "expression" }, { - "value": "0", - "type": "Number", - "label": "", - "name": "Sin" + "description": "Amount of space between columns (default: 0)", + "name": "ColumnSpacing", + "type": "expression" + }, + { + "description": "Amount of space between rows (default: 0)", + "name": "RowSpacing", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + }, + { + "description": "Z order", + "name": "Zorder", + "type": "expression" } ], - "sharedPropertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "Cos" - }, - { - "propertyName": "Sin" - } - ] - } + "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "RectangularFloodFill" + }, + { + "functionName": "CreateObjectsOverRectangle" + } + ] + }, + "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], diff --git a/examples/3d-car-coin-hunt/assets/LightGlow.png b/examples/3d-car-coin-hunt/assets/LightGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..871c194ccc645f90c7a7acc1224477b5dbda9738 GIT binary patch literal 1673 zcmV;426p+0P)vG#T3`PNovE8QK+4q0VP3_o{$o)fhPy{#XVmC7!If`ogJH(BkRD>t~lu{58OM6ZK z*3Lis2aguK`3oKl2LD#!&jNx^6y5t-h<>AV^}117Z~f+)+G# zZGngez9NXXp#1SV0s&Ww*Jc|7=d91Qgq9$fE(o|$ye8Hfk`)zW=Dp#$hzS8ViucA4 zgaD54tegV_N(e$)Svz=Q2jiUP3Var+Xe8&F@WH4a!&xA8&b}v}9_g?kNdBMewV43O zfQ?+nIf4Cf5xNLSgS+j9Me?0vK?EksK+A zft{1$0tmiMAuQyG?E7#CD1azZLq-JPD#9FCbh(94q}7E=7U2GVCJ?^WaUoFN z2!J;G_d2MBNHxMp#19MvITKXgxbhtA3&}paeu~Wol+QoJMveem|3xx3I>D*7SrG z6Q}|xO6iDB?>#GmvrylE)^V-xJChi2t%2{e{yq^f3oC!k4)75c5NTcWJ{}i-1At#7 z*Dov!`~rZFdc4(4FfpsJEMpafw9=d`;fo%Z3c&qO**Xx=Ud{iKx>&0Aw=6XI7X&1WM{GA&avcqh*ZDf};n3r__ar zpM?z+&Ggmi{{;YZ11bHXvWHI>F0-=LWv%6laJ^JlWX1obvGPibsI2L=`XVc0z15;x37XsEh83WY z5did?6es}Nzh8`ohE-u^V+|0^|M70m&bP=&eM4*4MiQop&H?{7Z9ckkXyx^Wj_N*7gJV?*ju-gk4(iHn|djpq+zVT_E5JQP=3XN6>@NbF*Y< z_Ct-vzG~8+JfB=s0$Y&NMCIGzRX6Yb=h>L6i0PxD& Date: Tue, 31 Mar 2026 11:05:34 +0200 Subject: [PATCH 2/9] Make the shadow more obvious --- examples/3d-car-coin-hunt/3d-car-coin-hunt.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index fca7ba961..798586469 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1232,7 +1232,7 @@ "gridColor": 10401023, "gridAlpha": 0.5, "snap": true, - "zoomFactor": 0.5117784035210203, + "zoomFactor": 0.4633111824514003, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -2785,8 +2785,8 @@ "rotationX": 24, "rotationY": 324, "width": 0, - "x": -230, - "y": 958, + "x": -91, + "y": 995, "zOrder": 46, "numberProperties": [], "stringProperties": [], @@ -5875,8 +5875,8 @@ "name": "CarWithLight", "persistentUuid": "2a179987-fdc0-449f-a695-861669abf036", "width": 84, - "x": -128, - "y": 1024, + "x": -380, + "y": 906, "zOrder": 0, "numberProperties": [], "stringProperties": [], @@ -10099,7 +10099,8 @@ "content": { "Color": "255;0;0", "Smoothing": 0, - "Image": "New image" + "Image": "New image", + "Intensity": 4 } }, { From 733a7d4171a23857fac61fdc0cd30cd34734d671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 31 Mar 2026 19:30:21 +0200 Subject: [PATCH 3/9] Better culling --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 297 ++++++++++++------ 1 file changed, 208 insertions(+), 89 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 798586469..6ebfa4a24 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -688,14 +688,6 @@ "name": "Road Slant Curve.glb" } }, - { - "file": "assets/New image.png", - "kind": "image", - "metadata": "{\"extension\":\".png\",\"pskl\":{},\"localFilePath\":\"assets/New image.png\"}", - "name": "New image", - "smoothed": true, - "userAdded": false - }, { "file": "assets/LightGlow.png", "kind": "image", @@ -1232,10 +1224,10 @@ "gridColor": 10401023, "gridAlpha": 0.5, "snap": true, - "zoomFactor": 0.4633111824514003, + "zoomFactor": 0.2725359896772945, "windowMask": false, "selectedLayer": "", - "gameEditorMode": "instances-editor" + "gameEditorMode": "embedded-game" }, "objectsGroups": [ { @@ -5849,18 +5841,18 @@ "initialVariables": [] }, { - "angle": 0, + "angle": 161, "customSize": false, "height": 209, "layer": "", "name": "NewSpotLight", "persistentUuid": "1841bf79-51ac-4a73-89ec-ac26e2c86e5f", - "rotationX": 337, - "rotationY": 90, + "rotationX": 156, + "rotationY": 9, "width": 2889, "x": -640, "y": 1280, - "z": 576, + "z": 160, "zOrder": 0, "numberProperties": [], "stringProperties": [], @@ -5881,6 +5873,24 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 229, + "customSize": false, + "height": 80, + "layer": "", + "name": "NewSpotLight", + "persistentUuid": "cb846244-94b5-42fa-9f0a-819b5724d11b", + "rotationX": 51, + "rotationY": 27, + "width": 80, + "x": -768, + "y": 1024, + "z": 128, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -7268,9 +7278,12 @@ "content": { "Color": "255;0;0", "Smoothing": 0, - "Image": "New image", + "Image": "", "ShadowQuality": "Low", - "ConeAngle": 30 + "ConeAngle": 30, + "VisibilityDistanceMax": 2000, + "IsCastingShadow": true, + "Intensity": 4 } }, { @@ -7457,12 +7470,12 @@ "parameters": [ "", "NewSpotLight", - "8", - "8", - "Player.X()", - "Player.Y()", - "1000", - "1000", + "16", + "16", + "Player.X() - 8 * (500 - 80)", + "Player.Y() - 8 * (500 - 80)", + "500", + "500", "", "0", "" @@ -10099,7 +10112,7 @@ "content": { "Color": "255;0;0", "Smoothing": 0, - "Image": "New image", + "Image": "", "Intensity": 4 } }, @@ -41792,23 +41805,16 @@ " return;", "}", "", + "/**", + " * @typedef {gdjs.RuntimeObject & {__cameraDistance: number, __spotLight: THREE.SpotLight, _getIsCastingShadow: () => boolean}} SpotLightRuntimeObject", + " */", + "", "const game = runtimeScene.getGame();", + "const isInGameEdition = game.isInGameEdition && game.isInGameEdition();", "", - "const visibleLightCountMax = 10;", - "const editorVisibleLightCountMax = 4;", - "let visibleLightCount = 0;", - "gdjs.registerRuntimeScenePreEventsCallback(", - " runtimeScene => {", - " visibleLightCount = 0;", - " });", - "if (gdjs.registerInGameEditorPostStepCallback) {", - " gdjs.registerInGameEditorPostStepCallback(", - " runtimeScene => {", - " visibleLightCount = 0;", - " });", - "}", "", "class SpotLight3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", + "", " constructor(", " object,", " instanceContainer,", @@ -41844,35 +41850,30 @@ "", " threeObject3D.visible = !this._object.hidden;", "", + " /** @type {THREE.SpotLight} */", + " //@ts-ignore", + " const spotLight = object.__spotLight;", + "", " const editor = game.getInGameEditor ? game.getInGameEditor() : null;", "", - " if (editor) {", - " const selectedObject = editor._selection.getLastSelectedObject();", - " let parentObject = object;", - " let isSelected = parentObject === selectedObject;", - " const isDirectlySelected = isSelected;", - " while (!isSelected && parentObject.getInstanceContainer()", - " //@ts-ignore", - " .getOwner) {", - " parentObject = parentObject.getInstanceContainer()", - " //@ts-ignore", - " .getOwner();", + " spotLight.castShadow = false;", + " spotLight.visible = false;", + "", + " if (!object.isHidden()) {", + " let isSelected = false;", + " if (editor) {", + " const selectedObject = editor._selection.getLastSelectedObject();", + " let parentObject = object;", " isSelected = parentObject === selectedObject;", + " while (!isSelected && parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " parentObject = parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " isSelected = parentObject === selectedObject;", + " }", " }", - " /** @type {THREE.SpotLight} */", - " //@ts-ignore", - " const spotLight = object.__spotLight;", - " spotLight.visible = isDirectlySelected || (isSelected && visibleLightCount < editorVisibleLightCountMax);", - " if (spotLight.visible) {", - " visibleLightCount++;", - " }", - " }", - " else if (object.isHidden()) {", - " threeObject3D.visible = false;", - " }", - " else if (visibleLightCount >= visibleLightCountMax) {", - " threeObject3D.visible = false;", - " } else {", " let rootObject = object;", " while (rootObject.getInstanceContainer()", " //@ts-ignore", @@ -41881,22 +41882,28 @@ " //@ts-ignore", " .getOwner();", " }", - " const layerName = rootObject.getLayer();", - "", - " const runtimeScene = object.getRuntimeScene();", - " const cameraX = gdjs.evtTools.camera.getCameraX(runtimeScene, layerName, 0);", - " const cameraY = gdjs.evtTools.camera.getCameraY(runtimeScene, layerName, 0);", - " const cameraZ = gdjs.scene3d.camera.getCameraZ(runtimeScene, layerName, 0);", - " const deltaX = rootObject.getX() - cameraX;", - " const deltaY = rootObject.getY() - cameraY;", - " const deltaZ = rootObject.getZ() - cameraZ;", + " const runtimeScene = rootObject.getRuntimeScene();", + " let distanceSq = 0;", + " if (!isSelected) {", + " const layerName = rootObject.getLayer();", + " const cameraX = gdjs.evtTools.camera.getCameraX(runtimeScene, layerName, 0);", + " const cameraY = gdjs.evtTools.camera.getCameraY(runtimeScene, layerName, 0);", + " const cameraZ = gdjs.scene3d.camera.getCameraZ(runtimeScene, layerName, 0);", + " const deltaX = rootObject.getX() - cameraX;", + " const deltaY = rootObject.getY() - cameraY;", + " const deltaZ = rootObject.getZ() - cameraZ;", + " distanceSq = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;", + " }", " //@ts-ignore", " const distanceMax = object._getVisibilityDistanceMax();", - " const isWithInRange = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ <= distanceMax * distanceMax;", - " threeObject3D.visible = isWithInRange;", + " const isWithInRange = distanceSq <= distanceMax * distanceMax;", " if (isWithInRange) {", - " visibleLightCount++;", + " getSpotLightManager(", + " //@ts-ignore", + " runtimeScene", + " ).applyVisibilityAndShadow(object, distanceSq);", " }", + "", " }", "", " // Force the visibility to be checked every frame", @@ -41904,6 +41911,119 @@ " }", "}", "", + "gdjs.registerRuntimeScenePreEventsCallback(", + " runtimeScene => {", + " getSpotLightManager(", + " //@ts-ignore", + " runtimeScene.getScene()", + " ).clear();", + " });", + "if (gdjs.registerInGameEditorPostStepCallback) {", + " gdjs.registerInGameEditorPostStepCallback(", + " inGameEditor => {", + " getSpotLightManager(", + " //@ts-ignore", + " inGameEditor.getEditedInstanceContainer().getScene()", + " ).clear();", + " });", + "}", + "", + "/**", + " * Get the platforms manager of an instance container.", + " * @param {gdjs.RuntimeScene & {__spotLightManager: SpotLightManager}} runtimeScene", + " */", + "function getSpotLightManager(runtimeScene) {", + " if (!runtimeScene.__spotLightManager) {", + " // Create the shared manager if necessary.", + " runtimeScene.__spotLightManager = isInGameEdition ?", + " new SpotLightManager(4, 1) :", + " new SpotLightManager(20, 4);", + " }", + " return runtimeScene.__spotLightManager;", + "}", + "", + "/** @type {{isInserted: boolean, removedObject: SpotLightRuntimeObject | null}} */", + "const sortResult = { isInserted: false, removedObject: null };", + "", + "/**", + " * @param objects {Array}", + " * @param maxCount {number}", + " * @param object {SpotLightRuntimeObject}", + " * @param distance {number}", + " */", + "function insertByDistance(objects, maxCount, object, distance) {", + " sortResult.isInserted = false;", + " sortResult.removedObject = null;", + " let index = objects.length - 1;", + " for (; index >= 0; index--) {", + " const other = objects[index];", + " const otherDistance = other.__cameraDistance;", + " if (distance >= otherDistance) {", + " break;", + " }", + " }", + " if (index + 1 >= maxCount) {", + " return sortResult;", + " }", + " object.__cameraDistance = distance", + " objects.splice(index + 1, 0, object);", + " sortResult.isInserted = true;", + " if (objects.length > maxCount) {", + " sortResult.removedObject = objects.pop();", + " }", + " return sortResult;", + "}", + "", + "class SpotLightManager {", + " /** @type {Array} */", + " visibleObjects = new Array();", + " /** @type {Array} */", + " shadowObjects = new Array();", + " /** @type {number} */", + " maxCount;", + " /** @type {number} */", + " shadowCount;", + "", + " /**", + " * @param maxCount {number}", + " * @param shadowCount {number}", + " */", + " constructor(maxCount, shadowCount) {", + " this.maxCount = maxCount;", + " this.shadowCount = shadowCount;", + " }", + "", + " clear() {", + " this.visibleObjects.length = 0;", + " this.shadowObjects.length = 0;", + " }", + "", + " /**", + " * @param object {SpotLightRuntimeObject}", + " * @param distance {number}", + " */", + " applyVisibilityAndShadow(object, distance) {", + " if (object._getIsCastingShadow()) {", + " const { isInserted, removedObject } = insertByDistance(", + " this.shadowObjects, this.shadowCount, object, distance);", + " if (isInserted) {", + " object.__spotLight.castShadow = true;", + " }", + " if (removedObject) {", + " removedObject.__spotLight.castShadow = false;", + " }", + " }", + " const { isInserted, removedObject } = insertByDistance(", + " this.visibleObjects, this.maxCount, object, distance);", + " if (isInserted) {", + " object.__spotLight.visible = true;", + " }", + " if (removedObject) {", + " removedObject.__spotLight.visible = false;", + " }", + " }", + "}", + "", "const coneLength = 64;", "", "class SpotLightHelper extends THREE.Object3D {", @@ -42085,7 +42205,7 @@ " * @param isCastingShadow {boolean}", " */", " setCastingShadow(isCastingShadow) {", - " this.spotLight.castShadow = isCastingShadow;", + " // This is applied by applyVisibilityAndShadow", " }", "", " /**", @@ -42095,14 +42215,14 @@ " let size = 512;", " switch (shadowQuality) {", " case \"Low\":", - " size = 256;", - " break;", + " size = 256;", + " break;", " case \"Medium\":", - " size = 512;", - " break;", + " size = 512;", + " break;", " case \"High\":", - " size = 1024;", - " break;", + " size = 1024;", + " break;", " }", " this.spotLight.shadow.mapSize.width = size;", " this.spotLight.shadow.mapSize.height = size;", @@ -42334,7 +42454,7 @@ "const game = runtimeScene.getGame();", "", "// This is a hack that may break in future releases.", - "// Replace the group that would hold children objects by the emmiter.", + "// Replace the group that would hold children objects by the light.", "const layer = object.getInstanceContainer().getLayer(object.getLayer());", "const group = object.getRenderer()._threeGroup;", "layer.getRenderer().remove3DRendererObject(group);", @@ -42355,14 +42475,13 @@ "object._renderer = spotLight3DRenderer;", "if (game.isInGameEdition && game.isInGameEdition()) {", " const spotLightHelper = new SpotLightHelper(object);", + " spotLightHelper.rotation.order = 'ZYX';", " spotLightHelper.add(spotLight);", " spotLight3DRenderer._threeGroup = spotLightHelper;", " layer.getRenderer().add3DRendererObject(spotLightHelper);", "}", "else {", " spotLight3DRenderer._threeGroup = spotLight;", - " // The light is added in Three.js scene from doStepPostEvents", - " spotLight3DRenderer._threeGroup = spotLight;", " layer.getRenderer().add3DRendererObject(spotLight);", "}", "", @@ -42887,7 +43006,7 @@ "objectGroups": [] }, { - "description": "the smoothing of the light . Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "description": "the smoothing of the light. Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", "fullName": "Smoothing", "functionType": "ExpressionAndCondition", "name": "Smoothing", @@ -43113,7 +43232,7 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setSmoothing(value);" + "object.__spotLightAdapter.setDecay(value);" ], "parameterObjects": "Object", "useStrict": true, @@ -43748,7 +43867,7 @@ "value": "", "type": "Resource", "label": "Image", - "description": "Shadow casting must be enable for the image to have any effect.", + "description": "Shadow casting must be enabled for the image to have any effect.", "group": "Shadow", "extraInformation": [ "image" @@ -43765,9 +43884,9 @@ "name": "IsCastingShadow" }, { - "value": "1000", + "value": "2000", "type": "Number", - "label": "Visibilty distance", + "label": "Visibility distance", "name": "VisibilityDistanceMax" }, { @@ -43792,7 +43911,7 @@ "name": "ShadowQuality" }, { - "value": "100", + "value": "20", "type": "Number", "unit": "Pixel", "label": "Shadow camera near plane", From d335777c0954183f1cfb9a786886a2139a21f2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 31 Mar 2026 21:59:08 +0200 Subject: [PATCH 4/9] Clearer sorting --- examples/3d-car-coin-hunt/3d-car-coin-hunt.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 6ebfa4a24..0948003e1 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -41954,19 +41954,20 @@ "function insertByDistance(objects, maxCount, object, distance) {", " sortResult.isInserted = false;", " sortResult.removedObject = null;", - " let index = objects.length - 1;", - " for (; index >= 0; index--) {", + " let insertionIndex = 0;", + " for (let index = objects.length - 1; index >= 0; index--) {", " const other = objects[index];", " const otherDistance = other.__cameraDistance;", " if (distance >= otherDistance) {", + " insertionIndex = index + 1;", " break;", " }", " }", - " if (index + 1 >= maxCount) {", + " if (insertionIndex >= maxCount) {", " return sortResult;", " }", " object.__cameraDistance = distance", - " objects.splice(index + 1, 0, object);", + " objects.splice(insertionIndex, 0, object);", " sortResult.isInserted = true;", " if (objects.length > maxCount) {", " sortResult.removedObject = objects.pop();", From f563a972bdd50bc37f1126800b2df6869ad8f65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 1 Apr 2026 11:39:04 +0200 Subject: [PATCH 5/9] Remove the distance property --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 64 +++++-------------- 1 file changed, 16 insertions(+), 48 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 0948003e1..497158848 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -41806,7 +41806,7 @@ "}", "", "/**", - " * @typedef {gdjs.RuntimeObject & {__cameraDistance: number, __spotLight: THREE.SpotLight, _getIsCastingShadow: () => boolean}} SpotLightRuntimeObject", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __spotLight: THREE.SpotLight, _getIsCastingShadow: () => boolean, _getConeAngle: () => number, _getColor: () => string}} SpotLightRuntimeObject", " */", "", "const game = runtimeScene.getGame();", @@ -41824,9 +41824,9 @@ " }", "", " _updateThreeGroup() {", - " const object = this._object;", - " /** @type {THREE.SpotLight} */", + " /** @type {SpotLightRuntimeObject} */", " //@ts-ignore", + " const object = this._object;", " const threeObject3D = this.get3DRendererObject();", "", " threeObject3D.rotation.set(", @@ -41850,8 +41850,6 @@ "", " threeObject3D.visible = !this._object.hidden;", "", - " /** @type {THREE.SpotLight} */", - " //@ts-ignore", " const spotLight = object.__spotLight;", "", " const editor = game.getInGameEditor ? game.getInGameEditor() : null;", @@ -41894,16 +41892,10 @@ " const deltaZ = rootObject.getZ() - cameraZ;", " distanceSq = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;", " }", - " //@ts-ignore", - " const distanceMax = object._getVisibilityDistanceMax();", - " const isWithInRange = distanceSq <= distanceMax * distanceMax;", - " if (isWithInRange) {", - " getSpotLightManager(", - " //@ts-ignore", - " runtimeScene", - " ).applyVisibilityAndShadow(object, distanceSq);", - " }", - "", + " getSpotLightManager(", + " //@ts-ignore", + " runtimeScene", + " ).applyVisibilityAndShadow(object, distanceSq);", " }", "", " // Force the visibility to be checked every frame", @@ -42028,17 +42020,17 @@ "const coneLength = 64;", "", "class SpotLightHelper extends THREE.Object3D {", - " /** @type {gdjs.CustomRuntimeObject3D} */", + " /** @type {SpotLightRuntimeObject} */", " object;", - " /** @type {THREE.LineSegments} */", + " /** @type {THREE.LineSegments} */", " cone;", - " /** @type {THREE.LineSegments} */", + " /** @type {THREE.LineSegments} */", " centerLine;", - " /** @type {THREE.Mesh} */", + " /** @type {THREE.Mesh} */", " originBox;", "", "\t/**", - " * @param {gdjs.CustomRuntimeObject3D} object", + " * @param {SpotLightRuntimeObject} object", "\t */", " constructor(object) {", " super();", @@ -42090,38 +42082,23 @@ "", " dispose() {", " this.cone.geometry.dispose();", - " //@ts-ignore", " this.cone.material.dispose();", " this.centerLine.geometry.dispose();", - " //@ts-ignore", " this.centerLine.material.dispose();", " this.originBox.geometry.dispose();", - " //@ts-ignore", " this.originBox.material.dispose();", " }", "", " update() {", " /** @type {number} */", - " //@ts-ignore", " const coneAngle = gdjs.toRad(this.object._getConeAngle());", " const coneWidth = coneLength * Math.sin(coneAngle);", " const coneHeight = coneLength * Math.cos(coneAngle);", " this.cone.scale.set(coneHeight, coneWidth, coneWidth);", - " /** @type {number} */", - " //@ts-ignore", - " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor())", - " /** @type {THREE.LineBasicMaterial} */", - " //@ts-ignore", - " const coneMaterial = this.cone.material;", - " coneMaterial.color.set(color);", - " /** @type {THREE.LineBasicMaterial} */", - " //@ts-ignore", - " const centerLineMaterial = this.centerLine.material;", - " centerLineMaterial.color.set(color);", - " /** @type {THREE.MeshBasicMaterial} */", - " //@ts-ignore", - " const originBoxMaterial = this.originBox.material;", - " originBoxMaterial.color.set(color);", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.cone.material.color.set(color);", + " this.centerLine.material.color.set(color);", + " this.originBox.material.color.set(color);", " }", "}", "", @@ -43884,12 +43861,6 @@ "group": "Shadow", "name": "IsCastingShadow" }, - { - "value": "2000", - "type": "Number", - "label": "Visibility distance", - "name": "VisibilityDistanceMax" - }, { "value": "Medium", "type": "Choice", @@ -43942,9 +43913,6 @@ { "propertyName": "Decay" }, - { - "propertyName": "VisibilityDistanceMax" - }, { "folderName": "Cone", "children": [ From 767c1065717cfbdb931e5f0498a6465d0e3138b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 1 Apr 2026 12:02:52 +0200 Subject: [PATCH 6/9] Smaller default size --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 497158848..fb13ec1e9 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1224,7 +1224,7 @@ "gridColor": 10401023, "gridAlpha": 0.5, "snap": true, - "zoomFactor": 0.2725359896772945, + "zoomFactor": 1.2121641972173733, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -5841,14 +5841,14 @@ "initialVariables": [] }, { - "angle": 161, + "angle": 157, "customSize": false, "height": 209, "layer": "", "name": "NewSpotLight", "persistentUuid": "1841bf79-51ac-4a73-89ec-ac26e2c86e5f", - "rotationX": 156, - "rotationY": 9, + "rotationX": 172, + "rotationY": 17, "width": 2889, "x": -640, "y": 1280, @@ -42262,12 +42262,12 @@ "eventsBasedBehaviors": [], "eventsBasedObjects": [ { - "areaMaxX": 40, - "areaMaxY": 40, - "areaMaxZ": 40, - "areaMinX": -40, - "areaMinY": -40, - "areaMinZ": -40, + "areaMaxX": 20, + "areaMaxY": 20, + "areaMaxZ": 20, + "areaMinX": -20, + "areaMinY": -20, + "areaMinZ": -20, "defaultName": "SpotLight", "description": "Light up a cone like a flashlight.", "fullName": "3D spot light", @@ -42359,15 +42359,15 @@ { "angle": 0, "customSize": true, - "depth": 80, - "height": 80, + "depth": 40, + "height": 40, "layer": "", "name": "Placeholder", "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", - "width": 80, - "x": -40, - "y": -40, - "z": -40, + "width": 40, + "x": -20, + "y": -20, + "z": -20, "zOrder": 1, "numberProperties": [], "stringProperties": [], @@ -42386,7 +42386,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 4.204424638835088, + "zoomFactor": 9.06473532531222, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" From 7ba04833b986bb40ef0c4008df9d5a5522e291ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 2 Apr 2026 18:15:16 +0200 Subject: [PATCH 7/9] Add point lights --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 3243 ++++++++++++++--- 1 file changed, 2656 insertions(+), 587 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index fb13ec1e9..c6adacab2 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -5891,6 +5891,22 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 40, + "layer": "", + "name": "NewPointLight", + "persistentUuid": "6166ed78-f5d0-4870-af63-3946ae6cd218", + "width": 40, + "x": 173, + "y": 326, + "z": 96, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -7265,7 +7281,7 @@ "assetStoreId": "", "name": "NewSpotLight", "persistentUuid": "603e3582-a594-4477-b5a4-9662dc5b1c13", - "type": "SpotLight3D::SpotLight3D", + "type": "Light3D::SpotLight3D", "variant": "", "variables": [], "effects": [], @@ -7277,13 +7293,14 @@ ], "content": { "Color": "255;0;0", - "Smoothing": 0, + "Smoothing": 1, "Image": "", "ShadowQuality": "Low", "ConeAngle": 30, "VisibilityDistanceMax": 2000, "IsCastingShadow": true, - "Intensity": 4 + "Intensity": 4, + "ConeLength": 0 } }, { @@ -7307,6 +7324,21 @@ "effects": [], "behaviors": [], "content": {} + }, + { + "assetStoreId": "", + "name": "NewPointLight", + "persistentUuid": "39b8b2db-dc3f-4ff4-9089-cf2218f2ec7f", + "type": "Light3D::PointLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "ShadowQuality": "Low", + "Intensity": 4, + "Color": "133;255;0" + } } ], "objectsFolderStructure": { @@ -7414,6 +7446,9 @@ { "objectName": "NewSpotLight" }, + { + "objectName": "NewPointLight" + }, { "objectName": "CarWithLight" } @@ -7472,10 +7507,10 @@ "NewSpotLight", "16", "16", - "Player.X() - 8 * (500 - 80)", - "Player.Y() - 8 * (500 - 80)", - "500", - "500", + "Player.X() - 8 * (1000 - 40)", + "Player.Y() - 8 * (1000 - 40)", + "1000", + "1000", "", "0", "" @@ -7503,6 +7538,24 @@ ] } ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SetLightCountMax" + }, + "parameters": [ + "", + "=", + "3", + "" + ] + } + ] } ] }, @@ -8747,7 +8800,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::LookAtObject" + "value": "Light3D::SpotLight3D::LookAtObject" }, "parameters": [ "NewSpotLight", @@ -8776,7 +8829,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::SetColor" + "value": "Light3D::SpotLight3D::SetColor" }, "parameters": [ "NewSpotLight", @@ -10065,9 +10118,12 @@ "defaultName": "", "description": "", "fullName": "", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "CarWithLight", + "previewIconUrl": "", "objects": [ { "assetStoreId": "fcb1a484380a00837bfc40406681f434dd57cce8bdf94694b237fc809bf7b4fb", @@ -10099,7 +10155,7 @@ "assetStoreId": "", "name": "NewSpotLight", "persistentUuid": "eeb6eabc-7138-4c11-b928-a4c84341087d", - "type": "SpotLight3D::SpotLight3D", + "type": "Light3D::SpotLight3D", "variant": "", "variables": [], "effects": [], @@ -10440,9 +10496,12 @@ "defaultName": "", "description": "Automatically display a screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Set up Anchor behavior on this object so that top/bottom/left/right edges are anchored to the screen top/bottom/left/right.", "fullName": "Screen Orientation Checker", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ScreenOrientationChecker", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -14094,8 +14153,11 @@ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -14699,8 +14761,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -14923,8 +14988,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -15156,8 +15224,11 @@ { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -16352,8 +16423,11 @@ { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -16757,8 +16831,11 @@ { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -19507,8 +19584,11 @@ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -20811,8 +20891,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -21399,8 +21482,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -21650,8 +21736,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -21822,8 +21911,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -21983,8 +22075,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -23185,8 +23280,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -23395,8 +23493,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24001,8 +24102,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -25468,8 +25572,11 @@ { "description": "Control a 3D physics car with a keyboard.", "fullName": "3D car keyboard mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DKeyboardMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -27092,8 +27199,11 @@ { "description": "Shake 3D objects with translation and rotation.", "fullName": "3D shake", + "helpPath": "", + "iconUrl": "", "name": "ShakeModel3D", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -29228,8 +29338,11 @@ { "description": "Smoothly follow an object at a distance.", "fullName": "Third person camera", + "helpPath": "", + "iconUrl": "", "name": "ThirdPersonCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -38318,9 +38431,12 @@ "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": true, "name": "ParticleEmitter3D", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": true, @@ -41772,7 +41888,7 @@ "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNobGlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxMEw2LDVIMThMMTUsMTBIOU0xOCw0SDZWMkgxOFY0TTksMjJWMTFIMTVWMjJIOU0xMiwxM0ExLDEgMCAwLDAgMTEsMTRBMSwxIDAgMCwwIDEyLDE1QTEsMSAwIDAsMCAxMywxNEExLDEgMCAwLDAgMTIsMTNaIiAvPjwvc3ZnPg==", - "name": "SpotLight3D", + "name": "Light3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/b627f8e676b3aac26945b2c38db0cfa787d34d2eff23755d4eb1289452f6cd28_flashlight.svg", "shortDescription": "Light up a cone like a flashlight.", "version": "1.0.0", @@ -41788,6 +41904,471 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Define spot light helper classes JavaScript code.", + "fullName": "Define spot light helper classes", + "functionType": "Action", + "name": "DefineSpotLightHelperClasses", + "private": true, + "sentence": "Define spot light helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__light3DExtension.spot) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.SpotLight, _getIsCastingShadow: () => boolean, _getConeAngle: () => number, _getColor: () => string}} SpotLightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "", + "const coneLength = 64;", + "", + "class SpotLightHelper extends THREE.Object3D {", + " /** @type {SpotLightRuntimeObject} */", + " object;", + " /** @type {THREE.LineSegments} */", + " cone;", + " /** @type {THREE.LineSegments} */", + " centerLine;", + " /** @type {THREE.Mesh} */", + " originBox;", + "", + "\t/**", + " * @param {SpotLightRuntimeObject} object", + "\t */", + " constructor(object) {", + " super();", + " this.object = object;", + " this.type = 'SpotLightHelper';", + "", + " const coneGeometry = new THREE.BufferGeometry();", + " const conePositions = [", + " 0, 0, 0, 1, 0, 0,", + " 0, 0, 0, 1, 1, 0,", + " 0, 0, 0, 1, - 1, 0,", + " 0, 0, 0, 1, 0, 1,", + " 0, 0, 0, 1, 0, - 1", + " ];", + " for (let i = 0, j = 1, l = 32; i < l; i++ , j++) {", + " const p1 = (i / l) * Math.PI * 2;", + " const p2 = (j / l) * Math.PI * 2;", + " conePositions.push(", + " 1, Math.cos(p1), Math.sin(p1),", + " 1, Math.cos(p2), Math.sin(p2)", + " );", + " }", + " coneGeometry.setAttribute('position', new THREE.Float32BufferAttribute(conePositions, 3));", + " this.cone = new THREE.LineSegments(", + " coneGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.cone);", + " const centerLineGeometry = new THREE.BufferGeometry();", + " centerLineGeometry.setAttribute('position', new THREE.Float32BufferAttribute([", + " 0, 0, 0, coneLength, 0, 0", + " ], 3));", + " this.centerLine = new THREE.LineSegments(", + " centerLineGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.centerLine);", + "", + " this.originBox = new THREE.Mesh(", + " new THREE.BoxGeometry(16, 16, 16),", + " new THREE.MeshBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.originBox);", + " this.update();", + "", + " //@ts-ignore", + " this.originBox.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + " this.cone.geometry.dispose();", + " this.cone.material.dispose();", + " this.centerLine.geometry.dispose();", + " this.centerLine.material.dispose();", + " this.originBox.geometry.dispose();", + " this.originBox.material.dispose();", + " }", + "", + " update() {", + " /** @type {number} */", + " const coneAngle = gdjs.toRad(this.object._getConeAngle());", + " const coneWidth = coneLength * Math.sin(coneAngle);", + " const coneHeight = coneLength * Math.cos(coneAngle);", + " this.cone.scale.set(coneHeight, coneWidth, coneWidth);", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.cone.material.color.set(color);", + " this.centerLine.material.color.set(color);", + " this.originBox.material.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class SpotLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param spotLight {THREE.SpotLight}", + " */", + " constructor(object, spotLight) {", + " this.object = object;", + " this.spotLight = spotLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.spotLight.parent;", + " this.spotLight.parent = null;", + " this.spotLight.lookAt(targetX, targetY, targetZ);", + " this.spotLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.spotLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.spotLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.spotLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.spotLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.spotLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.spotLight.decay = decay;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setConeLength(value) {", + " this.spotLight.distance = value;", + " }", + "", + " /**", + " * @param coneAngle {number}", + " */", + " setConeAngle(coneAngle) {", + " this.spotLight.angle = coneAngle * Math.PI / 180;", + " }", + "", + " /**", + " * @param smoothing {number}", + " */", + " setSmoothing(smoothing) {", + " this.spotLight.penumbra = smoothing;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " // This is applied by applyVisibilityAndShadow", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 256;", + " break;", + " case \"Medium\":", + " size = 512;", + " break;", + " case \"High\":", + " size = 1024;", + " break;", + " }", + " const shadow = this.spotLight.shadow;", + " const mapSize = shadow.mapSize;", + " if (mapSize.width !== size) {", + " mapSize.set(size, size);", + "", + " // Force the recreation of the shadow map texture:", + " if (shadow.map) {", + " shadow.map.dispose();", + " shadow.map = null;", + " }", + " shadow.needsUpdate = true;", + " }", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.spotLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.spotLight.shadow.camera.far = value;", + " }", + "", + " /**", + " * @param resourceName {string}", + " */", + " setImage(resourceName) {", + " if (!resourceName) {", + " this.spotLight.map = null;", + " return;", + " }", + " const texture = game.getImageManager().getThreeTexture(resourceName);", + " this.spotLight.map = texture;", + " }", + "}", + "", + "", + "", + "//@ts-ignore", + "gdjs.__light3DExtension.spot = {", + " SpotLightAdapter,", + " SpotLightHelper,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Define point light helper classes JavaScript code.", + "fullName": "Define point light helper classes", + "functionType": "Action", + "name": "DefinePointLightHelperClasses", + "private": true, + "sentence": "Define point light helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__light3DExtension.point) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.PointLight, _getIsCastingShadow: () => boolean, _getColor: () => string}} PointLightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "", + "/**", + " * @extends {THREE.Mesh}", + " */", + "class PointLightHelper extends THREE.Mesh {", + " /** @type {PointLightRuntimeObject} */", + " object;", + "", + "\t/**", + " * @param {PointLightRuntimeObject} object", + "\t */", + " constructor(object) {", + "\t\tconst geometry = new THREE.SphereGeometry( 16, 4, 2 );", + "\t\tconst material = new THREE.MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );", + " super(geometry, material);", + " this.object = object;", + " this.update();", + "", + " //@ts-ignore", + " this.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + "\t\tthis.geometry.dispose();", + "\t\tthis.material.dispose();", + " }", + "", + " update() {", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.material.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class PointLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param pointLight {THREE.PointLight}", + " */", + " constructor(object, pointLight) {", + " this.object = object;", + " this.pointLight = pointLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.pointLight.parent;", + " this.pointLight.parent = null;", + " this.pointLight.lookAt(targetX, targetY, targetZ);", + " this.pointLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.pointLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.pointLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.pointLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.pointLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.pointLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.pointLight.decay = decay;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setRange(value) {", + " this.pointLight.distance = value;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " // This is applied by applyVisibilityAndShadow", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 256;", + " break;", + " case \"Medium\":", + " size = 512;", + " break;", + " case \"High\":", + " size = 1024;", + " break;", + " }", + " const shadow = this.pointLight.shadow;", + " const mapSize = shadow.mapSize;", + " if (mapSize.width !== size) {", + " mapSize.set(size, size);", + "", + " // Force the recreation of the shadow map texture:", + " if (shadow.map) {", + " shadow.map.dispose();", + " shadow.map = null;", + " }", + " shadow.needsUpdate = true;", + " }", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.pointLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.pointLight.shadow.camera.far = value;", + " }", + "}", + "", + "", + "", + "//@ts-ignore", + "gdjs.__light3DExtension.point = {", + " PointLightAdapter,", + " PointLightHelper,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, { "description": "Define helper classes JavaScript code.", "fullName": "Define helper classes", @@ -41800,20 +42381,20 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "//@ts-ignore", - "if (gdjs.__spotLight3DExtension) {", + "if (gdjs.__light3DExtension) {", " //@ts-ignore", " return;", "}", "", "/**", - " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __spotLight: THREE.SpotLight, _getIsCastingShadow: () => boolean, _getConeAngle: () => number, _getColor: () => string}} SpotLightRuntimeObject", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.SpotLight | THREE.PointLight, _getIsCastingShadow: () => boolean}} LightRuntimeObject", " */", "", "const game = runtimeScene.getGame();", "const isInGameEdition = game.isInGameEdition && game.isInGameEdition();", "", "", - "class SpotLight3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", + "class Light3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", "", " constructor(", " object,", @@ -41824,7 +42405,7 @@ " }", "", " _updateThreeGroup() {", - " /** @type {SpotLightRuntimeObject} */", + " /** @type {LightRuntimeObject} */", " //@ts-ignore", " const object = this._object;", " const threeObject3D = this.get3DRendererObject();", @@ -41850,7 +42431,7 @@ "", " threeObject3D.visible = !this._object.hidden;", "", - " const spotLight = object.__spotLight;", + " const spotLight = object.__light3D;", "", " const editor = game.getInGameEditor ? game.getInGameEditor() : null;", "", @@ -41892,7 +42473,7 @@ " const deltaZ = rootObject.getZ() - cameraZ;", " distanceSq = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;", " }", - " getSpotLightManager(", + " getLightManager(", " //@ts-ignore", " runtimeScene", " ).applyVisibilityAndShadow(object, distanceSq);", @@ -41905,7 +42486,7 @@ "", "gdjs.registerRuntimeScenePreEventsCallback(", " runtimeScene => {", - " getSpotLightManager(", + " getLightManager(", " //@ts-ignore", " runtimeScene.getScene()", " ).clear();", @@ -41913,333 +42494,155 @@ "if (gdjs.registerInGameEditorPostStepCallback) {", " gdjs.registerInGameEditorPostStepCallback(", " inGameEditor => {", - " getSpotLightManager(", + " getLightManager(", " //@ts-ignore", " inGameEditor.getEditedInstanceContainer().getScene()", " ).clear();", " });", "}", "", + "const editorLightCountMax = {", + " value: 4", + "};", + "", + "const lightCountMax = {", + " value: 20", + "};", + "", "/**", " * Get the platforms manager of an instance container.", - " * @param {gdjs.RuntimeScene & {__spotLightManager: SpotLightManager}} runtimeScene", + " * @param {gdjs.RuntimeScene & {__lightManager: LightManager}} runtimeScene", " */", - "function getSpotLightManager(runtimeScene) {", - " if (!runtimeScene.__spotLightManager) {", + "function getLightManager(runtimeScene) {", + " if (!runtimeScene.__lightManager) {", " // Create the shared manager if necessary.", - " runtimeScene.__spotLightManager = isInGameEdition ?", - " new SpotLightManager(4, 1) :", - " new SpotLightManager(20, 4);", + " runtimeScene.__lightManager = isInGameEdition ?", + " new LightManager(editorLightCountMax, 1) :", + " new LightManager(lightCountMax, 4);", " }", - " return runtimeScene.__spotLightManager;", + " return runtimeScene.__lightManager;", "}", "", - "/** @type {{isInserted: boolean, removedObject: SpotLightRuntimeObject | null}} */", + "/** @type {{isInserted: boolean, removedObject: LightRuntimeObject | null}} */", "const sortResult = { isInserted: false, removedObject: null };", "", - "/**", - " * @param objects {Array}", - " * @param maxCount {number}", - " * @param object {SpotLightRuntimeObject}", - " * @param distance {number}", - " */", - "function insertByDistance(objects, maxCount, object, distance) {", - " sortResult.isInserted = false;", - " sortResult.removedObject = null;", - " let insertionIndex = 0;", - " for (let index = objects.length - 1; index >= 0; index--) {", - " const other = objects[index];", - " const otherDistance = other.__cameraDistance;", - " if (distance >= otherDistance) {", - " insertionIndex = index + 1;", - " break;", - " }", - " }", - " if (insertionIndex >= maxCount) {", - " return sortResult;", - " }", - " object.__cameraDistance = distance", - " objects.splice(insertionIndex, 0, object);", - " sortResult.isInserted = true;", - " if (objects.length > maxCount) {", - " sortResult.removedObject = objects.pop();", - " }", - " return sortResult;", - "}", - "", - "class SpotLightManager {", - " /** @type {Array} */", - " visibleObjects = new Array();", - " /** @type {Array} */", - " shadowObjects = new Array();", - " /** @type {number} */", - " maxCount;", - " /** @type {number} */", - " shadowCount;", + "class CappedLightList {", + " /** @type {Array<{object: LightRuntimeObject, weight: number}>} */", + " objects = [];", + " /** @type {{value: number}} */", + " capacity;", + " weight = 0;", + " /** @type {(object: LightRuntimeObject) => void} */", + " onInsertion;", + " /** @type {(object: LightRuntimeObject) => void} */", + " onDeletion;", "", " /**", - " * @param maxCount {number}", - " * @param shadowCount {number}", + " * @param {{value: number}} capacity", + " * @param {(object: LightRuntimeObject) => void} onInsertion", + " * @param {(object: LightRuntimeObject) => void} onDeletion", " */", - " constructor(maxCount, shadowCount) {", - " this.maxCount = maxCount;", - " this.shadowCount = shadowCount;", + " constructor(capacity, onInsertion, onDeletion) {", + " this.capacity = capacity;", + " this.onInsertion = onInsertion;", + " this.onDeletion = onDeletion;", " }", "", " clear() {", - " this.visibleObjects.length = 0;", - " this.shadowObjects.length = 0;", + " this.objects.length = 0;", + " this.weight = 0;", " }", "", " /**", - " * @param object {SpotLightRuntimeObject}", + " * @param object {LightRuntimeObject}", " * @param distance {number}", + " * @param weight {number}", " */", - " applyVisibilityAndShadow(object, distance) {", - " if (object._getIsCastingShadow()) {", - " const { isInserted, removedObject } = insertByDistance(", - " this.shadowObjects, this.shadowCount, object, distance);", - " if (isInserted) {", - " object.__spotLight.castShadow = true;", - " }", - " if (removedObject) {", - " removedObject.__spotLight.castShadow = false;", + " insertByDistance(object, distance, weight) {", + " let insertionIndex = 0;", + " for (let index = this.objects.length - 1; index >= 0; index--) {", + " const { object: other } = this.objects[index];", + " const otherDistance = other.__cameraDistance;", + " if (distance >= otherDistance) {", + " insertionIndex = index + 1;", + " break;", " }", " }", - " const { isInserted, removedObject } = insertByDistance(", - " this.visibleObjects, this.maxCount, object, distance);", - " if (isInserted) {", - " object.__spotLight.visible = true;", - " }", - " if (removedObject) {", - " removedObject.__spotLight.visible = false;", + " if (insertionIndex === this.objects.length", + " && this.weight + weight > this.capacity.value) {", + " return;", " }", - " }", - "}", - "", - "const coneLength = 64;", - "", - "class SpotLightHelper extends THREE.Object3D {", - " /** @type {SpotLightRuntimeObject} */", - " object;", - " /** @type {THREE.LineSegments} */", - " cone;", - " /** @type {THREE.LineSegments} */", - " centerLine;", - " /** @type {THREE.Mesh} */", - " originBox;", - "", - "\t/**", - " * @param {SpotLightRuntimeObject} object", - "\t */", - " constructor(object) {", - " super();", - " this.object = object;", - " this.type = 'SpotLightHelper';", + " this.weight += weight;", "", - " const coneGeometry = new THREE.BufferGeometry();", - " const conePositions = [", - " 0, 0, 0, 1, 0, 0,", - " 0, 0, 0, 1, 1, 0,", - " 0, 0, 0, 1, - 1, 0,", - " 0, 0, 0, 1, 0, 1,", - " 0, 0, 0, 1, 0, - 1", - " ];", - " for (let i = 0, j = 1, l = 32; i < l; i++ , j++) {", - " const p1 = (i / l) * Math.PI * 2;", - " const p2 = (j / l) * Math.PI * 2;", - " conePositions.push(", - " 1, Math.cos(p1), Math.sin(p1),", - " 1, Math.cos(p2), Math.sin(p2)", - " );", + " let deletedPair = null;", + " while (this.objects.length > 0 && this.weight > this.capacity.value) {", + " deletedPair = this.objects.pop();", + " const { object: removedObject, weight: otherWeight } = deletedPair;", + " this.weight -= otherWeight;", + " this.onDeletion(removedObject);", " }", - " coneGeometry.setAttribute('position', new THREE.Float32BufferAttribute(conePositions, 3));", - " this.cone = new THREE.LineSegments(", - " coneGeometry,", - " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", - " );", - " this.add(this.cone);", - " const centerLineGeometry = new THREE.BufferGeometry();", - " centerLineGeometry.setAttribute('position', new THREE.Float32BufferAttribute([", - " 0, 0, 0, coneLength, 0, 0", - " ], 3));", - " this.centerLine = new THREE.LineSegments(", - " centerLineGeometry,", - " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", - " );", - " this.add(this.centerLine);", - "", - " this.originBox = new THREE.Mesh(", - " new THREE.BoxGeometry(16, 16, 16),", - " new THREE.MeshBasicMaterial({ fog: false, toneMapped: false })", - " );", - " this.add(this.originBox);", - " this.update();", "", - " //@ts-ignore", - " this.originBox.gdjsRuntimeObject = object;", - " }", - "", - " dispose() {", - " this.cone.geometry.dispose();", - " this.cone.material.dispose();", - " this.centerLine.geometry.dispose();", - " this.centerLine.material.dispose();", - " this.originBox.geometry.dispose();", - " this.originBox.material.dispose();", - " }", - "", - " update() {", - " /** @type {number} */", - " const coneAngle = gdjs.toRad(this.object._getConeAngle());", - " const coneWidth = coneLength * Math.sin(coneAngle);", - " const coneHeight = coneLength * Math.cos(coneAngle);", - " this.cone.scale.set(coneHeight, coneWidth, coneWidth);", - " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", - " this.cone.material.color.set(color);", - " this.centerLine.material.color.set(color);", - " this.originBox.material.color.set(color);", + " let insertedPair;", + " if (deletedPair) {", + " insertedPair = deletedPair;", + " insertedPair.object = object;", + " insertedPair.weight = weight;", + " }", + " else {", + " insertedPair = { object, weight };", + " }", + " this.onInsertion(object);", + " this.objects.splice(insertionIndex, 0, insertedPair);", + " object.__cameraDistance = distance;", " }", "}", "", - "/**", - " * @param {string} colorString", - " * @param {THREE.Color} threeColor", - " */", - "const setThreeColor = (colorString, threeColor) => {", - " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", - " threeColor.r = integerColor[0] / 255;", - " threeColor.g = integerColor[1] / 255;", - " threeColor.b = integerColor[2] / 255;", - "};", - "", - "class SpotLightAdapter {", - " /**", - " * @param object {gdjs.CustomRuntimeObject3D}", - " * @param spotLight {THREE.SpotLight}", - " */", - " constructor(object, spotLight) {", - " this.object = object;", - " this.spotLight = spotLight;", - " }", - "", - " /**", - " * @param targetX {number}", - " * @param targetY {number}", - " * @param targetZ {number}", - " */", - " lookAtPosition(targetX, targetY, targetZ) {", - " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", - " const parent = this.spotLight.parent;", - " this.spotLight.parent = null;", - " this.spotLight.lookAt(targetX, targetY, targetZ);", - " this.spotLight.parent = parent;", - "", - " // Angle setters update Three.js angles, so we save them first.", - " const rotationX = gdjs.toDegrees(this.spotLight.rotation.x);", - " const rotationY = gdjs.toDegrees(this.spotLight.rotation.y);", - " const rotationZ = gdjs.toDegrees(this.spotLight.rotation.z);", - " this.object.setRotationX(rotationX);", - " this.object.setRotationY(rotationY);", - " this.object.setAngle(rotationZ + 90);", - " }", - "", - " /**", - " * @param color {string}", - " */", - " setColor(color) {", - " setThreeColor(color, this.spotLight.color);", - " }", - "", - " /**", - " * @param intensity {number}", - " */", - " setIntensity(intensity) {", - " this.spotLight.intensity = intensity;", - " }", - "", - " /**", - " * @param decay {number}", - " */", - " setDecay(decay) {", - " this.spotLight.decay = decay;", - " }", - "", - " /**", - " * @param coneAngle {number}", - " */", - " setConeAngle(coneAngle) {", - " this.spotLight.angle = coneAngle * Math.PI / 180;", - " }", - "", - " /**", - " * @param smoothing {number}", - " */", - " setSmoothing(smoothing) {", - " this.spotLight.penumbra = smoothing;", - " }", - "", - " /**", - " * @param isCastingShadow {boolean}", - " */", - " setCastingShadow(isCastingShadow) {", - " // This is applied by applyVisibilityAndShadow", - " }", - "", - " /**", - " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", - " */", - " setShadowQuality(shadowQuality) {", - " let size = 512;", - " switch (shadowQuality) {", - " case \"Low\":", - " size = 256;", - " break;", - " case \"Medium\":", - " size = 512;", - " break;", - " case \"High\":", - " size = 1024;", - " break;", - " }", - " this.spotLight.shadow.mapSize.width = size;", - " this.spotLight.shadow.mapSize.height = size;", - " }", + "class LightManager {", + " /** @type {CappedLightList} */", + " visibleObjects;", + " /** @type {CappedLightList} */", + " shadowObjects;", "", " /**", - " * @param value {number}", + " * @param maxCount {{value: number}}", + " * @param shadowCount {number}", " */", - " setShadowCameraNearPlane(value) {", - " this.spotLight.shadow.camera.near = value;", + " constructor(maxCount, shadowCount) {", + " this.visibleObjects = new CappedLightList(", + " maxCount,", + " (object) => { object.__light3D.visible = true; },", + " (object) => { object.__light3D.visible = false; }", + " );", + " this.shadowObjects = new CappedLightList(", + " { value: shadowCount },", + " (object) => { object.__light3D.castShadow = true; },", + " (object) => { object.__light3D.castShadow = false; }", + " );", " }", "", - " /**", - " * @param value {number}", - " */", - " setShadowCameraFarPlane(value) {", - " this.spotLight.shadow.camera.far = value;", + " clear() {", + " this.visibleObjects.clear();", + " this.shadowObjects.clear();", " }", "", " /**", - " * @param resourceName {string}", + " * @param object {LightRuntimeObject}", + " * @param distance {number}", " */", - " setImage(resourceName) {", - " if (!resourceName) {", - " this.spotLight.map = null;", - " return;", + " applyVisibilityAndShadow(object, distance) {", + " if (object._getIsCastingShadow()) {", + " this.shadowObjects.insertByDistance(object, distance,", + " //@ts-ignore", + " object.__light3D.map ? 2 : 1);", " }", - " const texture = game.getImageManager().getThreeTexture(resourceName);", - " this.spotLight.map = texture;", + " this.visibleObjects.insertByDistance(object, distance, 1);", " }", "}", "", - "", - "", "//@ts-ignore", - "gdjs.__spotLight3DExtension = {", - " SpotLight3DRenderer,", - " SpotLightAdapter,", - " SpotLightHelper,", + "gdjs.__light3DExtension = {", + " Light3DRenderer,", + " lightCountMax,", "}" ], "parameterObjects": "", @@ -42249,6 +42652,83 @@ ], "parameters": [], "objectGroups": [] + }, + { + "description": "the maximum number of nearest lights displayed simultaneously.", + "fullName": "Max lights count", + "functionType": "ExpressionAndCondition", + "name": "LightCountMax", + "sentence": "max lights count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "", + "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightCountMax.value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LightCountMax", + "name": "SetLightCountMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "", + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "gdjs.__light3DExtension.lightCountMax.value = value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] } ], "eventsFunctionsFolderStructure": { @@ -42256,6 +42736,18 @@ "children": [ { "functionName": "DefineHelperClasses" + }, + { + "functionName": "DefineSpotLightHelperClasses" + }, + { + "functionName": "DefinePointLightHelperClasses" + }, + { + "functionName": "LightCountMax" + }, + { + "functionName": "SetLightCountMax" } ] }, @@ -42271,9 +42763,12 @@ "defaultName": "SpotLight", "description": "Light up a cone like a flashlight.", "fullName": "3D spot light", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "SpotLight3D", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -42404,7 +42899,16 @@ "actions": [ { "type": { - "value": "SpotLight3D::DefineHelperClasses" + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "Light3D::DefineSpotLightHelperClasses" }, "parameters": [ "", @@ -42416,19 +42920,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const {", + " Light3DRenderer,", + " //@ts-ignore", + "} = gdjs.__light3DExtension;", "const {", " SpotLightAdapter,", - " SpotLight3DRenderer,", " SpotLightHelper,", " //@ts-ignore", - "} = gdjs.__spotLight3DExtension;", + "} = gdjs.__light3DExtension.spot;", "", "/** @type {gdjs.CustomRuntimeObject3D} */", "//@ts-ignore", "const object = objects[0];", "", - "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", - "const gameScene = object.getRuntimeScene();", "const game = runtimeScene.getGame();", "", "// This is a hack that may break in future releases.", @@ -42445,11 +42950,11 @@ "spotLight.up.set(0, 0, 1);", "spotLight.shadow.camera.up.set(0, 0, 1);", "//@ts-ignore", - "object.__spotLight = spotLight;", + "object.__light3D = spotLight;", "//@ts-ignore", "object.__spotLightAdapter = new SpotLightAdapter(object, spotLight);", "", - "const spotLight3DRenderer = new SpotLight3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "const spotLight3DRenderer = new Light3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", "object._renderer = spotLight3DRenderer;", "if (game.isInGameEdition && game.isInGameEdition()) {", " const spotLightHelper = new SpotLightHelper(object);", @@ -42488,7 +42993,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::UpdateFromProperties" + "value": "Light3D::SpotLight3D::UpdateFromProperties" }, "parameters": [ "Object", @@ -42502,7 +43007,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42522,7 +43027,7 @@ "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", "const gameScene = object.getRuntimeScene();", "", - "object.__spotLight.dispose();", + "object.__light3D.dispose();", "object.get3DRendererObject().dispose();", "" ], @@ -42535,7 +43040,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42553,7 +43058,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::UpdateFromProperties" + "value": "Light3D::SpotLight3D::UpdateFromProperties" }, "parameters": [ "Object", @@ -42567,7 +43072,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42587,7 +43092,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::SetColor" + "value": "Light3D::SpotLight3D::SetColor" }, "parameters": [ "Object", @@ -42598,7 +43103,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetIntensity" + "value": "Light3D::SpotLight3D::SetIntensity" }, "parameters": [ "Object", @@ -42609,7 +43114,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetDecay" + "value": "Light3D::SpotLight3D::SetDecay" }, "parameters": [ "Object", @@ -42620,7 +43125,18 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetConeAngle" + "value": "Light3D::SpotLight3D::SetConeLength" + }, + "parameters": [ + "Object", + "=", + "ConeLength", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetConeAngle" }, "parameters": [ "Object", @@ -42631,7 +43147,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetSmoothing" + "value": "Light3D::SpotLight3D::SetSmoothing" }, "parameters": [ "Object", @@ -42642,7 +43158,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetShadowQuality" + "value": "Light3D::SpotLight3D::SetShadowQuality" }, "parameters": [ "Object", @@ -42653,7 +43169,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetShadowCameraNearPlane" + "value": "Light3D::SpotLight3D::SetShadowCameraNearPlane" }, "parameters": [ "Object", @@ -42664,7 +43180,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::SetShadowCameraFarPlane" + "value": "Light3D::SpotLight3D::SetShadowCameraFarPlane" }, "parameters": [ "Object", @@ -42675,7 +43191,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::UpdateImage" + "value": "Light3D::SpotLight3D::UpdateImage" }, "parameters": [ "Object", @@ -42684,7 +43200,7 @@ }, { "type": { - "value": "SpotLight3D::SpotLight3D::UpdateHelper" + "value": "Light3D::SpotLight3D::UpdateHelper" }, "parameters": [ "Object", @@ -42710,7 +43226,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::SetCastingShadow" + "value": "Light3D::SpotLight3D::SetCastingShadow" }, "parameters": [ "Object", @@ -42737,7 +43253,7 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::SetCastingShadow" + "value": "Light3D::SpotLight3D::SetCastingShadow" }, "parameters": [ "Object", @@ -42752,7 +43268,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42784,7 +43300,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42814,7 +43330,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42849,7 +43365,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", "type": "object" } ], @@ -42896,7 +43412,1674 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the color of the light.", + "fullName": "Color", + "functionType": "ExpressionAndCondition", + "name": "Color", + "sentence": "the color", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Color" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Color", + "name": "SetColor", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Color", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const color = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setColor(color);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the smoothing of the light. Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "fullName": "Smoothing", + "functionType": "ExpressionAndCondition", + "name": "Smoothing", + "sentence": "the smoothing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Smoothing" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Smoothing", + "name": "SetSmoothing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Smoothing", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setSmoothing(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the intensity of the light.", + "fullName": "Intensity", + "functionType": "ExpressionAndCondition", + "name": "Intensity", + "sentence": "the intensity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Intensity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Intensity", + "name": "SetIntensity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Intensity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setIntensity(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the decay of the light. The amount the light dims along the distance of the light.", + "fullName": "Decay", + "functionType": "ExpressionAndCondition", + "name": "Decay", + "sentence": "the decay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Decay" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Decay", + "name": "SetDecay", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Decay", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setDecay(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Condition", + "group": "3D spot light shadow configuration", + "name": "IsCastingShadow", + "sentence": "_PARAM0_ casting shadows", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Action", + "group": "3D spot light shadow configuration", + "name": "SetCastingShadow", + "sentence": "_PARAM0_ casting shadows: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setCastingShadow(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Shadow casting", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the light to light up a position.", + "fullName": "Look at position", + "functionType": "Action", + "group": "Angle", + "name": "LookAtPosition", + "sentence": "_PARAM0_ look at _PARAM1_ ; _PARAM2_ ; _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const targetX = eventsFunctionContext.getArgument(\"TargetX\");\r", + "const targetY = eventsFunctionContext.getArgument(\"TargetY\");\r", + "const targetZ = eventsFunctionContext.getArgument(\"TargetZ\");\r", + "\r", + "object.__spotLightAdapter.lookAtPosition(targetX, targetY, targetZ);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Target X", + "name": "TargetX", + "type": "expression" + }, + { + "description": "Target Y", + "name": "TargetY", + "type": "expression" + }, + { + "description": "Target Z", + "name": "TargetZ", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the light to light up an object.", + "fullName": "Look at object", + "functionType": "Action", + "group": "Angle", + "name": "LookAtObject", + "sentence": "_PARAM0_ look at _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::LookAtPosition" + }, + "parameters": [ + "Object", + "Target.CenterX()", + "Target.CenterY()", + "Target.Object3D::CenterZ()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Object", + "name": "Target", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D spot light shadow configuration", + "name": "SetShadowQuality", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ShadowQuality", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraNearPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraNearPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraNearPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraNearPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraNearPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraFarPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraFarPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraFarPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraFarPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraFarPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the cone length of the light. 0 means no limit.", + "fullName": "Cone length", + "functionType": "ExpressionAndCondition", + "name": "ConeLength", + "sentence": "the cone length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ConeLength" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ConeLength", + "name": "SetConeLength", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ConeLength", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setConeLength(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "LookAtPosition" + }, + { + "functionName": "LookAtObject" + } + ] + }, + { + "functionName": "Color" + }, + { + "functionName": "SetColor" + }, + { + "functionName": "Intensity" + }, + { + "functionName": "SetIntensity" + }, + { + "functionName": "Decay" + }, + { + "functionName": "SetDecay" + }, + { + "functionName": "ConeLength" + }, + { + "functionName": "SetConeLength" + }, + { + "functionName": "ConeAngle" + }, + { + "functionName": "SetConeAngle" + }, + { + "functionName": "Smoothing" + }, + { + "functionName": "SetSmoothing" + }, + { + "folderName": "3D spot light shadow configuration", + "children": [ + { + "functionName": "IsCastingShadow" + }, + { + "functionName": "SetCastingShadow" + }, + { + "functionName": "ShadowQuality" + }, + { + "functionName": "SetShadowQuality" + }, + { + "functionName": "ShadowCameraNearPlane" + }, + { + "functionName": "SetShadowCameraNearPlane" + }, + { + "functionName": "ShadowCameraFarPlane" + }, + { + "functionName": "SetShadowCameraFarPlane" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "255;255;255", + "type": "Color", + "label": "Color", + "name": "Color" + }, + { + "value": "30", + "type": "Number", + "unit": "DegreeAngle", + "label": "Cone angle", + "group": "Cone", + "name": "ConeAngle" + }, + { + "value": "1", + "type": "Number", + "label": "Intensity", + "name": "Intensity" + }, + { + "value": "1", + "type": "Number", + "label": "Smoothing", + "description": "Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "group": "Cone", + "name": "Smoothing" + }, + { + "value": "2", + "type": "Number", + "label": "Decay", + "description": "The amount the light dims along the distance of the light.", + "name": "Decay" + }, + { + "value": "", + "type": "Resource", + "label": "Image", + "description": "Shadow casting must be enabled for the image to have any effect.", + "group": "Shadow", + "extraInformation": [ + "image" + ], + "choices": [], + "hidden": true, + "name": "Image" + }, + { + "value": "true", + "type": "Boolean", + "label": "Shadow casting", + "group": "Shadow", + "name": "IsCastingShadow" + }, + { + "value": "Medium", + "type": "Choice", + "label": "Shadow quality", + "group": "Shadow", + "choices": [ + { + "label": "", + "value": "Low" + }, + { + "label": "", + "value": "Medium" + }, + { + "label": "", + "value": "High" + } + ], + "name": "ShadowQuality" + }, + { + "value": "20", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera near plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraNearPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera far plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraFarPlane" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Cone length", + "description": "0 means no limit.", + "group": "Cone", + "advanced": true, + "name": "ConeLength" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Color" + }, + { + "propertyName": "Intensity" + }, + { + "propertyName": "Decay" + }, + { + "folderName": "Cone", + "children": [ + { + "propertyName": "ConeAngle" + }, + { + "propertyName": "ConeLength" + }, + { + "propertyName": "Smoothing" + } + ] + }, + { + "folderName": "Shadow", + "children": [ + { + "propertyName": "IsCastingShadow" + }, + { + "propertyName": "ShadowQuality" + }, + { + "propertyName": "Image" + }, + { + "propertyName": "ShadowCameraNearPlane" + }, + { + "propertyName": "ShadowCameraFarPlane" + } + ] + } + ] + }, + "variants": [] + }, + { + "areaMaxX": 20, + "areaMaxY": 20, + "areaMaxZ": 20, + "areaMinX": -20, + "areaMinY": -20, + "areaMinZ": -20, + "defaultName": "PointLight", + "description": "Light up in all directions like a torch.", + "fullName": "3D point light", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRvcmNoIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTguNiA5LjZDOSAxMC4yIDkuNSAxMC43IDEwLjIgMTFIMTQuMkMxNC41IDEwLjkgMTQuNyAxMC43IDE0LjkgMTAuNUMxNS45IDkuNSAxNi4zIDggMTUuOCA2LjdMMTUuNyA2LjVDMTUuNiA2LjIgMTUuNCA2IDE1LjIgNS44QzE1LjEgNS42IDE0LjkgNS41IDE0LjggNS4zQzE0LjQgNSAxNCA0LjcgMTMuNiA0LjNDMTIuNyAzLjQgMTIuNiAyIDEzLjEgMUMxMi42IDEuMSAxMi4xIDEuNCAxMS43IDEuOEMxMC4yIDMgOS42IDUuMSAxMC4zIDdWNy4yQzEwLjMgNy4zIDEwLjIgNy40IDEwLjEgNy41QzEwIDcuNiA5LjggNy41IDkuNyA3LjRMOS42IDcuM0M5IDYuNSA4LjkgNS4zIDkuMyA0LjNDOC40IDUuMSA3LjkgNi40IDggNy43QzggOCA4LjEgOC4zIDguMiA4LjZDOC4yIDguOSA4LjQgOS4zIDguNiA5LjZNMTIuMyA4LjFDMTIuNCA3LjYgMTIuMiA3LjIgMTIuMSA2LjhDMTIgNi40IDEyIDYgMTIuMiA1LjZMMTIuNSA2LjJDMTIuOSA2LjggMTMuNiA3IDEzLjggNy44VjguMUMxMy44IDguNiAxMy42IDkuMSAxMy4zIDkuNEMxMy4xIDkuNSAxMi45IDkuNyAxMi43IDkuN0MxMi4xIDkuOSAxMS40IDkuNiAxMSA5LjJDMTEuOCA5LjIgMTIuMiA4LjYgMTIuMyA4LjFNMTUgMTJWMTRIMTRMMTMgMjJIMTFMMTAgMTRIOVYxMkgxNVoiIC8+PC9zdmc+", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PointLight3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/bf9158c96f4346dabd9e8ae0ddd737809652797812eb50376bae62463ac7fc42_torch.svg", + "objects": [ + { + "assetStoreId": "", + "name": "Placeholder", + "persistentUuid": "6786eefd-3c18-4fcb-b3ae-95b07f953045", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 80, + "height": 80, + "depth": 80, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "Basic", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Placeholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 40, + "height": 40, + "layer": "", + "name": "Placeholder", + "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", + "width": 40, + "x": -20, + "y": -20, + "z": -20, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 9.06473532531222, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "Light3D::DefinePointLightHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const {", + " Light3DRenderer,", + " //@ts-ignore", + "} = gdjs.__light3DExtension;", + "const {", + " PointLightAdapter,", + " PointLightHelper,", + " //@ts-ignore", + "} = gdjs.__light3DExtension.point;", + "", + "/** @type {gdjs.CustomRuntimeObject3D} */", + "//@ts-ignore", + "const object = objects[0];", + "", + "const game = runtimeScene.getGame();", + "", + "// This is a hack that may break in future releases.", + "// Replace the group that would hold children objects by the light.", + "const layer = object.getInstanceContainer().getLayer(object.getLayer());", + "const group = object.getRenderer()._threeGroup;", + "layer.getRenderer().remove3DRendererObject(group);", + "", + "const pointLight = new THREE.PointLight(0xffffff);", + "pointLight.position.copy(group.position);", + "pointLight.rotation.copy(group.rotation);", + "pointLight.up.set(0, 0, 1);", + "pointLight.shadow.camera.up.set(0, 0, 1);", + "//@ts-ignore", + "object.__light3D = pointLight;", + "//@ts-ignore", + "object.__pointLightAdapter = new PointLightAdapter(object, pointLight);", + "", + "const pointLight3DRenderer = new Light3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "object._renderer = pointLight3DRenderer;", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const pointLightHelper = new PointLightHelper(object);", + " pointLightHelper.rotation.order = 'ZYX';", + " pointLightHelper.add(pointLight);", + " pointLight3DRenderer._threeGroup = pointLightHelper;", + " layer.getRenderer().add3DRendererObject(pointLightHelper);", + "}", + "else {", + " pointLight3DRenderer._threeGroup = pointLight;", + " layer.getRenderer().add3DRendererObject(pointLight);", + "}", + "", + "pointLight.updateMatrixWorld(true);", + "", + "// Allow to tween the light color.", + "//@ts-ignore", + "if (!object.setColor && !object.getColor) {", + " const prototype = Object.getPrototypeOf(object);", + " prototype.setColor = function(tint) {", + " this.SetColor(tint, eventsFunctionContext);", + " }", + " prototype.getColor = function() {", + " return this.Color(eventsFunctionContext);", + " }", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject} */", + "const object = objects[0];", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "", + "object.__light3D.dispose();", + "object.get3DRendererObject().dispose();", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update from properties.", + "fullName": "Update from properties", + "functionType": "Action", + "name": "UpdateFromProperties", + "private": true, + "sentence": "Update from properties of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetColor" + }, + "parameters": [ + "Object", + "=", + "Color", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetIntensity" + }, + "parameters": [ + "Object", + "=", + "Intensity", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetDecay" + }, + "parameters": [ + "Object", + "=", + "Decay", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetRange" + }, + "parameters": [ + "Object", + "=", + "Range", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowQuality" + }, + "parameters": [ + "Object", + "=", + "ShadowQuality", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowCameraNearPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraNearPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraFarPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "=", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update helper", + "functionType": "Action", + "name": "UpdateHelper", + "private": true, + "sentence": "Update graphical helper of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const pointLightHelper = objects[0].get3DRendererObject();", + " pointLightHelper.update();", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -42931,7 +45114,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -42966,7 +45149,7 @@ "const object = objects[0];\r", "const color = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setColor(color);" + "object.__pointLightAdapter.setColor(color);" ], "parameterObjects": "Object", "useStrict": true, @@ -42977,88 +45160,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the smoothing of the light. Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", - "fullName": "Smoothing", - "functionType": "ExpressionAndCondition", - "name": "Smoothing", - "sentence": "the smoothing", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Smoothing" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Smoothing", - "name": "SetSmoothing", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Smoothing", - "=", - "Value" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const object = objects[0];\r", - "const value = eventsFunctionContext.getArgument(\"Value\");\r", - "\r", - "object.__spotLightAdapter.setSmoothing(value);" - ], - "parameterObjects": "Object", - "useStrict": true, - "eventsSheetExpanded": false - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43093,7 +45195,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43128,7 +45230,7 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setIntensity(value);\r", + "object.__pointLightAdapter.setIntensity(value);\r", "" ], "parameterObjects": "Object", @@ -43140,7 +45242,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43175,7 +45277,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43210,7 +45312,7 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setDecay(value);" + "object.__pointLightAdapter.setDecay(value);" ], "parameterObjects": "Object", "useStrict": true, @@ -43221,7 +45323,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43231,7 +45333,7 @@ "description": "Check if the light is casting shadows.", "fullName": "Shadow casting", "functionType": "Condition", - "group": "3D spot light shadow configuration", + "group": "3D point light shadow configuration", "name": "IsCastingShadow", "sentence": "_PARAM0_ casting shadows", "events": [ @@ -43265,7 +45367,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43275,7 +45377,7 @@ "description": "Change if the light is casting shadows.", "fullName": "Shadow casting", "functionType": "Action", - "group": "3D spot light shadow configuration", + "group": "3D point light shadow configuration", "name": "SetCastingShadow", "sentence": "_PARAM0_ casting shadows: _PARAM1_", "events": [ @@ -43339,7 +45441,7 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setCastingShadow(value);" + "object.__pointLightAdapter.setCastingShadow(value);" ], "parameterObjects": "Object", "useStrict": true, @@ -43350,7 +45452,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" }, { @@ -43364,60 +45466,49 @@ "objectGroups": [] }, { - "description": "Rotate the light to light up a position.", - "fullName": "Look at position", - "functionType": "Action", - "group": "Angle", - "name": "LookAtPosition", - "sentence": "_PARAM0_ look at _PARAM1_ ; _PARAM2_ ; _PARAM3_", + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", "events": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const object = objects[0];\r", - "const targetX = eventsFunctionContext.getArgument(\"TargetX\");\r", - "const targetY = eventsFunctionContext.getArgument(\"TargetY\");\r", - "const targetZ = eventsFunctionContext.getArgument(\"TargetZ\");\r", - "\r", - "object.__spotLightAdapter.lookAtPosition(targetX, targetY, targetZ);" - ], - "parameterObjects": "Object", - "useStrict": true, - "eventsSheetExpanded": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] } ], + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" - }, - { - "description": "Target X", - "name": "TargetX", - "type": "expression" - }, - { - "description": "Target Y", - "name": "TargetY", - "type": "expression" - }, - { - "description": "Target Z", - "name": "TargetZ", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Rotate the light to light up an object.", - "fullName": "Look at object", - "functionType": "Action", - "group": "Angle", - "name": "LookAtObject", - "sentence": "_PARAM0_ look at _PARAM1_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D point light shadow configuration", + "name": "SetShadowQuality", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -43425,47 +45516,46 @@ "actions": [ { "type": { - "value": "SpotLight3D::SpotLight3D::LookAtPosition" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Target.CenterX()", - "Target.CenterY()", - "Target.Object3D::CenterZ()", - "" + "ShadowQuality", + "=", + "Value" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" - }, - { - "description": "Object", - "name": "Target", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "the shadow quality of the light.", - "fullName": "Shadow quality", + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", "functionType": "ExpressionAndCondition", - "group": "3D spot light shadow configuration", - "name": "ShadowQuality", - "sentence": "the shadow quality", + "group": "3D point light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -43473,24 +45563,23 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetReturnNumber" }, "parameters": [ - "ShadowQuality" + "ShadowCameraNearPlane" ] } ] } ], "expressionType": { - "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", - "type": "stringWithSelector" + "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43499,9 +45588,9 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "ShadowQuality", - "group": "3D spot light shadow configuration", - "name": "SetShadowQuality", + "getterName": "ShadowCameraNearPlane", + "group": "3D point light shadow configuration", + "name": "SetShadowCameraNearPlane", "sentence": "", "events": [ { @@ -43510,10 +45599,10 @@ "actions": [ { "type": { - "value": "SetStringVariable" + "value": "SetNumberVariable" }, "parameters": [ - "ShadowQuality", + "ShadowCameraNearPlane", "=", "Value" ] @@ -43526,7 +45615,8 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setShadowQuality(value);" + "object.__pointLightAdapter.setShadowCameraNearPlane(value);\r", + "" ], "parameterObjects": "Object", "useStrict": true, @@ -43537,19 +45627,19 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], "objectGroups": [] }, { - "description": "the shadow camera near plane of the light.", - "fullName": "Shadow camera near plane", + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", "functionType": "ExpressionAndCondition", - "group": "3D spot light shadow configuration", - "name": "ShadowCameraNearPlane", - "sentence": "the shadow camera near plane", + "group": "3D point light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -43560,7 +45650,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "ShadowCameraNearPlane" + "ShadowCameraFarPlane" ] } ] @@ -43573,7 +45663,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43582,9 +45672,9 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "ShadowCameraNearPlane", - "group": "3D spot light shadow configuration", - "name": "SetShadowCameraNearPlane", + "getterName": "ShadowCameraFarPlane", + "group": "3D point light shadow configuration", + "name": "SetShadowCameraFarPlane", "sentence": "", "events": [ { @@ -43596,7 +45686,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "ShadowCameraNearPlane", + "ShadowCameraFarPlane", "=", "Value" ] @@ -43609,7 +45699,7 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setShadowCameraNearPlane(value);\r", + "object.__pointLightAdapter.setShadowCameraFarPlane(value);\r", "" ], "parameterObjects": "Object", @@ -43621,19 +45711,18 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], "objectGroups": [] }, { - "description": "the shadow camera far plane of the light.", - "fullName": "Shadow camera far plane", + "description": "the range of the light. 0 means no limit.", + "fullName": "Range", "functionType": "ExpressionAndCondition", - "group": "3D spot light shadow configuration", - "name": "ShadowCameraFarPlane", - "sentence": "the shadow camera far plane", + "name": "Range", + "sentence": "the range", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -43644,7 +45733,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "ShadowCameraFarPlane" + "Range" ] } ] @@ -43657,7 +45746,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43666,9 +45755,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "ShadowCameraFarPlane", - "group": "3D spot light shadow configuration", - "name": "SetShadowCameraFarPlane", + "getterName": "Range", + "name": "SetRange", "sentence": "", "events": [ { @@ -43680,7 +45768,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "ShadowCameraFarPlane", + "Range", "=", "Value" ] @@ -43693,8 +45781,7 @@ "const object = objects[0];\r", "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__spotLightAdapter.setShadowCameraFarPlane(value);\r", - "" + "object.__pointLightAdapter.setRange(value);" ], "parameterObjects": "Object", "useStrict": true, @@ -43705,7 +45792,7 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpotLight3D::SpotLight3D", + "supplementaryInformation": "Light3D::PointLight3D", "type": "object" } ], @@ -43730,20 +45817,6 @@ { "functionName": "UpdateHelper" }, - { - "functionName": "UpdateImage" - }, - { - "folderName": "Angle", - "children": [ - { - "functionName": "LookAtPosition" - }, - { - "functionName": "LookAtObject" - } - ] - }, { "functionName": "Color" }, @@ -43763,19 +45836,13 @@ "functionName": "SetDecay" }, { - "functionName": "ConeAngle" - }, - { - "functionName": "SetConeAngle" - }, - { - "functionName": "Smoothing" + "functionName": "Range" }, { - "functionName": "SetSmoothing" + "functionName": "SetRange" }, { - "folderName": "3D spot light shadow configuration", + "folderName": "3D point light shadow configuration", "children": [ { "functionName": "IsCastingShadow" @@ -43812,28 +45879,12 @@ "label": "Color", "name": "Color" }, - { - "value": "30", - "type": "Number", - "unit": "DegreeAngle", - "label": "Cone angle", - "group": "Cone", - "name": "ConeAngle" - }, { "value": "1", "type": "Number", "label": "Intensity", "name": "Intensity" }, - { - "value": "1", - "type": "Number", - "label": "Smoothing", - "description": "Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", - "group": "Cone", - "name": "Smoothing" - }, { "value": "2", "type": "Number", @@ -43841,19 +45892,6 @@ "description": "The amount the light dims along the distance of the light.", "name": "Decay" }, - { - "value": "", - "type": "Resource", - "label": "Image", - "description": "Shadow casting must be enabled for the image to have any effect.", - "group": "Shadow", - "extraInformation": [ - "image" - ], - "choices": [], - "advanced": true, - "name": "Image" - }, { "value": "true", "type": "Boolean", @@ -43899,6 +45937,15 @@ "group": "Shadow", "advanced": true, "name": "ShadowCameraFarPlane" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Range", + "description": "0 means no limit.", + "advanced": true, + "name": "Range" } ], "propertiesFolderStructure": { @@ -43914,15 +45961,7 @@ "propertyName": "Decay" }, { - "folderName": "Cone", - "children": [ - { - "propertyName": "ConeAngle" - }, - { - "propertyName": "Smoothing" - } - ] + "propertyName": "Range" }, { "folderName": "Shadow", @@ -43933,9 +45972,6 @@ { "propertyName": "ShadowQuality" }, - { - "propertyName": "Image" - }, { "propertyName": "ShadowCameraNearPlane" }, @@ -44157,8 +46193,11 @@ { "description": "The finite state machine used internally by the button object.", "fullName": "Button finite state machine", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -45391,9 +47430,12 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -48121,8 +50163,11 @@ { "description": "Stick the object to another. Use the action to stick the object, or unstick it later.", "fullName": "Sticker", + "helpPath": "", + "iconUrl": "", "name": "Sticker", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -48475,8 +50520,11 @@ { "description": "Teleport the object when leaving one side of the screen so that it immediately reappears on the opposite side, maintaining speed and trajectory.", "fullName": "Screen Wrap", + "helpPath": "", + "iconUrl": "", "name": "ScreenWrap", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -49627,8 +51675,11 @@ { "description": "Teleport the object when leaving one side of the screen so that it immediately reappears on the opposite side, maintaining speed and trajectory.", "fullName": "Screen Wrap (physics objects)", + "helpPath": "", + "iconUrl": "", "name": "ScreenWrapPhysics", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -51086,8 +53137,11 @@ { "description": "This behavior provides a condition to check if the object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.\nNote that object visibility, such as being hidden or 0 opacity, is not considered (but you can use those existing conditions in addition to this behavior).", "fullName": "Is on screen", + "helpPath": "", + "iconUrl": "", "name": "InOnScreen", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -52252,8 +54306,11 @@ { "description": "Rotate continuously and make a sound when deleted.", "fullName": "Collectible", + "helpPath": "", + "iconUrl": "", "name": "Collectible", "objectType": "Scene3D::Model3DObject", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -52796,9 +54853,12 @@ "defaultName": "LeaderboardDialog", "description": "Displays the player score and allows to submit it to a leaderboard.", "fullName": "Leaderboard dialog", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "LeaderboardDialog", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -55315,8 +57375,11 @@ { "description": "Turn and move objects forward.", "fullName": "3D air control", + "helpPath": "", + "iconUrl": "", "name": "AirControl3D", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -55734,9 +57797,12 @@ "defaultName": "", "description": "", "fullName": "", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "MyObject", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -55873,9 +57939,12 @@ "defaultName": "", "description": "", "fullName": "", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "MyObject2", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", From 7cdcecfafb2d5733da5fd2fc5bfaba6607cb731d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 2 Apr 2026 18:23:27 +0200 Subject: [PATCH 8/9] Add action to change the max --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 111 +++++++++++++++++- 1 file changed, 107 insertions(+), 4 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index c6adacab2..39c58ff32 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -7554,6 +7554,17 @@ "3", "" ] + }, + { + "type": { + "value": "Light3D::SetLightShadowCountMax" + }, + "parameters": [ + "", + "=", + "1", + "" + ] } ] } @@ -42509,6 +42520,14 @@ " value: 20", "};", "", + "const editorLightShadowCountMax = {", + " value: 1", + "};", + "", + "const lightShadowCountMax = {", + " value: 4", + "};", + "", "/**", " * Get the platforms manager of an instance container.", " * @param {gdjs.RuntimeScene & {__lightManager: LightManager}} runtimeScene", @@ -42517,8 +42536,8 @@ " if (!runtimeScene.__lightManager) {", " // Create the shared manager if necessary.", " runtimeScene.__lightManager = isInGameEdition ?", - " new LightManager(editorLightCountMax, 1) :", - " new LightManager(lightCountMax, 4);", + " new LightManager(editorLightCountMax, editorLightShadowCountMax) :", + " new LightManager(lightCountMax, lightShadowCountMax);", " }", " return runtimeScene.__lightManager;", "}", @@ -42605,7 +42624,7 @@ "", " /**", " * @param maxCount {{value: number}}", - " * @param shadowCount {number}", + " * @param shadowCount {{value: number}}", " */", " constructor(maxCount, shadowCount) {", " this.visibleObjects = new CappedLightList(", @@ -42614,7 +42633,7 @@ " (object) => { object.__light3D.visible = false; }", " );", " this.shadowObjects = new CappedLightList(", - " { value: shadowCount },", + " shadowCount,", " (object) => { object.__light3D.castShadow = true; },", " (object) => { object.__light3D.castShadow = false; }", " );", @@ -42643,6 +42662,7 @@ "gdjs.__light3DExtension = {", " Light3DRenderer,", " lightCountMax,", + " lightShadowCountMax,", "}" ], "parameterObjects": "", @@ -42729,6 +42749,83 @@ ], "parameters": [], "objectGroups": [] + }, + { + "description": "the maximum number of nearest lights displayed with shadow simultaneously.", + "fullName": "Max lights with shadow count", + "functionType": "ExpressionAndCondition", + "name": "LightShadowCountMax", + "sentence": "max lights with shadow count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "", + "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightShadowCountMax.value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LightShadowCountMax", + "name": "SetLightShadowCountMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "", + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "gdjs.__light3DExtension.lightShadowCountMax.value = value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] } ], "eventsFunctionsFolderStructure": { @@ -42748,6 +42845,12 @@ }, { "functionName": "SetLightCountMax" + }, + { + "functionName": "LightShadowCountMax" + }, + { + "functionName": "SetLightShadowCountMax" } ] }, From 757fd9d4d30f93accb7a4026abebb26df5e81257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 2 Apr 2026 18:33:14 +0200 Subject: [PATCH 9/9] Fix description --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 39c58ff32..6894b88c1 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -41898,9 +41898,9 @@ "fullName": "3D spot light", "gdevelopVersion": ">=5.5.222", "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNobGlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxMEw2LDVIMThMMTUsMTBIOU0xOCw0SDZWMkgxOFY0TTksMjJWMTFIMTVWMjJIOU0xMiwxM0ExLDEgMCAwLDAgMTEsMTRBMSwxIDAgMCwwIDEyLDE1QTEsMSAwIDAsMCAxMywxNEExLDEgMCAwLDAgMTIsMTNaIiAvPjwvc3ZnPg==", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWxpZ2h0YnVsYi1vbi1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLDExSDIzVjEzSDIwVjExTTEsMTFINFYxM0gxVjExTTEzLDFWNEgxMVYxSDEzTTQuOTIsMy41TDcuMDUsNS42NEw1LjYzLDcuMDVMMy41LDQuOTNMNC45MiwzLjVNMTYuOTUsNS42M0wxOS4wNywzLjVMMjAuNSw0LjkzTDE4LjM3LDcuMDVMMTYuOTUsNS42M00xMiw2QTYsNiAwIDAsMSAxOCwxMkMxOCwxNC4yMiAxNi43OSwxNi4xNiAxNSwxNy4yVjE5QTEsMSAwIDAsMSAxNCwyMEgxMEExLDEgMCAwLDEgOSwxOVYxNy4yQzcuMjEsMTYuMTYgNiwxNC4yMiA2LDEyQTYsNiAwIDAsMSAxMiw2TTE0LDIxVjIyQTEsMSAwIDAsMSAxMywyM0gxMUExLDEgMCAwLDEgMTAsMjJWMjFIMTRNMTEsMThIMTNWMTUuODdDMTQuNzMsMTUuNDMgMTYsMTMuODYgMTYsMTJBNCw0IDAgMCwwIDEyLDhBNCw0IDAgMCwwIDgsMTJDOCwxMy44NiA5LjI3LDE1LjQzIDExLDE1Ljg3VjE4WiIgLz48L3N2Zz4=", "name": "Light3D", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/b627f8e676b3aac26945b2c38db0cfa787d34d2eff23755d4eb1289452f6cd28_flashlight.svg", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f237ae4e3b857c556846c7b2c0b132556fd4bcdeff217034b4d9c97dc1aab1d6_lightbulb-on-outline.svg", "shortDescription": "Light up a cone like a flashlight.", "version": "1.0.0", "description": "Light up a cone like a flashlight.", @@ -42697,10 +42697,7 @@ }, { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "", - "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightCountMax.value;" - ], + "inlineCode": "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightCountMax.value;", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false @@ -42737,7 +42734,6 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "gdjs.__light3DExtension.lightCountMax.value = value;" @@ -42774,10 +42770,7 @@ }, { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "", - "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightShadowCountMax.value;" - ], + "inlineCode": "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightShadowCountMax.value;", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false @@ -42814,7 +42807,6 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "gdjs.__light3DExtension.lightShadowCountMax.value = value;" @@ -42867,11 +42859,11 @@ "description": "Light up a cone like a flashlight.", "fullName": "3D spot light", "helpPath": "", - "iconUrl": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNobGlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxMEw2LDVIMThMMTUsMTBIOU0xOCw0SDZWMkgxOFY0TTksMjJWMTFIMTVWMjJIOU0xMiwxM0ExLDEgMCAwLDAgMTEsMTRBMSwxIDAgMCwwIDEyLDE1QTEsMSAwIDAsMCAxMywxNEExLDEgMCAwLDAgMTIsMTNaIiAvPjwvc3ZnPg==", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "SpotLight3D", - "previewIconUrl": "", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/b627f8e676b3aac26945b2c38db0cfa787d34d2eff23755d4eb1289452f6cd28_flashlight.svg", "objects": [ { "assetStoreId": "", @@ -44676,8 +44668,8 @@ "areaMinY": -20, "areaMinZ": -20, "defaultName": "PointLight", - "description": "Light up in all directions like a torch.", - "fullName": "3D point light", + "description": "A collection of light object for 3D.", + "fullName": "3D spot light and point light", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRvcmNoIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTguNiA5LjZDOSAxMC4yIDkuNSAxMC43IDEwLjIgMTFIMTQuMkMxNC41IDEwLjkgMTQuNyAxMC43IDE0LjkgMTAuNUMxNS45IDkuNSAxNi4zIDggMTUuOCA2LjdMMTUuNyA2LjVDMTUuNiA2LjIgMTUuNCA2IDE1LjIgNS44QzE1LjEgNS42IDE0LjkgNS41IDE0LjggNS4zQzE0LjQgNSAxNCA0LjcgMTMuNiA0LjNDMTIuNyAzLjQgMTIuNiAyIDEzLjEgMUMxMi42IDEuMSAxMi4xIDEuNCAxMS43IDEuOEMxMC4yIDMgOS42IDUuMSAxMC4zIDdWNy4yQzEwLjMgNy4zIDEwLjIgNy40IDEwLjEgNy41QzEwIDcuNiA5LjggNy41IDkuNyA3LjRMOS42IDcuM0M5IDYuNSA4LjkgNS4zIDkuMyA0LjNDOC40IDUuMSA3LjkgNi40IDggNy43QzggOCA4LjEgOC4zIDguMiA4LjZDOC4yIDguOSA4LjQgOS4zIDguNiA5LjZNMTIuMyA4LjFDMTIuNCA3LjYgMTIuMiA3LjIgMTIuMSA2LjhDMTIgNi40IDEyIDYgMTIuMiA1LjZMMTIuNSA2LjJDMTIuOSA2LjggMTMuNiA3IDEzLjggNy44VjguMUMxMy44IDguNiAxMy42IDkuMSAxMy4zIDkuNEMxMy4xIDkuNSAxMi45IDkuNyAxMi43IDkuN0MxMi4xIDkuOSAxMS40IDkuNiAxMSA5LjJDMTEuOCA5LjIgMTIuMiA4LjYgMTIuMyA4LjFNMTUgMTJWMTRIMTRMMTMgMjJIMTFMMTAgMTRIOVYxMkgxNVoiIC8+PC9zdmc+", "is3D": true,