From 9bf6de7e31a2719d3113bc6d69003977bda723c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 9 Sep 2023 21:43:52 +0200 Subject: [PATCH 1/3] [Reviewed] [3D object shake] Unify the behaviors for 3D models and 3D boxes * Allow the shake to start automatically. --- extensions/reviewed/ShakeObject3D.json | 1346 ++---------------------- 1 file changed, 64 insertions(+), 1282 deletions(-) diff --git a/extensions/reviewed/ShakeObject3D.json b/extensions/reviewed/ShakeObject3D.json index 13d8a72e8..cc2ed9c5d 100644 --- a/extensions/reviewed/ShakeObject3D.json +++ b/extensions/reviewed/ShakeObject3D.json @@ -14,6 +14,10 @@ "", "The 3D racing game example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-racing-game))." ], + "origin": { + "identifier": "ShakeObject3D", + "name": "gdevelop-extension-store" + }, "tags": [ "3d", "shaking", @@ -1287,1070 +1291,40 @@ ], "eventsBasedBehaviors": [ { - "description": "Shake 3D cubes with translation and rotation.", - "fullName": "Shake 3D cube", - "name": "ShakeCube3D", - "objectType": "Scene3D::Cube3DObject", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Step time counters.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "TimeDelta()" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyNoiseTime" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "TimeDelta() * Object.Behavior::Frequency()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::IsShaking" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetSharedPropertyEasingFactor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::PropertyStartEasingDuration()" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::PropertyDuration() - Object.Behavior::PropertyStopEasingDuration()" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetSharedPropertyEasingFactor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(0, 1, Object.Behavior::PropertyTime() / Object.Behavior::PropertyStartEasingDuration())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyDuration() - Object.Behavior::PropertyStopEasingDuration()" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetSharedPropertyEasingFactor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(0, 1, (Object.Behavior::PropertyDuration() - Object.Behavior::PropertyTime()) / Object.Behavior::PropertyStopEasingDuration())" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ShakeObject3D::SetFrequency" - }, - "parameters": [ - "", - "Object.Behavior::PropertyFrequency()", - "\"\"", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTranslationAmplitudeX" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDeltaX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "ShakeObject3D::Noise2d(\"\", Object.Behavior::PropertyNoiseTime(), 1000) * Object.Behavior::PropertyTranslationAmplitudeX() * Object.Behavior::SharedPropertyEasingFactor()" - ] - }, - { - "type": { - "value": "MettreX" - }, - "parameters": [ - "Object", - "+", - "Object.Behavior::PropertyDeltaX()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTranslationAmplitudeY" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDeltaY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "ShakeObject3D::Noise2d(\"\", Object.Behavior::PropertyNoiseTime(), 2000) * Object.Behavior::PropertyTranslationAmplitudeY() * Object.Behavior::SharedPropertyEasingFactor()" - ] - }, - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Object", - "+", - "Object.Behavior::PropertyDeltaY()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTranslationAmplitudeZ" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDeltaZ" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "ShakeObject3D::Noise2d(\"\", Object.Behavior::PropertyNoiseTime(), 3000) * Object.Behavior::PropertyTranslationAmplitudeZ() * Object.Behavior::SharedPropertyEasingFactor()" - ] - }, - { - "type": { - "value": "Scene3D::Cube3DObject::SetZ" - }, - "parameters": [ - "Object", - "+", - "Object.Behavior::PropertyDeltaY()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyRotationAmplitudeX" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDeltaAngleX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "ShakeObject3D::Noise2d(\"\", Object.Behavior::PropertyNoiseTime(), 4000) * Object.Behavior::PropertyRotationAmplitudeX() * Object.Behavior::SharedPropertyEasingFactor()" - ] - }, - { - "type": { - "value": "Scene3D::Cube3DObject::SetRotationX" - }, - "parameters": [ - "Object", - "+", - "Object.Behavior::PropertyDeltaAngleX()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyRotationAmplitudeY" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDeltaAngleY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "ShakeObject3D::Noise2d(\"\", Object.Behavior::PropertyNoiseTime(), 5000) * Object.Behavior::PropertyRotationAmplitudeY() * Object.Behavior::SharedPropertyEasingFactor()" - ] - }, - { - "type": { - "value": "Scene3D::Cube3DObject::SetRotationY" - }, - "parameters": [ - "Object", - "+", - "Object.Behavior::PropertyDeltaAngleY()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyRotationAmplitudeZ" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDeltaAngleZ" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "ShakeObject3D::Noise2d(\"\", Object.Behavior::PropertyNoiseTime(), 6000) * Object.Behavior::PropertyRotationAmplitudeZ() * Object.Behavior::SharedPropertyEasingFactor()" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "+", - "Object.Behavior::PropertyDeltaAngleZ()" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Revert the shaking.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::IsShaking" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTranslationAmplitudeX" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreX" - }, - "parameters": [ - "Object", - "-", - "Object.Behavior::PropertyDeltaX()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTranslationAmplitudeY" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Object", - "-", - "Object.Behavior::PropertyDeltaY()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTranslationAmplitudeZ" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene3D::Cube3DObject::SetZ" - }, - "parameters": [ - "Object", - "-", - "Object.Behavior::PropertyDeltaZ()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyRotationAmplitudeX" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene3D::Cube3DObject::SetRotationX" - }, - "parameters": [ - "Object", - "-", - "Object.Behavior::PropertyDeltaAngleX()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyRotationAmplitudeY" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene3D::Cube3DObject::SetRotationY" - }, - "parameters": [ - "Object", - "-", - "Object.Behavior::PropertyDeltaAngleY()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyRotationAmplitudeZ" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "-", - "Object.Behavior::PropertyDeltaAngleZ()" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Shake the camera on layers chosen with configuration actions.", - "fullName": "Shake", - "functionType": "Action", - "name": "Shake", - "sentence": "Shake _PARAM0_ for _PARAM2_ seconds with _PARAM3_ seconds of easing to start and _PARAM4_ seconds to stop", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyNoiseTime" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "TimeFromStart() * Object.Behavior::Frequency()" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Duration\")" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyStartEasingDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"StartEaseDuration\")" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyStopEasingDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"StopEaseDuration\")" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsNumber" - }, - "parameters": [ - "\"Duration\"", - "<", - "GetArgumentAsNumber(\"StartEaseDuration\") + GetArgumentAsNumber(\"StopEaseDuration\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyStartEasingDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"StartEaseDuration\") * Variable(__CameraShake.Duration) / (GetArgumentAsNumber(\"StartEaseDuration\") + GetArgumentAsNumber(\"StopEaseDuration\"))" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyStopEasingDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"StopEaseDuration\") * Variable(__CameraShake.Duration) / (GetArgumentAsNumber(\"StartEaseDuration\") + GetArgumentAsNumber(\"StopEaseDuration\"))" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - }, - { - "description": "Duration (in seconds)", - "name": "Duration", - "type": "expression" - }, - { - "description": "Ease duration to start (in seconds)", - "name": "StartEaseDuration", - "type": "expression" - }, - { - "description": "Ease duration to stop (in seconds)", - "name": "StopEaseDuration", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Start shaking the camera indefinitely.", - "fullName": "Start shaking", - "functionType": "Action", - "name": "StartShaking", - "sentence": "Start shaking _PARAM0_ with _PARAM2_ seconds of easing", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyNoiseTime" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "TimeFromStart() * Object.Behavior::Frequency()" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "1234567890" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyStartEasingDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"EaseDuration\")" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - }, - { - "description": "Ease duration (in seconds)", - "name": "EaseDuration", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Stop shaking the camera.", - "fullName": "Stop shaking", - "functionType": "Action", - "name": "StopShaking", - "sentence": "Stop shaking _PARAM0_ with _PARAM2_ seconds of easing", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::IsShaking" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"EaseDuration\")" - ] - }, - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyStopEasingDuration" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"EaseDuration\")" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - }, - { - "description": "Ease duration (in seconds)", - "name": "EaseDuration", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the object is shaking.", - "fullName": "Is shaking", - "functionType": "Condition", - "name": "IsShaking", - "sentence": "_PARAM0_ is shaking", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ShakeObject3D::ShakeCube3D::PropertyTime" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::PropertyDuration()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "the shaking frequency of the object.", - "fullName": "Shaking frequency", - "functionType": "ExpressionAndCondition", - "group": "ShakeObject3D configuration", - "name": "Frequency", - "sentence": "the shaking frequency", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyFrequency()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, + "description": "Shake 3D objects with translation and rotation.", + "fullName": "3D shake", + "name": "ShakeModel3D", + "objectType": "", + "eventsFunctions": [ { "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Frequency", - "name": "SetFrequency", + "functionType": "Action", + "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "ShakeObject3D::ShakeModel3D::PropertyIsStartingAtCreation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], "actions": [ { "type": { - "value": "ShakeObject3D::ShakeCube3D::SetPropertyFrequency" + "value": "ShakeObject3D::ShakeModel3D::StartShaking" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "0", + "" ] } ] @@ -2360,226 +1334,17 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject3D::ShakeCube3D", + "supplementaryInformation": "ShakeObject3D::ShakeModel3D", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "4", - "type": "Number", - "unit": "Pixel", - "label": "Translation amplitude on X axis", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "TranslationAmplitudeX" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Translation amplitude on Y axis", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "TranslationAmplitudeY" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Translation amplitude on Z axis", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "TranslationAmplitudeZ" - }, - { - "value": "5", - "type": "Number", - "unit": "DegreeAngle", - "label": "Rotation amplitude around X axis", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "RotationAmplitudeX" - }, - { - "value": "5", - "type": "Number", - "unit": "DegreeAngle", - "label": "Rotation amplitude around Y axis", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "RotationAmplitudeY" - }, - { - "value": "5", - "type": "Number", - "unit": "DegreeAngle", - "label": "Rotation amplitude around Z axis", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "RotationAmplitudeZ" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Time" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Duration" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "StartEasingDuration" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "StopEasingDuration" - }, - { - "value": "", - "type": "Number", - "label": "Frequency", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Frequency" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "DeltaX" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "DeltaY" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "DeltaZ" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "DeltaAngleX" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "DeltaAngleY" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "DeltaAngleZ" }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "NoiseTime" - } - ], - "sharedPropertyDescriptors": [ - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "EasingFactor" - } - ] - }, - { - "description": "Shake 3D models with translation and rotation.", - "fullName": "Shake 3D model", - "name": "ShakeModel3D", - "objectType": "Scene3D::Model3DObject", - "eventsFunctions": [ { "fullName": "", "functionType": "Action", @@ -2596,8 +1361,7 @@ "textG": 0, "textR": 0 }, - "comment": "Step time counters.", - "comment2": "" + "comment": "Step time counters." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2752,8 +1516,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents.", - "comment2": "" + "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2862,10 +1625,11 @@ }, { "type": { - "value": "Scene3D::Model3DObject::SetZ" + "value": "Scene3D::Base3DBehavior::SetZ" }, "parameters": [ "Object", + "Object3D", "+", "Object.Behavior::PropertyDeltaY()" ] @@ -2901,10 +1665,11 @@ }, { "type": { - "value": "Scene3D::Model3DObject::SetRotationX" + "value": "Scene3D::Base3DBehavior::SetRotationX" }, "parameters": [ "Object", + "Object3D", "+", "Object.Behavior::PropertyDeltaAngleX()" ] @@ -2940,10 +1705,11 @@ }, { "type": { - "value": "Scene3D::Model3DObject::SetRotationY" + "value": "Scene3D::Base3DBehavior::SetRotationY" }, "parameters": [ "Object", + "Object3D", "+", "Object.Behavior::PropertyDeltaAngleY()" ] @@ -2996,7 +1762,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3024,8 +1789,7 @@ "textG": 0, "textR": 0 }, - "comment": "Revert the shaking.", - "comment2": "" + "comment": "Revert the shaking." }, { "type": "BuiltinCommonInstructions::Standard", @@ -3117,10 +1881,11 @@ "actions": [ { "type": { - "value": "Scene3D::Model3DObject::SetZ" + "value": "Scene3D::Base3DBehavior::SetZ" }, "parameters": [ "Object", + "Object3D", "-", "Object.Behavior::PropertyDeltaZ()" ] @@ -3145,10 +1910,11 @@ "actions": [ { "type": { - "value": "Scene3D::Model3DObject::SetRotationX" + "value": "Scene3D::Base3DBehavior::SetRotationX" }, "parameters": [ "Object", + "Object3D", "-", "Object.Behavior::PropertyDeltaAngleX()" ] @@ -3173,10 +1939,11 @@ "actions": [ { "type": { - "value": "Scene3D::Model3DObject::SetRotationY" + "value": "Scene3D::Base3DBehavior::SetRotationY" }, "parameters": [ "Object", + "Object3D", "-", "Object.Behavior::PropertyDeltaAngleY()" ] @@ -3218,7 +1985,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3342,7 +2108,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3431,7 +2196,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3510,7 +2274,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3565,7 +2328,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3607,7 +2369,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3648,7 +2409,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", "type": "object" }, { @@ -3663,7 +2423,7 @@ ], "propertyDescriptors": [ { - "value": "4", + "value": "0", "type": "Number", "unit": "Pixel", "label": "Translation amplitude on X axis", @@ -3847,6 +2607,28 @@ "extraInformation": [], "hidden": true, "name": "NoiseTime" + }, + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "description": "", + "group": "", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "hidden": false, + "name": "Object3D" + }, + { + "value": "", + "type": "Boolean", + "label": "Start to shake at the object creation", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "IsStartingAtCreation" } ], "sharedPropertyDescriptors": [ From 5457dfd4e3108689fa5bfb217ed80d30a2ae9c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 9 Sep 2023 21:47:12 +0200 Subject: [PATCH 2/3] Increment version. --- extensions/reviewed/ShakeObject3D.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/reviewed/ShakeObject3D.json b/extensions/reviewed/ShakeObject3D.json index cc2ed9c5d..6f6d25266 100644 --- a/extensions/reviewed/ShakeObject3D.json +++ b/extensions/reviewed/ShakeObject3D.json @@ -8,7 +8,7 @@ "name": "ShakeObject3D", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/vector-difference-ab.svg", "shortDescription": "Shake 3D objects.", - "version": "1.0.0", + "version": "2.0.0", "description": [ "Shake 3D objects with translation and rotation.", "", From e75e28365e3a021458b5334f852f98ddf07b259e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 9 Sep 2023 21:50:35 +0200 Subject: [PATCH 3/3] Explain the breaking change. --- extensions/reviewed/ShakeObject3D.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/reviewed/ShakeObject3D.json b/extensions/reviewed/ShakeObject3D.json index 6f6d25266..7144788be 100644 --- a/extensions/reviewed/ShakeObject3D.json +++ b/extensions/reviewed/ShakeObject3D.json @@ -12,7 +12,10 @@ "description": [ "Shake 3D objects with translation and rotation.", "", - "The 3D racing game example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-racing-game))." + "The 3D racing game example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-racing-game)).", + "", + "Breaking changes from 2.0.0", + "- The behavior for 3D box has been removed. The other behavior can be used for both models and boxes." ], "origin": { "identifier": "ShakeObject3D",