From 0bc23cf2bca81c61f4eb8eafbffa23a689acc6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Mon, 20 Jul 2026 16:04:25 +0200 Subject: [PATCH 1/3] Fix spot light intensity in examples for the next release --- .../starting-first-person-horror.json | 7 ++++--- .../starting-first-person-shooter-horror.json | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/starting-first-person-horror/starting-first-person-horror.json b/examples/starting-first-person-horror/starting-first-person-horror.json index 389a2b130..63bfea1a4 100644 --- a/examples/starting-first-person-horror/starting-first-person-horror.json +++ b/examples/starting-first-person-horror/starting-first-person-horror.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 274, "major": 5, "minor": 6, "revision": 0 @@ -245,6 +245,7 @@ "mangledName": "Game_32Scene", "name": "Game Scene", "r": 255, + "renderer3DWorldScale": 100, "standardSortMethod": true, "stopSoundsOnStartup": true, "title": "", @@ -1539,10 +1540,10 @@ "effects": [], "behaviors": [], "content": { - "Intensity": 2.5, + "Intensity": 30, "ConeLength": 4000, "ConeAngle": 22, - "Decay": 10, + "Decay": 2, "Smoothing": 0.15, "ShadowBias": 0.0001 } diff --git a/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json b/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json index fb9358a69..f53732a27 100644 --- a/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json +++ b/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 274, "major": 5, "minor": 6, "revision": 0 @@ -286,6 +286,7 @@ "mangledName": "Game_32Scene", "name": "Game Scene", "r": 255, + "renderer3DWorldScale": 100, "standardSortMethod": true, "stopSoundsOnStartup": true, "title": "", @@ -343,6 +344,7 @@ "variables": [ { "name": "ControlKind", + "persistentUuid": "03908beb-fd7b-48af-9758-799cc5c69e23", "type": "string", "value": "Keyboard" } @@ -1870,8 +1872,8 @@ "effects": [], "behaviors": [], "content": { - "Decay": 10, - "Intensity": 2.5, + "Decay": 2, + "Intensity": 30, "ConeAngle": 22, "ConeLength": 4000, "Smoothing": 0.15, From 59074395e47b466868778e41234624efba708083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Mon, 20 Jul 2026 16:25:50 +0200 Subject: [PATCH 2/3] [3D platformer] Add 2 point lights around the gem --- examples/3d-platformer/3d-platformer.json | 7359 ++++++++++++++++++++- 1 file changed, 7206 insertions(+), 153 deletions(-) diff --git a/examples/3d-platformer/3d-platformer.json b/examples/3d-platformer/3d-platformer.json index ac0465bff..2dda25994 100644 --- a/examples/3d-platformer/3d-platformer.json +++ b/examples/3d-platformer/3d-platformer.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 274, "major": 5, "minor": 6, "revision": 0 @@ -18,6 +18,7 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "", + "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "3D Platformer", "description": "", @@ -88,7 +89,6 @@ "platformer" ], "playableDevices": [ - "mobile", "mobile" ], "extensionProperties": [], @@ -403,6 +403,7 @@ "mangledName": "GameScene", "name": "GameScene", "r": 116, + "renderer3DWorldScale": 100, "standardSortMethod": true, "stopSoundsOnStartup": true, "title": "", @@ -492,11 +493,13 @@ { "folded": true, "name": "ControlKind", + "persistentUuid": "454bdf00-fc7d-4697-944c-58832eb22070", "type": "string", "value": "Keyboard" }, { "name": "IsCameraLocked", + "persistentUuid": "abe9e223-814b-40d9-814c-542a1c38eb3c", "type": "boolean", "value": false } @@ -1515,6 +1518,40 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 40, + "layer": "", + "name": "GemSpotLight", + "persistentUuid": "bae5ee85-875f-48e2-9578-e1a0ece3723e", + "rotationY": 90, + "width": 40, + "x": 2350, + "y": 300, + "z": 960, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 40, + "layer": "", + "name": "GemSpotLight2", + "persistentUuid": "1bbf9a1d-6226-4e55-b8d7-6fbd5578083d", + "rotationY": 270, + "width": 40, + "x": 2350, + "y": 300, + "z": 352, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -2318,6 +2355,7 @@ { "assetStoreId": "", "name": "BigPlatform", + "persistentUuid": "4b24c6fc-7062-44c5-942a-a6f0451f39f9", "type": "DecoratedPlatform::BigPlatform", "variant": "", "variables": [], @@ -3128,6 +3166,7 @@ { "assetStoreId": "b020e1a3cbe7df9c232e95642957670699cd58376e80b6c8d59912c656700f29", "name": "GemPink", + "persistentUuid": "5f6b0f8d-8bce-4990-acdc-fa92bbde0b9e", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -3199,6 +3238,7 @@ { "assetStoreId": "", "name": "GemParticles", + "persistentUuid": "52b62400-becb-4c87-8f30-06cc1119bb7f", "type": "ParticleEmitter3D::ParticleEmitter3D", "variant": "", "variables": [], @@ -3307,6 +3347,38 @@ "CornerRadius": 8, "Padding": 5 } + }, + { + "assetStoreId": "", + "name": "GemSpotLight", + "persistentUuid": "49638f70-0a0e-487f-8f99-61d641b01f70", + "type": "Light3D::SpotLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "Color": "255;101;171", + "Intensity": 500, + "ConeAngle": 60, + "IsCastingShadow": false + } + }, + { + "assetStoreId": "", + "name": "GemSpotLight2", + "persistentUuid": "ea4a24e4-bea1-409f-900a-41630f3d9c19", + "type": "Light3D::SpotLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "Color": "255;101;171", + "Intensity": 20, + "ConeAngle": 60, + "IsCastingShadow": false + } } ], "objectsFolderStructure": { @@ -3404,6 +3476,12 @@ }, { "objectName": "GemParticles" + }, + { + "objectName": "GemSpotLight" + }, + { + "objectName": "GemSpotLight2" } ] }, @@ -4099,6 +4177,7 @@ { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "Background", "gdevelopVersion": "", @@ -4297,12 +4376,21 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "CreateObjectOnCylinder" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "Crab", "gdevelopVersion": "", @@ -4470,12 +4558,21 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "Flatten" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "Player", "gdevelopVersion": "", @@ -4582,12 +4679,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "PushBack" + } + ] + }, "eventsBasedBehaviors": [ { "description": "", "fullName": "Player", + "helpPath": "", + "iconUrl": "", "name": "Player", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4847,6 +4955,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4926,6 +5042,7 @@ { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "SteamPipe", "gdevelopVersion": "", @@ -5164,12 +5281,21 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "PushCharacterUpward" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "", "gdevelopVersion": "", @@ -5186,12 +5312,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Rotate around itself.", "fullName": "Collectible", + "helpPath": "", + "iconUrl": "", "name": "Collectible", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5327,6 +5459,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "Explode" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5354,6 +5497,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "3D character keyboard mapper", "gdevelopVersion": ">=5.5.222", @@ -5378,12 +5522,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Control a 3D physics character with a keyboard for a platformer or a top-down game.", "fullName": "3D platformer keyboard mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DKeyboardMapper", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5986,6 +6136,20 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "LockedCameraAngle" + }, + { + "functionName": "SetLockedCameraAngle" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6076,8 +6240,11 @@ { "description": "Control a 3D physics character with a keyboard for a first or third person shooter.", "fullName": "3D shooter keyboard mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DKeyboardMapper", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6227,6 +6394,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6299,6 +6474,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -8523,12 +8699,113 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -9012,6 +9289,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9124,8 +9409,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -9238,6 +9526,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9340,8 +9636,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -9443,6 +9742,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9565,8 +9872,11 @@ { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -9807,6 +10117,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -9887,6 +10198,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -9967,6 +10279,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -10047,6 +10360,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -10127,6 +10441,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -10207,6 +10522,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -10287,6 +10603,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -10367,6 +10684,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -10447,6 +10765,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -10483,6 +10802,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10667,8 +11071,11 @@ { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -10952,6 +11359,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11064,8 +11479,11 @@ { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11643,6 +12061,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11738,6 +12164,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -13722,12 +14149,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -14626,6 +15135,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -14706,6 +15216,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -14786,6 +15297,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -14878,6 +15390,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -14957,8 +15539,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15445,6 +16030,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -15525,8 +16130,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -15700,6 +16308,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15768,8 +16384,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -15864,159 +16483,178 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "choices": [], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Walk joystick", - "group": "Controls", - "choices": [ - { - "label": "Primary", - "value": "Primary" - }, - { - "label": "Secondary", - "value": "Secondary" - } - ], - "name": "JoystickIdentifier" - }, - { - "value": "A", - "type": "String", - "label": "Jump button name", - "group": "Controls", - "name": "JumpButton" - } - ], - "propertiesFolderStructure": { + "eventsFunctionsFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "PhysicsCharacter3D" - }, - { - "propertyName": "ControllerIdentifier" - }, - { - "folderName": "Controls", - "children": [ - { - "propertyName": "JoystickIdentifier" - }, - { - "propertyName": "JumpButton" - } - ] + "functionName": "doStepPreEvents" } ] - } - }, - { - "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" - }, - "parameters": [ - "", - ">", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -16085,8 +16723,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -16327,6 +16968,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -16407,6 +17049,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -16487,6 +17130,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -16567,6 +17211,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -16647,6 +17292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -16727,6 +17373,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -16807,6 +17454,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -16887,6 +17535,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -16967,6 +17616,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -17003,6 +17653,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -17193,8 +17928,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -17307,6 +18045,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -17395,8 +18141,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -17903,6 +18652,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -17993,8 +18750,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -19055,6 +19815,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -19127,6 +19888,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -19199,6 +19961,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -19232,6 +19995,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -19346,6 +20188,7 @@ { "author": "PANDAKO-GitHub", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Mouse Pointer Lock", "gdevelopVersion": ">=5.5.222", @@ -20123,12 +20966,68 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "RequestPointerLock" + }, + { + "functionName": "ExitPointerLock" + }, + { + "functionName": "isPointerLocked" + }, + { + "functionName": "isPointerActuallyLocked" + }, + { + "functionName": "isEmulatingPointerLock" + }, + { + "functionName": "IsMoving" + }, + { + "functionName": "MovementX" + }, + { + "functionName": "SetMovementX" + }, + { + "functionName": "MovementY" + }, + { + "functionName": "SetMovementY" + }, + { + "functionName": "TouchX" + }, + { + "functionName": "TouchY" + }, + { + "functionName": "TouchSpeedFactor" + }, + { + "functionName": "SetTouchSpeedFactor" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control camera rotations with a mouse.", "fullName": "First person camera mouse mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonPointerMapper", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -20403,6 +21302,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalSpeed", + "group": "First person camera mouse mapper configuration", "name": "SetHorizontalSpeed", "sentence": "", "events": [ @@ -20483,6 +21383,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalSpeed", + "group": "First person camera mouse mapper configuration", "name": "SetVerticalSpeed", "sentence": "", "events": [ @@ -20563,6 +21464,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera mouse mapper configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -20643,6 +21545,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera mouse mapper configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -20723,6 +21626,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera mouse mapper configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -20759,6 +21663,57 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera mouse mapper configuration", + "children": [ + { + "functionName": "HorizontalSpeed" + }, + { + "functionName": "SetHorizontalSpeed" + }, + { + "functionName": "VerticalSpeed" + }, + { + "functionName": "SetVerticalSpeed" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + }, + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20845,6 +21800,7 @@ { "author": "", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Advanced movements for 3D physics characters", "gdevelopVersion": ">=5.5.222", @@ -20887,12 +21843,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Let 3D physics characters jump shortly after leaving a platform and also jump in mid-air.", "fullName": "Coyote time and air jump for 3D", + "helpPath": "", + "iconUrl": "", "name": "AdvancedJump3D", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -22458,6 +23420,63 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "onActivate" + }, + { + "folderName": "Coyote time", + "children": [ + { + "functionName": "SetCoyoteTime" + }, + { + "functionName": "CanCoyoteJump" + }, + { + "functionName": "UpdateWasInTheAir" + } + ] + }, + { + "folderName": "Air jump", + "children": [ + { + "functionName": "AirJumpsMax" + }, + { + "functionName": "SetAirJumpCountMaximum" + }, + { + "functionName": "RemainingAirJumps" + }, + { + "functionName": "RemoveOneRemainingAirJump" + }, + { + "functionName": "ResetAirJumpCounter" + }, + { + "functionName": "AreFloorJumpCountedAsAirJump" + } + ] + }, + { + "functionName": "WasJumpKeyPressed" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -22570,6 +23589,7 @@ { "author": "", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "3D physics character animator", "gdevelopVersion": ">=5.5.222", @@ -22599,12 +23619,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Change animations of a 3D physics character automatically.", "fullName": "3D physics character animator", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCharacter3DAnimator", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -22922,6 +23948,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationSpeed", + "group": "3D physics character animator configuration", "name": "SetRotationSpeed", "sentence": "", "events": [ @@ -22958,6 +23985,25 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "3D physics character animator configuration", + "children": [ + { + "functionName": "RotationSpeed" + }, + { + "functionName": "SetRotationSpeed" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -23064,6 +24110,7 @@ { "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "3D ellipse movement", "gdevelopVersion": ">=5.5.222", @@ -23108,12 +24155,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Move objects on ellipses or smoothly back and forth in one direction.", "fullName": "3D ellipse movement", + "helpPath": "", + "iconUrl": "", "name": "PhysicsEllipseMovement3D", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -24371,6 +25424,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Width", + "group": "3D ellipse movement ellipse configuration", "name": "SetWidth", "sentence": "", "events": [ @@ -24451,6 +25505,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Height", + "group": "3D ellipse movement ellipse configuration", "name": "SetHeight", "sentence": "", "events": [ @@ -24532,7 +25587,7 @@ "fullName": "Loop duration", "functionType": "ActionWithOperator", "getterName": "LoopDuration", - "group": "Elliptical movement configuration", + "group": "Configuration", "name": "SetLoopDuration", "sentence": "Change the loop duration of _PARAM0_ to _PARAM2_", "events": [ @@ -24769,6 +25824,81 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "IsTurningLeft" + }, + { + "functionName": "SetTurningLeft" + }, + { + "functionName": "ToggleTurningLeft" + }, + { + "functionName": "MovementAngle" + }, + { + "functionName": "SetMovementAngle" + }, + { + "folderName": "Configuration", + "children": [ + { + "functionName": "CenterV" + }, + { + "functionName": "CenterH" + }, + { + "functionName": "LoopDuration" + }, + { + "functionName": "SetLoopDuration" + } + ] + }, + { + "folderName": "3D ellipse movement ellipse configuration", + "children": [ + { + "functionName": "Width" + }, + { + "functionName": "SetWidth" + }, + { + "functionName": "Height" + }, + { + "functionName": "SetHeight" + } + ] + }, + { + "functionName": "DeltaH" + }, + { + "functionName": "DeltaV" + }, + { + "functionName": "DirectionAngle" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24952,6 +26082,7 @@ { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "", "gdevelopVersion": "", @@ -25173,6 +26304,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "CreateRandomGrid" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -25185,10 +26324,13 @@ "defaultName": "", "description": "", "fullName": "", + "helpPath": "", + "iconUrl": "", "is3D": true, "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ThinPlatform", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -25394,6 +26536,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + } + ] + }, "propertyDescriptors": [], "propertiesFolderStructure": { "folderName": "__ROOT" @@ -25410,10 +26560,13 @@ "defaultName": "", "description": "", "fullName": "", + "helpPath": "", + "iconUrl": "", "is3D": true, "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": true, "name": "BigPlatform", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -25531,7 +26684,8 @@ "snap": false, "zoomFactor": 2.1212310076834346, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "eventsFunctions": [ { @@ -25726,6 +26880,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + } + ] + }, "propertyDescriptors": [ { "value": "false", @@ -25755,6 +26917,7 @@ { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "3D object shake", "gdevelopVersion": ">=5.5.222", @@ -27080,12 +28243,80 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "Noise2d" + }, + { + "functionName": "Noise3d" + }, + { + "functionName": "Noise4d" + }, + { + "functionName": "Create" + }, + { + "functionName": "Delete" + }, + { + "functionName": "DeleteAll" + }, + { + "functionName": "SetSeed" + }, + { + "functionName": "SetLoopPeriodX" + }, + { + "functionName": "SetLoopPeriodY" + }, + { + "functionName": "SetFrequency" + }, + { + "functionName": "SetOctaves" + }, + { + "functionName": "SetPersistence" + }, + { + "functionName": "SetLacunarity" + }, + { + "functionName": "Seed" + }, + { + "functionName": "Frequency" + }, + { + "functionName": "Octaves" + }, + { + "functionName": "Persistence" + }, + { + "functionName": "Lacunarity" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Shake 3D objects with translation and rotation.", "fullName": "3D shake", + "helpPath": "", + "iconUrl": "", "name": "ShakeModel3D", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -28134,6 +29365,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Frequency", + "group": "ShakeObject3D configuration", "name": "SetFrequency", "sentence": "", "events": [ @@ -28367,6 +29599,52 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "Shake" + }, + { + "functionName": "StartShaking" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + }, + { + "functionName": "IsStopping" + }, + { + "folderName": "ShakeObject3D configuration", + "children": [ + { + "functionName": "Frequency" + }, + { + "functionName": "SetFrequency" + } + ] + }, + { + "functionName": "StartEasingFactor" + }, + { + "functionName": "StopEasingFactor" + } + ] + }, "propertyDescriptors": [ { "value": "0", @@ -28599,6 +29877,7 @@ { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D collision", "gdevelopVersion": ">=5.5.222", @@ -29507,12 +30786,63 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "onFirstSceneLoaded" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "AreWithinDistance" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SqDistance" + }, + { + "functionName": "DistanceToPosition" + }, + { + "functionName": "SqDistanceToPosition" + }, + { + "functionName": "SeparateFromObjects" + } + ] + }, + { + "folderName": "Objects", + "children": [ + { + "functionName": "PickNearest" + } + ] + }, + { + "folderName": "Collision", + "children": [ + { + "functionName": "AreInCollision" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "Advanced 3D tween", "gdevelopVersion": ">=5.5.222", @@ -30302,12 +31632,67 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "folderName": "Color", + "children": [ + { + "functionName": "SetTint" + }, + { + "functionName": "SetTintNumber" + } + ] + }, + { + "functionName": "RgbMean" + }, + { + "functionName": "RgbToNumber" + }, + { + "functionName": "onSceneUnloading" + }, + { + "functionName": "StretchZ" + }, + { + "functionName": "SetStretchZ" + }, + { + "functionName": "StretchY" + }, + { + "functionName": "SetStretchY" + }, + { + "functionName": "ScaleVolume" + }, + { + "functionName": "SetScaleVolume" + }, + { + "functionName": "EaseExp" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Smoothly squash, strentch and tint 3D models.", "fullName": "Advanced 3D tween", + "helpPath": "", + "iconUrl": "", "name": "Tween3D", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -30392,6 +31777,7 @@ "fullName": "Stretch on Z axis", "functionType": "ActionWithOperator", "getterName": "StretchZ", + "group": "Size", "name": "SetStretchZ", "sentence": "", "events": [ @@ -30537,6 +31923,7 @@ "fullName": "Stretch on Z axis", "functionType": "ActionWithOperator", "getterName": "StretchY", + "group": "Size", "name": "SetStretchY", "sentence": "", "events": [ @@ -30682,6 +32069,7 @@ "fullName": "Stretch on Z axis", "functionType": "ActionWithOperator", "getterName": "ScaleVolume", + "group": "Size", "name": "SetScaleVolume", "sentence": "", "events": [ @@ -33327,6 +34715,166 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "folderName": "Size", + "children": [ + { + "functionName": "StretchZ" + }, + { + "functionName": "SetStretchZ" + }, + { + "functionName": "StretchY" + }, + { + "functionName": "SetStretchY" + }, + { + "functionName": "ScaleVolume" + }, + { + "functionName": "SetScaleVolume" + }, + { + "functionName": "TweenStretchZ" + }, + { + "functionName": "TweenStretchY" + }, + { + "functionName": "TweenScaleVolume" + } + ] + }, + { + "folderName": "Color", + "children": [ + { + "functionName": "Tint" + }, + { + "functionName": "TweenTint" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "TweenPositionZ" + }, + { + "functionName": "TweenDepth" + } + ] + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "TweenRotationX" + }, + { + "functionName": "TweenRotationY" + } + ] + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TweenedValue" + }, + { + "functionName": "TweenedColor" + }, + { + "functionName": "ExponentTweenedValue" + }, + { + "functionName": "StartTween" + }, + { + "functionName": "Type" + }, + { + "functionName": "SetType" + }, + { + "functionName": "Time" + }, + { + "functionName": "SetTime" + }, + { + "functionName": "Duration" + }, + { + "functionName": "SetDuration" + }, + { + "functionName": "Easing" + }, + { + "functionName": "SetEasing" + }, + { + "functionName": "InitialValue" + }, + { + "functionName": "SetInitialValue" + }, + { + "functionName": "TargetedValue" + }, + { + "functionName": "SetTargetedValue" + }, + { + "functionName": "IsPaused" + }, + { + "functionName": "SetPaused" + }, + { + "functionName": "StopTween" + }, + { + "functionName": "PauseTween" + }, + { + "functionName": "ResumeTween" + }, + { + "functionName": "RemoveTween" + }, + { + "functionName": "Exists" + }, + { + "functionName": "IsPlaying" + }, + { + "functionName": "HasFinished" + }, + { + "functionName": "Progress" + }, + { + "functionName": "TweenIdentifier" + }, + { + "functionName": "InvalidateTweenIdentifiers" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -33377,8 +34925,11 @@ { "description": "Squash and stretch a 3D model in loop.", "fullName": "3D wobble", + "helpPath": "", + "iconUrl": "", "name": "Wobble", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -33694,6 +35245,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ScaleMin", + "group": "3D wobble scale configuration", "name": "SetScaleMin", "sentence": "", "events": [ @@ -33774,6 +35326,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ScaleMax", + "group": "3D wobble scale configuration", "name": "SetScaleMax", "sentence": "", "events": [ @@ -34208,6 +35761,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PeriodDuration", + "group": "3D wobble configuration", "name": "SetPeriodDuration", "sentence": "", "events": [ @@ -34288,6 +35842,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ScalePeriodOffset", + "group": "3D wobble scale configuration", "name": "SetScalePeriodOffset", "sentence": "", "events": [ @@ -34368,6 +35923,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StretchMin", + "group": "3D wobble stretch configuration", "name": "SetStretchMin", "sentence": "", "events": [ @@ -34448,6 +36004,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StretchMax", + "group": "3D wobble stretch configuration", "name": "SetStretchMax", "sentence": "", "events": [ @@ -34528,6 +36085,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StretchPeriodOffset", + "group": "3D wobble stretch configuration", "name": "SetStretchPeriodOffset", "sentence": "", "events": [ @@ -34564,6 +36122,89 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "3D wobble scale configuration", + "children": [ + { + "functionName": "ScaleMin" + }, + { + "functionName": "SetScaleMin" + }, + { + "functionName": "ScaleMax" + }, + { + "functionName": "SetScaleMax" + }, + { + "functionName": "TweenScaleMin" + }, + { + "functionName": "TweenScaleMax" + }, + { + "functionName": "ScalePeriodOffset" + }, + { + "functionName": "SetScalePeriodOffset" + } + ] + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "UpdateScaleVolume" + }, + { + "functionName": "UpdateStretch" + }, + { + "folderName": "3D wobble configuration", + "children": [ + { + "functionName": "PeriodDuration" + }, + { + "functionName": "SetPeriodDuration" + } + ] + }, + { + "folderName": "3D wobble stretch configuration", + "children": [ + { + "functionName": "StretchMin" + }, + { + "functionName": "SetStretchMin" + }, + { + "functionName": "StretchMax" + }, + { + "functionName": "SetStretchMax" + }, + { + "functionName": "StretchPeriodOffset" + }, + { + "functionName": "SetStretchPeriodOffset" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "0.75", @@ -34813,6 +36454,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Third person camera", "gdevelopVersion": ">=5.5.222", @@ -35479,12 +37121,46 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "LookFromDistanceAtPosition" + }, + { + "functionName": "LookFromDistanceAtObject" + }, + { + "functionName": "LookFromDistanceAtPosition3D" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromDistanceAtObject3D" + } + ] + }, + { + "functionName": "RotatedX" + }, + { + "functionName": "RotatedY" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Smoothly follow an object at a distance.", "fullName": "Third person camera", + "helpPath": "", + "iconUrl": "", "name": "ThirdPersonCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -36543,6 +38219,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationHalfwayDuration", + "group": "Third person camera configuration", "name": "SetRotationHalfwayDuration", "sentence": "", "events": [ @@ -36645,6 +38322,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ElevationHalfwayDuration", + "group": "Third person camera configuration", "name": "SetElevationHalfwayDuration", "sentence": "", "events": [ @@ -36747,6 +38425,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TranslationZHalfwayDuration", + "group": "Third person camera configuration", "name": "SetTranslationZHalfwayDuration", "sentence": "", "events": [ @@ -36933,6 +38612,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FollowFreeAreaZMax", + "group": "Third person camera configuration", "name": "SetFollowFreeAreaZMax", "sentence": "", "events": [ @@ -37013,6 +38693,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FollowFreeAreaZMin", + "group": "Third person camera configuration", "name": "SetFollowFreeAreaZMin", "sentence": "", "events": [ @@ -37093,6 +38774,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Distance", + "group": "Third person camera configuration", "name": "SetDistance", "sentence": "", "events": [ @@ -37173,6 +38855,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Third person camera configuration", "name": "SetOffsetX", "sentence": "", "events": [ @@ -37253,6 +38936,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Third person camera configuration", "name": "SetOffsetY", "sentence": "", "events": [ @@ -37333,6 +39017,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "Third person camera configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -37413,6 +39098,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationAngleOffset", + "group": "Third person camera configuration", "name": "SetRotationAngleOffset", "sentence": "", "events": [ @@ -37493,6 +39179,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ElevationAngleOffset", + "group": "Third person camera configuration", "name": "SetElevationAngleOffset", "sentence": "", "events": [ @@ -37573,6 +39260,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TargetedRotationAngle", + "group": "Third person camera configuration", "name": "SetTargetedRotationAngle", "sentence": "", "events": [ @@ -37619,6 +39307,129 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "Slerp" + }, + { + "functionName": "MoveToObject" + }, + { + "functionName": "UpdateLocalBasis" + }, + { + "functionName": "JumpToTargetedRotation" + }, + { + "functionName": "RotationAngle" + }, + { + "functionName": "SetCameraRotation" + }, + { + "folderName": "Third person camera configuration", + "children": [ + { + "functionName": "RotationHalfwayDuration" + }, + { + "functionName": "SetRotationHalfwayDuration" + }, + { + "functionName": "ElevationHalfwayDuration" + }, + { + "functionName": "SetElevationHalfwayDuration" + }, + { + "functionName": "TranslationZHalfwayDuration" + }, + { + "functionName": "SetTranslationZHalfwayDuration" + }, + { + "functionName": "FollowFreeAreaZMax" + }, + { + "functionName": "SetFollowFreeAreaZMax" + }, + { + "functionName": "FollowFreeAreaZMin" + }, + { + "functionName": "SetFollowFreeAreaZMin" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SetDistance" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + }, + { + "functionName": "RotationAngleOffset" + }, + { + "functionName": "SetRotationAngleOffset" + }, + { + "functionName": "ElevationAngleOffset" + }, + { + "functionName": "SetElevationAngleOffset" + }, + { + "functionName": "TargetedRotationAngle" + }, + { + "functionName": "SetTargetedRotationAngle" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaZMin" + }, + { + "functionName": "FreeAreaZMax" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -37948,6 +39759,7 @@ { "author": "D8H", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Stick objects to others", "gdevelopVersion": ">=5.5.222", @@ -38313,12 +40125,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "IsStuck" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Stick the object to another. Use the action to stick the object, or unstick it later.", "fullName": "Sticker", + "helpPath": "", + "iconUrl": "", "name": "Sticker", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -38574,6 +40400,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Stick" + }, + { + "functionName": "Unstick" + }, + { + "functionName": "onDestroy" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -38606,6 +40455,7 @@ { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -45473,6 +47323,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "onScenePreEvents" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -45485,9 +47346,12 @@ "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": true, "name": "ParticleEmitter3D", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": true, @@ -46539,6 +48403,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Z", + "group": "Position", "name": "SetZ", "private": true, "sentence": "", @@ -46611,6 +48476,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationX", + "group": "Angle", "name": "SetRotationX", "private": true, "sentence": "", @@ -46694,6 +48560,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationY", + "group": "Angle", "name": "SetRotationY", "private": true, "sentence": "", @@ -46776,6 +48643,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartColor", + "group": "3D particle emitter color configuration", "name": "SetStartColor", "sentence": "", "events": [ @@ -46858,6 +48726,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndColor", + "group": "3D particle emitter color configuration", "name": "SetEndColor", "sentence": "", "events": [ @@ -46940,6 +48809,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartOpacity", + "group": "3D particle emitter color configuration", "name": "SetStartOpacity", "sentence": "", "events": [ @@ -47022,6 +48892,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndOpacity", + "group": "3D particle emitter color configuration", "name": "SetEndOpacity", "sentence": "", "events": [ @@ -47104,6 +48975,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Flow", + "group": "3D particle emitter configuration", "name": "SetFlow", "sentence": "", "events": [ @@ -47187,6 +49059,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSizeMin", + "group": "3D particle emitter configuration", "name": "SetStartSizeMin", "sentence": "", "events": [ @@ -47269,6 +49142,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSizeMax", + "group": "3D particle emitter configuration", "name": "SetStartSizeMax", "sentence": "", "events": [ @@ -47352,6 +49226,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndScale", + "group": "3D particle emitter configuration", "name": "SetEndScale", "sentence": "", "events": [ @@ -47435,6 +49310,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSpeedMin", + "group": "3D particle emitter speed configuration", "name": "SetStartSpeedMin", "sentence": "", "events": [ @@ -47517,6 +49393,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSpeedMax", + "group": "3D particle emitter speed configuration", "name": "SetStartSpeedMax", "sentence": "", "events": [ @@ -47599,6 +49476,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LifespanMin", + "group": "3D particle emitter configuration", "name": "SetLifespanMin", "sentence": "", "events": [ @@ -47682,6 +49560,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LifespanMax", + "group": "3D particle emitter configuration", "name": "SetLifespanMax", "sentence": "", "events": [ @@ -47765,6 +49644,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Duration", + "group": "3D particle emitter configuration", "name": "SetDuration", "sentence": "", "events": [ @@ -47986,6 +49866,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "SpayConeAngle", + "group": "3D particle emitter configuration", "name": "SetSpayConeAngle", "sentence": "", "events": [ @@ -48070,6 +49951,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Blending", + "group": "3D particle emitter color configuration", "name": "SetBlending", "private": true, "sentence": "", @@ -48155,6 +50037,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "GravityTop", + "group": "3D particle emitter speed configuration", "name": "SetGravityTop", "sentence": "", "events": [ @@ -48238,6 +50121,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Gravity", + "group": "3D particle emitter speed configuration", "name": "SetGravity", "sentence": "", "events": [ @@ -48407,6 +50291,201 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "RegisterInLayer" + }, + { + "functionName": "Delete" + }, + { + "functionName": "HasEnded" + }, + { + "functionName": "Restart" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "Z" + }, + { + "functionName": "SetZ" + } + ] + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "RotationX" + }, + { + "functionName": "SetRotationX" + }, + { + "functionName": "RotationY" + }, + { + "functionName": "SetRotationY" + } + ] + }, + { + "folderName": "3D particle emitter color configuration", + "children": [ + { + "functionName": "StartColor" + }, + { + "functionName": "SetStartColor" + }, + { + "functionName": "EndColor" + }, + { + "functionName": "SetEndColor" + }, + { + "functionName": "StartOpacity" + }, + { + "functionName": "SetStartOpacity" + }, + { + "functionName": "EndOpacity" + }, + { + "functionName": "SetEndOpacity" + }, + { + "functionName": "Blending" + }, + { + "functionName": "SetBlending" + } + ] + }, + { + "folderName": "3D particle emitter configuration", + "children": [ + { + "functionName": "Flow" + }, + { + "functionName": "SetFlow" + }, + { + "functionName": "StartSizeMin" + }, + { + "functionName": "SetStartSizeMin" + }, + { + "functionName": "StartSizeMax" + }, + { + "functionName": "SetStartSizeMax" + }, + { + "functionName": "EndScale" + }, + { + "functionName": "SetEndScale" + }, + { + "functionName": "LifespanMin" + }, + { + "functionName": "SetLifespanMin" + }, + { + "functionName": "LifespanMax" + }, + { + "functionName": "SetLifespanMax" + }, + { + "functionName": "Duration" + }, + { + "functionName": "SetDuration" + }, + { + "functionName": "SpayConeAngle" + }, + { + "functionName": "SetSpayConeAngle" + }, + { + "functionName": "ShouldAutodestruct" + }, + { + "functionName": "SetShouldAutodestruct" + } + ] + }, + { + "folderName": "3D particle emitter speed configuration", + "children": [ + { + "functionName": "StartSpeedMin" + }, + { + "functionName": "SetStartSpeedMin" + }, + { + "functionName": "StartSpeedMax" + }, + { + "functionName": "SetStartSpeedMax" + }, + { + "functionName": "AreParticlesRelative" + }, + { + "functionName": "SetAreParticlesRelative" + }, + { + "functionName": "GravityTop" + }, + { + "functionName": "SetGravityTop" + }, + { + "functionName": "Gravity" + }, + { + "functionName": "SetGravity" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "255;0;0", @@ -48718,6 +50797,7 @@ { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D raycast", "gdevelopVersion": ">=5.5.222", @@ -49400,12 +51480,65 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "folderName": "Collision", + "children": [ + { + "functionName": "RaycastWithAngle" + }, + { + "functionName": "RaycastBetweenPosition" + }, + { + "functionName": "RaycastFromCameraCenter" + }, + { + "functionName": "RaycastFromCameraPoint" + }, + { + "functionName": "RaycastFromCameraCursor" + } + ] + }, + { + "functionName": "Distance" + }, + { + "functionName": "IntersectionX" + }, + { + "functionName": "IntersectionY" + }, + { + "functionName": "IntersectionZ" + }, + { + "functionName": "NormalX" + }, + { + "functionName": "NormalY" + }, + { + "functionName": "NormalZ" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D model 9-patch", "gdevelopVersion": ">=5.5.222", @@ -49482,6 +51615,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SetInnerSize" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -49494,9 +51635,12 @@ "defaultName": "", "description": "A 3D model with corners that don't stretch and sides that can be tiled.", "fullName": "3D model 9-patch", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "Model9Patch3D", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -51446,6 +53590,35 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Create9Patch" + }, + { + "functionName": "Create9PatchSlice" + }, + { + "functionName": "TileOnX" + }, + { + "functionName": "TileOnY" + }, + { + "functionName": "TileOnXY" + }, + { + "functionName": "CreateZPlan" + } + ] + }, "propertyDescriptors": [ { "value": "100", @@ -51954,9 +54127,12 @@ "defaultName": "Model9Patch3D", "description": "A 3D model with corners that don't stretch and sides that can be tiled.", "fullName": "3D model 9-patch (single depth)", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": false, "name": "Model9Patch3DSingleDepth", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -53771,6 +55947,35 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Create9Patch" + }, + { + "functionName": "Create9PatchSlice" + }, + { + "functionName": "TileOnX" + }, + { + "functionName": "TileOnY" + }, + { + "functionName": "TileOnXY" + }, + { + "functionName": "CreateZPlan" + } + ] + }, "propertyDescriptors": [ { "value": "100", @@ -54179,6 +56384,7 @@ { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "", "gdevelopVersion": "", @@ -54195,12 +56401,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "", "fullName": "", + "helpPath": "", + "iconUrl": "", "name": "Respawn3D", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -54335,6 +56547,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "Respawn" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -54408,6 +56631,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Screen Orientation Checker", "gdevelopVersion": ">=5.5.222", @@ -54509,6 +56733,20 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "ProjectOrientation" + }, + { + "functionName": "onFirstSceneLoaded" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -54521,9 +56759,12 @@ "defaultName": "", "description": "Automatically display a screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Set up Anchor behavior on this object so that top/bottom/left/right edges are anchored to the screen top/bottom/left/right.", "fullName": "Screen Orientation Checker", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ScreenOrientationChecker", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -55507,6 +57748,32 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "DrawBackground" + }, + { + "functionName": "IsForceShown" + }, + { + "functionName": "SetIsForceShown" + }, + { + "functionName": "Message" + }, + { + "functionName": "SetMessage" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -55838,6 +58105,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "3D Platformer thrid person camera", "gdevelopVersion": "", @@ -55858,12 +58126,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Allow players to rotate the camera and move the character in the camera direction.", "fullName": "3D Platformer thrid person camera", + "helpPath": "", + "iconUrl": "", "name": "PlatformerCamera3D", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -56679,6 +58953,20 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "WasBackwardKeyPressed" + }, + { + "functionName": "WasStickUsed" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -56837,6 +59125,4771 @@ } ], "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Visual effect", + "dimension": "3D", + "extensionNamespace": "", + "fullName": "3D lights", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/3d-light", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWxpZ2h0YnVsYi1vbi1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLDExSDIzVjEzSDIwVjExTTEsMTFINFYxM0gxVjExTTEzLDFWNEgxMVYxSDEzTTQuOTIsMy41TDcuMDUsNS42NEw1LjYzLDcuMDVMMy41LDQuOTNMNC45MiwzLjVNMTYuOTUsNS42M0wxOS4wNywzLjVMMjAuNSw0LjkzTDE4LjM3LDcuMDVMMTYuOTUsNS42M00xMiw2QTYsNiAwIDAsMSAxOCwxMkMxOCwxNC4yMiAxNi43OSwxNi4xNiAxNSwxNy4yVjE5QTEsMSAwIDAsMSAxNCwyMEgxMEExLDEgMCAwLDEgOSwxOVYxNy4yQzcuMjEsMTYuMTYgNiwxNC4yMiA2LDEyQTYsNiAwIDAsMSAxMiw2TTE0LDIxVjIyQTEsMSAwIDAsMSAxMywyM0gxMUExLDEgMCAwLDEgMTAsMjJWMjFIMTRNMTEsMThIMTNWMTUuODdDMTQuNzMsMTUuNDMgMTYsMTMuODYgMTYsMTJBNCw0IDAgMCwwIDEyLDhBNCw0IDAgMCwwIDgsMTJDOCwxMy44NiA5LjI3LDE1LjQzIDExLDE1Ljg3VjE4WiIgLz48L3N2Zz4=", + "name": "Light3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f237ae4e3b857c556846c7b2c0b132556fd4bcdeff217034b4d9c97dc1aab1d6_lightbulb-on-outline.svg", + "shortDescription": "A collection of light object for 3D.", + "version": "1.0.1", + "description": "A collection of light object for 3D.", + "origin": { + "identifier": "Light3D", + "name": "gdevelop-extension-store" + }, + "tags": [ + "3d", + "light" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Define spot light helper classes JavaScript code.", + "fullName": "Define spot light helper classes", + "functionType": "Action", + "name": "DefineSpotLightHelperClasses", + "private": true, + "sentence": "Define spot light helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__light3DExtension.spot) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.SpotLight, _getIsCastingShadow: () => boolean, _getConeAngle: () => number, _getColor: () => string}} SpotLightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "", + "const coneLength = 64;", + "", + "class SpotLightHelper extends THREE.Object3D {", + " /** @type {SpotLightRuntimeObject} */", + " object;", + " /** @type {THREE.LineSegments} */", + " cone;", + " /** @type {THREE.LineSegments} */", + " centerLine;", + " /** @type {THREE.Mesh} */", + " originBox;", + "", + "\t/**", + " * @param {SpotLightRuntimeObject} object", + "\t */", + " constructor(object) {", + " super();", + " this.object = object;", + " this.type = 'SpotLightHelper';", + "", + " const coneGeometry = new THREE.BufferGeometry();", + " const conePositions = [", + " 0, 0, 0, 1, 0, 0,", + " 0, 0, 0, 1, 1, 0,", + " 0, 0, 0, 1, - 1, 0,", + " 0, 0, 0, 1, 0, 1,", + " 0, 0, 0, 1, 0, - 1", + " ];", + " for (let i = 0, j = 1, l = 32; i < l; i++ , j++) {", + " const p1 = (i / l) * Math.PI * 2;", + " const p2 = (j / l) * Math.PI * 2;", + " conePositions.push(", + " 1, Math.cos(p1), Math.sin(p1),", + " 1, Math.cos(p2), Math.sin(p2)", + " );", + " }", + " coneGeometry.setAttribute('position', new THREE.Float32BufferAttribute(conePositions, 3));", + " this.cone = new THREE.LineSegments(", + " coneGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.cone);", + " const centerLineGeometry = new THREE.BufferGeometry();", + " centerLineGeometry.setAttribute('position', new THREE.Float32BufferAttribute([", + " 0, 0, 0, coneLength, 0, 0", + " ], 3));", + " this.centerLine = new THREE.LineSegments(", + " centerLineGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.centerLine);", + "", + " this.originBox = new THREE.Mesh(", + " new THREE.BoxGeometry(16, 16, 16),", + " new THREE.MeshBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.originBox);", + " this.update();", + "", + " //@ts-ignore", + " this.originBox.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + " this.cone.geometry.dispose();", + " this.cone.material.dispose();", + " this.centerLine.geometry.dispose();", + " this.centerLine.material.dispose();", + " this.originBox.geometry.dispose();", + " this.originBox.material.dispose();", + " }", + "", + " update() {", + " /** @type {number} */", + " const coneAngle = gdjs.toRad(this.object._getConeAngle());", + " const coneWidth = coneLength * Math.sin(coneAngle);", + " const coneHeight = coneLength * Math.cos(coneAngle);", + " this.cone.scale.set(coneHeight, coneWidth, coneWidth);", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.cone.material.color.set(color);", + " this.centerLine.material.color.set(color);", + " this.originBox.material.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class SpotLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param spotLight {THREE.SpotLight}", + " */", + " constructor(object, spotLight) {", + " this.object = object;", + " this.spotLight = spotLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.spotLight.parent;", + " this.spotLight.parent = null;", + " this.spotLight.lookAt(targetX, targetY, targetZ);", + " this.spotLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.spotLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.spotLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.spotLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.spotLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.spotLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.spotLight.decay = decay;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setConeLength(value) {", + " this.spotLight.distance = value;", + " }", + "", + " /**", + " * @param coneAngle {number}", + " */", + " setConeAngle(coneAngle) {", + " this.spotLight.angle = coneAngle * Math.PI / 180;", + " }", + "", + " /**", + " * @param smoothing {number}", + " */", + " setSmoothing(smoothing) {", + " this.spotLight.penumbra = smoothing;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " // This is applied by applyVisibilityAndShadow", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\" | \"VeryHigh\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 256;", + " break;", + " case \"Medium\":", + " size = 512;", + " break;", + " case \"High\":", + " size = 1024;", + " break;", + " case \"VeryHigh\":", + " size = 2048;", + " break;", + " }", + " const shadow = this.spotLight.shadow;", + " const mapSize = shadow.mapSize;", + " if (mapSize.width !== size) {", + " mapSize.set(size, size);", + "", + " // Force the recreation of the shadow map texture:", + " if (shadow.map) {", + " shadow.map.dispose();", + " shadow.map = null;", + " }", + " shadow.needsUpdate = true;", + " }", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.spotLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.spotLight.shadow.camera.far = value;", + " }", + "", + " /**", + " * @param value {number}", + " * @param quality {\"Low\" | \"Medium\" | \"High\" | \"VeryHigh\"}", + " * @param coneAngle {number}", + " */", + " setShadowBias(value, quality, coneAngle) {", + " const biasMultiplier =", + " quality === 'Low'", + " ? 8", + " : quality === 'Medium'", + " ? 4", + " : quality === 'High'", + " ? 2 : 1;", + " // Multiply by 0.125 to make values around 0.001 work best.", + " this.spotLight.shadow.bias = -value * 0.125 * biasMultiplier *", + " Math.tan(gdjs.toRad(gdjs.evtTools.common.clamp(coneAngle, 0, 89)));", + " }", + "", + " /**", + " * @param resourceName {string}", + " */", + " setImage(resourceName) {", + " if (!resourceName) {", + " this.spotLight.map = null;", + " return;", + " }", + " const texture = game.getImageManager().getThreeTexture(resourceName);", + " this.spotLight.map = texture;", + " }", + "}", + "", + "//@ts-ignore", + "gdjs.__light3DExtension.spot = {", + " SpotLightAdapter,", + " SpotLightHelper,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Define point light helper classes JavaScript code.", + "fullName": "Define point light helper classes", + "functionType": "Action", + "name": "DefinePointLightHelperClasses", + "private": true, + "sentence": "Define point light helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__light3DExtension.point) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.PointLight, _getIsCastingShadow: () => boolean, _getColor: () => string}} PointLightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "", + "/**", + " * @extends {THREE.Mesh}", + " */", + "class PointLightHelper extends THREE.Mesh {", + " /** @type {PointLightRuntimeObject} */", + " object;", + "", + "\t/**", + " * @param {PointLightRuntimeObject} object", + "\t */", + " constructor(object) {", + " const geometry = new THREE.SphereGeometry(16, 4, 2);", + " const material = new THREE.MeshBasicMaterial({ wireframe: true, fog: false, toneMapped: false });", + " super(geometry, material);", + " this.object = object;", + " this.update();", + "", + " //@ts-ignore", + " this.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + " this.geometry.dispose();", + " this.material.dispose();", + " }", + "", + " update() {", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.material.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class PointLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param pointLight {THREE.PointLight}", + " */", + " constructor(object, pointLight) {", + " this.object = object;", + " this.pointLight = pointLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.pointLight.parent;", + " this.pointLight.parent = null;", + " this.pointLight.lookAt(targetX, targetY, targetZ);", + " this.pointLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.pointLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.pointLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.pointLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.pointLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.pointLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.pointLight.decay = decay;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setRange(value) {", + " this.pointLight.distance = value;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " // This is applied by applyVisibilityAndShadow", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 512;", + " break;", + " case \"Medium\":", + " size = 1024;", + " break;", + " case \"High\":", + " size = 2048;", + " break;", + " }", + " const shadow = this.pointLight.shadow;", + " const mapSize = shadow.mapSize;", + " if (mapSize.width !== size) {", + " mapSize.set(size, size);", + "", + " // Force the recreation of the shadow map texture:", + " if (shadow.map) {", + " shadow.map.dispose();", + " shadow.map = null;", + " }", + " shadow.needsUpdate = true;", + " }", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.pointLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.pointLight.shadow.camera.far = value;", + " }", + "", + " /**", + " * @param value {number}", + " * @param quality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowBias(value, quality) {", + " const biasMultiplier =", + " quality === 'Low'", + " ? 4", + " : quality === 'Medium'", + " ? 2", + " : 1;", + " this.pointLight.shadow.bias = -value * biasMultiplier;", + " }", + "}", + "", + "//@ts-ignore", + "gdjs.__light3DExtension.point = {", + " PointLightAdapter,", + " PointLightHelper,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__light3DExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.SpotLight | THREE.PointLight, _getIsCastingShadow: () => boolean}} LightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "const isInGameEdition = game.isInGameEdition && game.isInGameEdition();", + "", + "", + "class Light3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", + "", + " constructor(", + " object,", + " instanceContainer,", + " parent", + " ) {", + " super(object, instanceContainer, parent);", + " }", + "", + " _updateThreeGroup() {", + " /** @type {LightRuntimeObject} */", + " //@ts-ignore", + " const object = this._object;", + " const threeObject3D = this.get3DRendererObject();", + "", + " threeObject3D.rotation.set(", + " gdjs.toRad(object.getRotationX()),", + " gdjs.toRad(object.getRotationY()),", + " gdjs.toRad(object.angle)", + " );", + "", + " threeObject3D.position.set(", + " object.getX(),", + " object.getY(),", + " object.getZ()", + " );", + "", + " // Force the scale to 1 because the light doesn't really has a size.", + " threeObject3D.scale.set(", + " object.isFlippedX() ? -1 : 1,", + " object.isFlippedY() ? -1 : 1,", + " object.isFlippedZ() ? -1 : 1", + " );", + "", + " threeObject3D.visible = !this._object.hidden;", + "", + " const spotLight = object.__light3D;", + "", + " const editor = game.getInGameEditor ? game.getInGameEditor() : null;", + "", + " spotLight.castShadow = false;", + " spotLight.visible = false;", + "", + " if (!object.isHidden()) {", + " let isSelected = false;", + " if (editor) {", + " const selectedObject = editor._selection.getLastSelectedObject();", + " let parentObject = object;", + " isSelected = parentObject === selectedObject;", + " while (!isSelected && parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " parentObject = parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " isSelected = parentObject === selectedObject;", + " }", + " }", + " if (!editor || !editor.areEffectsHidden() || isSelected) {", + " let rootObject = object;", + " while (rootObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " rootObject = rootObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " }", + " const runtimeScene = rootObject.getRuntimeScene();", + " let distanceSq = 0;", + " if (!isSelected) {", + " const layerName = rootObject.getLayer();", + " const cameraX = gdjs.evtTools.camera.getCameraX(runtimeScene, layerName, 0);", + " const cameraY = gdjs.evtTools.camera.getCameraY(runtimeScene, layerName, 0);", + " const cameraZ = gdjs.scene3d.camera.getCameraZ(runtimeScene, layerName, 0);", + " const deltaX = rootObject.getX() - cameraX;", + " const deltaY = rootObject.getY() - cameraY;", + " const deltaZ = rootObject.getZ() - cameraZ;", + " distanceSq = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;", + " }", + " getLightManager(", + " //@ts-ignore", + " runtimeScene", + " ).applyVisibilityAndShadow(object, distanceSq);", + " }", + " }", + "", + " // Force the visibility to be checked every frame", + " this._isContainerDirty = true;", + " }", + "}", + "", + "const editorLightCountMax = {", + " value: 20", + "};", + "", + "const lightCountMax = {", + " value: 20", + "};", + "", + "const editorLightShadowCountMax = {", + " value: 4", + "};", + "", + "const lightShadowCountMax = {", + " value: 4", + "};", + "", + "gdjs.registerRuntimeScenePreEventsCallback(", + " runtimeScene => {", + " getLightManager(", + " //@ts-ignore", + " runtimeScene.getScene()", + " ).clear();", + " });", + "if (gdjs.registerInGameEditorPostStepCallback) {", + " gdjs.registerInGameEditorPostStepCallback(", + " inGameEditor => {", + " getLightManager(", + " //@ts-ignore", + " inGameEditor.getEditedInstanceContainer().getScene()", + " ).clear();", + " });", + "}", + "", + "/**", + " * Get the platforms manager of an instance container.", + " * @param {gdjs.RuntimeScene & {__lightManager: LightManager}} runtimeScene", + " */", + "function getLightManager(runtimeScene) {", + " if (!runtimeScene.__lightManager) {", + " // Create the shared manager if necessary.", + " runtimeScene.__lightManager = isInGameEdition ?", + " new LightManager(editorLightCountMax, editorLightShadowCountMax) :", + " new LightManager(lightCountMax, lightShadowCountMax);", + " }", + " return runtimeScene.__lightManager;", + "}", + "", + "/** @type {{isInserted: boolean, removedObject: LightRuntimeObject | null}} */", + "const sortResult = { isInserted: false, removedObject: null };", + "", + "class CappedLightList {", + " /** @type {Array<{object: LightRuntimeObject, weight: number}>} */", + " objects = [];", + " /** @type {{value: number}} */", + " capacity;", + " weight = 0;", + " /** @type {(object: LightRuntimeObject) => void} */", + " onInsertion;", + " /** @type {(object: LightRuntimeObject) => void} */", + " onDeletion;", + "", + " /**", + " * @param {{value: number}} capacity", + " * @param {(object: LightRuntimeObject) => void} onInsertion", + " * @param {(object: LightRuntimeObject) => void} onDeletion", + " */", + " constructor(capacity, onInsertion, onDeletion) {", + " this.capacity = capacity;", + " this.onInsertion = onInsertion;", + " this.onDeletion = onDeletion;", + " }", + "", + " clear() {", + " this.objects.length = 0;", + " this.weight = 0;", + " }", + "", + " /**", + " * @param object {LightRuntimeObject}", + " * @param distance {number}", + " * @param weight {number}", + " */", + " insertByDistance(object, distance, weight) {", + " let insertionIndex = 0;", + " for (let index = this.objects.length - 1; index >= 0; index--) {", + " const { object: other } = this.objects[index];", + " const otherDistance = other.__cameraDistance;", + " if (distance >= otherDistance) {", + " insertionIndex = index + 1;", + " break;", + " }", + " }", + " if (insertionIndex === this.objects.length", + " && this.weight + weight > this.capacity.value) {", + " return;", + " }", + " this.weight += weight;", + "", + " let deletedPair = null;", + " while (this.objects.length > 0 && this.weight > this.capacity.value) {", + " deletedPair = this.objects.pop();", + " const { object: removedObject, weight: otherWeight } = deletedPair;", + " this.weight -= otherWeight;", + " this.onDeletion(removedObject);", + " }", + "", + " let insertedPair;", + " if (deletedPair) {", + " insertedPair = deletedPair;", + " insertedPair.object = object;", + " insertedPair.weight = weight;", + " }", + " else {", + " insertedPair = { object, weight };", + " }", + " this.onInsertion(object);", + " this.objects.splice(insertionIndex, 0, insertedPair);", + " object.__cameraDistance = distance;", + " }", + "}", + "", + "class LightManager {", + " /** @type {CappedLightList} */", + " visibleObjects;", + " /** @type {CappedLightList} */", + " shadowObjects;", + "", + " /**", + " * @param maxCount {{value: number}}", + " * @param shadowCount {{value: number}}", + " */", + " constructor(maxCount, shadowCount) {", + " this.visibleObjects = new CappedLightList(", + " maxCount,", + " (object) => { object.__light3D.visible = true; },", + " (object) => { object.__light3D.visible = false; }", + " );", + " this.shadowObjects = new CappedLightList(", + " shadowCount,", + " (object) => { object.__light3D.castShadow = true; },", + " (object) => { object.__light3D.castShadow = false; }", + " );", + " }", + "", + " clear() {", + " this.visibleObjects.clear();", + " this.shadowObjects.clear();", + " }", + "", + " /**", + " * @param object {LightRuntimeObject}", + " * @param distance {number}", + " */", + " applyVisibilityAndShadow(object, distance) {", + " if (object._getIsCastingShadow()) {", + " this.shadowObjects.insertByDistance(object, distance,", + " //@ts-ignore", + " object.__light3D.map ? 2 : 1);", + " }", + " this.visibleObjects.insertByDistance(object, distance, 1);", + " }", + "}", + "", + "//@ts-ignore", + "gdjs.__light3DExtension = {", + " Light3DRenderer,", + " lightCountMax,", + " lightShadowCountMax,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "the maximum number of nearest lights displayed simultaneously.", + "fullName": "Max lights count", + "functionType": "ExpressionAndCondition", + "name": "LightCountMax", + "sentence": "max lights count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightCountMax.value;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LightCountMax", + "name": "SetLightCountMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "gdjs.__light3DExtension.lightCountMax.value = value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "the maximum number of nearest lights displayed with shadow simultaneously.", + "fullName": "Max lights with shadow count", + "functionType": "ExpressionAndCondition", + "name": "LightShadowCountMax", + "sentence": "max lights with shadow count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightShadowCountMax.value;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LightShadowCountMax", + "name": "SetLightShadowCountMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "gdjs.__light3DExtension.lightShadowCountMax.value = value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "DefineSpotLightHelperClasses" + }, + { + "functionName": "DefinePointLightHelperClasses" + }, + { + "functionName": "LightCountMax" + }, + { + "functionName": "SetLightCountMax" + }, + { + "functionName": "LightShadowCountMax" + }, + { + "functionName": "SetLightShadowCountMax" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 20, + "areaMaxY": 20, + "areaMaxZ": 20, + "areaMinX": -20, + "areaMinY": -20, + "areaMinZ": -20, + "defaultName": "SpotLight", + "description": "Light up a cone like a flashlight.", + "fullName": "3D spot light", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNobGlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxMEw2LDVIMThMMTUsMTBIOU0xOCw0SDZWMkgxOFY0TTksMjJWMTFIMTVWMjJIOU0xMiwxM0ExLDEgMCAwLDAgMTEsMTRBMSwxIDAgMCwwIDEyLDE1QTEsMSAwIDAsMCAxMywxNEExLDEgMCAwLDAgMTIsMTNaIiAvPjwvc3ZnPg==", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "SpotLight3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/b627f8e676b3aac26945b2c38db0cfa787d34d2eff23755d4eb1289452f6cd28_flashlight.svg", + "objects": [ + { + "assetStoreId": "", + "name": "Placeholder", + "persistentUuid": "6786eefd-3c18-4fcb-b3ae-95b07f953045", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 80, + "height": 80, + "depth": 80, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "Basic", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Placeholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 40, + "height": 40, + "layer": "", + "name": "Placeholder", + "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", + "width": 40, + "x": -20, + "y": -20, + "z": -20, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 9.06473532531222, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "Light3D::DefineSpotLightHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const {", + " Light3DRenderer,", + " //@ts-ignore", + "} = gdjs.__light3DExtension;", + "const {", + " SpotLightAdapter,", + " SpotLightHelper,", + " //@ts-ignore", + "} = gdjs.__light3DExtension.spot;", + "", + "/** @type {gdjs.CustomRuntimeObject3D} */", + "//@ts-ignore", + "const object = objects[0];", + "", + "const game = runtimeScene.getGame();", + "", + "// This is a hack that may break in future releases.", + "// Replace the group that would hold children objects by the light.", + "const layer = object.getInstanceContainer().getLayer(object.getLayer());", + "const group = object.getRenderer()._threeGroup;", + "layer.getRenderer().remove3DRendererObject(group);", + "", + "const spotLight = new THREE.SpotLight(0xffffff);", + "spotLight.position.copy(group.position);", + "spotLight.rotation.copy(group.rotation);", + "spotLight.add(spotLight.target);", + "spotLight.target.position.x = 100;", + "spotLight.up.set(0, 0, 1);", + "spotLight.shadow.camera.up.set(0, 0, 1);", + "//@ts-ignore", + "object.__light3D = spotLight;", + "//@ts-ignore", + "object.__spotLightAdapter = new SpotLightAdapter(object, spotLight);", + "", + "const spotLight3DRenderer = new Light3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "object._renderer = spotLight3DRenderer;", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const spotLightHelper = new SpotLightHelper(object);", + " spotLightHelper.rotation.order = 'ZYX';", + " spotLightHelper.add(spotLight);", + " spotLight3DRenderer._threeGroup = spotLightHelper;", + " layer.getRenderer().add3DRendererObject(spotLightHelper);", + "}", + "else {", + " spotLight3DRenderer._threeGroup = spotLight;", + " layer.getRenderer().add3DRendererObject(spotLight);", + "}", + "", + "spotLight.updateMatrixWorld(true);", + "", + "// Allow to tween the light color.", + "//@ts-ignore", + "if (!object.setColor && !object.getColor) {", + " const prototype = Object.getPrototypeOf(object);", + " prototype.setColor = function(tint) {", + " this._setColor(tint);", + " this.__spotLightAdapter.setColor(tint);", + " }", + " prototype.getColor = function() {", + " return this._getColor(eventsFunctionContext);", + " }", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject} */", + "const object = objects[0];", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "", + "object.__light3D.dispose();", + "object.get3DRendererObject().dispose();", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update from properties.", + "fullName": "Update from properties", + "functionType": "Action", + "name": "UpdateFromProperties", + "private": true, + "sentence": "Update from properties of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetColor" + }, + "parameters": [ + "Object", + "=", + "Color", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetIntensity" + }, + "parameters": [ + "Object", + "=", + "Intensity", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetDecay" + }, + "parameters": [ + "Object", + "=", + "Decay", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetConeLength" + }, + "parameters": [ + "Object", + "=", + "ConeLength", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetConeAngle" + }, + "parameters": [ + "Object", + "=", + "ConeAngle", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetSmoothing" + }, + "parameters": [ + "Object", + "=", + "Smoothing", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowQuality" + }, + "parameters": [ + "Object", + "=", + "ShadowQuality", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowCameraNearPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraNearPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraFarPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowBias" + }, + "parameters": [ + "Object", + "=", + "ShadowBias", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::UpdateImage" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "=", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "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 spotLightHelper = objects[0].get3DRendererObject();", + " spotLightHelper.update();", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update image", + "functionType": "Action", + "name": "UpdateImage", + "private": true, + "sentence": "Update the image of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */\r", + "const object = objects[0];\r", + "const resourceName = object._getImage();\r", + "object.__spotLightAdapter.setImage(resourceName);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the cone angle of the light.", + "fullName": "Cone angle", + "functionType": "ExpressionAndCondition", + "name": "ConeAngle", + "sentence": "the cone angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ConeAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ConeAngle", + "name": "SetConeAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ConeAngle", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::ApplyShadowBias" + }, + "parameters": [ + "Object", + "ShadowBias", + "ShadowQuality", + "ConeAngle", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const coneAngle = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setConeAngle(coneAngle);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the color of the light.", + "fullName": "Color", + "functionType": "ExpressionAndCondition", + "name": "Color", + "sentence": "the color", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Color" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Color", + "name": "SetColor", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Color", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const color = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setColor(color);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the smoothing of the light. Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "fullName": "Smoothing", + "functionType": "ExpressionAndCondition", + "name": "Smoothing", + "sentence": "the smoothing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Smoothing" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Smoothing", + "name": "SetSmoothing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Smoothing", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setSmoothing(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the intensity of the light.", + "fullName": "Intensity", + "functionType": "ExpressionAndCondition", + "name": "Intensity", + "sentence": "the intensity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Intensity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Intensity", + "name": "SetIntensity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Intensity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setIntensity(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the decay of the light. The amount the light dims along the distance of the light.", + "fullName": "Decay", + "functionType": "ExpressionAndCondition", + "name": "Decay", + "sentence": "the decay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Decay" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Decay", + "name": "SetDecay", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Decay", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setDecay(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Condition", + "group": "3D spot light shadow configuration", + "name": "IsCastingShadow", + "sentence": "_PARAM0_ casting shadows", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Action", + "group": "3D spot light shadow configuration", + "name": "SetCastingShadow", + "sentence": "_PARAM0_ casting shadows: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setCastingShadow(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetConeLength" + }, + "parameters": [ + "Object", + "=", + "ConeLength", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Shadow casting", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the light to light up a position.", + "fullName": "Look at position", + "functionType": "Action", + "group": "Angle", + "name": "LookAtPosition", + "sentence": "_PARAM0_ look at _PARAM1_ ; _PARAM2_ ; _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const targetX = eventsFunctionContext.getArgument(\"TargetX\");\r", + "const targetY = eventsFunctionContext.getArgument(\"TargetY\");\r", + "const targetZ = eventsFunctionContext.getArgument(\"TargetZ\");\r", + "\r", + "object.__spotLightAdapter.lookAtPosition(targetX, targetY, targetZ);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Target X", + "name": "TargetX", + "type": "expression" + }, + { + "description": "Target Y", + "name": "TargetY", + "type": "expression" + }, + { + "description": "Target Z", + "name": "TargetZ", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the light to light up an object.", + "fullName": "Look at object", + "functionType": "Action", + "group": "Angle", + "name": "LookAtObject", + "sentence": "_PARAM0_ look at _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::LookAtPosition" + }, + "parameters": [ + "Object", + "Target.CenterX()", + "Target.CenterY()", + "Target.Object3D::CenterZ()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Object", + "name": "Target", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D spot light shadow configuration", + "name": "SetShadowQuality", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ShadowQuality", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::ApplyShadowBias" + }, + "parameters": [ + "Object", + "ShadowBias", + "ShadowQuality", + "ConeAngle", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraNearPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraNearPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraNearPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraNearPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraNearPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraFarPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraFarPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraFarPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraFarPlane", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::ApplyShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "min(Value, ConeLength)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the cone length of the light. 0 means no limit.", + "fullName": "Cone length", + "functionType": "ExpressionAndCondition", + "name": "ConeLength", + "sentence": "the cone length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ConeLength" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ConeLength", + "name": "SetConeLength", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ConeLength", + "=", + "Value" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setConeLength(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Three.js reduces the far plane to match the light range.\nSo, we need to set it again or it will stay at the lowest value the range took.\nWe do the min() on our side to in order:\n- to avoid a side effect when Three.js is upgraded\n- because Three.js keeps the old value in cache and doesn't apply it back unless we set the lower value explicitly ourselves." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::ApplyShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "min(Value, ShadowCameraFarPlane)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Apply shadow camera far plane", + "functionType": "Action", + "group": "3D spot light shadow configuration", + "name": "ApplyShadowCameraFarPlane", + "private": true, + "sentence": "Apply shadow camera far plane of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraFarPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow bias of the light. Use this to avoid \"shadow acne\" due to depth buffer precision. Choose a value small enough like 0.001 to avoid creating distance between shadows and objects but not too small to avoid shadow glitches on low/medium quality. This value is used for high quality, and multiplied by 2 for medium quality and 4 for low quality.", + "fullName": "Shadow bias", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowBias", + "sentence": "the shadow bias", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowBias" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowBias", + "group": "3D spot light shadow configuration", + "name": "SetShadowBias", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowBias", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::ApplyShadowBias" + }, + "parameters": [ + "Object", + "Value", + "ShadowQuality", + "ConeAngle", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Apply shadow bias", + "functionType": "Action", + "group": "3D spot light shadow configuration", + "name": "ApplyShadowBias", + "private": true, + "sentence": "Apply shadow bias of _PARAM0_ to _PARAM1_ for a _PARAM2_ quality and cone angle _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "const quality = eventsFunctionContext.getArgument(\"Quality\");\r", + "const coneAngle = eventsFunctionContext.getArgument(\"Angle\");\r", + "\r", + "object.__spotLightAdapter.setShadowBias(value, quality, coneAngle);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + }, + { + "description": "Quality", + "name": "Quality", + "type": "string" + }, + { + "description": "Cone angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "LookAtPosition" + }, + { + "functionName": "LookAtObject" + } + ] + }, + { + "functionName": "Color" + }, + { + "functionName": "SetColor" + }, + { + "functionName": "Intensity" + }, + { + "functionName": "SetIntensity" + }, + { + "functionName": "Decay" + }, + { + "functionName": "SetDecay" + }, + { + "functionName": "ConeLength" + }, + { + "functionName": "SetConeLength" + }, + { + "functionName": "ConeAngle" + }, + { + "functionName": "SetConeAngle" + }, + { + "functionName": "Smoothing" + }, + { + "functionName": "SetSmoothing" + }, + { + "folderName": "3D spot light shadow configuration", + "children": [ + { + "functionName": "IsCastingShadow" + }, + { + "functionName": "SetCastingShadow" + }, + { + "functionName": "ShadowQuality" + }, + { + "functionName": "SetShadowQuality" + }, + { + "functionName": "ShadowCameraNearPlane" + }, + { + "functionName": "SetShadowCameraNearPlane" + }, + { + "functionName": "ShadowCameraFarPlane" + }, + { + "functionName": "SetShadowCameraFarPlane" + }, + { + "functionName": "ApplyShadowCameraFarPlane" + }, + { + "functionName": "ShadowBias" + }, + { + "functionName": "SetShadowBias" + }, + { + "functionName": "ApplyShadowBias" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "255;255;255", + "type": "Color", + "label": "Color", + "name": "Color" + }, + { + "value": "30", + "type": "Number", + "unit": "DegreeAngle", + "label": "Cone angle", + "group": "Cone", + "name": "ConeAngle" + }, + { + "value": "1", + "type": "Number", + "label": "Intensity", + "name": "Intensity" + }, + { + "value": "1", + "type": "Number", + "label": "Smoothing", + "description": "Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "group": "Cone", + "name": "Smoothing" + }, + { + "value": "2", + "type": "Number", + "label": "Decay", + "description": "The amount the light dims along the distance of the light.", + "name": "Decay" + }, + { + "value": "", + "type": "Resource", + "label": "Image", + "description": "Shadow casting must be enabled for the image to have any effect.", + "group": "Shadow", + "extraInformation": [ + "image" + ], + "choices": [], + "hidden": true, + "name": "Image" + }, + { + "value": "true", + "type": "Boolean", + "label": "Shadow casting", + "group": "Shadow", + "name": "IsCastingShadow" + }, + { + "value": "Medium", + "type": "Choice", + "label": "Shadow quality", + "group": "Shadow", + "choices": [ + { + "label": "Low", + "value": "Low" + }, + { + "label": "Medium", + "value": "Medium" + }, + { + "label": "High", + "value": "High" + }, + { + "label": "Very high", + "value": "VeryHigh" + } + ], + "name": "ShadowQuality" + }, + { + "value": "20", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera near plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraNearPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera far plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraFarPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Cone length", + "description": "0 means no limit.", + "group": "Cone", + "name": "ConeLength" + }, + { + "value": "0", + "type": "Number", + "label": "Shadow bias", + "description": "Use this to avoid \"shadow acne\" due to depth buffer precision. Choose a value small enough like 0.001 to avoid creating distance between shadows and objects but not too small to avoid shadow glitches on low/medium quality. This value is used for high quality, and multiplied by 2 for medium quality and 4 for low quality.", + "group": "Shadow", + "advanced": true, + "name": "ShadowBias" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Color" + }, + { + "propertyName": "Intensity" + }, + { + "propertyName": "Decay" + }, + { + "folderName": "Cone", + "children": [ + { + "propertyName": "ConeAngle" + }, + { + "propertyName": "ConeLength" + }, + { + "propertyName": "Smoothing" + } + ] + }, + { + "folderName": "Shadow", + "children": [ + { + "propertyName": "IsCastingShadow" + }, + { + "propertyName": "ShadowQuality" + }, + { + "propertyName": "Image" + }, + { + "propertyName": "ShadowCameraNearPlane" + }, + { + "propertyName": "ShadowCameraFarPlane" + }, + { + "propertyName": "ShadowBias" + } + ] + } + ] + }, + "variants": [] + }, + { + "areaMaxX": 20, + "areaMaxY": 20, + "areaMaxZ": 20, + "areaMinX": -20, + "areaMinY": -20, + "areaMinZ": -20, + "defaultName": "PointLight", + "description": "Light up in all directions like a fire.", + "fullName": "3D point light", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRvcmNoIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTguNiA5LjZDOSAxMC4yIDkuNSAxMC43IDEwLjIgMTFIMTQuMkMxNC41IDEwLjkgMTQuNyAxMC43IDE0LjkgMTAuNUMxNS45IDkuNSAxNi4zIDggMTUuOCA2LjdMMTUuNyA2LjVDMTUuNiA2LjIgMTUuNCA2IDE1LjIgNS44QzE1LjEgNS42IDE0LjkgNS41IDE0LjggNS4zQzE0LjQgNSAxNCA0LjcgMTMuNiA0LjNDMTIuNyAzLjQgMTIuNiAyIDEzLjEgMUMxMi42IDEuMSAxMi4xIDEuNCAxMS43IDEuOEMxMC4yIDMgOS42IDUuMSAxMC4zIDdWNy4yQzEwLjMgNy4zIDEwLjIgNy40IDEwLjEgNy41QzEwIDcuNiA5LjggNy41IDkuNyA3LjRMOS42IDcuM0M5IDYuNSA4LjkgNS4zIDkuMyA0LjNDOC40IDUuMSA3LjkgNi40IDggNy43QzggOCA4LjEgOC4zIDguMiA4LjZDOC4yIDguOSA4LjQgOS4zIDguNiA5LjZNMTIuMyA4LjFDMTIuNCA3LjYgMTIuMiA3LjIgMTIuMSA2LjhDMTIgNi40IDEyIDYgMTIuMiA1LjZMMTIuNSA2LjJDMTIuOSA2LjggMTMuNiA3IDEzLjggNy44VjguMUMxMy44IDguNiAxMy42IDkuMSAxMy4zIDkuNEMxMy4xIDkuNSAxMi45IDkuNyAxMi43IDkuN0MxMi4xIDkuOSAxMS40IDkuNiAxMSA5LjJDMTEuOCA5LjIgMTIuMiA4LjYgMTIuMyA4LjFNMTUgMTJWMTRIMTRMMTMgMjJIMTFMMTAgMTRIOVYxMkgxNVoiIC8+PC9zdmc+", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PointLight3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/bf9158c96f4346dabd9e8ae0ddd737809652797812eb50376bae62463ac7fc42_torch.svg", + "objects": [ + { + "assetStoreId": "", + "name": "Placeholder", + "persistentUuid": "6786eefd-3c18-4fcb-b3ae-95b07f953045", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 80, + "height": 80, + "depth": 80, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "Basic", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Placeholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 40, + "height": 40, + "layer": "", + "name": "Placeholder", + "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", + "width": 40, + "x": -20, + "y": -20, + "z": -20, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 9.06473532531222, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "Light3D::DefinePointLightHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const {", + " Light3DRenderer,", + " //@ts-ignore", + "} = gdjs.__light3DExtension;", + "const {", + " PointLightAdapter,", + " PointLightHelper,", + " //@ts-ignore", + "} = gdjs.__light3DExtension.point;", + "", + "/** @type {gdjs.CustomRuntimeObject3D} */", + "//@ts-ignore", + "const object = objects[0];", + "", + "const game = runtimeScene.getGame();", + "", + "// This is a hack that may break in future releases.", + "// Replace the group that would hold children objects by the light.", + "const layer = object.getInstanceContainer().getLayer(object.getLayer());", + "const group = object.getRenderer()._threeGroup;", + "layer.getRenderer().remove3DRendererObject(group);", + "", + "const pointLight = new THREE.PointLight(0xffffff);", + "pointLight.position.copy(group.position);", + "pointLight.rotation.copy(group.rotation);", + "pointLight.up.set(0, 0, 1);", + "pointLight.shadow.camera.up.set(0, 0, 1);", + "//@ts-ignore", + "object.__light3D = pointLight;", + "//@ts-ignore", + "object.__pointLightAdapter = new PointLightAdapter(object, pointLight);", + "", + "const pointLight3DRenderer = new Light3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "object._renderer = pointLight3DRenderer;", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const pointLightHelper = new PointLightHelper(object);", + " pointLightHelper.rotation.order = 'ZYX';", + " pointLightHelper.add(pointLight);", + " pointLight3DRenderer._threeGroup = pointLightHelper;", + " layer.getRenderer().add3DRendererObject(pointLightHelper);", + "}", + "else {", + " pointLight3DRenderer._threeGroup = pointLight;", + " layer.getRenderer().add3DRendererObject(pointLight);", + "}", + "", + "pointLight.updateMatrixWorld(true);", + "", + "// Allow to tween the light color.", + "//@ts-ignore", + "if (!object.setColor && !object.getColor) {", + " const prototype = Object.getPrototypeOf(object);", + " prototype.setColor = function(tint) {", + " this._setColor(tint);", + " this.__pointLightAdapter.setColor(tint);", + " }", + " prototype.getColor = function() {", + " return this._getColor(eventsFunctionContext);", + " }", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject} */", + "const object = objects[0];", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "", + "object.__light3D.dispose();", + "object.get3DRendererObject().dispose();", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update from properties.", + "fullName": "Update from properties", + "functionType": "Action", + "name": "UpdateFromProperties", + "private": true, + "sentence": "Update from properties of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetColor" + }, + "parameters": [ + "Object", + "=", + "Color", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetIntensity" + }, + "parameters": [ + "Object", + "=", + "Intensity", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetDecay" + }, + "parameters": [ + "Object", + "=", + "Decay", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetRange" + }, + "parameters": [ + "Object", + "=", + "Range", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowQuality" + }, + "parameters": [ + "Object", + "=", + "ShadowQuality", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowCameraNearPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraNearPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraFarPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowBias" + }, + "parameters": [ + "Object", + "=", + "ShadowBias", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "=", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update helper", + "functionType": "Action", + "name": "UpdateHelper", + "private": true, + "sentence": "Update graphical helper of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const pointLightHelper = objects[0].get3DRendererObject();", + " pointLightHelper.update();", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the color of the light.", + "fullName": "Color", + "functionType": "ExpressionAndCondition", + "name": "Color", + "sentence": "the color", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Color" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Color", + "name": "SetColor", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Color", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const color = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setColor(color);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the intensity of the light.", + "fullName": "Intensity", + "functionType": "ExpressionAndCondition", + "name": "Intensity", + "sentence": "the intensity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Intensity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Intensity", + "name": "SetIntensity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Intensity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setIntensity(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the decay of the light. The amount the light dims along the distance of the light.", + "fullName": "Decay", + "functionType": "ExpressionAndCondition", + "name": "Decay", + "sentence": "the decay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Decay" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Decay", + "name": "SetDecay", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Decay", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setDecay(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Condition", + "group": "3D point light shadow configuration", + "name": "IsCastingShadow", + "sentence": "_PARAM0_ casting shadows", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetRange" + }, + "parameters": [ + "Object", + "=", + "Range", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Action", + "group": "3D point light shadow configuration", + "name": "SetCastingShadow", + "sentence": "_PARAM0_ casting shadows: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setCastingShadow(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Shadow casting", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D point light shadow configuration", + "name": "SetShadowQuality", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ShadowQuality", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::ApplyShadowBias" + }, + "parameters": [ + "Object", + "ShadowBias", + "ShadowQuality", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraNearPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraNearPlane", + "group": "3D point light shadow configuration", + "name": "SetShadowCameraNearPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraNearPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowCameraNearPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetRange" + }, + "parameters": [ + "Object", + "=", + "Range", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraFarPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraFarPlane", + "group": "3D point light shadow configuration", + "name": "SetShadowCameraFarPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraFarPlane", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::ApplyShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "min(Value, Range)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the range of the light. 0 means no limit.", + "fullName": "Range", + "functionType": "ExpressionAndCondition", + "name": "Range", + "sentence": "the range", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Range" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Range", + "name": "SetRange", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Range", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setRange(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Three.js reduces the far plane to match the light range.\nSo, we need to set it again or it will stay at the lowest value the range took.\nWe do the min() on our side to in order:\n- to avoid a side effect when Three.js is upgraded\n- because Three.js keeps the old value in cache and doesn't apply it back unless we set the lower value explicitly ourselves." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::ApplyShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "min(Value, ShadowCameraFarPlane)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Apply shadow camera far plane", + "functionType": "Action", + "group": "3D point light shadow configuration", + "name": "ApplyShadowCameraFarPlane", + "private": true, + "sentence": "Apply shadow camera far plane of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowCameraFarPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow bias of the light. Use this to avoid \"shadow acne\" due to depth buffer precision. Choose a value small enough like 0.001 to avoid creating distance between shadows and objects but not too small to avoid shadow glitches on low/medium quality. This value is used for high quality, and multiplied by 2 for medium quality and 4 for low quality.", + "fullName": "Shadow bias", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowBias", + "sentence": "the shadow bias", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowBias" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowBias", + "group": "3D point light shadow configuration", + "name": "SetShadowBias", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowBias", + "=", + "Value" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::ApplyShadowBias" + }, + "parameters": [ + "Object", + "Value", + "ShadowQuality", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Apply shadow bias", + "functionType": "Action", + "group": "3D point light shadow configuration", + "name": "ApplyShadowBias", + "private": true, + "sentence": "Apply shadow bias of _PARAM0_ to _PARAM1_ for a _PARAM2_ quality", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "const quality = eventsFunctionContext.getArgument(\"Quality\");\r", + "\r", + "object.__pointLightAdapter.setShadowBias(value, quality);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + }, + { + "description": "Quality", + "name": "Quality", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "Color" + }, + { + "functionName": "SetColor" + }, + { + "functionName": "Intensity" + }, + { + "functionName": "SetIntensity" + }, + { + "functionName": "Decay" + }, + { + "functionName": "SetDecay" + }, + { + "functionName": "Range" + }, + { + "functionName": "SetRange" + }, + { + "folderName": "3D point light shadow configuration", + "children": [ + { + "functionName": "IsCastingShadow" + }, + { + "functionName": "SetCastingShadow" + }, + { + "functionName": "ShadowQuality" + }, + { + "functionName": "SetShadowQuality" + }, + { + "functionName": "ShadowCameraNearPlane" + }, + { + "functionName": "SetShadowCameraNearPlane" + }, + { + "functionName": "ShadowCameraFarPlane" + }, + { + "functionName": "SetShadowCameraFarPlane" + }, + { + "functionName": "ApplyShadowCameraFarPlane" + }, + { + "functionName": "ShadowBias" + }, + { + "functionName": "SetShadowBias" + }, + { + "functionName": "ApplyShadowBias" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "255;255;255", + "type": "Color", + "label": "Color", + "name": "Color" + }, + { + "value": "1", + "type": "Number", + "label": "Intensity", + "name": "Intensity" + }, + { + "value": "2", + "type": "Number", + "label": "Decay", + "description": "The amount the light dims along the distance of the light.", + "name": "Decay" + }, + { + "value": "true", + "type": "Boolean", + "label": "Shadow casting", + "group": "Shadow", + "name": "IsCastingShadow" + }, + { + "value": "Medium", + "type": "Choice", + "label": "Shadow quality", + "group": "Shadow", + "choices": [ + { + "label": "", + "value": "Low" + }, + { + "label": "", + "value": "Medium" + }, + { + "label": "", + "value": "High" + } + ], + "name": "ShadowQuality" + }, + { + "value": "20", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera near plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraNearPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera far plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraFarPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Range", + "description": "0 means no limit.", + "name": "Range" + }, + { + "value": "0", + "type": "Number", + "label": "Shadow Bias", + "description": "Use this to avoid \"shadow acne\" due to depth buffer precision. Choose a value small enough like 0.001 to avoid creating distance between shadows and objects but not too small to avoid shadow glitches on low/medium quality. This value is used for high quality, and multiplied by 2 for medium quality and 4 for low quality.", + "group": "Shadow", + "advanced": true, + "name": "ShadowBias" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Color" + }, + { + "propertyName": "Intensity" + }, + { + "propertyName": "Decay" + }, + { + "propertyName": "Range" + }, + { + "folderName": "Shadow", + "children": [ + { + "propertyName": "IsCastingShadow" + }, + { + "propertyName": "ShadowQuality" + }, + { + "propertyName": "ShadowCameraNearPlane" + }, + { + "propertyName": "ShadowCameraFarPlane" + }, + { + "propertyName": "ShadowBias" + } + ] + } + ] + }, + "variants": [] + } + ] } ], "externalLayouts": [ @@ -56910,4 +63963,4 @@ } } ] -} \ No newline at end of file +} From a1285bf73df5dbf7c24de637d7561613558555bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Mon, 20 Jul 2026 16:29:23 +0200 Subject: [PATCH 3/3] [3D platformer] Upgrade the particle extension --- examples/3d-platformer/3d-platformer.json | 977 ++++++++++++++++++++-- 1 file changed, 890 insertions(+), 87 deletions(-) diff --git a/examples/3d-platformer/3d-platformer.json b/examples/3d-platformer/3d-platformer.json index 2dda25994..bff38ca08 100644 --- a/examples/3d-platformer/3d-platformer.json +++ b/examples/3d-platformer/3d-platformer.json @@ -40455,7 +40455,7 @@ { "author": "", "category": "Visual effect", - "dimension": "", + "dimension": "3D", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -40464,7 +40464,7 @@ "name": "ParticleEmitter3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", "shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.", - "version": "3.0.1", + "version": "3.1.1", "description": [ "3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.", "", @@ -40664,18 +40664,83 @@ "", "class ParticleEmitterAdapter {", " /**", + " * @param inverseWorldScale {number}", " * @param particleSystem {ParticleSystem}", " * @param colorOverLife {ColorOverLife}", " * @param sizeOverLife {SizeOverLife}", " * @param applyForce {ApplyForce}", + " * @param applyForce {ApplyForce}", + " * @param widthOverLength {WidthOverLength}", " */", - " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce) {", + " constructor(inverseWorldScale, particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength) {", + " this.inverseWorldScale = inverseWorldScale;", " this.particleSystem = particleSystem;", " this.colorOverLife = colorOverLife;", " this.sizeOverLife = sizeOverLife;", " this.applyForce = applyForce;", + " this.widthOverLength = widthOverLength;", + " }", + "", + " /**", + " * @param renderMode {'Billboard' | 'Trail'}", + " */", + " setRenderMode(renderMode) {", + " switch (renderMode) {", + " case \"BillBoard\":", + " this.particleSystem.renderMode = RenderMode.BillBoard;", + " break;", + " case \"Trail\":", + " this.particleSystem.renderMode = RenderMode.Trail;", + " this.particleSystem.rendererEmitterSettings.startLength = new IntervalValue(30, 30);", + " break;", + " }", + " }", + "", + " /**", + " * @param startLengthMin {number}", + " */", + " setTrailStartLengthMin(startLengthMin) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.a = startLengthMin * this.inverseWorldScale;", + " }", + "", + " /**", + " * @param startLengthMax {number}", + " */", + " setTrailStartLengthMax(startLengthMax) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.b = startLengthMax * this.inverseWorldScale;", + " }", + "", + " /**", + " * @param followLocalOrigin {boolean}", + " */", + " setTrailFollowingLocalOrigin(followLocalOrigin) {", + " this.particleSystem.rendererEmitterSettings.followLocalOrigin = followLocalOrigin;", + " }", + "", + " /**", + " * @param trailEndWidthRatio {number}", + " */", + " setTrailEndWidthRatio(trailEndWidthRatio) {", + " // Check this comment in the lib code:", + " // We added a multiplication with size because it's more convenient for the extension.", + "", + " /** @type Bezier */", + " const bezier = this.widthOverLength.width.functions[0][0];", + " bezier.p[0] = 1;", + " bezier.p[1] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 1 / 3);", + " bezier.p[2] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 2 / 3);", + " bezier.p[3] = trailEndWidthRatio;", " }", "", + "", " /**", " * @param startColor {string}", " */", @@ -40741,14 +40806,14 @@ " * @param startSpeedMin {number}", " */", " setStartSpeedMin(startSpeedMin) {", - " this.particleSystem.startSpeed.a = startSpeedMin;", + " this.particleSystem.startSpeed.a = startSpeedMin * this.inverseWorldScale;", " }", "", " /**", " * @param startSpeedMax {number}", " */", " setStartSpeedMax(startSpeedMax) {", - " this.particleSystem.startSpeed.b = startSpeedMax;", + " this.particleSystem.startSpeed.b = startSpeedMax * this.inverseWorldScale;", " }", "", " /**", @@ -40815,7 +40880,7 @@ " * @param gravity {number}", " */", " setGravity(gravity) {", - " this.applyForce.magnitude.value = gravity;", + " this.applyForce.magnitude.value = gravity * this.inverseWorldScale;", " }", "", " /**", @@ -42085,7 +42150,8 @@ " const iter = particle.previous.values();", " for (let i = 0; i < particle.previous.length; i++) {", " const cur = iter.next();", - " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length);", + " // We added a multiplication with size because it's more convenient for the extension.", + " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length) * particle.size;", " }", " }", " }", @@ -47343,6 +47409,7 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "3d particles", "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", @@ -47418,7 +47485,7 @@ } ], "instances": [], - "editionSettings": {}, + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -47456,6 +47523,7 @@ " ColorOverLife,", " SizeOverLife,", " ApplyForce,", + " WidthOverLength,", " Gradient,", " PiecewiseBezier,", " Bezier,", @@ -47549,10 +47617,13 @@ "particleSystem.addBehavior(sizeOverLife);", "const applyForce = new ApplyForce(new THREE.Vector3(0, 0, -1), new ConstantValue(0));", "particleSystem.addBehavior(applyForce);", + "const widthOverLength = new WidthOverLength(new PiecewiseBezier([[new Bezier(1, 2 / 3, 1 / 3, 0), 0]]));", + "particleSystem.addBehavior(widthOverLength);", "", "particleSystem.emitter.name = object.getName() + object.getNameId();", "", - "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce);", + "const inverseWorldScale = gameScene.getRenderer3DInverseWorldScale ? gameScene.getRenderer3DInverseWorldScale() : 1;", + "object.__particleEmitterAdapter = new ParticleEmitterAdapter(inverseWorldScale, particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength);", "object.__particleSystem = particleSystem;", "", "// This is a hack that may break in future releases.", @@ -47751,6 +47822,50 @@ "" ] }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetRenderMode" + }, + "parameters": [ + "Object", + "=", + "RenderMode", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailEndWidthRatio" + }, + "parameters": [ + "Object", + "=", + "TrailEndWidthRatio", + "" + ] + }, { "type": { "value": "ParticleEmitter3D::ParticleEmitter3D::SetStartColor" @@ -47938,6 +48053,61 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "yes", + "TrailStartLengthMax" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -48192,7 +48362,10 @@ " for (const layerName of layerNames) {", " const layer = gameScene.getLayer(layerName);", " if (layer.__particleEmmiter3DExtension) {", - " layer.__particleEmmiter3DExtension.batchSystem.update(layer.getElapsedTime() / 1000);", + " const timeDelta = layer.getElapsedTime() / 1000;", + " if (timeDelta > 0) {", + " layer.__particleEmmiter3DExtension.batchSystem.update(timeDelta);", + " }", " }", " }", "}" @@ -48241,7 +48414,8 @@ " layer.__particleEmmiter3DExtension = layer.__particleEmmiter3DExtension || {};", " if (!layer.__particleEmmiter3DExtension.batchSystem) {", " const batchSystem = new gdjs.__particleEmmiter3DExtension.BatchedRenderer();", - " batchSystem.scale.y *= -1;", + " const worldScale = gameScene.getRenderer3DWorldScale ? gameScene.getRenderer3DWorldScale() : 1;", + " batchSystem.scale.set(worldScale, -worldScale, worldScale);", " const threeScene = layer.getRenderer().getThreeScene();", " if (threeScene) {", " threeScene.add(batchSystem);", @@ -48620,7 +48794,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyStartColor()" + "StartColor" ] } ] @@ -48703,7 +48877,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyEndColor()" + "EndColor" ] } ] @@ -48786,7 +48960,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartOpacity()" + "StartOpacity" ] } ] @@ -48869,7 +49043,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndOpacity()" + "EndOpacity" ] } ] @@ -48952,7 +49126,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyFlow()" + "Flow" ] } ] @@ -49036,7 +49210,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMin()" + "StartSizeMin" ] } ] @@ -49119,7 +49293,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMax()" + "StartSizeMax" ] } ] @@ -49203,7 +49377,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndScale()" + "EndScale" ] } ] @@ -49287,7 +49461,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMin()" + "StartSpeedMin" ] } ] @@ -49370,7 +49544,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMax()" + "StartSpeedMax" ] } ] @@ -49453,7 +49627,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMin()" + "LifespanMin" ] } ] @@ -49537,7 +49711,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMax()" + "LifespanMax" ] } ] @@ -49621,7 +49795,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyDuration()" + "Duration" ] } ] @@ -49843,7 +50017,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertySpayConeAngle()" + "SpayConeAngle" ] } ] @@ -49927,7 +50101,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyBlending()" + "Blending" ] } ] @@ -50013,7 +50187,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyGravityTop()" + "GravityTop" ] } ] @@ -50098,7 +50272,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyGravity()" + "Gravity" ] } ] @@ -50289,52 +50463,574 @@ } ], "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "functionName": "onCreated" - }, - { - "functionName": "onDestroy" - }, - { - "functionName": "onHotReloading" - }, - { - "functionName": "UpdateFromProperties" - }, - { - "functionName": "UpdateHelper" - }, - { - "functionName": "UpdateImage" - }, - { - "functionName": "doStepPostEvents" - }, - { - "functionName": "RegisterInLayer" - }, - { - "functionName": "Delete" - }, - { - "functionName": "HasEnded" + }, + { + "description": "the start min trail length of the object.", + "fullName": "Start min trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMin", + "sentence": "the start min trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" }, - { - "functionName": "Restart" + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMin", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMin", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the start max trail length of the object.", + "fullName": "Start max trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMax", + "sentence": "the start max trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" }, - { - "folderName": "Position", - "children": [ - { - "functionName": "Z" - }, - { - "functionName": "SetZ" + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMax", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMax", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMax(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the trail should follow the object.", + "fullName": "Trail following the object", + "functionType": "Condition", + "group": "3D particle emitter trail configuration", + "name": "IsTrailFollowingLocalOrigin", + "sentence": "The trail is following _PARAM0_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the trail should follow the object or not.", + "fullName": "Make the trail follow", + "functionType": "Action", + "group": "3D particle emitter trail configuration", + "name": "SetIsTrailFollowingLocalOrigin", + "sentence": "Make the trail follow _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailFollowingLocalOrigin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "IsTrailFollowingLocalOrigin", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the tail end width ratio of the object.", + "fullName": "Tail end width ratio", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailEndWidthRatio", + "sentence": "the tail end width ratio", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailEndWidthRatio" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailEndWidthRatio", + "group": "3D particle emitter trail configuration", + "name": "SetTrailEndWidthRatio", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailEndWidthRatio", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailEndWidthRatio(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the render mode of the object.", + "fullName": "Render mode", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter configuration", + "name": "RenderMode", + "private": true, + "sentence": "the render mode", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "RenderMode" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Billboard\",\"Trail\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RenderMode", + "group": "3D particle emitter configuration", + "name": "SetRenderMode", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setRenderMode(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the trail properties because the RenderMode setter reset them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "\"Trail\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "RegisterInLayer" + }, + { + "functionName": "Delete" + }, + { + "functionName": "HasEnded" + }, + { + "functionName": "Restart" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "Z" + }, + { + "functionName": "SetZ" } ] }, @@ -50446,6 +51142,12 @@ }, { "functionName": "SetShouldAutodestruct" + }, + { + "functionName": "RenderMode" + }, + { + "functionName": "SetRenderMode" } ] }, @@ -50483,6 +51185,35 @@ "functionName": "SetGravity" } ] + }, + { + "folderName": "3D particle emitter trail configuration", + "children": [ + { + "functionName": "TrailStartLengthMin" + }, + { + "functionName": "SetTrailStartLengthMin" + }, + { + "functionName": "TrailStartLengthMax" + }, + { + "functionName": "SetTrailStartLengthMax" + }, + { + "functionName": "IsTrailFollowingLocalOrigin" + }, + { + "functionName": "SetIsTrailFollowingLocalOrigin" + }, + { + "functionName": "TrailEndWidthRatio" + }, + { + "functionName": "SetTrailEndWidthRatio" + } + ] } ] }, @@ -50694,11 +51425,81 @@ "group": "Position", "hidden": true, "name": "RotationY" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start min length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMin" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start max length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMax" + }, + { + "value": "Billboard", + "type": "Choice", + "label": "Render mode", + "choices": [ + { + "label": "Image facing the camera", + "value": "Billboard" + }, + { + "label": "Image following a trail", + "value": "Trail" + } + ], + "advanced": true, + "name": "RenderMode" + }, + { + "value": "", + "type": "Boolean", + "label": "Follow the object", + "group": "Trail", + "advanced": true, + "name": "IsTrailFollowingLocalOrigin" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Tail end width ratio", + "group": "Trail", + "advanced": true, + "name": "TrailEndWidthRatio" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ + { + "propertyName": "Flow" + }, + { + "propertyName": "LifespanMin" + }, + { + "propertyName": "LifespanMax" + }, + { + "propertyName": "Duration" + }, + { + "propertyName": "ShouldAutodestruct" + }, + { + "propertyName": "RenderMode" + }, { "folderName": "Color", "children": [ @@ -50719,9 +51520,6 @@ } ] }, - { - "propertyName": "Flow" - }, { "folderName": "Size", "children": [ @@ -50736,6 +51534,23 @@ } ] }, + { + "folderName": "Trail", + "children": [ + { + "propertyName": "TrailStartLengthMin" + }, + { + "propertyName": "TrailStartLengthMax" + }, + { + "propertyName": "TrailEndWidthRatio" + }, + { + "propertyName": "IsTrailFollowingLocalOrigin" + } + ] + }, { "folderName": "Speed", "children": [ @@ -50756,15 +51571,6 @@ } ] }, - { - "propertyName": "LifespanMin" - }, - { - "propertyName": "LifespanMax" - }, - { - "propertyName": "Duration" - }, { "folderName": "Position", "children": [ @@ -50782,9 +51588,6 @@ } ] }, - { - "propertyName": "ShouldAutodestruct" - }, { "propertyName": "ParentOrigin" }