From bdfee2664226a7aeee47103be37d89cf2c81b400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 13:09:35 +0200 Subject: [PATCH 1/7] Update extensions --- .../3d-tile-based-city-builder.json | 5860 +++++++++++------ 1 file changed, 3784 insertions(+), 2076 deletions(-) diff --git a/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json b/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json index b8de8fbc7..383f33a78 100644 --- a/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json +++ b/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json @@ -1,9 +1,9 @@ { "firstLayout": "GameScene", "gdVersion": { - "build": 217, + "build": 236, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "tile-based-city-builder", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "3D Tile based city builder", "description": "A 3D tile based city builder example that shows users how to angle a 3D camera, select/deselect, and purchase building types. As well as showing users how to check how many of an instance of an object is in scene, in order to calculate cost and income based on the type of buildings.", @@ -94,7 +93,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Vingette.png", "kind": "image", "metadata": "", @@ -103,7 +101,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/desktop-icon-512.png", "kind": "image", "metadata": "", @@ -112,7 +109,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-192.png", "kind": "image", "metadata": "", @@ -121,7 +117,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-144.png", "kind": "image", "metadata": "", @@ -130,7 +125,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-96.png", "kind": "image", "metadata": "", @@ -139,7 +133,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-72.png", "kind": "image", "metadata": "", @@ -148,7 +141,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-48.png", "kind": "image", "metadata": "", @@ -157,7 +149,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-36.png", "kind": "image", "metadata": "", @@ -166,7 +157,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-windowSplashScreenAnimatedIcon.png", "kind": "image", "metadata": "", @@ -175,7 +165,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-1024.png", "kind": "image", "metadata": "", @@ -184,7 +173,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-180.png", "kind": "image", "metadata": "", @@ -193,7 +181,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-167.png", "kind": "image", "metadata": "", @@ -202,7 +189,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-152.png", "kind": "image", "metadata": "", @@ -211,7 +197,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-144.png", "kind": "image", "metadata": "", @@ -220,7 +205,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-120.png", "kind": "image", "metadata": "", @@ -229,7 +213,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-114.png", "kind": "image", "metadata": "", @@ -238,7 +221,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-100.png", "kind": "image", "metadata": "", @@ -247,7 +229,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-87.png", "kind": "image", "metadata": "", @@ -256,7 +237,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-80.png", "kind": "image", "metadata": "", @@ -265,7 +245,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-76.png", "kind": "image", "metadata": "", @@ -274,7 +253,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-72.png", "kind": "image", "metadata": "", @@ -283,7 +261,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-60.png", "kind": "image", "metadata": "", @@ -292,7 +269,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-58.png", "kind": "image", "metadata": "", @@ -301,7 +277,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-57.png", "kind": "image", "metadata": "", @@ -310,7 +285,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-50.png", "kind": "image", "metadata": "", @@ -319,7 +293,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-40.png", "kind": "image", "metadata": "", @@ -328,7 +301,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-29.png", "kind": "image", "metadata": "", @@ -337,7 +309,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-20.png", "kind": "image", "metadata": "", @@ -346,7 +317,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/House2.png", "kind": "image", "metadata": "", @@ -355,7 +325,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/HouseSelected.png", "kind": "image", "metadata": "", @@ -364,7 +333,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Mine2.png", "kind": "image", "metadata": "", @@ -373,7 +341,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/MineSelected.png", "kind": "image", "metadata": "", @@ -382,7 +349,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Lumber2.png", "kind": "image", "metadata": "", @@ -391,7 +357,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/LumberSelected.png", "kind": "image", "metadata": "", @@ -400,7 +365,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -453,7 +417,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/HexagonalGrid.png", "kind": "image", "metadata": "", @@ -668,6 +631,7 @@ "assetStoreId": "", "name": "Toolbar", "type": "Toolbar::Toolbar", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -960,8 +924,11 @@ "behaviors": [], "content": { "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, "depth": 120, "height": 120, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Building Village.glb", @@ -982,8 +949,11 @@ "behaviors": [], "content": { "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, "depth": 120, "height": 120, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Building Mine.glb", @@ -1004,8 +974,11 @@ "behaviors": [], "content": { "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, "depth": 120, "height": 120, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Building House.glb", @@ -1026,8 +999,11 @@ "behaviors": [], "content": { "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, "depth": 120, "height": 120, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Grass.glb", @@ -2047,12 +2023,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Mouse Pointer Lock", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMTksMTkgMjQsMTkgMjQsMjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSI2LDIzIDExLDIzIDExLDE4ICIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI0LDE5LjRjLTAuNywwLjgtMS40LDEuNi0yLjIsMi40Yy03LDctMTUuMywxMC4yLTE4LjUsN3MtMC4xLTExLjUsNy0xOC41czE1LjMtMTAuMiwxOC41LTcNCgljMS40LDEuNCwxLjYsMy42LDAuOCw2LjMiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMSwyMi41Yy0wLjMtMC4yLTAuNS0wLjUtMC44LTAuOGMtNy03LTEwLjItMTUuMy03LTE4LjVzMTEuNS0wLjEsMTguNSw3czEwLjIsMTUuMyw3LDE4LjUNCgljLTEuNywxLjctNC44LDEuNi04LjQsMC4xIi8+DQo8L3N2Zz4NCg==", "name": "MousePointerLock", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Virtual Reality/Virtual Reality_360_rotate_vr_movement.svg", "shortDescription": "This behavior removes the limit on the distance the mouse can move and hides the cursor.", - "version": "0.1.7", + "version": "0.3.0", "description": [ "This behavior removes the limit on the distance the mouse can move and hides the cursor.", "", @@ -2076,11 +2053,33 @@ "pointer" ], "authorIds": [ - "Zu55H5hcb9YmZTltIVOTAFDJQyB2" + "Zu55H5hcb9YmZTltIVOTAFDJQyB2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], - "sceneVariables": [], + "sceneVariables": [ + { + "name": "TouchId", + "type": "number", + "value": -1 + }, + { + "name": "OldX", + "type": "number", + "value": 0 + }, + { + "name": "OldY", + "type": "number", + "value": 0 + }, + { + "name": "TouchSpeedFactor", + "type": "number", + "value": 4 + } + ], "eventsFunctions": [ { "fullName": "", @@ -2091,23 +2090,63 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const canvas = runtimeScene.getGame().getRenderer().getCanvas();", + "class PointerLockHandler {", + " movementX = 0;", + " movementY = 0;", + " retried = false;", + " /**", + " * @type {gdjs.RuntimeGame}", + " */", + " game;", + "", + " /**", + " * @param {gdjs.RuntimeGame} game", + " */", + " constructor(game) {", + " this.game = game;", + " const canvas = game.getRenderer().getCanvas();", + "", + " canvas.addEventListener(\"pointermove\", event => {", + " if (!!document.pointerLockElement) {", + " this.movementX += event.movementX || 0;", + " this.movementY += event.movementY || 0;", + " }", + " }, false);", + "", + " document.addEventListener(\"pointerlockerror\", event => {", + " if (!this.retried) {", + " canvas.requestPointerLock();", + " this.retried = true;", + " }", + " });", + " }", + "", + " requestPointerLock() {", + " const canvas = this.game.getRenderer().getCanvas();", + " if (canvas.requestPointerLock && !document.pointerLockElement) {", + " this.retried = false;", + " canvas.requestPointerLock({ unadjustedMovement: true });", + " }", + " }", + "", + " exitPointerLock() {", + " if (document.exitPointerLock) {", + " document.exitPointerLock();", + " }", + " }", "", - "gdjs._MousePointerLockExtension = {};", - "gdjs._MousePointerLockExtension.movement = { x: 0, y: 0 };", - "gdjs._MousePointerLockExtension.retried = false;", + " isPointerLocked() {", + " return !!document.pointerLockElement;", + " }", "", - "canvas.addEventListener(\"pointermove\", (e) => {", - " gdjs._MousePointerLockExtension.movement.x += e.movementX || 0;", - " gdjs._MousePointerLockExtension.movement.y += e.movementY || 0;", - "}, false);", + " resetMovement() {", + " this.movementX = 0;", + " this.movementY = 0;", + " }", + "};", "", - "document.addEventListener(\"pointerlockerror\", (e) => {", - " if (!gdjs._MousePointerLockExtension.retried) {", - " canvas.requestPointerLock();", - " gdjs._MousePointerLockExtension.retried = true;", - " } ", - "});" + "gdjs._MousePointerLockExtension = { handler: new PointerLockHandler(runtimeScene.getGame()) };", + "" ], "parameterObjects": "", "useStrict": true, @@ -2125,54 +2164,101 @@ "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "gdjs._MousePointerLockExtension.movement = { x: 0, y: 0 };", + "inlineCode": [ + "const { handler } = gdjs._MousePointerLockExtension;\r", + "\r", + "handler.resetMovement();\r", + "" + ], "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false - } - ], - "parameters": [], - "objectGroups": [] - }, - { - "description": "Get the movement of the pointer on the X-axis.", - "fullName": "Pointer X movement", - "functionType": "Expression", - "name": "MovementX", - "sentence": "", - "events": [ + }, { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = gdjs._MousePointerLockExtension.movement.x || 0;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [], - "objectGroups": [] - }, - { - "description": "Get the movement of the pointer on the Y-axis.", - "fullName": "Pointer Y movement", - "functionType": "Expression", - "name": "MovementY", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MousePointerLock::isEmulatingPointerLock" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MousePointerLock::SetMovementX" + }, + "parameters": [ + "", + "=", + "(MousePointerLock::TouchX(TouchId) - OldX) * TouchSpeedFactor", + "" + ] + }, + { + "type": { + "value": "MousePointerLock::SetMovementY" + }, + "parameters": [ + "", + "=", + "(MousePointerLock::TouchY(TouchId) - OldY) * TouchSpeedFactor", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldX", + "=", + "MousePointerLock::TouchX(TouchId)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldY", + "=", + "MousePointerLock::TouchY(TouchId)" + ] + } + ] + }, { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = gdjs._MousePointerLockExtension.movement.y || 0;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "-1" + ] + } + ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [], "objectGroups": [] }, @@ -2183,18 +2269,72 @@ "name": "RequestPointerLock", "sentence": "Request Pointer Lock", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "-1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(0)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldX", + "=", + "MousePointerLock::TouchX(TouchId)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldY", + "=", + "MousePointerLock::TouchY(TouchId)" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const canvas = runtimeScene.getGame().getRenderer().getCanvas();\r", - "if (canvas.requestPointerLock && !document.pointerLockElement) {\r", - " canvas.requestPointerLock({ unadjustedMovement: true });\r", - " gdjs._MousePointerLockExtension.retried = false;\r", - "}" + "const { handler } = gdjs._MousePointerLockExtension;\r", + "\r", + "handler.requestPointerLock();\r", + "" ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ], "parameters": [], @@ -2207,12 +2347,30 @@ "name": "ExitPointerLock", "sentence": "Exit pointer lock", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "-1" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "if (document.exitPointerLock) {\r", - " document.exitPointerLock();\r", - "}" + "\r", + "const { handler } = gdjs._MousePointerLockExtension;\r", + "\r", + "handler.exitPointerLock();\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -2228,10 +2386,87 @@ "functionType": "Condition", "name": "isPointerLocked", "sentence": "The mouse pointer is locked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "<", + "0" + ] + }, + { + "type": { + "value": "MousePointerLock::isPointerActuallyLocked" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if the mouse pointer is actually locked.", + "fullName": "Pointer is actually locked", + "functionType": "Condition", + "name": "isPointerActuallyLocked", + "private": true, + "sentence": "The mouse pointer actually is locked", "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = document.pointerLockElement ? true : false;", + "inlineCode": [ + "\r", + "const { handler } = gdjs._MousePointerLockExtension;\r", + "\r", + "eventsFunctionContext.returnValue = handler.isPointerLocked();\r", + "" + ], "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false @@ -2239,478 +2474,307 @@ ], "parameters": [], "objectGroups": [] - } - ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "Camera", - "extensionNamespace": "", - "fullName": "Third person camera", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", - "name": "ThirdPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Virtual Reality/94e95d2c318e1f3dc7151a351024e13c574e1e44669c6696aa107d60230073f6_Virtual Reality_3d_vision_eye_vr.svg", - "shortDescription": "Move the camera to look at an object from a given distance.", - "version": "1.4.1", - "description": [ - "Move the camera to look at an object from a given distance with a rotation and an elevation angles.", - "", - "It can be useful for:", - "- Third person camera", - "- Isometric-like point of view", - "" - ], - "origin": { - "identifier": "ThirdPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ + }, { - "description": "Move the camera to look at a position from a distance.", - "fullName": "Look at a position from a distance (deprecated)", - "functionType": "Action", - "name": "LookFromDistanceAtPosition", + "description": "Check if the mouse pointer lock is emulated.", + "fullName": "Pointer lock is emulated", + "functionType": "Condition", + "name": "isEmulatingPointerLock", "private": true, - "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_; _PARAM2_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "sentence": "The mouse pointer is lock is emulated", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCameraCenterX" - }, - "parameters": [ - "", - "=", - "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", - "Layer", - "" - ] - }, + "conditions": [ { "type": { - "value": "SetCameraCenterY" + "inverted": true, + "value": "MousePointerLock::isPointerActuallyLocked" }, "parameters": [ "", - "=", - "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", - "Layer", "" ] }, { "type": { - "value": "Scene3D::SetCameraZ" + "value": "NumberVariable" }, "parameters": [ - "", - "=", - "Distance * sin(ToRad(ElevationAngle))", - "Layer", - "" + "TouchId", + ">=", + "0" ] - }, + } + ], + "actions": [ { "type": { - "value": "Scene3D::TurnCameraTowardPosition" + "value": "SetReturnBoolean" }, "parameters": [ - "", - "PositionX", - "PositionY", - "0", - "Layer", - "", - "" + "True" ] } ] } ], - "parameters": [ - { - "description": "Position on X axis", - "name": "PositionX", - "type": "expression" - }, - { - "description": "Position on Y axis", - "name": "PositionY", - "type": "expression" - }, - { - "description": "Distance", - "name": "Distance", - "type": "expression" - }, - { - "description": "Rotation angle (around Z axis)", - "name": "RotationAngle", - "type": "expression" - }, - { - "description": "Elevation angle (around Y axis)", - "name": "ElevationAngle", - "type": "expression" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], + "parameters": [], "objectGroups": [] }, { - "description": "Move the camera to look at an object from a distance.", - "fullName": "Look at an object from a distance (deprecated)", - "functionType": "Action", - "name": "LookFromDistanceAtObject", - "private": true, - "sentence": "Move the camera of _PARAM5_ to look at _PARAM1_ from _PARAM2_ pixels with a rotation of _PARAM3_° and an elevation of _PARAM4_°", + "description": "Check if the locked pointer is moving.", + "fullName": "Locked pointer is moving", + "functionType": "Condition", + "name": "IsMoving", + "sentence": "Locked pointer is moving", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "MousePointerLock::MovementX" + }, + "parameters": [ + "", + "!=", + "0", + "" + ] + }, + { + "type": { + "value": "MousePointerLock::MovementY" + }, + "parameters": [ + "", + "!=", + "0", + "" + ] + } + ] + } + ], "actions": [ { "type": { - "value": "ThirdPersonCamera::LookFromDistanceAtPosition" + "value": "SetReturnBoolean" }, "parameters": [ - "", - "Object.CenterX()", - "Object.CenterY()", - "Distance", - "RotationAngle", - "ElevationAngle", - "Layer", - "" + "True" ] } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "objectList" - }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "the movement of the locked pointer on the X axis.", + "fullName": "Pointer X movement", + "functionType": "ExpressionAndCondition", + "name": "MovementX", + "sentence": "the movement of the locked pointer on the X axis", + "events": [ { - "description": "Distance", - "name": "Distance", - "type": "expression" - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "eventsFunctionContext.returnValue = gdjs._MousePointerLockExtension.handler.movementX || 0;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "the movement of the locked pointer on the X axis.", + "fullName": "Pointer X movement", + "functionType": "ActionWithOperator", + "getterName": "MovementX", + "name": "SetMovementX", + "private": true, + "sentence": "the movement of the locked pointer on the X axis", + "events": [ { - "description": "Rotation angle (around Z axis)", - "name": "RotationAngle", - "type": "expression" - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "gdjs._MousePointerLockExtension.handler.movementX = value;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "the movement of the pointer on the Y axis.", + "fullName": "Pointer Y movement", + "functionType": "ExpressionAndCondition", + "name": "MovementY", + "sentence": "the movement of the pointer on the Y axis", + "events": [ { - "description": "Elevation angle (around Y axis)", - "name": "ElevationAngle", - "type": "expression" - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "eventsFunctionContext.returnValue = gdjs._MousePointerLockExtension.handler.movementY || 0;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "the movement of the locked pointer on the X axis.", + "fullName": "Pointer X movement", + "functionType": "ActionWithOperator", + "getterName": "MovementY", + "name": "SetMovementY", + "private": true, + "sentence": "the movement of the locked pointer on the X axis", + "events": [ { - "description": "Layer", - "name": "Layer", - "type": "layer" + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "gdjs._MousePointerLockExtension.handler.movementY = value;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ], + "parameters": [], "objectGroups": [] }, { - "description": "Move the camera to look at a position from a distance.", - "fullName": "Look at a position from a distance", - "functionType": "Action", - "name": "LookFromDistanceAtPosition3D", - "sentence": "Move the camera of _PARAM7_ to look at _PARAM1_; _PARAM2_; _PARAM3_ from _PARAM4_ pixels with a rotation of _PARAM5_° and an elevation of _PARAM6_°", + "description": "Return the X position of a specific touch", + "fullName": "Touch X position", + "functionType": "Expression", + "name": "TouchX", + "private": true, + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCameraCenterX" - }, - "parameters": [ - "", - "=", - "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraCenterY" - }, - "parameters": [ - "", - "=", - "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "PositionZ + Distance * sin(ToRad(ElevationAngle))", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "90 - ElevationAngle", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "0", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "RotationAngle", - "Layer", - "" - ] - } - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const touchId = eventsFunctionContext.getArgument(\"NewTouchId\");", + "eventsFunctionContext.returnValue = runtimeScene.getGame().getInputManager().getTouchX(touchId);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "description": "Position on X axis", - "name": "PositionX", - "type": "expression" - }, - { - "description": "Position on Y axis", - "name": "PositionY", - "type": "expression" - }, - { - "description": "Position on Z axis", - "name": "PositionZ", - "type": "expression" - }, - { - "description": "Distance", - "name": "Distance", - "type": "expression" - }, - { - "description": "Rotation angle (around Z axis)", - "name": "RotationAngle", - "type": "expression" - }, - { - "description": "Elevation angle (around Y axis)", - "name": "ElevationAngle", + "description": "Touch identifier", + "name": "NewTouchId", "type": "expression" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" } ], "objectGroups": [] }, { - "description": "Move the camera to look at an object from a distance.", - "fullName": "Look at an object from a distance", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromDistanceAtObject3D", - "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "description": "Return the Y position of a specific touch", + "fullName": "Touch Y position", + "functionType": "Expression", + "name": "TouchY", + "private": true, + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" - }, - "parameters": [ - "", - "Object.CenterX()", - "Object.CenterY()", - "Object.Object3D::CenterZ()", - "Distance", - "RotationAngle", - "ElevationAngle", - "Layer", - "" - ] - } - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const touchId = eventsFunctionContext.getArgument(\"NewTouchId\");", + "eventsFunctionContext.returnValue = runtimeScene.getGame().getInputManager().getTouchY(touchId);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "description": "Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Distance", - "name": "Distance", - "type": "expression" - }, - { - "description": "Rotation angle (around Z axis)", - "name": "RotationAngle", - "type": "expression" - }, - { - "description": "Elevation angle (around Y axis)", - "name": "ElevationAngle", + "description": "Touch identifier", + "name": "NewTouchId", "type": "expression" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Expression", - "name": "RotatedX", - "private": true, - "sentence": "", + "description": "the speed factor for touch movement.", + "fullName": "Speed factor for touch movement", + "functionType": "ExpressionAndCondition", + "name": "TouchSpeedFactor", + "sentence": "the speed factor for touch movement", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Cos", - "=", - "cos(ToRad(RotationAngle))" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Sin", - "=", - "sin(ToRad(RotationAngle))" - ] - }, { "type": { "value": "SetReturnNumber" }, "parameters": [ - "Cos * X - Sin * Y" + "TouchSpeedFactor" ] } - ], - "variables": [ - { - "folded": true, - "name": "Cos", - "type": "number", - "value": 0 - }, - { - "folded": true, - "name": "Sin", - "type": "number", - "value": 0 - } ] } ], "expressionType": { "type": "expression" }, - "parameters": [ - { - "description": "Rotation angle", - "name": "RotationAngle", - "supplementaryInformation": "Tank::Tank", - "type": "expression" - }, - { - "description": "", - "name": "X", - "type": "expression" - }, - { - "description": "", - "name": "Y", - "type": "expression" - } - ], + "parameters": [], "objectGroups": [] }, { "fullName": "", - "functionType": "Expression", - "name": "RotatedY", - "private": true, + "functionType": "ActionWithOperator", + "getterName": "TouchSpeedFactor", + "name": "SetTouchSpeedFactor", "sentence": "", "events": [ { @@ -2722,81 +2786,29 @@ "value": "SetNumberVariable" }, "parameters": [ - "Cos", - "=", - "cos(ToRad(RotationAngle))" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Sin", + "TouchSpeedFactor", "=", - "sin(ToRad(RotationAngle))" + "Value" ] - }, - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Sin * X + Cos * Y" - ] - } - ], - "variables": [ - { - "folded": true, - "name": "Cos", - "type": "number", - "value": 0 - }, - { - "folded": true, - "name": "Sin", - "type": "number", - "value": 0 } ] } ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Rotation angle", - "name": "RotationAngle", - "supplementaryInformation": "Tank::Tank", - "type": "expression" - }, - { - "description": "", - "name": "X", - "type": "expression" - }, - { - "description": "", - "name": "Y", - "type": "expression" - } - ], + "parameters": [], "objectGroups": [] } ], "eventsBasedBehaviors": [ { - "description": "Smoothly follow an object at a distance.", - "fullName": "Third person camera", - "name": "ThirdPersonCamera", + "description": "Control camera rotations with a mouse.", + "fullName": "First person camera mouse mapper", + "name": "FirstPersonPointerMapper", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onCreated", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -2809,33 +2821,106 @@ "textG": 0, "textR": 0 }, - "comment": "Update private properties through setters to check their values and initialize state." + "comment": "TODO It's probably a bad idea to rotate the object around Y." }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "MousePointerLock::isPointerLocked" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetRotationHalfwayDuration" + "value": "SetAngle" }, "parameters": [ "Object", - "Behavior", + "+", + "MousePointerLock::MovementX() * HorizontalSpeed / SceneWindowWidth()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "+", + "MousePointerLock::MovementY() * VerticalSpeed / SceneWindowHeight()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", "=", - "RotationHalfwayDuration", - "" + "clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)" ] }, { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetTranslationZHalfwayDuration" + "value": "MousePointerLock::FirstPersonPointerMapper::LookFromObjectEyes" }, "parameters": [ "Object", "Behavior", - "=", - "TranslationZHalfwayDuration", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldLock", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "MousePointerLock::isPointerLocked" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MousePointerLock::RequestPointerLock" + }, + "parameters": [ + "", "" ] } @@ -2851,89 +2936,82 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "", + "description": "Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", + "fullName": "Look through object eyes", "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "group": "Layers and cameras", + "name": "LookFromObjectEyes", + "private": true, + "sentence": "Move the camera to look though _PARAM0_ eyes", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyHasJustBeenCreated" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyHasJustBeenCreated" + "value": "CentreCamera" }, "parameters": [ + "", "Object", - "Behavior", + "", + "Object.Layer()", "" ] }, { "type": { - "value": "SetCameraAngle" + "value": "Scene3D::SetCameraZ" }, "parameters": [ "", "=", - "Object.Angle() + 90", - "Object.Layer()", - "0" + "Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ", + "", + "" ] }, { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyCameraZ" + "value": "Scene3D::SetCameraRotationX" }, "parameters": [ - "Object", - "Behavior", + "", "=", - "Object.Object3D::CenterZ()" + "- Object.Object3D::RotationY() + 90", + "GetArgumentAsString(\"Layer\")", + "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "inverted": true, - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyIsCalledManually" + "value": "Scene3D::SetCameraRotationY" }, "parameters": [ - "Object", - "Behavior" + "", + "=", + "Object.Object3D::RotationX()", + "GetArgumentAsString(\"Layer\")", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::DoMoveCameraCloser" + "value": "SetCameraAngle" }, "parameters": [ - "Object", - "Behavior", + "", + "=", + "Object.Angle() + 90", + "Object.Layer()", "" ] } @@ -2949,53 +3027,72 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Move the camera closer to the object. This action must be called after the object has moved for the frame.", - "fullName": "Move the camera closer", - "functionType": "Action", - "name": "MoveCameraCloser", - "sentence": "Move the camera closer to _PARAM0_", + "description": "the horizontal rotation speed factor of the object.", + "fullName": "Horizontal rotation speed factor", + "functionType": "ExpressionAndCondition", + "group": "First person camera mouse mapper configuration", + "name": "HorizontalSpeed", + "sentence": "the horizontal rotation speed factor", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyIsCalledManually" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "" + "HorizontalSpeed" ] - }, + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalSpeed", + "name": "SetHorizontalSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::DoMoveCameraCloser" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "" + "HorizontalSpeed", + "=", + "Value" ] } ] @@ -3010,184 +3107,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Move the camera closer to the object.", - "fullName": "Do move the camera closer", - "functionType": "Action", - "name": "DoMoveCameraCloser", - "private": true, - "sentence": "Do move the camera closer _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * (1 - speed)\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * (1 - speed)\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * (1 - speed)^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln((1 - speed)))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough." - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Z translation", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyCameraZ" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::FreeAreaZMin()" - ] - } - ], - "actions": [ - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyCameraZ" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::FreeAreaZMin() + (CameraZ - Object.Behavior::FreeAreaZMin()) * exp(TimeDelta() * TranslationZLogSpeed)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyCameraZ" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::FreeAreaZMax()" - ] - } - ], - "actions": [ - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyCameraZ" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::FreeAreaZMax() + (CameraZ - Object.Behavior::FreeAreaZMax()) * exp(TimeDelta() * TranslationZLogSpeed)" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Z rotation", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CameraAngle", - "=", - "Object.Angle() + 90 + (AngleDifference(CameraAngle(Object.Layer(), 0), (Object.Angle() + 90))) * exp(TimeDelta() * RotationLogSpeed) + RotationAngleOffset" - ] - }, - { - "type": { - "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" - }, - "parameters": [ - "", - "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraAngle, OffsetX, -OffsetY)", - "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraAngle, OffsetX, -OffsetY)", - "CameraZ + OffsetZ", - "Distance", - "CameraAngle", - "Object.Object3D::RotationY() + ElevationAngleOffset", - "", - "" - ] - } - ], - "variables": [ - { - "folded": true, - "name": "CameraAngle", - "type": "number", - "value": 0 - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "the halfway time for rotation of the object.", - "fullName": "Halfway time for rotation", - "functionType": "ExpressionAndCondition", - "group": "Third person camera configuration", - "name": "RotationHalfwayDuration", - "sentence": "the halfway time for rotation", + "description": "the vertical rotation speed factor of the object.", + "fullName": "Vertical rotation speed factor", + "functionType": "ExpressionAndCondition", + "group": "First person camera mouse mapper configuration", + "name": "VerticalSpeed", + "sentence": "the vertical rotation speed factor", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3198,7 +3130,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "RotationHalfwayDuration" + "VerticalSpeed" ] } ] @@ -3216,7 +3148,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], @@ -3225,47 +3157,23 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "RotationHalfwayDuration", - "name": "SetRotationHalfwayDuration", + "getterName": "VerticalSpeed", + "name": "SetVerticalSpeed", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyRotationHalfwayDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalSpeed", "=", "Value" ] - }, - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyRotationLogSpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "log(0.5) / Value" - ] } ] } @@ -3279,19 +3187,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the halfway time on Z axis of the object.", - "fullName": "Halfway time on Z axis", + "description": "the minimum vertical camera angle of the object.", + "fullName": "Minimum vertical camera angle", "functionType": "ExpressionAndCondition", - "group": "Third person camera configuration", - "name": "TranslationZHalfwayDuration", - "sentence": "the halfway time on Z axis", + "group": "First person camera mouse mapper configuration", + "name": "VerticalAngleMin", + "sentence": "the minimum vertical camera angle", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3302,7 +3210,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "TranslationZHalfwayDuration" + "VerticalAngleMin" ] } ] @@ -3320,7 +3228,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], @@ -3329,47 +3237,23 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "TranslationZHalfwayDuration", - "name": "SetTranslationZHalfwayDuration", + "getterName": "VerticalAngleMin", + "name": "SetVerticalAngleMin", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyTranslationZHalfwayDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMin", "=", "Value" ] - }, - { - "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyTranslationZLogSpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "log(0.5) / Value" - ] } ] } @@ -3383,20 +3267,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Return follow free area bottom border Z.", - "fullName": "Free area Z min", - "functionType": "Expression", - "group": "Private", - "name": "FreeAreaZMin", - "private": true, - "sentence": "", + "description": "the maximum vertical camera angle of the object.", + "fullName": "Maximum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera mouse mapper configuration", + "name": "VerticalAngleMax", + "sentence": "the maximum vertical camera angle", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3407,7 +3290,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Object3D::CenterZ() + OffsetZ - FollowFreeAreaZMin" + "VerticalAngleMax" ] } ] @@ -3425,19 +3308,17 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Return follow free area top border Z.", - "fullName": "Free area Z max", - "functionType": "Expression", - "group": "Private", - "name": "FreeAreaZMax", - "private": true, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMax", + "name": "SetVerticalAngleMax", "sentence": "", "events": [ { @@ -3446,18 +3327,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetNumberVariable" }, "parameters": [ - "Object.Object3D::CenterZ() + OffsetZ + FollowFreeAreaZMax" + "VerticalAngleMax", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -3467,19 +3347,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the follow free area top border on Z axis of the object.", - "fullName": "Follow free area top border on Z axis", + "description": "the z position offset of the object.", + "fullName": "Z position offset", "functionType": "ExpressionAndCondition", - "group": "Third person camera configuration", - "name": "FollowFreeAreaZMax", - "sentence": "the follow free area top border on Z axis", + "group": "First person camera mouse mapper configuration", + "name": "OffsetZ", + "sentence": "the z position offset", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3490,7 +3370,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FollowFreeAreaZMax" + "OffsetZ" ] } ] @@ -3508,7 +3388,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], @@ -3517,8 +3397,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "FollowFreeAreaZMax", - "name": "SetFollowFreeAreaZMax", + "getterName": "OffsetZ", + "name": "SetOffsetZ", "sentence": "", "events": [ { @@ -3527,11 +3407,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyFollowFreeAreaZMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -3548,14 +3427,1772 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "supplementaryInformation": "MousePointerLock::FirstPersonPointerMapper", "type": "behavior" } ], "objectGroups": [] - }, + } + ], + "propertyDescriptors": [ { - "description": "the follow free area bottom border on Z axis of the object.", + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "name": "Object3D" + }, + { + "value": "200", + "type": "Number", + "unit": "Dimensionless", + "label": "Horizontal rotation speed factor", + "name": "HorizontalSpeed" + }, + { + "value": "100", + "type": "Number", + "unit": "Dimensionless", + "label": "Vertical rotation speed factor", + "name": "VerticalSpeed" + }, + { + "value": "-90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Minimum vertical camera angle", + "name": "VerticalAngleMin" + }, + { + "value": "90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Maximum vertical camera angle", + "name": "VerticalAngleMax" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Z position offset", + "name": "OffsetZ" + }, + { + "value": "true", + "type": "Boolean", + "label": "Lock the pointer on click", + "name": "ShouldLock" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Camera", + "extensionNamespace": "", + "fullName": "Third person camera", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", + "name": "ThirdPersonCamera", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Virtual Reality/94e95d2c318e1f3dc7151a351024e13c574e1e44669c6696aa107d60230073f6_Virtual Reality_3d_vision_eye_vr.svg", + "shortDescription": "Move the camera to look at an object from a given distance.", + "version": "1.7.1", + "description": [ + "Move the camera to look at an object from a given distance with a rotation and an elevation angles.", + "", + "It can be useful for:", + "- 3D platformer games ([open the project online](https://editor.gdevelop.io/?project=example://3d-platformer))", + "- 3D racing games ([open the project online](https://editor.gdevelop.io/?project=example://3d-car-coin-hunt))", + "- Orbit camera controls ([open the project online](https://editor.gdevelop.io/?project=example://3d-tile-based-city-builder))", + "- Isometric-like point of view ([open the project online](https://editor.gdevelop.io/?project=example://3d-road-crosser))" + ], + "origin": { + "identifier": "ThirdPersonCamera", + "name": "gdevelop-extension-store" + }, + "tags": [ + "3d", + "camera" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Move the camera to look at a position from a distance.", + "fullName": "Look at a position from a distance (deprecated)", + "functionType": "Action", + "name": "LookFromDistanceAtPosition", + "private": true, + "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_; _PARAM2_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "=", + "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "=", + "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", + "=", + "Distance * sin(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::TurnCameraTowardPosition" + }, + "parameters": [ + "", + "PositionX", + "PositionY", + "0", + "Layer", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Position on X axis", + "name": "PositionX", + "type": "expression" + }, + { + "description": "Position on Y axis", + "name": "PositionY", + "type": "expression" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at an object from a distance.", + "fullName": "Look at an object from a distance (deprecated)", + "functionType": "Action", + "name": "LookFromDistanceAtObject", + "private": true, + "sentence": "Move the camera of _PARAM5_ to look at _PARAM1_ from _PARAM2_ pixels with a rotation of _PARAM3_° and an elevation of _PARAM4_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition" + }, + "parameters": [ + "", + "Object.CenterX()", + "Object.CenterY()", + "Distance", + "RotationAngle", + "ElevationAngle", + "Layer", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at a position from a distance.", + "fullName": "Look at a position from a distance", + "functionType": "Action", + "name": "LookFromDistanceAtPosition3D", + "sentence": "Move the camera of _PARAM7_ to look at _PARAM1_; _PARAM2_; _PARAM3_ from _PARAM4_ pixels with a rotation of _PARAM5_° and an elevation of _PARAM6_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "=", + "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "=", + "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", + "=", + "PositionZ + Distance * sin(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationX" + }, + "parameters": [ + "", + "=", + "90 - ElevationAngle", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationY" + }, + "parameters": [ + "", + "=", + "0", + "Layer", + "" + ] + }, + { + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "=", + "RotationAngle", + "Layer", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Position on X axis", + "name": "PositionX", + "type": "expression" + }, + { + "description": "Position on Y axis", + "name": "PositionY", + "type": "expression" + }, + { + "description": "Position on Z axis", + "name": "PositionZ", + "type": "expression" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at an object from a distance.", + "fullName": "Look at an object from a distance", + "functionType": "Action", + "group": "Layers and cameras", + "name": "LookFromDistanceAtObject3D", + "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX()", + "Object.CenterY()", + "Object.Object3D::CenterZ()", + "Distance", + "RotationAngle", + "ElevationAngle", + "Layer", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "RotatedX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Cos", + "=", + "cos(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Sin", + "=", + "sin(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Cos * X - Sin * Y" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "Cos", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Sin", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Rotation angle", + "name": "RotationAngle", + "supplementaryInformation": "Tank::Tank", + "type": "expression" + }, + { + "description": "", + "name": "X", + "type": "expression" + }, + { + "description": "", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "RotatedY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Cos", + "=", + "cos(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Sin", + "=", + "sin(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Sin * X + Cos * Y" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "Cos", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Sin", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Rotation angle", + "name": "RotationAngle", + "supplementaryInformation": "Tank::Tank", + "type": "expression" + }, + { + "description": "", + "name": "X", + "type": "expression" + }, + { + "description": "", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Smoothly follow an object at a distance.", + "fullName": "Third person camera", + "name": "ThirdPersonCamera", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "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": "Update private properties through setters to check their values and initialize state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetRotationHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "RotationHalfwayDuration", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetElevationHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "ElevationHalfwayDuration", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetTranslationZHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "TranslationZHalfwayDuration", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasJustBeenCreated", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustBeenCreated", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraZ", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::JumpToTargetedRotation" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsCalledManually", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object. This action must be called after the object has moved for the frame.", + "fullName": "Move the camera closer", + "functionType": "Action", + "name": "MoveCameraCloser", + "sentence": "Move the camera closer to _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCalledManually", + "False", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object.", + "fullName": "Do move the camera closer", + "functionType": "Action", + "name": "DoMoveCameraCloser", + "private": true, + "sentence": "Do move the camera closer _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * (1 - speed)\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * (1 - speed)\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * (1 - speed)^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln((1 - speed)))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough." + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Z translation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraZ", + "<", + "Object.Behavior::FreeAreaZMin()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraZ", + "=", + "Object.Behavior::FreeAreaZMin() + (CameraZ - Object.Behavior::FreeAreaZMin()) * exp(TimeDelta() * TranslationZLogSpeed)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraZ", + ">", + "Object.Behavior::FreeAreaZMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraZ", + "=", + "Object.Behavior::FreeAreaZMax() + (CameraZ - Object.Behavior::FreeAreaZMax()) * exp(TimeDelta() * TranslationZLogSpeed)" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Z rotation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsElevatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedElevationAngle", + "=", + "Object.Object3D::RotationY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraRotationAngle", + "=", + "TargetedRotationAngle + 90 + RotationAngleOffset + AngleDifference(CameraAngle(Object.Layer()), TargetedRotationAngle + 90 + RotationAngleOffset) * exp(TimeDelta() * RotationLogSpeed)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraElevationAngle", + "=", + "TargetedElevationAngle + ElevationAngleOffset + AngleDifference(90 - Scene3D::CameraRotationX(Object.Layer()), TargetedElevationAngle + ElevationAngleOffset) * exp(TimeDelta() * ElevationLogSpeed)" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraRotationAngle, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraRotationAngle, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "CameraRotationAngle", + "CameraElevationAngle", + "", + "" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "CameraRotationAngle", + "type": "number", + "value": 0 + }, + { + "name": "CameraElevationAngle", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the camera all the way to the targeted angle.", + "fullName": "Rotate the camera all the way", + "functionType": "Action", + "name": "JumpToTargetedRotation", + "sentence": "Rotate the camera all the way to the targeted angle of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsElevatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedElevationAngle", + "=", + "Object.Object3D::RotationY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraAngle", + "=", + "TargetedRotationAngle + 90 + RotationAngleOffset" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraAngle, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraAngle, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "CameraAngle", + "Object.Object3D::RotationY() + ElevationAngleOffset", + "", + "" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "CameraAngle", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the camera rotation.", + "fullName": "Camera rotation", + "functionType": "ExpressionAndCondition", + "name": "RotationAngle", + "private": true, + "sentence": "the camera rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CameraAngle(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the camera all the way to the targeted angle.", + "fullName": "Rotate the camera all the way", + "functionType": "ActionWithOperator", + "getterName": "RotationAngle", + "name": "SetCameraRotation", + "sentence": "Rotate the camera all the way to the targeted angle of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(Value, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(Value, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "Value", + "Object.Object3D::RotationY() + ElevationAngleOffset", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time for rotation of the object.", + "fullName": "Halfway time for rotation", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "RotationHalfwayDuration", + "sentence": "the halfway time for rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "RotationHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RotationHalfwayDuration", + "name": "SetRotationHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "RotationHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "RotationLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time for elevation rotation of the object.", + "fullName": "Halfway time for elevation rotation", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "ElevationHalfwayDuration", + "sentence": "the halfway time for elevation rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ElevationHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ElevationHalfwayDuration", + "name": "SetElevationHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time on Z axis of the object.", + "fullName": "Halfway time on Z axis", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "TranslationZHalfwayDuration", + "sentence": "the halfway time on Z axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TranslationZHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TranslationZHalfwayDuration", + "name": "SetTranslationZHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TranslationZHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TranslationZLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area bottom border Z.", + "fullName": "Free area Z min", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaZMin", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Object3D::CenterZ() + OffsetZ - FollowFreeAreaZMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area top border Z.", + "fullName": "Free area Z max", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaZMax", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Object3D::CenterZ() + OffsetZ + FollowFreeAreaZMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the follow free area top border on Z axis of the object.", + "fullName": "Follow free area top border on Z axis", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "FollowFreeAreaZMax", + "sentence": "the follow free area top border on Z axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FollowFreeAreaZMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FollowFreeAreaZMax", + "name": "SetFollowFreeAreaZMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FollowFreeAreaZMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the follow free area bottom border on Z axis of the object.", "fullName": "Follow free area bottom border on Z axis", "functionType": "ExpressionAndCondition", "group": "Third person camera configuration", @@ -3608,11 +5245,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyFollowFreeAreaZMin" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaZMin", "=", "Value" ] @@ -3689,11 +5325,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyDistance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Distance", "=", "Value" ] @@ -3770,11 +5405,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetX", "=", "Value" ] @@ -3851,11 +5485,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetY", "=", "Value" ] @@ -3932,11 +5565,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyOffsetZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -4013,11 +5645,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyRotationAngleOffset" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RotationAngleOffset", "=", "Value" ] @@ -4094,14 +5725,103 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyElevationAngleOffset" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ElevationAngleOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the targeted camera rotation angle of the object. When this angle is set, the camera follow this value instead of the object angle.", + "fullName": "Targeted rotation angle", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "TargetedRotationAngle", + "sentence": "the targeted camera rotation angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TargetedRotationAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TargetedRotationAngle", + "name": "SetTargetedRotationAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", "=", "Value" ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "False", + "" + ] } ] } @@ -4127,8 +5847,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -4139,19 +5857,26 @@ "type": "Number", "unit": "Second", "label": "Halfway time for rotation", - "description": "", "group": "Catch-up speed", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "RotationHalfwayDuration" }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Halfway time for elevation rotation", + "group": "Catch-up speed", + "quickCustomizationVisibility": "hidden", + "name": "ElevationHalfwayDuration" + }, { "value": "0.125", "type": "Number", "unit": "Second", "label": "Halfway time on Z axis", - "description": "", "group": "Catch-up speed", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "TranslationZHalfwayDuration" }, { @@ -4159,9 +5884,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera distance", - "description": "", "group": "Position", - "extraInformation": [], "name": "Distance" }, { @@ -4169,9 +5892,7 @@ "type": "Number", "unit": "Pixel", "label": "Lateral distance offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetX" }, { @@ -4179,9 +5900,7 @@ "type": "Number", "unit": "Pixel", "label": "Ahead distance offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetY" }, { @@ -4189,9 +5908,7 @@ "type": "Number", "unit": "Pixel", "label": "Z offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -4199,9 +5916,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation angle offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "RotationAngleOffset" }, { @@ -4209,9 +5924,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Elevation angle offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "ElevationAngleOffset" }, { @@ -4219,10 +5932,9 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border on Z axis", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, + "quickCustomizationVisibility": "hidden", "name": "FollowFreeAreaZMax" }, { @@ -4230,19 +5942,15 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border on Z axis", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, + "quickCustomizationVisibility": "hidden", "name": "FollowFreeAreaZMin" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RotationLogSpeed" }, @@ -4250,9 +5958,13 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, + "name": "ElevationLogSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", "hidden": true, "name": "TranslationZLogSpeed" }, @@ -4260,9 +5972,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" }, @@ -4271,9 +5980,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraZ" }, @@ -4281,11 +5987,40 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustBeenCreated" + }, + { + "value": "true", + "type": "Boolean", + "label": "Automatically rotate the camera with the object", + "quickCustomizationVisibility": "hidden", + "name": "IsRotatingWithObject" + }, + { + "value": "false", + "type": "Boolean", + "label": "Automatically rotate the camera with the object (elevation)", + "quickCustomizationVisibility": "hidden", + "name": "IsElevatingWithObject" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Targeted camera rotation angle", + "description": "When this angle is set, the camera follow this value instead of the object angle.", + "hidden": true, + "name": "TargetedRotationAngle" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Targeted camera rotation angle", + "description": "When this angle is set, the camera follow this value instead of the object angle.", + "hidden": true, + "name": "TargetedElevationAngle" } ], "sharedPropertyDescriptors": [] @@ -4298,12 +6033,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.2", + "version": "1.4.0", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -4348,12 +6084,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -4375,12 +6111,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -4402,11 +6138,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -4439,11 +6176,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -4486,21 +6224,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -4544,20 +6284,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -4765,22 +6507,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "IsChecked", + "False", + "" ] } ] @@ -4790,22 +6534,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsChecked", + "True", + "" ] } ] @@ -4846,11 +6592,11 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousIsChecked", + "False", "" ] } @@ -4873,12 +6619,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -4888,11 +6634,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -4916,11 +6663,12 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -4960,8 +6708,6 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], @@ -4971,27 +6717,18 @@ "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "name": "PreviousIsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasChecked" } @@ -5037,11 +6774,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5050,11 +6786,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5088,12 +6823,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -5103,11 +6838,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -5124,12 +6860,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -5152,12 +6888,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -5167,11 +6903,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -5190,12 +6925,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -5227,11 +6962,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -5261,23 +6995,22 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -5319,11 +7052,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5338,11 +7070,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -5371,20 +7102,20 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5393,11 +7124,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5409,20 +7139,20 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5431,11 +7161,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5448,20 +7177,20 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5470,11 +7199,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5486,20 +7214,20 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5508,11 +7236,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5547,11 +7274,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -5563,11 +7289,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5576,11 +7301,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5593,11 +7317,10 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5605,11 +7328,10 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5618,11 +7340,10 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5704,22 +7425,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -5754,11 +7473,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5803,11 +7521,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5852,11 +7569,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5901,11 +7617,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5927,11 +7642,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5976,11 +7690,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -6025,11 +7738,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -6109,8 +7821,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -6118,8 +7828,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -6134,9 +7842,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -6144,9 +7849,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -6154,9 +7856,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -6164,9 +7863,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -6187,6 +7883,100 @@ "fullName": "Toggle switch", "isUsingLegacyInstancesRenderer": true, "name": "SpriteToggleSwitch", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "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": [], "eventsFunctions": [ { "fullName": "", @@ -6241,10 +8031,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -6262,11 +8054,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -6277,10 +8070,12 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -6298,10 +8093,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -6369,20 +8165,22 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -6400,11 +8198,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -6415,19 +8214,21 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -6445,11 +8246,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -6682,10 +8484,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -6708,10 +8512,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -7118,10 +8924,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -7144,10 +8952,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -7201,143 +9011,45 @@ } ], "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "name": "IsChecked" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "PreviousIsChecked" - } - ], - "objects": [ - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" } ], - "effects": [] + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "Is checked", + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "It's used to detect a change at hot reload.", + "hidden": true, + "name": "PreviousIsChecked" } ], - "instances": [] + "variants": [] } ] }, @@ -7346,6 +9058,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Hexagonal grid", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhleGFnb24tbXVsdGlwbGUtb3V0bGluZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LjM3IDRMMTAuNzggNi41TDkuMzcgOUg2LjYzTDUuMjMgNi41TDYuNjMgNEg5LjM3TTEwLjI1IDJINS43NUM1LjU2IDIgNS4zOSAyLjExIDUuMzEgMi4yNkwzLjA5IDYuMjJMMyA2LjVMMy4wOSA2Ljc4TDUuMzEgMTAuNzRDNS4zOSAxMC44OSA1LjU2IDExIDUuNzUgMTFIMTAuMjVDMTAuNDQgMTEgMTAuNjEgMTAuODkgMTAuNjkgMTAuNzRMMTIuOTEgNi43OEwxMyA2LjVMMTIuOTEgNi4yMkwxMC42OSAyLjI2QzEwLjYxIDIuMTEgMTAuNDQgMiAxMC4yNSAyTTE4LjYyIDkuNUwyMCAxMkwxOC42MiAxNC41SDE1Ljg4TDE0LjUgMTJMMTUuODggOS41SDE4LjYyTTE5LjUgNy41SDE1QzE0LjgxIDcuNSAxNC42NCA3LjYxIDE0LjU2IDcuNzZMMTIuMzQgMTEuNzJMMTIuMjUgMTJMMTIuMzQgMTIuMjhMMTQuNTYgMTYuMjRDMTQuNjQgMTYuMzkgMTQuODEgMTYuNSAxNSAxNi41SDE5LjVDMTkuNjkgMTYuNSAxOS44NiAxNi4zOSAxOS45NCAxNi4yNEwyMi4xNiAxMi4yOEwyMi4yNSAxMkwyMi4xNiAxMS43MkwxOS45NCA3Ljc2QzE5Ljg2IDcuNjEgMTkuNjkgNy41IDE5LjUgNy41TTkuMzcgMTVMMTAuNzggMTcuNUw5LjM3IDIwSDYuNjNMNS4yMyAxNy41TDYuNjMgMTVIOS4zN00xMC4yNSAxM0g1Ljc1QzUuNTYgMTMgNS4zOSAxMy4xMSA1LjMxIDEzLjI2TDMuMDkgMTcuMjJMMyAxNy41TDMuMDkgMTcuNzhMNS4zMSAyMS43NEM1LjM5IDIxLjg5IDUuNTYgMjIgNS43NSAyMkgxMC4yNUMxMC40NCAyMiAxMC42MSAyMS44OSAxMC42OSAyMS43NEwxMi45MSAxNy43OEwxMyAxNy41TDEyLjkxIDE3LjIyTDEwLjY5IDEzLjI2QzEwLjYxIDEzLjExIDEwLjQ0IDEzIDEwLjI1IDEzWiIgLz48L3N2Zz4=", "name": "HexagonalGrid", @@ -7691,6 +9404,7 @@ "category": "", "extensionNamespace": "", "fullName": "Toolbar", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "Toolbar", @@ -7718,210 +9432,458 @@ "fullName": "", "isUsingLegacyInstancesRenderer": false, "name": "Toolbar", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ + "assetStoreId": "", + "name": "LumberButton", + "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "", + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "folded": true, + "name": "BuildingName", + "type": "string", + "value": "Lumber" + } + ], + "effects": [ + { + "effectType": "Outline", + "name": "Black", + "doubleParameters": { + "padding": 5, + "thickness": 5 + }, + "stringParameters": { + "color": "92;63;33" + }, + "booleanParameters": {} + }, + { + "effectType": "Outline", + "name": "White", + "doubleParameters": { + "padding": 5, + "thickness": 5 + }, + "stringParameters": { + "color": "255;174;93" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "content": { + "IsChecked": false + }, + "childrenContent": { + "State": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenUnchecked" - }, - "parameters": [ - "Button", - "" + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Lumber.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "Toolbar::Toolbar::SetPropertySelectedTool" - }, - "parameters": [ - "Object", - "=", - "\"None\"" + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\LumberSelected.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } ] } ] - }, + } + } + }, + { + "assetStoreId": "", + "name": "MineButton", + "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "", + "variables": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "folded": true, + "name": "BuildingName", + "type": "string", + "value": "Mine" + } + ], + "effects": [ + { + "effectType": "Outline", + "name": "Black", + "doubleParameters": { + "padding": 5, + "thickness": 5 }, - "comment": "Make buttons act as radio buttons." + "stringParameters": { + "color": "92;63;33" + }, + "booleanParameters": {} }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenChecked" - }, - "parameters": [ - "Button", - "" - ] - }, + "effectType": "Outline", + "name": "White", + "doubleParameters": { + "padding": 5, + "thickness": 5 + }, + "stringParameters": { + "color": "255;174;93" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "content": { + "IsChecked": false + }, + "childrenContent": { + "State": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "Button" + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Mine.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } ] }, { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenChecked" - }, - "parameters": [ - "Button", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" - }, - "parameters": [ - "Button", - "no", - "" + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\MineSelected.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } ] } ] - }, + } + } + }, + { + "assetStoreId": "", + "name": "HouseButton", + "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "", + "variables": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "folded": true, + "name": "BuildingName", + "type": "string", + "value": "House" + } + ], + "effects": [ + { + "effectType": "Outline", + "name": "Black", + "doubleParameters": { + "padding": 5, + "thickness": 5 }, - "comment": "Handle dragging" + "stringParameters": { + "color": "19;87;48" + }, + "booleanParameters": {} }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ + "effectType": "Outline", + "name": "White", + "doubleParameters": { + "padding": 5, + "thickness": 5 + }, + "stringParameters": { + "color": "58;255;140" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "content": { + "IsChecked": false + }, + "childrenContent": { + "State": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "Button", - "", - "", - "" - ] - } - ], - "actions": [], - "events": [ + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ { - "type": { - "value": "AjoutObjConcern" + "hasCustomCollisionMask": false, + "image": "assets\\House.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 }, - "parameters": [ - "", - "Button" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 }, - "parameters": [ - "Button", - "no", - "" - ] + "customCollisionMask": [] } ] - }, + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + "hasCustomCollisionMask": false, + "image": "assets\\HouseSelected.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 }, - "parameters": [ - "Button", - "", - "" - ] + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] } ] } ] } ] + } + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "HouseButton" + }, + { + "objectName": "MineButton" + }, + { + "objectName": "LumberButton" + } + ] + }, + "objectsGroups": [ + { + "name": "Button", + "objects": [ + { + "name": "LumberButton" + }, + { + "name": "MineButton" }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Select a tool" - }, + "name": "HouseButton" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "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": 0, + "layer": "", + "name": "HouseButton", + "persistentUuid": "491a9ff9-f45d-41a7-a90c-afd1d015b80d", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "MineButton", + "persistentUuid": "4b26eb6b-f110-4cd3-901e-8eb67cb8aa8b", + "width": 0, + "x": 0, + "y": 180, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "LumberButton", + "persistentUuid": "e33efc5b-2344-4f63-b20e-183c17ca6fa7", + "width": 0, + "x": 0, + "y": 360, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" + "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenUnchecked" }, "parameters": [ "Button", @@ -7937,7 +9899,7 @@ "parameters": [ "Object", "=", - "Button.BuildingName" + "\"None\"" ] } ] @@ -7952,205 +9914,37 @@ "textG": 0, "textR": 0 }, - "comment": "Hover effect" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsHovered" - }, - "parameters": [ - "Button", - "" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" - }, - "parameters": [ - "Button", - "" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"Black\"", - "" - ] - }, - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"White\"", - "yes" - ] - } - ] + "comment": "Make buttons act as radio buttons." }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsHovered" - }, - "parameters": [ - "Button", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" - }, - "parameters": [ - "Button", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"Black\"", - "yes" - ] - }, - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"White\"", - "no" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Toolbar::Toolbar", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the selected tool of the object.", - "fullName": "Selected tool", - "functionType": "ExpressionAndCondition", - "group": "Toolbar configuration", - "name": "SelectedTool", - "sentence": "the selected tool", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "SelectedTool" - ] - } - ] - } - ], - "expressionType": { - "supplementaryInformation": "[\"None\",\"House\",\"Mine\",\"Lumber\"]", - "type": "stringWithSelector" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Toolbar::Toolbar", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "SelectedTool", - "name": "SetSelectedTool", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "Toolbar::Toolbar::SetPropertySelectedTool" + "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenChecked" }, "parameters": [ - "Object", - "=", - "Value" + "Button", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + "value": "AjoutObjConcern" }, "parameters": [ - "Button", - "no", - "" + "", + "Button" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "VarObjetTxt" + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenChecked" }, "parameters": [ "Button", - "BuildingName", - "=", - "Value" + "" ] } ], @@ -8161,477 +9955,399 @@ }, "parameters": [ "Button", - "yes", + "no", "" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Toolbar::Toolbar", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "None", - "type": "Choice", - "label": "Selected tool", - "description": "", - "group": "", - "extraInformation": [ - "None", - "House", - "Mine", - "Lumber" - ], - "hidden": true, - "name": "SelectedTool" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "LumberButton", - "type": "SpriteToggleSwitch::SpriteToggleSwitch", - "variables": [ - { - "folded": true, - "name": "BuildingName", - "type": "string", - "value": "Lumber" - } - ], - "effects": [ + }, { - "effectType": "Outline", - "name": "Black", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "92;63;33" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "booleanParameters": {} + "comment": "Handle dragging" }, { - "effectType": "Outline", - "name": "White", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "255;174;93" - }, - "booleanParameters": {} - } - ], - "behaviors": [], - "content": { - "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "Button", + "", + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "hasCustomCollisionMask": false, - "image": "assets\\Lumber.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 + "type": { + "value": "AjoutObjConcern" }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 + "parameters": [ + "", + "Button" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "customCollisionMask": [] + "parameters": [ + "Button", + "no", + "" + ] } ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "hasCustomCollisionMask": false, - "image": "assets\\LumberSelected.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "customCollisionMask": [] + "parameters": [ + "Button", + "", + "" + ] } ] } ] } ] - } - } - }, - { - "assetStoreId": "", - "name": "MineButton", - "type": "SpriteToggleSwitch::SpriteToggleSwitch", - "variables": [ - { - "folded": true, - "name": "BuildingName", - "type": "string", - "value": "Mine" - } - ], - "effects": [ + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Select a tool" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" + }, + "parameters": [ + "Button", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Toolbar::Toolbar::SetPropertySelectedTool" + }, + "parameters": [ + "Object", + "=", + "Button.BuildingName" + ] + } + ] + }, { - "effectType": "Outline", - "name": "Black", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "92;63;33" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "booleanParameters": {} + "comment": "Hover effect" }, { - "effectType": "Outline", - "name": "White", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "255;174;93" - }, - "booleanParameters": {} - } - ], - "behaviors": [], - "content": { - "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\Mine.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsHovered" + }, + "parameters": [ + "Button", + "" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" + }, + "parameters": [ + "Button", + "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Button", + "Effect", + "\"Black\"", + "" + ] }, { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\MineSelected.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Button", + "Effect", + "\"White\"", + "yes" ] } ] - } - } - }, - { - "assetStoreId": "", - "name": "HouseButton", - "type": "SpriteToggleSwitch::SpriteToggleSwitch", - "variables": [ + }, { - "folded": true, - "name": "BuildingName", - "type": "string", - "value": "House" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsHovered" + }, + "parameters": [ + "Button", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" + }, + "parameters": [ + "Button", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Button", + "Effect", + "\"Black\"", + "yes" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Button", + "Effect", + "\"White\"", + "no" + ] + } + ] } ], - "effects": [ + "parameters": [ { - "effectType": "Outline", - "name": "Black", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "19;87;48" - }, - "booleanParameters": {} - }, + "description": "Object", + "name": "Object", + "supplementaryInformation": "Toolbar::Toolbar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the selected tool of the object.", + "fullName": "Selected tool", + "functionType": "ExpressionAndCondition", + "group": "Toolbar configuration", + "name": "SelectedTool", + "sentence": "the selected tool", + "events": [ { - "effectType": "Outline", - "name": "White", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "58;255;140" - }, - "booleanParameters": {} + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "SelectedTool" + ] + } + ] } ], - "behaviors": [], - "content": { - "IsChecked": false + "expressionType": { + "supplementaryInformation": "[\"None\",\"House\",\"Mine\",\"Lumber\"]", + "type": "stringWithSelector" }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Toolbar::Toolbar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SelectedTool", + "name": "SetSelectedTool", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\House.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } + "type": { + "value": "Toolbar::Toolbar::SetPropertySelectedTool" + }, + "parameters": [ + "Object", + "=", + "Value" ] }, { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\HouseSelected.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + }, + "parameters": [ + "Button", + "no", + "" ] } ] - } - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "HouseButton" - }, - { - "objectName": "MineButton" - }, - { - "objectName": "LumberButton" - } - ] - }, - "objectsGroups": [ - { - "name": "Button", - "objects": [ - { - "name": "LumberButton" - }, - { - "name": "MineButton" }, { - "name": "HouseButton" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Button", + "BuildingName", + "=", + "Value" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + }, + "parameters": [ + "Button", + "yes", + "" + ] + } + ] } - ] - } - ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "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": "Toolbar::Toolbar", + "type": "object" } ], - "effects": [] + "objectGroups": [] } ], - "instances": [ - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "HouseButton", - "persistentUuid": "491a9ff9-f45d-41a7-a90c-afd1d015b80d", - "width": 0, - "x": 0, - "y": 0, - "zOrder": 11, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "MineButton", - "persistentUuid": "4b26eb6b-f110-4cd3-901e-8eb67cb8aa8b", - "width": 0, - "x": 0, - "y": 180, - "zOrder": 12, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, + "propertyDescriptors": [ { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "LumberButton", - "persistentUuid": "e33efc5b-2344-4f63-b20e-183c17ca6fa7", - "width": 0, - "x": 0, - "y": 360, - "zOrder": 13, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "None", + "type": "Choice", + "label": "Selected tool", + "extraInformation": [ + "None", + "House", + "Mine", + "Lumber" + ], + "hidden": true, + "name": "SelectedTool" } - ] + ], + "variants": [] } ] }, @@ -8640,6 +10356,7 @@ "category": "", "extensionNamespace": "", "fullName": "Floating object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "FloatingObject", @@ -8729,8 +10446,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -8741,9 +10456,6 @@ "type": "Number", "unit": "Second", "label": "Duration", - "description": "", - "group": "", - "extraInformation": [], "name": "Duration" }, { @@ -8751,9 +10463,6 @@ "type": "Number", "unit": "Pixel", "label": "Displacement on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "DeltaY" } ], @@ -8763,6 +10472,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file From 7753b97414f3dfe74c99bd37d044a4f0bc71735a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 13:58:56 +0200 Subject: [PATCH 2/7] Add shadows --- .../3d-tile-based-city-builder.json | 52 +++++++++++++------ 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json b/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json index 383f33a78..587cc7c9c 100644 --- a/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json +++ b/examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json @@ -465,7 +465,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.41296579374381426, + "zoomFactor": 0.42689113662070355, "windowMask": false }, "objectsGroups": [ @@ -912,7 +912,9 @@ "rightFaceResourceRepeat": false, "topFaceResourceRepeat": false, "bottomFaceResourceRepeat": false, - "materialType": "Basic" + "materialType": "StandardWithoutMetalness", + "isReceivingShadow": true, + "isCastingShadow": true } }, { @@ -927,8 +929,8 @@ "crossfadeDuration": 0, "depth": 120, "height": 120, - "isCastingShadow": false, - "isReceivingShadow": false, + "isCastingShadow": true, + "isReceivingShadow": true, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Building Village.glb", @@ -952,8 +954,8 @@ "crossfadeDuration": 0, "depth": 120, "height": 120, - "isCastingShadow": false, - "isReceivingShadow": false, + "isCastingShadow": true, + "isReceivingShadow": true, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Building Mine.glb", @@ -977,8 +979,8 @@ "crossfadeDuration": 0, "depth": 120, "height": 120, - "isCastingShadow": false, - "isReceivingShadow": false, + "isCastingShadow": true, + "isReceivingShadow": true, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Building House.glb", @@ -1002,8 +1004,8 @@ "crossfadeDuration": 0, "depth": 120, "height": 120, - "isCastingShadow": false, - "isReceivingShadow": false, + "isCastingShadow": true, + "isReceivingShadow": true, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Grass.glb", @@ -1108,6 +1110,15 @@ "=", "\"Wood: \" + Lumber" ] + }, + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "5" + ] } ] }, @@ -1927,24 +1938,33 @@ "effectType": "Scene3D::DirectionalLight", "name": "DirectionalLight", "doubleParameters": { - "elevation": 70, + "distanceFromCamera": 1000, + "elevation": 60, + "frustumSize": 2000, "intensity": 0.66, - "rotation": 20 + "minimumShadowBias": 0, + "rotation": 30 }, "stringParameters": { "color": "255;255;255", "top": "Z+" }, - "booleanParameters": {} + "booleanParameters": { + "isCastingShadow": true + } }, { - "effectType": "Scene3D::AmbientLight", + "effectType": "Scene3D::HemisphereLight", "name": "AmbiantLight", "doubleParameters": { - "intensity": 0.33 + "elevation": 90, + "intensity": 0.5, + "rotation": 0 }, "stringParameters": { - "color": "255;255;255" + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" }, "booleanParameters": {} } From 13b3346d5415f932e42dcbeff3399853a4134297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 14:17:31 +0200 Subject: [PATCH 3/7] Add shadows --- examples/3d-road-crosser/3d-road-crosser.json | 1699 +++++++---------- 1 file changed, 670 insertions(+), 1029 deletions(-) diff --git a/examples/3d-road-crosser/3d-road-crosser.json b/examples/3d-road-crosser/3d-road-crosser.json index 30c3f0b88..b297e5b5b 100644 --- a/examples/3d-road-crosser/3d-road-crosser.json +++ b/examples/3d-road-crosser/3d-road-crosser.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 224, + "build": 236, "major": 5, "minor": 5, "revision": 0 @@ -1307,16 +1307,7 @@ "TweenBehavior": "Tween", "JumpHeight": 70, "GridСellSize": 100, - "JumpDuration": 0.2, - "propertiesQuickCustomizationVisibilities": { - "GridСellSize": "hidden", - "JumpDownDuration": "hidden", - "JumpHeight": "visible", - "JumpUpDuration": "visible", - "Object3D": "hidden", - "RotateDuration": "hidden", - "TweenBehavior": "hidden" - } + "JumpDuration": 0.2 }, { "name": "SmoothCamera", @@ -1368,23 +1359,7 @@ "DownwardSpeedMax": 9000, "OldX": 9000.000000007454, "OldY": 9000.000000007454, - "IsCalledManually": false, - "propertiesQuickCustomizationVisibilities": { - "DownwardSpeed": "hidden", - "DownwardSpeedMax": "hidden", - "FollowOnX": "hidden", - "FollowOnY": "hidden", - "LeftwardSpeed": "hidden", - "LeftwardSpeedMax": "hidden", - "LogDownwardSpeed": "hidden", - "LogLeftwardSpeed": "hidden", - "LogRightwardSpeed": "hidden", - "LogUpwardSpeed": "hidden", - "RightwardSpeed": "hidden", - "RightwardSpeedMax": "hidden", - "UpwardSpeed": "hidden", - "UpwardSpeedMax": "hidden" - } + "IsCalledManually": false }, { "name": "Tween", @@ -1396,6 +1371,8 @@ "crossfadeDuration": 0.5, "depth": 70, "height": 70, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Chicken.glb", @@ -1465,6 +1442,8 @@ "crossfadeDuration": 0, "depth": 150, "height": 150, + "isCastingShadow": true, + "isReceivingShadow": true, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Road Straight.glb", @@ -1543,7 +1522,9 @@ "rightFaceResourceRepeat": false, "topFaceResourceRepeat": false, "bottomFaceResourceRepeat": false, - "materialType": "StandardWithoutMetalness" + "materialType": "StandardWithoutMetalness", + "isCastingShadow": true, + "isReceivingShadow": true } }, { @@ -1558,6 +1539,8 @@ "crossfadeDuration": 0, "depth": 311, "height": 311, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Common Tree 3.glb", @@ -1581,6 +1564,8 @@ "crossfadeDuration": 0, "depth": 251, "height": 251, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Common Tree 4.glb", @@ -1610,6 +1595,8 @@ "crossfadeDuration": 0, "depth": 74, "height": 74, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Sedan Sports.glb", @@ -1716,6 +1703,8 @@ "crossfadeDuration": 0, "depth": 74, "height": 74, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Sedan.glb", @@ -1745,6 +1734,8 @@ "crossfadeDuration": 0, "depth": 79, "height": 79, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Van.glb", @@ -1774,6 +1765,8 @@ "crossfadeDuration": 0, "depth": 80, "height": 80, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Suv.glb", @@ -1803,6 +1796,8 @@ "crossfadeDuration": 0, "depth": 95, "height": 95, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Delivery.glb", @@ -1846,7 +1841,9 @@ "rightFaceResourceRepeat": false, "topFaceResourceRepeat": false, "bottomFaceResourceRepeat": false, - "materialType": "StandardWithoutMetalness" + "materialType": "StandardWithoutMetalness", + "isCastingShadow": true, + "isReceivingShadow": true } }, { @@ -1938,6 +1935,8 @@ "crossfadeDuration": 0, "depth": 31, "height": 31, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Coin.glb", @@ -2027,6 +2026,8 @@ "crossfadeDuration": 0, "depth": 31, "height": 31, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Coin.glb", @@ -2218,6 +2219,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "RetryButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -2313,6 +2315,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "SubmitScoreButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -2408,6 +2411,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "PlayButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [ { "folded": true, @@ -2510,6 +2514,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "ShopButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [ { "folded": true, @@ -2612,6 +2617,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "LeaderboardButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [ { "folded": true, @@ -2758,6 +2764,8 @@ "crossfadeDuration": 0, "depth": 70, "height": 70, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Chicken.glb", @@ -2926,6 +2934,8 @@ "crossfadeDuration": 0.5, "depth": 70, "height": 70, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "68ebd8be44683b6eb5b6f4a06e0c7f9bb9a40c6ab5f8c291ab1cb93187fffe76_Cat.glb", @@ -3031,6 +3041,8 @@ "crossfadeDuration": 0, "depth": 70, "height": 70, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "68ebd8be44683b6eb5b6f4a06e0c7f9bb9a40c6ab5f8c291ab1cb93187fffe76_Cat.glb", @@ -3241,6 +3253,8 @@ "crossfadeDuration": 0.5, "depth": 70, "height": 70, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "252e8301a5ca89e9a04f27e3081351827df4c70359318bd5a0e9aac8f08998b6_Dog.glb", @@ -3346,6 +3360,8 @@ "crossfadeDuration": 0, "depth": 70, "height": 70, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "252e8301a5ca89e9a04f27e3081351827df4c70359318bd5a0e9aac8f08998b6_Dog.glb", @@ -3429,6 +3445,8 @@ "crossfadeDuration": 0, "depth": 31, "height": 31, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Coin.glb", @@ -3513,6 +3531,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "BuyButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [ { "folded": true, @@ -3672,6 +3691,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "BackButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -3767,6 +3787,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "SettingsButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [ { "folded": true, @@ -3869,6 +3890,7 @@ "assetStoreId": "84dcf81d35efee74a6cab51b4103acc5443e7f39fd7366e2ac58641e60323b4a", "name": "SquareGreenSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -4050,6 +4072,7 @@ "assetStoreId": "", "name": "NewScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -7827,18 +7850,38 @@ "effects": [ { "effectType": "Scene3D::HemisphereLight", - "name": "Effect", + "name": "HemisphereLight", "doubleParameters": { "elevation": 45, - "intensity": 2, + "intensity": 1.5, "rotation": 0 }, "stringParameters": { - "groundColor": "127;127;127", + "groundColor": "128;128;128", "skyColor": "255;255;255", "top": "Z+" }, "booleanParameters": {} + }, + { + "effectType": "Scene3D::DirectionalLight", + "name": "DirectionalLight", + "doubleParameters": { + "distanceFromCamera": 1500, + "elevation": 45, + "frustumSize": 4000, + "intensity": 1, + "minimumShadowBias": 0, + "rotation": 225 + }, + "stringParameters": { + "color": "255;255;255", + "shadowQuality": "medium", + "top": "Z+" + }, + "booleanParameters": { + "isCastingShadow": true + } } ] }, @@ -8079,6 +8122,7 @@ "category": "Input", "extensionNamespace": "", "fullName": "Screen Orientation Checker", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", "name": "ScreenOrientationChecker", @@ -8166,6 +8210,260 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ScreenOrientationChecker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "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": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 198, + "y": 62, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], "eventsFunctions": [ { "fullName": "", @@ -8734,9 +9032,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsShown" }, @@ -8745,265 +9040,10 @@ "type": "Boolean", "label": "Force show the screen", "description": "Use this to test the screen in your game", - "group": "", - "extraInformation": [], "name": "IsForceShown" } ], - "objects": [ - { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Text", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 4, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "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": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - { - "assetStoreId": "", - "name": "BackgroundPainter", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Icon", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "assets/rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Text" - }, - { - "objectName": "BackgroundPainter" - }, - { - "objectName": "Icon" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "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": 35, - "keepRatio": true, - "layer": "", - "name": "Text", - "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", - "width": 207, - "x": 104, - "y": 120, - "zOrder": 15, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "BackgroundPainter", - "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", - "width": 0, - "x": 38, - "y": 17, - "zOrder": 14, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "Icon", - "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", - "width": 0, - "x": 198, - "y": 62, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ] + "variants": [] } ] }, @@ -9012,6 +9052,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -10161,8 +10202,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10170,8 +10209,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -10186,9 +10223,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10196,9 +10230,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10206,9 +10237,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10216,9 +10244,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10731,8 +10756,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -10742,8 +10765,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -10753,9 +10774,7 @@ "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -10764,16 +10783,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -11199,8 +11215,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -11210,9 +11224,7 @@ "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -11221,16 +11233,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -12633,8 +12642,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -12644,8 +12651,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -12655,9 +12660,7 @@ "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -12666,16 +12669,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -12684,23 +12684,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -12743,7 +12739,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -12787,9 +12782,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -12797,17 +12790,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -12820,9 +12809,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -12830,9 +12816,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -12840,9 +12823,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -12850,8 +12830,6 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "NoTween", "FadeIn", @@ -12864,9 +12842,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -13843,8 +13818,6 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -13854,8 +13827,6 @@ "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -13866,9 +13837,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -13878,7 +13847,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -13886,9 +13854,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -13896,9 +13862,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -13906,16 +13870,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13958,7 +13919,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14001,8 +13961,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -14980,8 +14938,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -14991,8 +14947,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -15002,9 +14956,7 @@ "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -15013,16 +14965,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -15030,9 +14979,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -15040,16 +14987,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15092,7 +15036,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15135,8 +15078,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -15156,6 +15097,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Linear Movement", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJheS1zdGFydC1hcnJvdyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMywxMkwxOSwxNlYxM0g2LjgzQzYuNDIsMTQuMTcgNS4zMSwxNSA0LDE1QTMsMyAwIDAsMSAxLDEyQTMsMyAwIDAsMSA0LDlDNS4zMSw5IDYuNDIsOS44MyA2LjgzLDExSDE5VjhMMjMsMTJaIiAvPjwvc3ZnPg==", "name": "LinearMovement", @@ -15237,9 +15179,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Speed on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "SpeedX" }, { @@ -15247,9 +15186,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Speed on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "SpeedY" } ], @@ -15307,9 +15243,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Speed", - "description": "", - "group": "", - "extraInformation": [], "name": "Speed" } ], @@ -15323,6 +15256,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": "", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", @@ -15806,36 +15740,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], "name": "Value" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], "name": "StepSize" } ], @@ -16913,8 +16835,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -16922,8 +16842,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -16938,9 +16856,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -16948,9 +16863,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -16958,9 +16870,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -16968,9 +16877,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -16991,6 +16897,173 @@ "fullName": "Slider", "isUsingLegacyInstancesRenderer": true, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "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": [], "eventsFunctions": [ { "fullName": "", @@ -18853,7 +18926,6 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", @@ -18865,7 +18937,6 @@ "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", @@ -18877,7 +18948,6 @@ "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", @@ -18889,7 +18959,6 @@ "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", @@ -18901,54 +18970,42 @@ "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], "name": "LabelMargin" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], "name": "MinValue" }, { "value": "100", "type": "Number", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], "name": "MaxValue" }, { "value": "1", "type": "Number", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], "name": "StepSize" }, { "value": "50", "type": "Number", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], "name": "InitialValue" }, { @@ -18956,8 +19013,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -18966,7 +19021,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], @@ -18978,7 +19032,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], @@ -18990,7 +19043,6 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], @@ -18998,173 +19050,7 @@ "name": "ShowLabel" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Thumb" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Background" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "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": [] + "variants": [] } ] }, @@ -19173,6 +19059,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Stick objects to others", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXN0aWNrZXItb3V0bGluZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik01LjUgMkMzLjYgMiAyIDMuNiAyIDUuNVYxOC41QzIgMjAuNCAzLjYgMjIgNS41IDIySDE2TDIyIDE2VjUuNUMyMiAzLjYgMjAuNCAyIDE4LjUgMkg1LjVNNS44IDRIMTguM0MxOS4zIDQgMjAuMSA0LjggMjAuMSA1LjhWMTVIMTguNkMxNi43IDE1IDE1LjEgMTYuNiAxNS4xIDE4LjVWMjBINS44QzQuOCAyMCA0IDE5LjIgNCAxOC4yVjUuOEM0IDQuOCA0LjggNCA1LjggNCIgLz48L3N2Zz4=", "name": "Sticker", @@ -19766,18 +19653,12 @@ "value": "", "type": "Boolean", "label": "Only follow the position", - "description": "", - "group": "", - "extraInformation": [], "name": "OnlyFollowPosition" }, { "value": "", "type": "Boolean", "label": "Destroy when the object it's stuck on is destroyed", - "description": "", - "group": "", - "extraInformation": [], "name": "IsDestroyedWithParent" } ], @@ -19791,6 +19672,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", @@ -20930,8 +20812,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -20939,8 +20819,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -20955,9 +20833,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -20965,9 +20840,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -20975,9 +20847,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -20985,9 +20854,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -21008,6 +20874,165 @@ "fullName": "Button (panel sprite)", "isUsingLegacyInstancesRenderer": true, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Text", + "font": "", + "textAlignment": "", + "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": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "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": "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": "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": [] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "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": [], "eventsFunctions": [ { "fullName": "", @@ -22300,16 +22325,12 @@ "value": "0", "type": "Number", "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", "label": "Left padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -22320,7 +22341,6 @@ "value": "0", "type": "Number", "label": "Right padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -22331,7 +22351,6 @@ "value": "0", "type": "Number", "label": "Top padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -22342,7 +22361,6 @@ "value": "0", "type": "Number", "label": "Bottom padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -22353,171 +22371,10 @@ "value": "0.25", "type": "Number", "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], "name": "HoveredFadeOutDuration" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "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": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "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": "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": "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": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "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": [] + "variants": [] } ] }, @@ -22526,6 +22383,7 @@ "category": "General", "extensionNamespace": "", "fullName": "Repeat every X seconds", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", @@ -23425,9 +23283,6 @@ "value": "MyTimer", "type": "String", "label": "The name of the timer to repeat", - "description": "", - "group": "", - "extraInformation": [], "deprecated": true, "name": "TimerName" }, @@ -23435,9 +23290,6 @@ "value": "1", "type": "Number", "label": "The time between each trigger (in seconds)", - "description": "", - "group": "", - "extraInformation": [], "deprecated": true, "name": "TimerLength" }, @@ -23445,9 +23297,6 @@ "value": "-1", "type": "Number", "label": "How many times should the timer trigger? -1 for forever.", - "description": "", - "group": "", - "extraInformation": [], "deprecated": true, "name": "Limit" }, @@ -23455,9 +23304,6 @@ "value": "0", "type": "Number", "label": "An internal counter", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Counter" } @@ -23472,6 +23318,7 @@ "category": "Input", "extensionNamespace": "", "fullName": "Swipe Gesture", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtc3dpcGUtcmlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAsOUExLDEgMCAwLDEgMTEsOEExLDEgMCAwLDEgMTIsOVYxMy40N0wxMy4yMSwxMy42TDE4LjE1LDE1Ljc5QzE4LjY4LDE2LjAzIDE5LDE2LjU2IDE5LDE3LjE0VjIxLjVDMTguOTcsMjIuMzIgMTguMzIsMjIuOTcgMTcuNSwyM0gxMUMxMC42MiwyMyAxMC4yNiwyMi44NSAxMCwyMi41N0w1LjEsMTguMzdMNS44NCwxNy42QzYuMDMsMTcuMzkgNi4zLDE3LjI4IDYuNTgsMTcuMjhINi44TDEwLDE5VjlNMTIsNEw5LDFWM0gzVjVIOVY3TDEyLDRaIiAvPjwvc3ZnPg==", "name": "SwipeGesture", @@ -25587,6 +25434,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Smooth Camera", + "gdevelopVersion": "", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", @@ -30108,54 +29956,40 @@ "value": "0.9", "type": "Number", "label": "Leftward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "LeftwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Rightward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "RightwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "UpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "DownwardSpeed" }, { "value": "true", "type": "Boolean", "label": "Follow on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnX" }, { "value": "true", "type": "Boolean", "label": "Follow on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnY" }, { @@ -30163,9 +29997,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area left border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaLeft" }, @@ -30174,9 +30006,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area right border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaRight" }, @@ -30185,9 +30015,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaTop" }, @@ -30196,9 +30024,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaBottom" }, @@ -30207,9 +30033,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset X", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetX" }, @@ -30218,9 +30042,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset Y", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetY" }, @@ -30229,9 +30051,7 @@ "type": "Number", "unit": "Second", "label": "Camera delay", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "CameraDelay" }, @@ -30240,9 +30060,7 @@ "type": "Number", "unit": "Second", "label": "Forecast time", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastTime" }, @@ -30251,9 +30069,7 @@ "type": "Number", "unit": "Second", "label": "Forecast history duration", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastHistoryDuration" }, @@ -30261,9 +30077,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogLeftwardSpeed" }, @@ -30271,9 +30084,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogRightwardSpeed" }, @@ -30281,9 +30091,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogDownwardSpeed" }, @@ -30291,9 +30098,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogUpwardSpeed" }, @@ -30301,9 +30105,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterX" }, @@ -30311,9 +30112,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterY" }, @@ -30321,9 +30119,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanX" }, @@ -30331,9 +30126,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanY" }, @@ -30341,9 +30133,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceX" }, @@ -30351,9 +30140,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryCovariance" }, @@ -30361,9 +30147,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearA" }, @@ -30371,9 +30154,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearB" }, @@ -30381,9 +30161,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedX" }, @@ -30391,9 +30168,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedY" }, @@ -30401,9 +30175,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestX" }, @@ -30411,9 +30182,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestY" }, @@ -30421,9 +30189,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestX" }, @@ -30431,9 +30196,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestY" }, @@ -30441,9 +30203,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceY" }, @@ -30451,9 +30210,6 @@ "value": "", "type": "Number", "label": "Index (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" }, @@ -30461,9 +30217,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpSpeed" }, @@ -30471,9 +30224,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraExtraDelay" }, @@ -30481,9 +30231,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedXMax" }, @@ -30491,9 +30238,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedYMax" }, @@ -30501,9 +30245,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingEnd" }, @@ -30511,9 +30252,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpDuration" }, @@ -30522,9 +30260,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Leftward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "LeftwardSpeedMax" }, @@ -30533,9 +30269,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rightward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "RightwardSpeedMax" }, @@ -30544,9 +30278,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "UpwardSpeedMax" }, @@ -30555,9 +30287,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "DownwardSpeedMax" }, @@ -30565,9 +30295,6 @@ "value": "", "type": "Number", "label": "OldX (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -30575,9 +30302,6 @@ "value": "", "type": "Number", "label": "OldY (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -30585,9 +30309,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" } @@ -30820,8 +30541,6 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -30831,8 +30550,6 @@ "value": "", "type": "Behavior", "label": "Smooth camera behavior", - "description": "", - "group": "", "extraInformation": [ "SmoothCamera::SmoothCamera" ], @@ -30842,9 +30559,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JumpOriginY" }, @@ -30853,9 +30567,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaTop" }, { @@ -30863,9 +30575,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaBottom" }, { @@ -30873,9 +30583,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaTop" }, { @@ -30883,45 +30591,35 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaBottom" }, { "value": "0.95", "type": "Number", "label": "Upward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirUpwardSpeed" }, { "value": "0.95", "type": "Number", "label": "Downward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirDownwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorUpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorDownwardSpeed" }, { @@ -30929,9 +30627,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirUpwardSpeedMax" }, { @@ -30939,9 +30635,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirDownwardSpeedMax" }, { @@ -30949,9 +30643,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorUpwardSpeedMax" }, { @@ -30959,9 +30651,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorDownwardSpeedMax" } ], @@ -30975,6 +30665,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Third person camera", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", "name": "ThirdPersonCamera", @@ -32853,8 +32544,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -32865,9 +32554,7 @@ "type": "Number", "unit": "Second", "label": "Halfway time for rotation", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "RotationHalfwayDuration" }, { @@ -32875,9 +32562,7 @@ "type": "Number", "unit": "Second", "label": "Halfway time on Z axis", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "TranslationZHalfwayDuration" }, { @@ -32885,9 +32570,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera distance", - "description": "", "group": "Position", - "extraInformation": [], "name": "Distance" }, { @@ -32895,9 +32578,7 @@ "type": "Number", "unit": "Pixel", "label": "Lateral distance offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetX" }, { @@ -32905,9 +32586,7 @@ "type": "Number", "unit": "Pixel", "label": "Ahead distance offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetY" }, { @@ -32915,9 +32594,7 @@ "type": "Number", "unit": "Pixel", "label": "Z offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -32925,9 +32602,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation angle offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "RotationAngleOffset" }, { @@ -32935,9 +32610,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Elevation angle offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "ElevationAngleOffset" }, { @@ -32945,9 +32618,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border on Z axis", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaZMax" }, @@ -32956,9 +32627,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border on Z axis", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaZMin" }, @@ -32966,9 +32635,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RotationLogSpeed" }, @@ -32976,9 +32642,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TranslationZLogSpeed" }, @@ -32986,9 +32649,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" }, @@ -32997,9 +32657,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraZ" }, @@ -33007,9 +32664,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustBeenCreated" } @@ -33024,6 +32678,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "3D grid jump", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LXVwLWJvbGQtYm94LW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsN0wxNywxMkgxNFYxNkgxMFYxMkg3TDEyLDdNMTksMjFINUEyLDIgMCAwLDEgMywxOVY1QTIsMiAwIDAsMSA1LDNIMTlBMiwyIDAgMCwxIDIxLDVWMTlBMiwyIDAgMCwxIDE5LDIxTTE5LDE5VjVINVYxOUgxOVoiIC8+PC9zdmc+", "name": "GridJump3D", @@ -33288,8 +32943,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -33299,8 +32952,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -33311,9 +32962,7 @@ "type": "Number", "unit": "Pixel", "label": "Jump height", - "description": "", "group": "Position", - "extraInformation": [], "name": "JumpHeight" }, { @@ -33321,9 +32970,7 @@ "type": "Number", "unit": "Pixel", "label": "Grid cell size", - "description": "", "group": "Position", - "extraInformation": [], "name": "GridСellSize" }, { @@ -33331,9 +32978,7 @@ "type": "Number", "unit": "Second", "label": "Upward jump duration", - "description": "", "group": "Timing", - "extraInformation": [], "name": "JumpUpDuration" }, { @@ -33341,9 +32986,7 @@ "type": "Number", "unit": "Second", "label": "Downward jump duration", - "description": "", "group": "Timing", - "extraInformation": [], "name": "JumpDownDuration" }, { @@ -33351,9 +32994,7 @@ "type": "Number", "unit": "Second", "label": "Rotate duration", - "description": "", "group": "Timing", - "extraInformation": [], "name": "RotateDuration" } ], From 116d0e2c1b8dae0bc737761d265f91a1e06526a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 14:21:04 +0200 Subject: [PATCH 4/7] Update extensions --- examples/3d-road-crosser/3d-road-crosser.json | 4512 ++++++++++------- 1 file changed, 2668 insertions(+), 1844 deletions(-) diff --git a/examples/3d-road-crosser/3d-road-crosser.json b/examples/3d-road-crosser/3d-road-crosser.json index b297e5b5b..f41e72c69 100644 --- a/examples/3d-road-crosser/3d-road-crosser.json +++ b/examples/3d-road-crosser/3d-road-crosser.json @@ -4078,6 +4078,116 @@ "behaviors": [], "content": { "IsForceShown": false + }, + "childrenContent": { + "BackgroundPainter": { + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + "Icon": { + "adaptCollisionMaskAutomatically": true, + "updateIfNotVisible": false, + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } + ] + } + ] + } + ] + }, + "Text": { + "bold": true, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + } } } ], @@ -8122,14 +8232,18 @@ "category": "Input", "extensionNamespace": "", "fullName": "Screen Orientation Checker", - "gdevelopVersion": "", + "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 screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.0.1", - "description": "Display a screen asking the user to rotate their phone/tablet if not in the right orientation.", + "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", + "version": "0.1.1", + "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" @@ -8205,7 +8319,7 @@ "areaMinY": 0, "areaMinZ": 0, "defaultName": "", - "description": "Automatically display a black screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Put this at position 0;0 on a UI layer (or a layer where the camera is not moving).", + "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, "isUsingLegacyInstancesRenderer": false, @@ -8276,7 +8390,7 @@ "effects": [], "behaviors": [], "fillOpacity": 255, - "outlineSize": 1, + "outlineSize": 0, "outlineOpacity": 255, "absoluteCoordinates": true, "clearBetweenFrames": true, @@ -8306,9 +8420,9 @@ "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 0, - "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false }, { @@ -8327,7 +8441,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets/rotate-screen-icon.png", + "image": "rotate-screen-icon.png", "points": [], "originPoint": { "name": "origine", @@ -8456,8 +8570,8 @@ "name": "Icon", "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", "width": 0, - "x": 198, - "y": 62, + "x": 204, + "y": 64, "zOrder": 16, "numberProperties": [], "stringProperties": [], @@ -8528,11 +8642,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsShown", + "False", + "" ] } ] @@ -8554,11 +8669,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "IsShown", + "False", + "" ] } ] @@ -8598,11 +8714,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsShown", + "False", + "" ] } ] @@ -8624,11 +8741,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "IsShown", + "False", + "" ] } ] @@ -8660,18 +8778,22 @@ "subInstructions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsForceShown", + "True", + "" ] } ] @@ -8680,25 +8802,24 @@ "actions": [ { "type": { - "value": "ResizableCapability::ResizableBehavior::SetSize" + "value": "PrimitiveDrawing::FillColor" }, "parameters": [ - "Object", - "Resizable", - "ScreenWidth()", - "ScreenHeight()" + "BackgroundPainter", + "BackgroundColor" ] }, { "type": { - "value": "PrimitiveDrawing::Rectangle" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ "BackgroundPainter", - "0", - "0", - "SceneWindowWidth()", - "SceneWindowHeight()" + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] }, { @@ -8718,19 +8839,23 @@ { "type": { "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsForceShown", + "True", + "" ] } ], @@ -8756,7 +8881,7 @@ "parameters": [ "Icon", "=", - "Text.Y() - 150" + "Text.Y() - 100" ] } ] @@ -8910,7 +9035,7 @@ "objectGroups": [] }, { - "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game", + "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Condition", "group": "Screen Orientation Checker configuration", @@ -8922,10 +9047,12 @@ "conditions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsForceShown", + "True", + "" ] } ], @@ -8952,7 +9079,7 @@ "objectGroups": [] }, { - "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game", + "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Action", "group": "Screen Orientation Checker configuration", @@ -8965,21 +9092,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "IsForceShown", + "False", + "" ] } ] @@ -8989,21 +9119,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsForceShown", + "False", + "" ] } ] @@ -9041,6 +9174,30 @@ "label": "Force show the screen", "description": "Use this to test the screen in your game", "name": "IsForceShown" + }, + { + "value": "5", + "type": "Number", + "unit": "Pixel", + "label": "Padding", + "group": "Appearance", + "name": "Padding" + }, + { + "value": "10", + "type": "Number", + "unit": "Pixel", + "label": "Corner radius", + "description": "Corner radius for the background", + "group": "Appearance", + "name": "CornerRadius" + }, + { + "value": "0;0;0", + "type": "Color", + "label": "Background color", + "group": "Appearance", + "name": "BackgroundColor" } ], "variants": [] @@ -9052,13 +9209,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -9100,7 +9257,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -9129,11 +9286,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9142,11 +9298,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9180,12 +9335,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -9195,11 +9350,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -9216,12 +9372,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -9244,12 +9400,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -9259,11 +9415,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -9274,20 +9429,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -9319,11 +9474,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9345,31 +9499,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -9385,22 +9538,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9411,11 +9562,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9430,11 +9580,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9463,20 +9612,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9485,11 +9634,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9501,20 +9649,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9523,11 +9671,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9540,20 +9687,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9562,11 +9709,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9578,20 +9724,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9600,11 +9746,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9632,18 +9777,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9655,11 +9799,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9668,11 +9811,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9685,11 +9827,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9697,11 +9838,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9710,11 +9850,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9797,22 +9936,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9847,11 +9984,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9896,11 +10032,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9945,11 +10080,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9994,11 +10128,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10020,11 +10153,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10069,11 +10201,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10118,11 +10249,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10171,7 +10301,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10273,7 +10403,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -10284,7 +10414,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -10295,7 +10425,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -10343,7 +10473,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -10354,7 +10484,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -10365,7 +10495,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -10376,11 +10506,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -10404,7 +10533,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -10415,11 +10544,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -10443,7 +10571,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -10454,11 +10582,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -10482,7 +10609,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -10524,7 +10651,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -10561,13 +10688,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -10605,7 +10731,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -10642,13 +10768,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -10686,7 +10811,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -10723,13 +10848,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -10799,7 +10923,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -10819,7 +10943,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -10829,7 +10953,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10879,7 +11002,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -10907,7 +11030,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -10935,7 +11058,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -10948,7 +11071,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10977,7 +11099,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -10990,7 +11112,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11015,13 +11136,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -11031,7 +11151,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11060,7 +11179,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -11073,7 +11192,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11098,13 +11216,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -11114,7 +11231,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11143,7 +11259,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -11156,7 +11272,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11181,13 +11296,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -11197,7 +11311,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11211,6 +11324,15 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "name": "Animation" + }, { "value": "", "type": "Behavior", @@ -11263,13 +11385,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -11320,11 +11441,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -11333,11 +11453,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -11349,7 +11468,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -11376,11 +11495,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -11389,11 +11507,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -11405,7 +11522,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -11416,11 +11533,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -11429,11 +11545,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -11445,7 +11560,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -11468,11 +11583,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -11481,11 +11595,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -11497,7 +11610,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -11520,11 +11633,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -11538,8 +11650,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -11550,11 +11662,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -11568,8 +11679,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -11647,46 +11758,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -11725,46 +11832,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -11802,37 +11905,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -11842,37 +11942,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -11888,9 +11985,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -11939,7 +12036,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -11980,7 +12077,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -12019,24 +12116,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -12056,12 +12151,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -12084,7 +12179,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -12121,13 +12216,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -12165,7 +12259,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -12202,13 +12296,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -12246,7 +12339,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -12283,13 +12376,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -12327,7 +12419,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -12365,13 +12457,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -12409,7 +12500,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -12447,13 +12538,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -12491,7 +12581,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -12528,13 +12618,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -12572,7 +12661,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -12609,13 +12698,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -12852,7 +12940,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -12872,7 +12960,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -12882,7 +12970,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -12924,11 +13011,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -12937,11 +13023,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -12953,7 +13038,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -12980,11 +13065,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -12993,11 +13077,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -13009,7 +13092,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -13020,11 +13103,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -13033,11 +13115,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -13049,7 +13130,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -13072,11 +13153,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -13085,11 +13165,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -13101,7 +13180,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -13115,7 +13194,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13146,10 +13224,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -13161,7 +13239,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13197,10 +13274,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -13212,7 +13289,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13246,7 +13322,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -13259,7 +13335,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13284,13 +13359,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -13300,7 +13374,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13329,7 +13402,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -13342,7 +13415,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13367,13 +13439,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -13383,7 +13454,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13412,7 +13482,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -13425,7 +13495,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13450,13 +13519,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -13466,7 +13534,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13495,7 +13562,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -13508,7 +13575,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13533,13 +13599,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -13549,7 +13614,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13578,7 +13642,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -13591,7 +13655,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13616,13 +13679,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -13632,7 +13694,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13661,7 +13722,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -13675,7 +13736,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13700,13 +13760,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -13716,7 +13775,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13745,7 +13803,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -13759,7 +13817,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13784,13 +13841,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -13800,7 +13856,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -13814,6 +13869,15 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "name": "Scale" + }, { "value": "", "type": "Behavior", @@ -13994,7 +14058,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -14046,11 +14110,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -14059,11 +14122,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -14075,7 +14137,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -14102,11 +14164,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -14115,11 +14176,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -14131,7 +14191,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -14142,11 +14202,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -14155,11 +14214,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -14171,7 +14229,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -14194,11 +14252,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -14207,11 +14264,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -14223,7 +14279,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -14268,9 +14324,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -14318,9 +14374,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -14366,7 +14422,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -14404,13 +14460,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -14449,7 +14504,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -14487,13 +14542,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -14532,7 +14586,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -14570,13 +14624,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -14615,7 +14668,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -14653,13 +14706,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -14698,7 +14750,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -14736,13 +14788,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -14781,7 +14832,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -14820,13 +14871,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -14865,7 +14915,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -14904,13 +14954,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15097,17 +15146,17 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Linear Movement", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJheS1zdGFydC1hcnJvdyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMywxMkwxOSwxNlYxM0g2LjgzQzYuNDIsMTQuMTcgNS4zMSwxNSA0LDE1QTMsMyAwIDAsMSAxLDEyQTMsMyAwIDAsMSA0LDlDNS4zMSw5IDYuNDIsOS44MyA2LjgzLDExSDE5VjhMMjMsMTJaIiAvPjwvc3ZnPg==", "name": "LinearMovement", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/ray-start-arrow.svg", "shortDescription": "Move objects on a straight line.", - "version": "0.1.0", + "version": "0.1.1", "description": [ "Move objects on a straight line or according to their angle.", "", - "It can be used for simple enemies or bullets." + "It can be used for simple enemies or bullets. It's usually not adapted for players (other behaviors are a better choice) or bullets fired with the actions provided by the \"Fire Bullet\" behavior (these bullets are already moved using a force)." ], "origin": { "identifier": "LinearMovement", @@ -15171,6 +15220,166 @@ } ], "objectGroups": [] + }, + { + "description": "the speed on X axis of the object.", + "fullName": "Speed on X axis", + "functionType": "ExpressionAndCondition", + "group": "Linear movement", + "name": "SpeedX", + "sentence": "the speed on X axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpeedX" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SpeedX", + "name": "SetSpeedX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SpeedX", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the speed on Y axis of the object.", + "fullName": "Speed on Y axis", + "functionType": "ExpressionAndCondition", + "group": "Linear movement", + "name": "SpeedY", + "sentence": "the speed on Y axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpeedY" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SpeedY", + "name": "SetSpeedY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SpeedY", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovement", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -15235,6 +15444,86 @@ } ], "objectGroups": [] + }, + { + "description": "the speed of the object.", + "fullName": "Speed", + "functionType": "ExpressionAndCondition", + "group": "Linear movement by angle configuration", + "name": "Speed", + "sentence": "the speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Speed" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovementByAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Speed", + "name": "SetSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Speed", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovementByAngle", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -15256,13 +15545,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "1.5.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -15310,7 +15599,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -15346,11 +15635,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -15359,13 +15647,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -15375,11 +15662,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -15388,13 +15674,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -15432,7 +15717,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -15469,13 +15754,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -15525,7 +15809,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -15562,13 +15846,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -15658,7 +15941,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -15695,13 +15978,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -15740,7 +16022,7 @@ "value": "0", "type": "Number", "label": "Value", - "name": "Value" + "name": "CurrentValue" }, { "value": "0", @@ -15802,11 +16084,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -15815,11 +16096,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -15853,12 +16133,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -15868,11 +16148,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -15889,12 +16170,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -15917,12 +16198,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -15932,11 +16213,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -15947,20 +16227,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -15992,11 +16272,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -16018,31 +16297,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -16084,11 +16362,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16103,11 +16380,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -16136,20 +16412,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16158,11 +16434,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16174,20 +16449,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16196,11 +16471,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16213,20 +16487,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16235,11 +16509,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16251,20 +16524,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16273,11 +16546,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16305,18 +16577,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -16328,11 +16599,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16341,11 +16611,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16358,11 +16627,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16370,11 +16638,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16383,11 +16650,10 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16430,22 +16696,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -16480,11 +16744,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16529,11 +16792,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16578,11 +16840,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16627,11 +16888,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16653,11 +16913,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16702,11 +16961,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16751,11 +17009,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16804,7 +17061,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -17089,12 +17346,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] } ] @@ -17272,7 +17529,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -17357,24 +17614,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -17384,7 +17641,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -17502,10 +17759,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -17564,10 +17823,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -17615,10 +17876,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -17746,66 +18009,86 @@ ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "1" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "Background", + "Resizable", + "=", + "Width" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "Background", + "Resizable", + "=", + "Height" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "variables": [ + { + "name": "Width", + "type": "number", + "value": 0 + }, + { + "name": "Height", + "type": "number", + "value": 0 + } ] } ] @@ -17992,7 +18275,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -18079,7 +18362,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -18175,7 +18458,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -18271,7 +18554,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -18307,10 +18590,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -18350,21 +18635,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -18382,21 +18670,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -18452,10 +18743,11 @@ }, { "type": { - "value": "PanelSpriteObject::Height" + "value": "ResizableCapability::ResizableBehavior::SetHeight" }, "parameters": [ "FillBar", + "Resizable", "=", "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" ] @@ -18505,10 +18797,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -18547,10 +18840,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -18572,12 +18866,12 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, "parameters": [ "Label", @@ -18616,7 +18910,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyBarLeftPadding()" + "BarLeftPadding" ] } ] @@ -18651,7 +18945,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" + "Background.Width() - BarRightPadding" ] } ] @@ -18686,7 +18980,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Background.Width() - BarLeftPadding - BarRightPadding" ] } ] @@ -18736,9 +19030,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -18748,7 +19041,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -18759,7 +19052,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -18788,10 +19081,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -18824,10 +19119,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -19059,18 +19356,18 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Stick objects to others", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXN0aWNrZXItb3V0bGluZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik01LjUgMkMzLjYgMiAyIDMuNiAyIDUuNVYxOC41QzIgMjAuNCAzLjYgMjIgNS41IDIySDE2TDIyIDE2VjUuNUMyMiAzLjYgMjAuNCAyIDE4LjUgMkg1LjVNNS44IDRIMTguM0MxOS4zIDQgMjAuMSA0LjggMjAuMSA1LjhWMTVIMTguNkMxNi43IDE1IDE1LjEgMTYuNiAxNS4xIDE4LjVWMjBINS44QzQuOCAyMCA0IDE5LjIgNCAxOC4yVjUuOEM0IDQuOCA0LjggNCA1LjggNCIgLz48L3N2Zz4=", "name": "Sticker", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sticker-outline.svg", "shortDescription": "Make objects follow the position and rotation of the object they are stuck to.", - "version": "0.5.1", + "version": "0.5.3", "description": [ "This extension can be useful to:", - "* Stick accessories to moving objects", - "* Animate a skeleton", - "* Delete an object with another one", + "- Stick accessories to moving objects", + "- Animate a skeleton", + "- Delete an object with another one", "", "An example allows to check it out ([open the project online](https://editor.gdevelop.io/?project=example://stick-objects))." ], @@ -19205,8 +19502,10 @@ " const deltaX = object.getCenterXInScene() - this.basisOldCenterXInScene;", " const deltaY = object.getCenterYInScene() - this.basisOldCenterYInScene;", " const angle = this.basisOldAngle * Math.PI / 180;", - " this.relativeRotatedX = (deltaX * Math.cos(angle) + deltaY * Math.sin(angle)) / this.basisOldWidth;", - " this.relativeRotatedY = (-deltaX * Math.sin(angle) + deltaY * Math.cos(angle)) / this.basisOldHeight;", + " const cosA = Math.cos(angle);", + " const sinA = Math.sin(angle);", + " this.relativeRotatedX = (deltaX * cosA + deltaY * sinA) / this.basisOldWidth;", + " this.relativeRotatedY = (-deltaX * sinA + deltaY * cosA) / this.basisOldHeight;", "", " // Save initial values to avoid calculus and rounding errors", " this.basisOriginalWidth = this.basisObject.getWidth();", @@ -19252,78 +19551,104 @@ " }", " this.followingDoneThisFrame = true;", " const basisObject = this.basisObject;", - " if (basisObject) {", - " // If the behavior on the basis object has a different name,", - " // the objects will still follow their basis objects", - " // but frame delays could happen.", - " const behaviorName = this.behavior.getName();", - " if (basisObject.hasBehavior(behaviorName)) {", - " const basisBehavior = basisObject.getBehavior(behaviorName);", - " if (basisBehavior.type === this.behavior.type) {", - " // Follow parents 1st to avoid frame delays", - " basisBehavior._sticker.followBasisObject();", - " }", + " if (!basisObject) {", + " return;", + " }", + " // If the behavior on the basis object has a different name,", + " // the objects will still follow their basis objects", + " // but frame delays could happen.", + " const behaviorName = this.behavior.getName();", + " if (basisObject.hasBehavior(behaviorName)) {", + " const basisBehavior = basisObject.getBehavior(behaviorName);", + " if (basisBehavior.type === this.behavior.type) {", + " // Follow parents 1st to avoid frame delays", + " basisBehavior._sticker.followBasisObject();", " }", + " }", + " if (this.behavior._getOnlyFollowPosition()) {", + " this.followPosition();", + " } else {", + " this.followTransformation();", + " }", + " this.updateOldCoordinates();", + " }", "", - " const object = this.behavior.owner;", - "", - " if (this.behavior._getOnlyFollowPosition()) {", - " if (object.getX() !== this.ownerOldX", - " || object.getY() !== this.ownerOldY) {", - " this.updateRelativeCoordinates();", - " }", - "", - " if (this.basisOldX !== basisObject.getX() ||", - " this.basisOldY !== basisObject.getY()) {", - " object.setPosition(", - " basisObject.getX() + this.relativeX,", - " basisObject.getY() + this.relativeY);", - " }", - " } else {", - " if (object.getX() !== this.ownerOldX", - " || object.getY() !== this.ownerOldY", - " || object.getAngle() !== this.ownerOldAngle", - " || object.getWidth() !== this.ownerOldWidth", - " || object.getHeight() !== this.ownerOldHeight) {", - " this.updateRelativeCoordinates();", - " }", + " followPosition() {", + " const object = this.behavior.owner;", + " const basisObject = this.basisObject;", + " if (!basisObject) {", + " return;", + " }", + " if (object.getX() !== this.ownerOldX", + " || object.getY() !== this.ownerOldY) {", + " this.updateRelativeCoordinates();", + " }", + " if (this.basisOldX !== basisObject.getX()", + " || this.basisOldY !== basisObject.getY()) {", + " object.setPosition(", + " basisObject.getX() + this.relativeX,", + " basisObject.getY() + this.relativeY);", + " }", + " }", "", - " // Follow basisObject", - " if (basisObject.getAngle() === this.basisOriginalAngle && this.basisOriginalAngle === 0) {", - " if (basisObject.getWidth() === this.basisOriginalWidth ||", - " basisObject.getHeight() === this.basisOriginalHeight) {", - " if (this.basisOldX !== basisObject.getX() ||", - " this.basisOldY !== basisObject.getY()) {", - " object.setPosition(", - " basisObject.getX() + this.relativeX,", - " basisObject.getY() + this.relativeY);", - " }", - " } else {", - " object.setCenterPositionInScene(", - " basisObject.getCenterXInScene() + this.relativeRotatedX * basisObject.getWidth(),", - " basisObject.getCenterYInScene() + this.relativeRotatedY * basisObject.getHeight());", + " followTransformation() {", + " const object = this.behavior.owner;", + " const basisObject = this.basisObject;", + " if (!basisObject) {", + " return;", + " }", + " if (object.getX() !== this.ownerOldX", + " || object.getY() !== this.ownerOldY", + " || object.getAngle() !== this.ownerOldAngle", + " || object.getWidth() !== this.ownerOldWidth", + " || object.getHeight() !== this.ownerOldHeight) {", + " this.updateRelativeCoordinates();", + " }", + " if (this.basisOldAngle !== this.basisObject.getAngle()", + " || this.basisOldWidth !== this.basisObject.getWidth()", + " || this.basisOldHeight !== this.basisObject.getHeight()", + " || this.basisOldCenterXInScene !== this.basisObject.getCenterXInScene()", + " || this.basisOldCenterYInScene !== this.basisObject.getCenterYInScene()) {", + " // Unproportional dimensions changes won't work as expected", + " // if the object angle is not null but nothing more can be done", + " // because there is no full affine transformation on objects.", + " if (basisObject.getWidth() !== this.basisOriginalWidth) {", + " object.setWidth(this.relativeWidth * basisObject.getWidth());", + " }", + " if (basisObject.getHeight() !== this.basisOriginalHeight) {", + " object.setHeight(this.relativeHeight * basisObject.getHeight());", + " }", + " // Follow basisObject", + " if (basisObject.getAngle() === this.basisOriginalAngle", + " && this.basisOriginalAngle === 0) {", + " if (basisObject.getWidth() === this.basisOriginalWidth", + " || basisObject.getHeight() === this.basisOriginalHeight) {", + " if (this.basisOldX !== basisObject.getX() ||", + " this.basisOldY !== basisObject.getY()) {", + " object.setPosition(", + " basisObject.getX() + this.relativeX,", + " basisObject.getY() + this.relativeY);", " }", " } else {", - " object.setAngle(basisObject.getAngle() + this.relativeAngle);", - "", - " const deltaX = this.relativeRotatedX * basisObject.getWidth();", - " const deltaY = this.relativeRotatedY * basisObject.getHeight();", - " const angle = -basisObject.getAngle() * Math.PI / 180;", - " object.setX(basisObject.getCenterXInScene() + object.getX() - object.getCenterXInScene() + deltaX * Math.cos(angle) + deltaY * Math.sin(angle));", - " object.setY(basisObject.getCenterYInScene() + object.getY() - object.getCenterYInScene() - deltaX * Math.sin(angle) + deltaY * Math.cos(angle));", - " }", - " // Unproportional dimensions changes won't work as expected", - " // if the object angle is not null but nothing more can be done", - " // because there is no full affine transformation on objects.", - " if (basisObject.getWidth() !== this.basisOriginalWidth) {", - " object.setWidth(this.relativeWidth * basisObject.getWidth());", - " }", - " if (basisObject.getHeight() !== this.basisOriginalHeight) {", - " object.setHeight(this.relativeHeight * basisObject.getHeight());", + " object.setCenterPositionInScene(", + " basisObject.getCenterXInScene() + this.relativeRotatedX * basisObject.getWidth(),", + " basisObject.getCenterYInScene() + this.relativeRotatedY * basisObject.getHeight());", " }", - " }", + " } else {", + " object.setAngle(basisObject.getAngle() + this.relativeAngle);", "", - " this.updateOldCoordinates();", + " const deltaX = this.relativeRotatedX * basisObject.getWidth();", + " const deltaY = this.relativeRotatedY * basisObject.getHeight();", + " const angle = -basisObject.getAngle() * Math.PI / 180;", + " const cosA = Math.cos(angle);", + " const sinA = Math.sin(angle);", + " object.setX(", + " basisObject.getCenterXInScene() + object.getX() - object.getCenterXInScene()", + " + deltaX * cosA + deltaY * sinA);", + " object.setY(", + " basisObject.getCenterYInScene() + object.getY() - object.getCenterYInScene()", + " - deltaX * sinA + deltaY * cosA);", + " }", " }", " }", "}", @@ -19398,6 +19723,7 @@ "fullName": "Sticker", "name": "Sticker", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -19672,13 +19998,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "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": "1.4.4", + "version": "1.5.0", "description": [ "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.", "", @@ -19739,11 +20065,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -19752,11 +20077,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -19790,12 +20114,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -19805,11 +20129,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -19826,12 +20151,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -19854,12 +20179,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -19869,11 +20194,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -19884,20 +20208,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -19929,11 +20253,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -19955,31 +20278,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -20021,11 +20343,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -20040,11 +20361,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -20073,20 +20393,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -20095,11 +20415,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -20111,20 +20430,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -20133,11 +20452,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -20150,20 +20468,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -20172,11 +20490,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -20188,20 +20505,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -20210,11 +20527,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -20242,18 +20558,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -20265,11 +20580,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -20278,11 +20592,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -20295,11 +20608,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -20307,11 +20619,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -20320,11 +20631,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -20407,22 +20717,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -20457,11 +20765,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -20506,11 +20813,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -20555,11 +20861,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -20604,11 +20909,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -20630,11 +20934,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -20679,11 +20982,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -20728,11 +21030,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -20781,7 +21082,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -21325,10 +21626,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -21356,10 +21657,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -21660,66 +21961,83 @@ ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteButton::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Width" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Height" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "variables": [ + { + "name": "Width", + "type": "number", + "value": 0 + }, + { + "name": "Height", + "type": "number", + "value": 0 + } ] } ] @@ -21986,7 +22304,7 @@ "parameters": [ "Label", "=", - "GetArgumentAsString(\"LabelText\")" + "LabelText" ] }, { @@ -22017,11 +22335,11 @@ "objectGroups": [] }, { - "description": "Return the label text.", + "description": "the label text.", "fullName": "Label text", - "functionType": "StringExpression", + "functionType": "ExpressionAndCondition", "name": "LabelText", - "sentence": "", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -22215,10 +22533,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -22241,10 +22561,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -22383,13 +22705,13 @@ "category": "General", "extensionNamespace": "", "fullName": "Repeat every X seconds", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/repeat.svg", "shortDescription": "Trigger an event every X seconds.", - "version": "0.1.1", + "version": "0.2.1", "description": "Convenience conditions, actions and behaviors for timers to trigger a condition every X seconds.", "origin": { "identifier": "RepeatEveryXSeconds", @@ -23088,22 +23410,20 @@ "subInstructions": [ { "type": { - "value": "RepeatEveryXSeconds::RepeatTimer::PropertyLimit" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Limit", "=", "-1" ] }, { "type": { - "value": "RepeatEveryXSeconds::RepeatTimer::PropertyCounter" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Counter", "<", "Limit" ] @@ -23123,11 +23443,10 @@ }, { "type": { - "value": "RepeatEveryXSeconds::RepeatTimer::SetPropertyCounter" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Counter", "+", "1" ] @@ -23250,11 +23569,10 @@ "actions": [ { "type": { - "value": "RepeatEveryXSeconds::RepeatTimer::SetPropertyCounter" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Counter", "=", "0" ] @@ -23318,13 +23636,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Swipe Gesture", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtc3dpcGUtcmlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAsOUExLDEgMCAwLDEgMTEsOEExLDEgMCAwLDEgMTIsOVYxMy40N0wxMy4yMSwxMy42TDE4LjE1LDE1Ljc5QzE4LjY4LDE2LjAzIDE5LDE2LjU2IDE5LDE3LjE0VjIxLjVDMTguOTcsMjIuMzIgMTguMzIsMjIuOTcgMTcuNSwyM0gxMUMxMC42MiwyMyAxMC4yNiwyMi44NSAxMCwyMi41N0w1LjEsMTguMzdMNS44NCwxNy42QzYuMDMsMTcuMzkgNi4zLDE3LjI4IDYuNTgsMTcuMjhINi44TDEwLDE5VjlNMTIsNEw5LDFWM0gzVjVIOVY3TDEyLDRaIiAvPjwvc3ZnPg==", "name": "SwipeGesture", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gesture-swipe-right.svg", "shortDescription": "Detect swipe gestures based on their distance and duration.", - "version": "1.0.0", + "version": "1.1.0", "description": [ "Use the \"Enable swipe detection\" action at the beginning of your scene.", "", @@ -23364,20 +23682,93 @@ ], "dependencies": [], "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ + "sceneVariables": [ { - "fullName": "", - "functionType": "Action", - "name": "onScenePreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, + "folded": true, + "name": "SwipeJustEnded", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "EndPointX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "EndPointY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "SwipeInProgress", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "StartPointX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StartPointY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Distance", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "DistanceX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "DistanceY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Angle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Enabled", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "Layer", + "type": "string", + "value": "" + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onScenePreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, "textB": 0, "textG": 0, "textR": 0 @@ -23390,11 +23781,12 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeJustEnded", - "False" + "SwipeJustEnded", + "False", + "" ] } ] @@ -23447,22 +23839,22 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.EndPointX", + "EndPointX", "=", - "MouseX(VariableString(__SwipeGesture.Layer),0)" + "MouseX(Layer)" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.EndPointY", + "EndPointY", "=", - "MouseY(VariableString(__SwipeGesture.Layer),0)" + "MouseY(Layer)" ] } ] @@ -23494,19 +23886,20 @@ }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeInProgress", - "False" + "SwipeInProgress", + "False", + "" ] }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeJustEnded", + "SwipeJustEnded", "True" ] } @@ -23574,20 +23967,20 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.EndPointX", + "EndPointX", "=", "0" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.EndPointY", + "EndPointY", "=", "0" ] @@ -23612,22 +24005,22 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.StartPointX", + "StartPointX", "=", - "MouseX(VariableString(__SwipeGesture.Layer),0)" + "MouseX(Layer)" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.StartPointY", + "StartPointY", "=", - "MouseY(VariableString(__SwipeGesture.Layer),0)" + "MouseY(Layer)" ] } ] @@ -23668,10 +24061,10 @@ }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeInProgress", + "SwipeInProgress", "True" ] } @@ -23724,44 +24117,32 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.Distance", + "Distance", "=", - "DistanceBetweenPositions(Variable(__SwipeGesture.StartPointX), Variable(__SwipeGesture.StartPointY), MouseX(VariableString(__SwipeGesture.Layer),0), MouseY(VariableString(__SwipeGesture.Layer),0))" + "DistanceBetweenPositions(StartPointX, StartPointY, MouseX(Layer), MouseY(Layer))" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.DistanceX", + "DistanceX", "=", - "abs(Variable(__SwipeGesture.StartPointX) - MouseX(VariableString(__SwipeGesture.Layer),0))" + "abs(StartPointX - MouseX(Layer))" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.DistanceY", + "DistanceY", "=", - "abs(Variable(__SwipeGesture.StartPointY) - MouseY(VariableString(__SwipeGesture.Layer),0))" + "abs(StartPointY - MouseY(Layer))" ] } ] @@ -23784,12 +24165,12 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__SwipeGesture.Angle", + "Angle", "=", - "AngleBetweenPositions(Variable(__SwipeGesture.StartPointX), Variable(__SwipeGesture.StartPointY), MouseX(VariableString(__SwipeGesture.Layer),0), MouseY(VariableString(__SwipeGesture.Layer),0))" + "AngleBetweenPositions(StartPointX, StartPointY, MouseX(Layer), MouseY(Layer))" ] } ] @@ -23819,29 +24200,32 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.Enabled", - "False" + "Enabled", + "False", + "" ] }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeInProgress", + "SwipeInProgress", "False" ] }, @@ -23861,20 +24245,22 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__SwipeGesture.Enabled", + "Enabled", "True" ] } @@ -23943,7 +24329,7 @@ "ShapePainterObject", "0", "0", - "VariableString(__SwipeGesture.Layer)" + "Layer" ] } ] @@ -23960,13 +24346,7 @@ "ShapePainterObject", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { "value": "PrimitiveDrawing::UseRelativeCoordinates" @@ -24003,25 +24383,18 @@ ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::LineV2" - }, - "parameters": [ - "ShapePainterObject", - "Variable(__SwipeGesture.StartPointX)", - "Variable(__SwipeGesture.StartPointY)", - "MouseX(VariableString(__SwipeGesture.Layer),0)", - "MouseY(VariableString(__SwipeGesture.Layer),0)", - "ShapePainterObject.OutlineSize()" - ] - } + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainterObject", + "StartPointX", + "StartPointY", + "MouseX(Layer)", + "MouseY(Layer)", + "ShapePainterObject.OutlineSize()" ] } ] @@ -24054,12 +24427,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__SwipeGesture.Layer", + "Layer", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -24068,7 +24441,7 @@ "parameters": [ { "description": "Layer", - "name": "Layer", + "name": "Value", "type": "layer" } ], @@ -24090,7 +24463,7 @@ "value": "SetReturnString" }, "parameters": [ - "VariableString(__SwipeGesture.Layer)" + "Layer" ] } ] @@ -24118,7 +24491,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.Angle)" + "Angle" ] } ] @@ -24146,7 +24519,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.Distance)" + "Distance" ] } ] @@ -24174,7 +24547,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.DistanceX)" + "DistanceX" ] } ] @@ -24202,7 +24575,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.DistanceY)" + "DistanceY" ] } ] @@ -24230,7 +24603,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.StartPointX)" + "StartPointX" ] } ] @@ -24258,7 +24631,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.StartPointY)" + "StartPointY" ] } ] @@ -24286,7 +24659,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.EndPointX)" + "EndPointX" ] } ] @@ -24314,7 +24687,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__SwipeGesture.EndPointY)" + "EndPointY" ] } ] @@ -24366,10 +24739,10 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeInProgress", + "SwipeInProgress", "True" ] } @@ -24401,10 +24774,10 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "__SwipeGesture.Enabled", + "Enabled", "True" ] } @@ -24436,10 +24809,10 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "__SwipeGesture.SwipeJustEnded", + "SwipeJustEnded", "True" ] } @@ -24509,7 +24882,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Up\"" ] @@ -24525,7 +24898,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-135" ] @@ -24535,7 +24908,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "-45" ] @@ -24574,7 +24947,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Down\"" ] @@ -24590,7 +24963,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "45" ] @@ -24600,7 +24973,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "135" ] @@ -24639,7 +25012,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Left\"" ] @@ -24667,7 +25040,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-180" ] @@ -24677,7 +25050,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "-135" ] @@ -24695,7 +25068,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "135" ] @@ -24705,7 +25078,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "180" ] @@ -24748,7 +25121,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Right\"" ] @@ -24764,7 +25137,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-45" ] @@ -24774,7 +25147,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "45" ] @@ -24862,7 +25235,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Up\"" ] @@ -24878,7 +25251,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-112.5" ] @@ -24888,7 +25261,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "-67.5" ] @@ -24927,7 +25300,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Down\"" ] @@ -24943,7 +25316,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "67.5" ] @@ -24953,7 +25326,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "112.5" ] @@ -24992,7 +25365,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Left\"" ] @@ -25020,7 +25393,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-180" ] @@ -25030,7 +25403,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "-157.5" ] @@ -25048,7 +25421,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "157.5" ] @@ -25058,7 +25431,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "180" ] @@ -25101,7 +25474,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"Right\"" ] @@ -25117,7 +25490,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-22.5" ] @@ -25127,7 +25500,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "22.5" ] @@ -25166,7 +25539,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"UpRight\"" ] @@ -25182,7 +25555,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-67.5" ] @@ -25192,7 +25565,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "-22.5" ] @@ -25231,7 +25604,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"UpLeft\"" ] @@ -25247,7 +25620,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "-157.5" ] @@ -25257,7 +25630,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "-112.5" ] @@ -25296,7 +25669,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"DownLeft\"" ] @@ -25312,7 +25685,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "112.5" ] @@ -25322,7 +25695,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "157.5" ] @@ -25361,7 +25734,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "GetArgumentAsString(\"Direction\")", + "Direction", "=", "\"DownRight\"" ] @@ -25377,7 +25750,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", ">=", "22.5" ] @@ -25387,7 +25760,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "SwipeGesture::Angle()", + "Angle", "<", "67.5" ] @@ -25434,13 +25807,13 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.1", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -25477,6 +25850,7 @@ "fullName": "Smooth Camera", "name": "SmoothCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -25507,7 +25881,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyLeftwardSpeed()", + "LeftwardSpeed", "log(1 - )" ] }, @@ -25518,7 +25892,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyRightwardSpeed()", + "RightwardSpeed", "log(1 - )" ] }, @@ -25529,7 +25903,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyUpwardSpeed()", + "UpwardSpeed", "log(1 - )" ] }, @@ -25540,7 +25914,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyDownwardSpeed()", + "DownwardSpeed", "log(1 - )" ] }, @@ -25551,7 +25925,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyLeftwardSpeedMax()", + "LeftwardSpeedMax", "log(1 - )" ] }, @@ -25562,7 +25936,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyRightwardSpeedMax()", + "RightwardSpeedMax", "log(1 - )" ] }, @@ -25573,7 +25947,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyUpwardSpeedMax()", + "UpwardSpeedMax", "log(1 - )" ] }, @@ -25584,7 +25958,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyDownwardSpeedMax()", + "DownwardSpeedMax", "log(1 - )" ] }, @@ -25595,7 +25969,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFollowFreeAreaLeft()", + "FollowFreeAreaLeft", "log(1 - )" ] }, @@ -25606,7 +25980,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFollowFreeAreaRight()", + "FollowFreeAreaRight", "log(1 - )" ] }, @@ -25617,7 +25991,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFollowFreeAreaTop()", + "FollowFreeAreaTop", "log(1 - )" ] }, @@ -25628,19 +26002,18 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFollowFreeAreaBottom()", + "FollowFreeAreaBottom", "log(1 - )" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "Object.Behavior::PropertyCameraDelay()" + "CameraDelay" ] } ] @@ -25673,11 +26046,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -25735,12 +26109,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -25834,22 +26208,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -25880,7 +26254,7 @@ "parameters": [ "", "=", - "Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * Object.Behavior::PropertyLogLeftwardSpeed())", + "Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * LogLeftwardSpeed)", "Object.Layer()", "0" ] @@ -25897,7 +26271,7 @@ "parameters": [ "", "<", - "Object.Behavior::PropertyOldX() - Object.Behavior::PropertyLeftwardSpeedMax() * TimeDelta()", + "OldX - LeftwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -25911,7 +26285,7 @@ "parameters": [ "", "=", - "Object.Behavior::PropertyOldX() - Object.Behavior::PropertyLeftwardSpeedMax() * TimeDelta()", + "OldX - LeftwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -25944,7 +26318,7 @@ "parameters": [ "", "=", - "Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * Object.Behavior::PropertyLogRightwardSpeed())", + "Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * LogRightwardSpeed)", "Object.Layer()", "0" ] @@ -25961,7 +26335,7 @@ "parameters": [ "", ">", - "Object.Behavior::PropertyOldX() + Object.Behavior::PropertyRightwardSpeedMax() * TimeDelta()", + "OldX + RightwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -25975,7 +26349,7 @@ "parameters": [ "", "=", - "Object.Behavior::PropertyOldX() + Object.Behavior::PropertyRightwardSpeedMax() * TimeDelta()", + "OldX + RightwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -25991,22 +26365,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -26037,7 +26411,7 @@ "parameters": [ "", "=", - "Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * Object.Behavior::PropertyLogUpwardSpeed())", + "Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * LogUpwardSpeed)", "Object.Layer()", "0" ] @@ -26054,7 +26428,7 @@ "parameters": [ "", "<", - "Object.Behavior::PropertyOldY() - Object.Behavior::PropertyUpwardSpeedMax() * TimeDelta()", + "OldY - UpwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -26068,7 +26442,7 @@ "parameters": [ "", "=", - "Object.Behavior::PropertyOldY() - Object.Behavior::PropertyUpwardSpeedMax() * TimeDelta()", + "OldY - UpwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -26101,7 +26475,7 @@ "parameters": [ "", "=", - "Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * Object.Behavior::PropertyLogDownwardSpeed())", + "Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * LogDownwardSpeed)", "Object.Layer()", "0" ] @@ -26118,7 +26492,7 @@ "parameters": [ "", ">", - "Object.Behavior::PropertyOldY() + Object.Behavior::PropertyDownwardSpeedMax() * TimeDelta()", + "OldY + DownwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -26132,7 +26506,7 @@ "parameters": [ "", "=", - "Object.Behavior::PropertyOldY() + Object.Behavior::PropertyDownwardSpeedMax() * TimeDelta()", + "OldY + DownwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] @@ -26184,46 +26558,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + GetArgumentAsNumber(\"WaitingDuration\")" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "GetArgumentAsNumber(\"WaitingSpeedXMax\")" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "GetArgumentAsNumber(\"WaitingSpeedYMax\")" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "GetArgumentAsNumber(\"CatchUpDuration\")" + "NewCatchUpDuration" ] } ] @@ -26260,22 +26630,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -26330,11 +26700,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -26371,17 +26740,16 @@ }, "parameters": [ "ShapePainter", - "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()])", - "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()])" + "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -26427,44 +26795,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -26527,10 +26891,10 @@ }, "parameters": [ "ShapePainter", - "Object.Behavior::PropertyProjectedOldestX()", - "Object.Behavior::PropertyProjectedOldestY()", - "Object.Behavior::PropertyProjectedNewestX()", - "Object.Behavior::PropertyProjectedNewestY()", + "ProjectedOldestX", + "ProjectedOldestY", + "ProjectedNewestX", + "ProjectedNewestY", "1" ] } @@ -26558,8 +26922,8 @@ }, "parameters": [ "ShapePainter", - "Object.Behavior::PropertyForecastedX()", - "Object.Behavior::PropertyForecastedY()", + "ForecastedX", + "ForecastedY", "3" ] }, @@ -26630,11 +26994,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -26645,22 +27009,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -26680,7 +27046,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -26700,11 +27066,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -26715,22 +27081,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -26750,7 +27118,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -26770,13 +27138,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaRight\"))" + "max(0, Value)" ] } ] @@ -26796,7 +27163,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -26816,13 +27183,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaLeft\"))" + "max(0, Value)" ] } ] @@ -26842,7 +27208,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -26862,13 +27228,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, GetArgumentAsNumber(\"FollowFreeAreaTop\"))" + "max(0, Value)" ] } ] @@ -26888,7 +27253,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -26908,13 +27273,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaBottom\"))" + "max(0, Value)" ] } ] @@ -26934,7 +27298,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -26954,13 +27318,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, GetArgumentAsNumber(\"Speed\"))" + "max(0, Value)" ] } ] @@ -26979,8 +27342,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -27000,13 +27363,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, GetArgumentAsNumber(\"Speed\"))" + "max(0, Value)" ] } ] @@ -27026,7 +27388,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -27046,13 +27408,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, GetArgumentAsNumber(\"Speed\"))" + "max(0, Value)" ] } ] @@ -27072,7 +27433,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -27092,13 +27453,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, GetArgumentAsNumber(\"Speed\"))" + "max(0, Value)" ] } ] @@ -27118,7 +27478,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -27138,24 +27498,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, GetArgumentAsNumber(\"LeftwardSpeed\"))" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - Object.Behavior::PropertyLeftwardSpeed())" + "log(1 - Value)" ] } ] @@ -27175,7 +27533,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -27195,24 +27553,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, GetArgumentAsNumber(\"RightwardSpeed\"))" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - Object.Behavior::PropertyRightwardSpeed())" + "log(1 - Value)" ] } ] @@ -27232,7 +27588,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -27252,24 +27608,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, GetArgumentAsNumber(\"DownwardSpeed\"))" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - Object.Behavior::PropertyDownwardSpeed())" + "log(1 - Value)" ] } ] @@ -27289,7 +27643,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -27309,24 +27663,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, GetArgumentAsNumber(\"UpwardSpeed\"))" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - Object.Behavior::PropertyUpwardSpeed())" + "log(1 - Value)" ] } ] @@ -27346,7 +27698,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -27369,7 +27721,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCameraOffsetX()" + "CameraOffsetX" ] } ] @@ -27406,13 +27758,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27466,7 +27817,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"CameraOffsetX\")", + "Value", "" ] } @@ -27487,7 +27838,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -27510,7 +27861,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCameraOffsetY()" + "CameraOffsetY" ] } ] @@ -27541,31 +27892,18 @@ "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27595,6 +27933,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -27607,7 +27957,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"CameraOffsetY\")", + "CameraOffsetY", "" ] } @@ -27648,13 +27998,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, GetArgumentAsNumber(\"ForecastTime\"))" + "min(0, Value)" ] } ] @@ -27674,7 +28023,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -27694,13 +28043,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, GetArgumentAsNumber(\"CameraDelay\"))" + "max(0, Value)" ] } ] @@ -27720,7 +28068,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -27744,7 +28092,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyForecastedX() + Object.Behavior::PropertyCameraOffsetX() - Object.Behavior::PropertyFollowFreeAreaLeft()" + "ForecastedX + CameraOffsetX - FollowFreeAreaLeft" ] } ] @@ -27786,7 +28134,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyForecastedX() + Object.Behavior::PropertyCameraOffsetX() + Object.Behavior::PropertyFollowFreeAreaRight()" + "ForecastedX + CameraOffsetX + FollowFreeAreaRight" ] } ] @@ -27828,7 +28176,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyForecastedY() + Object.Behavior::PropertyCameraOffsetY() + Object.Behavior::PropertyFollowFreeAreaBottom()" + "ForecastedY + CameraOffsetY + FollowFreeAreaBottom" ] } ] @@ -27870,7 +28218,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyForecastedY() + Object.Behavior::PropertyCameraOffsetY() - Object.Behavior::PropertyFollowFreeAreaTop()" + "ForecastedY + CameraOffsetY - FollowFreeAreaTop" ] } ] @@ -27957,7 +28305,7 @@ "parameters": [ "Object", "__SmoothCamera.ObjectX", - "Object.Behavior::PropertyDelayedCenterX()" + "DelayedCenterX" ] }, { @@ -27967,7 +28315,7 @@ "parameters": [ "Object", "__SmoothCamera.ObjectY", - "Object.Behavior::PropertyDelayedCenterY()" + "DelayedCenterY" ] } ] @@ -27990,22 +28338,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -28211,22 +28557,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -28289,13 +28633,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", - "max(0, TimeDelta() * (1 - min(Object.Behavior::PropertyWaitingSpeedXMax() * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), Object.Behavior::PropertyWaitingSpeedYMax() * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" + "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] } ], @@ -28310,7 +28653,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Extra delay: \" + ToString(Object.Behavior::PropertyCameraExtraDelay())", + "\"Extra delay: \" + ToString(CameraExtraDelay)", "\"info\"", "\"SmoothCamera\"" ] @@ -28337,22 +28680,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -28443,13 +28784,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", - "Object.Behavior::PropertyCameraExtraDelay() / Object.Behavior::PropertyCameraDelayCatchUpDuration()" + "CameraExtraDelay / CameraDelayCatchUpDuration" ] } ], @@ -28489,11 +28829,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -28502,13 +28841,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", - "max(0, Object.Behavior::PropertyCameraExtraDelay() -Object.Behavior::PropertyCameraDelayCatchUpSpeed() * TimeDelta())" + "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] } ], @@ -28523,7 +28861,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Catching up delay: \" + ToString(Object.Behavior::PropertyCameraExtraDelay())", + "\"Catching up delay: \" + ToString(CameraExtraDelay)", "\"info\"", "\"SmoothCamera\"" ] @@ -28614,7 +28952,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCameraDelay() + Object.Behavior::PropertyCameraExtraDelay()" + "CameraDelay + CameraExtraDelay" ] } ] @@ -28651,11 +28989,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -28708,22 +29045,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -28739,7 +29074,7 @@ "parameters": [ "Object", "__SmoothCamera.ForecastHistoryTime", - "GetArgumentAsNumber(\"Time\")" + "Time" ] }, { @@ -28749,7 +29084,7 @@ "parameters": [ "Object", "__SmoothCamera.ForecastHistoryX", - "GetArgumentAsNumber(\"ObjectX\")" + "ObjectX" ] }, { @@ -28759,7 +29094,7 @@ "parameters": [ "Object", "__SmoothCamera.ForecastHistoryY", - "GetArgumentAsNumber(\"ObjectY\")" + "ObjectY" ] } ], @@ -28798,7 +29133,7 @@ "Object", "__SmoothCamera.ForecastHistoryTime[0]", "<", - "TimeFromStart() - Object.Behavior::PropertyCameraDelay() - Object.Behavior::PropertyCameraExtraDelay() - Object.Behavior::PropertyForecastHistoryDuration()" + "TimeFromStart() - CameraDelay - CameraExtraDelay - ForecastHistoryDuration" ] } ], @@ -28884,24 +29219,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", - "Object.Behavior::PropertyDelayedCenterX()" + "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", - "Object.Behavior::PropertyDelayedCenterY()" + "DelayedCenterY" ] } ] @@ -28939,22 +29272,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -28979,22 +29310,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -29008,22 +29337,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", - "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()])" + "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -29036,11 +29363,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -29065,22 +29391,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -29094,22 +29418,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", - "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()])" + "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -29122,11 +29444,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -29143,7 +29464,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Mean: \" + ToString(Object.Behavior::PropertyForecastHistoryMeanX()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryMeanY())", + "\"Mean: \" + ToString(ForecastHistoryMeanX) + \" \" + ToString(ForecastHistoryMeanY)", "", "" ] @@ -29180,44 +29501,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -29231,44 +29548,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", - "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanX(), 2)" + "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", - "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanY(), 2)" + "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", - "(Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanX())\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanY())" + "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -29285,7 +29598,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Variances: \" + ToString(Object.Behavior::PropertyForecastHistoryVarianceX()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryVarianceY()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryCovariance())", + "\"Variances: \" + ToString(ForecastHistoryVarianceX) + \" \" + ToString(ForecastHistoryVarianceY) + \" \" + ToString(ForecastHistoryCovariance)", "\"info\"", "\"SmoothCamera\"" ] @@ -29300,7 +29613,7 @@ "value": "Egal" }, "parameters": [ - "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "abs(ForecastHistoryVarianceX)", "<", "1" ] @@ -29310,7 +29623,7 @@ "value": "Egal" }, "parameters": [ - "abs(Object.Behavior::PropertyForecastHistoryVarianceY())", + "abs(ForecastHistoryVarianceY)", "<", "1" ] @@ -29319,24 +29632,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", - "Object.Behavior::PropertyDelayedCenterX()" + "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", - "Object.Behavior::PropertyDelayedCenterY()" + "DelayedCenterY" ] } ] @@ -29355,7 +29666,7 @@ "value": "Egal" }, "parameters": [ - "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "abs(ForecastHistoryVarianceX)", ">=", "1" ] @@ -29365,7 +29676,7 @@ "value": "Egal" }, "parameters": [ - "abs(Object.Behavior::PropertyForecastHistoryVarianceY())", + "abs(ForecastHistoryVarianceY)", ">=", "1" ] @@ -29404,33 +29715,31 @@ "value": "Egal" }, "parameters": [ - "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "abs(ForecastHistoryVarianceX)", ">=", - "abs(Object.Behavior::PropertyForecastHistoryVarianceY())" + "abs(ForecastHistoryVarianceY)" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", - "Object.Behavior::PropertyForecastHistoryCovariance() / Object.Behavior::PropertyForecastHistoryVarianceX()" + "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", - "Object.Behavior::PropertyForecastHistoryMeanY() - Object.Behavior::PropertyForecastHistoryLinearA() * Object.Behavior::PropertyForecastHistoryMeanX()" + "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] } ], @@ -29445,7 +29754,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Linear: \" + ToString(Object.Behavior::PropertyForecastHistoryLinearA()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryLinearB())", + "\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)", "\"info\"", "\"SmoothCamera\"" ] @@ -29506,33 +29815,31 @@ "value": "Egal" }, "parameters": [ - "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "abs(ForecastHistoryVarianceX)", "<", - "abs(Object.Behavior::PropertyForecastHistoryVarianceY())" + "abs(ForecastHistoryVarianceY)" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", - "Object.Behavior::PropertyForecastHistoryCovariance() / Object.Behavior::PropertyForecastHistoryVarianceY()" + "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", - "Object.Behavior::PropertyForecastHistoryMeanX() - Object.Behavior::PropertyForecastHistoryLinearA() * Object.Behavior::PropertyForecastHistoryMeanY()" + "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] } ], @@ -29547,7 +29854,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Linear: \" + ToString(Object.Behavior::PropertyForecastHistoryLinearA()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryLinearB())", + "\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)", "\"info\"", "\"SmoothCamera\"" ] @@ -29601,35 +29908,32 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", - "Object.Behavior::PropertyProjectedOldestX()" + "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", - "Object.Behavior::PropertyProjectedOldestY()" + "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", - "Object.Behavior::PropertyIndex()" + "Index" ] } ] @@ -29640,35 +29944,32 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", - "Object.Behavior::PropertyProjectedNewestX()" + "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", - "Object.Behavior::PropertyProjectedNewestY()" + "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", - "Object.Behavior::PropertyIndex()" + "Index" ] } ] @@ -29686,7 +29987,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Oldest: \" + ToString(Object.Behavior::PropertyProjectedOldestX()) + \" \" + ToString(Object.Behavior::PropertyProjectedOldestY())", + "\"Oldest: \" + ToString(ProjectedOldestX) + \" \" + ToString(ProjectedOldestY)", "\"info\"", "\"SmoothCamera\"" ] @@ -29703,7 +30004,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Newest: \" + ToString(Object.Behavior::PropertyProjectedNewestX()) + \" \" + ToString(Object.Behavior::PropertyProjectedNewestY())", + "\"Newest: \" + ToString(ProjectedNewestX) + \" \" + ToString(ProjectedNewestY)", "\"info\"", "\"SmoothCamera\"" ] @@ -29727,24 +30028,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", - "Object.Behavior::PropertyProjectedNewestX() + ( Object.Behavior::PropertyProjectedNewestX() - Object.Behavior::PropertyProjectedOldestX()) * Object.Behavior::ForecastTimeRatio()" + "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", - "Object.Behavior::PropertyProjectedNewestY() + ( Object.Behavior::PropertyProjectedNewestY() - Object.Behavior::PropertyProjectedOldestY()) * Object.Behavior::ForecastTimeRatio()" + "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] } ] @@ -29759,7 +30058,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Forecasted: \" + ToString(Object.Behavior::PropertyForecastedX()) + \" \" + ToString(Object.Behavior::PropertyForecastedY())", + "\"Forecasted: \" + ToString(ForecastedX) + \" \" + ToString(ForecastedY)", "\"info\"", "\"SmoothCamera\"" ] @@ -29822,24 +30121,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", - "(GetArgumentAsNumber(\"NewestX\") + (GetArgumentAsNumber(\"NewestY\") - Object.Behavior::PropertyForecastHistoryLinearB()) * Object.Behavior::PropertyForecastHistoryLinearA()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", - "GetArgumentAsNumber(\"NewestY\") + (GetArgumentAsNumber(\"NewestX\") * Object.Behavior::PropertyForecastHistoryLinearA() - GetArgumentAsNumber(\"NewestY\") \n+ Object.Behavior::PropertyForecastHistoryLinearB()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] } ] @@ -29850,24 +30147,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", - "(GetArgumentAsNumber(\"OldestX\") + (GetArgumentAsNumber(\"OldestY\") - Object.Behavior::PropertyForecastHistoryLinearB()) * Object.Behavior::PropertyForecastHistoryLinearA()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", - "GetArgumentAsNumber(\"OldestY\") + (GetArgumentAsNumber(\"OldestX\") * Object.Behavior::PropertyForecastHistoryLinearA() - GetArgumentAsNumber(\"OldestY\") \n+ Object.Behavior::PropertyForecastHistoryLinearB()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] } ] @@ -29926,7 +30221,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "- Object.Behavior::PropertyForecastTime() / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))" + "- ForecastTime / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))" ] } ] @@ -30320,6 +30615,7 @@ "fullName": "Smooth platformer camera", "name": "SmoothPlatformerCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -30359,7 +30655,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyFloorFollowFreeAreaTop()", + "FloorFollowFreeAreaTop", "" ] }, @@ -30370,7 +30666,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyFloorFollowFreeAreaBottom()", + "FloorFollowFreeAreaBottom", "" ] }, @@ -30381,7 +30677,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyFloorUpwardSpeed()", + "FloorUpwardSpeed", "" ] }, @@ -30392,7 +30688,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyFloorDownwardSpeed()", + "FloorDownwardSpeed", "" ] }, @@ -30403,7 +30699,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyFloorUpwardSpeedMax()", + "FloorUpwardSpeedMax", "" ] }, @@ -30414,7 +30710,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyFloorDownwardSpeedMax()", + "FloorDownwardSpeedMax", "" ] } @@ -30458,7 +30754,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyAirFollowFreeAreaTop()", + "AirFollowFreeAreaTop", "" ] }, @@ -30469,7 +30765,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyAirFollowFreeAreaBottom()", + "AirFollowFreeAreaBottom", "" ] }, @@ -30480,7 +30776,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyAirUpwardSpeed()", + "AirUpwardSpeed", "" ] }, @@ -30491,7 +30787,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyAirDownwardSpeed()", + "AirDownwardSpeed", "" ] }, @@ -30502,7 +30798,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyAirUpwardSpeedMax()", + "AirUpwardSpeedMax", "" ] }, @@ -30513,7 +30809,7 @@ "parameters": [ "Object", "SmoothCamera", - "Object.Behavior::PropertyAirDownwardSpeedMax()", + "AirDownwardSpeedMax", "" ] } @@ -30665,20 +30961,21 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Third person camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", "name": "ThirdPersonCamera", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Virtual Reality/94e95d2c318e1f3dc7151a351024e13c574e1e44669c6696aa107d60230073f6_Virtual Reality_3d_vision_eye_vr.svg", "shortDescription": "Move the camera to look at an object from a given distance.", - "version": "1.3.0", + "version": "1.7.1", "description": [ "Move the camera to look at an object from a given distance with a rotation and an elevation angles.", "", "It can be useful for:", - "- Third person camera", - "- Isometric-like point of view", - "" + "- 3D platformer games ([open the project online](https://editor.gdevelop.io/?project=example://3d-platformer))", + "- 3D racing games ([open the project online](https://editor.gdevelop.io/?project=example://3d-car-coin-hunt))", + "- Orbit camera controls ([open the project online](https://editor.gdevelop.io/?project=example://3d-tile-based-city-builder))", + "- Isometric-like point of view ([open the project online](https://editor.gdevelop.io/?project=example://3d-road-crosser))" ], "origin": { "identifier": "ThirdPersonCamera", @@ -30714,8 +31011,8 @@ "parameters": [ "", "=", - "GetArgumentAsNumber(\"PositionX\") + GetArgumentAsNumber(\"Distance\") * cos(ToRad(GetArgumentAsNumber(\"RotationAngle\") + 90)) * cos(ToRad(GetArgumentAsNumber(\"ElevationAngle\")))", - "GetArgumentAsString(\"Layer\")", + "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", "" ] }, @@ -30726,8 +31023,8 @@ "parameters": [ "", "=", - "GetArgumentAsNumber(\"PositionY\") + GetArgumentAsNumber(\"Distance\") * sin(ToRad(GetArgumentAsNumber(\"RotationAngle\") + 90)) * cos(ToRad(GetArgumentAsNumber(\"ElevationAngle\")))", - "GetArgumentAsString(\"Layer\")", + "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", "" ] }, @@ -30738,8 +31035,8 @@ "parameters": [ "", "=", - "GetArgumentAsNumber(\"Distance\") * sin(ToRad(GetArgumentAsNumber(\"ElevationAngle\")))", - "GetArgumentAsString(\"Layer\")", + "Distance * sin(ToRad(ElevationAngle))", + "Layer", "" ] }, @@ -30749,10 +31046,10 @@ }, "parameters": [ "", - "GetArgumentAsNumber(\"PositionX\")", - "GetArgumentAsNumber(\"PositionY\")", + "PositionX", + "PositionY", "0", - "GetArgumentAsString(\"Layer\")", + "Layer", "", "" ] @@ -30814,10 +31111,10 @@ "", "Object.CenterX()", "Object.CenterY()", - "GetArgumentAsNumber(\"Distance\")", - "GetArgumentAsNumber(\"RotationAngle\")", - "GetArgumentAsNumber(\"ElevationAngle\")", - "GetArgumentAsString(\"Layer\")", + "Distance", + "RotationAngle", + "ElevationAngle", + "Layer", "" ] } @@ -31209,6 +31506,7 @@ "fullName": "Third person camera", "name": "ThirdPersonCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -31240,7 +31538,19 @@ "Object", "Behavior", "=", - "Object.Behavior::PropertyRotationHalfwayDuration()", + "RotationHalfwayDuration", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetElevationHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "ElevationHalfwayDuration", "" ] }, @@ -31252,7 +31562,7 @@ "Object", "Behavior", "=", - "Object.Behavior::PropertyTranslationZHalfwayDuration()", + "TranslationZHalfwayDuration", "" ] } @@ -31285,46 +31595,44 @@ "conditions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyHasJustBeenCreated" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "HasJustBeenCreated", + "True", + "" ] } ], "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyHasJustBeenCreated" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "HasJustBeenCreated", + "False", "" ] }, { "type": { - "value": "SetCameraAngle" + "value": "SetNumberVariable" }, "parameters": [ - "", + "CameraZ", "=", - "Object.Angle() + 90", - "Object.Layer()", - "0" + "Object.Object3D::CenterZ()" ] }, { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyCameraZ" + "value": "ThirdPersonCamera::ThirdPersonCamera::JumpToTargetedRotation" }, "parameters": [ "Object", "Behavior", - "=", - "Object.Object3D::CenterZ()" + "" ] } ] @@ -31335,11 +31643,12 @@ { "type": { "inverted": true, - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -31393,15 +31702,25 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyIsCalledManually" + "value": "BehaviorActivated" }, "parameters": [ "Object", - "Behavior", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCalledManually", + "False", "" ] }, @@ -31472,11 +31791,10 @@ "conditions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyCameraZ" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraZ", "<", "Object.Behavior::FreeAreaZMin()" ] @@ -31485,11 +31803,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyCameraZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraZ", "=", "Object.Behavior::FreeAreaZMin() + (CameraZ - Object.Behavior::FreeAreaZMin()) * exp(TimeDelta() * TranslationZLogSpeed)" ] @@ -31501,11 +31818,10 @@ "conditions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::PropertyCameraZ" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraZ", ">", "Object.Behavior::FreeAreaZMax()" ] @@ -31514,11 +31830,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyCameraZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraZ", "=", "Object.Behavior::FreeAreaZMax() + (CameraZ - Object.Behavior::FreeAreaZMax()) * exp(TimeDelta() * TranslationZLogSpeed)" ] @@ -31541,16 +31856,80 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "True", + "" + ] + } + ], "actions": [ { "type": { "value": "SetNumberVariable" }, "parameters": [ - "CameraAngle", + "TargetedRotationAngle", "=", - "Object.Angle() + 90 + (AngleDifference(CameraAngle(Object.Layer(), 0), (Object.Angle() + 90))) * exp(TimeDelta() * Object.Behavior::PropertyRotationLogSpeed()) + RotationAngleOffset" + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsElevatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedElevationAngle", + "=", + "Object.Object3D::RotationY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraRotationAngle", + "=", + "TargetedRotationAngle + 90 + RotationAngleOffset + AngleDifference(CameraAngle(Object.Layer()), TargetedRotationAngle + 90 + RotationAngleOffset) * exp(TimeDelta() * RotationLogSpeed)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraElevationAngle", + "=", + "TargetedElevationAngle + ElevationAngleOffset + AngleDifference(90 - Scene3D::CameraRotationX(Object.Layer()), TargetedElevationAngle + ElevationAngleOffset) * exp(TimeDelta() * ElevationLogSpeed)" ] }, { @@ -31559,12 +31938,12 @@ }, "parameters": [ "", - "Object.X() + ThirdPersonCamera::RotatedX(CameraAngle, OffsetX, -OffsetY)", - "Object.Y() + ThirdPersonCamera::RotatedY(CameraAngle, OffsetX, -OffsetY)", + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraRotationAngle, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraRotationAngle, OffsetX, -OffsetY)", "CameraZ + OffsetZ", "Distance", - "CameraAngle", - "Object.Object3D::RotationY() + ElevationAngleOffset", + "CameraRotationAngle", + "CameraElevationAngle", "", "" ] @@ -31573,7 +31952,12 @@ "variables": [ { "folded": true, - "name": "CameraAngle", + "name": "CameraRotationAngle", + "type": "number", + "value": 0 + }, + { + "name": "CameraElevationAngle", "type": "number", "value": 0 } @@ -31598,6 +31982,210 @@ ], "objectGroups": [] }, + { + "description": "Rotate the camera all the way to the targeted angle.", + "fullName": "Rotate the camera all the way", + "functionType": "Action", + "name": "JumpToTargetedRotation", + "sentence": "Rotate the camera all the way to the targeted angle of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsElevatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedElevationAngle", + "=", + "Object.Object3D::RotationY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraAngle", + "=", + "TargetedRotationAngle + 90 + RotationAngleOffset" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraAngle, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraAngle, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "CameraAngle", + "Object.Object3D::RotationY() + ElevationAngleOffset", + "", + "" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "CameraAngle", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the camera rotation.", + "fullName": "Camera rotation", + "functionType": "ExpressionAndCondition", + "name": "RotationAngle", + "private": true, + "sentence": "the camera rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CameraAngle(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the camera all the way to the targeted angle.", + "fullName": "Rotate the camera all the way", + "functionType": "ActionWithOperator", + "getterName": "RotationAngle", + "name": "SetCameraRotation", + "sentence": "Rotate the camera all the way to the targeted angle of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(Value, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(Value, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "Value", + "Object.Object3D::RotationY() + ElevationAngleOffset", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "the halfway time for rotation of the object.", "fullName": "Halfway time for rotation", @@ -31664,22 +32252,122 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyRotationHalfwayDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RotationHalfwayDuration", "=", "Value" ] }, { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyRotationLogSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RotationLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time for elevation rotation of the object.", + "fullName": "Halfway time for elevation rotation", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "ElevationHalfwayDuration", + "sentence": "the halfway time for elevation rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ElevationHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ElevationHalfwayDuration", + "name": "SetElevationHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationLogSpeed", "=", "log(0.5) / Value" ] @@ -31768,22 +32456,20 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyTranslationZHalfwayDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TranslationZHalfwayDuration", "=", "Value" ] }, { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyTranslationZLogSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TranslationZLogSpeed", "=", "log(0.5) / Value" ] @@ -31944,11 +32630,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyFollowFreeAreaZMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaZMax", "=", "Value" ] @@ -32025,11 +32710,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyFollowFreeAreaZMin" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaZMin", "=", "Value" ] @@ -32106,11 +32790,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyDistance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Distance", "=", "Value" ] @@ -32187,11 +32870,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetX", "=", "Value" ] @@ -32268,11 +32950,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetY", "=", "Value" ] @@ -32349,11 +33030,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyOffsetZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -32430,11 +33110,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyRotationAngleOffset" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RotationAngleOffset", "=", "Value" ] @@ -32511,11 +33190,10 @@ "actions": [ { "type": { - "value": "ThirdPersonCamera::ThirdPersonCamera::SetPropertyElevationAngleOffset" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ElevationAngleOffset", "=", "Value" ] @@ -32537,6 +33215,96 @@ } ], "objectGroups": [] + }, + { + "description": "the targeted camera rotation angle of the object. When this angle is set, the camera follow this value instead of the object angle.", + "fullName": "Targeted rotation angle", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "TargetedRotationAngle", + "sentence": "the targeted camera rotation angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TargetedRotationAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TargetedRotationAngle", + "name": "SetTargetedRotationAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "False", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -32555,14 +33323,25 @@ "unit": "Second", "label": "Halfway time for rotation", "group": "Catch-up speed", + "quickCustomizationVisibility": "hidden", "name": "RotationHalfwayDuration" }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Halfway time for elevation rotation", + "group": "Catch-up speed", + "quickCustomizationVisibility": "hidden", + "name": "ElevationHalfwayDuration" + }, { "value": "0.125", "type": "Number", "unit": "Second", "label": "Halfway time on Z axis", "group": "Catch-up speed", + "quickCustomizationVisibility": "hidden", "name": "TranslationZHalfwayDuration" }, { @@ -32620,6 +33399,7 @@ "label": "Follow free area top border on Z axis", "group": "Position", "advanced": true, + "quickCustomizationVisibility": "hidden", "name": "FollowFreeAreaZMax" }, { @@ -32629,6 +33409,7 @@ "label": "Follow free area bottom border on Z axis", "group": "Position", "advanced": true, + "quickCustomizationVisibility": "hidden", "name": "FollowFreeAreaZMin" }, { @@ -32638,6 +33419,13 @@ "hidden": true, "name": "RotationLogSpeed" }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "ElevationLogSpeed" + }, { "value": "", "type": "Number", @@ -32666,6 +33454,38 @@ "label": "", "hidden": true, "name": "HasJustBeenCreated" + }, + { + "value": "true", + "type": "Boolean", + "label": "Automatically rotate the camera with the object", + "quickCustomizationVisibility": "hidden", + "name": "IsRotatingWithObject" + }, + { + "value": "false", + "type": "Boolean", + "label": "Automatically rotate the camera with the object (elevation)", + "quickCustomizationVisibility": "hidden", + "name": "IsElevatingWithObject" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Targeted camera rotation angle", + "description": "When this angle is set, the camera follow this value instead of the object angle.", + "hidden": true, + "name": "TargetedRotationAngle" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Targeted camera rotation angle", + "description": "When this angle is set, the camera follow this value instead of the object angle.", + "hidden": true, + "name": "TargetedElevationAngle" } ], "sharedPropertyDescriptors": [] @@ -32678,7 +33498,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "3D grid jump", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LXVwLWJvbGQtYm94LW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsN0wxNywxMkgxNFYxNkgxMFYxMkg3TDEyLDdNMTksMjFINUEyLDIgMCAwLDEgMywxOVY1QTIsMiAwIDAsMSA1LDNIMTlBMiwyIDAgMCwxIDIxLDVWMTlBMiwyIDAgMCwxIDE5LDIxTTE5LDE5VjVINVYxOUgxOVoiIC8+PC9zdmc+", "name": "GridJump3D", @@ -32686,6 +33506,10 @@ "shortDescription": "Move objects by jumping on a grid like a frog.", "version": "0.1.0", "description": "It can be used for board games.", + "origin": { + "identifier": "GridJump3D", + "name": "gdevelop-extension-store" + }, "tags": [ "jump", "3d", From b7d0c7a1965545219cc13eb267765d63c30f5809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 14:59:45 +0200 Subject: [PATCH 5/7] Add shadows --- examples/3d-lane-runner/3d-lane-runner.json | 227 +++----------------- 1 file changed, 30 insertions(+), 197 deletions(-) diff --git a/examples/3d-lane-runner/3d-lane-runner.json b/examples/3d-lane-runner/3d-lane-runner.json index 9ded8ca33..278cdf950 100644 --- a/examples/3d-lane-runner/3d-lane-runner.json +++ b/examples/3d-lane-runner/3d-lane-runner.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 231, + "build": 236, "major": 5, "minor": 5, "revision": 0 @@ -1555,6 +1555,8 @@ "crossfadeDuration": 0.5, "depth": 143, "height": 143, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Femal Casual 2.glb", @@ -1716,7 +1718,9 @@ "rightFaceResourceRepeat": false, "topFaceResourceRepeat": true, "bottomFaceResourceRepeat": false, - "materialType": "StandardWithoutMetalness" + "materialType": "StandardWithoutMetalness", + "isCastingShadow": true, + "isReceivingShadow": true } }, { @@ -1759,7 +1763,9 @@ "rightFaceResourceRepeat": false, "topFaceResourceRepeat": true, "bottomFaceResourceRepeat": false, - "materialType": "StandardWithoutMetalness" + "materialType": "StandardWithoutMetalness", + "isCastingShadow": true, + "isReceivingShadow": true } }, { @@ -1779,6 +1785,8 @@ "crossfadeDuration": 0, "depth": 99, "height": 99, + "isCastingShadow": true, + "isReceivingShadow": true, "keepAspectRatio": true, "materialType": "KeepOriginal", "modelResourceName": "Spike Group.glb", @@ -1811,6 +1819,8 @@ "crossfadeDuration": 0, "depth": 18.752, "height": 62.66935348510742, + "isCastingShadow": true, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "KeepOriginal", "modelResourceName": "Coin.glb", @@ -3199,7 +3209,7 @@ "isLightingLayer": false, "isLocked": false, "name": "", - "renderingType": "2d+3d", + "renderingType": "", "visibility": true, "cameras": [ { @@ -3216,14 +3226,14 @@ "effects": [ { "effectType": "Scene3D::HemisphereLight", - "name": "Effect", + "name": "HemisphereLight", "doubleParameters": { - "elevation": 45, - "intensity": 0.8, + "elevation": 90, + "intensity": 0.5, "rotation": 0 }, "stringParameters": { - "groundColor": "255;255;255", + "groundColor": "192;192;192", "skyColor": "253;255;219", "top": "Y-" }, @@ -3231,7 +3241,7 @@ }, { "effectType": "Scene3D::LinearFog", - "name": "Effect2", + "name": "Fog", "doubleParameters": { "far": 2500, "near": 200 @@ -3243,17 +3253,22 @@ }, { "effectType": "Scene3D::DirectionalLight", - "name": "Effect3", + "name": "DirectionalLight", "doubleParameters": { + "distanceFromCamera": 700, "elevation": 45, - "intensity": 0.3, - "rotation": 0 + "frustumSize": 2800, + "intensity": 0.5, + "minimumShadowBias": 0, + "rotation": 235 }, "stringParameters": { "color": "254;255;235", "top": "Y-" }, - "booleanParameters": {} + "booleanParameters": { + "isCastingShadow": true + } } ] }, @@ -3446,6 +3461,8 @@ "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Coin.glb", @@ -4502,18 +4519,12 @@ "value": "", "type": "Boolean", "label": "Only follow the position", - "description": "", - "group": "", - "extraInformation": [], "name": "OnlyFollowPosition" }, { "value": "", "type": "Boolean", "label": "Destroy when the object it's stuck on is destroyed", - "description": "", - "group": "", - "extraInformation": [], "name": "IsDestroyedWithParent" } ], @@ -14124,18 +14135,14 @@ "value": "255;0;0", "type": "Color", "label": "Start color", - "description": "", "group": "Color", - "extraInformation": [], "name": "StartColor" }, { "value": "255;255;0", "type": "Color", "label": "End color", - "description": "", "group": "Color", - "extraInformation": [], "name": "EndColor" }, { @@ -14143,9 +14150,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Start opacity", - "description": "", "group": "Color", - "extraInformation": [], "name": "StartOpacity" }, { @@ -14153,18 +14158,13 @@ "type": "Number", "unit": "Dimensionless", "label": "End opacity", - "description": "", "group": "Color", - "extraInformation": [], "name": "EndOpacity" }, { "value": "50", "type": "Number", "label": "Flow of particles (particles per second)", - "description": "", - "group": "", - "extraInformation": [], "name": "Flow" }, { @@ -14172,9 +14172,7 @@ "type": "Number", "unit": "Pixel", "label": "Start min size", - "description": "", "group": "Size", - "extraInformation": [], "name": "StartSizeMin" }, { @@ -14182,9 +14180,7 @@ "type": "Number", "unit": "Pixel", "label": "Start max size", - "description": "", "group": "Size", - "extraInformation": [], "name": "StartSizeMax" }, { @@ -14192,9 +14188,7 @@ "type": "Number", "unit": "Dimensionless", "label": "End scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "EndScale" }, { @@ -14202,9 +14196,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Start min speed", - "description": "", "group": "Speed", - "extraInformation": [], "name": "StartSpeedMin" }, { @@ -14212,9 +14204,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Start max speed", - "description": "", "group": "Speed", - "extraInformation": [], "name": "StartSpeedMax" }, { @@ -14222,9 +14212,6 @@ "type": "Number", "unit": "Second", "label": "Min lifespan", - "description": "", - "group": "", - "extraInformation": [], "name": "LifespanMin" }, { @@ -14232,9 +14219,6 @@ "type": "Number", "unit": "Second", "label": "Max lifespan", - "description": "", - "group": "", - "extraInformation": [], "name": "LifespanMax" }, { @@ -14242,18 +14226,13 @@ "type": "Number", "unit": "Second", "label": "Emission duration", - "description": "", - "group": "", - "extraInformation": [], "name": "Duration" }, { "value": "", "type": "Boolean", "label": "Particles move with the emitter", - "description": "", "group": "Speed", - "extraInformation": [], "name": "AreParticlesRelative" }, { @@ -14261,16 +14240,13 @@ "type": "Number", "unit": "DegreeAngle", "label": "Spay cone angle", - "description": "", "group": "Position", - "extraInformation": [], "name": "SpayConeAngle" }, { "value": "Additive", "type": "Choice", "label": "Blending", - "description": "", "group": "Color", "extraInformation": [ "Normal", @@ -14285,7 +14261,6 @@ "value": "Y-", "type": "Choice", "label": "Gravity top", - "description": "", "group": "Speed", "extraInformation": [ "Y-", @@ -14298,18 +14273,13 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Gravity", - "description": "", "group": "Speed", - "extraInformation": [], "name": "Gravity" }, { "value": "true", "type": "Boolean", "label": "Delete when emission ends", - "description": "", - "group": "", - "extraInformation": [], "name": "ShouldAutodestruct" }, { @@ -14317,8 +14287,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -14329,7 +14297,6 @@ "label": "Z (elevation)", "description": "Deprecated", "group": "Position", - "extraInformation": [], "hidden": true, "name": "Z" }, @@ -14338,9 +14305,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation on X axis", - "description": "", "group": "Position", - "extraInformation": [], "hidden": true, "name": "RotationX" }, @@ -14349,9 +14314,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation on Y axis", - "description": "", "group": "Position", - "extraInformation": [], "hidden": true, "name": "RotationY" } @@ -15424,18 +15387,12 @@ "value": "true", "type": "Boolean", "label": "Horizontal wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalWrapping" }, { "value": "true", "type": "Boolean", "label": "Vertical wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalWrapping" }, { @@ -15443,9 +15400,6 @@ "type": "Number", "unit": "Pixel", "label": "Top border of wrapped area (Y)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderTop" }, { @@ -15453,9 +15407,6 @@ "type": "Number", "unit": "Pixel", "label": "Left border of wrapped area (X)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderLeft" }, { @@ -15464,8 +15415,6 @@ "unit": "Pixel", "label": "Right border of wrapped area (X)", "description": "If blank, the value will be the scene width.", - "group": "", - "extraInformation": [], "name": "BorderRight" }, { @@ -15474,8 +15423,6 @@ "unit": "Pixel", "label": "Bottom border of wrapped area (Y)", "description": "If blank, the value will be scene height.", - "group": "", - "extraInformation": [], "name": "BorderBottom" }, { @@ -15483,9 +15430,6 @@ "type": "Number", "unit": "Pixel", "label": "Number of pixels past the center where the object teleports and appears", - "description": "", - "group": "", - "extraInformation": [], "name": "TriggerOffset" } ], @@ -16730,8 +16674,6 @@ "value": "", "type": "Behavior", "label": "Physics Behavior", - "description": "", - "group": "", "extraInformation": [ "Physics2::Physics2Behavior" ], @@ -16741,18 +16683,12 @@ "value": "true", "type": "Boolean", "label": "Horizontal wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalWrapping" }, { "value": "true", "type": "Boolean", "label": "Vertical wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalWrapping" }, { @@ -16760,9 +16696,6 @@ "type": "Number", "unit": "Pixel", "label": "Top border of wrapped area (Y)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderTop" }, { @@ -16770,9 +16703,6 @@ "type": "Number", "unit": "Pixel", "label": "Left border of wrapped area (X)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderLeft" }, { @@ -16781,8 +16711,6 @@ "unit": "Pixel", "label": "Right border of wrapped area (X)", "description": "If blank, the value will be the scene width.", - "group": "", - "extraInformation": [], "name": "BorderRight" }, { @@ -16791,8 +16719,6 @@ "unit": "Pixel", "label": "Bottom border of wrapped area (Y)", "description": "If blank, the value will be scene height.", - "group": "", - "extraInformation": [], "name": "BorderBottom" }, { @@ -16800,18 +16726,12 @@ "type": "Number", "unit": "Pixel", "label": "Number of pixels past the center where the object teleports and appears", - "description": "", - "group": "", - "extraInformation": [], "name": "TriggerOffset" }, { "value": "0", "type": "Number", "label": "Angular Velocity", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AngularVelocity" }, @@ -16819,9 +16739,6 @@ "value": "0", "type": "Number", "label": "Linear Velocity X", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LinearVelocityX" }, @@ -16829,9 +16746,6 @@ "value": "0", "type": "Number", "label": "Linear Velocity Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LinearVelocityY" } @@ -17961,8 +17875,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -17970,8 +17882,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -17986,9 +17896,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -17996,9 +17903,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -18006,9 +17910,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -18016,9 +17917,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -19511,16 +19409,12 @@ "value": "0", "type": "Number", "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", "label": "Left padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -19531,7 +19425,6 @@ "value": "0", "type": "Number", "label": "Right padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -19542,7 +19435,6 @@ "value": "0", "type": "Number", "label": "Top padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -19553,7 +19445,6 @@ "value": "0", "type": "Number", "label": "Bottom padding", - "description": "", "group": "Padding", "extraInformation": [ "Label" @@ -19564,9 +19455,6 @@ "value": "0.25", "type": "Number", "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], "name": "HoveredFadeOutDuration" } ], @@ -22636,8 +22524,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -22648,9 +22534,6 @@ "type": "Number", "unit": "Pixel", "label": "Lane depth", - "description": "", - "group": "", - "extraInformation": [], "quickCustomizationVisibility": "hidden", "name": "LaneDepth" }, @@ -22659,9 +22542,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Lane", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Lane" }, @@ -22669,9 +22549,6 @@ "value": "1", "type": "Number", "label": "Targeted lane", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetedLane" }, @@ -22679,9 +22556,6 @@ "value": "", "type": "Boolean", "label": "Has changed of lane", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasChangedOfLane" }, @@ -22690,9 +22564,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Minimum lane", - "description": "", - "group": "", - "extraInformation": [], "quickCustomizationVisibility": "hidden", "name": "LaneMin" }, @@ -22701,9 +22572,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Maximum lane", - "description": "", - "group": "", - "extraInformation": [], "quickCustomizationVisibility": "hidden", "name": "LaneMax" }, @@ -22712,9 +22580,6 @@ "type": "Number", "unit": "Second", "label": "Lane change duration", - "description": "", - "group": "", - "extraInformation": [], "quickCustomizationVisibility": "visible", "name": "LaneChangeDuration" }, @@ -22722,9 +22587,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustBeenCreated" } @@ -22934,9 +22796,6 @@ "type": "Number", "unit": "Pixel", "label": "X offset", - "description": "", - "group": "", - "extraInformation": [], "advanced": true, "name": "OffsetX" }, @@ -22945,9 +22804,6 @@ "type": "Number", "unit": "Pixel", "label": "Y offset", - "description": "", - "group": "", - "extraInformation": [], "advanced": true, "name": "OffsetY" }, @@ -22956,9 +22812,6 @@ "type": "Number", "unit": "Pixel", "label": "Camera distance", - "description": "", - "group": "", - "extraInformation": [], "name": "Distance" }, { @@ -22966,9 +22819,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Camera elevation angle", - "description": "", - "group": "", - "extraInformation": [], "name": "ElevationAngle" }, { @@ -22976,9 +22826,7 @@ "type": "Number", "unit": "Second", "label": "Halfway time on Z axis", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "advanced": true, "name": "TranslationZHalfwayDuration" }, @@ -22986,9 +22834,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TranslationZLogSpeed" } @@ -23294,9 +23139,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Rotation speed", - "description": "", - "group": "", - "extraInformation": [], "name": "RotationSpeed" } ], @@ -24437,9 +24279,6 @@ "value": "", "type": "String", "label": "Default player name", - "description": "", - "group": "", - "extraInformation": [], "name": "DefaultPlayerName" }, { @@ -24447,9 +24286,6 @@ "type": "Number", "unit": "Dimensionless", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Score" }, @@ -24457,9 +24293,6 @@ "value": "", "type": "LeaderboardId", "label": "Leaderboard", - "description": "", - "group": "", - "extraInformation": [], "name": "LeaderboardId" } ], From a6d8cd32f3ca97acfb3097afbd214830632dfdad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 15:00:53 +0200 Subject: [PATCH 6/7] Update extensions --- examples/3d-lane-runner/3d-lane-runner.json | 264 +++++++++++++++++--- 1 file changed, 227 insertions(+), 37 deletions(-) diff --git a/examples/3d-lane-runner/3d-lane-runner.json b/examples/3d-lane-runner/3d-lane-runner.json index 278cdf950..488b83059 100644 --- a/examples/3d-lane-runner/3d-lane-runner.json +++ b/examples/3d-lane-runner/3d-lane-runner.json @@ -4543,20 +4543,14 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZpcmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTcuNjYgMTEuMkMxNy40MyAxMC45IDE3LjE1IDEwLjY0IDE2Ljg5IDEwLjM4QzE2LjIyIDkuNzggMTUuNDYgOS4zNSAxNC44MiA4LjcyQzEzLjMzIDcuMjYgMTMgNC44NSAxMy45NSAzQzEzIDMuMjMgMTIuMTcgMy43NSAxMS40NiA0LjMyQzguODcgNi40IDcuODUgMTAuMDcgOS4wNyAxMy4yMkM5LjExIDEzLjMyIDkuMTUgMTMuNDIgOS4xNSAxMy41NUM5LjE1IDEzLjc3IDkgMTMuOTcgOC44IDE0LjA1QzguNTcgMTQuMTUgOC4zMyAxNC4wOSA4LjE0IDEzLjkzQzguMDggMTMuODggOC4wNCAxMy44MyA4IDEzLjc2QzYuODcgMTIuMzMgNi42OSAxMC4yOCA3LjQ1IDguNjRDNS43OCAxMCA0Ljg3IDEyLjMgNSAxNC40N0M1LjA2IDE0Ljk3IDUuMTIgMTUuNDcgNS4yOSAxNS45N0M1LjQzIDE2LjU3IDUuNyAxNy4xNyA2IDE3LjdDNy4wOCAxOS40MyA4Ljk1IDIwLjY3IDEwLjk2IDIwLjkyQzEzLjEgMjEuMTkgMTUuMzkgMjAuOCAxNy4wMyAxOS4zMkMxOC44NiAxNy42NiAxOS41IDE1IDE4LjU2IDEyLjcyTDE4LjQzIDEyLjQ2QzE4LjIyIDEyIDE3LjY2IDExLjIgMTcuNjYgMTEuMk0xNC41IDE3LjVDMTQuMjIgMTcuNzQgMTMuNzYgMTggMTMuNCAxOC4xQzEyLjI4IDE4LjUgMTEuMTYgMTcuOTQgMTAuNSAxNy4yOEMxMS42OSAxNyAxMi40IDE2LjEyIDEyLjYxIDE1LjIzQzEyLjc4IDE0LjQzIDEyLjQ2IDEzLjc3IDEyLjMzIDEzQzEyLjIxIDEyLjI2IDEyLjIzIDExLjYzIDEyLjUgMTAuOTRDMTIuNjkgMTEuMzIgMTIuODkgMTEuNyAxMy4xMyAxMkMxMy45IDEzIDE1LjExIDEzLjQ0IDE1LjM3IDE0LjhDMTUuNDEgMTQuOTQgMTUuNDMgMTUuMDggMTUuNDMgMTUuMjNDMTUuNDYgMTYuMDUgMTUuMSAxNi45NSAxNC41IDE3LjVIMTQuNVoiIC8+PC9zdmc+", "name": "ParticleEmitter3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", - "shortDescription": "Display a large number of particles to create visual effects.", - "version": "2.1.1", + "shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.", + "version": "2.2.0", "description": [ - "Particle emitters can be used to display:", - "- Fire", - "- Smoke", - "- Splashes", - "- Lights", + "3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.", "", - "Breaking change", - "- 2.0.0", - " - Object properties for position and rotation have been removed. They must be set with the instance editor or the action.", - "- 1.0.0", - " - Particles were 3 times too small" + "The parameters of the object can be configured in multiple different ways to create a specific desired effect. GDevelop will give a set of a pre-configured 3D particle emitters that you should try first.", + "", + "Use these 3D particle emitters in 3D games. For 2D games or particles that appear on a game's 2D user interface, use the 2D particle emitter object instead." ], "origin": { "identifier": "ParticleEmitter3D", @@ -4574,6 +4568,16 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Object properties for position and rotation have been removed. They must be set with the instance editor or the action." + }, + { + "version": "1.0.0", + "breaking": "- Particles were 3 times too small." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], @@ -4593,6 +4597,8 @@ " return;", "}", "", + "const game = runtimeScene.getGame();", + "", "class ParticleEmitter3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", " constructor(", " object,", @@ -4619,6 +4625,7 @@ " this._object.getZ()", " );", "", + " // Force the scale to 1 because the particle emitter doesn't really has a size.", " threeObject3D.scale.set(", " this._object.isFlippedX() ? -1 : 1,", " this._object.isFlippedY() ? -1 : 1,", @@ -4631,6 +4638,89 @@ " }", "}", "", + "const coneLength = 64;", + "", + "class ParticleEmitterHelper 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 = 'ParticleEmitterHelper';", + "", + " const coneGeometry = new THREE.BufferGeometry();", + " const conePositions = [", + " 0, 0, 0, 0, 0, 1,", + " 0, 0, 0, 1, 0, 1,", + " 0, 0, 0, - 1, 0, 1,", + " 0, 0, 0, 0, 1, 1,", + " 0, 0, 0, 0, - 1, 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(", + " Math.cos(p1), Math.sin(p1), 1,", + " Math.cos(p2), Math.sin(p2), 1", + " );", + " }", + " 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, 0, 0, coneLength", + " ], 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();", + "", + " 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() {", + " const coneWidth = coneLength * Math.sin(gdjs.toRad(this.object._getSpayConeAngle()));", + " const coneHeight = coneLength * Math.cos(gdjs.toRad(this.object._getSpayConeAngle()));", + " this.cone.scale.set(coneWidth, coneWidth, coneHeight);", + " const startColor = gdjs.rgbOrHexStringToNumber(this.object._getStartColor())", + " const endColor = gdjs.rgbOrHexStringToNumber(this.object._getEndColor());", + " this.cone.material.color.set(endColor);", + " this.centerLine.material.color.set(startColor);", + " this.originBox.material.color.set(startColor);", + " }", + "}", + "", "/**", " * @param {string} colorString", " * @param {THREE.Vector4} threeColor", @@ -4821,6 +4911,11 @@ " break;", " }", " }", + "", + " setImage(resourceName) {", + " const texture = game.getImageManager().getThreeTexture(resourceName);", + " this.particleSystem.texture = texture;", + " }", "}", "", "", @@ -11197,6 +11292,7 @@ "gdjs.__particleEmmiter3DExtension = {", " ParticleEmitter3DRenderer,", " ParticleEmitterAdapter,", + " ParticleEmitterHelper,", "", " ApplyCollision,", " ApplyForce,", @@ -11410,37 +11506,34 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const BatchedRenderer = gdjs.__particleEmmiter3DExtension.BatchedRenderer;", - "const ParticleSystem = gdjs.__particleEmmiter3DExtension.ParticleSystem;", - "const TextureLoader = gdjs.__particleEmmiter3DExtension.TextureLoader;", - "const IntervalValue = gdjs.__particleEmmiter3DExtension.IntervalValue;", - "const ConstantValue = gdjs.__particleEmmiter3DExtension.ConstantValue;", - "const ConstantColor = gdjs.__particleEmmiter3DExtension.ConstantColor;", - "const ColorOverLife = gdjs.__particleEmmiter3DExtension.ColorOverLife;", - "const SizeOverLife = gdjs.__particleEmmiter3DExtension.SizeOverLife;", - "const ApplyForce = gdjs.__particleEmmiter3DExtension.ApplyForce;", - "const Gradient = gdjs.__particleEmmiter3DExtension.Gradient;", - "const PiecewiseBezier = gdjs.__particleEmmiter3DExtension.PiecewiseBezier;", - "const Bezier = gdjs.__particleEmmiter3DExtension.Bezier;", - "const PointEmitter = gdjs.__particleEmmiter3DExtension.PointEmitter;", - "const ConeEmitter = gdjs.__particleEmmiter3DExtension.ConeEmitter;", - "const RenderMode = gdjs.__particleEmmiter3DExtension.RenderMode;", + "const {", + " ParticleEmitterAdapter,", + " ParticleEmitter3DRenderer,", + " ParticleEmitterHelper,", "", - "const { ParticleEmitterAdapter, ParticleEmitter3DRenderer } = gdjs.__particleEmmiter3DExtension;", + " ParticleSystem,", + " IntervalValue,", + " ConstantValue,", + " ConstantColor,", + " ColorOverLife,", + " SizeOverLife,", + " ApplyForce,", + " Gradient,", + " PiecewiseBezier,", + " Bezier,", + " PointEmitter,", + " ConeEmitter,", + " RenderMode", + "} = gdjs.__particleEmmiter3DExtension;", "", "/** @type {gdjs.CustomRuntimeObject} */", "const object = objects[0];", "", "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", "const gameScene = object.getRuntimeScene();", + "const game = runtimeScene.getGame();", "", - "/** @type {SpriteObjectDataType} */", - "const particleSpriteData = object._instanceContainer._objects.get(\"Particle\");", - "const resourceName = particleSpriteData.animations[0].directions[0].sprites[0].image;", - "const texture = object", - " .getInstanceContainer()", - " .getGame()", - " .getImageManager().getThreeTexture(resourceName);", + "const texture = game.getImageManager().getThreeTexture('');", "", "// Set the blending here because changes are not applied after the emitter creation.", "const blendingString = object._getBlending();", @@ -11522,8 +11615,15 @@ "", "const particleEmitter3DRenderer = new ParticleEmitter3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", "object._renderer = particleEmitter3DRenderer;", - "particleEmitter3DRenderer._threeGroup = particleSystem.emitter;", - "layer.getRenderer().add3DRendererObject(particleSystem.emitter);", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const particleEmitterHelper = new ParticleEmitterHelper(object);", + " particleEmitter3DRenderer._threeGroup = particleEmitterHelper;", + " layer.getRenderer().add3DRendererObject(particleEmitterHelper);", + "}", + "else {", + " particleEmitter3DRenderer._threeGroup = particleSystem.emitter;", + " layer.getRenderer().add3DRendererObject(particleSystem.emitter);", + "}", "", "particleSystem.emitter.updateMatrixWorld(true);", "", @@ -11875,6 +11975,15 @@ "Object.GravityTop()", "" ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::UpdateImage" + }, + "parameters": [ + "Object", + "" + ] } ], "events": [ @@ -11964,6 +12073,87 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "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 particleEmitterHelper = objects[0].get3DRendererObject();", + " particleEmitterHelper.update();", + "}" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update particle image", + "functionType": "Action", + "name": "UpdateImage", + "private": true, + "sentence": "Update particle image of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */\r", + "const object = objects[0];\r", + "/** @type {SpriteObjectDataType} */\r", + "const particleSpriteData = object._instanceContainer._objects.get(\"Particle\");\r", + "/** @type {gdjs.SpriteAnimationData} */\r", + "const animation = particleSpriteData.animations[0];\r", + "const animationFrame = animation ? animation.directions[0].sprites[0] : null;\r", + "const resourceName = animationFrame ? animationFrame.image : '';\r", + "object.__particleEmitterAdapter.setImage(resourceName);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true } ], "parameters": [ From bab0187143e07724a711df4d050ceba9ea96a5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 9 Jul 2025 15:34:25 +0200 Subject: [PATCH 7/7] Optimize shadows --- examples/3d-road-crosser/3d-road-crosser.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/3d-road-crosser/3d-road-crosser.json b/examples/3d-road-crosser/3d-road-crosser.json index f41e72c69..0af65be8c 100644 --- a/examples/3d-road-crosser/3d-road-crosser.json +++ b/examples/3d-road-crosser/3d-road-crosser.json @@ -7977,9 +7977,9 @@ "effectType": "Scene3D::DirectionalLight", "name": "DirectionalLight", "doubleParameters": { - "distanceFromCamera": 1500, + "distanceFromCamera": 1000, "elevation": 45, - "frustumSize": 4000, + "frustumSize": 2500, "intensity": 1, "minimumShadowBias": 0, "rotation": 225