diff --git a/examples/test-stretch/BlueBunny.glb b/examples/test-stretch/BlueBunny.glb new file mode 100644 index 000000000..61c0b0094 Binary files /dev/null and b/examples/test-stretch/BlueBunny.glb differ diff --git a/examples/test-stretch/assets/SquareWhiteSliderBorder.png b/examples/test-stretch/assets/SquareWhiteSliderBorder.png new file mode 100644 index 000000000..804271b3c Binary files /dev/null and b/examples/test-stretch/assets/SquareWhiteSliderBorder.png differ diff --git a/examples/test-stretch/assets/SquareWhiteSliderFillBar.png b/examples/test-stretch/assets/SquareWhiteSliderFillBar.png new file mode 100644 index 000000000..c5ed08339 Binary files /dev/null and b/examples/test-stretch/assets/SquareWhiteSliderFillBar.png differ diff --git a/examples/test-stretch/assets/SquareWhiteSliderThumb.png b/examples/test-stretch/assets/SquareWhiteSliderThumb.png new file mode 100644 index 000000000..5307d8c68 Binary files /dev/null and b/examples/test-stretch/assets/SquareWhiteSliderThumb.png differ diff --git a/examples/test-stretch/game.json b/examples/test-stretch/game.json new file mode 100644 index 000000000..18ac683a4 --- /dev/null +++ b/examples/test-stretch/game.json @@ -0,0 +1,9450 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, + "folderProject": false, + "orientation": "landscape", + "packageName": "com.example.gamename", + "pixelsRounding": false, + "projectUuid": "e32da5a1-b495-45eb-8378-1301cf343b3d", + "scaleMode": "linear", + "sizeOnStartupMode": "", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "test-stretch", + "description": "", + "author": "", + "windowWidth": 1280, + "windowHeight": 720, + "latestCompilationDirectory": "", + "maxFPS": 60, + "minFPS": 20, + "verticalSync": false, + "platformSpecificAssets": {}, + "loadingScreen": { + "backgroundColor": 0, + "backgroundFadeInDuration": 0.2, + "backgroundImageResourceName": "", + "gdevelopLogoStyle": "light", + "logoAndProgressFadeInDuration": 0.2, + "logoAndProgressLogoFadeInDelay": 0.2, + "minDuration": 1.5, + "progressBarColor": 16777215, + "progressBarHeight": 20, + "progressBarMaxWidth": 200, + "progressBarMinWidth": 40, + "progressBarWidthPercent": 30, + "showGDevelopSplash": true, + "showProgressBar": true + }, + "watermark": { + "placement": "bottom-left", + "showWatermark": true + }, + "authorIds": [], + "authorUsernames": [], + "categories": [], + "playableDevices": [], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "file": "BlueBunny.glb", + "kind": "model3D", + "metadata": "", + "name": "BlueBunny.glb", + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/SquareWhiteSliderBorder.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Border.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/324e5f522f6242e9f93090e75ddc38427c3a6c42e8236dbf0ed541bd85cf7221_Square White Slider Border.png", + "name": "Square White Slider Border.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/SquareWhiteSliderFillBar.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Fill Bar.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/47bc684198cd25b3ec74b0e72c2e2c7abb1b6736bd9f4b78a943c663e83118bf_Square White Slider Fill Bar.png", + "name": "Square White Slider Fill Bar.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/SquareWhiteSliderThumb.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Thumb.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/848f861767e7ce4581dba9e122ee7bafeaca57987655cebe1f78ab31d1300f0f_Square White Slider Thumb.png", + "name": "Square White Slider Thumb.png" + } + } + ], + "resourceFolders": [] + }, + "objects": [], + "objectsGroups": [], + "variables": [], + "layouts": [ + { + "b": 70, + "disableInputWhenNotFocused": true, + "mangledName": "Stretch", + "name": "Stretch", + "r": 70, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 70, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.546875, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 135, + "customSize": false, + "height": 0, + "layer": "", + "name": "New3DModel", + "persistentUuid": "fc25c1db-8b36-472e-852f-4dfa9b11ae8d", + "width": 0, + "x": 637, + "y": 424, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": -90, + "customSize": true, + "depth": 32, + "height": 28, + "layer": "UI", + "name": "StretchSlider", + "persistentUuid": "001b8826-856d-42bb-a35e-72b83dec1a6d", + "width": 600, + "x": -239, + "y": 348, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "Volume", + "persistentUuid": "fce73bb8-ebc4-4acc-b722-6d9a15c5db32", + "width": 0, + "x": 725, + "y": 18, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "Stretch", + "persistentUuid": "8a2071e1-f0fa-44d0-9aae-f8b10389306d", + "width": 0, + "x": 725, + "y": 75, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": -90, + "customSize": true, + "depth": 32, + "height": 28, + "layer": "UI", + "name": "VolumeSlider", + "persistentUuid": "117a8f2c-a8e7-41d1-b259-883b5155a8b7", + "width": 600, + "x": 919, + "y": 342, + "zOrder": 5, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "New3DModel", + "tags": "", + "type": "Scene3D::Model3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "StretchTween3D", + "type": "Tween3D::Tween3D", + "Duration": 0, + "Easing": "", + "InitialValue": 0, + "TargetedValue": 0 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "content": { + "centerLocation": "ModelOrigin", + "depth": 300, + "height": 270, + "keepAspectRatio": false, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "BlueBunny.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": 90, + "width": 120, + "animations": [ + { + "loop": true, + "name": "Idle", + "source": "Idle" + }, + { + "loop": false, + "name": "Death", + "source": "Death" + }, + { + "loop": false, + "name": "Duck", + "source": "Duck" + }, + { + "loop": false, + "name": "HitReact", + "source": "HitReact" + }, + { + "loop": false, + "name": "Idle_Gun", + "source": "Idle_Gun" + }, + { + "loop": false, + "name": "Idle_Shoot", + "source": "Idle_Shoot" + }, + { + "loop": false, + "name": "Jump", + "source": "Jump" + }, + { + "loop": false, + "name": "Jump_Idle", + "source": "Jump_Idle" + }, + { + "loop": false, + "name": "Jump_Land", + "source": "Jump_Land" + }, + { + "loop": false, + "name": "No", + "source": "No" + }, + { + "loop": false, + "name": "Punch", + "source": "Punch" + }, + { + "loop": false, + "name": "Run", + "source": "Run" + }, + { + "loop": false, + "name": "Run_Gun", + "source": "Run_Gun" + }, + { + "loop": false, + "name": "Run_Shoot", + "source": "Run_Shoot" + }, + { + "loop": false, + "name": "Walk", + "source": "Walk" + }, + { + "loop": false, + "name": "Walk_Gun", + "source": "Walk_Gun" + }, + { + "loop": false, + "name": "Wave", + "source": "Wave" + }, + { + "loop": false, + "name": "Yes", + "source": "Yes" + } + ] + } + }, + { + "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "name": "StretchSlider", + "tags": "", + "type": "PanelSpriteSlider::PanelSpriteSlider", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "BarTopPadding": 6, + "BarLeftPadding": 6, + "BarRightPadding": 6, + "BarBottomPadding": 6, + "LabelMargin": -80, + "MinValue": 0.01, + "MaxValue": 4, + "InitialValue": 1, + "StepSize": 0.01 + }, + "childrenContent": { + "Background": { + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "width": 265 + }, + "FillBar": { + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "width": 16 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 221, + "g": 221, + "r": 221 + } + }, + "Thumb": { + "bottomMargin": 2, + "height": 36, + "leftMargin": 1, + "rightMargin": 1, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "width": 22 + } + } + }, + { + "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "name": "VolumeSlider", + "tags": "", + "type": "PanelSpriteSlider::PanelSpriteSlider", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "BarTopPadding": 6, + "BarLeftPadding": 6, + "BarRightPadding": 6, + "BarBottomPadding": 6, + "LabelMargin": 20, + "MinValue": 0.01, + "MaxValue": 4, + "InitialValue": 1, + "StepSize": 0.01 + }, + "childrenContent": { + "Background": { + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "width": 265 + }, + "FillBar": { + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "width": 16 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 221, + "g": 221, + "r": 221 + } + }, + "Thumb": { + "bottomMargin": 2, + "height": 36, + "leftMargin": 1, + "rightMargin": 1, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "width": 22 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Volume", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Volume: ", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Stretch", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Stretch: ", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene3D::SetCameraRotationX" + }, + "parameters": [ + "", + "=", + "60", + "", + "" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "2", + "New3DModel", + "" + ] + }, + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "2", + "New3DModel", + "" + ] + }, + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "2", + "New3DModel", + "" + ] + }, + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "2", + "New3DModel", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "VolumeSlider", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetScaleVolume" + }, + "parameters": [ + "", + "=", + "VolumeSlider.Value()", + "New3DModel", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "VolumeSlider", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::Value" + }, + "parameters": [ + "VolumeSlider", + "!=", + "1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetScaleVolume" + }, + "parameters": [ + "", + "=", + "VolumeSlider.Value()", + "New3DModel", + "" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::TweenScaleVolume" + }, + "parameters": [ + "New3DModel", + "StretchTween3D", + "\"Unscale\"", + "1", + "4", + "\"linear\"", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "StretchSlider", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "StretchSlider.Value()", + "New3DModel", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "StretchSlider", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::Value" + }, + "parameters": [ + "StretchSlider", + "!=", + "1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "StretchSlider.Value()", + "New3DModel", + "" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::TweenStretchZ" + }, + "parameters": [ + "New3DModel", + "StretchTween3D", + "\"Unstretch\"", + "1", + "4", + "\"elastic\"", + "" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Camera rotation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "CameraElevationAngle", + "=", + "30" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition" + }, + "parameters": [ + "", + "New3DModel.X()", + "New3DModel.Y()", + "1200", + "0", + "30", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "StretchSlider", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "VolumeSlider", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "MousePointerLock::RequestPointerLock" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "MousePointerLock::ExitPointerLock" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "CameraElevationAngle", + "=", + "clamp(Variable(CameraElevationAngle) + MousePointerLock::MovementY() / 5, 15, 89)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "CameraRotationAngle", + "+", + "MousePointerLock::MovementX() / 5" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition" + }, + "parameters": [ + "", + "New3DModel.X()", + "New3DModel.Y()", + "1200", + "Variable(CameraRotationAngle)", + "Variable(CameraElevationAngle)", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Volume", + "=", + "\"Volume: \" + ToString(New3DModel.ScaleX() * New3DModel.ScaleY() * New3DModel.ScaleZ())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Stretch", + "=", + "\"Stretch: \" + ToString(Tween3D::StretchZ(New3DModel))" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [ + { + "effectType": "Scene3D::HemisphereLight", + "name": "Effect", + "doubleParameters": { + "elevation": 90, + "intensity": 1, + "rotation": 0 + }, + "stringParameters": { + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Y-" + }, + "booleanParameters": {} + } + ] + }, + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "UI", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "StretchTween3D", + "type": "Tween3D::Tween3D" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "Visual effect", + "extensionNamespace": "", + "fullName": "3D tween (experimental)", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRlbm5pcy1iYWxsIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyLDJDMTQuNSwyIDE2Ljc1LDIuOSAxOC41LDQuNEMxNi4zNiw2LjIzIDE1LDguOTYgMTUsMTJDMTUsMTUuMDQgMTYuMzYsMTcuNzcgMTguNSwxOS42QzE2Ljc1LDIxLjEgMTQuNSwyMiAxMiwyMkM5LjUsMjIgNy4yNSwyMS4xIDUuNSwxOS42QzcuNjQsMTcuNzcgOSwxNS4wNCA5LDEyQzksOC45NiA3LjY0LDYuMjMgNS41LDQuNEM3LjI1LDIuOSA5LjUsMiAxMiwyTTIyLDEyQzIyLDE0LjMyIDIxLjIxLDE2LjQ1IDE5Ljg4LDE4LjE1QzE4LjEyLDE2LjY4IDE3LDE0LjQ3IDE3LDEyQzE3LDkuNTMgMTguMTIsNy4zMiAxOS44OCw1Ljg1QzIxLjIxLDcuNTUgMjIsOS42OCAyMiwxMk0yLDEyQzIsOS42OCAyLjc5LDcuNTUgNC4xMiw1Ljg1QzUuODgsNy4zMiA3LDkuNTMgNywxMkM3LDE0LjQ3IDUuODgsMTYuNjggNC4xMiwxOC4xNUMyLjc5LDE2LjQ1IDIsMTQuMzIgMiwxMloiIC8+PC9zdmc+", + "name": "Tween3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/30bc03f9cf5f2f42960246a605352a6937ae6b603f0177396a83193849a4724a_tennis-ball.svg", + "shortDescription": "Smoothly animate scale and rotation of 3d models.", + "version": "0.0.1", + "description": "Change models proportions and orientation over time to make smooth animations.", + "tags": [ + "3d", + "tween", + "smooth", + "interpolation", + "wobble" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "the stretch on Z axis. The object volume is conseved. A stretch of 2 make the object apear 2 time longer on Z in proportion to the dimension on X and Y.", + "fullName": "Stretch on Z axis", + "functionType": "ExpressionAndCondition", + "name": "StretchZ", + "sentence": "the stretch on Z axis of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.ScaleZ() / sqrt(Object.ScaleX() * Object.ScaleY())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Change the stretch on Z axis. The object volume is conseved. A stretch of 2 make the object apear 2 time longer on Z in proportion to the dimension on X and Y.", + "fullName": "Stretch on Z axis", + "functionType": "ActionWithOperator", + "getterName": "StretchZ", + "name": "SetStretchZ", + "sentence": "Change the stretch on Z axis of ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Value\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.Volume", + "=", + "Tween3D::ScaleVolume(Object)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleZ" + }, + "parameters": [ + "Object", + "=", + "pow(Variable(_Tween3D.Volume) * GetArgumentAsNumber(\"Value\") * GetArgumentAsNumber(\"Value\"), 1/3)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.SurfaceRatio", + "=", + "sqrt((Variable(_Tween3D.Volume) / Object.ScaleZ()) / (Object.ScaleX() * Object.ScaleY()))" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleX" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.SurfaceRatio)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleY" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.SurfaceRatio)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "objectList" + }, + { + "description": "Stretch ratio", + "name": "StretchRatio", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the stretch on Y axis. The object volume is conseved. A stretch of 2 make the object apear 2 time longer on Y in proportion to the dimension on X and Z.", + "fullName": "Stretch on Y axis", + "functionType": "ExpressionAndCondition", + "name": "StretchY", + "sentence": "the stretch on Y axis of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.ScaleY() / sqrt(Object.ScaleX() * Object.ScaleZ())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Change the stretch on Z axis. The object volume is conseved. A stretch of 2 make the object apear 2 time longer on Z in proportion to the dimension on X and Y.", + "fullName": "Stretch on Z axis", + "functionType": "ActionWithOperator", + "getterName": "StretchY", + "name": "SetStretchY", + "sentence": "Change the stretch on Z axis of ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Value\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.Volume", + "=", + "Tween3D::ScaleVolume(Object)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleY" + }, + "parameters": [ + "Object", + "=", + "pow(Variable(_Tween3D.Volume) * GetArgumentAsNumber(\"Value\") * GetArgumentAsNumber(\"Value\"), 1/3)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.SurfaceRatio", + "=", + "sqrt((Variable(_Tween3D.Volume) / Object.ScaleZ()) / (Object.ScaleX() * Object.ScaleY()))" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleX" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.SurfaceRatio)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleZ" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.SurfaceRatio)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "objectList" + }, + { + "description": "Stretch ratio", + "name": "StretchRatio", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the scale volume.", + "fullName": "Scale volume", + "functionType": "ExpressionAndCondition", + "name": "ScaleVolume", + "sentence": "the scale volume of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.ScaleX() * Object.ScaleY() * Object.ScaleZ()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Change the stretch on Z axis. The object volume is conseved. A stretch of 2 make the object apear 2 time longer on Z in proportion to the dimension on X and Y.", + "fullName": "Stretch on Z axis", + "functionType": "ActionWithOperator", + "getterName": "ScaleVolume", + "name": "SetScaleVolume", + "sentence": "Change the stretch on Z axis of ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Value\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.Ratio", + "=", + "pow(GetArgumentAsNumber(\"Value\") / Tween3D::ScaleVolume(Object), 1 / 3)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleZ" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.Ratio)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleX" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.Ratio)" + ] + }, + { + "type": { + "value": "Scene3D::Model3DObject::SetScaleY" + }, + "parameters": [ + "Object", + "*", + "Variable(_Tween3D.Ratio)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "objectList" + }, + { + "description": "Stretch ratio", + "name": "StretchRatio", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Exponentially tween bewteen 2 values according to an easing function.", + "fullName": "Ease exponentially", + "functionType": "Expression", + "name": "EaseExp", + "private": true, + "sentence": "the exponent-tweened value of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "exp(Tween::Ease(GetArgumentAsString(\"Easing\"), log(GetArgumentAsNumber(\"InitialValue\")), log(GetArgumentAsNumber(\"TargetedValue\")), GetArgumentAsNumber(\"Weighting\")))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Easing", + "name": "Easing", + "type": "string" + }, + { + "description": "Initial value", + "name": "InitialValue", + "type": "expression" + }, + { + "description": "Targeted value", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Weighting", + "name": "Weighting", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Smoothly animate scale and rotation of 3d models.", + "fullName": "3D tween (experimental)", + "name": "Tween3D", + "objectType": "Scene3D::Model3DObject", + "eventsFunctions": [ + { + "description": "Tweens an object stretch Z from its current value to a new one. The stretch can never be 0 or less.", + "fullName": "Tween stretch Z", + "functionType": "Action", + "group": "Size", + "name": "TweenStretchZ", + "sentence": "Tween the stretch Z of object _PARAM0_ to _PARAM3_ over _PARAM4_ seconds with _PARAM5_ easing as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::StartTween" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "GetArgumentAsNumber(\"TargetedValue\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "\"StretchZ\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Stretch on Z axis", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens an object stretch Y from its current value to a new one. The stretch can never be 0 or less.", + "fullName": "Tween stretch Y", + "functionType": "Action", + "group": "Size", + "name": "TweenStretchY", + "sentence": "Tween the stretch Y of object _PARAM0_ to _PARAM3_ over _PARAM4_ seconds with _PARAM5_ easing as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::StartTween" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "GetArgumentAsNumber(\"TargetedValue\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "\"StretchY\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Stretch on Y axis", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens an object scale volume from its current value to a new one. The scale volume can never be 0 or less.", + "fullName": "Tween scale volume", + "functionType": "Action", + "group": "Size", + "name": "TweenScaleVolume", + "sentence": "Tween the scale volume of object _PARAM0_ to _PARAM3_ over _PARAM4_ seconds with _PARAM5_ easing as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::StartTween" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "GetArgumentAsNumber(\"TargetedValue\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "\"ScaleVolume\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Scale volume", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens an object rotation X from its current value to a new one.", + "fullName": "Tween rotation X", + "functionType": "Action", + "group": "Size", + "name": "TweenRotationX", + "sentence": "Tween the rotation X of object _PARAM0_ to _PARAM3_ over _PARAM4_ seconds with _PARAM5_ easing as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::StartTween" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "GetArgumentAsNumber(\"TargetedValue\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "\"RotationX\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Rotation X in degree", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens an object rotation Y from its current value to a new one.", + "fullName": "Tween rotation Y", + "functionType": "Action", + "group": "Size", + "name": "TweenRotationY", + "sentence": "Tween the rotation Y of object _PARAM0_ to _PARAM3_ over _PARAM4_ seconds with _PARAM5_ easing as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::StartTween" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "GetArgumentAsNumber(\"TargetedValue\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "\"RotationY\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Rotation Y in degree", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.Index", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(_Tween3D.Tweens)", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "_Tween3D.Identifier", + "=", + "Object.Behavior::TweenIdentifier(Variable(_Tween3D.Index))" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::IsPlaying" + }, + "parameters": [ + "Object", + "Behavior", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::Time(VariableString(_Tween3D.Identifier)) + TimeDelta() * LayerTimeScale(Object.Layer()), Object.Behavior::Duration(VariableString(_Tween3D.Identifier)))", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Type" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StretchZ\"", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "Object.Behavior::ExponentTweenedValue(VariableString(_Tween3D.Identifier))", + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Type" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StretchY\"", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetStretchY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::ExponentTweenedValue(VariableString(_Tween3D.Identifier))", + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Type" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"ScaleVolume\"", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::SetScaleVolume" + }, + "parameters": [ + "", + "=", + "Object.Behavior::ExponentTweenedValue(VariableString(_Tween3D.Identifier))", + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Type" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RotationX\"", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene3D::Model3DObject::SetRotationX" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::TweenedValue(VariableString(_Tween3D.Identifier))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Type" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RotationY\"", + "VariableString(_Tween3D.Identifier)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene3D::Model3DObject::SetRotationY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::TweenedValue(VariableString(_Tween3D.Identifier))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "_Tween3D.Index", + "+", + "1" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the tweened value", + "fullName": "Tweened value", + "functionType": "ExpressionAndCondition", + "name": "TweenedValue", + "private": true, + "sentence": "the value of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Tween::Ease(Object.Behavior::Easing(VariableString(_Tween3D.Identifier)), Object.Behavior::InitialValue(VariableString(_Tween3D.Identifier)), Object.Behavior::TargetedValue(VariableString(_Tween3D.Identifier)), Object.Behavior::Progress(VariableString(_Tween3D.Identifier)))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the exponent-tweened value", + "fullName": "Tweened value (exponent)", + "functionType": "ExpressionAndCondition", + "name": "ExponentTweenedValue", + "private": true, + "sentence": "the exponent-tweened value of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Tween3D::EaseExp(Object.Behavior::Easing(VariableString(_Tween3D.Identifier)), Object.Behavior::InitialValue(VariableString(_Tween3D.Identifier)), Object.Behavior::TargetedValue(VariableString(_Tween3D.Identifier)), Object.Behavior::Progress(VariableString(_Tween3D.Identifier)))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "fullName": "Start tween", + "functionType": "Action", + "name": "StartTween", + "private": true, + "sentence": "Tween the _PARAM6_ of object _PARAM0_ to _PARAM3_ over _PARAM4_ seconds with _PARAM5_ easing as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::InvalidateTweenIdentifiers" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::SetType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Type\")", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::SetDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::SetEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Easing\")", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::SetTargetedValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetedValue\")", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Type\"", + "=", + "\"StretchZ\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Tween3D::StretchZ(Object)", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Type\"", + "=", + "\"StretchY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Tween3D::StretchY(Object)", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Type\"", + "=", + "\"ScaleVolume\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Tween3D::ScaleVolume(Object)", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Type\"", + "=", + "\"RotationX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.RotationX()", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Type\"", + "=", + "\"RotationY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.RotationY()", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Stretch", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + { + "description": "Type", + "name": "Type", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the tween type", + "fullName": "Type", + "functionType": "ExpressionAndCondition", + "name": "Type", + "private": true, + "sentence": "the type of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.VariableString(_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Type)" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Type", + "name": "SetType", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Type", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the elapsed time", + "fullName": "Time", + "functionType": "ExpressionAndCondition", + "name": "Time", + "private": true, + "sentence": "the elapsed time of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Time)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Time", + "name": "SetTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Time", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the tween duration", + "fullName": "Duration", + "functionType": "ExpressionAndCondition", + "name": "Duration", + "private": true, + "sentence": "the duration of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Duration)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Duration", + "name": "SetDuration", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Duration", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the tween easing", + "fullName": "Easing", + "functionType": "ExpressionAndCondition", + "name": "Easing", + "private": true, + "sentence": "the easing of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.VariableString(_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Easing)" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Easing", + "name": "SetEasing", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].Easing", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the tween initial value", + "fullName": "Initial value", + "functionType": "ExpressionAndCondition", + "name": "InitialValue", + "private": true, + "sentence": "the initial value of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].InitialValue)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "InitialValue", + "name": "SetInitialValue", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].InitialValue", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the tween targeted value", + "fullName": "Targeted value", + "functionType": "ExpressionAndCondition", + "name": "TargetedValue", + "private": true, + "sentence": "the targeted value of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].TargetedValue)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the tween is paused", + "fullName": "Paused", + "functionType": "Condition", + "name": "IsPaused", + "private": true, + "sentence": "The tween _PARAM2_ of _PARAM0_ is paused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].IsPaused", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the tween is paused", + "fullName": "Paused", + "functionType": "Action", + "name": "SetPaused", + "private": true, + "sentence": "The tween _PARAM2_ of _PARAM0_ is paused: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"IsPaused\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].IsPaused", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"IsPaused\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].IsPaused", + "False" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Paused", + "name": "IsPaused", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TargetedValue", + "name": "SetTargetedValue", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens[GetArgumentAsString(\"TweenIdentifier\")].TargetedValue", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Stop the running tween animation.", + "fullName": "Stop a tween", + "functionType": "Action", + "name": "StopTween", + "sentence": "Stop the tween _PARAM2_ on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Duration(GetArgumentAsString(\"TweenIdentifier\"))", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"JumpToEnd\"" + ] + } + ], + "actions": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + }, + { + "description": "Jump to end", + "name": "JumpToEnd", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Pause the running tween animation.", + "fullName": "Pause a tween", + "functionType": "Action", + "name": "PauseTween", + "sentence": "Pause the tween _PARAM2_ on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetPaused" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Resume the tween animation.", + "fullName": "Resume a tween", + "functionType": "Action", + "name": "ResumeTween", + "sentence": "Resume the tween _PARAM2_ on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Tween3D::SetPaused" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "no", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Remove the tween animation from the object.", + "fullName": "Remove a tween", + "functionType": "Action", + "name": "RemoveTween", + "sentence": "Remove the tween _PARAM2_ from _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariableRemoveChild" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens", + "GetArgumentAsString(\"TweenIdentifier\")" + ] + }, + { + "type": { + "value": "Tween3D::Tween3D::InvalidateTweenIdentifiers" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the tween animation exists.", + "fullName": "Tween exists", + "functionType": "Condition", + "name": "Exists", + "sentence": "Tween _PARAM2_ on _PARAM0_ exists", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "_Tween3D.Tweens", + "GetArgumentAsString(\"TweenIdentifier\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the tween animation is currently playing.", + "fullName": "Tween is playing", + "functionType": "Condition", + "name": "IsPlaying", + "sentence": "Tween _PARAM2_ on _PARAM0_ is playing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween3D::Tween3D::HasFinished" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween3D::Tween3D::IsPaused" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the tween animation has finished playing.", + "fullName": "Tween finished playing", + "functionType": "Condition", + "name": "HasFinished", + "sentence": "Tween _PARAM2_ on _PARAM0_ has finished playing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Progress" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "1", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "the progress of a tween (between 0.0 and 1.0).", + "fullName": "Progress of a tween", + "functionType": "ExpressionAndCondition", + "name": "Progress", + "sentence": "the progress of tween _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Tween3D::Exists" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"TweenIdentifier\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::Time(GetArgumentAsString(\"TweenIdentifier\")) / Object.Behavior::Duration(GetArgumentAsString(\"TweenIdentifier\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "TweenIdentifier", + "supplementaryInformation": "objectTween3D", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Return the tween identifier for a given index.", + "fullName": "Tween identifier", + "functionType": "StringExpression", + "name": "TweenIdentifier", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const childIndex = eventsFunctionContext.getArgument(\"ChildIndex\");", + "", + "object.__Tween3D = object.__Tween3D || {};", + "object.__Tween3D.variableIdentifiers =", + " object.__Tween3D.variableIdentifiers", + " || Object.keys(object.getVariables().get(\"_Tween3D\").getChild(\"Tweens\").getAllChildren());", + "", + "eventsFunctionContext.returnValue = object.__Tween3D.variableIdentifiers[childIndex];", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + }, + { + "description": "Child index", + "name": "ChildIndex", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Invalidate tween identifiers.", + "fullName": "Invalidate tween identifiers", + "functionType": "Action", + "name": "InvalidateTweenIdentifiers", + "private": true, + "sentence": "Invalidate tween identifiers of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "object.__Tween3D = object.__Tween3D || {};", + "object.__Tween3D.variableIdentifiers = null;", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Tween3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] + }, + { + "description": "Squash and stretch a 3D model in loop.", + "fullName": "3D wobble", + "name": "Wobble", + "objectType": "Scene3D::Model3DObject", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::UpdateScaleVolume" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::UpdateStretch" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tween", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Wobble::PropertyScaleMinTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyScaleMinTweenDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMinTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Tween3D::EaseExp(Object.Behavior::PropertyScaleMinTweenEasing(), Object.Behavior::PropertyScaleMinTweenInitialValue(), Object.Behavior::PropertyScaleMinTweenTarget(), Object.Behavior::PropertyScaleMinTweenTime() / Object.Behavior::PropertyScaleMinTweenDuration())" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Wobble::PropertyScaleMinTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "Object.Behavior::PropertyScaleMinTweenDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyScaleMinTweenTarget()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Wobble::PropertyScaleMaxTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyScaleMaxTweenDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMaxTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Tween3D::EaseExp(Object.Behavior::PropertyScaleMaxTweenEasing(), Object.Behavior::PropertyScaleMaxTweenInitialValue(), Object.Behavior::PropertyScaleMaxTweenTarget(), Object.Behavior::PropertyScaleMaxTweenTime() / Object.Behavior::PropertyScaleMaxTweenDuration())" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween3D::Wobble::PropertyScaleMaxTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "Object.Behavior::PropertyScaleMaxTweenDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyScaleMinTweenTarget()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wobble", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::UpdateScaleVolume" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::UpdateStretch" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyAngle" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "mod(Object.Behavior::TimeDelta() * 2 * Pi()\n / Object.Behavior::PropertyPeriodDuration(), 2 * Pi())" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum scale volume of the object.", + "fullName": "Minimum scale volume", + "functionType": "ExpressionAndCondition", + "group": "3D wobble scale configuration", + "name": "ScaleMin", + "sentence": "the minimum scale volume", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyScaleMin()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ScaleMin", + "name": "SetScaleMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum scale volume of the object.", + "fullName": "Maximum scale volume", + "functionType": "ExpressionAndCondition", + "group": "3D wobble scale configuration", + "name": "ScaleMax", + "sentence": "the maximum scale volume", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyScaleMax()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ScaleMax", + "name": "SetScaleMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the minimum scale volume from its current value to a new one. The scale volume can never be 0 or less.", + "fullName": "Tween minimum scale volume", + "functionType": "Action", + "group": "3D wobble scale configuration", + "name": "TweenScaleMin", + "sentence": "Tween the minimum scale volume of object _PARAM0_ to _PARAM2_ over _PARAM3_ seconds with _PARAM4_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMinTweenInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::ScaleMin()" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMinTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMinTweenTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetedValue\")" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMinTweenDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMinTweenEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Easing\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + }, + { + "description": "Minimum scale volume", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the maximum scale volume from its current value to a new one. The scale volume can never be 0 or less.", + "fullName": "Tween maximum scale volume", + "functionType": "Action", + "group": "3D wobble scale configuration", + "name": "TweenScaleMax", + "sentence": "Tween the maximum scale volume of object _PARAM0_ to _PARAM2_ over _PARAM3_ seconds with _PARAM4_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMaxTweenInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::ScaleMax()" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMaxTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMaxTweenTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetedValue\")" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMaxTweenDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScaleMaxTweenEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Easing\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + }, + { + "description": "Maximum scale volume", + "name": "TargetedValue", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update scale volume", + "functionType": "Action", + "name": "UpdateScaleVolume", + "private": true, + "sentence": "Update scale volume of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::SetScaleVolume" + }, + "parameters": [ + "", + "=", + "exp(log(Object.Behavior::PropertyScaleMin()) + (log(Object.Behavior::PropertyScaleMax()) - log(Object.Behavior::PropertyScaleMin())) * sin(Object.Behavior:: PropertyAngle() + Object.Behavior::PropertyScalePeriodOffset() / Object.Behavior::PropertyPeriodDuration() * 2 * Pi()))", + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update stretch", + "functionType": "Action", + "name": "UpdateStretch", + "private": true, + "sentence": "Update stretch of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::SetStretchZ" + }, + "parameters": [ + "", + "=", + "exp(log(Object.Behavior::PropertyStretchMin()) + (log(Object.Behavior::PropertyStretchMax()) - log(Object.Behavior::PropertyStretchMin())) * sin(Object.Behavior:: PropertyAngle() + Object.Behavior::PropertyStretchPeriodOffset() / Object.Behavior::PropertyPeriodDuration() * 2 * Pi()))", + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the cycle duration of the object.", + "fullName": "Cycle duration", + "functionType": "ExpressionAndCondition", + "group": "3D wobble configuration", + "name": "PeriodDuration", + "sentence": "the cycle duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPeriodDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PeriodDuration", + "name": "SetPeriodDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyPeriodDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the scale cycle offset of the object.", + "fullName": "Scale cycle offset", + "functionType": "ExpressionAndCondition", + "group": "3D wobble scale configuration", + "name": "ScalePeriodOffset", + "sentence": "the scale cycle offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyScalePeriodOffset()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ScalePeriodOffset", + "name": "SetScalePeriodOffset", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyScalePeriodOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum stretch of the object.", + "fullName": "Minimum stretch", + "functionType": "ExpressionAndCondition", + "group": "3D wobble stretch configuration", + "name": "StretchMin", + "sentence": "the minimum stretch", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyStretchMin()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StretchMin", + "name": "SetStretchMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyStretchMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum stretch of the object.", + "fullName": "Maximum stretch", + "functionType": "ExpressionAndCondition", + "group": "3D wobble stretch configuration", + "name": "StretchMax", + "sentence": "the maximum stretch", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyStretchMax()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StretchMax", + "name": "SetStretchMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyStretchMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the stretch cycle offset of the object.", + "fullName": "Stretch cycle offset", + "functionType": "ExpressionAndCondition", + "group": "3D wobble stretch configuration", + "name": "StretchPeriodOffset", + "sentence": "the stretch cycle offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyStretchPeriodOffset()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StretchPeriodOffset", + "name": "SetStretchPeriodOffset", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween3D::Wobble::SetPropertyStretchPeriodOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Tween3D::Wobble", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.75", + "type": "Number", + "unit": "Dimensionless", + "label": "Minimum scale volume", + "description": "", + "group": "Scale", + "extraInformation": [], + "hidden": false, + "name": "ScaleMin" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Maximum scale volume", + "description": "", + "group": "Scale", + "extraInformation": [], + "hidden": false, + "name": "ScaleMax" + }, + { + "value": "1", + "type": "Number", + "unit": "Second", + "label": "Cycle duration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PeriodDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Scale cycle offset", + "description": "", + "group": "Scale", + "extraInformation": [], + "hidden": false, + "name": "ScalePeriodOffset" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Minimum stretch", + "description": "", + "group": "Stretch", + "extraInformation": [], + "hidden": false, + "name": "StretchMin" + }, + { + "value": "1.25", + "type": "Number", + "unit": "Dimensionless", + "label": "Maximum stretch", + "description": "", + "group": "Stretch", + "extraInformation": [], + "hidden": false, + "name": "StretchMax" + }, + { + "value": "-0.25", + "type": "Number", + "unit": "Second", + "label": "Stretch cycle offset", + "description": "", + "group": "Stretch", + "extraInformation": [], + "hidden": false, + "name": "StretchPeriodOffset" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Angle" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMinTweenTarget" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMinTweenDuration" + }, + { + "value": "", + "type": "String", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMinTweenEasing" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMaxTweenTarget" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMaxTweenDuration" + }, + { + "value": "", + "type": "String", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMaxTweenEasing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMinTweenTime" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMaxTweenTime" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMinTweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ScaleMaxTweenInitialValue" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Camera", + "extensionNamespace": "", + "fullName": "Third person camera", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", + "name": "ThirdPersonCamera", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Virtual Reality/94e95d2c318e1f3dc7151a351024e13c574e1e44669c6696aa107d60230073f6_Virtual Reality_3d_vision_eye_vr.svg", + "shortDescription": "Move the camera to look at an object from a given distance.", + "version": "1.0.0", + "description": [ + "Move the camera to look at an object from a given distance with a rotation and an elevation angles.", + "", + "It can be useful for:", + "- Third person camera", + "- Isometric view", + "" + ], + "origin": { + "identifier": "ThirdPersonCamera", + "name": "gdevelop-extension-store" + }, + "tags": [ + "3d", + "camera" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Move the camera to look at a position from a distance.", + "fullName": "Look at a position from a distance", + "functionType": "Action", + "name": "LookFromDistanceAtPosition", + "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_; _PARAM2_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "=", + "GetArgumentAsNumber(\"PositionX\") + GetArgumentAsNumber(\"Distance\") * cos(ToRad(GetArgumentAsNumber(\"RotationAngle\") + 90)) * cos(ToRad(GetArgumentAsNumber(\"ElevationAngle\")))", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "=", + "GetArgumentAsNumber(\"PositionY\") + GetArgumentAsNumber(\"Distance\") * sin(ToRad(GetArgumentAsNumber(\"RotationAngle\") + 90)) * cos(ToRad(GetArgumentAsNumber(\"ElevationAngle\")))", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", + "=", + "GetArgumentAsNumber(\"Distance\") * sin(ToRad(GetArgumentAsNumber(\"ElevationAngle\")))", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "Scene3D::TurnCameraTowardPosition" + }, + "parameters": [ + "", + "GetArgumentAsNumber(\"PositionX\")", + "GetArgumentAsNumber(\"PositionY\")", + "0", + "GetArgumentAsString(\"Layer\")", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Position on X axis", + "name": "PositionX", + "type": "expression" + }, + { + "description": "Position on Y axis", + "name": "PositionY", + "type": "expression" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at an object from a distance.", + "fullName": "Look at an object from a distance", + "functionType": "Action", + "name": "LookFromDistanceAtObject", + "sentence": "Move the camera of _PARAM5_ to look at _PARAM1_ from _PARAM2_ pixels with a rotation of _PARAM3_° and an elevation of _PARAM4_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition" + }, + "parameters": [ + "", + "Object.CenterX()", + "Object.CenterY()", + "GetArgumentAsNumber(\"Distance\")", + "GetArgumentAsNumber(\"RotationAngle\")", + "GetArgumentAsNumber(\"ElevationAngle\")", + "GetArgumentAsString(\"Layer\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "PANDAKO-GitHub", + "category": "Input", + "extensionNamespace": "", + "fullName": "Mouse Pointer Lock", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMTksMTkgMjQsMTkgMjQsMjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSI2LDIzIDExLDIzIDExLDE4ICIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI0LDE5LjRjLTAuNywwLjgtMS40LDEuNi0yLjIsMi40Yy03LDctMTUuMywxMC4yLTE4LjUsN3MtMC4xLTExLjUsNy0xOC41czE1LjMtMTAuMiwxOC41LTcNCgljMS40LDEuNCwxLjYsMy42LDAuOCw2LjMiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMSwyMi41Yy0wLjMtMC4yLTAuNS0wLjUtMC44LTAuOGMtNy03LTEwLjItMTUuMy03LTE4LjVzMTEuNS0wLjEsMTguNSw3czEwLjIsMTUuMyw3LDE4LjUNCgljLTEuNywxLjctNC44LDEuNi04LjQsMC4xIi8+DQo8L3N2Zz4NCg==", + "name": "MousePointerLock", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Virtual Reality/Virtual Reality_360_rotate_vr_movement.svg", + "shortDescription": "This behavior removes the limit on the distance the mouse can move and hides the cursor.", + "version": "0.1.4", + "description": [ + "This behavior removes the limit on the distance the mouse can move and hides the cursor.", + "", + "For example, a user can rotate or continue to manipulate an object by moving the mouse endlessly ([open the project online](https://editor.gdevelop.io/?project=example://mouse-pointer-lock)).", + "Without the pointer lock, the rotation or operation will stop the moment the pointer reaches the edge of the browser or screen.", + "", + "Game players don't have to worry about leaving the gameplay area or accidentally clicking on another application that moves the mouse focus away from the game.", + "", + "Locking the pointer locks `MouseX()` and `MouseY()` expressions.", + "Use `MovementX()` and `MovementY()` instead.", + "" + ], + "origin": { + "identifier": "MousePointerLock", + "name": "gdevelop-extension-store" + }, + "tags": [ + "mouse", + "lock", + "cursor", + "pointer" + ], + "authorIds": [ + "Zu55H5hcb9YmZTltIVOTAFDJQyB2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const canvas = runtimeScene.getGame().getRenderer().getCanvas();", + "", + "gdjs._MousePointerLockExtension = {};", + "gdjs._MousePointerLockExtension.movement = { x: 0, y: 0 };", + "", + "canvas.addEventListener(\"mousemove\", (e) => {", + " gdjs._MousePointerLockExtension.movement.x += e.movementX || 0;", + " gdjs._MousePointerLockExtension.movement.y += e.movementY || 0;", + "}, false);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._MousePointerLockExtension.movement = { x: 0, y: 0 };", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Get the movement of the pointer on the X-axis.", + "fullName": "Pointer X movement", + "functionType": "Expression", + "name": "MovementX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._MousePointerLockExtension.movement.x || 0;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Get the movement of the pointer on the Y-axis.", + "fullName": "Pointer Y movement", + "functionType": "Expression", + "name": "MovementY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._MousePointerLockExtension.movement.y || 0;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Lock the mouse pointer to hide it.", + "fullName": "Request Pointer Lock", + "functionType": "Action", + "name": "RequestPointerLock", + "sentence": "Request Pointer Lock", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const canvas = runtimeScene.getGame().getRenderer().getCanvas();\r", + "canvas.requestPointerLock({ unadjustedMovement: true });" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Unlocks the mouse pointer and show it.", + "fullName": "Exit pointer lock", + "functionType": "Action", + "name": "ExitPointerLock", + "sentence": "Exit pointer lock", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "document.exitPointerLock();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if the mouse pointer is locked.", + "fullName": "Pointer is locked", + "functionType": "Condition", + "name": "isPointerLocked", + "sentence": "The mouse pointer is locked", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = document.pointerLockElement ? true : false;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Slider", + "helpPath": "/objects/slider", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", + "name": "PanelSpriteSlider", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", + "shortDescription": "A draggable slider that users can move to select a numerical value.", + "version": "1.4.2", + "description": [ + "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", + "", + "There are ready-to-use sliders in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." + ], + "origin": { + "identifier": "PanelSpriteSlider", + "name": "gdevelop-extension-store" + }, + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Represent a value on a slider.", + "fullName": "Slider", + "name": "Slider", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "description": "the value of the object.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "name": "Value", + "sentence": "the value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Value", + "name": "SetValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::PropertyStepSize" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::PropertyStepSize" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum value of the object.", + "fullName": "Minimum value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "MinValue", + "sentence": "the minimum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMinValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MinValue", + "name": "SetMinValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum value of the object.", + "fullName": "Maximum value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "MaxValue", + "sentence": "the maximum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxValue", + "name": "SetMaxValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the bar value bounds size.", + "fullName": "Size", + "functionType": "ExpressionAndCondition", + "name": "Size", + "sentence": "the bar value bounds size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::MaxValue() - Object.Behavior::MinValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the step size of the object.", + "fullName": "Step size", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "StepSize", + "sentence": "the step size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyStepSize()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StepSize", + "name": "SetStepSize", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Value" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MinValue" + }, + { + "value": "1", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MaxValue" + }, + { + "value": "0", + "type": "Number", + "label": "Step size", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "StepSize" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", + "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTouchId()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "defaultName": "Slider", + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Slider", + "name": "PanelSpriteSlider", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Background", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "FillBar", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Background", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "FillBar", + "=", + "2" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Thumb", + "=", + "3" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the label that is displayed over the thumb." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Label", + "=", + "4" + ] + }, + { + "type": { + "value": "TextObject::SetWrapping" + }, + "parameters": [ + "Label", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass the configuration to the behavior." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()", + "Object.PropertyInitialValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "FillBar", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + }, + "parameters": [ + "Object", + "!=", + "Object.PropertyPreviousInitialValue()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()", + "Object.PropertyInitialValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Resize", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Width()", + "!=", + "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Height()", + "!=", + "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Background", + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Background", + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Background.Variable(Width)" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Background.Variable(Height)" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The parent size is not defined in onCreate so it needs to be done here." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider is being dragged.", + "fullName": "Being dragged", + "functionType": "Condition", + "group": "Slider", + "name": "IsBeingDragged", + "sentence": "_PARAM0_ is being dragged", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the value of the slider.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "name": "Value", + "sentence": "the value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Value", + "name": "SetValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum value of the slider.", + "fullName": "Minimum value", + "functionType": "ExpressionAndCondition", + "group": "Slider configuration", + "name": "MinValue", + "sentence": "the minimum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::MinValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MinValue", + "name": "SetMinValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetMinValue" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum value of the slider.", + "fullName": "Maximum value", + "functionType": "ExpressionAndCondition", + "group": "Slider configuration", + "name": "MaxValue", + "sentence": "the maximum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::MaxValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxValue", + "name": "SetMaxValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetMaxValue" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the step size of the slider.", + "fullName": "Step size", + "functionType": "ExpressionAndCondition", + "group": "Slider configuration", + "name": "StepSize", + "sentence": "the step size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::StepSize()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StepSize", + "name": "SetStepSize", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetStepSize" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the label is shown.", + "fullName": "Label is shown", + "functionType": "Condition", + "group": "Slider configuration", + "name": "IsLabelShown", + "sentence": "_PARAM0_ label is shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Show (or hide) the label on the bar.", + "fullName": "Show label", + "functionType": "Action", + "group": "Slider configuration", + "name": "SetLabelShown", + "sentence": "Show the label of _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + }, + "parameters": [ + "Object", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + }, + "parameters": [ + "Object", + "yes" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Show the label", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", + "fullName": "Update layout", + "functionType": "Action", + "name": "UpdateLayout", + "private": true, + "sentence": "Update layout of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "FillBar", + "=", + "Object.PropertyBarLeftPadding()", + "=", + "Object.PropertyBarTopPadding()" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "FillBar", + "=", + "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update the thumb position according to the slider value.", + "fullName": "Update thumb position", + "functionType": "Action", + "name": "UpdateThumbPosition", + "private": true, + "sentence": "Update the thumb position of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::Size" + }, + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "=", + "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Thumb", + "=", + "Object.FullBarLeft() + FillBar.Width()" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Label", + "=", + "ToString(Object.Value())" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + ] + }, + { + "type": { + "value": "TextObject::Angle" + }, + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarLeft", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.PropertyBarLeftPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarRight", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Background.Width() - Object.PropertyBarRightPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarWidth", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update the slider configuration.", + "fullName": "Update slider configuration", + "functionType": "Action", + "name": "UpdateSliderConfiguration", + "private": true, + "sentence": "Update the slider configuration of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass configuration to the behavior and update children." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetMinValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyMinValue()", + "Object.PropertyMaxValue()", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetMaxValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyMaxValue()", + "Object.PropertyMaxValue()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetStepSize" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyStepSize()", + "Object.PropertyMaxValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "no" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider allows interactions.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Bar left margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarLeftPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bar top margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarTopPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bar right margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarRightPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bar bottom margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarBottomPadding" + }, + { + "value": "true", + "type": "Boolean", + "label": "Show the label when the value is changed", + "description": "", + "group": "Label", + "extraInformation": [], + "hidden": false, + "name": "ShowLabelAtChanges" + }, + { + "value": "8", + "type": "Number", + "label": "Label margin", + "description": "", + "group": "Label", + "extraInformation": [], + "hidden": false, + "name": "LabelMargin" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "MinValue" + }, + { + "value": "100", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "MaxValue" + }, + { + "value": "1", + "type": "Number", + "label": "Step size", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "StepSize" + }, + { + "value": "50", + "type": "Number", + "label": "Initial value", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "InitialValue" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "It's used to detect a change at hot reload.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousInitialValue" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Thumb" + ], + "hidden": true, + "name": "ThumbAnchorOrigin" + }, + { + "value": "Center-right", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "FillBar" + ], + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Label" + ], + "hidden": true, + "name": "ShowLabel" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ] + } + ] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file