From 15be251d67843cbb0e83110d657ec31dd9d009cf Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:28:55 +0000 Subject: [PATCH] Add the 3D car touch controls example --- .../3d-car-touch-controls.json | 23541 ++++++++++++++++ examples/3d-car-touch-controls/README.md | 10 + .../Flat dark joystick border horizontal.png | Bin 0 -> 4013 bytes .../Flat dark joystick border vertical.png | Bin 0 -> 3944 bytes .../assets/Flat dark joystick thumb.png | Bin 0 -> 2939 bytes .../assets/NotoSansArabicUI-Black.ttf | Bin 0 -> 338040 bytes .../assets/Orange - Sedan Sports.glb | Bin 0 -> 68400 bytes .../assets/Skybox_Back.png | Bin 0 -> 147648 bytes .../assets/Skybox_Bottom.png | Bin 0 -> 144906 bytes .../assets/Skybox_Front.png | Bin 0 -> 183446 bytes .../assets/Skybox_Left.png | Bin 0 -> 169033 bytes .../assets/Skybox_Right.png | Bin 0 -> 179288 bytes .../assets/Skybox_Top.png | Bin 0 -> 205429 bytes .../assets/StartingCheckeredPattern.png | Bin 0 -> 2645 bytes .../assets/StartingCheckpointArrow.png | Bin 0 -> 2000 bytes .../assets/StartingFinishLine.png | Bin 0 -> 2625 bytes .../assets/StartingGround.png | Bin 0 -> 32035 bytes .../assets/StartingWall.png | Bin 0 -> 2756 bytes .../assets/Toybox Brake Pedal.png | Bin 0 -> 7791 bytes .../assets/Toybox Gas Pedal.png | Bin 0 -> 8177 bytes .../assets/Toybox Steering Wheel.png | Bin 0 -> 36101 bytes .../assets/Traffic Cone.glb | Bin 0 -> 7432 bytes examples/3d-car-touch-controls/preview.png | Bin 0 -> 273973 bytes examples/3d-car-touch-controls/thumbnail.png | Bin 0 -> 229521 bytes 24 files changed, 23551 insertions(+) create mode 100644 examples/3d-car-touch-controls/3d-car-touch-controls.json create mode 100644 examples/3d-car-touch-controls/README.md create mode 100644 examples/3d-car-touch-controls/assets/Flat dark joystick border horizontal.png create mode 100644 examples/3d-car-touch-controls/assets/Flat dark joystick border vertical.png create mode 100644 examples/3d-car-touch-controls/assets/Flat dark joystick thumb.png create mode 100644 examples/3d-car-touch-controls/assets/NotoSansArabicUI-Black.ttf create mode 100644 examples/3d-car-touch-controls/assets/Orange - Sedan Sports.glb create mode 100644 examples/3d-car-touch-controls/assets/Skybox_Back.png create mode 100644 examples/3d-car-touch-controls/assets/Skybox_Bottom.png create mode 100644 examples/3d-car-touch-controls/assets/Skybox_Front.png create mode 100644 examples/3d-car-touch-controls/assets/Skybox_Left.png create mode 100644 examples/3d-car-touch-controls/assets/Skybox_Right.png create mode 100644 examples/3d-car-touch-controls/assets/Skybox_Top.png create mode 100644 examples/3d-car-touch-controls/assets/StartingCheckeredPattern.png create mode 100644 examples/3d-car-touch-controls/assets/StartingCheckpointArrow.png create mode 100644 examples/3d-car-touch-controls/assets/StartingFinishLine.png create mode 100644 examples/3d-car-touch-controls/assets/StartingGround.png create mode 100644 examples/3d-car-touch-controls/assets/StartingWall.png create mode 100644 examples/3d-car-touch-controls/assets/Toybox Brake Pedal.png create mode 100644 examples/3d-car-touch-controls/assets/Toybox Gas Pedal.png create mode 100644 examples/3d-car-touch-controls/assets/Toybox Steering Wheel.png create mode 100644 examples/3d-car-touch-controls/assets/Traffic Cone.glb create mode 100644 examples/3d-car-touch-controls/preview.png create mode 100644 examples/3d-car-touch-controls/thumbnail.png diff --git a/examples/3d-car-touch-controls/3d-car-touch-controls.json b/examples/3d-car-touch-controls/3d-car-touch-controls.json new file mode 100644 index 000000000..798296c19 --- /dev/null +++ b/examples/3d-car-touch-controls/3d-car-touch-controls.json @@ -0,0 +1,23541 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 284, + "major": 5, + "minor": 6, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, + "folderProject": false, + "orientation": "landscape", + "packageName": "com.example.cartouchcontrols", + "pixelsRounding": false, + "projectUuid": "1ce7871f-b443-489f-9769-82709b348608", + "scaleMode": "linear", + "sizeOnStartupMode": "", + "templateSlug": "", + "version": "1.0.0", + "name": "3D car touch controls", + "description": "", + "author": "", + "windowWidth": 1280, + "windowHeight": 720, + "latestCompilationDirectory": "", + "maxFPS": 60, + "minFPS": 20, + "verticalSync": false, + "platformSpecificAssets": { + "android-icon-144": "", + "android-icon-192": "", + "android-icon-36": "", + "android-icon-48": "", + "android-icon-72": "", + "android-icon-96": "", + "android-windowSplashScreenAnimatedIcon": "", + "desktop-icon-512": "", + "ios-icon-100": "", + "ios-icon-1024": "", + "ios-icon-114": "", + "ios-icon-120": "", + "ios-icon-144": "", + "ios-icon-152": "", + "ios-icon-167": "", + "ios-icon-180": "", + "ios-icon-20": "", + "ios-icon-29": "", + "ios-icon-40": "", + "ios-icon-50": "", + "ios-icon-57": "", + "ios-icon-58": "", + "ios-icon-60": "", + "ios-icon-72": "", + "ios-icon-76": "", + "ios-icon-80": "", + "ios-icon-87": "" + }, + "loadingScreen": { + "backgroundColor": 0, + "backgroundFadeInDuration": 0.2, + "backgroundImageResourceName": "", + "gdevelopLogoStyle": "light", + "logoAndProgressFadeInDuration": 0.2, + "logoAndProgressLogoFadeInDelay": 0, + "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": [ + "mobile" + ], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "file": "assets/StartingCheckeredPattern.png", + "kind": "image", + "metadata": "", + "name": "assets\\StartingCheckeredPattern.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Flat dark joystick thumb.png", + "kind": "image", + "metadata": "", + "name": "assets\\Flat dark joystick thumb.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Orange - Sedan Sports.glb", + "kind": "model3D", + "metadata": "", + "name": "assets\\Orange - Sedan Sports.glb", + "userAdded": false + }, + { + "file": "assets/StartingGround.png", + "kind": "image", + "metadata": "", + "name": "assets\\StartingGround.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Traffic Cone.glb", + "kind": "model3D", + "metadata": "", + "name": "Traffic Cone.glb", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/3D Toon Shooter/Prop/341d0630877a91adc1813baeb761051a5f9768cdbd5a083a7d8b1972a187ed34_Traffic Cone.glb", + "name": "Traffic Cone.glb" + } + }, + { + "file": "assets/StartingFinishLine.png", + "kind": "image", + "metadata": "", + "name": "assets\\StartingFinishLine.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/NotoSansArabicUI-Black.ttf", + "kind": "font", + "metadata": "", + "name": "assets\\NotoSansArabicUI-Black.ttf", + "userAdded": false + }, + { + "file": "assets/StartingCheckpointArrow.png", + "kind": "image", + "metadata": "", + "name": "assets\\StartingCheckpointArrow.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Skybox_Front.png", + "kind": "image", + "metadata": "", + "name": "assets/Skybox_Front.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Skybox_Back.png", + "kind": "image", + "metadata": "", + "name": "assets/Skybox_Back.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Skybox_Top.png", + "kind": "image", + "metadata": "", + "name": "assets/Skybox_Top.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Skybox_Bottom.png", + "kind": "image", + "metadata": "", + "name": "assets/Skybox_Bottom.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Skybox_Left.png", + "kind": "image", + "metadata": "", + "name": "assets/Skybox_Left.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Skybox_Right.png", + "kind": "image", + "metadata": "", + "name": "assets/Skybox_Right.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/StartingWall.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingWall.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Flat dark joystick border vertical.png", + "kind": "image", + "metadata": "", + "name": "assets/Flat dark joystick border vertical.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Flat dark joystick border horizontal.png", + "kind": "image", + "metadata": "", + "name": "assets/Flat dark joystick border horizontal.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/StartingGround.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingGround.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Toybox Gas Pedal.png", + "kind": "image", + "metadata": "", + "name": "Toybox Gas Pedal.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Toybox Brake Pedal.png", + "kind": "image", + "metadata": "", + "name": "Toybox Brake Pedal.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Toybox Steering Wheel.png", + "kind": "image", + "metadata": "", + "name": "Toybox Steering Wheel.png", + "smoothed": true, + "userAdded": true + } + ] + }, + "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, + "objectsGroups": [], + "variables": [], + "layouts": [ + { + "b": 255, + "disableInputWhenNotFocused": true, + "mangledName": "Game_32Scene", + "name": "Game Scene", + "r": 255, + "renderer3DWorldScale": 100, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 255, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 64, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": true, + "zoomFactor": 0.49508400737491426, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "embedded-game" + }, + "objectsGroups": [], + "variables": [ + { + "name": "ControlScheme", + "type": "number", + "value": 1 + }, + { + "name": "HasSchemeChanged", + "type": "boolean", + "value": false + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 10, + "height": 1792, + "layer": "", + "locked": true, + "name": "Road_3D", + "persistentUuid": "46a0d799-55c4-4f44-b430-120b5b0bc11e", + "width": 512, + "x": -1408, + "y": 576, + "z": -10, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 255, + "height": 256, + "layer": "", + "name": "Road_3D", + "persistentUuid": "7e18d5f9-dfff-4bca-840a-a8089a7fa03e", + "rotationY": 75, + "width": 271, + "x": -97, + "y": 192, + "z": -227, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "PlayerCar", + "persistentUuid": "31232cc0-c2cd-4841-8233-8189786cb81f", + "width": 0, + "x": 640, + "y": 320, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "MobileControls", + "locked": true, + "name": "Steer_Joystick", + "persistentUuid": "6c0d6cbc-a8d1-4930-b2e4-a83ac76f2d7e", + "width": 0, + "x": 208, + "y": 537, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TrafficCone", + "persistentUuid": "d099a348-ab4f-49c1-95d1-96f433ab7515", + "width": 0, + "x": 1360, + "y": 592, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TrafficCone", + "persistentUuid": "b372c747-5d02-4905-b811-3f2d08302d8f", + "width": 0, + "x": 1360, + "y": 48, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 128, + "keepRatio": true, + "layer": "UI", + "locked": true, + "name": "LapText", + "persistentUuid": "0df2e3be-2714-4f3a-9d8d-070d5aafb98e", + "width": 416, + "x": 32, + "y": 32, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 10, + "height": 512, + "layer": "", + "locked": true, + "name": "Road_3D", + "persistentUuid": "fde56f5b-98c9-4f2b-88a4-e2e38543f417", + "width": 4096, + "x": -1408, + "y": 2368, + "z": -10, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 10, + "height": 1792, + "layer": "", + "locked": true, + "name": "Road_3D", + "persistentUuid": "9e640006-bc3b-4f2c-b159-0f8db6c5eb77", + "width": 512, + "x": 2176, + "y": 576, + "z": -10, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 10, + "height": 512, + "layer": "", + "locked": true, + "name": "Road_3D", + "persistentUuid": "7cf2d31f-329b-441d-8ebe-3b348efff87e", + "width": 4096, + "x": -1408, + "y": 64, + "z": -10, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 270, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "CheckpointArrow", + "persistentUuid": "11f21b7d-6d1a-475f-b8af-40af39020148", + "width": 0, + "x": -1216, + "y": 1152, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "name": "Checkpoint", + "type": "number", + "value": 4 + } + ] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "CheckpointArrow", + "persistentUuid": "6609c5de-0942-442d-a5ea-854600876d72", + "width": 0, + "x": 1408, + "y": 256, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "name": "FinishLine", + "type": "boolean", + "value": true + }, + { + "name": "Checkpoint", + "type": "number", + "value": 1 + } + ] + }, + { + "angle": 90, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "CheckpointArrow", + "persistentUuid": "81e614f0-a872-4733-8776-c1b39a179439", + "width": 0, + "x": 2368, + "y": 1600, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "name": "Checkpoint", + "type": "number", + "value": 2 + } + ] + }, + { + "angle": 180, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "CheckpointArrow", + "persistentUuid": "5f4b441c-42df-49dd-afb1-688a02d82ce3", + "width": 0, + "x": 128, + "y": 2560, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "name": "Checkpoint", + "type": "number", + "value": 3 + } + ] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TrafficCone", + "persistentUuid": "c052b642-2d5f-4282-89f0-df9355a4d69c", + "width": 0, + "x": 1488, + "y": 48, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TrafficCone", + "persistentUuid": "2439a864-b9bb-4986-a5c9-46d37d0e084d", + "width": 0, + "x": 1424, + "y": 48, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TrafficCone", + "persistentUuid": "74cf6e64-d85d-4c4b-9437-5593649bffa2", + "width": 0, + "x": 1488, + "y": 592, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TrafficCone", + "persistentUuid": "960f5a09-aea1-468f-ab3e-4dccd65411a3", + "width": 0, + "x": 1424, + "y": 592, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "d341bbe5-226f-49e6-858f-bb6b168ef06e", + "width": 2496, + "x": -640, + "y": 832, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "e0ad31b9-ce4c-44a9-b145-002eee2900a0", + "width": 4672, + "x": -1664, + "y": -256, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "96b1d772-a817-4590-bae0-7b3083345a91", + "width": 4672, + "x": -1728, + "y": 3136, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "341a0214-5a04-4b02-a96f-a62a222b311c", + "width": 2496, + "x": -576, + "y": 2048, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 3392, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "6c501c40-2cd2-47fd-b966-6c73cc7c5d5e", + "width": 64, + "x": 2944, + "y": -192, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 3392, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "3f4d6a10-2ade-4911-9018-933071b57003", + "width": 64, + "x": -1728, + "y": -256, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1216, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "b0b67c52-f2e0-4d6e-bf8a-b381ee0584ce", + "width": 64, + "x": -640, + "y": 896, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1216, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "a6aab085-b1ef-47b7-afdc-067bd06711fa", + "width": 64, + "x": 1856, + "y": 832, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 90, + "customSize": true, + "depth": 2, + "height": 128, + "layer": "", + "name": "FinishLine_3D", + "persistentUuid": "1db3deb5-1e30-4d46-8313-ada820f56bd8", + "width": 1024, + "x": 1088, + "y": 256, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 3328, + "layer": "", + "locked": true, + "name": "Terrain", + "persistentUuid": "bd85f7c9-b3ca-4f8e-ad57-acb797a0be2b", + "width": 4608, + "x": -1664, + "y": -192, + "z": -1, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "MobileControls", + "name": "BrakePedal", + "persistentUuid": "9186ef01-1dd8-44a8-ae73-a1286aaaba13", + "width": 0, + "x": 1048, + "y": 548, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "MobileControls", + "name": "GasPedal", + "persistentUuid": "7d902f1a-9488-41bf-9b44-8af3892f6983", + "width": 0, + "x": 1156, + "y": 548, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "MobileControls", + "name": "SteeringWheel", + "persistentUuid": "cba80d31-23d2-4fac-881b-2ebfa080d4c4", + "width": 0, + "x": 40, + "y": 480, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 40, + "layer": "UI", + "name": "ControlsText", + "persistentUuid": "6f5a9415-dab8-41fc-817f-b602bb2d2b82", + "width": 500, + "x": 760, + "y": 28, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "Road_3D", + "persistentUuid": "c8c63595-4975-4a4f-86ee-55743752c8d5", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 1, + "friction": 7, + "restitution": 0, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "width": 128, + "height": 128, + "depth": 128, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "assets\\StartingCheckeredPattern.png", + "backFaceResourceName": "assets\\StartingCheckeredPattern.png", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets\\StartingCheckeredPattern.png", + "rightFaceResourceName": "assets\\StartingCheckeredPattern.png", + "topFaceResourceName": "assets\\StartingCheckeredPattern.png", + "bottomFaceResourceName": "assets\\StartingCheckeredPattern.png", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true, + "tileScale": 0.2 + } + }, + { + "assetStoreId": "cddab55130dbd5a0b36f763200e876fb514aa608e1b057a136ebdb5f80006e2c", + "name": "PlayerCar", + "persistentUuid": "191c2cfe-430f-4fdb-9f74-2d8cb2fcd734", + "type": "Scene3D::Model3DObject", + "variables": [ + { + "name": "LastCheckPoint", + "persistentUuid": "1940c891-b587-424a-95ed-90a80ca00807", + "type": "number", + "value": 0 + }, + { + "name": "LapNumber", + "persistentUuid": "998b192e-cbb7-41bf-858e-e06bcca957a6", + "type": "number", + "value": 0 + } + ], + "effects": [], + "behaviors": [ + { + "isFolded": true, + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Dynamic", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 74, + "shapeDimensionB": 39, + "shapeDimensionC": 27, + "density": 1, + "friction": 10, + "restitution": 0.5, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 6, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 6, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": -25, + "massOverride": 1500 + }, + { + "isFolded": true, + "name": "PhysicsCar3D", + "type": "Physics3D::PhysicsCar3D", + "physics3D": "Physics3D", + "steerAngleMax": 70, + "beginningSteerSpeed": 140, + "endSteerSpeed": 10, + "mass": 1500, + "engineTorqueMax": 8000, + "engineSpeedMax": 6000, + "engineInertia": 0.1, + "reverseGearRatio1": -2.9, + "gearRatio1": 2.66, + "gearRatio2": 1.78, + "gearRatio3": 1.3, + "gearRatio4": 1, + "gearRatio5": 0.74, + "gearRatio6": 0, + "backWheelOffsetX": -6, + "frontWheelOffsetX": 10, + "wheelOffsetY": 3, + "wheelOffsetZ": 0, + "wheelRadius": 6, + "wheelWidth": 3, + "brakeTorqueMax": 3000, + "handBrakeTorqueMax": 6000, + "hasBackWheelDrive": false, + "hasFrontWheelDrive": true, + "pitchRollAngleMax": 89 + }, + { + "isFolded": true, + "name": "PhysicsCar3DKeyboardMapper", + "type": "PhysicsCar3DKeyMapper::PhysicsCar3DKeyboardMapper", + "PhysicsCar3D": "PhysicsCar3D", + "HandBrake": "Space", + "Up": "Up", + "Left": "Left", + "Down": "Down", + "Right": "Right" + }, + { + "name": "PhysicsCar3DMultitouchMapper", + "type": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", + "PhysicsCar3D": "PhysicsCar3D", + "ControllerIdentifier": 1, + "SteerJoystickIdentifier": "Primary", + "SpeedJoystickIdentifier": "Secondary", + "HandBrakeButton": "B" + }, + { + "name": "ThirdPersonCamera", + "type": "ThirdPersonCamera::ThirdPersonCamera", + "Object3D": "Object3D", + "RotationHalfwayDuration": 0.125, + "TranslationZHalfwayDuration": 0.25, + "Distance": 450, + "LateralOffset": 0, + "AheadOffset": 200, + "OffsetZ": 0, + "RotationAngleOffset": 0, + "ElevationAngleOffset": 10, + "FollowFreeAreaZMax": 0, + "FollowFreeAreaZMin": 0, + "RotationLogSpeed": 2.0247e-320, + "TranslationZLogSpeed": 2.0247e-320, + "IsCalledManually": false, + "CameraZ": 0, + "LocalOffsetY": 200, + "LocalOffsetX": 0, + "OffsetY": 200, + "ElevationHalfwayDuration": 1, + "IsElevatingWithObject": false, + "OffsetX": 0 + } + ], + "content": { + "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, + "depth": 33, + "height": 39, + "isCastingShadow": true, + "isReceivingShadow": true, + "keepAspectRatio": true, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "assets\\Orange - Sedan Sports.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": -90, + "width": 74, + "animations": [] + } + }, + { + "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", + "name": "Steer_Joystick", + "persistentUuid": "340cca5d-d51e-4e7b-ad28-bc0dc6bcf73e", + "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "JoystickIdentifier": "Primary", + "DeadZoneRadius": 0.2 + }, + "childrenContent": { + "Border": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets/Flat dark joystick border horizontal.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + "Thumb": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Flat dark joystick thumb.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + } + }, + { + "assetStoreId": "8f75165255eac00288d9b81c0063f2a3bdb26a7748fc7b2e17963a426f0a0aa4", + "name": "TrafficCone", + "type": "Scene3D::Model3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Dynamic", + "bullet": false, + "fixedRotation": false, + "shape": "Cylinder", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0, + "density": 2, + "friction": 0.3, + "restitution": 0.1, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 2, + "layers": 17, + "masks": 17 + } + ], + "content": { + "centerLocation": "ObjectCenter", + "crossfadeDuration": 0.10000000149011612, + "depth": 32, + "height": 32, + "isCastingShadow": true, + "isReceivingShadow": true, + "keepAspectRatio": true, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "Traffic Cone.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": 90, + "width": 32, + "animations": [] + } + }, + { + "assetStoreId": "", + "name": "FinishLine_3D", + "persistentUuid": "91cf8a93-038f-4ba8-bdb9-c8b6f793d194", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 128, + "height": 128, + "depth": 1, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "assets\\StartingFinishLine.png", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets\\StartingFinishLine.png", + "rightFaceResourceName": "assets\\StartingFinishLine.png", + "topFaceResourceName": "assets\\StartingFinishLine.png", + "bottomFaceResourceName": "assets\\StartingFinishLine.png", + "frontFaceVisible": true, + "backFaceVisible": false, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": true, + "tileScale": 0.2 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "LapText", + "persistentUuid": "8febc900-33a2-426a-a78c-0aa7d9ae611f", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Time: 00:00\nLap: 1", + "font": "assets\\NotoSansArabicUI-Black.ttf", + "textAlignment": "left", + "characterSize": 32, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": true, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time: 00:00\nLap: 1", + "font": "assets\\NotoSansArabicUI-Black.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 32, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "CheckpointArrow", + "persistentUuid": "71080efb-67c7-4f21-98b3-30c38f5c58e6", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "name": "Checkpoint", + "type": "number", + "value": 0 + }, + { + "name": "FinishLine", + "type": "boolean", + "value": false + } + ], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\StartingCheckpointArrow.png", + "points": [ + { + "name": "TravelDirection", + "x": 128, + "y": 64 + } + ], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 22 + }, + { + "x": 126, + "y": 22 + }, + { + "x": 126, + "y": 106 + }, + { + "x": 2, + "y": 106 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Walls_3D", + "persistentUuid": "9302e7e5-3ae1-4c52-9244-72b5350b712e", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 1, + "friction": 7, + "restitution": 0, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "width": 128, + "height": 128, + "depth": 128, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "assets/StartingWall.png", + "backFaceResourceName": "assets/StartingWall.png", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets/StartingWall.png", + "rightFaceResourceName": "assets/StartingWall.png", + "topFaceResourceName": "assets/StartingWall.png", + "bottomFaceResourceName": "assets/StartingWall.png", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true, + "tileScale": 0.2 + } + }, + { + "assetStoreId": "", + "name": "Terrain", + "persistentUuid": "a7f31fbc-dd5a-433a-9b33-2817645ac8d4", + "type": "Terrain3D::Terrain3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "meshShapeResourceName": "", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0, + "density": 1, + "friction": 6, + "restitution": 0.1, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17 + } + ], + "content": { + "SculptData": "2;256;v9EBFyESfqYCyAPCA64DmgOIA4ID+gPKBMIE5AO6ArYBngGQAZABnAGkAYgBggGaAcoBmAKkA9gDlAPeAUfbA68G7weFCOUGiQSbAVzeAeIBcEupAZUBCfgB7APOBNQEiATuAqQBMgEEQqoBrgGOAXpucL4BnAKcAsIBDsMB6wHZAZMBGY4BvAKiA8ADmgOuAsoBlgFmPhoCBiRSlAHqAa4CtgKIAqIBBq8BxwLJA7EE/QSvBccFrQXZBMsDjQK1AYkBWy0DTesB2QKPA5MD0wLpAZ0BfX+fAUkYTl5GPlpqcnBMCARM4AGcA8gCzgGaAa4BgALsAqYDrAP8AqICxAHQAeYB9AH8AYwC+gKsA/wC7AEB0QGrAtMCyQKNAqsBcWeZAY8CsQOBBocItQiBB4sFmwSjBJ0E9QOrA+0CuQP1A4EEwQO7At8BowGDAXd1Z1tJFSiqAeQDigWOBfID4AHkAbACzALAAoYCugF8Qgwhb/8B2wL1As0C6wGTAr0CqwLdAU0MGkiOAfAB2gKKA5AD7gKsAtoBzgLKA4AE9gOqA7AD+gOCBMYDzAKqASo5hwG/AecBrwLVAsUC+QFxUwYSEhAEBwcFAwECDhgaGAgEBgYGAgUXHyEXAQwQEg4IChggIBgGDxkdEwMEBAQAAQULExEPBwABAgEBAwUFBQMBAQICBAYMEBgcGA4ECw8RDwECAgICAAEEDg4OBgsnOTsvEwABBAgKCgwSFhQMBAcJDw0JAAEKEhIOChggIBQEDRsdFQkFDQ8NBw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IBAP8BAQIAgAIBAIACAQCBBAIAgAIBAIACAQCbuQIGAIACAgD/AQIAAQCBhAQAgYQEAIGEBACBhAQAgYQEAIGEBA==", + "Layer1Texture": "assets/StartingGround.png", + "Layer1Color": "255;255;255", + "HeightBlending": 0.5, + "TextureVariation": 0, + "TextureSize": 128, + "CliffLayer": "3", + "Layer2Texture": "", + "Layer3Texture": "", + "CliffAngle": 45, + "CastShadow": false, + "Layer2Color": "255;255;255" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "GasPedal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Pedal", + "type": "MultitouchDrivingControls::Pedal", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Secondary", + "Direction": "Up", + "TouchId": 0, + "TouchIndex": 0, + "PedalAngle": 0, + "WasReleased": false + }, + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton", + "ControllerIdentifier": 1, + "ButtonIdentifier": "Gas", + "TouchId": 0, + "TouchIndex": 0, + "IsReleased": false, + "IsJustPressed": false, + "Radius": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Toybox Gas Pedal.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "BrakePedal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Pedal", + "type": "MultitouchDrivingControls::Pedal", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Secondary", + "Direction": "Down", + "TouchId": 0, + "TouchIndex": 0, + "PedalAngle": 0, + "WasReleased": false + }, + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton", + "ControllerIdentifier": 1, + "ButtonIdentifier": "Brake", + "TouchId": 0, + "TouchIndex": 0, + "IsReleased": false, + "IsJustPressed": false, + "Radius": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Toybox Brake Pedal.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "SteeringWheel", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "SteeringWheel", + "type": "MultitouchDrivingControls::SteeringWheel", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "MaxAngle": 120, + "ReturnSpeed": 360, + "TouchId": 0, + "TouchIndex": 0, + "TouchAngle": 0, + "LastTouchAngle": 0, + "WheelAngle": 0, + "IsMovingStick": false + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Toybox Steering Wheel.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ControlsText", + "persistentUuid": "79cadf1b-5ad2-4d5a-86fd-39e949c0457c", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton", + "ControllerIdentifier": 1, + "ButtonIdentifier": "SwitchControls", + "TouchId": 0, + "TouchIndex": 0, + "IsReleased": false, + "IsJustPressed": false, + "Radius": 0 + } + ], + "string": "Controls: joystick + pedals", + "font": "assets\\NotoSansArabicUI-Black.ttf", + "textAlignment": "left", + "characterSize": 26, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": true, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Controls: joystick + pedals", + "font": "assets\\NotoSansArabicUI-Black.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 26, + "lineHeight": 0, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Road_3D" + }, + { + "objectName": "Walls_3D" + }, + { + "objectName": "FinishLine_3D" + }, + { + "objectName": "Terrain" + }, + { + "objectName": "CheckpointArrow" + }, + { + "objectName": "PlayerCar" + }, + { + "objectName": "TrafficCone" + }, + { + "objectName": "LapText" + }, + { + "folderName": "Mobile Controls", + "children": [ + { + "objectName": "Speed_Joystick" + }, + { + "objectName": "Steer_Joystick" + } + ] + }, + { + "objectName": "GasPedal" + }, + { + "objectName": "BrakePedal" + }, + { + "objectName": "SteeringWheel" + }, + { + "objectName": "ControlsText" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneJustBegins" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberObjectVariable" + }, + "parameters": [ + "PlayerCar", + "LastCheckPoint", + "=", + "SceneInstancesCount(CheckpointArrow)" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "CheckpointArrow" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PickNearest" + }, + "parameters": [ + "CheckpointArrow", + "PlayerCar.CenterX()", + "PlayerCar.CenterY()", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "AngleDifference(AngleBetweenPositions(CheckpointArrow.CenterX(), CheckpointArrow.CenterY(), CheckpointArrow.PointX(\"TravelDirection\"), CheckpointArrow.PointY(\"TravelDirection\")), CheckpointArrow.AngleToObject(PlayerCar))", + "<", + "90" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "AngleDifference(AngleBetweenPositions(CheckpointArrow.CenterX(), CheckpointArrow.CenterY(), CheckpointArrow.PointX(\"TravelDirection\"), CheckpointArrow.PointY(\"TravelDirection\")), CheckpointArrow.AngleToObject(PlayerCar))", + ">", + "-90" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberObjectVariable" + }, + "parameters": [ + "CheckpointArrow", + "Checkpoint", + "=", + "PlayerCar.LastCheckPoint + 1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberObjectVariable" + }, + "parameters": [ + "PlayerCar", + "LastCheckPoint", + "=", + "CheckpointArrow.Checkpoint" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanObjectVariable" + }, + "parameters": [ + "CheckpointArrow", + "FinishLine", + "True", + "Player.LastCheckPoint+1" + ] + }, + { + "type": { + "value": "NumberObjectVariable" + }, + "parameters": [ + "PlayerCar", + "LastCheckPoint", + "=", + "SceneInstancesCount(CheckpointArrow)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberObjectVariable" + }, + "parameters": [ + "PlayerCar", + "LastCheckPoint", + "=", + "1" + ] + }, + { + "type": { + "value": "SetNumberObjectVariable" + }, + "parameters": [ + "PlayerCar", + "LapNumber", + "+", + "1" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "PlayerCar", + "\"LapTimer\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "LapText", + "Text", + "=", + "\"Time: \" + ToString(roundTo(PlayerCar.ObjectTimerElapsedTime(\"LapTimer\"), 1)) + \"\nLap: \" + PlayerCar.LapNumber" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Touch controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Two ways to drive on a touchscreen, with the same pedals on the right (they push the speed stick of the multitouch controller up or down, like the speed joystick did):\n1. A floating joystick: it appears where the left side of the screen is touched, and follows the finger.\n2. A steering wheel, turned with the finger.\nThe car has the \"3D car multitouch mapper\" behavior: it reads the sticks, so no event drives it." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Steer_Joystick" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasSchemeChanged", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsJustPressed" + }, + "parameters": [ + "ControlsText", + "MultitouchButton", + "" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"c\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ControlScheme", + "=", + "3 - ControlScheme" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasSchemeChanged", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasSchemeChanged", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasSchemeChanged", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ControlScheme", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "SteeringWheel" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "SteeringWheel", + "SteeringWheel", + "" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ControlsText", + "Text", + "=", + "\"Joystick + pedals (tap to change)\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ControlScheme", + "=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "SteeringWheel" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "SteeringWheel", + "SteeringWheel", + "yes" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Steer_Joystick" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ControlsText", + "Text", + "=", + "\"Wheel + pedals (tap to change)\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ControlScheme", + "=", + "1" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::HasTouchStartedOnScreenSide" + }, + "parameters": [ + "", + "Steer_Joystick", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::TeleportAndPress" + }, + "parameters": [ + "Steer_Joystick", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [ + { + "effectType": "Scene3D::DirectionalLight", + "name": "3D Sun Light", + "doubleParameters": { + "distanceFromCamera": 1500, + "elevation": 40, + "frustumSize": 2500, + "intensity": 0.75, + "minimumShadowBias": 1e-05, + "rotation": 300, + "shadowDistance": 3000, + "shadowNormalBias": 1 + }, + "stringParameters": { + "color": "255;255;255", + "shadowQuality": "medium", + "shadowRenderingMode": "fittedToCameraView", + "top": "Z+" + }, + "booleanParameters": { + "isCastingShadow": true + } + }, + { + "effectType": "Scene3D::HemisphereLight", + "name": "3D Ambient Hemisphere Light", + "doubleParameters": { + "elevation": 40, + "intensity": 0.33, + "rotation": 300 + }, + "stringParameters": { + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" + }, + "booleanParameters": {} + }, + { + "effectType": "Scene3D::Skybox", + "name": "SkyBox", + "doubleParameters": {}, + "stringParameters": { + "backFaceResourceName": "assets/Skybox_Back.png", + "bottomFaceResourceName": "assets/Skybox_Bottom.png", + "frontFaceResourceName": "assets/Skybox_Front.png", + "leftFaceResourceName": "assets/Skybox_Left.png", + "rightFaceResourceName": "assets/Skybox_Right.png", + "top": "Z+", + "topFaceResourceName": "assets/Skybox_Top.png" + }, + "booleanParameters": {} + } + ] + }, + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "MobileControls", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "UI", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "gravityX": 0, + "gravityY": 0, + "gravityZ": -9.8, + "worldScale": 20 + }, + { + "name": "PhysicsCar3D", + "type": "Physics3D::PhysicsCar3D" + }, + { + "name": "PhysicsCar3DKeyboardMapper", + "type": "PhysicsCar3DKeyMapper::PhysicsCar3DKeyboardMapper" + }, + { + "name": "PhysicsCar3DMultitouchMapper", + "type": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, + { + "name": "ThirdPersonCamera", + "type": "ThirdPersonCamera::ThirdPersonCamera" + } + ] + } + ], + "externalEvents": [], + "tests": [ + { + "description": "Holding the accelerator revs the engine and drives the car forward along its heading; it stays put when nothing is pressed.", + "name": "Accelerating drives the car forward", + "type": "gameplay", + "source": [ + "// The core of the game: the accelerator drives the car forward along its", + "// heading (\"Up\", per PhysicsCar3DKeyboardMapper).", + "await harness.goToScene('Game Scene');", + "harness.watch('PlayerCar');", + "", + "const getCar = () => harness.getObjects('PlayerCar')[0];", + "", + "// Let the car settle on the road.", + "await harness.stepFrames(10);", + "const start = getCar();", + "harness.assert(", + " start.behaviors.PhysicsCar3D.state.IsOnFloor === true,", + " 'The car rests on the road.'", + ");", + "const headingRadians = (start.angle * Math.PI) / 180;", + "", + "// Without any input the car does not drive away by itself.", + "await harness.stepFrames(8);", + "const idle = getCar();", + "const idleDistance = Math.hypot(idle.centerX - start.centerX, idle.centerY - start.centerY);", + "harness.assert(", + " idleDistance < 10,", + " 'The car stays put while no key is pressed (drifted ' + idleDistance.toFixed(1) + 'px).'", + ");", + "", + "// Accelerate.", + "harness.setKeyPressed('Up', true);", + "let maxEngineSpeed = 0;", + "await harness.stepFrames(38, {", + " onFrame: () => {", + " maxEngineSpeed = Math.max(", + " maxEngineSpeed,", + " getCar().behaviors.PhysicsCar3D.state.EngineSpeed", + " );", + " },", + "});", + "harness.releaseAllInputs();", + "const after = getCar();", + "", + "const travelX = after.centerX - idle.centerX;", + "const travelY = after.centerY - idle.centerY;", + "const travelled = Math.hypot(travelX, travelY);", + "const forwardDistance =", + " travelX * Math.cos(headingRadians) + travelY * Math.sin(headingRadians);", + "console.log(", + " 'travelled=' + Math.round(travelled) +", + " ' forward=' + Math.round(forwardDistance) +", + " ' maxEngineSpeed=' + Math.round(maxEngineSpeed) +", + " ' gear=' + after.behaviors.PhysicsCar3D.state.CurrentGear +", + " ' angleDelta=' + Math.round(after.angle - start.angle)", + ");", + "", + "harness.assert(", + " maxEngineSpeed > start.behaviors.PhysicsCar3D.state.EngineSpeed,", + " 'The engine revs up while accelerating (reached ' + Math.round(maxEngineSpeed) + ').'", + ");", + "harness.assert(", + " forwardDistance > 65,", + " 'Holding the accelerator drives the car forward (drove ' +", + " Math.round(forwardDistance) + 'px along its heading).'", + ");", + "harness.assert(", + " forwardDistance > 0.9 * travelled,", + " 'The car drives along its heading rather than sideways.'", + ");", + "harness.assert(", + " Math.abs(after.angle - start.angle) < 15,", + " 'The car keeps going straight while no steering key is pressed (turned by ' +", + " Math.round(after.angle - start.angle) + ' degrees).'", + ");" + ] + }, + { + "description": "The car is lined up before the finish line and driven over it: the lap counter goes up and the next checkpoint is the first of the new lap.", + "name": "Driving over the finish line counts a lap", + "type": "gameplay", + "source": [ + "// What makes it a race: driving past the finish line counts a lap and puts", + "// the car back on the first checkpoint.", + "await harness.goToScene('Game Scene');", + "harness.watch('PlayerCar');", + "", + "const getCar = () => harness.getObjects('PlayerCar')[0];", + "/** The race progress the game keeps in the car's own variables. */", + "const readProgress = () => {", + " const read = (name) => {", + " const variable = harness.getObjectVariable('PlayerCar', name);", + " return variable ? Number(variable.value) : null;", + " };", + " return { lap: read('LapNumber'), checkpoint: read('LastCheckPoint') };", + "};", + "", + "await harness.stepFrames(10);", + "const finishLine = harness.getObjects('CheckpointArrow').find((arrow) => {", + " const variable = arrow.variables.find((one) => one.name === 'FinishLine');", + " return variable && variable.value === true;", + "});", + "harness.assert(!!finishLine, 'The track has a finish line.');", + "", + "const atStart = readProgress();", + "console.log('atStart=' + JSON.stringify(atStart));", + "harness.assert(atStart.lap === 0, 'No lap has been run yet.');", + "", + "// Arrange: line the car up a short run-up before the finish line, on the", + "// track it starts on and pointing the way it already points. Driving over", + "// the line, and what that counts for, is still up to the game.", + "const car = getCar();", + "const RUN_UP = 100;", + "harness.assert(", + " car.centerX < finishLine.centerX,", + " 'The car starts before the finish line.'", + ");", + "harness.setObjectPosition(", + " car.id,", + " car.x + (finishLine.centerX - RUN_UP - car.centerX),", + " car.y + (finishLine.centerY - car.centerY),", + " car.z", + ");", + "await harness.stepFrames(8);", + "", + "// Being next to the finish line is not enough: it has to be driven over.", + "const beforeDriving = readProgress();", + "harness.assert(", + " beforeDriving.lap === 0,", + " 'Standing just before the finish line does not count a lap.'", + ");", + "", + "harness.setKeyPressed('Up', true);", + "const lapped = await harness.stepUntil(() => readProgress().lap >= 1, {", + " maxFrames: 55,", + "});", + "harness.releaseAllInputs();", + "", + "const finalCar = getCar();", + "const finalProgress = readProgress();", + "console.log(", + " 'final=' + JSON.stringify(finalProgress) +", + " ' carX=' + Math.round(finalCar.centerX) +", + " ' finishLineX=' + Math.round(finishLine.centerX)", + ");", + "", + "harness.assert(", + " finalCar.centerX > finishLine.centerX,", + " 'The car drove over the finish line (it is at x=' +", + " Math.round(finalCar.centerX) + ', the line is at x=' +", + " Math.round(finishLine.centerX) + ').'", + ");", + "harness.assert(", + " lapped && finalProgress.lap === 1,", + " 'Driving over the finish line counts a lap (the lap counter is at ' +", + " finalProgress.lap + ').'", + ");", + "harness.assert(", + " finalProgress.checkpoint === 1,", + " 'The next checkpoint to reach is the first one of the new lap (it is ' +", + " finalProgress.checkpoint + ').'", + ");", + "", + "// A picture of what the game looks like once this has happened, kept with", + "// the test results.", + "await harness.takeScreenshot('the car just past the finish line');" + ] + }, + { + "name": "The gas pedal drives the car forward", + "type": "gameplay", + "description": "Holding the gas pedal pushes the speed stick up: the car drives forward, without any key.", + "source": [ + "await harness.goToScene('Game Scene');", + "harness.watch('PlayerCar');", + "const getCar = () => harness.getObjects('PlayerCar')[0];", + "const center = name => { const o = harness.getObjects(name)[0]; return [o.x + o.width / 2, o.y + o.height / 2]; };", + "await harness.stepFrames(10);", + "const start = getCar();", + "const [gx, gy] = center('GasPedal'); harness.touchStart(1, gx, gy, 'MobileControls');", + "await harness.stepFrames(45);", + "const car = getCar(); const travelled = Math.hypot(car.centerX - start.centerX, car.centerY - start.centerY);", + "harness.assert(travelled > 100, 'The car drove ' + Math.round(travelled) + ' px.');", + "harness.touchEnd(1); await harness.stepFrames(2);" + ] + }, + { + "name": "The floating joystick steers", + "type": "gameplay", + "description": "Touching the left side of the screen shows the joystick under the finger; moving the finger to the right turns the car, while the gas pedal is held.", + "source": [ + "await harness.goToScene('Game Scene');", + "harness.watch('PlayerCar');", + "const getCar = () => harness.getObjects('PlayerCar')[0];", + "const center = name => { const o = harness.getObjects(name)[0]; return [o.x + o.width / 2, o.y + o.height / 2]; };", + "await harness.stepFrames(10);", + "const start = getCar();", + "const [gx, gy] = center('GasPedal'); harness.touchStart(1, gx, gy, 'MobileControls');", + "await harness.stepFrames(3);", + "harness.touchStart(2, 300, 520, 'MobileControls'); await harness.stepFrames(2);", + "const joystick = harness.getObjects('Steer_Joystick')[0];", + "harness.assert(!joystick.hidden && Math.abs(joystick.x - 300) < 5, 'The joystick appears under the finger: ' + joystick.x + ';' + joystick.y);", + "harness.touchMove(2, 400, 520, 'MobileControls'); await harness.stepFrames(45);", + "await harness.takeScreenshot('joystick', { width: 1280, format: 'png' });", + "const angle = Math.abs(((getCar().angle - start.angle) % 360 + 540) % 360 - 180);harness.assert(angle > 8, 'The car turns: ' + angle.toFixed(1) + ' degrees.');", + "harness.touchEnd(2); harness.touchEnd(1); await harness.stepFrames(2);", + "harness.assert(harness.getObjects('Steer_Joystick')[0].hidden, 'The joystick hides when the finger is lifted.');" + ] + }, + { + "name": "The steering wheel steers", + "type": "gameplay", + "description": "With the other controls (C key or the text at the top right), the steering wheel turned by the finger turns the car.", + "source": [ + "await harness.goToScene('Game Scene');", + "harness.watch('PlayerCar');", + "const getCar = () => harness.getObjects('PlayerCar')[0];", + "const center = name => { const o = harness.getObjects(name)[0]; return [o.x + o.width / 2, o.y + o.height / 2]; };", + "await harness.stepFrames(10);", + "const start = getCar();", + "harness.setKeyPressed('c', true); await harness.stepFrames(1); harness.setKeyPressed('c', false); await harness.stepFrames(1);", + "harness.assert(!harness.getObjects('SteeringWheel')[0].hidden, 'The steering wheel is shown.');", + "harness.assert(harness.getObjects('ControlsText')[0].text.startsWith('Wheel'), 'The text says which controls are used.');", + "const [gx, gy] = center('GasPedal'); harness.touchStart(1, gx, gy, 'MobileControls');", + "const wheel = harness.getObjects('SteeringWheel')[0]; const [wx, wy] = center('SteeringWheel');", + "harness.touchStart(2, wx + wheel.width * 0.35, wy, 'MobileControls'); await harness.stepFrames(2);", + "harness.touchMove(2, wx, wy + wheel.width * 0.35, 'MobileControls'); await harness.stepFrames(45);", + "await harness.takeScreenshot('wheel', { width: 1280, format: 'png' });", + "const angle = Math.abs(((getCar().angle - start.angle) % 360 + 540) % 360 - 180);harness.assert(angle > 8, 'The car turns: ' + angle.toFixed(1) + ' degrees.');", + "harness.touchEnd(2); harness.touchEnd(1); await harness.stepFrames(2);" + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "Camera", + "dimension": "", + "extensionNamespace": "", + "fullName": "Third person camera", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", + "name": "ThirdPersonCamera", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Virtual Reality/94e95d2c318e1f3dc7151a351024e13c574e1e44669c6696aa107d60230073f6_Virtual Reality_3d_vision_eye_vr.svg", + "shortDescription": "Move the camera to look at an object from a given distance.", + "version": "1.7.1", + "description": [ + "Move the camera to look at an object from a given distance with a rotation and an elevation angles.", + "", + "It can be useful for:", + "- 3D platformer games ([open the project online](https://editor.gdevelop.io/?project=example://3d-platformer))", + "- 3D racing games ([open the project online](https://editor.gdevelop.io/?project=example://3d-car-coin-hunt))", + "- Orbit camera controls ([open the project online](https://editor.gdevelop.io/?project=example://3d-tile-based-city-builder))", + "- Isometric-like point of view ([open the project online](https://editor.gdevelop.io/?project=example://3d-road-crosser))" + ], + "origin": { + "identifier": "ThirdPersonCamera", + "name": "gdevelop-extension-store" + }, + "tags": [ + "3d", + "camera" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Move the camera to look at a position from a distance.", + "fullName": "Look at a position from a distance (deprecated)", + "functionType": "Action", + "name": "LookFromDistanceAtPosition", + "private": true, + "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_; _PARAM2_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "=", + "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "=", + "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", + "=", + "Distance * sin(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::TurnCameraTowardPosition" + }, + "parameters": [ + "", + "PositionX", + "PositionY", + "0", + "Layer", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Position on X axis", + "name": "PositionX", + "type": "expression" + }, + { + "description": "Position on Y axis", + "name": "PositionY", + "type": "expression" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at an object from a distance.", + "fullName": "Look at an object from a distance (deprecated)", + "functionType": "Action", + "name": "LookFromDistanceAtObject", + "private": true, + "sentence": "Move the camera of _PARAM5_ to look at _PARAM1_ from _PARAM2_ pixels with a rotation of _PARAM3_° and an elevation of _PARAM4_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition" + }, + "parameters": [ + "", + "Object.CenterX()", + "Object.CenterY()", + "Distance", + "RotationAngle", + "ElevationAngle", + "Layer", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at a position from a distance.", + "fullName": "Look at a position from a distance", + "functionType": "Action", + "name": "LookFromDistanceAtPosition3D", + "sentence": "Move the camera of _PARAM7_ to look at _PARAM1_; _PARAM2_; _PARAM3_ from _PARAM4_ pixels with a rotation of _PARAM5_° and an elevation of _PARAM6_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "=", + "PositionX + Distance * cos(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "=", + "PositionY + Distance * sin(ToRad(RotationAngle + 90)) * cos(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", + "=", + "PositionZ + Distance * sin(ToRad(ElevationAngle))", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationX" + }, + "parameters": [ + "", + "=", + "90 - ElevationAngle", + "Layer", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationY" + }, + "parameters": [ + "", + "=", + "0", + "Layer", + "" + ] + }, + { + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "=", + "RotationAngle", + "Layer", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Position on X axis", + "name": "PositionX", + "type": "expression" + }, + { + "description": "Position on Y axis", + "name": "PositionY", + "type": "expression" + }, + { + "description": "Position on Z axis", + "name": "PositionZ", + "type": "expression" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look at an object from a distance.", + "fullName": "Look at an object from a distance", + "functionType": "Action", + "group": "Layers and cameras", + "name": "LookFromDistanceAtObject3D", + "sentence": "Move the camera of _PARAM6_ to look at _PARAM1_ from _PARAM3_ pixels with a rotation of _PARAM4_° and an elevation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX()", + "Object.CenterY()", + "Object.Object3D::CenterZ()", + "Distance", + "RotationAngle", + "ElevationAngle", + "Layer", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Rotation angle (around Z axis)", + "name": "RotationAngle", + "type": "expression" + }, + { + "description": "Elevation angle (around Y axis)", + "name": "ElevationAngle", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "RotatedX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Cos", + "=", + "cos(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Sin", + "=", + "sin(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Cos * X - Sin * Y" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "Cos", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Sin", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Rotation angle", + "name": "RotationAngle", + "supplementaryInformation": "Tank::Tank", + "type": "expression" + }, + { + "description": "", + "name": "X", + "type": "expression" + }, + { + "description": "", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "RotatedY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Cos", + "=", + "cos(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Sin", + "=", + "sin(ToRad(RotationAngle))" + ] + }, + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Sin * X + Cos * Y" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "Cos", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Sin", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Rotation angle", + "name": "RotationAngle", + "supplementaryInformation": "Tank::Tank", + "type": "expression" + }, + { + "description": "", + "name": "X", + "type": "expression" + }, + { + "description": "", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "LookFromDistanceAtPosition" + }, + { + "functionName": "LookFromDistanceAtObject" + }, + { + "functionName": "LookFromDistanceAtPosition3D" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromDistanceAtObject3D" + } + ] + }, + { + "functionName": "RotatedX" + }, + { + "functionName": "RotatedY" + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Smoothly follow an object at a distance.", + "fullName": "Third person camera", + "helpPath": "", + "iconUrl": "", + "name": "ThirdPersonCamera", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update private properties through setters to check their values and initialize state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetRotationHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "RotationHalfwayDuration", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetElevationHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "ElevationHalfwayDuration", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::SetTranslationZHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "TranslationZHalfwayDuration", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasJustBeenCreated", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustBeenCreated", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraZ", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::JumpToTargetedRotation" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsCalledManually", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object. This action must be called after the object has moved for the frame.", + "fullName": "Move the camera closer", + "functionType": "Action", + "name": "MoveCameraCloser", + "sentence": "Move the camera closer to _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCalledManually", + "False", + "" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::ThirdPersonCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object.", + "fullName": "Do move the camera closer", + "functionType": "Action", + "name": "DoMoveCameraCloser", + "private": true, + "sentence": "Do move the camera closer _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * (1 - speed)\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * (1 - speed)\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * (1 - speed)^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln((1 - speed)))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough." + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Z translation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraZ", + "<", + "Object.Behavior::FreeAreaZMin()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraZ", + "=", + "Object.Behavior::FreeAreaZMin() + (CameraZ - Object.Behavior::FreeAreaZMin()) * exp(TimeDelta() * TranslationZLogSpeed)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraZ", + ">", + "Object.Behavior::FreeAreaZMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraZ", + "=", + "Object.Behavior::FreeAreaZMax() + (CameraZ - Object.Behavior::FreeAreaZMax()) * exp(TimeDelta() * TranslationZLogSpeed)" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Z rotation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsElevatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedElevationAngle", + "=", + "Object.Object3D::RotationY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraRotationAngle", + "=", + "TargetedRotationAngle + 90 + RotationAngleOffset + AngleDifference(CameraAngle(Object.Layer()), TargetedRotationAngle + 90 + RotationAngleOffset) * exp(TimeDelta() * RotationLogSpeed)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraElevationAngle", + "=", + "TargetedElevationAngle + ElevationAngleOffset + AngleDifference(90 - Scene3D::CameraRotationX(Object.Layer()), TargetedElevationAngle + ElevationAngleOffset) * exp(TimeDelta() * ElevationLogSpeed)" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraRotationAngle, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraRotationAngle, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "CameraRotationAngle", + "CameraElevationAngle", + "", + "" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "CameraRotationAngle", + "type": "number", + "value": 0 + }, + { + "name": "CameraElevationAngle", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the camera all the way to the targeted angle.", + "fullName": "Rotate the camera all the way", + "functionType": "Action", + "name": "JumpToTargetedRotation", + "sentence": "Rotate the camera all the way to the targeted angle of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsElevatingWithObject", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedElevationAngle", + "=", + "Object.Object3D::RotationY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraAngle", + "=", + "TargetedRotationAngle + 90 + RotationAngleOffset" + ] + }, + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraAngle, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraAngle, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "CameraAngle", + "Object.Object3D::RotationY() + ElevationAngleOffset", + "", + "" + ] + } + ], + "variables": [ + { + "folded": true, + "name": "CameraAngle", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the camera rotation.", + "fullName": "Camera rotation", + "functionType": "ExpressionAndCondition", + "name": "RotationAngle", + "private": true, + "sentence": "the camera rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CameraAngle(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the camera all the way to the targeted angle.", + "fullName": "Rotate the camera all the way", + "functionType": "ActionWithOperator", + "getterName": "RotationAngle", + "name": "SetCameraRotation", + "sentence": "Rotate the camera all the way to the targeted angle of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" + }, + "parameters": [ + "", + "Object.CenterX() + ThirdPersonCamera::RotatedX(Value, OffsetX, -OffsetY)", + "Object.CenterY() + ThirdPersonCamera::RotatedY(Value, OffsetX, -OffsetY)", + "CameraZ + OffsetZ", + "Distance", + "Value", + "Object.Object3D::RotationY() + ElevationAngleOffset", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time for rotation of the object.", + "fullName": "Halfway time for rotation", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "RotationHalfwayDuration", + "sentence": "the halfway time for rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "RotationHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RotationHalfwayDuration", + "group": "Third person camera configuration", + "name": "SetRotationHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "RotationHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "RotationLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time for elevation rotation of the object.", + "fullName": "Halfway time for elevation rotation", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "ElevationHalfwayDuration", + "sentence": "the halfway time for elevation rotation", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ElevationHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ElevationHalfwayDuration", + "group": "Third person camera configuration", + "name": "SetElevationHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time on Z axis of the object.", + "fullName": "Halfway time on Z axis", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "TranslationZHalfwayDuration", + "sentence": "the halfway time on Z axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TranslationZHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TranslationZHalfwayDuration", + "group": "Third person camera configuration", + "name": "SetTranslationZHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TranslationZHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TranslationZLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area bottom border Z.", + "fullName": "Free area Z min", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaZMin", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Object3D::CenterZ() + OffsetZ - FollowFreeAreaZMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area top border Z.", + "fullName": "Free area Z max", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaZMax", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Object3D::CenterZ() + OffsetZ + FollowFreeAreaZMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the follow free area top border on Z axis of the object.", + "fullName": "Follow free area top border on Z axis", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "FollowFreeAreaZMax", + "sentence": "the follow free area top border on Z axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FollowFreeAreaZMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FollowFreeAreaZMax", + "group": "Third person camera configuration", + "name": "SetFollowFreeAreaZMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FollowFreeAreaZMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the follow free area bottom border on Z axis of the object.", + "fullName": "Follow free area bottom border on Z axis", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "FollowFreeAreaZMin", + "sentence": "the follow free area bottom border on Z axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FollowFreeAreaZMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FollowFreeAreaZMin", + "group": "Third person camera configuration", + "name": "SetFollowFreeAreaZMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FollowFreeAreaZMin", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the camera distance of the object.", + "fullName": "Camera distance", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "Distance", + "sentence": "the camera distance", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Distance" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Distance", + "group": "Third person camera configuration", + "name": "SetDistance", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Distance", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the lateral distance offset of the object.", + "fullName": "Lateral distance offset", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "OffsetX", + "sentence": "the lateral distance offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "OffsetX" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetX", + "group": "Third person camera configuration", + "name": "SetOffsetX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OffsetX", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the ahead distance offset of the object.", + "fullName": "Ahead distance offset", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "OffsetY", + "sentence": "the ahead distance offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "OffsetY" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetY", + "group": "Third person camera configuration", + "name": "SetOffsetY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OffsetY", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the z offset of the object.", + "fullName": "Z offset", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "OffsetZ", + "sentence": "the z offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "OffsetZ" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetZ", + "group": "Third person camera configuration", + "name": "SetOffsetZ", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OffsetZ", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the rotation angle offset of the object.", + "fullName": "Rotation angle offset", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "RotationAngleOffset", + "sentence": "the rotation angle offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "RotationAngleOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RotationAngleOffset", + "group": "Third person camera configuration", + "name": "SetRotationAngleOffset", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "RotationAngleOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the elevation angle offset of the object.", + "fullName": "Elevation angle offset", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "ElevationAngleOffset", + "sentence": "the elevation angle offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ElevationAngleOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ElevationAngleOffset", + "group": "Third person camera configuration", + "name": "SetElevationAngleOffset", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ElevationAngleOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the targeted camera rotation angle of the object. When this angle is set, the camera follow this value instead of the object angle.", + "fullName": "Targeted rotation angle", + "functionType": "ExpressionAndCondition", + "group": "Third person camera configuration", + "name": "TargetedRotationAngle", + "sentence": "the targeted camera rotation angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TargetedRotationAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TargetedRotationAngle", + "group": "Third person camera configuration", + "name": "SetTargetedRotationAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedRotationAngle", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsRotatingWithObject", + "False", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "JumpToTargetedRotation" + }, + { + "functionName": "RotationAngle" + }, + { + "functionName": "SetCameraRotation" + }, + { + "folderName": "Third person camera configuration", + "children": [ + { + "functionName": "RotationHalfwayDuration" + }, + { + "functionName": "SetRotationHalfwayDuration" + }, + { + "functionName": "ElevationHalfwayDuration" + }, + { + "functionName": "SetElevationHalfwayDuration" + }, + { + "functionName": "TranslationZHalfwayDuration" + }, + { + "functionName": "SetTranslationZHalfwayDuration" + }, + { + "functionName": "FollowFreeAreaZMax" + }, + { + "functionName": "SetFollowFreeAreaZMax" + }, + { + "functionName": "FollowFreeAreaZMin" + }, + { + "functionName": "SetFollowFreeAreaZMin" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SetDistance" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + }, + { + "functionName": "RotationAngleOffset" + }, + { + "functionName": "SetRotationAngleOffset" + }, + { + "functionName": "ElevationAngleOffset" + }, + { + "functionName": "SetElevationAngleOffset" + }, + { + "functionName": "TargetedRotationAngle" + }, + { + "functionName": "SetTargetedRotationAngle" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaZMin" + }, + { + "functionName": "FreeAreaZMax" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Halfway time for rotation", + "group": "Catch-up speed", + "name": "RotationHalfwayDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Halfway time for elevation rotation", + "group": "Catch-up speed", + "name": "ElevationHalfwayDuration" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Halfway time on Z axis", + "group": "Catch-up speed", + "name": "TranslationZHalfwayDuration" + }, + { + "value": "500", + "type": "Number", + "unit": "Pixel", + "label": "Camera distance", + "group": "Position", + "name": "Distance" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Lateral distance offset", + "group": "Position", + "name": "OffsetX" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Ahead distance offset", + "group": "Position", + "name": "OffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Z offset", + "group": "Position", + "name": "OffsetZ" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Rotation angle offset", + "group": "Position", + "name": "RotationAngleOffset" + }, + { + "value": "20", + "type": "Number", + "unit": "DegreeAngle", + "label": "Elevation angle offset", + "group": "Position", + "name": "ElevationAngleOffset" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area top border on Z axis", + "group": "Position", + "advanced": true, + "name": "FollowFreeAreaZMax" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area bottom border on Z axis", + "group": "Position", + "advanced": true, + "name": "FollowFreeAreaZMin" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "RotationLogSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "ElevationLogSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TranslationZLogSpeed" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsCalledManually" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "CameraZ" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasJustBeenCreated" + }, + { + "value": "true", + "type": "Boolean", + "label": "Automatically rotate the camera with the object", + "name": "IsRotatingWithObject" + }, + { + "value": "false", + "type": "Boolean", + "label": "Automatically rotate the camera with the object (elevation)", + "name": "IsElevatingWithObject" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Targeted camera rotation angle", + "description": "When this angle is set, the camera follow this value instead of the object angle.", + "hidden": true, + "name": "TargetedRotationAngle" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Targeted camera rotation angle", + "description": "When this angle is set, the camera follow this value instead of the object angle.", + "hidden": true, + "name": "TargetedElevationAngle" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "RotationHalfwayDuration" + }, + { + "propertyName": "ElevationHalfwayDuration" + }, + { + "propertyName": "TranslationZHalfwayDuration" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "Distance" + }, + { + "propertyName": "OffsetX" + }, + { + "propertyName": "OffsetY" + }, + { + "propertyName": "OffsetZ" + }, + { + "propertyName": "RotationAngleOffset" + }, + { + "propertyName": "ElevationAngleOffset" + }, + { + "propertyName": "FollowFreeAreaZMax" + }, + { + "propertyName": "FollowFreeAreaZMin" + } + ] + }, + { + "propertyName": "RotationLogSpeed" + }, + { + "propertyName": "ElevationLogSpeed" + }, + { + "propertyName": "TranslationZLogSpeed" + }, + { + "propertyName": "IsCalledManually" + }, + { + "propertyName": "CameraZ" + }, + { + "propertyName": "HasJustBeenCreated" + }, + { + "propertyName": "IsRotatingWithObject" + }, + { + "propertyName": "IsElevatingWithObject" + }, + { + "propertyName": "TargetedRotationAngle" + }, + { + "propertyName": "TargetedElevationAngle" + } + ] + } + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Input", + "dimension": "", + "extensionNamespace": "", + "fullName": "Multitouch joystick and buttons (sprite)", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/multitouch-joystick", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", + "name": "SpriteMultitouchJoystick", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "shortDescription": "Joysticks or buttons for touchscreens.", + "version": "1.9.0", + "description": [ + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", + "- 4 or 8 directions", + "- Analogus pads", + "- Player selection", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." + ], + "origin": { + "identifier": "SpriteMultitouchJoystick", + "name": "gdevelop-extension-store" + }, + "tags": [ + "multitouch", + "joystick", + "thumbstick", + "controller", + "touchscreen", + "twin stick", + "shooter", + "virtual", + "platformer", + "platform", + "top-down" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", + "v0YRpdAnIucZFgiRCCecqVnGKno2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "name": "Controllers", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "name": "Buttons", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "name": "State", + "type": "string", + "value": "Idle" + } + ] + } + ] + }, + { + "name": "Joystick", + "type": "structure", + "children": [] + } + ] + } + ] + } + ], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Accelerated speed", + "functionType": "Expression", + "name": "AcceleratedSpeed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "CurrentSpeed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + "<", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reduce the speed to match the stick force." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "TargetedSpeed" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(TargetedSpeed, CurrentSpeed + Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "TargetedSpeed" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "-", + "Acceleration * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn back at least as fast as it would stop." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(TargetedSpeed, CurrentSpeed - max(Acceleration , Deceleration) * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reduce the speed to match the stick force." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "TargetedSpeed" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(TargetedSpeed, CurrentSpeed - Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "TargetedSpeed" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "+", + "Acceleration * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn back at least as fast as it would stop." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(TargetedSpeed, CurrentSpeed + max(Acceleration , Deceleration) * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(0, CurrentSpeed + Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(0, CurrentSpeed - Acceleration * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "clamp(AcceleratedSpeed, -SpeedMax, SpeedMax)" + ] + } + ] + } + ], + "variables": [ + { + "name": "AcceleratedSpeed", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Current speed", + "name": "CurrentSpeed", + "type": "expression" + }, + { + "description": "Targeted speed", + "name": "TargetedSpeed", + "type": "expression" + }, + { + "description": "Max speed", + "name": "SpeedMax", + "type": "expression" + }, + { + "description": "Acceleration", + "name": "Acceleration", + "type": "expression" + }, + { + "description": "Deceleration", + "name": "Deceleration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is released on a multitouch controller.", + "fullName": "Multitouch controller button released", + "functionType": "Condition", + "name": "IsButtonReleased", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Released\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change a button state for a multitouch controller.", + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "ButtonState" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "type": "string" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "Action", + "name": "SetDeadZone", + "private": true, + "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone", + "=", + "DeadZoneRadius" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Dead zone radius", + "name": "DeadZoneRadius", + "supplementaryInformation": "[]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "Expression", + "name": "DeadZone", + "private": true, + "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", + "fullName": "Angle to 4-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo4Way", + "private": true, + "sentence": "The angle _PARAM1_ 4-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(Angle * 4 / 360), 4)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", + "fullName": "Angle to 8-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo8Way", + "private": true, + "sentence": "The angle _PARAM1_ 8-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(Angle * 8 / 360), 8)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 4-way direction", + "functionType": "Condition", + "name": "IsAngleIn4WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "0", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "1", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "2", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "3", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 8-way direction", + "functionType": "Condition", + "name": "IsAngleIn8WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "0", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"DownRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "1", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "2", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"DownLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "3", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "4", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"UpLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "5", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "6", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"UpRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "7", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force (deprecated)", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "private": true, + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "", + "name": "Coucou", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the force of multitouch contoller stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier)) / (1 - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Stick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "Action", + "name": "SetJoystickForce", + "private": true, + "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle (deprecated)", + "functionType": "Expression", + "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "XFromAngleAndDistance(SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier), SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "YFromAngleAndDistance(SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier), SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a new touch has started on the right or left side of the screen.", + "fullName": "New touch on a screen side", + "functionType": "Condition", + "group": "Multitouch Joystick", + "name": "HasTouchStartedOnScreenSide", + "sentence": "A new touch has started on the _PARAM2_ side of the screen on _PARAM1_'s layer", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Side", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "TouchX" + }, + "parameters": [ + "", + "StartedTouchOrMouseId(0)", + "<", + "CameraCenterX(Object.Layer())", + "Object.Layer()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Side", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "TouchX" + }, + "parameters": [ + "", + "StartedTouchOrMouseId(0)", + ">=", + "CameraCenterX(Object.Layer())", + "Object.Layer()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch joystick", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "objectList" + }, + { + "description": "Screen side", + "name": "Side", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Joystick that can be controlled by interacting with a touchscreen.", + "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", + "name": "MultitouchJoystick", + "objectType": "", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "DeadZoneRadius", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasGameJustResumed" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, JoystickForce - DeadZoneRadius) / (1 - DeadZoneRadius)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickForce", + "name": "SetJoystickForce", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "JoystickForce", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "JoystickForce", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "", + "name": "Parameter", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "JoystickAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "JoystickAngle", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "JoystickAngle", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Angle", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "JoystickAngle", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "JoystickAngle", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a joystick is pressed.", + "fullName": "Joystick pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Joystick _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the joystick values (except for angle, which stays the same)", + "fullName": "Reset", + "functionType": "Action", + "name": "Reset", + "private": true, + "sentence": "Reset the joystick of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the multitouch controller identifier.", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "ControllerIdentifier", + "sentence": "the multitouch controller identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ControllerIdentifier" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ControllerIdentifier", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick name.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "JoystickIdentifier" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "JoystickIdentifier", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the dead zone radius (range: 0 to 1) of the joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "DeadZoneRadius" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DeadZoneRadius", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "Value", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Force the joystick into the pressing state.", + "fullName": "Force start pressing", + "functionType": "Action", + "name": "ForceStartPressing", + "sentence": "Force start pressing _PARAM0_ with touch identifier: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Touch identifier", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "String", + "label": "Joystick name", + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick angle (range: -180 to 180)", + "hidden": true, + "name": "JoystickAngle" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick force (range: 0 to 1)", + "hidden": true, + "name": "JoystickForce" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchIndex" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } + }, + { + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", + "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", + "name": "MultitouchButton", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Idle\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer())", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer())" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Radius", + ">", + "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Released\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", + "functionType": "Condition", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is pressed.", + "fullName": "Button pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Button _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetButtonState" + }, + "parameters": [ + "", + "ControllerIdentifier", + "ButtonIdentifier", + "ButtonState", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Button identifier", + "name": "ButtonIdentifier" + }, + { + "value": "0", + "type": "Number", + "label": "TouchID", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchIndex" + }, + { + "value": "", + "type": "Boolean", + "label": "Button released", + "hidden": true, + "name": "IsReleased" + }, + { + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Triggering circle radius", + "description": "This circle adds up to the object collision mask.", + "name": "Radius" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } + }, + { + "description": "Control a platformer character with a multitouch controller.", + "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PlatformerMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Property" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platform character behavior", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "choices": [], + "name": "Property" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "Platformer3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } + }, + { + "description": "Control camera rotations with a multitouch controller.", + "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "FirstPersonMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO It's probably a bad idea to rotate the object around Y." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedZ", + "=", + "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedZ, SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "CurrentRotationSpeedZ * TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedY", + "=", + "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedY, SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "+", + "CurrentRotationSpeedY * TimeDelta()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "=", + "clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::LookFromObjectEyes" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", + "fullName": "Look through object eyes", + "functionType": "Action", + "group": "Layers and cameras", + "name": "LookFromObjectEyes", + "private": true, + "sentence": "Move the camera to look though _PARAM0_ eyes", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CenterCameraOnObject" + }, + "parameters": [ + "", + "Object", + "", + "Object.Layer()", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", + "=", + "Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ", + "", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationX" + }, + "parameters": [ + "", + "=", + "- Object.Object3D::RotationY() + 90", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationY" + }, + "parameters": [ + "", + "=", + "Object.Object3D::RotationX()", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "=", + "Object.Angle() + 90", + "Object.Layer()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum horizontal rotation speed of the object.", + "fullName": "Maximum horizontal rotation speed", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationSpeedMax", + "sentence": "the maximum horizontal rotation speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "HorizontalRotationSpeedMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "SetHorizontalRotationSpeedMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "HorizontalRotationSpeedMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the horizontal rotation acceleration of the object.", + "fullName": "Horizontal rotation acceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationAcceleration", + "sentence": "the horizontal rotation acceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "HorizontalRotationAcceleration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "SetHorizontalRotationAcceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "HorizontalRotationAcceleration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the horizontal rotation deceleration of the object.", + "fullName": "Horizontal rotation deceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationDeceleration", + "sentence": "the horizontal rotation deceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "HorizontalRotationDeceleration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "SetHorizontalRotationDeceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "HorizontalRotationDeceleration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum vertical rotation speed of the object.", + "fullName": "Maximum vertical rotation speed", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationSpeedMax", + "sentence": "the maximum vertical rotation speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VerticalRotationSpeedMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "SetVerticalRotationSpeedMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "VerticalRotationSpeedMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the vertical rotation acceleration of the object.", + "fullName": "Vertical rotation acceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationAcceleration", + "sentence": "the vertical rotation acceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VerticalRotationAcceleration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "SetVerticalRotationAcceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "VerticalRotationAcceleration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the vertical rotation deceleration of the object.", + "fullName": "Vertical rotation deceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationDeceleration", + "sentence": "the vertical rotation deceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VerticalRotationDeceleration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "SetVerticalRotationDeceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "VerticalRotationDeceleration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum vertical camera angle of the object.", + "fullName": "Minimum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalAngleMin", + "sentence": "the minimum vertical camera angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VerticalAngleMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "SetVerticalAngleMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "VerticalAngleMin", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum vertical camera angle of the object.", + "fullName": "Maximum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalAngleMax", + "sentence": "the maximum vertical camera angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VerticalAngleMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "SetVerticalAngleMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "VerticalAngleMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the z position offset of the object.", + "fullName": "Z position offset", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper position configuration", + "name": "OffsetZ", + "sentence": "the z position offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "OffsetZ" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", + "name": "SetOffsetZ", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OffsetZ", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "CameraStick" + }, + { + "value": "180", + "type": "Number", + "unit": "AngularSpeed", + "label": "Maximum rotation speed", + "group": "Horizontal rotation", + "name": "HorizontalRotationSpeedMax" + }, + { + "value": "360", + "type": "Number", + "label": "Rotation acceleration", + "group": "Horizontal rotation", + "name": "HorizontalRotationAcceleration" + }, + { + "value": "720", + "type": "Number", + "label": "Rotation deceleration", + "group": "Horizontal rotation", + "name": "HorizontalRotationDeceleration" + }, + { + "value": "120", + "type": "Number", + "unit": "AngularSpeed", + "label": "Maximum rotation speed", + "group": "Vertical rotation", + "name": "VerticalRotationSpeedMax" + }, + { + "value": "240", + "type": "Number", + "label": "Rotation acceleration", + "group": "Vertical rotation", + "name": "VerticalRotationAcceleration" + }, + { + "value": "480", + "type": "Number", + "label": "Rotation deceleration", + "group": "Vertical rotation", + "name": "VerticalRotationDeceleration" + }, + { + "value": "-90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Minimum angle", + "group": "Vertical rotation", + "name": "VerticalAngleMin" + }, + { + "value": "90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Maximum angle", + "group": "Vertical rotation", + "name": "VerticalAngleMax" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Z position offset", + "group": "Position", + "name": "OffsetZ" + }, + { + "value": "0", + "type": "Number", + "unit": "AngularSpeed", + "label": "Current rotation speed Z", + "hidden": true, + "name": "CurrentRotationSpeedZ" + }, + { + "value": "0", + "type": "Number", + "unit": "AngularSpeed", + "label": "Current rotation speed Y", + "hidden": true, + "name": "CurrentRotationSpeedY" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SteerJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SpeedJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "HandBrakeButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Steer joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SpeedJoystickIdentifier" + }, + { + "value": "B", + "type": "String", + "label": "Hand brake button name", + "group": "Controls", + "name": "HandBrakeButton" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } + }, + { + "description": "Control a top-down character with a multitouch controller.", + "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "TopDownMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "StickMode", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "StickMode", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "sign(SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "StickMode", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"UpLeft\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"UpRight\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"DownLeft\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"DownRight\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::TopDownMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Top-down movement behavior", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "choices": [], + "name": "TopDownMovement" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "Analog", + "type": "Choice", + "label": "Stick mode", + "group": "Controls", + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } + ], + "name": "StickMode" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Joystick", + "description": "Joystick for touchscreens.", + "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", + "isUsingLegacyInstancesRenderer": true, + "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Border", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "Border", + "=", + "1" + ] + }, + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "Thumb", + "=", + "2" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Border", + "=", + "0", + "=", + "0" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Thumb", + "=", + "0", + "=", + "0" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PutAroundObject" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Pass the object property values to the behavior.", + "fullName": "Update configuration", + "functionType": "Action", + "name": "UpdateConfiguration", + "private": true, + "sentence": "Update the configuration of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "ControllerIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "DeadZoneRadius", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Show the joystick until it is released.", + "fullName": "Show and start pressing", + "functionType": "Action", + "name": "TeleportAndPress", + "sentence": "Show _PARAM0_ at the cursor position and start pressing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetXY" + }, + "parameters": [ + "Object", + "=", + "Object.ParentTouchX(StartedTouchOrMouseId(0))", + "=", + "Object.ParentTouchY(StartedTouchOrMouseId(0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "yes", + "" + ] + }, + { + "type": { + "value": "Show" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::ForceStartPressing" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "StartedTouchOrMouseId(0)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the X position of a specified touch", + "fullName": "Touch X position (on parent)", + "functionType": "Expression", + "name": "ParentTouchX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const touchId = eventsFunctionContext.getArgument(\"TouchId\");", + "eventsFunctionContext.returnValue = gdjs.evtTools.input.getTouchX(object.getInstanceContainer(), touchId, object.getLayer());" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Touch identifier", + "name": "TouchId", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the X position of a specified touch", + "fullName": "Touch X position (on parent)", + "functionType": "Expression", + "name": "ParentTouchY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const touchId = eventsFunctionContext.getArgument(\"TouchId\");", + "eventsFunctionContext.returnValue = gdjs.evtTools.input.getTouchY(object.getInstanceContainer(), touchId, object.getLayer());" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Touch identifier", + "name": "TouchId", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate control of the joystick.", + "fullName": "De/activate control", + "functionType": "Action", + "name": "ActivateControl", + "sentence": "Activate control of _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a stick is pressed.", + "fullName": "Stick pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Stick _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsPressed" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "!=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force (deprecated)", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "private": true, + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the strick force (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "ExpressionAndCondition", + "name": "StickForceX", + "sentence": "the stick X force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "ExpressionAndCondition", + "name": "StickForceY", + "sentence": "the stick Y force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (from -180 to 180).", + "fullName": "Joystick angle (deprecated)", + "functionType": "Expression", + "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the stick is pointing towards (from -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the multitouch controller identifier (1, 2, 3, 4...).", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "ControllerIdentifier", + "sentence": "the multitouch controller identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyControllerIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Value", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick name of the object.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyJoystickIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Value", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the dead zone radius of the joystick (range: 0 to 1). The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyDeadZoneRadius()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Value", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "Thumb" + ], + "choices": [], + "hidden": true, + "name": "ThumbAnchorOrigin" + }, + { + "value": "Center-center", + "type": "Number", + "label": "", + "description": "Only used by the scene editor.", + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "Thumb" + ], + "choices": [], + "hidden": true, + "name": "ThumbIsScaledProportionally" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "hidden": true, + "name": "ParentOrigin" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "ShouldBeHiddenWhenReleased" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, + "variants": [] + } + ] + }, + { + "author": "", + "category": "Input", + "dimension": "", + "extensionNamespace": "", + "fullName": "3D car keyboard mapper", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggZD0iTTI5LDE0aC00LjJjMC4xLTAuMywwLjItMC42LDAuMi0xYzAtMS43LTEuMy0zLTMtM0g4Yy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDZjMS43LDAsMy0xLjMsMy0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LjNjMCwwLDAuMS0wLjEsMC4yLTAuMWMwLDAsMC4xLTAuMSwwLjItMC4xYzAuMSwwLDAuMSwwLDAuMi0wLjENCgljMC4zLTAuMSwwLjcsMCwwLjksMC4zYzAuMiwwLjIsMC4zLDAuNCwwLjMsMC43QzI3LDIyLjMsMjYuOSwyMi41LDI2LjcsMjIuN3oiLz4NCjwvc3ZnPg0K", + "name": "PhysicsCar3DKeyMapper", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Computers and Hardware/3e5871434a72821bf3ecb44a6857e62a438cf23dc8f95966f56ae97e95315468_Computers and Hardware_keyboard.svg", + "shortDescription": "3D car keyboard controls.", + "version": "1.0.1", + "description": "3D physics car keyboard controls.", + "origin": { + "identifier": "PhysicsCar3DKeyMapper", + "name": "gdevelop-extension-store" + }, + "tags": [ + "3d" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Control a 3D physics car with a keyboard.", + "fullName": "3D car keyboard mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DKeyboardMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Down" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateBackwardKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Up" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateForwardKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateRightKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "HandBrake" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsCar3DKeyMapper::PhysicsCar3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "Space", + "type": "KeyboardKey", + "label": "Hand brake key", + "name": "HandBrake" + }, + { + "value": "Up", + "type": "KeyboardKey", + "label": "Up key", + "name": "Up" + }, + { + "value": "Left", + "type": "KeyboardKey", + "label": "Left key", + "name": "Left" + }, + { + "value": "Down", + "type": "KeyboardKey", + "label": "Down key", + "name": "Down" + }, + { + "value": "Right", + "type": "KeyboardKey", + "label": "Right key", + "name": "Right" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "HandBrake" + }, + { + "propertyName": "Up" + }, + { + "propertyName": "Left" + }, + { + "propertyName": "Down" + }, + { + "propertyName": "Right" + } + ] + } + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "General", + "dimension": "3D", + "extensionNamespace": "", + "fullName": "3D terrain", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRlcnJhaW4iIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQsNkwxMC4yNSwxMUwxMy4xLDE0LjhMMTEuNSwxNkM5LjgxLDEzLjc1IDcsMTAgNywxMEwxLDE4SDIzTDE0LDZaIiAvPjwvc3ZnPg==", + "name": "Terrain3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/10e0a26c0d500830dfe23b94138beb0ef61607ba62bca05a5aa5c849777f1b06_terrain.svg", + "shortDescription": "A ground with hills and valleys that can be sculpted and painted in the editor, with collisions.", + "version": "0.3.2", + "description": [ + "A 3D terrain object for open worlds, adventure or racing games: hills, mountains, islands or valleys, with painted layers of grass, dirt, rock or sand.", + "", + "- **Sculpt and paint in the scene editor**: select a terrain to show the tools (raise, lower, smooth, flatten and paint 4 layers).", + "- **Start from a relief** (hills, mountains, island) or **from a heightmap image**.", + "- **Steep slopes automatically show rock** (or any layer).", + "- **Natural borders between layers**: stones and tufts of a texture cover the gaps of the other where layers meet (height blending), and the repetition of textures is made less visible (texture variation).", + "- **Physics**: add the **3D physics** behavior to the terrain. Characters and objects collide with the ground exactly. The terrain is always static.", + "- **Pathfinding**: add the **floor/obstacle for pathfinding (navmesh based)** behavior to the terrain, so that characters with the navmesh pathfinding behavior walk on its hills and around its cliffs (in recent GDevelop versions).", + "- **Shape it with the Edits property**: a list of raise, flatten, smooth and paint strokes written in JSON, shown in the scene editor. It's readable and can be changed by hand or by an AI agent, like the relief, the heightmap and the other properties. Actions only change the terrain during the game.", + "- **Change it during the game** with actions (raise, lower, flatten, smooth, paint, along a line for paths and rivers) and read the ground height, slope or layer with expressions.", + "- **Grass**: add a **terrain grass** object over the terrain. Thousands of blades sway in the wind, grow where a layer (like grass) is painted and where the ground is not too steep, and are pushed aside by characters. Sculpt or paint the terrain and the grass follows.", + "- **Forests, rocks and bushes**: add a **scattered models** object over the terrain. It places hundreds or thousands of copies of a 3D model (trees, rocks, bushes, flowers...) on the ground and draws them all at once, which is much faster than an object for each. Copies grow where a layer is painted, away from steep slopes, and follow the ground when it's sculpted. Add or erase them with the brushes of the scene editor or with the Edits property, give trees trunk collisions, and cut them down with actions. Ready-made forests, rocks and bushes are in the asset store.", + "- **Tunnels and caves**: make holes in the ground (and fill them again) with the brushes, the Edits property or actions, and put a 3D model of the tunnel or the cave (with a mesh collision shape) under the ground. Nothing is drawn in holes, and characters, cars and rays go through them.", + "- **Made for large worlds**: the terrain is split in chunks that are hidden when off-screen and simplified when far away, and collisions are updated only where the ground changes." + ], + "origin": { + "identifier": "Terrain3D", + "name": "gdevelop-extension-store" + }, + "tags": [ + "3d", + "terrain", + "ground", + "heightmap", + "landscape", + "open world", + "grass", + "foliage", + "forest", + "trees", + "tunnel", + "cave" + ], + "authorIds": [], + "changelog": [ + { + "version": "0.3.1", + "breaking": "- Scattered models now put the origin of their 3D model on the ground (\"Point put on the ground\" property), instead of the center of its base. Copies of models whose origin is elsewhere, like some trees of the asset store, can move a bit. Set \"Point put on the ground\" to \"Center of the model base\" to keep their previous placement." + } + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (gdjs.__terrain3DExtension) {", + " return;", + "}", + "", + "// Tested by the gameplay tests of the \"3D island terrain\" example (GDevelop-examples repository).", + "", + "const groundsByScene = new WeakMap();", + "/**", + " * The grounds of a scene (the terrains), followed by the terrain grass.", + " *", + " * A ground has: `getVersion()` (changing when the ground changes),", + " * `containsPoint(x, y)`, `getHeightAt(x, y)` (Z position of the ground),", + " * `getSlopeAt(x, y)` (in degrees), `getLayerWeightAt(x, y, layer)` (how", + " * much a painted layer, from 1 to 4, is there, from 0 to 1) and optionally", + " * `getTintAt(x, y)` (the painted tint, as red, green and blue from 0 to 255).", + " * @param {gdjs.RuntimeScene} runtimeScene", + " * @returns {Set}", + " */", + "const getGrounds = (runtimeScene) => {", + " let grounds = groundsByScene.get(runtimeScene);", + " if (!grounds) {", + " grounds = new Set();", + " groundsByScene.set(runtimeScene, grounds);", + " }", + " return grounds;", + "};", + "", + "/**", + " * @param {number} seed", + " * @returns {() => number} Random numbers between 0 (included) and 1 (excluded), the same for the same seed.", + " */", + "const createRandom = (seed) => {", + " let state = seed >>> 0 || 1;", + " return () => {", + " state ^= state << 13;", + " state ^= state >>> 17;", + " state ^= state << 5;", + " return (state >>> 0) / 4294967296;", + " };", + "};", + "", + "/**", + " * Find the highest ground at a position: grounds can overlap (like an island over a sea floor).", + " * @param {Iterable} grounds", + " * @param {{ground: object | null, z: number}} result Set to the ground (null if there is none) and its Z position.", + " */", + "const findHighestGround = (grounds, x, y, result) => {", + " result.ground = null;", + " for (const ground of grounds) {", + " if (!ground.containsPoint(x, y)) continue;", + " const z = ground.getHeightAt(x, y);", + " if (!result.ground || z > result.z) {", + " result.ground = ground;", + " result.z = z;", + " }", + " }", + " return result;", + "};", + "", + "// The grounds or the objects placed on them can change every frame (while", + "// sculpting or moving them in the editor): things are placed again at most this often.", + "const PLACEMENT_DELAY = 0.3;", + "", + "/**", + " * Tells when things placed on the grounds of a scene (grass blades, scattered", + " * models) must be placed again: after the grounds or the given properties", + " * changed, at most every `PLACEMENT_DELAY` seconds.", + " */", + "class GroundPlacement {", + " /** @param {gdjs.RuntimeScene} runtimeScene */", + " constructor(runtimeScene) {", + " this.grounds = getGrounds(runtimeScene);", + " this.placedFrom = '';", + " this.timeSincePlacement = 0;", + " }", + "", + " /**", + " * @param {number} elapsedSeconds", + " * @param {string} propertiesKey Changes when the things must be placed again.", + " */", + " shouldPlaceAgain(elapsedSeconds, propertiesKey) {", + " this.timeSincePlacement += elapsedSeconds;", + " if (this.placedFrom && this.timeSincePlacement < PLACEMENT_DELAY) return false;", + " let placementKey = propertiesKey;", + " for (const ground of this.grounds) placementKey += '|' + ground.getVersion();", + " if (placementKey === this.placedFrom) return false;", + " this.placedFrom = placementKey;", + " this.timeSincePlacement = 0;", + " return true;", + " }", + "", + " placeAgain() {", + " this.placedFrom = '';", + " }", + "}", + "", + "/**", + " * Replace parts of the shader code of a Three.js material, with an error if", + " * a part is missing (for example after an update of Three.js).", + " * @param {string} shaderCode", + " * @param {Array<[string, string]>} replacements The searched code and its replacement.", + " * @param {string} materialName", + " */", + "const patchShaderCode = (shaderCode, replacements, materialName) => {", + " for (const [searchedCode, newCode] of replacements) {", + " if (!shaderCode.includes(searchedCode)) {", + " console.error(`${materialName}: \"${searchedCode}\" was not found in the shader, which won't look as expected.`);", + " }", + " shaderCode = shaderCode.replace(searchedCode, newCode);", + " }", + " return shaderCode;", + "};", + "", + "// Size of the object inner area. Instances are scaled from it, so these only", + "// define the default size of a new terrain.", + "const AREA_SIZE = 4096;", + "const AREA_DEPTH = 600;", + "", + "// Terrains have at most 8 x 8 chunks (so at most 64 draw calls), of at least", + "// 32 x 32 cells.", + "const MIN_CHUNK_CELLS = 32;", + "const MAX_CHUNKS_PER_SIDE = 8;", + "/** @param {number} resolution */", + "const getChunkCells = (resolution) => Math.max(MIN_CHUNK_CELLS, resolution / MAX_CHUNKS_PER_SIDE);", + "// Grid steps of each level of detail, and the distance (in chunk sizes)", + "// from which each one is used.", + "const LOD_STEPS = [1, 2, 4];", + "const LOD_DISTANCES = [0, 3, 6];", + "", + "const LAYER_COUNT = 4;", + "const RESOLUTIONS = [64, 128, 256, 512, 1024];", + "const DEFAULT_RESOLUTION = 256;", + "// Each undo step is a copy of the data: fewer are kept for big terrains.", + "const UNDO_STEPS_SAMPLES = 20 * 257 * 257;", + "", + "const clamp01 = (value) => (value < 0 ? 0 : value > 1 ? 1 : value);", + "const clampInteger = (value, min, max) =>", + " value < min ? min : value > max ? max : Math.floor(value);", + "", + "/**", + " * A rectangle of grid samples, inclusive. Empty when `minI > maxI`.", + " */", + "class SampleRectangle {", + " constructor() {", + " this.clear();", + " }", + "", + " clear() {", + " this.minI = Number.MAX_SAFE_INTEGER;", + " this.minJ = Number.MAX_SAFE_INTEGER;", + " this.maxI = -1;", + " this.maxJ = -1;", + " }", + "", + " isEmpty() {", + " return this.minI > this.maxI;", + " }", + "", + " /** @param {SampleRectangle} other */", + " add(other) {", + " if (other.isEmpty()) return;", + " this.minI = Math.min(this.minI, other.minI);", + " this.minJ = Math.min(this.minJ, other.minJ);", + " this.maxI = Math.max(this.maxI, other.maxI);", + " this.maxJ = Math.max(this.maxJ, other.maxJ);", + " }", + "", + " set(minI, minJ, maxI, maxJ) {", + " this.minI = minI;", + " this.minJ = minJ;", + " this.maxI = maxI;", + " this.maxJ = maxJ;", + " return this;", + " }", + "}", + "", + "/**", + " * The heights (between 0 and 1) and the painted layers weights of a square", + " * grid of `size * size` samples.", + " */", + "class TerrainData {", + " /** @param {number} resolution The number of cells on each side. */", + " constructor(resolution) {", + " this.resolution = resolution;", + " this.size = resolution + 1;", + " this.heights = new Float32Array(this.size * this.size);", + " /** 4 weights (0-255) per sample, one for each layer. */", + " this.splat = new Uint8Array(this.size * this.size * LAYER_COUNT);", + " this.fillLayer(0);", + " /**", + " * 4 bytes per sample: a tint multiplying the layers (red, green and", + " * blue, white for none) and the wetness (0 for dry).", + " */", + " this.colors = new Uint8Array(this.size * this.size * 4);", + " this.clearColors();", + " }", + "", + " clearColors() {", + " this.colors.fill(255);", + " for (let index = 3; index < this.colors.length; index += 4) {", + " this.colors[index] = 0;", + " }", + " }", + "", + " /** @param {number} layer */", + " fillLayer(layer) {", + " this.splat.fill(0);", + " for (let index = layer; index < this.splat.length; index += LAYER_COUNT) {", + " this.splat[index] = 255;", + " }", + " }", + "", + " getHeight(i, j) {", + " const last = this.resolution;", + " const clampedI = i < 0 ? 0 : i > last ? last : i;", + " const clampedJ = j < 0 ? 0 : j > last ? last : j;", + " return this.heights[clampedJ * this.size + clampedI];", + " }", + "", + " /**", + " * @param {number} gridX", + " * @param {number} gridY", + " * @returns {number} The height interpolated on the triangles that are drawn.", + " */", + " sampleHeight(gridX, gridY) {", + " const x = Math.min(Math.max(gridX, 0), this.resolution);", + " const y = Math.min(Math.max(gridY, 0), this.resolution);", + " const i = Math.min(Math.floor(x), this.resolution - 1);", + " const j = Math.min(Math.floor(y), this.resolution - 1);", + " const fx = x - i;", + " const fy = y - j;", + " const topRight = this.getHeight(i + 1, j);", + " const bottomLeft = this.getHeight(i, j + 1);", + " if (fx + fy <= 1) {", + " const topLeft = this.getHeight(i, j);", + " return topLeft + fx * (topRight - topLeft) + fy * (bottomLeft - topLeft);", + " }", + " const bottomRight = this.getHeight(i + 1, j + 1);", + " return (", + " bottomRight +", + " (1 - fx) * (bottomLeft - bottomRight) +", + " (1 - fy) * (topRight - bottomRight)", + " );", + " }", + "", + " /** @returns {number} The weight (0-1) of a layer, interpolated between samples. */", + " sampleLayerWeight(gridX, gridY, layer) {", + " const x = Math.min(Math.max(gridX, 0), this.resolution);", + " const y = Math.min(Math.max(gridY, 0), this.resolution);", + " const i = Math.min(Math.floor(x), this.resolution - 1);", + " const j = Math.min(Math.floor(y), this.resolution - 1);", + " const fx = x - i;", + " const fy = y - j;", + " const weight = (i, j) => this.splat[(j * this.size + i) * LAYER_COUNT + layer];", + " const top = weight(i, j) + fx * (weight(i + 1, j) - weight(i, j));", + " const bottom = weight(i, j + 1) + fx * (weight(i + 1, j + 1) - weight(i, j + 1));", + " return (top + fy * (bottom - top)) / 255;", + " }", + "", + " /**", + " * @param {number} channel 0, 1 and 2 for the tint, 3 for the wetness.", + " * @returns {number} The channel (0-1), interpolated between samples.", + " */", + " sampleColor(gridX, gridY, channel) {", + " const x = Math.min(Math.max(gridX, 0), this.resolution);", + " const y = Math.min(Math.max(gridY, 0), this.resolution);", + " const i = Math.min(Math.floor(x), this.resolution - 1);", + " const j = Math.min(Math.floor(y), this.resolution - 1);", + " const fx = x - i;", + " const fy = y - j;", + " const value = (i, j) => this.colors[(j * this.size + i) * 4 + channel];", + " const top = value(i, j) + fx * (value(i + 1, j) - value(i, j));", + " const bottom = value(i, j + 1) + fx * (value(i + 1, j + 1) - value(i, j + 1));", + " return (top + fy * (bottom - top)) / 255;", + " }", + "", + " /**", + " * @param {number} index The index of a sample.", + " * @returns {boolean} true if no layer is painted on the sample: it's a hole.", + " */", + " isHole(index) {", + " const offset = index * LAYER_COUNT;", + " return (this.splat[offset] | this.splat[offset + 1] | this.splat[offset + 2] | this.splat[offset + 3]) === 0;", + " }", + "", + " /**", + " * @returns {number} The sum of the layer weights (0-1), interpolated between samples: there is a", + " * hole where it's under 0.5, like what is drawn.", + " */", + " sampleSolidity(gridX, gridY) {", + " let solidity = 0;", + " for (let layer = 0; layer < LAYER_COUNT; layer++) solidity += this.sampleLayerWeight(gridX, gridY, layer);", + " return solidity;", + " }", + "", + " /** @returns {number} The index (from 0) of the layer painted the most. */", + " getDominantLayer(gridX, gridY) {", + " const i = clampInteger(Math.round(gridX), 0, this.resolution);", + " const j = clampInteger(Math.round(gridY), 0, this.resolution);", + " const offset = (j * this.size + i) * LAYER_COUNT;", + " let dominantLayer = 0;", + " for (let layer = 1; layer < LAYER_COUNT; layer++) {", + " if (this.splat[offset + layer] > this.splat[offset + dominantLayer]) {", + " dominantLayer = layer;", + " }", + " }", + " return dominantLayer;", + " }", + "", + " /** @param {TerrainData} other */", + " copyFrom(other) {", + " this.heights.set(other.heights);", + " this.splat.set(other.splat);", + " this.colors.set(other.colors);", + " }", + "", + " /**", + " * @param {number} resolution", + " * @returns {TerrainData} A copy of this data with another resolution.", + " */", + " resampled(resolution) {", + " const data = new TerrainData(resolution);", + " const ratio = this.resolution / resolution;", + " for (let j = 0; j < data.size; j++) {", + " for (let i = 0; i < data.size; i++) {", + " const index = j * data.size + i;", + " data.heights[index] = this.sampleHeight(i * ratio, j * ratio);", + " const sourceOffset =", + " (Math.round(j * ratio) * this.size + Math.round(i * ratio)) * LAYER_COUNT;", + " for (let layer = 0; layer < LAYER_COUNT; layer++) {", + " data.splat[index * LAYER_COUNT + layer] = this.splat[sourceOffset + layer];", + " }", + " for (let channel = 0; channel < 4; channel++) {", + " data.colors[index * 4 + channel] = this.colors[sourceOffset + channel];", + " }", + " }", + " }", + " return data;", + " }", + "}", + "", + "/**", + " * Brushes change the samples around a segment, with an effect going smoothly", + " * from full on the segment to none at `radius`. A point is a segment of", + " * length 0. Positions are in scene units relative to the terrain origin.", + " */", + "const brushes = {", + " /**", + " * @param {TerrainData} data", + " * @param {{cellWidth: number, cellHeight: number, ax: number, ay: number, bx: number, by: number, radius: number}} stroke", + " * @param {(sampleIndex: number, weight: number, t: number) => void} apply Called with the weight of", + " * the brush and the position (from 0 to 1) of the nearest point of the segment.", + " * @param {SampleRectangle} changedSamples", + " */", + " forEachSample(data, stroke, apply, changedSamples) {", + " const { cellWidth, cellHeight, ax, ay, bx, by, radius } = stroke;", + " const last = data.resolution;", + " const minI = clampInteger(Math.floor((Math.min(ax, bx) - radius) / cellWidth), 0, last);", + " const maxI = clampInteger(Math.ceil((Math.max(ax, bx) + radius) / cellWidth), 0, last);", + " const minJ = clampInteger(Math.floor((Math.min(ay, by) - radius) / cellHeight), 0, last);", + " const maxJ = clampInteger(Math.ceil((Math.max(ay, by) + radius) / cellHeight), 0, last);", + " changedSamples.set(minI, minJ, maxI, maxJ);", + " if (radius <= 0) return;", + "", + " const abX = bx - ax;", + " const abY = by - ay;", + " const abLengthSquared = abX * abX + abY * abY;", + " const radiusSquared = radius * radius;", + " for (let j = minJ; j <= maxJ; j++) {", + " const y = j * cellHeight;", + " for (let i = minI; i <= maxI; i++) {", + " const x = i * cellWidth;", + " const t =", + " abLengthSquared > 0", + " ? clamp01(((x - ax) * abX + (y - ay) * abY) / abLengthSquared)", + " : 0;", + " const dx = x - (ax + t * abX);", + " const dy = y - (ay + t * abY);", + " const distanceSquared = dx * dx + dy * dy;", + " if (distanceSquared >= radiusSquared) continue;", + " const falloff = 1 - distanceSquared / radiusSquared;", + " apply(j * data.size + i, falloff * falloff, t);", + " }", + " }", + " },", + "", + " raise(data, stroke, amount, changedSamples) {", + " const { heights } = data;", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index, weight) => {", + " heights[index] = clamp01(heights[index] + amount * weight);", + " },", + " changedSamples", + " );", + " },", + "", + " /**", + " * @param {number} targetHeight", + " * @param {number} [endTargetHeight] The target at the end of the segment, for a slope (like a road", + " * going up). The same target as at its start by default.", + " */", + " flatten(data, stroke, targetHeight, strength, changedSamples, endTargetHeight = targetHeight) {", + " const { heights } = data;", + " const startTarget = clamp01(targetHeight);", + " const endTarget = clamp01(endTargetHeight);", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index, weight, t) => {", + " const target = startTarget + (endTarget - startTarget) * t;", + " heights[index] += (target - heights[index]) * clamp01(weight * strength);", + " },", + " changedSamples", + " );", + " },", + "", + " smooth(data, stroke, strength, changedSamples) {", + " const { heights, size } = data;", + " const changes = [];", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index, weight) => {", + " const i = index % size;", + " const j = (index - i) / size;", + " let sum = 0;", + " for (let dj = -1; dj <= 1; dj++) {", + " for (let di = -1; di <= 1; di++) {", + " sum += data.getHeight(i + di, j + dj);", + " }", + " }", + " changes.push(index, heights[index] + (sum / 9 - heights[index]) * clamp01(weight * strength));", + " },", + " changedSamples", + " );", + " // Written after all averages are computed, so that the result", + " // doesn't depend on the order in which samples are visited.", + " for (let index = 0; index < changes.length; index += 2) {", + " heights[changes[index]] = changes[index + 1];", + " }", + " },", + "", + " paint(data, stroke, layer, strength, changedSamples) {", + " const { splat } = data;", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index, weight) => {", + " const amount = clamp01(weight * strength);", + " const offset = index * LAYER_COUNT;", + " for (let otherLayer = 0; otherLayer < LAYER_COUNT; otherLayer++) {", + " const target = otherLayer === layer ? 255 : 0;", + " const value = splat[offset + otherLayer];", + " // Rounded towards the target, so that light strokes still paint.", + " const change = (target - value) * amount;", + " splat[offset + otherLayer] = value + (change > 0 ? Math.ceil(change) : Math.floor(change));", + " }", + " },", + " changedSamples", + " );", + " },", + "", + " /** Remove all the layers, making a hole (`fill` or painting a layer fills it again). */", + " hole(data, stroke, changedSamples) {", + " const { splat } = data;", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index) => {", + " splat.fill(0, index * LAYER_COUNT, (index + 1) * LAYER_COUNT);", + " },", + " changedSamples", + " );", + " },", + "", + " /**", + " * Fill the holes in the radius with the layers of the ground around them:", + " * each pass fills the holes next to the ground with the average of their", + " * neighbors, from the edges of the holes inward.", + " */", + " fill(data, stroke, changedSamples) {", + " const { splat, size, resolution } = data;", + " /** @type {number[]} */", + " let holes = [];", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index) => {", + " if (data.isHole(index)) holes.push(index);", + " },", + " changedSamples", + " );", + " const filledWeights = new Float32Array(holes.length * LAYER_COUNT);", + " while (holes.length > 0) {", + " /** @type {number[]} */", + " const remainingHoles = [];", + " /** @type {number[]} */", + " const filledHoles = [];", + " for (const index of holes) {", + " const i = index % size;", + " const j = (index - i) / size;", + " const weights = filledWeights.subarray(filledHoles.length * LAYER_COUNT, (filledHoles.length + 1) * LAYER_COUNT);", + " weights.fill(0);", + " for (let neighborJ = Math.max(j - 1, 0); neighborJ <= Math.min(j + 1, resolution); neighborJ++) {", + " for (let neighborI = Math.max(i - 1, 0); neighborI <= Math.min(i + 1, resolution); neighborI++) {", + " const neighbor = neighborJ * size + neighborI;", + " if (data.isHole(neighbor)) continue;", + " for (let layer = 0; layer < LAYER_COUNT; layer++) weights[layer] += splat[neighbor * LAYER_COUNT + layer];", + " }", + " }", + " if (weights[0] + weights[1] + weights[2] + weights[3] > 0) filledHoles.push(index);", + " else remainingHoles.push(index);", + " }", + " if (filledHoles.length === 0) {", + " // No ground around (a hole bigger than the brush): the first layer is used.", + " for (const index of remainingHoles) splat[index * LAYER_COUNT] = 255;", + " break;", + " }", + " // Filled after the pass, so that the holes are filled from the edges inward.", + " filledHoles.forEach((index, filledIndex) => {", + " const weights = filledWeights.subarray(filledIndex * LAYER_COUNT, (filledIndex + 1) * LAYER_COUNT);", + " const total = weights[0] + weights[1] + weights[2] + weights[3];", + " for (let layer = 0; layer < LAYER_COUNT; layer++) {", + " splat[index * LAYER_COUNT + layer] = Math.round((weights[layer] / total) * 255);", + " }", + " });", + " holes = remainingHoles;", + " }", + " },", + "", + " /** @param {number[]} color The red, green and blue (0-255) of the tint: white removes it. */", + " tint(data, stroke, color, strength, changedSamples) {", + " brushes.paintColors(data, stroke, 0, color, strength, changedSamples);", + " },", + "", + " /** @param {number} wetness From 0 (dry) to 1. */", + " wet(data, stroke, wetness, strength, changedSamples) {", + " brushes.paintColors(data, stroke, 3, [Math.round(clamp01(wetness) * 255)], strength, changedSamples);", + " },", + "", + " /**", + " * Bring channels of the colors (see `TerrainData.colors`) towards targets.", + " * @param {number} firstChannel", + " * @param {number[]} targets From 0 to 255, for the channels from the first one.", + " */", + " paintColors(data, stroke, firstChannel, targets, strength, changedSamples) {", + " const { colors } = data;", + " brushes.forEachSample(", + " data,", + " stroke,", + " (index, weight) => {", + " const amount = clamp01(weight * strength);", + " for (let channel = 0; channel < targets.length; channel++) {", + " const offset = index * 4 + firstChannel + channel;", + " // Rounded towards the target, so that light strokes still paint.", + " const change = (targets[channel] - colors[offset]) * amount;", + " colors[offset] += change > 0 ? Math.ceil(change) : Math.floor(change);", + " }", + " },", + " changedSamples", + " );", + " },", + "};", + "", + "const relief = (() => {", + " const hash = (x, y, seed) => {", + " let h = Math.imul(x, 374761393) + Math.imul(y, 668265263) + Math.imul(seed, 982451653);", + " h = Math.imul(h ^ (h >>> 13), 1274126177);", + " return ((h ^ (h >>> 16)) >>> 0) / 4294967296;", + " };", + " const valueNoise = (x, y, seed) => {", + " const x0 = Math.floor(x);", + " const y0 = Math.floor(y);", + " const fx = x - x0;", + " const fy = y - y0;", + " const sx = fx * fx * (3 - 2 * fx);", + " const sy = fy * fy * (3 - 2 * fy);", + " const top = hash(x0, y0, seed) + sx * (hash(x0 + 1, y0, seed) - hash(x0, y0, seed));", + " const bottom =", + " hash(x0, y0 + 1, seed) + sx * (hash(x0 + 1, y0 + 1, seed) - hash(x0, y0 + 1, seed));", + " return top + sy * (bottom - top);", + " };", + " /** Fractal noise between 0 and 1. */", + " const fractalNoise = (x, y, seed) => {", + " let value = 0;", + " let amplitude = 0.5;", + " let frequency = 1;", + " for (let octave = 0; octave < 5; octave++) {", + " value += amplitude * valueNoise(x * frequency, y * frequency, seed + octave);", + " amplitude *= 0.5;", + " frequency *= 2;", + " }", + " return value / 0.96875;", + " };", + " const smoothstep = (edge0, edge1, x) => {", + " const t = clamp01((x - edge0) / (edge1 - edge0));", + " return t * t * (3 - 2 * t);", + " };", + " const reliefHeights = {", + " Flat: () => 0,", + " Hills: (u, v, seed) => 0.05 + 0.5 * Math.pow(fractalNoise(u * 3, v * 3, seed), 2),", + " Mountains: (u, v, seed) => {", + " const ridge = 1 - Math.abs(2 * fractalNoise(u * 2.5, v * 2.5, seed) - 1);", + " return 0.9 * Math.pow(ridge, 2.5);", + " },", + " Island: (u, v, seed) => {", + " const distanceToCenter = 2 * Math.hypot(u - 0.5, v - 0.5);", + " const coast = 0.2 * (fractalNoise(u * 4, v * 4, seed + 7) - 0.5);", + " const land = smoothstep(0.95, 0.55, distanceToCenter + coast);", + " return land * (0.12 + 0.6 * Math.pow(fractalNoise(u * 3, v * 3, seed), 1.5));", + " },", + " };", + " const beachLayer = 3;", + "", + " return {", + " /**", + " * @param {TerrainData} data", + " * @param {string} reliefName Flat, Hills, Mountains or Island.", + " * @param {number} seed", + " */", + " generate(data, reliefName, seed) {", + " const getHeight = reliefHeights[reliefName] || reliefHeights.Flat;", + " const integerSeed = Math.floor(seed) | 0;", + " data.fillLayer(0);", + " for (let j = 0; j < data.size; j++) {", + " for (let i = 0; i < data.size; i++) {", + " const index = j * data.size + i;", + " const height = clamp01(", + " getHeight(i / data.resolution, j / data.resolution, integerSeed)", + " );", + " data.heights[index] = height;", + " if (reliefName === 'Island') {", + " const sand = Math.round(255 * smoothstep(0.16, 0.1, height));", + " const offset = index * LAYER_COUNT;", + " data.splat[offset] = 255 - sand;", + " data.splat[offset + beachLayer] = sand;", + " }", + " }", + " }", + " },", + " };", + "})();", + "", + "/**", + " * Edits written in the Edits property: a JSON list of brush strokes, like", + " * `[{\"tool\": \"raise\", \"x\": 0.5, \"y\": 0.5, \"radius\": 0.2, \"height\": 0.3}]`,", + " * applied on the relief or the heightmap. Positions and radius are fractions", + " * of the terrain size, heights and Z positions fractions of its depth: they", + " * are the same for all instances, whatever their size. They are made to be", + " * read and written by people and by AI agents.", + " */", + "const edits = {", + " /**", + " * @param {TerrainData} data", + " * @param {string} text", + " */", + " apply(data, text) {", + " if (!text.trim()) return;", + " let editList;", + " try {", + " editList = JSON.parse(text);", + " } catch (error) {", + " console.warn('The edits of a terrain are not valid JSON: ' + error.message);", + " return;", + " }", + " if (!Array.isArray(editList)) {", + " console.warn('The edits of a terrain must be a JSON list (like [{\"tool\": \"raise\", ...}]).');", + " return;", + " }", + " const numberOr = (value, defaultValue) => (typeof value === 'number' && isFinite(value) ? value : defaultValue);", + " const changedSamples = new SampleRectangle();", + " for (const edit of editList) {", + " if (!edit || typeof edit !== 'object') continue;", + " const x = numberOr(edit.x, 0.5);", + " const y = numberOr(edit.y, 0.5);", + " const stroke = {", + " cellWidth: 1 / data.resolution,", + " cellHeight: 1 / data.resolution,", + " ax: x,", + " ay: y,", + " bx: numberOr(edit.toX, x),", + " by: numberOr(edit.toY, y),", + " radius: numberOr(edit.radius, 0.1),", + " };", + " const strength = clamp01(numberOr(edit.strength, 1));", + " if (edit.tool === 'raise') {", + " brushes.raise(data, stroke, numberOr(edit.height, 0.1), changedSamples);", + " } else if (edit.tool === 'flatten') {", + " const z = numberOr(edit.z, 0);", + " brushes.flatten(data, stroke, z, strength, changedSamples, numberOr(edit.toZ, z));", + " } else if (edit.tool === 'smooth') {", + " // Smoothing the same fraction of the terrain at any resolution.", + " const passes = Math.max(Math.round(((1 + 9 * strength) * data.resolution) / 256), 1);", + " for (let pass = 0; pass < passes; pass++) brushes.smooth(data, stroke, 1, changedSamples);", + " } else if (edit.tool === 'paint') {", + " const layer = clampInteger(numberOr(edit.layer, 1) - 1, 0, LAYER_COUNT - 1);", + " brushes.paint(data, stroke, layer, strength, changedSamples);", + " } else if (edit.tool === 'tint') {", + " const color = gdjs.rgbOrHexToRGBColor(typeof edit.color === 'string' ? edit.color : '255;255;255');", + " brushes.tint(data, stroke, color, strength, changedSamples);", + " } else if (edit.tool === 'wetness') {", + " brushes.wet(data, stroke, numberOr(edit.amount, 1), strength, changedSamples);", + " } else if (edit.tool === 'hole') {", + " brushes.hole(data, stroke, changedSamples);", + " } else if (edit.tool === 'fill') {", + " brushes.fill(data, stroke, changedSamples);", + " } else {", + " console.warn('Unknown tool in the edits of a terrain: \"' + edit.tool + '\" (use raise, flatten, smooth, paint, tint, wetness, hole or fill).');", + " }", + " }", + " },", + "};", + "", + "/**", + " * @param {gdjs.RuntimeGame} game", + " * @param {string} imageResourceName", + " * @returns {CanvasImageSource | null} The image, or null if it's not loaded (yet).", + " */", + "const getLoadedImage = (game, imageResourceName) => {", + " const imageManager = game.getImageManager();", + " if (typeof imageManager.getImageSource === 'function') return imageManager.getImageSource(imageResourceName);", + " // Older GDevelop versions: a 192 x 192 placeholder is given for images that are not loaded.", + " const texture = imageManager.getPIXITexture(imageResourceName);", + " return texture && texture !== imageManager.getInvalidPIXITexture() ? texture.baseTexture.getDrawableSource() : null;", + "};", + "", + "/**", + " * Loads heights from an image: black is the lowest, white the highest.", + " * Heights have 16 bits of precision when the red channel holds the most", + " * significant byte and the green one the least significant (a gray image", + " * works as expected too).", + " * @param {TerrainData} data", + " * @param {gdjs.RuntimeGame} game", + " * @param {string} imageResourceName", + " * @returns {boolean} true if the image could be read.", + " */", + "const loadHeightsFromImage = (data, game, imageResourceName) => {", + " const source = getLoadedImage(game, imageResourceName);", + " if (!source) return false;", + "", + " const canvas = document.createElement('canvas');", + " canvas.width = source.width;", + " canvas.height = source.height;", + " const context = canvas.getContext('2d', { willReadFrequently: true });", + " if (!context) return false;", + " context.drawImage(source, 0, 0);", + " const pixels = context.getImageData(0, 0, source.width, source.height).data;", + " // Pixels are decoded before being interpolated, to keep the 16 bits.", + " const pixelHeight = (x, y) => {", + " const offset = (y * source.width + x) * 4;", + " return (256 * pixels[offset] + pixels[offset + 1]) / 65535;", + " };", + " for (let j = 0; j < data.size; j++) {", + " const y = (j / data.resolution) * (source.height - 1);", + " const y0 = Math.floor(y);", + " const y1 = Math.min(y0 + 1, source.height - 1);", + " for (let i = 0; i < data.size; i++) {", + " const x = (i / data.resolution) * (source.width - 1);", + " const x0 = Math.floor(x);", + " const x1 = Math.min(x0 + 1, source.width - 1);", + " const top = pixelHeight(x0, y0) + (x - x0) * (pixelHeight(x1, y0) - pixelHeight(x0, y0));", + " const bottom = pixelHeight(x0, y1) + (x - x0) * (pixelHeight(x1, y1) - pixelHeight(x0, y1));", + " data.heights[j * data.size + i] = top + (y - y0) * (bottom - top);", + " }", + " }", + " return true;", + "};", + "", + "/**", + " * Stores the data in a string. Only the differences with the base data (from", + " * the relief or the heightmap) are stored: heights on 16 bits, layer weights", + " * on 8 bits, then (since format 2) the tint and wetness on 8 bits. Each value is predicted from its neighbors and the", + " * prediction errors are written as variable length integers, with runs of", + " * zeros collapsed. Untouched or smoothly changed areas take almost no space.", + " */", + "const codec = (() => {", + " const formatVersion = '2';", + " // Format 1 has no tint and wetness.", + " const readableFormatVersions = ['1', '2'];", + "", + " class ByteWriter {", + " constructor() {", + " this.bytes = new Uint8Array(1024);", + " this.length = 0;", + " }", + " writeVarUint(value) {", + " if (this.length + 5 > this.bytes.length) {", + " const bytes = new Uint8Array(this.bytes.length * 2);", + " bytes.set(this.bytes);", + " this.bytes = bytes;", + " }", + " while (value >= 0x80) {", + " this.bytes[this.length++] = (value & 0x7f) | 0x80;", + " value >>>= 7;", + " }", + " this.bytes[this.length++] = value;", + " }", + " }", + "", + " class ByteReader {", + " /** @param {Uint8Array} bytes */", + " constructor(bytes) {", + " this.bytes = bytes;", + " this.position = 0;", + " }", + " readVarUint() {", + " let value = 0;", + " let shift = 0;", + " let byte;", + " do {", + " if (this.position >= this.bytes.length) throw new Error('Truncated terrain data.');", + " byte = this.bytes[this.position++];", + " value += (byte & 0x7f) * Math.pow(2, shift);", + " shift += 7;", + " } while (byte & 0x80);", + " return value;", + " }", + " }", + "", + " /** Predicts a value from the left, top and top-left ones. */", + " const predict = (values, size, index) => {", + " const i = index % size;", + " if (index < size) return i === 0 ? 0 : values[index - 1];", + " if (i === 0) return values[index - size];", + " return values[index - 1] + values[index - size] - values[index - size - 1];", + " };", + "", + " /**", + " * @param {ByteWriter} writer", + " * @param {Int32Array} values A grid of `size * size` values.", + " */", + " const writeGrid = (writer, values, size) => {", + " let zeroRun = 0;", + " for (let index = 0; index < values.length; index++) {", + " const error = values[index] - predict(values, size, index);", + " if (error === 0) {", + " zeroRun++;", + " continue;", + " }", + " if (zeroRun > 0) {", + " writer.writeVarUint(0);", + " writer.writeVarUint(zeroRun);", + " zeroRun = 0;", + " }", + " // Zigzag: small negative and positive numbers get small codes.", + " writer.writeVarUint(error > 0 ? error * 2 : -error * 2 - 1);", + " }", + " if (zeroRun > 0) {", + " writer.writeVarUint(0);", + " writer.writeVarUint(zeroRun);", + " }", + " };", + "", + " /** @param {ByteReader} reader */", + " const readGrid = (reader, size) => {", + " const values = new Int32Array(size * size);", + " let zeroRun = 0;", + " for (let index = 0; index < values.length; index++) {", + " let error = 0;", + " if (zeroRun > 0) {", + " zeroRun--;", + " } else {", + " const code = reader.readVarUint();", + " if (code === 0) {", + " zeroRun = reader.readVarUint() - 1;", + " } else {", + " error = code % 2 === 0 ? code / 2 : -(code + 1) / 2;", + " }", + " }", + " values[index] = predict(values, size, index) + error;", + " }", + " return values;", + " };", + "", + " const toBase64 = (bytes, length) => {", + " let binary = '';", + " for (let offset = 0; offset < length; offset += 0x8000) {", + " binary += String.fromCharCode.apply(null, bytes.subarray(offset, Math.min(offset + 0x8000, length)));", + " }", + " return btoa(binary);", + " };", + "", + " const fromBase64 = (base64) => {", + " const binary = atob(base64);", + " const bytes = new Uint8Array(binary.length);", + " for (let index = 0; index < binary.length; index++) {", + " bytes[index] = binary.charCodeAt(index);", + " }", + " return bytes;", + " };", + "", + " return {", + " /**", + " * @param {TerrainData} data", + " * @param {TerrainData} baseData The data without changes, with the same resolution.", + " */", + " encode(data, baseData) {", + " const writer = new ByteWriter();", + " const values = new Int32Array(data.heights.length);", + " for (let index = 0; index < values.length; index++) {", + " values[index] = Math.round((data.heights[index] - baseData.heights[index]) * 65535);", + " }", + " writeGrid(writer, values, data.size);", + " for (let layer = 0; layer < LAYER_COUNT; layer++) {", + " for (let index = 0; index < values.length; index++) {", + " const offset = index * LAYER_COUNT + layer;", + " values[index] = data.splat[offset] - baseData.splat[offset];", + " }", + " writeGrid(writer, values, data.size);", + " }", + " // Not painted, these grids are zeros: a few bytes each.", + " for (let channel = 0; channel < 4; channel++) {", + " for (let index = 0; index < values.length; index++) {", + " const offset = index * 4 + channel;", + " values[index] = data.colors[offset] - baseData.colors[offset];", + " }", + " writeGrid(writer, values, data.size);", + " }", + " return formatVersion + ';' + data.resolution + ';' + toBase64(writer.bytes, writer.length);", + " },", + "", + " /**", + " * Store grids of integers in a string, like the terrain data. Used by other objects (the scattered models).", + " * @param {Int32Array[]} grids Grids of `size * size` values.", + " * @param {number} size", + " */", + " encodeGrids(grids, size) {", + " const writer = new ByteWriter();", + " for (const grid of grids) writeGrid(writer, grid, size);", + " return toBase64(writer.bytes, writer.length);", + " },", + "", + " /**", + " * @param {string} base64 A string from `encodeGrids`.", + " * @param {number} size", + " * @param {number} count The number of grids.", + " * @returns {Int32Array[]} The grids (an error is thrown if the string is not valid).", + " */", + " decodeGrids(base64, size, count) {", + " const reader = new ByteReader(fromBase64(base64));", + " return Array.from({ length: count }, () => readGrid(reader, size));", + " },", + "", + " /**", + " * @param {string} text", + " * @param {(resolution: number) => TerrainData} createBaseData", + " * @returns {TerrainData | null} null if the text is empty or not valid.", + " */", + " decode(text, createBaseData) {", + " if (!text) return null;", + " const parts = text.split(';');", + " const resolution = parseInt(parts[1], 10);", + " if (readableFormatVersions.indexOf(parts[0]) === -1 || RESOLUTIONS.indexOf(resolution) === -1) {", + " return null;", + " }", + " try {", + " const reader = new ByteReader(fromBase64(parts[2]));", + " const data = createBaseData(resolution);", + " const heightChanges = readGrid(reader, data.size);", + " for (let index = 0; index < heightChanges.length; index++) {", + " data.heights[index] = clamp01(data.heights[index] + heightChanges[index] / 65535);", + " }", + " for (let layer = 0; layer < LAYER_COUNT; layer++) {", + " const weightChanges = readGrid(reader, data.size);", + " for (let index = 0; index < weightChanges.length; index++) {", + " const offset = index * LAYER_COUNT + layer;", + " // The base may have changed since the data was saved.", + " data.splat[offset] = Math.min(Math.max(data.splat[offset] + weightChanges[index], 0), 255);", + " }", + " }", + " if (parts[0] !== '1') {", + " for (let channel = 0; channel < 4; channel++) {", + " const colorChanges = readGrid(reader, data.size);", + " for (let index = 0; index < colorChanges.length; index++) {", + " const offset = index * 4 + channel;", + " data.colors[offset] = Math.min(Math.max(data.colors[offset] + colorChanges[index], 0), 255);", + " }", + " }", + " }", + " return data;", + " } catch (error) {", + " console.error('Terrain data could not be read:', error);", + " return null;", + " }", + " },", + " };", + "})();", + "", + "const lodIndices = new Map();", + "/**", + " * The triangles of a chunk, shared by all chunks of the same size. Chunk", + " * borders have a skirt going down, hiding the gaps between chunks drawn", + " * with different levels of detail.", + " * @param {number} chunkCells", + " * @param {number} step", + " */", + "const getLodIndex = (chunkCells, step) => {", + " const key = chunkCells + ';' + step;", + " const existingIndex = lodIndices.get(key);", + " if (existingIndex) return existingIndex;", + "", + " const sideVertices = chunkCells + 1;", + " const gridVertices = sideVertices * sideVertices;", + " const indices = [];", + " const grid = (i, j) => j * sideVertices + i;", + " for (let j = 0; j < chunkCells; j += step) {", + " for (let i = 0; i < chunkCells; i += step) {", + " const topLeft = grid(i, j);", + " const topRight = grid(i + step, j);", + " const bottomLeft = grid(i, j + step);", + " const bottomRight = grid(i + step, j + step);", + " indices.push(topLeft, topRight, bottomLeft, topRight, bottomRight, bottomLeft);", + " }", + " }", + " const borders = [", + " (k) => grid(k, 0),", + " (k) => grid(k, chunkCells),", + " (k) => grid(0, k),", + " (k) => grid(chunkCells, k),", + " ];", + " borders.forEach((borderVertex, border) => {", + " const skirtVertex = (k) => gridVertices + border * sideVertices + k;", + " for (let k = 0; k < chunkCells; k += step) {", + " const a = borderVertex(k);", + " const b = borderVertex(k + step);", + " const skirtA = skirtVertex(k);", + " const skirtB = skirtVertex(k + step);", + " // Both faces, as a skirt can be seen from either side.", + " indices.push(a, b, skirtB, a, skirtB, skirtA, a, skirtB, b, a, skirtA, skirtB);", + " }", + " });", + " const index = new THREE.BufferAttribute(new Uint16Array(indices), 1);", + " lodIndices.set(key, index);", + " return index;", + "};", + "", + "const vertexShaderDeclarations = `", + "varying vec2 vTerrainLocalXY;", + "varying float vTerrainLocalZ;", + "uniform float terrainWorldScale;", + "varying vec2 vTerrainWorldXY;", + "varying float vTerrainUp;", + "`;", + "const vertexShaderCode = `", + "vTerrainLocalXY = position.xy;", + "vTerrainLocalZ = position.z;", + "vTerrainWorldXY = (modelMatrix * vec4(transformed, 1.0)).xy * terrainWorldScale;", + "// The world normal, from the camera space normal (computed by Three.js with a", + "// matrix inverted on the CPU), instead of inverting a matrix for each vertex.", + "vTerrainUp = inverseTransformDirection(transformedNormal, viewMatrix).z;", + "`;", + "/** @param {(layer: number) => string} getLayerCode */", + "const forEachLayerCode = (getLayerCode) => [0, 1, 2, 3].map(getLayerCode).join('\\n');", + "", + "// Noise is read from a texture of random values, repeated every", + "// NOISE_MAP_SIZE units of noise: 1 texture read instead of 16 hashes.", + "const NOISE_MAP_SIZE = 256;", + "", + "const fragmentShaderDeclarations = `", + "uniform sampler2D terrainSplatMap;", + "uniform vec2 terrainSplatUvScaleAndOffset;", + "uniform vec3 terrainLayerColors[4];", + "uniform sampler2D terrainLayerMap0;", + "uniform sampler2D terrainLayerMap1;", + "uniform sampler2D terrainLayerMap2;", + "uniform sampler2D terrainLayerMap3;", + "uniform vec3 terrainLayerAverageColors[4];", + "uniform sampler2D terrainLayerNormalMap0;", + "uniform sampler2D terrainLayerNormalMap1;", + "uniform sampler2D terrainLayerNormalMap2;", + "uniform sampler2D terrainLayerNormalMap3;", + "uniform float terrainNormalMapStrength;", + "uniform float terrainTextureSize;", + "uniform float terrainHeightBlending;", + "uniform float terrainTextureVariation;", + "uniform vec4 terrainCliffLayer;", + "uniform vec2 terrainCliffCosines;", + "uniform vec4 terrainBrush;", + "uniform sampler2D terrainColorMap;", + "uniform sampler2D terrainNoiseMap;", + "uniform vec3 terrainWetShore;", + "varying vec2 vTerrainLocalXY;", + "varying float vTerrainLocalZ;", + "varying vec2 vTerrainWorldXY;", + "varying float vTerrainUp;", + "", + "// The rotation of the copies of textures used to make repetition less visible.", + "const mat2 terrainCopyRotation = mat2(0.8, -0.6, 0.6, 0.8);", + "/** A bump of a normal map (from -1 to 1), mixed with its rotated copy in patches. */", + "vec3 terrainSampleNormal(sampler2D normalMap, vec2 uv, vec2 uv2, float patches) {", + " vec3 bump = texture2D(normalMap, uv).xyz * 2.0 - 1.0;", + " if (patches <= 0.0) return bump;", + " vec3 copyBump = texture2D(normalMap, uv2).xyz * 2.0 - 1.0;", + " // The bumps of the copy are rotated back with the inverse rotation.", + " copyBump.xy = transpose(terrainCopyRotation) * copyBump.xy;", + " return mix(bump, copyBump, patches);", + "}", + "/**", + " * 4 independent value noises (one by channel), from 0 to 1, smoothly varying", + " * between random values at integer positions.", + " */", + "vec4 terrainNoise(vec2 p) {", + " vec2 i = floor(p);", + " vec2 f = p - i;", + " // The read position is moved so that the linear interpolation of the", + " // texture between 2 random values becomes a smooth one.", + " return texture2D(terrainNoiseMap, (i + f * f * (3.0 - 2.0 * f) + 0.5) / ${NOISE_MAP_SIZE}.0);", + "}", + "`;", + "// Holes are samples without any painted layer: the interpolated sum of the", + "// weights gives smooth edges. Only compiled for terrains having holes, as", + "// discard makes drawing slower on some GPUs.", + "const holeShaderCode = `", + "#ifdef TERRAIN_HOLES", + "if (dot(texture2D(terrainSplatMap, vTerrainLocalXY * terrainSplatUvScaleAndOffset.x + terrainSplatUvScaleAndOffset.y), vec4(1.0)) < 0.5) discard;", + "#endif", + "`;", + "// For the shadows: the depth of holes is not drawn.", + "const holeDepthShaderDeclarations = `", + "uniform sampler2D terrainSplatMap;", + "uniform vec2 terrainSplatUvScaleAndOffset;", + "varying vec2 vTerrainLocalXY;", + "`;", + "", + "// Layers without texture, normal map, height blending or texture variation", + "// are compiled out (see TerrainRenderer.updateMaterial).", + "const fragmentShaderCode = holeShaderCode + `", + "// Borders between layers are made irregular and sharper, to look painted.", + "vec4 terrainJitter = terrainNoise(vTerrainWorldXY / 24.0);", + "// Layer weights are in a texture, so that painted details stay the same", + "// whatever the level of detail of the ground.", + "vec2 terrainSplatUv = vTerrainLocalXY * terrainSplatUvScaleAndOffset.x + terrainSplatUvScaleAndOffset.y;", + "vec4 terrainWeights = texture2D(terrainSplatMap, terrainSplatUv) * (0.7 + 0.6 * terrainJitter);", + "terrainWeights = terrainWeights * terrainWeights;", + "terrainWeights /= max(dot(terrainWeights, vec4(1.0)), 0.00001);", + "float terrainCliff = 1.0 - smoothstep(terrainCliffCosines.x, terrainCliffCosines.y, vTerrainUp);", + "terrainWeights = mix(terrainWeights, terrainCliffLayer, terrainCliff * dot(terrainCliffLayer, vec4(1.0)));", + "", + "vec2 terrainUv = vTerrainWorldXY / terrainTextureSize;", + "${forEachLayerCode(", + " (layer) => `#ifdef TERRAIN_LAYER_MAP_${layer}", + "vec3 terrainTexture${layer} = texture2D(terrainLayerMap${layer}, terrainUv).rgb;", + "#else", + "vec3 terrainTexture${layer} = vec3(1.0);", + "#endif`", + ")}", + "", + "// Less visible repetition: in irregular patches, textures are replaced by a", + "// rotated and shifted copy of themselves, and colors slowly vary.", + "float terrainPatches = 0.0;", + "vec2 terrainUv2 = terrainUv;", + "float terrainColorVariation = 1.0;", + "#ifdef TERRAIN_TEXTURE_VARIATION", + "// Up to half of the ground is covered by the copies, each patch showing", + "// only one of them (mixing them would make them blurry).", + "float terrainPatchThreshold = 1.0 - 0.5 * terrainTextureVariation;", + "terrainPatches = smoothstep(terrainPatchThreshold - 0.05, terrainPatchThreshold + 0.05, terrainNoise(terrainUv * 0.23 + 7.3).x);", + "terrainUv2 = terrainCopyRotation * terrainUv + vec2(0.31, 0.73);", + "${forEachLayerCode(", + " (layer) => `#ifdef TERRAIN_LAYER_MAP_${layer}", + "terrainTexture${layer} = mix(terrainTexture${layer}, texture2D(terrainLayerMap${layer}, terrainUv2).rgb, terrainPatches);", + "#endif`", + ")}", + "terrainColorVariation += terrainTextureVariation * 0.3 *", + " (terrainNoise(terrainUv * 0.11).y + 0.5 * terrainNoise(terrainUv * 0.37 + 3.1).z - 0.75);", + "#endif", + "", + "// Height-based blending: the brightness of a texture, compared to its", + "// average, is used as its height. Where layers meet, the high parts (stones,", + "// tufts) cover the low parts (sand, gaps) instead of fading into each other.", + "#ifdef TERRAIN_HEIGHT_BLENDING", + "// Averages are computed once on the CPU, or read from the smallest mipmap", + "// when the image can't be read by the CPU.", + "${forEachLayerCode(", + " (layer) => `#ifdef TERRAIN_LAYER_MIPMAP_AVERAGE_${layer}", + "vec3 terrainAverage${layer} = textureLod(terrainLayerMap${layer}, vec2(0.5), 16.0).rgb;", + "#else", + "vec3 terrainAverage${layer} = terrainLayerAverageColors[${layer}];", + "#endif`", + ")}", + "const vec3 terrainLuminance = vec3(0.299, 0.587, 0.114);", + "vec4 terrainHeights = vec4(", + " dot(terrainTexture0 - terrainAverage0, terrainLuminance),", + " dot(terrainTexture1 - terrainAverage1, terrainLuminance),", + " dot(terrainTexture2 - terrainAverage2, terrainLuminance),", + " dot(terrainTexture3 - terrainAverage3, terrainLuminance)", + ");", + "vec4 terrainHeightWeights = terrainWeights + terrainHeights;", + "float terrainTop = max(max(terrainHeightWeights.x, terrainHeightWeights.y), max(terrainHeightWeights.z, terrainHeightWeights.w));", + "// Only painted layers (and the cliff layer) can show.", + "vec4 terrainHeightBlend = max(terrainHeightWeights - terrainTop + 0.1, 0.0) * step(0.004, terrainWeights);", + "terrainHeightBlend /= max(dot(terrainHeightBlend, vec4(1.0)), 0.00001);", + "terrainWeights = mix(terrainWeights, terrainHeightBlend, terrainHeightBlending);", + "#endif", + "", + "vec3 terrainColor = terrainColorVariation * (", + " terrainWeights.x * terrainLayerColors[0] * terrainTexture0 +", + " terrainWeights.y * terrainLayerColors[1] * terrainTexture1 +", + " terrainWeights.z * terrainLayerColors[2] * terrainTexture2 +", + " terrainWeights.w * terrainLayerColors[3] * terrainTexture3);", + "", + "// The painted tint multiplies all layers. Wet ground is darker (and", + "// shinier, see the roughness).", + "vec4 terrainTintAndWetness = texture2D(terrainColorMap, terrainSplatUv);", + "float terrainWetness = max(", + " terrainTintAndWetness.a,", + " terrainWetShore.z * (1.0 - smoothstep(terrainWetShore.x, terrainWetShore.x + terrainWetShore.y, vTerrainLocalZ))", + ");", + "terrainColor *= terrainTintAndWetness.rgb * (1.0 - 0.4 * terrainWetness);", + "diffuseColor.rgb *= terrainColor;", + "", + "if (terrainBrush.w > 0.5) {", + " float brushDistance = distance(vTerrainWorldXY, terrainBrush.xy);", + " float ringWidth = max(terrainBrush.z * 0.04, 1.5);", + " float ring = 1.0 - smoothstep(0.0, ringWidth, abs(brushDistance - terrainBrush.z));", + " float disc = brushDistance < terrainBrush.z ? 0.12 : 0.0;", + " diffuseColor.rgb = mix(diffuseColor.rgb, vec3(1.0), max(ring * 0.85, disc));", + "}", + "`;", + "", + "const fragmentShaderRoughnessCode = `", + "roughnessFactor = mix(roughnessFactor, 0.3, terrainWetness);", + "`;", + "", + "const fragmentShaderNormalCode = `", + "#ifdef TERRAIN_NORMAL_MAPS", + "// Layers without normal map are flat.", + "vec3 terrainMapNormal = vec3(0.0);", + "${forEachLayerCode(", + " (layer) => `#ifdef TERRAIN_LAYER_NORMAL_MAP_${layer}", + "terrainMapNormal += terrainWeights[${layer}] * terrainSampleNormal(terrainLayerNormalMap${layer}, terrainUv, terrainUv2, terrainPatches);", + "#else", + "terrainMapNormal.z += terrainWeights[${layer}];", + "#endif`", + ")}", + "terrainMapNormal.xy *= terrainNormalMapStrength;", + "// The X and Y of textures follow the X and Y of the 3D world, projected on", + "// the ground (the camera space of the normal is used).", + "vec3 terrainTangent = (viewMatrix * vec4(1.0, 0.0, 0.0, 0.0)).xyz;", + "terrainTangent -= normal * dot(normal, terrainTangent);", + "// A ground facing the X axis (a rotated terrain) uses the Y axis instead.", + "if (dot(terrainTangent, terrainTangent) < 0.000001) {", + " terrainTangent = (viewMatrix * vec4(0.0, 1.0, 0.0, 0.0)).xyz;", + " terrainTangent -= normal * dot(normal, terrainTangent);", + "}", + "terrainTangent = normalize(terrainTangent);", + "vec3 terrainBitangent = cross(normal, terrainTangent);", + "normal = normalize(mat3(terrainTangent, terrainBitangent, normal) * terrainMapNormal);", + "#endif", + "`;", + "", + "let whiteTexture = null;", + "const getWhiteTexture = () => {", + " if (!whiteTexture) {", + " whiteTexture = new THREE.DataTexture(new Uint8Array([255, 255, 255, 255]), 1, 1);", + " whiteTexture.needsUpdate = true;", + " }", + " return whiteTexture;", + "};", + "", + "let flatNormalTexture = null;", + "const getFlatNormalTexture = () => {", + " if (!flatNormalTexture) {", + " flatNormalTexture = new THREE.DataTexture(new Uint8Array([128, 128, 255, 255]), 1, 1);", + " flatNormalTexture.needsUpdate = true;", + " }", + " return flatNormalTexture;", + "};", + "", + "let noiseTexture = null;", + "/** Random values, in 4 independent channels, read by `terrainNoise` in the shader. */", + "const getNoiseTexture = () => {", + " if (!noiseTexture) {", + " const random = createRandom(1);", + " const bytes = new Uint8Array(NOISE_MAP_SIZE * NOISE_MAP_SIZE * 4);", + " for (let index = 0; index < bytes.length; index++) {", + " bytes[index] = Math.floor(random() * 256);", + " }", + " noiseTexture = new THREE.DataTexture(bytes, NOISE_MAP_SIZE, NOISE_MAP_SIZE);", + " noiseTexture.wrapS = THREE.RepeatWrapping;", + " noiseTexture.wrapT = THREE.RepeatWrapping;", + " // No mipmaps: the shader moves the read position between samples.", + " noiseTexture.magFilter = THREE.LinearFilter;", + " noiseTexture.minFilter = THREE.LinearFilter;", + " noiseTexture.needsUpdate = true;", + " }", + " return noiseTexture;", + "};", + "", + "const DEFAULT_ANISOTROPY = 4;", + "/** @type {WeakMap>} */", + "const layerTextures = new WeakMap();", + "/** @type {WeakMap>} */", + "const layerNormalMaps = new WeakMap();", + "/**", + " * Textures of the image manager have no mipmaps: they would shimmer when", + " * repeated in the distance.", + " * @param {gdjs.RuntimeGame} game", + " * @param {string} resourceName", + " * @param {boolean} isNormalMap Normal maps are directions, not colors.", + " * @param {number} anisotropy", + " */", + "const getLayerTexture = (game, resourceName, isNormalMap, anisotropy) => {", + " if (!resourceName) return isNormalMap ? getFlatNormalTexture() : getWhiteTexture();", + " const imageTexture = game.getImageManager().getThreeTexture(resourceName);", + " const texturesByImage = isNormalMap ? layerNormalMaps : layerTextures;", + " let texturesByAnisotropy = texturesByImage.get(imageTexture);", + " if (!texturesByAnisotropy) {", + " texturesByAnisotropy = new Map();", + " texturesByImage.set(imageTexture, texturesByAnisotropy);", + " }", + " let texture = texturesByAnisotropy.get(anisotropy);", + " if (!texture) {", + " texture = imageTexture.clone();", + " if (isNormalMap) texture.colorSpace = THREE.NoColorSpace;", + " texture.wrapS = THREE.RepeatWrapping;", + " texture.wrapT = THREE.RepeatWrapping;", + " texture.minFilter = THREE.LinearMipmapLinearFilter;", + " texture.generateMipmaps = true;", + " texture.anisotropy = anisotropy;", + " texture.needsUpdate = true;", + " texturesByAnisotropy.set(anisotropy, texture);", + " }", + " return texture;", + "};", + "", + "/** @type {Float32Array | null} */", + "let srgbToLinearValues = null;", + "/** @type {WeakMap} */", + "const linearAverageColors = new WeakMap();", + "/**", + " * @param {THREE.Texture} texture", + " * @returns {THREE.Vector3 | null} The average color of the texture, in the", + " * linear color space (like colors read by shaders), or null if the image", + " * can't be read: not loaded yet, or from another domain without CORS.", + " */", + "const getLinearAverageColor = (texture) => {", + " const image = texture.image;", + " if (!image) return null;", + " const cachedColor = linearAverageColors.get(image);", + " if (cachedColor) return cachedColor;", + " const isDrawable =", + " typeof document !== 'undefined' &&", + " ((image instanceof HTMLImageElement && image.complete && image.naturalWidth > 0) ||", + " image instanceof HTMLCanvasElement ||", + " (typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap));", + " if (!isDrawable) return null;", + " const size = 64;", + " let pixels;", + " try {", + " const canvas = document.createElement('canvas');", + " canvas.width = size;", + " canvas.height = size;", + " const context = canvas.getContext('2d');", + " // Downscaled with filtering, so that all pixels are counted.", + " context.imageSmoothingEnabled = true;", + " context.imageSmoothingQuality = 'high';", + " context.drawImage(image, 0, 0, size, size);", + " pixels = context.getImageData(0, 0, size, size).data;", + " } catch (error) {", + " return null;", + " }", + " if (!srgbToLinearValues) {", + " srgbToLinearValues = new Float32Array(256);", + " for (let value = 0; value < 256; value++) {", + " const srgb = value / 255;", + " srgbToLinearValues[value] = srgb <= 0.04045 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);", + " }", + " }", + " const isSrgb = texture.colorSpace === THREE.SRGBColorSpace;", + " let red = 0;", + " let green = 0;", + " let blue = 0;", + " for (let index = 0; index < pixels.length; index += 4) {", + " red += isSrgb ? srgbToLinearValues[pixels[index]] : pixels[index] / 255;", + " green += isSrgb ? srgbToLinearValues[pixels[index + 1]] : pixels[index + 1] / 255;", + " blue += isSrgb ? srgbToLinearValues[pixels[index + 2]] : pixels[index + 2] / 255;", + " }", + " const count = size * size;", + " const color = new THREE.Vector3(red / count, green / count, blue / count);", + " linearAverageColors.set(image, color);", + " return color;", + "};", + "", + "/**", + " * A texture of 4 bytes per sample of a grid of `size * size` samples (layer", + " * weights, tint and wetness...), interpolated between samples.", + " * @param {Uint8Array} bytes", + " * @param {number} size", + " */", + "const createGridTexture = (bytes, size) => {", + " const texture = new THREE.DataTexture(bytes, size, size);", + " texture.magFilter = THREE.LinearFilter;", + " texture.minFilter = THREE.LinearFilter;", + " texture.userData.isUploaded = false;", + " texture.onUpdate = () => {", + " texture.userData.isUploaded = true;", + " };", + " return texture;", + "};", + "", + "/**", + " * Send the rows of the changed samples to the GPU, or the whole texture", + " * before its first upload (and in older GDevelop versions).", + " * @param {THREE.DataTexture} texture", + " * @param {SampleRectangle} samples", + " */", + "const uploadGridTextureRows = (texture, samples) => {", + " if (texture.userData.isUploaded && typeof texture.addUpdateRange === 'function') {", + " const size = texture.image.width;", + " for (let j = samples.minJ; j <= samples.maxJ; j++) {", + " texture.addUpdateRange((j * size + samples.minI) * 4, (samples.maxI - samples.minI + 1) * 4);", + " }", + " }", + " texture.needsUpdate = true;", + "};", + "", + "class TerrainRenderer {", + " /** @param {Terrain} terrain */", + " constructor(terrain) {", + " this.terrain = terrain;", + " this.group = new THREE.Group();", + " terrain.object.get3DRendererObject().add(this.group);", + " /** @type {Array<{mesh: THREE.Mesh, geometry: THREE.BufferGeometry, firstI: number, firstJ: number, center: THREE.Vector3, lod: number}>} */", + " this.chunks = [];", + " this.chunksPerSide = 0;", + " this.chunkCells = 0;", + " this.chunkSideVertices = 0;", + " this.chunkGridVertices = 0;", + " this.chunkVertices = 0;", + " /** @type {THREE.DataTexture | null} */", + " this.splatTexture = null;", + " /** @type {THREE.DataTexture | null} */", + " this.colorTexture = null;", + " this.uniforms = {", + " terrainSplatMap: { value: getWhiteTexture() },", + " terrainSplatUvScaleAndOffset: { value: new THREE.Vector2() },", + " terrainLayerColors: { value: [new THREE.Color(), new THREE.Color(), new THREE.Color(), new THREE.Color()] },", + " terrainLayerMap0: { value: getWhiteTexture() },", + " terrainLayerMap1: { value: getWhiteTexture() },", + " terrainLayerMap2: { value: getWhiteTexture() },", + " terrainLayerMap3: { value: getWhiteTexture() },", + " // Used by the height blending, in the linear color space.", + " terrainLayerAverageColors: {", + " value: [new THREE.Vector3(1, 1, 1), new THREE.Vector3(1, 1, 1), new THREE.Vector3(1, 1, 1), new THREE.Vector3(1, 1, 1)],", + " },", + " terrainLayerNormalMap0: { value: getFlatNormalTexture() },", + " terrainLayerNormalMap1: { value: getFlatNormalTexture() },", + " terrainLayerNormalMap2: { value: getFlatNormalTexture() },", + " terrainLayerNormalMap3: { value: getFlatNormalTexture() },", + " terrainNormalMapStrength: { value: 1 },", + " terrainTextureSize: { value: 256 },", + " terrainHeightBlending: { value: 0 },", + " terrainTextureVariation: { value: 0 },", + " terrainCliffLayer: { value: new THREE.Vector4() },", + " terrainCliffCosines: { value: new THREE.Vector2() },", + " terrainBrush: { value: new THREE.Vector4() },", + " terrainColorMap: { value: getWhiteTexture() },", + " terrainNoiseMap: { value: getNoiseTexture() },", + " // Z (in the terrain group) under which the ground is wet, fade height, and 1 if it's used.", + " terrainWetShore: { value: new THREE.Vector3() },", + " // Scene units by 3D world unit.", + " terrainWorldScale: { value: 1 },", + " };", + " this.material = new THREE.MeshStandardMaterial({ roughness: 1, metalness: 0 });", + " this.material.onBeforeCompile = (shader) => {", + " Object.assign(shader.uniforms, this.uniforms);", + " shader.vertexShader = patchShaderCode(shader.vertexShader, [", + " ['#include ', '#include \\n' + vertexShaderDeclarations],", + " ['#include ', '#include \\n' + vertexShaderCode],", + " ], 'Terrain3D');", + " shader.fragmentShader = patchShaderCode(shader.fragmentShader, [", + " ['#include ', '#include \\n' + fragmentShaderDeclarations],", + " ['#include ', fragmentShaderCode],", + " ['#include ', '#include \\n' + fragmentShaderRoughnessCode],", + " ['#include ', '#include \\n' + fragmentShaderNormalCode],", + " ], 'Terrain3D');", + " };", + " this.hasHoles = false;", + " /** The defines of the features used by the terrain (see `updateMaterial`), without holes. */", + " this.featureDefines = [];", + " /** All the defines of the shader, separated by semicolons. */", + " this.shaderKey = '';", + " this.material.customProgramCacheKey = () => 'Terrain3D;' + this.shaderKey;", + " // Without them, holes would cast shadows.", + " this.depthMaterial = this._createHoleDepthMaterial(new THREE.MeshDepthMaterial());", + " this.distanceMaterial = this._createHoleDepthMaterial(new THREE.MeshDistanceMaterial());", + " this._cameraPosition = new THREE.Vector3();", + " this._chunkPosition = new THREE.Vector3();", + " this._scale = new THREE.Vector3();", + " }", + "", + " /**", + " * @param {THREE.MeshDepthMaterial | THREE.MeshDistanceMaterial} material", + " * @returns The material, drawing nothing in holes.", + " */", + " _createHoleDepthMaterial(material) {", + " material.defines = { TERRAIN_HOLES: '' };", + " material.onBeforeCompile = (shader) => {", + " Object.assign(shader.uniforms, this.uniforms);", + " shader.vertexShader = patchShaderCode(shader.vertexShader, [", + " ['#include ', '#include \\nvarying vec2 vTerrainLocalXY;'],", + " ['#include ', '#include \\nvTerrainLocalXY = position.xy;'],", + " ], 'Terrain3D shadows');", + " shader.fragmentShader = patchShaderCode(shader.fragmentShader, [", + " ['#include ', '#include \\n' + holeDepthShaderDeclarations],", + " ['#include ', holeShaderCode + '#include '],", + " ], 'Terrain3D shadows');", + " };", + " material.customProgramCacheKey = () => 'Terrain3DHoles';", + " return material;", + " }", + "", + " /**", + " * Use the shaders drawing holes, or the faster ones without them.", + " * @param {boolean} hasHoles", + " */", + " setHasHoles(hasHoles) {", + " if (hasHoles === this.hasHoles) return;", + " this.hasHoles = hasHoles;", + " this._updateShaderDefines();", + " for (const chunk of this.chunks) this._setChunkShadowMaterials(chunk.mesh);", + " }", + "", + " /**", + " * Compile the shader only with the features used by the terrain. It is", + " * compiled again only when they change: properties only change in the", + " * editor, holes can be made by actions.", + " */", + " _updateShaderDefines() {", + " const defines = this.hasHoles ? [...this.featureDefines, 'TERRAIN_HOLES'] : this.featureDefines;", + " const shaderKey = defines.join(';');", + " if (shaderKey === this.shaderKey) return;", + " // The material has its own defines (STANDARD).", + " for (const name of this.shaderKey ? this.shaderKey.split(';') : []) {", + " delete this.material.defines[name];", + " }", + " for (const name of defines) {", + " this.material.defines[name] = '';", + " }", + " this.shaderKey = shaderKey;", + " this.material.needsUpdate = true;", + " }", + "", + " /** @param {THREE.Mesh} mesh */", + " _setChunkShadowMaterials(mesh) {", + " mesh.customDepthMaterial = this.hasHoles ? this.depthMaterial : undefined;", + " mesh.customDistanceMaterial = this.hasHoles ? this.distanceMaterial : undefined;", + " }", + "", + " /** Recreate all the chunks, for example after the resolution changed. */", + " rebuild() {", + " this.disposeChunks();", + " const { data } = this.terrain;", + " this.chunkCells = getChunkCells(data.resolution);", + " this.chunkSideVertices = this.chunkCells + 1;", + " this.chunkGridVertices = this.chunkSideVertices * this.chunkSideVertices;", + " this.chunkVertices = this.chunkGridVertices + 4 * this.chunkSideVertices;", + " this.chunksPerSide = data.resolution / this.chunkCells;", + " const cellSize = AREA_SIZE / data.resolution;", + " // Sample centers are at the texel centers.", + " this.splatTexture = createGridTexture(data.splat, data.size);", + " this.uniforms.terrainSplatMap.value = this.splatTexture;", + " this.colorTexture = createGridTexture(data.colors, data.size);", + " // Tints are colors chosen like the layer colors.", + " this.colorTexture.colorSpace = THREE.SRGBColorSpace;", + " this.uniforms.terrainColorMap.value = this.colorTexture;", + " this.uniforms.terrainSplatUvScaleAndOffset.value.set(1 / (cellSize * data.size), 0.5 / data.size);", + " for (let chunkJ = 0; chunkJ < this.chunksPerSide; chunkJ++) {", + " for (let chunkI = 0; chunkI < this.chunksPerSide; chunkI++) {", + " const firstI = chunkI * this.chunkCells;", + " const firstJ = chunkJ * this.chunkCells;", + " const positions = new Float32Array(this.chunkVertices * 3);", + " for (let j = 0; j < this.chunkSideVertices; j++) {", + " for (let i = 0; i < this.chunkSideVertices; i++) {", + " const vertex = j * this.chunkSideVertices + i;", + " positions[vertex * 3] = (firstI + i) * cellSize;", + " positions[vertex * 3 + 1] = (firstJ + j) * cellSize;", + " }", + " }", + " // Skirt vertices are below border vertices.", + " this._forEachSkirtVertex((skirtVertex, borderVertex) => {", + " positions[skirtVertex * 3] = positions[borderVertex * 3];", + " positions[skirtVertex * 3 + 1] = positions[borderVertex * 3 + 1];", + " });", + " const geometry = new THREE.BufferGeometry();", + " geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));", + " geometry.setAttribute('normal', new THREE.BufferAttribute(new Float32Array(this.chunkVertices * 3), 3));", + " geometry.setIndex(getLodIndex(this.chunkCells, LOD_STEPS[0]));", + " geometry.boundingBox = new THREE.Box3();", + " geometry.boundingSphere = new THREE.Sphere();", + " const mesh = new THREE.Mesh(geometry, this.material);", + " mesh.matrixAutoUpdate = false;", + " // Rays hit the ground at its full resolution, whatever the level of", + " // detail drawn, and go through holes.", + " const chunkCells = this.chunkCells;", + " const terrainData = () => this.terrain.data;", + " const localPoint = new THREE.Vector3();", + " mesh.raycast = function (raycaster, intersects) {", + " const drawnIndex = geometry.index;", + " const firstIntersection = intersects.length;", + " geometry.setIndex(getLodIndex(chunkCells, LOD_STEPS[0]));", + " THREE.Mesh.prototype.raycast.call(this, raycaster, intersects);", + " geometry.setIndex(drawnIndex);", + " const data = terrainData();", + " const cellSize = AREA_SIZE / data.resolution;", + " for (let index = intersects.length - 1; index >= firstIntersection; index--) {", + " this.worldToLocal(localPoint.copy(intersects[index].point));", + " if (data.sampleSolidity(localPoint.x / cellSize, localPoint.y / cellSize) < 0.5) {", + " intersects.splice(index, 1);", + " }", + " }", + " };", + " this._setChunkShadowMaterials(mesh);", + " this.group.add(mesh);", + " this.chunks.push({", + " mesh,", + " geometry,", + " firstI,", + " firstJ,", + " center: new THREE.Vector3(", + " (firstI + this.chunkCells / 2) * cellSize,", + " (firstJ + this.chunkCells / 2) * cellSize,", + " 0", + " ),", + " lod: 0,", + " });", + " }", + " }", + " this.updateSamples(new SampleRectangle().set(0, 0, data.resolution, data.resolution), true);", + " this.updateMaterial();", + " }", + "", + " _forEachSkirtVertex(callback) {", + " for (let k = 0; k < this.chunkSideVertices; k++) {", + " callback(this.chunkGridVertices + k, k);", + " callback(this.chunkGridVertices + this.chunkSideVertices + k, this.chunkCells * this.chunkSideVertices + k);", + " callback(this.chunkGridVertices + 2 * this.chunkSideVertices + k, k * this.chunkSideVertices);", + " callback(", + " this.chunkGridVertices + 3 * this.chunkSideVertices + k,", + " k * this.chunkSideVertices + this.chunkCells", + " );", + " }", + " }", + "", + " /**", + " * Skirts go down only to the lowest point a coarser neighbor chunk can", + " * draw along the border, so that they can't be seen through holes.", + " * @param {Float32Array} positions", + " */", + " _updateSkirtHeights(positions) {", + " const coarsestStep = LOD_STEPS[LOD_STEPS.length - 1];", + " const borderVertices = [", + " (k) => k,", + " (k) => this.chunkCells * this.chunkSideVertices + k,", + " (k) => k * this.chunkSideVertices,", + " (k) => k * this.chunkSideVertices + this.chunkCells,", + " ];", + " borderVertices.forEach((borderVertex, border) => {", + " for (let k = 0; k < this.chunkSideVertices; k++) {", + " let minZ = Infinity;", + " const from = Math.max(k - coarsestStep, 0);", + " const to = Math.min(k + coarsestStep, this.chunkCells);", + " for (let other = from; other <= to; other++) {", + " minZ = Math.min(minZ, positions[borderVertex(other) * 3 + 2]);", + " }", + " const skirtVertex = this.chunkGridVertices + border * this.chunkSideVertices + k;", + " positions[skirtVertex * 3 + 2] = minZ;", + " }", + " });", + " }", + "", + " /**", + " * Update the vertices of the chunks sharing the given samples.", + " * @param {SampleRectangle} samples", + " * @param {boolean} hasPaintChanged", + " */", + " updateSamples(samples, hasPaintChanged) {", + " if (samples.isEmpty()) return;", + " const { data } = this.terrain;", + " const cellSize = AREA_SIZE / data.resolution;", + " const slopeFactor = AREA_DEPTH / cellSize;", + " // Normals of samples next to changed ones change too.", + " const minI = Math.max(samples.minI - 1, 0);", + " const minJ = Math.max(samples.minJ - 1, 0);", + " const maxI = Math.min(samples.maxI + 1, data.resolution);", + " const maxJ = Math.min(samples.maxJ + 1, data.resolution);", + " const firstChunkI = Math.max(Math.ceil(minI / this.chunkCells) - 1, 0);", + " const firstChunkJ = Math.max(Math.ceil(minJ / this.chunkCells) - 1, 0);", + " const lastChunkI = Math.min(Math.floor(maxI / this.chunkCells), this.chunksPerSide - 1);", + " const lastChunkJ = Math.min(Math.floor(maxJ / this.chunkCells), this.chunksPerSide - 1);", + "", + " for (let chunkJ = firstChunkJ; chunkJ <= lastChunkJ; chunkJ++) {", + " for (let chunkI = firstChunkI; chunkI <= lastChunkI; chunkI++) {", + " const chunk = this.chunks[chunkJ * this.chunksPerSide + chunkI];", + " const positions = chunk.geometry.attributes.position.array;", + " const normals = chunk.geometry.attributes.normal.array;", + " const fromI = Math.max(minI - chunk.firstI, 0);", + " const toI = Math.min(maxI - chunk.firstI, this.chunkCells);", + " const fromJ = Math.max(minJ - chunk.firstJ, 0);", + " const toJ = Math.min(maxJ - chunk.firstJ, this.chunkCells);", + " for (let j = fromJ; j <= toJ; j++) {", + " const gridJ = chunk.firstJ + j;", + " for (let i = fromI; i <= toI; i++) {", + " const gridI = chunk.firstI + i;", + " const vertex = j * this.chunkSideVertices + i;", + " const sample = gridJ * data.size + gridI;", + " positions[vertex * 3 + 2] = data.heights[sample] * AREA_DEPTH;", + "", + " const leftI = Math.max(gridI - 1, 0);", + " const rightI = Math.min(gridI + 1, data.resolution);", + " const upJ = Math.max(gridJ - 1, 0);", + " const downJ = Math.min(gridJ + 1, data.resolution);", + " const nx =", + " ((data.getHeight(leftI, gridJ) - data.getHeight(rightI, gridJ)) * slopeFactor) /", + " (rightI - leftI);", + " const ny =", + " ((data.getHeight(gridI, upJ) - data.getHeight(gridI, downJ)) * slopeFactor) /", + " (downJ - upJ);", + " const inverseLength = 1 / Math.sqrt(nx * nx + ny * ny + 1);", + " normals[vertex * 3] = nx * inverseLength;", + " normals[vertex * 3 + 1] = ny * inverseLength;", + " normals[vertex * 3 + 2] = inverseLength;", + " }", + " }", + " this._forEachSkirtVertex((skirtVertex, borderVertex) => {", + " for (let axis = 0; axis < 3; axis++) {", + " normals[skirtVertex * 3 + axis] = normals[borderVertex * 3 + axis];", + " }", + " });", + " this._updateSkirtHeights(positions);", + " let maxZ = 0;", + " for (let vertex = 0; vertex < this.chunkGridVertices; vertex++) {", + " maxZ = Math.max(maxZ, positions[vertex * 3 + 2]);", + " }", + " const chunkSize = this.chunkCells * cellSize;", + " chunk.geometry.boundingBox.min.set(chunk.firstI * cellSize, chunk.firstJ * cellSize, 0);", + " chunk.geometry.boundingBox.max.set(", + " chunk.firstI * cellSize + chunkSize,", + " chunk.firstJ * cellSize + chunkSize,", + " maxZ", + " );", + " chunk.geometry.boundingBox.getBoundingSphere(chunk.geometry.boundingSphere);", + " chunk.center.z = maxZ / 2;", + " chunk.geometry.attributes.position.needsUpdate = true;", + " chunk.geometry.attributes.normal.needsUpdate = true;", + " }", + " }", + " if (hasPaintChanged) {", + " // The data may have been replaced by one with the same resolution.", + " this.splatTexture.image.data = data.splat;", + " uploadGridTextureRows(this.splatTexture, samples);", + " this.colorTexture.image.data = data.colors;", + " uploadGridTextureRows(this.colorTexture, samples);", + " }", + " }", + "", + " updateMaterial() {", + " const { object } = this.terrain;", + " const game = object.getRuntimeScene().getGame();", + " const colors = [object._getLayer1Color(), object._getLayer2Color(), object._getLayer3Color(), object._getLayer4Color()];", + " const textures = [", + " object._getLayer1Texture(),", + " object._getLayer2Texture(),", + " object._getLayer3Texture(),", + " object._getLayer4Texture(),", + " ];", + " const normalMaps = [", + " object._getLayer1NormalMap(),", + " object._getLayer2NormalMap(),", + " object._getLayer3NormalMap(),", + " object._getLayer4NormalMap(),", + " ];", + " const anisotropy = Math.max(parseInt(object._getAnisotropy(), 10) || DEFAULT_ANISOTROPY, 1);", + " const heightBlending = clamp01(object._getHeightBlending());", + " const textureVariation = clamp01(object._getTextureVariation());", + " const featureDefines = [];", + " for (let layer = 0; layer < LAYER_COUNT; layer++) {", + " this.uniforms.terrainLayerColors.value[layer].set(gdjs.rgbOrHexStringToNumber(colors[layer]));", + " const layerTexture = getLayerTexture(game, textures[layer], false, anisotropy);", + " this.uniforms['terrainLayerMap' + layer].value = layerTexture;", + " this.uniforms['terrainLayerNormalMap' + layer].value = getLayerTexture(game, normalMaps[layer], true, anisotropy);", + " const averageColor = this.uniforms.terrainLayerAverageColors.value[layer];", + " if (textures[layer]) {", + " featureDefines.push('TERRAIN_LAYER_MAP_' + layer);", + " const linearAverageColor = heightBlending > 0 ? getLinearAverageColor(layerTexture) : null;", + " if (linearAverageColor) {", + " averageColor.copy(linearAverageColor);", + " } else if (heightBlending > 0) {", + " featureDefines.push('TERRAIN_LAYER_MIPMAP_AVERAGE_' + layer);", + " }", + " } else {", + " averageColor.set(1, 1, 1);", + " }", + " if (normalMaps[layer]) featureDefines.push('TERRAIN_LAYER_NORMAL_MAP_' + layer);", + " }", + " if (normalMaps.some((normalMap) => !!normalMap)) featureDefines.push('TERRAIN_NORMAL_MAPS');", + " if (heightBlending > 0) featureDefines.push('TERRAIN_HEIGHT_BLENDING');", + " if (textureVariation > 0) featureDefines.push('TERRAIN_TEXTURE_VARIATION');", + " this.featureDefines = featureDefines;", + " this._updateShaderDefines();", + " this.uniforms.terrainNormalMapStrength.value = Math.max(object._getNormalMapStrength(), 0);", + " this.uniforms.terrainTextureSize.value = Math.max(object._getTextureSize(), 1);", + " this.uniforms.terrainHeightBlending.value = heightBlending;", + " this.uniforms.terrainTextureVariation.value = textureVariation;", + "", + " const cliffLayer = parseInt(object._getCliffLayer(), 10);", + " const cliffAngle = gdjs.toRad(object._getCliffAngle());", + " const cliffBlendAngle = gdjs.toRad(4);", + " this.uniforms.terrainCliffLayer.value.set(", + " cliffLayer === 1 ? 1 : 0,", + " cliffLayer === 2 ? 1 : 0,", + " cliffLayer === 3 ? 1 : 0,", + " cliffLayer === 4 ? 1 : 0", + " );", + " this.uniforms.terrainCliffCosines.value.set(", + " Math.cos(cliffAngle + cliffBlendAngle),", + " Math.cos(cliffAngle - cliffBlendAngle)", + " );", + "", + " const castShadow = object._getCastShadow();", + " const receiveShadow = object._getReceiveShadow();", + " for (const chunk of this.chunks) {", + " chunk.mesh.castShadow = castShadow;", + " chunk.mesh.receiveShadow = receiveShadow;", + " }", + " }", + "", + " /**", + " * Show the brush circle of the editor.", + " * @param {THREE.Vector3 | null} localPosition", + " * @param {number} radius In scene units.", + " */", + " setBrush(localPosition, radius) {", + " const brush = this.uniforms.terrainBrush.value;", + " if (!localPosition) {", + " brush.w = 0;", + " return;", + " }", + " this.group.updateWorldMatrix(true, false);", + " const worldPosition = this._chunkPosition.copy(localPosition).applyMatrix4(this.group.matrixWorld);", + " const worldScale = this.uniforms.terrainWorldScale.value;", + " brush.set(worldPosition.x * worldScale, worldPosition.y * worldScale, radius, 1);", + " }", + "", + " /** @param {THREE.Camera | null} camera */", + " updateLevelsOfDetail(camera) {", + " if (!camera || !this.group.visible) return;", + " const matrixWorld = this.group.matrixWorld;", + " this._cameraPosition.setFromMatrixPosition(camera.matrixWorld);", + " this._scale.setFromMatrixScale(matrixWorld);", + " const cellSize = AREA_SIZE / this.terrain.data.resolution;", + " const chunkWorldSize = this.chunkCells * cellSize * Math.max(this._scale.x, this._scale.y);", + " for (const chunk of this.chunks) {", + " const distance =", + " this._chunkPosition.copy(chunk.center).applyMatrix4(matrixWorld).distanceTo(this._cameraPosition) /", + " chunkWorldSize;", + " let lod = LOD_DISTANCES.length - 1;", + " while (lod > 0 && distance < LOD_DISTANCES[lod]) lod--;", + " if (lod !== chunk.lod) {", + " chunk.lod = lod;", + " chunk.geometry.setIndex(getLodIndex(this.chunkCells, LOD_STEPS[lod]));", + " }", + " }", + " }", + "", + " disposeChunks() {", + " for (const chunk of this.chunks) {", + " chunk.mesh.removeFromParent();", + " // The index is shared by all chunks: it must stay on the GPU.", + " chunk.geometry.setIndex(null);", + " chunk.geometry.dispose();", + " }", + " this.chunks.length = 0;", + " if (this.splatTexture) this.splatTexture.dispose();", + " this.splatTexture = null;", + " if (this.colorTexture) this.colorTexture.dispose();", + " this.colorTexture = null;", + " }", + "", + " dispose() {", + " this.disposeChunks();", + " this.material.dispose();", + " this.depthMaterial.dispose();", + " this.distanceMaterial.dispose();", + " this.group.removeFromParent();", + " }", + "}", + "", + "/**", + " * Makes a Physics3D behavior use a height field shape following the terrain.", + " * Changes of heights are applied to the shape without recreating it.", + " * @implements {gdjs.Physics3DRuntimeBehavior.BodyUpdater}", + " */", + "class TerrainBodyUpdater {", + " /**", + " * @param {Terrain} terrain", + " * @param {gdjs.Physics3DRuntimeBehavior} physics", + " */", + " constructor(terrain, physics) {", + " this.terrain = terrain;", + " this.physics = physics;", + " this.defaultBodyUpdater = physics.bodyUpdater;", + " this.changedSamples = new SampleRectangle();", + " /** @type {Jolt.HeightFieldShape | null} */", + " this.heightField = null;", + " this.heightScale = 1;", + " this.heightsBufferPointer = 0;", + " this.heightsBufferLength = 0;", + " this.bodyX = 0;", + " this.bodyY = 0;", + " this.bodyZ = 0;", + " this.bodyHeight = 0;", + " physics.bodyType = 'Static';", + " physics.bodyUpdater = this;", + " }", + "", + " createShape() {", + " const { data, object } = this.terrain;", + " const worldInvScale = this.physics._sharedData.worldInvScale;", + " const { size } = data;", + " this.heightScale = object.getDepth() * worldInvScale;", + "", + " // Changes of heights (SetHeights) break collisions unless the sample", + " // count is a power of 2: extra samples have no collision.", + " const sampleCount = Math.pow(2, Math.ceil(Math.log2(size)));", + " const settings = new Jolt.HeightFieldShapeSettings();", + " settings.mScale.Set(", + " (object.getWidth() / data.resolution) * worldInvScale,", + " 1,", + " (object.getHeight() / data.resolution) * worldInvScale", + " );", + " settings.mSampleCount = sampleCount;", + " settings.mBlockSize = 4;", + " // Allows later changes of heights on the whole depth of the object.", + " settings.mMinHeightValue = 0;", + " settings.mMaxHeightValue = this.heightScale;", + " settings.mHeightSamples.resize(sampleCount * sampleCount);", + " const samples = new Float32Array(", + " Jolt.HEAPF32.buffer,", + " Jolt.getPointer(settings.mHeightSamples.data()),", + " sampleCount * sampleCount", + " );", + " const noCollision = Jolt.HeightFieldShapeConstantValues.prototype.cNoCollisionValue;", + " samples.fill(noCollision);", + " // Height fields go along X and Z: rows are flipped so that, once", + " // rotated to have heights along Z, rows go along Y.", + " for (let j = 0; j < size; j++) {", + " const row = (size - 1 - j) * sampleCount;", + " for (let i = 0; i < size; i++) {", + " samples[row + i] = this._getSampleHeight(j * size + i, noCollision);", + " }", + " }", + " const shape = settings.Create().Get();", + " Jolt.destroy(settings);", + " this.heightField = Jolt.castObject(shape, Jolt.HeightFieldShape);", + " this.changedSamples.clear();", + " return shape;", + " }", + "", + " /** @returns {number} The height of a sample in the shape, or no collision in a hole. */", + " _getSampleHeight(index, noCollision) {", + " const height = this.terrain.surfaceHeights[index];", + " return Number.isNaN(height) ? noCollision : height * this.heightScale;", + " }", + "", + " _getBodyPosition() {", + " const { object } = this.terrain;", + " const worldInvScale = this.physics._sharedData.worldInvScale;", + " this.bodyX = object.getX();", + " this.bodyY = object.getY();", + " this.bodyZ = object.getZ();", + " // The origin of the height field is at the bottom of the terrain (see createShape).", + " this.bodyHeight = object.getHeight();", + " return this.physics._sharedData.getRVec3(", + " object.getX() * worldInvScale,", + " (object.getY() + object.getHeight()) * worldInvScale,", + " object.getZ() * worldInvScale", + " );", + " }", + "", + " _getBodyRotation() {", + " // A quarter turn around X: heights go along Z.", + " return this.physics._sharedData.getQuat(Math.SQRT1_2, 0, 0, Math.SQRT1_2);", + " }", + "", + " createAndAddBody() {", + " const { physics } = this;", + " const { bodyInterface } = physics._sharedData;", + " const shape = this.createShape();", + " const settings = new Jolt.BodyCreationSettings(", + " shape,", + " this._getBodyPosition(),", + " this._getBodyRotation(),", + " Jolt.EMotionType_Static,", + " physics.getBodyLayer()", + " );", + " settings.mFriction = physics.friction;", + " settings.mRestitution = physics.restitution;", + " const body = bodyInterface.CreateBody(settings);", + " Jolt.destroy(settings);", + " bodyInterface.AddBody(body.GetID(), Jolt.EActivation_DontActivate);", + " return body;", + " }", + "", + " updateObjectFromBody() {", + " // The terrain is static: the body never moves it.", + " }", + "", + " updateBodyFromObject() {", + " const { physics } = this;", + " const body = physics._body;", + " if (!body) return;", + " const { object } = this.terrain;", + " const { bodyInterface } = physics._sharedData;", + " if (", + " object.getX() !== this.bodyX ||", + " object.getY() !== this.bodyY ||", + " object.getZ() !== this.bodyZ ||", + " object.getHeight() !== this.bodyHeight", + " ) {", + " bodyInterface.SetPositionAndRotation(", + " body.GetID(),", + " this._getBodyPosition(),", + " this._getBodyRotation(),", + " Jolt.EActivation_DontActivate", + " );", + " }", + " if (!this.changedSamples.isEmpty()) {", + " this._applyChangedHeights(body);", + " }", + " }", + "", + " _applyChangedHeights(body) {", + " const { data } = this.terrain;", + " const { size } = data;", + " const { minI, minJ, maxI, maxJ } = this.changedSamples;", + " // Jolt only changes blocks of samples. Rows are flipped and extra", + " // samples have no collision (see createShape).", + " const blockSize = this.heightField.GetBlockSize();", + " const sampleCount = this.heightField.GetSampleCount();", + " const alignDown = (value) => Math.floor(value / blockSize) * blockSize;", + " const alignUp = (value) => Math.min(Math.ceil(value / blockSize) * blockSize, sampleCount);", + " const firstX = alignDown(minI);", + " const firstRow = alignDown(size - 1 - maxJ);", + " const width = alignUp(maxI + 1) - firstX;", + " const height = alignUp(size - minJ) - firstRow;", + " if (width * height > this.heightsBufferLength) {", + " if (this.heightsBufferPointer) Jolt._webidl_free(this.heightsBufferPointer);", + " this.heightsBufferLength = width * height;", + " this.heightsBufferPointer = Jolt._webidl_malloc(this.heightsBufferLength * 4);", + " }", + " const heights = new Float32Array(Jolt.HEAPF32.buffer, this.heightsBufferPointer, width * height);", + " const noCollision = Jolt.HeightFieldShapeConstantValues.prototype.cNoCollisionValue;", + " for (let row = 0; row < height; row++) {", + " const j = size - 1 - (firstRow + row);", + " for (let column = 0; column < width; column++) {", + " const i = firstX + column;", + " heights[row * width + column] =", + " i < size && j >= 0 ? this._getSampleHeight(j * size + i, noCollision) : noCollision;", + " }", + " }", + " const sharedData = this.physics._sharedData;", + " this.heightField.SetHeights(", + " firstX,", + " firstRow,", + " width,", + " height,", + " this.heightsBufferPointer,", + " width,", + " sharedData.jolt.GetTempAllocator()", + " );", + " sharedData.bodyInterface.NotifyShapeChanged(", + " body.GetID(),", + " sharedData.getVec3(0, 0, 0),", + " false,", + " Jolt.EActivation_DontActivate", + " );", + " this._wakeUpBodiesOnChangedSamples();", + " this.changedSamples.clear();", + " }", + "", + " /** Bodies sleeping on the changed area would otherwise float or sink. */", + " _wakeUpBodiesOnChangedSamples() {", + " const { object, data } = this.terrain;", + " const worldInvScale = this.physics._sharedData.worldInvScale;", + " const cellWidth = object.getWidth() / data.resolution;", + " const cellHeight = object.getHeight() / data.resolution;", + " const { minI, minJ, maxI, maxJ } = this.changedSamples;", + " const min = new Jolt.Vec3(", + " (object.getX() + (minI - 1) * cellWidth) * worldInvScale,", + " (object.getY() + (minJ - 1) * cellHeight) * worldInvScale,", + " (object.getZ() - 1) * worldInvScale", + " );", + " const max = new Jolt.Vec3(", + " (object.getX() + (maxI + 1) * cellWidth) * worldInvScale,", + " (object.getY() + (maxJ + 1) * cellHeight) * worldInvScale,", + " (object.getZ() + object.getDepth() + 1) * worldInvScale", + " );", + " const box = new Jolt.AABox(min, max);", + " const broadPhaseLayerFilter = new Jolt.BroadPhaseLayerFilter();", + " const objectLayerFilter = new Jolt.ObjectLayerFilter();", + " this.physics._sharedData.bodyInterface.ActivateBodiesInAABox(box, broadPhaseLayerFilter, objectLayerFilter);", + " Jolt.destroy(min);", + " Jolt.destroy(max);", + " Jolt.destroy(box);", + " Jolt.destroy(broadPhaseLayerFilter);", + " Jolt.destroy(objectLayerFilter);", + " }", + "", + " recreateShape() {", + " const body = this.physics._body;", + " if (!body) return;", + " this.physics._sharedData.bodyInterface.SetShape(", + " body.GetID(),", + " this.createShape(),", + " false,", + " Jolt.EActivation_DontActivate", + " );", + " const { resolution } = this.terrain.data;", + " this.changedSamples.set(0, 0, resolution, resolution);", + " this._wakeUpBodiesOnChangedSamples();", + " this.changedSamples.clear();", + " }", + "", + " destroyBody() {", + " this.defaultBodyUpdater.destroyBody();", + " this.heightField = null;", + " }", + "", + " dispose() {", + " if (this.heightsBufferPointer) Jolt._webidl_free(this.heightsBufferPointer);", + " this.heightsBufferPointer = 0;", + " this.heightsBufferLength = 0;", + " }", + "}", + "", + "/** @param {TerrainData} data */", + "const copyTerrainData = (data) => {", + " const copy = new TerrainData(data.resolution);", + " copy.copyFrom(data);", + " return copy;", + "};", + "", + "// Generating a relief or reading an image is long for big terrains, and done", + "// for every instance and every hot-reload: the results are kept.", + "const baseDataCache = new Map();", + "const MAX_CACHED_BASE_DATA = 8;", + "// Changes of the shape of a terrain kept for consumers of its surface that", + "// missed some versions: older changes update the whole surface.", + "const MAX_SURFACE_CHANGES = 64;", + "// Unique among all terrains: a terrain replaced by another one never has its version.", + "let lastGroundVersion = 0;", + "", + "/**", + " * The terrain of a Terrain3D object: its data, how it's drawn and its", + " * surface (for collisions and navigation meshes). Positions are in the scene.", + " */", + "class Terrain {", + " /** @param {gdjs.CustomRuntimeObject3D} object */", + " constructor(object) {", + " this.object = object;", + " /** @type {TerrainData} */", + " this.data = new TerrainData(DEFAULT_RESOLUTION);", + " /** The data before any sculpting or painting, from the relief or heightmap. */", + " this.baseData = this.data;", + " this.renderer = new TerrainRenderer(this);", + " /** @type {TerrainBodyUpdater[]} */", + " this.bodyUpdaters = [];", + " this.changedSamples = new SampleRectangle();", + " this.hasPaintChanged = false;", + " /** Increased each time the ground changes, for objects following it (like grass). */", + " this.version = 0;", + " /** Increased each time the shape of the ground changes (not its paint or position). */", + " this.surfaceVersion = 0;", + " /**", + " * The last changes of the shape of the ground, for `getChangedArea`.", + " * @type {Array<{version: number, samples: SampleRectangle}>}", + " */", + " this.surfaceChanges = [];", + " /** The changes since this version are all in `surfaceChanges`. */", + " this.surfaceChangesStartVersion = 0;", + " this._stroke = { cellWidth: 1, cellHeight: 1, ax: 0, ay: 0, bx: 0, by: 0, radius: 0 };", + " this._strokeChangedSamples = new SampleRectangle();", + " /** The properties the data was loaded from, to reload it only if they change. */", + " this.loadedFrom = '';", + " /** The heightmap image being loaded: the relief is used until it is. */", + " this.loadingHeightmapImage = '';", + " this.isDisposed = false;", + " /** The last value of the sculpt data property read or saved. */", + " this.sculptData = '';", + " /**", + " * Values saved by the editor tools: the editor sends them back with a", + " * hot-reload, possibly after newer ones were saved.", + " * @type {string[]}", + " */", + " this.savedSculptData = [];", + " /** The heights of the surface: the heights of the data, and NaN in holes. */", + " this.surfaceHeights = new Float32Array(0);", + " this.loadFromProperties();", + " this._transform = this._getTransform();", + " getGrounds(object.getRuntimeScene()).add(this);", + " /**", + " * The shape of the ground, for the physics engine and navigation meshes.", + " * @type {gdjs.Surface}", + " */", + " this.surface = {", + " getVersion: () => this.surfaceVersion,", + " getChangedArea: (sinceVersion) => this.getChangedArea(sinceVersion),", + " getTriangles: () => null,", + " getHeightField: () => ({ columns: this.data.size, rows: this.data.size, heights: this.surfaceHeights }),", + " };", + " if (typeof object.setSurface === 'function') {", + " object.setSurface(this.surface);", + " } else if (gdjs.Physics3DRuntimeBehavior) {", + " // Older GDevelop versions don't use surfaces.", + " for (const behavior of object._behaviors) {", + " if (behavior instanceof gdjs.Physics3DRuntimeBehavior) {", + " this.bodyUpdaters.push(new TerrainBodyUpdater(this, behavior));", + " }", + " }", + " }", + " }", + "", + " _getSourceProperties() {", + " const { object } = this;", + " return [", + " object._getResolution(),", + " object._getRelief(),", + " object._getSeed(),", + " object._getHeightmapImage(),", + " object._getEdits(),", + " ].join('|');", + " }", + "", + " loadFromProperties() {", + " const { object } = this;", + " const resolution = parseInt(object._getResolution(), 10);", + " const validResolution = RESOLUTIONS.indexOf(resolution) !== -1 ? resolution : DEFAULT_RESOLUTION;", + " this.sculptData = object._getSculptData();", + " this.loadedFrom = this._getSourceProperties();", + "", + " this.baseData = this._getBaseData(validResolution);", + " let data = codec.decode(this.sculptData, (resolution) => copyTerrainData(this._getBaseData(resolution)));", + " if (data && data.resolution !== validResolution) {", + " data = data.resampled(validResolution);", + " }", + " this.setData(data || copyTerrainData(this.baseData));", + " }", + "", + " /**", + " * @param {number} resolution", + " * @returns {TerrainData} The data from the relief or the heightmap, shared: it must not be changed.", + " */", + " _getBaseData(resolution) {", + " const { object } = this;", + " const key = [resolution, object._getRelief(), object._getSeed(), object._getHeightmapImage(), object._getEdits()].join('|');", + " const cachedData = baseDataCache.get(key);", + " if (cachedData) return cachedData;", + "", + " const data = new TerrainData(resolution);", + " const heightmapImage = object._getHeightmapImage();", + " const isHeightmapLoaded =", + " !!heightmapImage && loadHeightsFromImage(data, object.getRuntimeScene().getGame(), heightmapImage);", + " if (!isHeightmapLoaded) {", + " relief.generate(data, object._getRelief(), object._getSeed());", + " if (heightmapImage) this._reloadOnceLoaded(heightmapImage);", + " }", + " edits.apply(data, object._getEdits());", + " // Not kept if the image is missing: it may be loaded later.", + " if (isHeightmapLoaded || !heightmapImage) baseDataCache.set(key, data);", + " if (baseDataCache.size > MAX_CACHED_BASE_DATA) {", + " baseDataCache.delete(baseDataCache.keys().next().value);", + " }", + " return data;", + " }", + "", + " /** @param {TerrainData} data */", + " setData(data) {", + " this.version = ++lastGroundVersion;", + " this.surfaceVersion = this.version;", + " this.surfaceChanges.length = 0;", + " this.surfaceChangesStartVersion = this.version;", + " const hasSameResolution = data.resolution === this.data.resolution && this.renderer.chunks.length > 0;", + " this.data = data;", + " const allSamples = new SampleRectangle().set(0, 0, data.resolution, data.resolution);", + " this.surfaceHeights = new Float32Array(data.heights.length);", + " this.renderer.setHasHoles(false);", + " this._updateSurfaceHeights(allSamples);", + " if (hasSameResolution) {", + " this.renderer.updateSamples(allSamples, true);", + " } else {", + " this.renderer.rebuild();", + " }", + " for (const bodyUpdater of this.bodyUpdaters) {", + " bodyUpdater.recreateShape();", + " }", + " }", + "", + " onHotReloading() {", + " const sculptData = this.object._getSculptData();", + " const savedIndex = this.savedSculptData.indexOf(sculptData);", + " if (savedIndex !== -1 && this._getSourceProperties() === this.loadedFrom) {", + " // The terrain already has this data, or newer changes.", + " this.savedSculptData.splice(0, savedIndex + 1);", + " } else if (sculptData !== this.sculptData || this._getSourceProperties() !== this.loadedFrom) {", + " this.savedSculptData.length = 0;", + " this.loadFromProperties();", + " }", + " this.renderer.updateMaterial();", + " }", + "", + " /** @returns {string} The data to save in the sculpt data property. */", + " save() {", + " this.sculptData = codec.encode(this.data, this.baseData);", + " this.savedSculptData.push(this.sculptData);", + " return this.sculptData;", + " }", + "", + " getCellWidth() {", + " return this.object.getWidth() / this.data.resolution;", + " }", + "", + " getCellHeight() {", + " return this.object.getHeight() / this.data.resolution;", + " }", + "", + " _toGridX(x) {", + " return (x - this.object.getX()) / this.getCellWidth();", + " }", + "", + " _toGridY(y) {", + " return (y - this.object.getY()) / this.getCellHeight();", + " }", + "", + " /** @returns {number} The Z position of the ground. */", + " getHeightAt(x, y) {", + " return this.object.getZ() + this.data.sampleHeight(this._toGridX(x), this._toGridY(y)) * this.object.getDepth();", + " }", + "", + " /** @returns {number} The angle of the ground with the horizontal, in degrees. */", + " getSlopeAt(x, y) {", + " const gridX = this._toGridX(x);", + " const gridY = this._toGridY(y);", + " const { data } = this;", + " const depth = this.object.getDepth();", + " const slopeX = ((data.sampleHeight(gridX + 0.5, gridY) - data.sampleHeight(gridX - 0.5, gridY)) * depth) / this.getCellWidth();", + " const slopeY = ((data.sampleHeight(gridX, gridY + 0.5) - data.sampleHeight(gridX, gridY - 0.5)) * depth) / this.getCellHeight();", + " return gdjs.toDegrees(Math.atan(Math.hypot(slopeX, slopeY)));", + " }", + "", + " /** @returns {number} The layer painted the most, from 1 to 4. */", + " getLayerAt(x, y) {", + " return this.data.getDominantLayer(this._toGridX(x), this._toGridY(y)) + 1;", + " }", + "", + " /**", + " * @param {number} layer From 1 to 4.", + " * @returns {number} How much the layer is painted, from 0 to 1.", + " */", + " getLayerWeightAt(x, y, layer) {", + " const layerIndex = clampInteger(layer - 1, 0, LAYER_COUNT - 1);", + " return this.data.sampleLayerWeight(this._toGridX(x), this._toGridY(y), layerIndex);", + " }", + "", + " /** @returns {number[]} The painted tint: red, green and blue, from 0 to 255 (white when there is none). */", + " getTintAt(x, y) {", + " const gridX = this._toGridX(x);", + " const gridY = this._toGridY(y);", + " return [0, 1, 2].map((channel) => Math.round(this.data.sampleColor(gridX, gridY, channel) * 255));", + " }", + "", + " /** @returns {number} How wet the ground is, from 0 (dry) to 1, painted or near the water (see the wet shore). */", + " getWetnessAt(x, y) {", + " const paintedWetness = this.data.sampleColor(this._toGridX(x), this._toGridY(y), 3);", + " const { object } = this;", + " if (!object._getWetShore()) return paintedWetness;", + " const fade = Math.max(object._getWetShoreFade(), 0.001);", + " const shoreWetness = clamp01((object._getWetShoreZ() + fade - this.getHeightAt(x, y)) / fade);", + " // Like the smoothstep of the shader.", + " return Math.max(paintedWetness, shoreWetness * shoreWetness * (3 - 2 * shoreWetness));", + " }", + "", + " _isInArea(x, y) {", + " const { object } = this;", + " return (", + " x >= object.getX() &&", + " x <= object.getX() + object.getWidth() &&", + " y >= object.getY() &&", + " y <= object.getY() + object.getHeight()", + " );", + " }", + "", + " /** @returns {boolean} true if the position is above or under the terrain, and not in a hole. */", + " containsPoint(x, y) {", + " return this._isInArea(x, y) && this.data.sampleSolidity(this._toGridX(x), this._toGridY(y)) >= 0.5;", + " }", + "", + " /** @returns {boolean} true if there is a hole in the terrain at the position, like what is drawn. */", + " isHoleAt(x, y) {", + " return this._isInArea(x, y) && this.data.sampleSolidity(this._toGridX(x), this._toGridY(y)) < 0.5;", + " }", + "", + " _getStroke(x1, y1, x2, y2, radius) {", + " const stroke = this._stroke;", + " stroke.cellWidth = this.getCellWidth();", + " stroke.cellHeight = this.getCellHeight();", + " stroke.ax = x1 - this.object.getX();", + " stroke.ay = y1 - this.object.getY();", + " stroke.bx = x2 - this.object.getX();", + " stroke.by = y2 - this.object.getY();", + " stroke.radius = Math.max(radius, 0);", + " return stroke;", + " }", + "", + " /**", + " * @param {SampleRectangle} samples", + " * @param {boolean} haveHeightsChanged false when only the paint changed.", + " */", + " _onSamplesChanged(samples, haveHeightsChanged) {", + " if (samples.isEmpty()) return;", + " this.version = ++lastGroundVersion;", + " this.changedSamples.add(samples);", + " // Painting changes the surface when it makes holes or fills them.", + " const hasSurfaceChanged = this._updateSurfaceHeights(samples);", + " if (!haveHeightsChanged && !hasSurfaceChanged) return;", + " this.surfaceVersion = this.version;", + " this.surfaceChanges.push({ version: this.version, samples: new SampleRectangle().set(samples.minI, samples.minJ, samples.maxI, samples.maxJ) });", + " if (this.surfaceChanges.length > MAX_SURFACE_CHANGES) {", + " this.surfaceChangesStartVersion = this.surfaceChanges.shift().version;", + " }", + " for (const bodyUpdater of this.bodyUpdaters) {", + " bodyUpdater.changedSamples.add(samples);", + " }", + " }", + "", + " /**", + " * @param {SampleRectangle} samples", + " * @returns {boolean} true if heights of the surface changed, or holes were made or filled.", + " */", + " _updateSurfaceHeights(samples) {", + " const { data, surfaceHeights } = this;", + " let hasChanged = false;", + " let hasHoles = false;", + " for (let j = samples.minJ; j <= samples.maxJ; j++) {", + " for (let i = samples.minI; i <= samples.maxI; i++) {", + " const index = j * data.size + i;", + " const isHole = data.isHole(index);", + " const height = isHole ? NaN : data.heights[index];", + " const previousHeight = surfaceHeights[index];", + " if (isHole) {", + " hasHoles = true;", + " if (Number.isNaN(previousHeight)) continue;", + " } else if (height === previousHeight) {", + " continue;", + " }", + " surfaceHeights[index] = height;", + " hasChanged = true;", + " }", + " }", + " // Filled holes keep the shaders drawing holes until the data is loaded again.", + " if (hasHoles) this.renderer.setHasHoles(true);", + " return hasChanged;", + " }", + "", + " /** @param {number} height In scene units, negative to lower the ground. */", + " raise(x1, y1, x2, y2, radius, height) {", + " const samples = this._strokeChangedSamples;", + " brushes.raise(this.data, this._getStroke(x1, y1, x2, y2, radius), height / this.object.getDepth(), samples);", + " this._onSamplesChanged(samples, true);", + " }", + "", + " /** @param {number} z The Z position to flatten the ground to. */", + " /** @param {number} [toZ] The Z position at the end of the segment, for a slope. The same as z by default. */", + " flatten(x1, y1, x2, y2, radius, z, strength, toZ = z) {", + " const samples = this._strokeChangedSamples;", + " const toHeight = (value) => (value - this.object.getZ()) / this.object.getDepth();", + " brushes.flatten(this.data, this._getStroke(x1, y1, x2, y2, radius), toHeight(z), strength, samples, toHeight(toZ));", + " this._onSamplesChanged(samples, true);", + " }", + "", + " smooth(x1, y1, x2, y2, radius, strength) {", + " const samples = this._strokeChangedSamples;", + " brushes.smooth(this.data, this._getStroke(x1, y1, x2, y2, radius), strength, samples);", + " this._onSamplesChanged(samples, true);", + " }", + "", + " /** @param {number} layer From 1 to 4. */", + " paint(x1, y1, x2, y2, radius, layer, strength) {", + " const layerIndex = clampInteger(layer - 1, 0, LAYER_COUNT - 1);", + " const samples = this._strokeChangedSamples;", + " brushes.paint(this.data, this._getStroke(x1, y1, x2, y2, radius), layerIndex, strength, samples);", + " this.hasPaintChanged = true;", + " this._onSamplesChanged(samples, false);", + " }", + "", + " /** @param {number[]} color The red, green and blue (0-255) of the tint: white removes it. */", + " tint(x1, y1, x2, y2, radius, color, strength) {", + " const samples = this._strokeChangedSamples;", + " brushes.tint(this.data, this._getStroke(x1, y1, x2, y2, radius), color, strength, samples);", + " this.hasPaintChanged = true;", + " this._onSamplesChanged(samples, false);", + " }", + "", + " /** @param {number} wetness From 0 (dry) to 1. */", + " wet(x1, y1, x2, y2, radius, wetness, strength) {", + " const samples = this._strokeChangedSamples;", + " brushes.wet(this.data, this._getStroke(x1, y1, x2, y2, radius), wetness, strength, samples);", + " this.hasPaintChanged = true;", + " this._onSamplesChanged(samples, false);", + " }", + "", + " /** Make a hole around a segment (`fillHoles` fills it again). */", + " makeHole(x1, y1, x2, y2, radius) {", + " const samples = this._strokeChangedSamples;", + " brushes.hole(this.data, this._getStroke(x1, y1, x2, y2, radius), samples);", + " this.hasPaintChanged = true;", + " this._onSamplesChanged(samples, false);", + " }", + "", + " /** Fill the holes around a segment with the layers of the ground around them. */", + " fillHoles(x1, y1, x2, y2, radius) {", + " const samples = this._strokeChangedSamples;", + " brushes.fill(this.data, this._getStroke(x1, y1, x2, y2, radius), samples);", + " this.hasPaintChanged = true;", + " this._onSamplesChanged(samples, false);", + " }", + "", + " /**", + " * Make the entrance of a tunnel or a cave: a hole, with the ground in", + " * front of it flattened to the floor of the tunnel.", + " * @param {number} angle The direction going into the ground, in degrees.", + " * @param {number} floorZ", + " * @param {number} length The length of the flat ground in front of the entrance.", + " */", + " carveEntrance(x, y, radius, angle, floorZ, length) {", + " const directionX = Math.cos(gdjs.toRad(angle));", + " const directionY = Math.sin(gdjs.toRad(angle));", + " this.flatten(x - directionX * length, y - directionY * length, x, y, radius * 1.5, floorZ, 1);", + " this.makeHole(x, y, x + directionX * radius, y + directionY * radius, radius);", + " }", + "", + " generate(reliefName, seed) {", + " this.baseData = new TerrainData(this.data.resolution);", + " relief.generate(this.baseData, reliefName, seed);", + " this.setData(copyTerrainData(this.baseData));", + " }", + "", + " loadHeightmap(imageResourceName) {", + " const baseData = new TerrainData(this.data.resolution);", + " if (loadHeightsFromImage(baseData, this.object.getRuntimeScene().getGame(), imageResourceName)) {", + " baseData.splat.set(this.data.splat);", + " baseData.colors.set(this.data.colors);", + " this.baseData = baseData;", + " this.setData(copyTerrainData(baseData));", + " }", + " }", + "", + " /** @param {gdjs.RuntimeObject[]} objects */", + " placeOnGround(objects) {", + " for (const object of objects) {", + " if (object === this.object || !gdjs.Base3DHandler.is3D(object)) continue;", + " const groundZ = this.getHeightAt(object.getCenterXInScene(), object.getCenterYInScene());", + " // The origin of the object is not always at its bottom.", + " object.setZ(groundZ + object.getZ() - object.getUnrotatedAABBMinZ());", + " }", + " }", + "", + " /**", + " * @returns {THREE.Vector3 | null} The point of the ground under the cursor,", + " * in the terrain group coordinates. Holes are hit too, so that brushes can fill them.", + " */", + " raycastFromCursor(game, raycaster, ndc) {", + " const camera = getCamera(this.object);", + " if (!camera) return null;", + " const inputManager = game.getInputManager();", + " ndc.set(", + " (inputManager.getCursorX() / game.getGameResolutionWidth()) * 2 - 1,", + " -(inputManager.getCursorY() / game.getGameResolutionHeight()) * 2 + 1", + " );", + " raycaster.setFromCamera(ndc, camera);", + " this.renderer.group.updateWorldMatrix(true, false);", + " const ray = raycaster.ray.clone().applyMatrix4(this.renderer.group.matrixWorld.clone().invert());", + " ray.direction.normalize();", + "", + " const box = new THREE.Box3(new THREE.Vector3(0, 0, 0), new THREE.Vector3(AREA_SIZE, AREA_SIZE, AREA_DEPTH));", + " const entry = box.containsPoint(ray.origin) ? ray.origin.clone() : ray.intersectBox(box, new THREE.Vector3());", + " if (!entry) return null;", + " const cellSize = AREA_SIZE / this.data.resolution;", + " const groundZAt = (point) => this.data.sampleHeight(point.x / cellSize, point.y / cellSize) * AREA_DEPTH;", + " const step = cellSize / 2;", + " const point = entry.clone();", + " const previousPoint = entry.clone();", + " for (let distance = 0; distance < AREA_SIZE * 2; distance += step) {", + " if (point.z <= groundZAt(point)) {", + " // Refine between the last point above the ground and this one.", + " for (let iteration = 0; iteration < 8; iteration++) {", + " const middle = previousPoint.clone().lerp(point, 0.5);", + " if (middle.z <= groundZAt(middle)) point.copy(middle);", + " else previousPoint.copy(middle);", + " }", + " return point;", + " }", + " if (!box.containsPoint(point)) return null;", + " previousPoint.copy(point);", + " point.addScaledVector(ray.direction, step);", + " }", + " return null;", + " }", + "", + " /**", + " * @param {THREE.Vector3} localPosition In the terrain group coordinates (like from `raycastFromCursor`).", + " * @returns {{x: number, y: number, z: number}} The position in the scene.", + " */", + " toScenePosition(localPosition) {", + " const { object } = this;", + " return {", + " x: object.getX() + (localPosition.x / AREA_SIZE) * object.getWidth(),", + " y: object.getY() + (localPosition.y / AREA_SIZE) * object.getHeight(),", + " z: object.getZ() + (localPosition.z / AREA_DEPTH) * object.getDepth(),", + " };", + " }", + "", + " /** Draw the changes of the ground (collisions are updated by the physics engine). */", + " applyChanges() {", + " this.renderer.updateSamples(this.changedSamples, this.hasPaintChanged);", + " this.changedSamples.clear();", + " this.hasPaintChanged = false;", + " }", + "", + " /** @returns {number} A number changing each time the ground changes (see `getGrounds`). */", + " getVersion() {", + " return this.version;", + " }", + "", + " /**", + " * @param {number} sinceVersion", + " * @returns {gdjs.SurfaceArea | null} The part of the ground whose shape changed since the version (see `gdjs.Surface`).", + " */", + " getChangedArea(sinceVersion) {", + " if (sinceVersion < this.surfaceChangesStartVersion) return null;", + " const samples = new SampleRectangle();", + " for (const change of this.surfaceChanges) {", + " if (change.version > sinceVersion) samples.add(change.samples);", + " }", + " if (samples.isEmpty()) return { minX: 0, minY: 0, maxX: 0, maxY: 0 };", + " const { resolution } = this.data;", + " return {", + " minX: samples.minI / resolution,", + " minY: samples.minJ / resolution,", + " maxX: samples.maxI / resolution,", + " maxY: samples.maxJ / resolution,", + " };", + " }", + "", + " _getTransform() {", + " const { object } = this;", + " return [object.getX(), object.getY(), object.getZ(), object.getWidth(), object.getHeight(), object.getDepth()].join(',');", + " }", + "", + " /** @param {string} imageResourceName A heightmap image that is not loaded yet. */", + " _reloadOnceLoaded(imageResourceName) {", + " if (this.loadingHeightmapImage === imageResourceName) return;", + " this.loadingHeightmapImage = imageResourceName;", + " const game = this.object.getRuntimeScene().getGame();", + " game.getImageManager()", + " .loadResource(imageResourceName)", + " .then(() => {", + " if (this.isDisposed || this.loadingHeightmapImage !== imageResourceName) return;", + " this.loadingHeightmapImage = '';", + " if (getLoadedImage(game, imageResourceName)) this.loadFromProperties();", + " })", + " .catch(() => {});", + " }", + "", + " update() {", + " const transform = this._getTransform();", + " if (transform !== this._transform) {", + " this._transform = transform;", + " this.version = ++lastGroundVersion;", + " }", + " this.applyChanges();", + " this.renderer.uniforms.terrainWorldScale.value = getWorldScale(this.object);", + " this._updateWetShore();", + " this.renderer.updateLevelsOfDetail(getCamera(this.object));", + " }", + "", + " _updateWetShore() {", + " const { object } = this;", + " // In the coordinates of the terrain group, like the vertices.", + " const depthScale = AREA_DEPTH / Math.max(object.getDepth(), 0.0001);", + " this.renderer.uniforms.terrainWetShore.value.set(", + " (object._getWetShoreZ() - object.getZ()) * depthScale,", + " Math.max(object._getWetShoreFade(), 0.001) * depthScale,", + " object._getWetShore() ? 1 : 0", + " );", + " }", + "", + " dispose() {", + " this.isDisposed = true;", + " getGrounds(this.object.getRuntimeScene()).delete(this);", + " if (typeof this.object.setSurface === 'function' && this.object.getSurface() === this.surface) {", + " this.object.setSurface(null);", + " }", + " this.renderer.dispose();", + " for (const bodyUpdater of this.bodyUpdaters) {", + " bodyUpdater.dispose();", + " }", + " }", + "}", + "", + "/**", + " * @param {gdjs.RuntimeObject} object", + " * @returns {number} The number of scene units by 3D world unit (1 in GDevelop versions before the world scale).", + " */", + "const getWorldScale = (object) => {", + " const scene = object.getRuntimeScene();", + " return typeof scene.getRenderer3DWorldScale === 'function' ? scene.getRenderer3DWorldScale() : 1;", + "};", + "", + "/**", + " * @param {gdjs.RuntimeObject} object", + " * @returns {THREE.Camera | null} The camera of the scene layer showing the object. Layers of custom objects", + " * have no camera: the one of the scene layer of the custom object containing the object is used.", + " */", + "const getCamera = (object) => {", + " let container = object.getInstanceContainer();", + " while (container instanceof gdjs.CustomRuntimeObjectInstanceContainer) {", + " object = container.getOwner();", + " container = object.getInstanceContainer();", + " }", + " const camera = container.getLayer(object.getLayer()).getRenderer().getThreeCamera();", + " // The matrix of the camera is otherwise only updated when the scene is drawn: it would be the one of the previous frame.", + " if (camera) camera.updateMatrixWorld();", + " return camera;", + "};", + "", + "/** @type {WeakMap} */", + "const averageColors = new WeakMap();", + "let white = null;", + "/**", + " * @param {THREE.Texture} texture", + " * @returns {THREE.Color} The average color of the texture (white when it can't be read).", + " */", + "const getAverageColor = (texture) => {", + " const linearAverageColor = getLinearAverageColor(texture);", + " if (!linearAverageColor) return white || (white = new THREE.Color(1, 1, 1));", + " let color = averageColors.get(linearAverageColor);", + " if (!color) {", + " color = new THREE.Color(linearAverageColor.x, linearAverageColor.y, linearAverageColor.z);", + " averageColors.set(linearAverageColor, color);", + " }", + " return color;", + "};", + "", + "const svgIcon = (content) =>", + " 'data:image/svg+xml,' +", + " encodeURIComponent('' + content + '');", + "const strokes = 'fill=\"none\" stroke=\"#000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"';", + "const toolIcons = {", + " Raise: svgIcon(''),", + " Lower: svgIcon(''),", + " Smooth: svgIcon(''),", + " Flatten: svgIcon(''),", + " Size: svgIcon(''),", + " Strength: svgIcon(''),", + " Undo: svgIcon(''),", + " Hole: svgIcon(''),", + " FillHoles: svgIcon(''),", + " Wetness: svgIcon(''),", + "};", + "// Tints for the color brush when the editor has no color picker (older GDevelop versions).", + "const tintPresets = ['#e2c879', '#a5c45a', '#8a6a48', '#c98a62', '#9a9a92', '#ffffff'];", + "", + "/**", + " * The sculpt and paint tools shown in the scene editor when a terrain is", + " * selected. Without the needed editor functions (older GDevelop versions),", + " * nothing is shown: the terrain can still be changed with events.", + " */", + "class TerrainEditorTools {", + " constructor() {", + " /** '' when no brush is used. */", + " this.toolName = '';", + " this.sizePercent = 30;", + " this.strengthPercent = 50;", + " /** @type {Terrain | null} */", + " this.terrain = null;", + " /** @type {gdjs.InGameEditor | null} */", + " this.editor = null;", + " this.isStroking = false;", + " this.flattenHeight = 0;", + " /** The color of the \"Tint\" brush, as \"#rrggbb\". */", + " this.tintColor = tintPresets[0];", + " this.wetnessPercent = 100;", + " this.lastStrokeTime = 0;", + " /** @type {{data: TerrainData, baseData: TerrainData}[]} */", + " this.undoSteps = [];", + " this.raycaster = new THREE.Raycaster();", + " this.ndc = new THREE.Vector2();", + " this._swatchColor = new THREE.Color();", + " }", + "", + " /** @param {gdjs.InGameEditor} editor */", + " update(editor) {", + " if (typeof editor.showToolbar !== 'function') {", + " // Older GDevelop versions: the terrain can only be changed with events.", + " return;", + " }", + " this.editor = editor;", + " const selectedObjects = editor.getSelectedObjects();", + " const terrain =", + " selectedObjects.length === 1 && selectedObjects[0].__terrain3D ? selectedObjects[0].__terrain3D : null;", + " if (terrain !== this.terrain) {", + " this._endStroke();", + " if (this.terrain) this.terrain.renderer.setBrush(null, 0);", + " this.terrain = terrain;", + " this.undoSteps.length = 0;", + " }", + " if (terrain) editor.showToolbar('Terrain3D', this._getToolbarItems(terrain));", + " const game = editor.getRuntimeGame();", + " if (!terrain || !this.toolName) {", + " if (terrain) terrain.renderer.setBrush(null, 0);", + " return;", + " }", + "", + " const inputManager = game.getInputManager();", + " if (inputManager.wasKeyJustPressed(gdjs.evtTools.input.keysNameToCode.Escape)) {", + " this._endStroke();", + " this.toolName = '';", + " terrain.renderer.setBrush(null, 0);", + " return;", + " }", + " editor.captureLeftMouseButton();", + " const hit = terrain.raycastFromCursor(game, this.raycaster, this.ndc);", + " const radius = this._getRadius();", + " terrain.renderer.setBrush(hit, radius);", + "", + " // Older GDevelop versions don't have it.", + " const isPressedForTool =", + " typeof editor.isCapturedLeftMouseButtonPressed === 'function'", + " ? editor.isCapturedLeftMouseButtonPressed()", + " : inputManager.isMouseButtonPressed(0);", + " // The button is released outside the canvas when the mouse is on a toolbar.", + " const isPressed = isPressedForTool && inputManager.isMouseInsideCanvas();", + " if (isPressed && hit && !this.isStroking) {", + " this._startStroke(terrain, hit);", + " }", + " if (this.isStroking && isPressed && hit) {", + " this._applyBrush(terrain, hit, radius);", + " }", + " if (!isPressed) {", + " this._endStroke();", + " }", + " }", + "", + " _getRadius() {", + " const { object } = this.terrain;", + " const maxRadius = Math.max(object.getWidth(), object.getHeight()) / 4;", + " return Math.max(maxRadius * Math.pow(this.sizePercent / 100, 2), this.terrain.getCellWidth());", + " }", + "", + " _startStroke(terrain, hit) {", + " this.isStroking = true;", + " this.lastStrokeTime = performance.now();", + " this.flattenHeight = terrain.toScenePosition(hit).z;", + " this.undoSteps.push({ data: copyTerrainData(terrain.data), baseData: terrain.baseData });", + " const maxUndoSteps = Math.max(Math.floor(UNDO_STEPS_SAMPLES / terrain.data.heights.length), 2);", + " while (this.undoSteps.length > maxUndoSteps) this.undoSteps.shift();", + " }", + "", + " _endStroke() {", + " if (!this.isStroking) return;", + " this.isStroking = false;", + " this._save();", + " }", + "", + " _applyBrush(terrain, hit, radius) {", + " const now = performance.now();", + " const elapsedSeconds = Math.min((now - this.lastStrokeTime) / 1000, 0.1);", + " this.lastStrokeTime = now;", + " const { x, y } = terrain.toScenePosition(hit);", + " const amount = (this.strengthPercent / 100) * elapsedSeconds;", + " const depth = terrain.object.getDepth();", + " if (this.toolName === 'Raise') terrain.raise(x, y, x, y, radius, amount * depth * 0.5);", + " else if (this.toolName === 'Lower') terrain.raise(x, y, x, y, radius, -amount * depth * 0.5);", + " else if (this.toolName === 'Smooth') terrain.smooth(x, y, x, y, radius, amount * 10);", + " else if (this.toolName === 'Flatten') terrain.flatten(x, y, x, y, radius, this.flattenHeight, amount * 10);", + " else if (this.toolName.startsWith('Paint')) {", + " terrain.paint(x, y, x, y, radius, parseInt(this.toolName.slice(5), 10), amount * 8);", + " } else if (this.toolName === 'Hole') {", + " terrain.makeHole(x, y, x, y, radius);", + " } else if (this.toolName === 'FillHoles') {", + " terrain.fillHoles(x, y, x, y, radius);", + " } else if (this.toolName === 'Tint') {", + " terrain.tint(x, y, x, y, radius, gdjs.rgbOrHexToRGBColor(this.tintColor), amount * 8);", + " } else if (this.toolName === 'Wetness') {", + " terrain.wet(x, y, x, y, radius, this.wetnessPercent / 100, amount * 8);", + " }", + " // Drawn now, as the terrain was updated earlier in this frame.", + " terrain.applyChanges();", + " }", + "", + " _save() {", + " const { terrain, editor } = this;", + " if (!terrain || !editor) return;", + " editor.updateObjectProperties(terrain.object.getName(), { SculptData: terrain.save() });", + " }", + "", + " _undo() {", + " const undoStep = this.undoSteps.pop();", + " // The relief, the edits or the resolution may have changed since the stroke.", + " if (!this.terrain || !undoStep || undoStep.baseData !== this.terrain.baseData) {", + " this.undoSteps.length = 0;", + " return;", + " }", + " this.terrain.setData(undoStep.data);", + " this._save();", + " }", + "", + " /** @returns {Array} The settings of the tint or wetness brush, when it's used. */", + " _getColorToolItems() {", + " const { editor } = this;", + " if (this.toolName === 'Tint') {", + " if (editor && typeof editor.isToolbarItemTypeSupported === 'function' && editor.isToolbarItemTypeSupported('color')) {", + " return [", + " {", + " type: 'color',", + " id: 'TintColor',", + " tooltip: 'Color of the tint',", + " value: this.tintColor,", + " onChange: (color) => (this.tintColor = color),", + " },", + " ];", + " }", + " return tintPresets.map((color) => ({", + " type: 'button',", + " id: 'TintPreset' + color,", + " tooltip: color === '#ffffff' ? 'No tint' : 'Tint with this color',", + " color,", + " isActive: this.tintColor === color,", + " onClick: () => (this.tintColor = color),", + " }));", + " }", + " if (this.toolName === 'Wetness') {", + " return [", + " {", + " type: 'slider',", + " id: 'WetnessAmount',", + " tooltip: 'Wetness',", + " iconUrl: toolIcons.Wetness,", + " min: 0,", + " max: 100,", + " value: this.wetnessPercent,", + " onChange: (value) => (this.wetnessPercent = value),", + " },", + " ];", + " }", + " return [];", + " }", + "", + " /**", + " * @param {Terrain} terrain", + " * @returns {Array} The toolbar for the current state (the editor only", + " * updates what changed).", + " */", + " _getToolbarItems(terrain) {", + " const { object } = terrain;", + " const toolButton = (toolName, tooltip, color) => ({", + " type: 'button',", + " id: toolName,", + " tooltip,", + " iconUrl: toolIcons[toolName],", + " color,", + " isActive: this.toolName === toolName,", + " onClick: () => (this.toolName = this.toolName === toolName ? '' : toolName),", + " });", + " const layerColors = [object._getLayer1Color(), object._getLayer2Color(), object._getLayer3Color(), object._getLayer4Color()];", + " // Layers are shown with their color, tinting their texture.", + " const swatchColors = layerColors.map((color, index) =>", + " this._swatchColor", + " .set(gdjs.rgbOrHexStringToNumber(color))", + " .multiply(getAverageColor(terrain.renderer.uniforms['terrainLayerMap' + index].value))", + " .getHexString()", + " );", + " return [", + " toolButton('Raise', 'Raise the ground (drag on the terrain)'),", + " toolButton('Lower', 'Lower the ground'),", + " toolButton('Smooth', 'Smooth the ground'),", + " toolButton('Flatten', 'Flatten the ground to the height where the drag starts'),", + " { type: 'divider', id: 'PaintDivider' },", + " ...swatchColors.map((swatchColor, index) =>", + " toolButton('Paint' + (index + 1), 'Paint layer ' + (index + 1), '#' + swatchColor)", + " ),", + " toolButton('Hole', 'Make a hole, for the entrance of a tunnel or a cave'),", + " toolButton('FillHoles', 'Fill holes, with the layers of the ground around them'),", + " { type: 'divider', id: 'ColorDivider' },", + " toolButton('Tint', 'Tint the ground (white removes the tint)', this.tintColor),", + " toolButton('Wetness', 'Make the ground wet, or dry with a wetness of 0'),", + " ...this._getColorToolItems(),", + " { type: 'divider', id: 'BrushDivider' },", + " {", + " type: 'slider',", + " id: 'Size',", + " tooltip: 'Brush size',", + " iconUrl: toolIcons.Size,", + " min: 1,", + " max: 100,", + " value: this.sizePercent,", + " onChange: (value) => (this.sizePercent = value),", + " },", + " {", + " type: 'slider',", + " id: 'Strength',", + " tooltip: 'Brush strength',", + " iconUrl: toolIcons.Strength,", + " min: 5,", + " max: 100,", + " value: this.strengthPercent,", + " onChange: (value) => (this.strengthPercent = value),", + " },", + " { type: 'button', id: 'Undo', tooltip: 'Undo the last stroke on this terrain', iconUrl: toolIcons.Undo, onClick: () => this._undo() },", + " ];", + " }", + "}", + "", + "const editorTools = new TerrainEditorTools();", + "if (gdjs.registerInGameEditorPostStepCallback) {", + " gdjs.registerInGameEditorPostStepCallback((editor) => editorTools.update(editor));", + "}", + "", + "gdjs.__terrain3DExtension = {", + " Terrain,", + " // Used by the terrain grass and the scattered models.", + " getWorldScale,", + " getCamera,", + " getGrounds,", + " patchShaderCode,", + " createRandom,", + " findHighestGround,", + " GroundPlacement,", + " svgIcon,", + " toolIcons,", + " // Exposed for tests.", + " TerrainBodyUpdater,", + " TerrainData,", + " SampleRectangle,", + " brushes,", + " edits,", + " codec,", + " relief,", + "};" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Define grass helper classes JavaScript code.", + "fullName": "Define grass helper classes", + "functionType": "Action", + "name": "DefineGrassHelperClasses", + "private": true, + "sentence": "Define grass helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (gdjs.__terrainGrassExtension) {", + " return;", + "}", + "// Blades grow on the grounds of the scene: the 3D terrains (see `getGrounds`", + "// in the terrain helper).", + "", + "// Size of the object inner area: instances are scaled from it.", + "const AREA_SIZE = 1000;", + "const AREA_DEPTH = 40;", + "const CHUNK_SIZE = 500;", + "// Blades are placed around the camera as it moves: at most this number by frame, to avoid slowing down the game.", + "const MAX_BLADES_PLACED_BY_FRAME = 36000;", + "const MAX_BENDING_OBJECTS = 8;", + "", + "/**", + " * A blade: a thin, tapered strip. Its width and height are 1: blades are", + " * scaled by the shader.", + " */", + "const createBladeGeometry = () => {", + " const halfWidths = [0.5, 0.42, 0.28, 0];", + " const heights = [0, 0.35, 0.7, 1];", + " const positions = [];", + " halfWidths.forEach((halfWidth, level) => {", + " positions.push(-halfWidth, 0, heights[level]);", + " if (halfWidth > 0) positions.push(halfWidth, 0, heights[level]);", + " });", + " const indices = [0, 1, 2, 1, 3, 2, 2, 3, 4, 3, 5, 4, 4, 5, 6];", + " const geometry = new THREE.InstancedBufferGeometry();", + " geometry.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));", + " geometry.setAttribute('normal', new THREE.Float32BufferAttribute(new Array(positions.length).fill(0), 3));", + " geometry.setIndex(indices);", + " return geometry;", + "};", + "", + "const vertexShaderDeclarations = `", + "attribute vec4 grassRoot;", + "attribute vec2 grassShape;", + "// The tint of the ground at the root (linear, from 0 to 1).", + "attribute vec3 grassGroundTint;", + "uniform mat3 grassWorldToLocal;", + "uniform float grassWorldScale;", + "uniform float grassBladeWidth;", + "uniform float grassTime;", + "uniform float grassWindStrength;", + "uniform float grassWindSpeed;", + "uniform vec4 grassBenders[${MAX_BENDING_OBJECTS}];", + "uniform vec3 grassBaseColor;", + "uniform vec3 grassTipColor;", + "varying vec3 vGrassColor;", + "`;", + "const vertexShaderPosition = `", + "// Blades are shaped in scene units (with Y flipped like the 3D world), then", + "// moved back in the (scaled) object space.", + "float bladeHeight = position.z;", + "float grassAngle = grassRoot.w;", + "float bladeWidth = position.x * grassBladeWidth;", + "vec3 blade = vec3(", + " bladeWidth * cos(grassAngle),", + " bladeWidth * sin(grassAngle),", + " bladeHeight * grassShape.x", + ");", + "vec3 rootWorld = (modelMatrix * vec4(grassRoot.xyz, 1.0)).xyz * grassWorldScale;", + "// Tips bend more than the base.", + "float bendFactor = bladeHeight * bladeHeight * grassShape.x;", + "float gust = sin(grassTime * grassWindSpeed + rootWorld.x * 0.013 + rootWorld.y * 0.011);", + "float flutter = sin(grassTime * grassWindSpeed * 2.7 + grassShape.y * 40.0) * 0.3;", + "blade.xy += vec2(0.8, 0.5) * (gust + flutter + 0.6) * grassWindStrength * 0.35 * bendFactor;", + "for (int i = 0; i < ${MAX_BENDING_OBJECTS}; i++) {", + " vec4 bender = grassBenders[i];", + " if (bender.z <= 0.0) continue;", + " vec2 away = rootWorld.xy - bender.xy;", + " float distanceToBender = length(away);", + " float push = 1.0 - smoothstep(bender.z * 0.3, bender.z, distanceToBender);", + " if (push > 0.0) {", + " blade.xy += normalize(away + vec2(0.001)) * push * bendFactor * 0.9;", + " blade.z *= 1.0 - push * 0.5;", + " }", + "}", + "vec3 transformed = grassRoot.xyz + grassWorldToLocal * (blade / grassWorldScale);", + "vGrassColor = mix(grassBaseColor, grassTipColor, bladeHeight) * (0.85 + 0.3 * grassShape.y) * grassGroundTint;", + "`;", + "const vertexShaderNormal = `", + "// Blades are lit like the ground below them.", + "transformedNormal = normalize((viewMatrix * vec4(0.0, 0.0, 1.0, 0.0)).xyz);", + "`;", + "const fragmentShaderDeclarations = `", + "varying vec3 vGrassColor;", + "`;", + "const fragmentShaderColor = `", + "diffuseColor.rgb *= vGrassColor;", + "`;", + "// Both faces of blades are lit like the ground (not flipped for back faces).", + "const fragmentShaderNormal = `", + "#include ", + "normal = normalize(vNormal);", + "nonPerturbedNormal = normal;", + "`;", + "", + "const { getWorldScale, patchShaderCode, createRandom, findHighestGround, GroundPlacement } = gdjs.__terrain3DExtension;", + "", + "/** @typedef {{mesh: THREE.Mesh, blades: number, center: THREE.Vector3}} GrassChunk */", + "", + "/**", + " * The grass of a terrain grass object: blades drawn with GPU instancing, in chunks", + " * that are hidden when off-screen and thinned out with the distance. They grow", + " * on the grounds below, like 3D terrains (only where a given layer is painted).", + " */", + "class Grass {", + " /** @param {gdjs.CustomRuntimeObject3D} object */", + " constructor(object) {", + " this.object = object;", + " this.group = new THREE.Group();", + " object.get3DRendererObject().add(this.group);", + " this.bladeGeometry = createBladeGeometry();", + " /**", + " * The chunks with blades placed, by index in the grid of chunks (null when no blade grows in a chunk).", + " * @type {Map}", + " */", + " this.chunks = new Map();", + " /** @type {Array<{chunkX: number, chunkY: number, distance: number}>} */", + " this._missingChunks = [];", + " this._placeWithoutLimit = true;", + " this.placement = new GroundPlacement(object.getRuntimeScene());", + " this._groundAtBlade = { ground: null, z: 0 };", + " this.uniforms = {", + " grassWorldToLocal: { value: new THREE.Matrix3() },", + " // Scene units by 3D world unit.", + " grassWorldScale: { value: 1 },", + " grassBladeWidth: { value: 1 },", + " grassTime: { value: 0 },", + " grassWindStrength: { value: 1 },", + " grassWindSpeed: { value: 1 },", + " grassBenders: { value: Array.from({ length: MAX_BENDING_OBJECTS }, () => new THREE.Vector4()) },", + " grassBaseColor: { value: new THREE.Color() },", + " grassTipColor: { value: new THREE.Color() },", + " };", + " this.material = new THREE.MeshStandardMaterial({ roughness: 1, metalness: 0, side: THREE.DoubleSide });", + " this.material.onBeforeCompile = (shader) => {", + " Object.assign(shader.uniforms, this.uniforms);", + " shader.vertexShader = patchShaderCode(shader.vertexShader, [", + " ['#include ', '#include \\n' + vertexShaderDeclarations],", + " ['#include ', vertexShaderPosition],", + " ['#include ', '#include \\n' + vertexShaderNormal],", + " ], 'TerrainGrass');", + " shader.fragmentShader = patchShaderCode(shader.fragmentShader, [", + " ['#include ', '#include \\n' + fragmentShaderDeclarations],", + " ['#include ', '#include \\n' + fragmentShaderColor],", + " ['#include ', fragmentShaderNormal],", + " ], 'TerrainGrass');", + " };", + " this.material.customProgramCacheKey = () => 'TerrainGrass';", + "", + " this._matrix = new THREE.Matrix4();", + " this._cameraPosition = new THREE.Vector3();", + " this._chunkPosition = new THREE.Vector3();", + " this._scale = new THREE.Vector3();", + " this.updateFromProperties();", + " }", + "", + " updateFromProperties() {", + " const { object } = this;", + " this.uniforms.grassBaseColor.value.set(gdjs.rgbOrHexStringToNumber(object._getBaseColor()));", + " this.uniforms.grassTipColor.value.set(gdjs.rgbOrHexStringToNumber(object._getTipColor()));", + " this.uniforms.grassWindStrength.value = object._getWindStrength();", + " this.uniforms.grassWindSpeed.value = object._getWindSpeed();", + " this.uniforms.grassBladeWidth.value = Math.max(object._getBladeWidth(), 0);", + " this.material.needsUpdate = true;", + " this.placement.placeAgain();", + " }", + "", + " _getPlacementKey() {", + " const { object } = this;", + " return [", + " object.getX(), object.getY(), object.getZ(), object.getWidth(), object.getHeight(), object.getDepth(),", + " object._getDensity(), object._getBladeHeight(), object._getGroundLayer(), object._getMaxSlope(),", + " object._getSeed(),", + " ].join('|');", + " }", + "", + " _getBladesPerChunk() {", + " return Math.round((Math.max(this.object._getDensity(), 0) * CHUNK_SIZE * CHUNK_SIZE) / 10000);", + " }", + "", + " _removeChunks() {", + " for (const chunk of this.chunks.values()) {", + " if (!chunk) continue;", + " chunk.mesh.removeFromParent();", + " chunk.mesh.geometry.dispose();", + " }", + " this.chunks.clear();", + " }", + "", + " /** Place the blades again, for example after the ground or the object changed. */", + " rebuild() {", + " this._removeChunks();", + " this._placeWithoutLimit = true;", + " }", + "", + " /**", + " * Place the blades of a chunk. Each chunk has its own random numbers: its blades are the same every time.", + " * @returns {GrassChunk | null} null when no blade grows in the chunk.", + " */", + " _placeChunk(chunkX, chunkY) {", + " const grounds = Array.from(this.placement.grounds);", + " const { object } = this;", + " const width = object.getWidth();", + " const height = object.getHeight();", + " const scaleX = width / AREA_SIZE;", + " const scaleY = height / AREA_SIZE;", + " const scaleZ = Math.max(object.getDepth() / AREA_DEPTH, 0.0001);", + " const groundLayer = parseInt(object._getGroundLayer(), 10) || 0;", + " const maxSlope = object._getMaxSlope();", + " const bladeHeight = Math.max(object._getBladeHeight(), 0);", + " const bladesPerChunk = this._getBladesPerChunk();", + " const nextRandom = createRandom(", + " ((object._getSeed() * 7919 + 1) ^ Math.imul(chunkX + 1, 73856093) ^ Math.imul(chunkY + 1, 19349663)) >>> 0", + " );", + "", + " const roots = new Float32Array(bladesPerChunk * 4);", + " const shapes = new Float32Array(bladesPerChunk * 2);", + " const groundTints = new Uint8Array(bladesPerChunk * 3).fill(255);", + " let blades = 0;", + " let minZ = Infinity;", + " let maxZ = -Infinity;", + " for (let attempt = 0; attempt < bladesPerChunk; attempt++) {", + " // In scene units, relative to the object.", + " const x = (chunkX + nextRandom()) * CHUNK_SIZE;", + " const y = (chunkY + nextRandom()) * CHUNK_SIZE;", + " const angle = nextRandom() * Math.PI * 2;", + " const heightFactor = 0.6 + 0.8 * nextRandom();", + " const tint = nextRandom();", + " const growth = nextRandom();", + " if (x > width || y > height) continue;", + " const sceneX = object.getX() + x;", + " const sceneY = object.getY() + y;", + " const { ground, z } = findHighestGround(grounds, sceneX, sceneY, this._groundAtBlade);", + " const groundZ = ground ? z : object.getZ();", + " if (ground) {", + " if (groundLayer > 0 && growth > ground.getLayerWeightAt(sceneX, sceneY, groundLayer)) continue;", + " if (ground.getSlopeAt(sceneX, sceneY) > maxSlope) continue;", + " if (typeof ground.getTintAt === 'function') {", + " const tint = ground.getTintAt(sceneX, sceneY);", + " for (let channel = 0; channel < 3; channel++) {", + " groundTints[blades * 3 + channel] = Math.round(255 * Math.pow(tint[channel] / 255, 2.2));", + " }", + " }", + " }", + " const localZ = (groundZ - object.getZ()) / scaleZ;", + " roots[blades * 4] = x / scaleX;", + " roots[blades * 4 + 1] = y / scaleY;", + " roots[blades * 4 + 2] = localZ;", + " roots[blades * 4 + 3] = angle;", + " shapes[blades * 2] = heightFactor * bladeHeight;", + " shapes[blades * 2 + 1] = tint;", + " minZ = Math.min(minZ, localZ);", + " maxZ = Math.max(maxZ, localZ);", + " blades++;", + " }", + " if (blades === 0) return null;", + "", + " const geometry = new THREE.InstancedBufferGeometry();", + " geometry.index = this.bladeGeometry.index;", + " geometry.setAttribute('position', this.bladeGeometry.attributes.position);", + " geometry.setAttribute('normal', this.bladeGeometry.attributes.normal);", + " geometry.setAttribute('grassRoot', new THREE.InstancedBufferAttribute(roots.subarray(0, blades * 4), 4));", + " geometry.setAttribute('grassShape', new THREE.InstancedBufferAttribute(shapes.subarray(0, blades * 2), 2));", + " geometry.setAttribute('grassGroundTint', new THREE.InstancedBufferAttribute(groundTints.subarray(0, blades * 3), 3, true));", + " geometry.instanceCount = blades;", + " // The furthest tips can go with the wind and the bending objects (see the shader).", + " const maxBladeHeight = bladeHeight * 1.4;", + " const lean =", + " (0.35 * 1.9 * 0.943 * Math.max(object._getWindStrength(), 0) + 0.9) * maxBladeHeight +", + " Math.max(object._getBladeWidth(), 0) / 2;", + " const leanX = lean / scaleX;", + " const leanY = lean / scaleY;", + " geometry.boundingBox = new THREE.Box3(", + " new THREE.Vector3((chunkX * CHUNK_SIZE) / scaleX - leanX, (chunkY * CHUNK_SIZE) / scaleY - leanY, minZ),", + " new THREE.Vector3(", + " Math.min((chunkX + 1) * CHUNK_SIZE, width) / scaleX + leanX,", + " Math.min((chunkY + 1) * CHUNK_SIZE, height) / scaleY + leanY,", + " maxZ + (bladeHeight * 1.4) / scaleZ", + " )", + " );", + " geometry.boundingSphere = geometry.boundingBox.getBoundingSphere(new THREE.Sphere());", + " const mesh = new THREE.Mesh(geometry, this.material);", + " mesh.receiveShadow = true;", + " // Raycasts would only test one blade: the selection plane is used instead.", + " mesh.raycast = () => {};", + " this.group.add(mesh);", + " return { mesh, blades, center: geometry.boundingSphere.center.clone() };", + " }", + "", + " /**", + " * Place the blades of the chunks near the camera (the nearest first) and remove the ones of the chunks", + " * far from it: a large field would otherwise be slow to place and use a lot of memory for blades never drawn.", + " */", + " _updateChunksAroundCamera() {", + " const { object } = this;", + " // The camera in scene units, relative to the object (`_matrix` is the inverse of the group one).", + " const camera = this._chunkPosition.copy(this._cameraPosition).applyMatrix4(this._matrix);", + " const cameraX = (camera.x * object.getWidth()) / AREA_SIZE;", + " const cameraY = (camera.y * object.getHeight()) / AREA_SIZE;", + " const chunksX = Math.max(Math.ceil(object.getWidth() / CHUNK_SIZE), 1);", + " const chunksY = Math.max(Math.ceil(object.getHeight() / CHUNK_SIZE), 1);", + " const getDistance = (chunkX, chunkY) =>", + " Math.hypot((chunkX + 0.5) * CHUNK_SIZE - cameraX, (chunkY + 0.5) * CHUNK_SIZE - cameraY);", + "", + " // Chunks are placed a bit before blades are shown.", + " const placementDistance = Math.max(object._getFadeDistance(), 1) + CHUNK_SIZE;", + " const missingChunks = this._missingChunks;", + " missingChunks.length = 0;", + " const firstChunkX = Math.max(Math.floor((cameraX - placementDistance) / CHUNK_SIZE), 0);", + " const lastChunkX = Math.min(Math.floor((cameraX + placementDistance) / CHUNK_SIZE), chunksX - 1);", + " const firstChunkY = Math.max(Math.floor((cameraY - placementDistance) / CHUNK_SIZE), 0);", + " const lastChunkY = Math.min(Math.floor((cameraY + placementDistance) / CHUNK_SIZE), chunksY - 1);", + " for (let chunkY = firstChunkY; chunkY <= lastChunkY; chunkY++) {", + " for (let chunkX = firstChunkX; chunkX <= lastChunkX; chunkX++) {", + " if (this.chunks.has(chunkY * chunksX + chunkX)) continue;", + " const distance = getDistance(chunkX, chunkY);", + " if (distance <= placementDistance) missingChunks.push({ chunkX, chunkY, distance });", + " }", + " }", + " // Everything is placed at once after a change, so that blades don't disappear for a few frames.", + " const maxPlacedChunks = this._placeWithoutLimit", + " ? Infinity", + " : Math.max(Math.floor(MAX_BLADES_PLACED_BY_FRAME / Math.max(this._getBladesPerChunk(), 1)), 1);", + " this._placeWithoutLimit = false;", + " if (missingChunks.length > maxPlacedChunks) {", + " missingChunks.sort((chunk, otherChunk) => chunk.distance - otherChunk.distance);", + " missingChunks.length = maxPlacedChunks;", + " }", + " for (const { chunkX, chunkY } of missingChunks) {", + " this.chunks.set(chunkY * chunksX + chunkX, this._placeChunk(chunkX, chunkY));", + " }", + "", + " for (const [key, chunk] of this.chunks) {", + " if (getDistance(key % chunksX, Math.floor(key / chunksX)) < 2 * placementDistance) continue;", + " this.chunks.delete(key);", + " if (!chunk) continue;", + " chunk.mesh.removeFromParent();", + " chunk.mesh.geometry.dispose();", + " }", + " }", + "", + " _updateBendingObjects() {", + " const benders = this.uniforms.grassBenders.value;", + " const objectName = this.object._getBendingObject();", + " const bendingObjects = objectName ? this.object.getInstanceContainer().getObjects(objectName) || [] : [];", + " for (let index = 0; index < MAX_BENDING_OBJECTS; index++) {", + " const bendingObject = bendingObjects[index];", + " if (!bendingObject) {", + " benders[index].set(0, 0, 0, 0);", + " continue;", + " }", + " // Blades are pushed in the 3D scene, which is flipped on Y.", + " const radius = Math.max(bendingObject.getWidth(), bendingObject.getHeight()) * 1.2;", + " benders[index].set(bendingObject.getCenterXInScene(), -bendingObject.getCenterYInScene(), radius, 0);", + " }", + " }", + "", + " /**", + " * @param {number} elapsedSeconds", + " * @param {number} time In seconds, the same for all grass objects.", + " */", + " update(elapsedSeconds, time, camera) {", + " if (this.placement.shouldPlaceAgain(elapsedSeconds, this._getPlacementKey())) {", + " this.rebuild();", + " }", + "", + " this.uniforms.grassTime.value = time;", + " this.uniforms.grassWorldScale.value = getWorldScale(this.object);", + " // The object transformation is applied just before rendering, it's needed now.", + " this.object.getRenderer().ensureUpToDate();", + " this.group.updateWorldMatrix(true, false);", + " this.uniforms.grassWorldToLocal.value.setFromMatrix4(this._matrix.copy(this.group.matrixWorld).invert());", + " this._updateBendingObjects();", + " if (!camera) return;", + "", + " // Far chunks are hidden, and thinned out before (in 3D world units).", + " const fadeDistance = Math.max(this.object._getFadeDistance(), 1) / getWorldScale(this.object);", + " this._cameraPosition.setFromMatrixPosition(camera.matrixWorld);", + " this._updateChunksAroundCamera();", + " for (const chunk of this.chunks.values()) {", + " if (!chunk) continue;", + " const distance = this._chunkPosition", + " .copy(chunk.center)", + " .applyMatrix4(this.group.matrixWorld)", + " .distanceTo(this._cameraPosition);", + " const density = gdjs.evtTools.common.clamp((fadeDistance - distance) / (fadeDistance * 0.5), 0, 1);", + " chunk.mesh.visible = density > 0;", + " chunk.mesh.geometry.instanceCount = Math.ceil(chunk.blades * density);", + " }", + " }", + "", + " dispose() {", + " this._removeChunks();", + " this.bladeGeometry.dispose();", + " this.material.dispose();", + " this.group.removeFromParent();", + " }", + "}", + "", + "gdjs.__terrainGrassExtension = { Grass };" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Define scattered models helper classes JavaScript code.", + "fullName": "Define scattered models helper classes", + "functionType": "Action", + "name": "DefineScatterHelperClasses", + "private": true, + "sentence": "Define scattered models helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (gdjs.__terrainScatterExtension) {", + " return;", + "}", + "// Copies grow on the grounds of the scene, like the terrain grass (see", + "// `getGrounds` in the terrain helper).", + "", + "const {", + " getWorldScale,", + " getCamera,", + " getGrounds,", + " patchShaderCode,", + " createRandom,", + " findHighestGround,", + " GroundPlacement,", + " SampleRectangle,", + " brushes,", + " codec,", + " svgIcon,", + " toolIcons,", + "} = gdjs.__terrain3DExtension;", + "", + "// Size of the object inner area: instances are scaled from it.", + "const AREA_SIZE = 2000;", + "const AREA_DEPTH = 200;", + "// The painted density is stored in a grid of this many cells on each side,", + "// whatever the size of the object.", + "const MASK_RESOLUTION = 256;", + "const MASK_FORMAT_VERSION = '1';", + "// Copies are hidden in chunks: big chunks mean fewer draw calls, small ones", + "// hide more copies out of the screen.", + "const MIN_CHUNK_SIZE = 500;", + "const MAX_CHUNK_SIZE = 2000;", + "// Copies shrink to nothing over this part of the draw distance, instead of popping out.", + "const FADE_PART = 0.15;", + "const MAX_COPIES = 200000;", + "// Prisms of the trunk collisions.", + "const TRUNK_SIDES = 6;", + "", + "const clamp01 = (value) => (value < 0 ? 0 : value > 1 ? 1 : value);", + "", + "/**", + " * @returns {number} A number for a cell of the copies grid, changing with the seed.", + " */", + "const hashCell = (seed, i, j) => {", + " let h = Math.imul(i, 374761393) + Math.imul(j, 668265263) + Math.imul(seed, 982451653);", + " h = Math.imul(h ^ (h >>> 13), 1274126177);", + " return (h ^ (h >>> 16)) >>> 0;", + "};", + "", + "/**", + " * How dense copies are, from 0 to 1, in a grid covering the object: painted", + " * with the editor brushes, the edits or events.", + " */", + "class DensityMask {", + " /** @param {number} fillValue From 0 to 255. */", + " constructor(fillValue) {", + " // `resolution` and `size` let terrain brushes paint it.", + " this.resolution = MASK_RESOLUTION;", + " this.size = MASK_RESOLUTION + 1;", + " this.values = new Uint8Array(this.size * this.size).fill(fillValue);", + " }", + "", + " /**", + " * @param {number} u From 0 to 1, along the object width.", + " * @param {number} v From 0 to 1, along the object height.", + " * @returns {number} The density, from 0 to 1, interpolated between samples.", + " */", + " sample(u, v) {", + " const x = clamp01(u) * this.resolution;", + " const y = clamp01(v) * this.resolution;", + " const i = Math.min(Math.floor(x), this.resolution - 1);", + " const j = Math.min(Math.floor(y), this.resolution - 1);", + " const fx = x - i;", + " const fy = y - j;", + " const value = (i, j) => this.values[j * this.size + i];", + " const top = value(i, j) + fx * (value(i + 1, j) - value(i, j));", + " const bottom = value(i, j + 1) + fx * (value(i + 1, j + 1) - value(i, j + 1));", + " return (top + fy * (bottom - top)) / 255;", + " }", + "", + " /**", + " * Bring the density towards a target around a segment: fully up to 70%", + " * of the radius, then fading out (forests have dense centers and soft edges).", + " * @param {{cellWidth: number, cellHeight: number, ax: number, ay: number, bx: number, by: number, radius: number}} stroke", + " * @param {number} density The target, from 0 to 1.", + " * @param {number} strength From 0 to 1.", + " * @param {SampleRectangle} changedSamples", + " */", + " paint(stroke, density, strength, changedSamples) {", + " const { values } = this;", + " const target = Math.round(clamp01(density) * 255);", + " brushes.forEachSample(", + " this,", + " stroke,", + " (index, falloff) => {", + " // The falloff of terrain brushes is (1 - distance² / radius²)².", + " const weight = clamp01(2 * Math.sqrt(falloff));", + " // Rounded towards the target, so that light strokes still paint.", + " const change = (target - values[index]) * clamp01(weight * strength);", + " values[index] += change > 0 ? Math.ceil(change) : Math.floor(change);", + " },", + " changedSamples", + " );", + " }", + "", + " /** @returns {DensityMask} */", + " clone() {", + " const mask = new DensityMask(0);", + " mask.values.set(this.values);", + " return mask;", + " }", + "}", + "", + "/**", + " * Edits written in the Edits property: a JSON list of brush strokes, like", + " * `[{\"tool\": \"add\", \"x\": 0.5, \"y\": 0.5, \"radius\": 0.2}]`. Positions and", + " * radius are fractions of the object size, like the terrain edits.", + " */", + "const applyEdits = (mask, text) => {", + " if (!text.trim()) return;", + " let editList;", + " try {", + " editList = JSON.parse(text);", + " } catch (error) {", + " console.warn('The edits of scattered models are not valid JSON: ' + error.message);", + " return;", + " }", + " if (!Array.isArray(editList)) {", + " console.warn('The edits of scattered models must be a JSON list (like [{\"tool\": \"add\", ...}]).');", + " return;", + " }", + " const numberOr = (value, defaultValue) => (typeof value === 'number' && isFinite(value) ? value : defaultValue);", + " const changedSamples = new SampleRectangle();", + " for (const edit of editList) {", + " if (!edit || typeof edit !== 'object') continue;", + " const x = numberOr(edit.x, 0.5);", + " const y = numberOr(edit.y, 0.5);", + " const stroke = {", + " cellWidth: 1 / mask.resolution,", + " cellHeight: 1 / mask.resolution,", + " ax: x,", + " ay: y,", + " bx: numberOr(edit.toX, x),", + " by: numberOr(edit.toY, y),", + " radius: numberOr(edit.radius, 0.1),", + " };", + " const strength = clamp01(numberOr(edit.strength, 1));", + " if (edit.tool === 'add') {", + " mask.paint(stroke, numberOr(edit.density, 1), strength, changedSamples);", + " } else if (edit.tool === 'erase') {", + " mask.paint(stroke, 0, strength, changedSamples);", + " } else {", + " console.warn('Unknown tool in the edits of scattered models: \"' + edit.tool + '\" (use add or erase).');", + " }", + " }", + "};", + "", + "/**", + " * The density painted in the editor, stored as its difference with the", + " * density from the properties (the coverage and the edits), like the terrain", + " * sculpt data.", + " */", + "const maskCodec = {", + " /**", + " * @param {DensityMask} mask", + " * @param {DensityMask} baseMask", + " */", + " encode(mask, baseMask) {", + " const changes = new Int32Array(mask.values.length);", + " let hasChanges = false;", + " for (let index = 0; index < changes.length; index++) {", + " changes[index] = mask.values[index] - baseMask.values[index];", + " if (changes[index] !== 0) hasChanges = true;", + " }", + " if (!hasChanges) return '';", + " return MASK_FORMAT_VERSION + ';' + MASK_RESOLUTION + ';' + codec.encodeGrids([changes], mask.size);", + " },", + "", + " /**", + " * @param {string} text", + " * @param {DensityMask} baseMask", + " * @returns {DensityMask | null} null if the text is empty or not valid.", + " */", + " decode(text, baseMask) {", + " if (!text) return null;", + " const parts = text.split(';');", + " if (parts[0] !== MASK_FORMAT_VERSION || parseInt(parts[1], 10) !== MASK_RESOLUTION) return null;", + " try {", + " const mask = baseMask.clone();", + " const [changes] = codec.decodeGrids(parts[2], mask.size, 1);", + " for (let index = 0; index < changes.length; index++) {", + " // The base may have changed since the data was saved.", + " mask.values[index] = Math.min(Math.max(mask.values[index] + changes[index], 0), 255);", + " }", + " return mask;", + " } catch (error) {", + " console.error('The painted data of scattered models could not be read:', error);", + " return null;", + " }", + " },", + "};", + "", + "const fadeShaderDeclarations = `", + "uniform float scatterDrawDistance;", + "`;", + "// Instance matrices are applied after this: copies shrink towards their base.", + "const fadeShaderCode = `", + "#ifdef USE_INSTANCING", + "vec3 scatterCopyPosition = (modelMatrix * instanceMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;", + "transformed *= clamp(", + " (scatterDrawDistance - distance(scatterCopyPosition, cameraPosition)) / (scatterDrawDistance * ${FADE_PART}),", + " 0.0,", + " 1.0", + ");", + "#endif", + "`;", + "", + "const flipTriangles = (geometry) => {", + " const index = geometry.index;", + " for (let offset = 0; offset + 2 < index.count; offset += 3) {", + " const second = index.getX(offset + 1);", + " index.setX(offset + 1, index.getX(offset + 2));", + " index.setX(offset + 2, second);", + " }", + "};", + "", + "/**", + " * The parts of a model and its size, per unit of height, around the point", + " * of the model put on the ground (its anchor).", + " * @typedef {{", + " * parts: Array<{geometry: THREE.BufferGeometry, material: THREE.Material | THREE.Material[]}>,", + " * width: number,", + " * depth: number,", + " * bottom: number,", + " * top: number,", + " * reach: number,", + " * }} ModelParts", + " * `bottom` and `top` are the Z of the model base and top from the anchor.", + " * `reach` is the farthest distance of the model from the anchor on X and Y,", + " * whatever the rotation of the copy.", + " */", + "", + "/** @type {ModelParts} */", + "const emptyModelParts = { parts: [], width: 0, depth: 0, bottom: 0, top: 1, reach: 0, sourceHeight: 1 };", + "", + "/**", + " * The parts of a model, ready to be drawn with instancing: each glTF", + " * primitive with its material. Geometries are moved so that the anchor is at", + " * the origin, the model height is 1 and it stands along Z (like 3D model", + " * objects with a 90° rotation around X, for models standing on Y).", + " * @param {THREE.Object3D} modelScene", + " * @param {object} uniforms Uniforms added to the materials.", + " * @param {{isStandingOnZ: boolean, isAnchoredAtOrigin: boolean}} options", + " * The anchor is the origin of the model, or else the center of its base.", + " * @returns {ModelParts}", + " */", + "const createModelParts = (modelScene, uniforms, { isStandingOnZ, isAnchoredAtOrigin }) => {", + " modelScene.updateMatrixWorld(true);", + " const rootInverse = modelScene.matrixWorld.clone().invert();", + " const standUp = isStandingOnZ ? new THREE.Matrix4() : new THREE.Matrix4().makeRotationX(Math.PI / 2);", + " /** @type {Array<{mesh: THREE.Mesh, matrix: THREE.Matrix4}>} */", + " const meshes = [];", + " const box = new THREE.Box3();", + " modelScene.traverse((node) => {", + " if (!node.isMesh || !node.geometry || !node.geometry.attributes.position) return;", + " const matrix = standUp.clone().multiply(rootInverse).multiply(node.matrixWorld);", + " if (!node.geometry.boundingBox) node.geometry.computeBoundingBox();", + " box.union(node.geometry.boundingBox.clone().applyMatrix4(matrix));", + " meshes.push({ mesh: node, matrix });", + " });", + " if (box.isEmpty()) return emptyModelParts;", + "", + " const height = Math.max(box.max.z - box.min.z, 0.000001);", + " // The Y axis of the scene goes down: the model is flipped, like 3D model objects.", + " const normalization = new THREE.Matrix4()", + " .makeScale(1 / height, -1 / height, 1 / height)", + " .multiply(", + " isAnchoredAtOrigin", + " ? new THREE.Matrix4()", + " : new THREE.Matrix4().makeTranslation(", + " -(box.min.x + box.max.x) / 2,", + " -(box.min.y + box.max.y) / 2,", + " -box.min.z", + " )", + " );", + " const normalizedBox = box.clone().applyMatrix4(normalization);", + " const parts = meshes.map(({ mesh, matrix }) => {", + " let geometry = mesh.geometry.clone();", + " if (!geometry.index) {", + " const indices = Array.from({ length: geometry.attributes.position.count }, (_, index) => index);", + " geometry.setIndex(indices);", + " }", + " geometry.applyMatrix4(normalization.clone().multiply(matrix));", + " // The flip turned the faces inside out.", + " flipTriangles(geometry);", + " geometry.computeBoundingSphere();", + " geometry.computeBoundingBox();", + " const patchMaterial = (originalMaterial) => {", + " const material = originalMaterial.clone();", + " // Like 3D model objects (\"Standard without metalness\"), which look better without an environment map.", + " if (material.metalness) material.metalness = 0;", + " material.onBeforeCompile = (shader) => {", + " Object.assign(shader.uniforms, uniforms);", + " shader.vertexShader = patchShaderCode(shader.vertexShader, [", + " ['#include ', '#include \\n' + fadeShaderDeclarations],", + " ['#include ', '#include \\n' + fadeShaderCode],", + " ], 'ScatteredModels');", + " };", + " material.customProgramCacheKey = () => 'ScatteredModels';", + " return material;", + " };", + " const material = Array.isArray(mesh.material) ? mesh.material.map(patchMaterial) : patchMaterial(mesh.material);", + " return { geometry, material };", + " });", + " // The sizes are relative to a height of 1, except sourceHeight which is in the model file units.", + " return {", + " parts,", + " sourceHeight: height,", + " width: (box.max.x - box.min.x) / height,", + " depth: (box.max.y - box.min.y) / height,", + " bottom: normalizedBox.min.z,", + " top: normalizedBox.max.z,", + " reach: Math.hypot(", + " Math.max(-normalizedBox.min.x, normalizedBox.max.x),", + " Math.max(-normalizedBox.min.y, normalizedBox.max.y)", + " ),", + " };", + "};", + "", + "/**", + " * A copy of the model: the position of its anchor in the scene (on the ground), its scale", + " * factor (1 = the model at its original size) and rendered height in pixels, and the key", + " * of its cell in the grid of copies.", + " * @typedef {{x: number, y: number, z: number, angle: number, height: number, scale: number, key: number}} Copy", + " */", + "", + "/**", + " * The scattered models of an object: copies of a 3D model placed on the", + " * grounds of the scene, drawn with GPU instancing in chunks that are hidden", + " * when far or off-screen.", + " */", + "class Scatter {", + " /** @param {gdjs.CustomRuntimeObject3D} object */", + " constructor(object) {", + " this.object = object;", + " this.group = new THREE.Group();", + " object.get3DRendererObject().add(this.group);", + " /** @type {Array<{firstCellI: number, firstCellJ: number, meshes: THREE.InstancedMesh[], copies: Copy[], center: THREE.Vector3, radius: number}>} */", + " this.chunks = [];", + " /**", + " * The grid of copies: one copy at most in each cell, cells grouped in chunks.", + " * @type {{spacing: number, cellsPerChunk: number, cellsX: number, cellsY: number} | null}", + " */", + " this.grid = null;", + " this.placement = new GroundPlacement(object.getRuntimeScene());", + " this.uniforms = {", + " // In 3D world units.", + " scatterDrawDistance: { value: 1 },", + " };", + " /** @type {{parts: Array<{geometry: THREE.BufferGeometry, material: THREE.Material | THREE.Material[]}>, width: number, depth: number}} */", + " /** @type {ModelParts} */", + " this.model = emptyModelParts;", + " this.modelResourceName = '';", + " /** The properties the model was loaded from (see `_getModelKey`). */", + " this.modelKey = '';", + " this.loadingModelResourceName = '';", + " /**", + " * Copies removed by events (for example, cut trees), by key.", + " * @type {Map}", + " */", + " this.removedCopies = new Map();", + " /** Increased each time copies change, for the collisions. */", + " this.version = 0;", + " this.isDisposed = false;", + " /** The last value of the painted data property read or saved. */", + " this.paintData = '';", + " /**", + " * Values saved by the editor tools: the editor sends them back with a", + " * hot-reload, possibly after newer ones were saved.", + " * @type {string[]}", + " */", + " this.savedPaintData = [];", + " this.maskSource = '';", + " /** @type {DensityMask} */", + " this.baseMask = new DensityMask(255);", + " /** @type {DensityMask} */", + " this.mask = this.baseMask;", + " this.changedSamples = new SampleRectangle();", + " this._stroke = { cellWidth: 1, cellHeight: 1, ax: 0, ay: 0, bx: 0, by: 0, radius: 0 };", + " this._groundAtCopy = { ground: null, z: 0 };", + " this._matrix = new THREE.Matrix4();", + " this._raycastSphere = new THREE.Sphere();", + " this._raycastRay = new THREE.Ray();", + " this._raycastBox = new THREE.Box3();", + " this._raycastInverseMatrix = new THREE.Matrix4();", + " this._raycastScale = new THREE.Vector3();", + " /** Placed on a copy to test the triangles of the model. */", + " this._raycastMesh = new THREE.Mesh();", + " /** @type {THREE.Intersection[]} */", + " this._raycastHits = [];", + " this._color = new THREE.Color();", + " this._tint = new THREE.Color();", + " this._cameraPosition = new THREE.Vector3();", + " this._chunkPosition = new THREE.Vector3();", + " /**", + " * Trunks, for the 3D physics behavior and navigation meshes. Always given,", + " * empty without trunk collisions: otherwise these behaviors would use the", + " * object box, covering the whole area.", + " * @type {gdjs.Surface}", + " */", + " this.surface = {", + " getVersion: () => this.version,", + " getChangedArea: () => null,", + " getTriangles: () => this._getTrunkTriangles(),", + " getHeightField: () => null,", + " };", + " /** The trunk collision properties, changing the surface. */", + " this.trunkKey = '';", + " this.loadMaskFromProperties();", + " this.updateFromProperties();", + " // Before the behaviors create their shapes.", + " this._updateSurface();", + " }", + "", + " _getMaskSource() {", + " return this.object._getCoverage() + '|' + this.object._getEdits();", + " }", + "", + " loadMaskFromProperties() {", + " const { object } = this;", + " this.maskSource = this._getMaskSource();", + " this.paintData = object._getPaintData();", + " this.baseMask = new DensityMask(object._getCoverage() === 'Painted' ? 0 : 255);", + " applyEdits(this.baseMask, object._getEdits());", + " this.mask = maskCodec.decode(this.paintData, this.baseMask) || this.baseMask.clone();", + " this.placement.placeAgain();", + " }", + "", + " onHotReloading() {", + " const paintData = this.object._getPaintData();", + " const savedIndex = this.savedPaintData.indexOf(paintData);", + " if (savedIndex !== -1 && this._getMaskSource() === this.maskSource) {", + " // The object already has this data, or newer changes.", + " this.savedPaintData.splice(0, savedIndex + 1);", + " } else if (paintData !== this.paintData || this._getMaskSource() !== this.maskSource) {", + " this.savedPaintData.length = 0;", + " this.loadMaskFromProperties();", + " }", + " this.updateFromProperties();", + " }", + "", + " /** @returns {string} The data to save in the painted data property. */", + " save() {", + " this.paintData = maskCodec.encode(this.mask, this.baseMask);", + " this.savedPaintData.push(this.paintData);", + " return this.paintData;", + " }", + "", + " _getModelKey() {", + " const { object } = this;", + " return object._getModel() + '|' + object._getModelUpAxis() + '|' + object._getModelAnchor();", + " }", + "", + " updateFromProperties() {", + " const modelKey = this._getModelKey();", + " if (modelKey !== this.modelKey) {", + " this.modelKey = modelKey;", + " this.modelResourceName = this.object._getModel();", + " this._loadModel();", + " }", + " this.placement.placeAgain();", + " }", + "", + " _disposeModel() {", + " for (const part of this.model.parts) {", + " part.geometry.dispose();", + " for (const material of Array.isArray(part.material) ? part.material : [part.material]) {", + " material.dispose();", + " }", + " }", + " /** @type {ModelParts} */", + " this.model = emptyModelParts;", + " }", + "", + " _loadModel() {", + " this._disposeChunks(this.chunks);", + " this._disposeModel();", + " const resourceName = this.modelResourceName;", + " if (!resourceName) return;", + " const game = this.object.getRuntimeScene().getGame();", + " const modelManager = game.getModel3DManager();", + " const gltf = modelManager.getModel(resourceName);", + " if (gltf === modelManager._invalidModel) {", + " // Not loaded yet, for example a model just chosen in the editor.", + " if (this.loadingModelResourceName === resourceName) return;", + " this.loadingModelResourceName = resourceName;", + " game.getResourceLoader()", + " .loadResource(resourceName)", + " .then(() => {", + " if (this.isDisposed || this.modelResourceName !== resourceName) return;", + " this.loadingModelResourceName = '';", + " if (modelManager.getModel(resourceName) !== modelManager._invalidModel) {", + " this._loadModel();", + " this.placement.placeAgain();", + " }", + " })", + " .catch(() => {});", + " return;", + " }", + " this.model = createModelParts(gltf.scene, this.uniforms, {", + " isStandingOnZ: this.object._getModelUpAxis() === 'Z',", + " isAnchoredAtOrigin: this.object._getModelAnchor() === 'ModelOrigin',", + " });", + " }", + "", + " _getPlacementKey() {", + " const { object } = this;", + " return [", + " object.getX(), object.getY(), object.getZ(), object.getWidth(), object.getHeight(), object.getDepth(),", + " object._getDensity(), object._getSize(), object._getScaleFactor(), object._getMinScale(), object._getMaxScale(),", + " object._getRandomRotation(), object._getRandomTint(), object._getGroundLayer(), object._getMaxSlope(),", + " object._getMinGroundZ(), object._getMaxGroundZ(), object._getSeed(), object._getDrawDistance(),", + " object._getCastShadow(), object._getReceiveShadow(), this.model.parts.length,", + " ].join('|');", + " }", + "", + " _getChunkSize() {", + " return Math.min(Math.max(this.object._getDrawDistance() / 4, MIN_CHUNK_SIZE), MAX_CHUNK_SIZE);", + " }", + "", + " /** @returns {number} The distance between copies (one copy per cell of this size at most). */", + " _getSpacing() {", + " const { object } = this;", + " const density = Math.max(object._getDensity(), 0);", + " if (density <= 0) return 0;", + " const spacing = 100 / Math.sqrt(density);", + " // Too many cells would freeze the game: the density is lowered.", + " const cellCount = (object.getWidth() / spacing) * (object.getHeight() / spacing);", + " return cellCount > MAX_COPIES ? spacing * Math.sqrt(cellCount / MAX_COPIES) : spacing;", + " }", + "", + " /**", + " * Find the copy of a cell of the grid, if there is one.", + " * @returns {Copy | null}", + " */", + " _placeCopy(cellI, cellJ, spacing, grounds) {", + " const { object } = this;", + " const width = object.getWidth();", + " const height = object.getHeight();", + " const nextRandom = createRandom(hashCell(Math.floor(object._getSeed()), cellI, cellJ));", + " // Always drawn in the same order, so that a copy stays the same when properties change.", + " const x = (cellI + nextRandom()) * spacing;", + " const y = (cellJ + nextRandom()) * spacing;", + " const presence = nextRandom();", + " const growth = nextRandom();", + " const scaleFactor = nextRandom();", + " const angle = nextRandom() * Math.PI * 2;", + " if (x > width || y > height) return null;", + " if (presence >= this.mask.sample(x / width, y / height)) return null;", + " const key = cellJ * 65536 + cellI;", + " if (this.removedCopies.has(key)) return null;", + "", + " const sceneX = object.getX() + x;", + " const sceneY = object.getY() + y;", + " const { ground, z } = findHighestGround(grounds, sceneX, sceneY, this._groundAtCopy);", + " const groundZ = ground ? z : object.getZ();", + " if (groundZ < object._getMinGroundZ() || groundZ > object._getMaxGroundZ()) return null;", + " const randomScale = object._getMinScale() + (object._getMaxScale() - object._getMinScale()) * scaleFactor;", + " const sourceHeightInPixels = this.model.sourceHeight * 100;", + " // Objects made before \"Scale factor of a copy\" (store prefabs included) scale their fixed", + " // height (deprecated \"Size\" property) instead of the model height: they look the same at 100%.", + " const legacyHeight = object._getSize();", + " const baseHeight = legacyHeight > 0 ? legacyHeight : sourceHeightInPixels;", + " const copyHeight = (Math.max(object._getScaleFactor(), 0) / 100) * randomScale * baseHeight;", + " const copyScale = copyHeight / sourceHeightInPixels;", + " if (ground) {", + " if (ground.getSlopeAt(sceneX, sceneY) > object._getMaxSlope()) return null;", + " const groundLayer = parseInt(object._getGroundLayer(), 10) || 0;", + " if (groundLayer > 0) {", + " if (growth > ground.getLayerWeightAt(sceneX, sceneY, groundLayer)) return null;", + " // Copies don't stand at the border of their layer, so that trees don't cover roads.", + " const margin = (copyHeight * Math.max(this.model.width, this.model.depth)) / 4;", + " for (const [offsetX, offsetY] of [[margin, 0], [-margin, 0], [0, margin], [0, -margin]]) {", + " if (ground.getLayerWeightAt(sceneX + offsetX, sceneY + offsetY, groundLayer) < 0.5) return null;", + " }", + " }", + " }", + " return {", + " x: sceneX,", + " y: sceneY,", + " z: groundZ,", + " angle: object._getRandomRotation() ? angle : 0,", + " height: copyHeight,", + " scale: copyScale,", + " key,", + " };", + " }", + "", + " _disposeChunks(chunks) {", + " for (const chunk of chunks) {", + " for (const mesh of chunk.meshes) {", + " mesh.removeFromParent();", + " // Geometries and materials are the ones of the model.", + " mesh.dispose();", + " }", + " }", + " if (chunks === this.chunks) this.chunks = [];", + " }", + "", + " /** Place the copies again, for example after the ground or the object changed. */", + " rebuild() {", + " this._disposeChunks(this.chunks);", + " this.version++;", + " const { object } = this;", + " const spacing = this._getSpacing();", + " if (spacing <= 0 || this.model.parts.length === 0) {", + " this.grid = null;", + " return;", + " }", + " const cellsPerChunk = Math.max(Math.round(this._getChunkSize() / spacing), 1);", + " const grid = {", + " spacing,", + " cellsPerChunk,", + " cellsX: Math.ceil(object.getWidth() / spacing),", + " cellsY: Math.ceil(object.getHeight() / spacing),", + " };", + " this.grid = grid;", + " for (let firstCellJ = 0; firstCellJ < grid.cellsY; firstCellJ += cellsPerChunk) {", + " for (let firstCellI = 0; firstCellI < grid.cellsX; firstCellI += cellsPerChunk) {", + " this._createChunk(firstCellI, firstCellJ);", + " }", + " }", + " }", + "", + " /**", + " * Place again the copies of the chunks touching a rectangle of the scene,", + " * for example after painting.", + " */", + " _rebuildArea(minX, minY, maxX, maxY) {", + " const { grid, object } = this;", + " if (!grid) return;", + " const chunkSize = grid.spacing * grid.cellsPerChunk;", + " const firstChunkI = Math.max(Math.floor((minX - object.getX()) / chunkSize), 0);", + " const firstChunkJ = Math.max(Math.floor((minY - object.getY()) / chunkSize), 0);", + " const lastChunkI = Math.min(Math.floor((maxX - object.getX()) / chunkSize), Math.ceil(grid.cellsX / grid.cellsPerChunk) - 1);", + " const lastChunkJ = Math.min(Math.floor((maxY - object.getY()) / chunkSize), Math.ceil(grid.cellsY / grid.cellsPerChunk) - 1);", + " if (firstChunkI > lastChunkI || firstChunkJ > lastChunkJ) return;", + " const isInArea = (chunk) => {", + " const chunkI = chunk.firstCellI / grid.cellsPerChunk;", + " const chunkJ = chunk.firstCellJ / grid.cellsPerChunk;", + " return chunkI >= firstChunkI && chunkI <= lastChunkI && chunkJ >= firstChunkJ && chunkJ <= lastChunkJ;", + " };", + " this._disposeChunks(this.chunks.filter(isInArea));", + " this.chunks = this.chunks.filter((chunk) => !isInArea(chunk));", + " for (let chunkJ = firstChunkJ; chunkJ <= lastChunkJ; chunkJ++) {", + " for (let chunkI = firstChunkI; chunkI <= lastChunkI; chunkI++) {", + " this._createChunk(chunkI * grid.cellsPerChunk, chunkJ * grid.cellsPerChunk);", + " }", + " }", + " this.version++;", + " }", + "", + " _createChunk(firstCellI, firstCellJ) {", + " const { grid } = this;", + " const grounds = Array.from(this.placement.grounds);", + " /** @type {Copy[]} */", + " const copies = [];", + " for (let cellJ = firstCellJ; cellJ < Math.min(firstCellJ + grid.cellsPerChunk, grid.cellsY); cellJ++) {", + " for (let cellI = firstCellI; cellI < Math.min(firstCellI + grid.cellsPerChunk, grid.cellsX); cellI++) {", + " const copy = this._placeCopy(cellI, cellJ, grid.spacing, grounds);", + " if (copy) copies.push(copy);", + " }", + " }", + " if (copies.length === 0) return;", + "", + " const { object } = this;", + " // Copies are placed in scene units, and the object group is scaled", + " // from its inner area: they are scaled back to keep their proportions.", + " const scaleX = Math.max(object.getWidth() / AREA_SIZE, 0.0001);", + " const scaleY = Math.max(object.getHeight() / AREA_SIZE, 0.0001);", + " const scaleZ = Math.max(object.getDepth() / AREA_DEPTH, 0.0001);", + " const matrices = new Float32Array(copies.length * 16);", + " const tintColor = gdjs.rgbOrHexStringToNumber(object._getRandomTint());", + " const hasTint = tintColor !== 0xffffff;", + " const colors = hasTint ? new Float32Array(copies.length * 3) : null;", + " this._tint.setHex(tintColor);", + " const min = new THREE.Vector3(Infinity, Infinity, Infinity);", + " const max = new THREE.Vector3(-Infinity, -Infinity, -Infinity);", + " copies.forEach((copy, index) => {", + " const cos = Math.cos(copy.angle) * copy.height;", + " const sin = Math.sin(copy.angle) * copy.height;", + " const localX = (copy.x - object.getX()) / scaleX;", + " const localY = (copy.y - object.getY()) / scaleY;", + " const localZ = (copy.z - object.getZ()) / scaleZ;", + " this._matrix.set(", + " cos / scaleX, -sin / scaleX, 0, localX,", + " sin / scaleY, cos / scaleY, 0, localY,", + " 0, 0, copy.height / scaleZ, localZ,", + " 0, 0, 0, 1", + " );", + " this._matrix.toArray(matrices, index * 16);", + " if (colors) {", + " // The tint of each copy is between white and the tint color.", + " this._color.setRGB(1, 1, 1).lerp(this._tint, createRandom(copy.key + 1)());", + " this._color.toArray(colors, index * 3);", + " }", + " const reach = copy.height * this.model.reach;", + " min.min(this._chunkPosition.set(copy.x - reach, copy.y - reach, copy.z + copy.height * this.model.bottom));", + " max.max(this._chunkPosition.set(copy.x + reach, copy.y + reach, copy.z + copy.height * this.model.top));", + " });", + " const instanceMatrix = new THREE.InstancedBufferAttribute(matrices, 16);", + " const instanceColor = colors ? new THREE.InstancedBufferAttribute(colors, 3) : null;", + " const castShadow = object._getCastShadow();", + " const receiveShadow = object._getReceiveShadow();", + " const meshes = this.model.parts.map((part) => {", + " const mesh = new THREE.InstancedMesh(part.geometry, part.material, 0);", + " // All the parts of the model share the positions of the copies.", + " mesh.instanceMatrix = instanceMatrix;", + " mesh.instanceColor = instanceColor;", + " mesh.count = copies.length;", + " mesh.computeBoundingSphere();", + " mesh.castShadow = castShadow;", + " mesh.receiveShadow = receiveShadow;", + " // The first mesh tests all the parts of the copies.", + " mesh.raycast = () => {};", + " this.group.add(mesh);", + " return mesh;", + " });", + " const center = new THREE.Vector3(", + " ((min.x + max.x) / 2 - object.getX()) / scaleX,", + " ((min.y + max.y) / 2 - object.getY()) / scaleY,", + " ((min.z + max.z) / 2 - object.getZ()) / scaleZ", + " );", + " const chunk = { firstCellI, firstCellJ, meshes, copies, center, radius: min.distanceTo(max) / 2 };", + " // Used by the scene editor to select the object when a copy is clicked.", + " meshes[0].raycast = (raycaster, intersects) => this._raycastChunk(chunk, raycaster, intersects);", + " this.chunks.push(chunk);", + " }", + "", + " /**", + " * Add the hits of a ray on the copies of a chunk, like they are drawn. There", + " * can be thousands of copies: only the ones whose box is crossed by the ray", + " * are tested with the triangles of the model.", + " * @param {{meshes: THREE.InstancedMesh[], copies: Copy[], center: THREE.Vector3, radius: number}} chunk", + " * @param {THREE.Raycaster} raycaster", + " * @param {THREE.Intersection[]} intersects", + " */", + " _raycastChunk(chunk, raycaster, intersects) {", + " const { object, group } = this;", + " this._raycastSphere.center.copy(chunk.center).applyMatrix4(group.matrixWorld);", + " this._raycastSphere.radius = chunk.radius / getWorldScale(object);", + " if (!raycaster.ray.intersectsSphere(this._raycastSphere)) return;", + "", + " // The ray in the scene coordinates, like the copies.", + " const scale = this._raycastScale.set(", + " Math.max(object.getWidth() / AREA_SIZE, 0.0001),", + " Math.max(object.getHeight() / AREA_SIZE, 0.0001),", + " Math.max(object.getDepth() / AREA_DEPTH, 0.0001)", + " );", + " const ray = this._raycastRay.copy(raycaster.ray).applyMatrix4(this._raycastInverseMatrix.copy(group.matrixWorld).invert());", + " ray.origin.multiply(scale).add(this._chunkPosition.set(object.getX(), object.getY(), object.getZ()));", + " ray.direction.multiply(scale);", + "", + " const { reach: reachPerHeight, bottom, top } = this.model;", + " const instanceMatrices = chunk.meshes[0].instanceMatrix.array;", + " chunk.copies.forEach((copy, index) => {", + " const reach = copy.height * reachPerHeight;", + " this._raycastBox.min.set(copy.x - reach, copy.y - reach, copy.z + copy.height * bottom);", + " this._raycastBox.max.set(copy.x + reach, copy.y + reach, copy.z + copy.height * top);", + " if (!ray.intersectsBox(this._raycastBox)) return;", + " this._raycastMesh.matrixWorld.fromArray(instanceMatrices, index * 16).premultiply(group.matrixWorld);", + " for (const mesh of chunk.meshes) {", + " this._raycastMesh.geometry = mesh.geometry;", + " this._raycastMesh.material = mesh.material;", + " this._raycastHits.length = 0;", + " this._raycastMesh.raycast(raycaster, this._raycastHits);", + " for (const hit of this._raycastHits) {", + " hit.object = mesh;", + " hit.instanceId = index;", + " intersects.push(hit);", + " }", + " }", + " });", + " }", + "", + " /** @param {THREE.Camera | null} camera */", + " _hideFarChunks(camera) {", + " if (!camera) return;", + " const worldScale = getWorldScale(this.object);", + " const drawDistance = Math.max(this.object._getDrawDistance(), 1) / worldScale;", + " this.uniforms.scatterDrawDistance.value = drawDistance;", + " this._cameraPosition.setFromMatrixPosition(camera.matrixWorld);", + " for (const chunk of this.chunks) {", + " const distance = this._chunkPosition", + " .copy(chunk.center)", + " .applyMatrix4(this.group.matrixWorld)", + " .distanceTo(this._cameraPosition);", + " const isVisible = distance - chunk.radius / worldScale < drawDistance;", + " for (const mesh of chunk.meshes) mesh.visible = isVisible;", + " }", + " }", + "", + " /**", + " * @param {number} elapsedSeconds", + " * @param {THREE.Camera | null} camera", + " */", + " update(elapsedSeconds, camera) {", + " if (this.placement.shouldPlaceAgain(elapsedSeconds, this._getPlacementKey())) {", + " this.rebuild();", + " }", + " if (!this.changedSamples.isEmpty()) {", + " const { object } = this;", + " const sampleWidth = object.getWidth() / MASK_RESOLUTION;", + " const sampleHeight = object.getHeight() / MASK_RESOLUTION;", + " const { minI, minJ, maxI, maxJ } = this.changedSamples;", + " // Copies between samples use the density of the samples around them.", + " this._rebuildArea(", + " object.getX() + (minI - 1) * sampleWidth,", + " object.getY() + (minJ - 1) * sampleHeight,", + " object.getX() + (maxI + 1) * sampleWidth,", + " object.getY() + (maxJ + 1) * sampleHeight", + " );", + " this.changedSamples.clear();", + " }", + " // The object transformation is applied just before rendering, it's needed now.", + " this.object.getRenderer().ensureUpToDate();", + " this.group.updateWorldMatrix(true, false);", + " this._hideFarChunks(camera);", + " this._updateSurface();", + " }", + "", + " _updateSurface() {", + " const { object } = this;", + " if (typeof object.setSurface !== 'function') return;", + " const trunkKey = object._getTrunkCollisions() + '|' + object._getTrunkDiameter();", + " if (trunkKey !== this.trunkKey) {", + " this.trunkKey = trunkKey;", + " this.version++;", + " }", + " if (object.getSurface() !== this.surface) object.setSurface(this.surface);", + " }", + "", + " /** @returns {Copy[]} */", + " getCopies() {", + " const copies = [];", + " for (const chunk of this.chunks) copies.push(...chunk.copies);", + " return copies;", + " }", + "", + " /**", + " * @returns {Copy | null} The copy whose base is the nearest to a position (on X and Y), if any.", + " */", + " findNearestCopy(x, y) {", + " let nearestCopy = null;", + " let nearestDistanceSquared = Infinity;", + " for (const chunk of this.chunks) {", + " for (const copy of chunk.copies) {", + " const distanceSquared = (copy.x - x) * (copy.x - x) + (copy.y - y) * (copy.y - y);", + " if (distanceSquared < nearestDistanceSquared) {", + " nearestDistanceSquared = distanceSquared;", + " nearestCopy = copy;", + " }", + " }", + " }", + " return nearestCopy;", + " }", + "", + " getCopyCount() {", + " let count = 0;", + " for (const chunk of this.chunks) count += chunk.copies.length;", + " return count;", + " }", + "", + " /** Remove the copies whose base is in a circle (they come back when the scene is restarted). */", + " removeCopies(x, y, radius) {", + " let hasRemovedCopies = false;", + " for (const chunk of this.chunks) {", + " for (const copy of chunk.copies) {", + " if ((copy.x - x) * (copy.x - x) + (copy.y - y) * (copy.y - y) <= radius * radius) {", + " this.removedCopies.set(copy.key, copy);", + " hasRemovedCopies = true;", + " }", + " }", + " }", + " if (hasRemovedCopies) this._rebuildArea(x - radius, y - radius, x + radius, y + radius);", + " }", + "", + " /** Paint the full density around a position, and bring back the copies removed there. */", + " addCopies(x, y, radius) {", + " for (const [key, copy] of this.removedCopies) {", + " if ((copy.x - x) * (copy.x - x) + (copy.y - y) * (copy.y - y) <= radius * radius) {", + " this.removedCopies.delete(key);", + " }", + " }", + " this.paint(x, y, x, y, radius, 1, 1);", + " }", + "", + " _getStroke(x1, y1, x2, y2, radius) {", + " const { object } = this;", + " const stroke = this._stroke;", + " stroke.cellWidth = object.getWidth() / MASK_RESOLUTION;", + " stroke.cellHeight = object.getHeight() / MASK_RESOLUTION;", + " stroke.ax = x1 - object.getX();", + " stroke.ay = y1 - object.getY();", + " stroke.bx = x2 - object.getX();", + " stroke.by = y2 - object.getY();", + " stroke.radius = Math.max(radius, 0);", + " return stroke;", + " }", + "", + " /**", + " * Paint the density around a segment (copies are placed again at the next frame).", + " * @param {number} density From 0 (erase) to 1 (as dense as the Density property).", + " * @param {number} strength From 0 to 1.", + " */", + " paint(x1, y1, x2, y2, radius, density, strength) {", + " const changedSamples = new SampleRectangle();", + " this.mask.paint(this._getStroke(x1, y1, x2, y2, radius), density, strength, changedSamples);", + " this.changedSamples.add(changedSamples);", + " }", + "", + " /** @param {DensityMask} mask */", + " setMask(mask) {", + " this.mask = mask;", + " this.rebuild();", + " }", + "", + " /**", + " * Prisms around the trunks, from 0 to 1 in the object box (see `gdjs.Surface`).", + " * @returns {gdjs.SurfaceTriangles}", + " */", + " _getTrunkTriangles() {", + " const { object } = this;", + " const copies = object._getTrunkCollisions() ? this.getCopies() : [];", + " const verticesPerCopy = TRUNK_SIDES * 2 + 1;", + " const positions = new Float32Array(copies.length * verticesPerCopy * 3);", + " const indices = new Uint32Array(copies.length * TRUNK_SIDES * 3 * 3);", + " const width = object.getWidth() || 1;", + " const height = object.getHeight() || 1;", + " const depth = object.getDepth() || 1;", + " let indexOffset = 0;", + " copies.forEach((copy, copyIndex) => {", + " const legacyHeight = object._getSize();", + " const trunkScale = legacyHeight > 0 ? copy.height / legacyHeight : copy.scale;", + " const radius = (Math.max(object._getTrunkDiameter(), 0) / 2) * trunkScale;", + " // Up to 80% of the model height, at least a bit above the ground.", + " const top = copy.z + copy.height * Math.max(this.model.bottom + 0.8, 0.1);", + " const firstVertex = copyIndex * verticesPerCopy;", + " const setVertex = (vertex, x, y, z) => {", + " positions[vertex * 3] = (x - object.getX()) / width;", + " positions[vertex * 3 + 1] = (y - object.getY()) / height;", + " positions[vertex * 3 + 2] = (z - object.getZ()) / depth;", + " };", + " for (let side = 0; side < TRUNK_SIDES; side++) {", + " const angle = ((side + 0.5) / TRUNK_SIDES) * Math.PI * 2;", + " const x = copy.x + Math.cos(angle) * radius;", + " const y = copy.y + Math.sin(angle) * radius;", + " // Starting a bit under the ground, which can be sloped.", + " setVertex(firstVertex + side * 2, x, y, copy.z - radius);", + " setVertex(firstVertex + side * 2 + 1, x, y, top);", + " }", + " const center = firstVertex + TRUNK_SIDES * 2;", + " setVertex(center, copy.x, copy.y, top);", + " for (let side = 0; side < TRUNK_SIDES; side++) {", + " const bottom = firstVertex + side * 2;", + " const nextBottom = firstVertex + ((side + 1) % TRUNK_SIDES) * 2;", + " // Triangles face out of the prism (vertices at odd indices are at the top).", + " indices.set([bottom, nextBottom, bottom + 1, nextBottom, nextBottom + 1, bottom + 1], indexOffset);", + " indices.set([center, bottom + 1, nextBottom + 1], indexOffset + 6);", + " indexOffset += 9;", + " }", + " });", + " if (copies.length === 0) {", + " // Without triangles, the physics engine and navigation meshes would use", + " // the object box: a tiny triangle under the object is used instead.", + " return { positions: new Float32Array([0, 0, -1, 0.0001, 0, -1, 0, 0.0001, -1]), indices: new Uint32Array([0, 2, 1]) };", + " }", + " return { positions, indices };", + " }", + "", + " dispose() {", + " this.isDisposed = true;", + " if (typeof this.object.setSurface === 'function' && this.object.getSurface() === this.surface) {", + " this.object.setSurface(null);", + " }", + " this._disposeChunks(this.chunks);", + " this._disposeModel();", + " this.group.removeFromParent();", + " }", + "}", + "", + "const scatterToolIcons = {", + " Add: svgIcon(", + " ''", + " ),", + " Erase: svgIcon(", + " ''", + " ),", + "};", + "", + "/**", + " * The brushes shown in the scene editor when scattered models are selected,", + " * to add or erase copies. Without the needed editor functions (older GDevelop", + " * versions), nothing is shown: copies can still be painted with events.", + " */", + "class ScatterEditorTools {", + " constructor() {", + " /** '' when no brush is used. */", + " this.toolName = '';", + " this.sizePercent = 30;", + " this.strengthPercent = 50;", + " /** @type {Scatter | null} */", + " this.scatter = null;", + " /** @type {gdjs.InGameEditor | null} */", + " this.editor = null;", + " this.isStroking = false;", + " this.lastStrokeTime = 0;", + " /** @type {Array<{mask: DensityMask, baseMask: DensityMask}>} */", + " this.undoSteps = [];", + " this.raycaster = new THREE.Raycaster();", + " this.ndc = new THREE.Vector2();", + " this._groundAtCursor = { ground: null, z: 0 };", + " /** A circle following the ground under the cursor. */", + " this.brushRing = new THREE.LineLoop(", + " new THREE.BufferGeometry().setAttribute('position', new THREE.BufferAttribute(new Float32Array(64 * 3), 3)),", + " new THREE.LineBasicMaterial({ color: 0xffffff, depthTest: false, transparent: true })", + " );", + " this.brushRing.renderOrder = 1000;", + " this.brushRing.frustumCulled = false;", + " this.brushRing.raycast = () => {};", + " }", + "", + " /** @param {gdjs.InGameEditor} editor */", + " update(editor) {", + " if (typeof editor.showToolbar !== 'function') return;", + " this.editor = editor;", + " const selectedObjects = editor.getSelectedObjects();", + " const scatter =", + " selectedObjects.length === 1 && selectedObjects[0].__terrainScatter ? selectedObjects[0].__terrainScatter : null;", + " if (scatter !== this.scatter) {", + " this._endStroke();", + " this.scatter = scatter;", + " this.undoSteps.length = 0;", + " }", + " if (scatter) editor.showToolbar('ScatteredModels', this._getToolbarItems());", + " const game = editor.getRuntimeGame();", + " if (!scatter || !this.toolName) {", + " this.brushRing.removeFromParent();", + " return;", + " }", + " const inputManager = game.getInputManager();", + " if (inputManager.wasKeyJustPressed(gdjs.evtTools.input.keysNameToCode.Escape)) {", + " this._endStroke();", + " this.toolName = '';", + " this.brushRing.removeFromParent();", + " return;", + " }", + " editor.captureLeftMouseButton();", + " const hit = this._getPositionUnderCursor(scatter, game);", + " const radius = this._getRadius();", + " this._showBrushRing(scatter, hit, radius);", + "", + " const isPressedForTool =", + " typeof editor.isCapturedLeftMouseButtonPressed === 'function'", + " ? editor.isCapturedLeftMouseButtonPressed()", + " : inputManager.isMouseButtonPressed(0);", + " // The button is released outside the canvas when the mouse is on a toolbar.", + " const isPressed = isPressedForTool && inputManager.isMouseInsideCanvas();", + " if (isPressed && hit && !this.isStroking) {", + " this._startStroke(scatter);", + " }", + " if (this.isStroking && isPressed && hit) {", + " this._applyBrush(scatter, hit, radius);", + " }", + " if (!isPressed) {", + " this._endStroke();", + " }", + " }", + "", + " _getRadius() {", + " const { object } = this.scatter;", + " const maxRadius = Math.max(object.getWidth(), object.getHeight()) / 4;", + " return Math.max(maxRadius * Math.pow(this.sizePercent / 100, 2), 10);", + " }", + "", + " /**", + " * @returns {{x: number, y: number} | null} The position of the scene under the cursor: on the", + " * highest ground hit, or on the plane at the object Z.", + " */", + " _getPositionUnderCursor(scatter, game) {", + " let hit = null;", + " for (const ground of getGrounds(scatter.object.getRuntimeScene())) {", + " if (typeof ground.raycastFromCursor !== 'function') continue;", + " const localHit = ground.raycastFromCursor(game, this.raycaster, this.ndc);", + " if (!localHit) continue;", + " const sceneHit = ground.toScenePosition(localHit);", + " if (!hit || sceneHit.z > hit.z) hit = sceneHit;", + " }", + " if (hit) return hit;", + "", + " const { object } = scatter;", + " const camera = getCamera(object);", + " if (!camera) return null;", + " const inputManager = game.getInputManager();", + " this.ndc.set(", + " (inputManager.getCursorX() / game.getGameResolutionWidth()) * 2 - 1,", + " -(inputManager.getCursorY() / game.getGameResolutionHeight()) * 2 + 1", + " );", + " this.raycaster.setFromCamera(this.ndc, camera);", + " scatter.group.updateWorldMatrix(true, false);", + " const ray = this.raycaster.ray.clone().applyMatrix4(scatter.group.matrixWorld.clone().invert());", + " const point = ray.intersectPlane(new THREE.Plane(new THREE.Vector3(0, 0, 1), 0), new THREE.Vector3());", + " if (!point) return null;", + " return {", + " x: object.getX() + (point.x / AREA_SIZE) * object.getWidth(),", + " y: object.getY() + (point.y / AREA_SIZE) * object.getHeight(),", + " };", + " }", + "", + " _showBrushRing(scatter, hit, radius) {", + " if (!hit) {", + " this.brushRing.removeFromParent();", + " return;", + " }", + " const { object } = scatter;", + " if (this.brushRing.parent !== scatter.group) scatter.group.add(this.brushRing);", + " const grounds = getGrounds(object.getRuntimeScene());", + " const positions = this.brushRing.geometry.attributes.position;", + " for (let index = 0; index < positions.count; index++) {", + " const angle = (index / positions.count) * Math.PI * 2;", + " const x = hit.x + Math.cos(angle) * radius;", + " const y = hit.y + Math.sin(angle) * radius;", + " const { ground, z } = findHighestGround(grounds, x, y, this._groundAtCursor);", + " positions.setXYZ(", + " index,", + " ((x - object.getX()) / object.getWidth()) * AREA_SIZE,", + " ((y - object.getY()) / object.getHeight()) * AREA_SIZE,", + " (((ground ? z : object.getZ()) + 2 - object.getZ()) / Math.max(object.getDepth(), 0.0001)) * AREA_DEPTH", + " );", + " }", + " positions.needsUpdate = true;", + " }", + "", + " _startStroke(scatter) {", + " this.isStroking = true;", + " this.lastStrokeTime = performance.now();", + " this.undoSteps.push({ mask: scatter.mask.clone(), baseMask: scatter.baseMask });", + " while (this.undoSteps.length > 30) this.undoSteps.shift();", + " }", + "", + " _endStroke() {", + " if (!this.isStroking) return;", + " this.isStroking = false;", + " this._save();", + " }", + "", + " _applyBrush(scatter, hit, radius) {", + " const now = performance.now();", + " const elapsedSeconds = Math.min((now - this.lastStrokeTime) / 1000, 0.1);", + " this.lastStrokeTime = now;", + " const strength = (this.strengthPercent / 100) * elapsedSeconds * 8;", + " scatter.paint(hit.x, hit.y, hit.x, hit.y, radius, this.toolName === 'Add' ? 1 : 0, strength);", + " }", + "", + " _save() {", + " const { scatter, editor } = this;", + " if (!scatter || !editor) return;", + " editor.updateObjectProperties(scatter.object.getName(), { PaintData: scatter.save() });", + " }", + "", + " _undo() {", + " const undoStep = this.undoSteps.pop();", + " // The coverage or the edits may have changed since the stroke.", + " if (!this.scatter || !undoStep || undoStep.baseMask !== this.scatter.baseMask) {", + " this.undoSteps.length = 0;", + " return;", + " }", + " this.scatter.setMask(undoStep.mask);", + " this._save();", + " }", + "", + " /** @returns {Array} */", + " _getToolbarItems() {", + " const toolButton = (toolName, tooltip) => ({", + " type: 'button',", + " id: toolName,", + " tooltip,", + " iconUrl: scatterToolIcons[toolName],", + " isActive: this.toolName === toolName,", + " onClick: () => (this.toolName = this.toolName === toolName ? '' : toolName),", + " });", + " return [", + " toolButton('Add', 'Add copies (drag on the ground)'),", + " toolButton('Erase', 'Erase copies'),", + " { type: 'divider', id: 'BrushDivider' },", + " {", + " type: 'slider',", + " id: 'Size',", + " tooltip: 'Brush size',", + " iconUrl: toolIcons.Size,", + " min: 1,", + " max: 100,", + " value: this.sizePercent,", + " onChange: (value) => (this.sizePercent = value),", + " },", + " {", + " type: 'slider',", + " id: 'Strength',", + " tooltip: 'Brush strength',", + " iconUrl: toolIcons.Strength,", + " min: 5,", + " max: 100,", + " value: this.strengthPercent,", + " onChange: (value) => (this.strengthPercent = value),", + " },", + " {", + " type: 'button',", + " id: 'Undo',", + " tooltip: 'Undo the last stroke on these scattered models',", + " iconUrl: toolIcons.Undo,", + " onClick: () => this._undo(),", + " },", + " ];", + " }", + "}", + "", + "const editorTools = new ScatterEditorTools();", + "if (gdjs.registerInGameEditorPostStepCallback) {", + " gdjs.registerInGameEditorPostStepCallback((editor) => editorTools.update(editor));", + "}", + "", + "gdjs.__terrainScatterExtension = {", + " Scatter,", + " // Exposed for tests.", + " DensityMask,", + " maskCodec,", + " applyEdits,", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Create an object at the position, angle and scale of the copy of scattered models nearest to a position, and optionally erase that copy. The created object stays picked, so you apply actions to it right after.", + "fullName": "Replace the nearest copy with an object", + "functionType": "Action", + "name": "ReplaceNearestCopyWithObject", + "sentence": "Replace the copy of _PARAM1_ nearest to _PARAM5_; _PARAM6_ with _PARAM2_ (erase the copy: _PARAM7_)", + "events": [ + { + "aiGeneratedEventId": "01M6WAPE2W8KS8P2871Y641HST", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CopyX", + "=", + "ScatterObject.NearestCopyX(X, Y)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CopyY", + "=", + "ScatterObject.NearestCopyY(X, Y)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CopyZ", + "=", + "ScatterObject.NearestCopyZ(CopyX, CopyY)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CopyAngle", + "=", + "ScatterObject.NearestCopyAngle(CopyX, CopyY)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CopyScale", + "=", + "ScatterObject.NearestCopyScale(CopyX, CopyY)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CopyScale", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "EraseTheCopy", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Terrain3D::ScatteredModels::EraseCopies" + }, + "parameters": [ + "ScatterObject", + "CopyX", + "CopyY", + "1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "ObjectToCreate", + "CopyX", + "CopyY", + "ScatterObject.Layer()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "ObjectToCreate", + "Object3DBehavior", + "=", + "CopyZ" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "ObjectToCreate", + "=", + "CopyAngle" + ] + }, + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "ObjectToCreate", + "ScaleBehavior", + "=", + "CopyScale" + ] + } + ] + } + ] + } + ], + "variables": [ + { + "name": "CopyX", + "type": "number", + "value": 0 + }, + { + "name": "CopyY", + "type": "number", + "value": 0 + }, + { + "name": "CopyZ", + "type": "number", + "value": 0 + }, + { + "name": "CopyAngle", + "type": "number", + "value": 0 + }, + { + "name": "CopyScale", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Scattered models", + "name": "ScatterObject", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "objectList" + }, + { + "description": "Object to create", + "name": "ObjectToCreate", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D behavior", + "name": "Object3DBehavior", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "Scale behavior", + "name": "ScaleBehavior", + "supplementaryInformation": "ScalableCapability::ScalableBehavior", + "type": "behavior" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Erase the copy", + "name": "EraseTheCopy", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "DefineGrassHelperClasses" + }, + { + "functionName": "DefineScatterHelperClasses" + }, + { + "functionName": "ReplaceNearestCopyWithObject" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 4096, + "areaMaxY": 4096, + "areaMaxZ": 600, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "3d terrains", + "defaultName": "Terrain", + "description": "A ground with hills, mountains or valleys that can be sculpted and painted in the scene editor, or changed with events. Add the 3D physics behavior to it to make objects walk or roll on it.", + "fullName": "3D terrain", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRlcnJhaW4iIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQsNkwxMC4yNSwxMUwxMy4xLDE0LjhMMTEuNSwxNkM5LjgxLDEzLjc1IDcsMTAgNywxMEwxLDE4SDIzTDE0LDZaIiAvPjwvc3ZnPg==", + "is3D": true, + "isUsingLegacyInstancesRenderer": true, + "name": "Terrain3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/10e0a26c0d500830dfe23b94138beb0ef61607ba62bca05a5aa5c849777f1b06_terrain.svg", + "objects": [ + { + "assetStoreId": "", + "name": "AreaPlaceholder", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 4096, + "height": 4096, + "depth": 600, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "backFaceUpThroughWhichAxisRotation": "X", + "materialType": "Basic", + "tint": "255;255;255", + "frontFaceResourceName": "", + "frontFaceVisible": false, + "frontFaceResourceRepeat": false, + "backFaceResourceName": "", + "backFaceVisible": false, + "backFaceResourceRepeat": false, + "leftFaceResourceName": "", + "leftFaceVisible": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceName": "", + "rightFaceVisible": false, + "rightFaceResourceRepeat": false, + "topFaceResourceName": "", + "topFaceVisible": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceName": "", + "bottomFaceVisible": false, + "bottomFaceResourceRepeat": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "AreaPlaceholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 600, + "height": 4096, + "keepRatio": true, + "layer": "", + "name": "AreaPlaceholder", + "persistentUuid": "5d7a8b1e-3c2f-4e6a-9b1d-004096004096", + "width": 4096, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Terrain3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "for (const child of object.getChildrenContainer().getAdhocListOfAllInstances()) {", + " child.deleteFromScene();", + "}", + "if (object.__terrain3D) object.__terrain3D.dispose();", + "object.__terrain3D = new gdjs.__terrain3DExtension.Terrain(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrain3D.dispose();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrain3D.update();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrain3D.onHotReloading();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Raise the ground around a position (or lower it with a negative height). It's raised the most at the center and less and less up to the radius.", + "fullName": "Raise or lower the ground", + "functionType": "Action", + "group": "Sculpt", + "name": "RaiseGround", + "sentence": "Raise the ground of _PARAM0_ by _PARAM4_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const height = eventsFunctionContext.getArgument(\"Height\");", + "object.__terrain3D.raise(x, y, x, y, radius, height);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Height to add (negative to lower the ground)", + "name": "Height", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Raise the ground along a line, for example for a ridge, or lower it with a negative height to dig a river bed or a valley.", + "fullName": "Raise or lower the ground along a line", + "functionType": "Action", + "group": "Sculpt", + "name": "RaiseGroundAlongLine", + "sentence": "Raise the ground of _PARAM0_ by _PARAM6_ from _PARAM1_; _PARAM2_ to _PARAM3_; _PARAM4_ with a radius of _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x1 = eventsFunctionContext.getArgument(\"X1\");", + "const y1 = eventsFunctionContext.getArgument(\"Y1\");", + "const x2 = eventsFunctionContext.getArgument(\"X2\");", + "const y2 = eventsFunctionContext.getArgument(\"Y2\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const height = eventsFunctionContext.getArgument(\"Height\");", + "object.__terrain3D.raise(x1, y1, x2, y2, radius, height);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the start", + "name": "X1", + "type": "expression" + }, + { + "description": "Y position of the start", + "name": "Y1", + "type": "expression" + }, + { + "description": "X position of the end", + "name": "X2", + "type": "expression" + }, + { + "description": "Y position of the end", + "name": "Y2", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance from the line.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Height to add (negative to lower the ground)", + "name": "Height", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Flatten the ground around a position to a given height, for example to place a building.", + "fullName": "Flatten the ground", + "functionType": "Action", + "group": "Sculpt", + "name": "FlattenGround", + "sentence": "Flatten the ground of _PARAM0_ to a Z of _PARAM4_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const z = eventsFunctionContext.getArgument(\"Z\");", + "object.__terrain3D.flatten(x, y, x, y, radius, z, 1);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Z position of the flat ground", + "name": "Z", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Smooth the ground around a position, softening bumps and cliffs.", + "fullName": "Smooth the ground", + "functionType": "Action", + "group": "Sculpt", + "name": "SmoothGround", + "sentence": "Smooth the ground of _PARAM0_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_ (strength: _PARAM4_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const strength = eventsFunctionContext.getArgument(\"Strength\");", + "object.__terrain3D.smooth(x, y, x, y, radius, strength);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Strength (between 0 and 1)", + "name": "Strength", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Paint a layer (like grass, dirt, rock or sand) on the ground around a position.", + "fullName": "Paint a layer", + "functionType": "Action", + "group": "Paint", + "name": "PaintLayer", + "sentence": "Paint layer _PARAM4_ on _PARAM0_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const layer = eventsFunctionContext.getArgument(\"Layer\");", + "object.__terrain3D.paint(x, y, x, y, radius, layer, 1);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Layer (1 to 4)", + "name": "Layer", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Paint a layer on the ground along a line, for example for a path or a road.", + "fullName": "Paint a layer along a line", + "functionType": "Action", + "group": "Paint", + "name": "PaintLayerAlongLine", + "sentence": "Paint layer _PARAM6_ on _PARAM0_ from _PARAM1_; _PARAM2_ to _PARAM3_; _PARAM4_ with a radius of _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x1 = eventsFunctionContext.getArgument(\"X1\");", + "const y1 = eventsFunctionContext.getArgument(\"Y1\");", + "const x2 = eventsFunctionContext.getArgument(\"X2\");", + "const y2 = eventsFunctionContext.getArgument(\"Y2\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const layer = eventsFunctionContext.getArgument(\"Layer\");", + "object.__terrain3D.paint(x1, y1, x2, y2, radius, layer, 1);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the start", + "name": "X1", + "type": "expression" + }, + { + "description": "Y position of the start", + "name": "Y1", + "type": "expression" + }, + { + "description": "X position of the end", + "name": "X2", + "type": "expression" + }, + { + "description": "Y position of the end", + "name": "Y2", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance from the line.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Layer (1 to 4)", + "name": "Layer", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tint the ground around a position with a color multiplying its layers, like dry grass or darker mud. White removes the tint.", + "fullName": "Tint the ground", + "functionType": "Action", + "group": "Paint", + "name": "TintGround", + "sentence": "Tint the ground of _PARAM0_ with _PARAM4_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const color = gdjs.rgbOrHexToRGBColor(eventsFunctionContext.getArgument(\"Color\"));", + "object.__terrain3D.tint(x, y, x, y, radius, color, 1);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Color", + "name": "Color", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Make the ground around a position wet (darker and shiny, like after rain or near water) or dry.", + "fullName": "Change the wetness of the ground", + "functionType": "Action", + "group": "Paint", + "name": "WetGround", + "sentence": "Change the wetness of the ground of _PARAM0_ to _PARAM4_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const wetness = eventsFunctionContext.getArgument(\"Wetness\");", + "object.__terrain3D.wet(x, y, x, y, radius, wetness, 1);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "longDescription": "The effect fades out smoothly up to this distance.", + "name": "Radius", + "type": "expression" + }, + { + "description": "Wetness (from 0 for dry to 1)", + "name": "Wetness", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the wetness of the ground at a position, from 0 (dry) to 1, painted or near the water (wet shore).", + "fullName": "Ground wetness", + "functionType": "ExpressionAndCondition", + "group": "Paint", + "name": "GroundWetness", + "sentence": "the wetness of the ground at _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "eventsFunctionContext.returnValue = object.__terrain3D.getWetnessAt(x, y);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The tint painted on the ground at a position, like \"255;255;255\" (white when there is none).", + "fullName": "Ground tint", + "functionType": "StringExpression", + "group": "Paint", + "name": "GroundTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "eventsFunctionContext.returnValue = object.__terrain3D.getTintAt(x, y).join(\";\");" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Remove the ground in a circle, for the entrance of a tunnel, a cave or a well: there is nothing drawn and no collision there. Fill it again with the \"Fill holes\" action. A height field can't go under itself: put a 3D model (with a collision shape) for the tunnel or the cave under the ground. The physics engine removes the triangles touching a hole, so the hole in the collisions can be up to a cell larger than the one drawn: make the model go a bit further than the hole, or put rocks around the entrance.", + "fullName": "Make a hole", + "functionType": "Action", + "group": "Holes", + "name": "MakeHole", + "sentence": "Make a hole in _PARAM0_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "object.__terrain3D.makeHole(x, y, x, y, radius);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "name": "Radius", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fill the holes in a circle with the layers of the ground around them: the ground is drawn and has collisions again.", + "fullName": "Fill holes", + "functionType": "Action", + "group": "Holes", + "name": "FillHoles", + "sentence": "Fill the holes in _PARAM0_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "object.__terrain3D.fillHoles(x, y, x, y, radius);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "name": "Radius", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Make the entrance of a tunnel or a cave on a slope: a hole, with the ground in front of it flattened to the floor of the tunnel.", + "fullName": "Carve an entrance", + "functionType": "Action", + "group": "Holes", + "name": "CarveEntrance", + "sentence": "Carve an entrance in _PARAM0_ at _PARAM1_; _PARAM2_ with a radius of _PARAM3_, going in at _PARAM4_° with its floor at Z _PARAM5_ and _PARAM6_ pixels of flat ground in front", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "const floorZ = eventsFunctionContext.getArgument(\"FloorZ\");", + "const length = eventsFunctionContext.getArgument(\"Length\");", + "object.__terrain3D.carveEntrance(x, y, radius, angle, floorZ, length);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "name": "Radius", + "type": "expression" + }, + { + "description": "Direction going into the ground (in degrees)", + "name": "Angle", + "type": "expression" + }, + { + "description": "Z position of the floor", + "name": "FloorZ", + "type": "expression" + }, + { + "description": "Length of the flat ground in front of the entrance (in pixels)", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if there is a hole in the ground at a position.", + "fullName": "Hole", + "functionType": "Condition", + "group": "Holes", + "name": "IsHole", + "sentence": "There is a hole in _PARAM0_ at _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "eventsFunctionContext.returnValue = object.__terrain3D.isHoleAt(x, y);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The Z position of the ground at a position, or the given value where there is a hole.", + "fullName": "Ground Z position, with holes", + "functionType": "Expression", + "group": "Holes", + "name": "GroundZWithHoles", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const terrain = object.__terrain3D;", + "eventsFunctionContext.returnValue = terrain.isHoleAt(x, y) ? eventsFunctionContext.getArgument(\"ZInHoles\") : terrain.getHeightAt(x, y);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + }, + { + "description": "Value in holes", + "longDescription": "For example, a Z position far under the ground.", + "name": "ZInHoles", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Replace the ground with a generated relief. Painted layers are reset.", + "fullName": "Generate a relief", + "functionType": "Action", + "group": "Generation", + "name": "GenerateRelief", + "sentence": "Generate a relief of _PARAM1_ on _PARAM0_ with seed _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const relief = eventsFunctionContext.getArgument(\"Relief\");", + "const seed = eventsFunctionContext.getArgument(\"Seed\");", + "object.__terrain3D.generate(relief, seed);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "Relief", + "name": "Relief", + "supplementaryInformation": "[\"Flat\", \"Hills\", \"Mountains\", \"Island\"]", + "type": "stringWithSelector" + }, + { + "description": "Seed", + "longDescription": "Each seed gives a different terrain with the same relief.", + "name": "Seed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Replace the ground with the heights of an image. Painted layers are kept.", + "fullName": "Load a heightmap", + "functionType": "Action", + "group": "Generation", + "name": "LoadHeightmap", + "sentence": "Load the heights of _PARAM0_ from _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const image = eventsFunctionContext.getArgument(\"Image\");", + "object.__terrain3D.loadHeightmap(image);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "Heightmap image", + "longDescription": "Black is the lowest, white the highest. For more precision, store the height on 16 bits in the red (most significant byte) and green channels.", + "name": "Image", + "type": "imageResource" + } + ], + "objectGroups": [] + }, + { + "description": "Move objects up or down so that their bottom is on the ground, under their center. Useful to place trees, rocks or characters on a terrain.", + "fullName": "Put objects on the ground", + "functionType": "Action", + "group": "Position", + "name": "PutOnGround", + "sentence": "Put _PARAM1_ on the ground of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrain3D.placeOnGround(eventsFunctionContext.getObjects(\"Objects\"));" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "Objects to put on the ground", + "name": "Objects", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "the Z position of the ground at a position of the scene.", + "fullName": "Ground Z position", + "functionType": "ExpressionAndCondition", + "group": "Position", + "name": "GroundZ", + "sentence": "the ground Z position at _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "eventsFunctionContext.returnValue = object.__terrain3D.getHeightAt(x, y);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the slope of the ground (angle with the horizontal, in degrees) at a position of the scene.", + "fullName": "Ground slope", + "functionType": "ExpressionAndCondition", + "group": "Position", + "name": "GroundSlope", + "sentence": "the ground slope at _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "eventsFunctionContext.returnValue = object.__terrain3D.getSlopeAt(x, y);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the layer (from 1 to 4) painted the most at a position of the scene. Useful to play footstep sounds or to slow down characters in water or mud.", + "fullName": "Ground layer", + "functionType": "ExpressionAndCondition", + "group": "Paint", + "name": "GroundLayer", + "sentence": "the ground layer at _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "eventsFunctionContext.returnValue = object.__terrain3D.getLayerAt(x, y);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::Terrain3D", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "folderName": "Sculpt", + "children": [ + { + "functionName": "RaiseGround" + }, + { + "functionName": "RaiseGroundAlongLine" + }, + { + "functionName": "FlattenGround" + }, + { + "functionName": "SmoothGround" + } + ] + }, + { + "folderName": "Paint", + "children": [ + { + "functionName": "PaintLayer" + }, + { + "functionName": "PaintLayerAlongLine" + }, + { + "functionName": "TintGround" + }, + { + "functionName": "WetGround" + }, + { + "functionName": "GroundWetness" + }, + { + "functionName": "GroundTint" + }, + { + "functionName": "GroundLayer" + } + ] + }, + { + "folderName": "Holes", + "children": [ + { + "functionName": "MakeHole" + }, + { + "functionName": "FillHoles" + }, + { + "functionName": "CarveEntrance" + }, + { + "functionName": "IsHole" + }, + { + "functionName": "GroundZWithHoles" + } + ] + }, + { + "folderName": "Generation", + "children": [ + { + "functionName": "GenerateRelief" + }, + { + "functionName": "LoadHeightmap" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "PutOnGround" + }, + { + "functionName": "GroundZ" + }, + { + "functionName": "GroundSlope" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "Hills", + "type": "Choice", + "label": "Relief", + "description": "The initial shape, before sculpting.", + "group": "Shape", + "choices": [ + { + "label": "Flat", + "value": "Flat" + }, + { + "label": "Hills", + "value": "Hills" + }, + { + "label": "Mountains", + "value": "Mountains" + }, + { + "label": "Island", + "value": "Island" + } + ], + "name": "Relief" + }, + { + "value": "1", + "type": "Number", + "label": "Seed", + "description": "Each seed gives a different terrain with the same relief.", + "group": "Shape", + "name": "Seed" + }, + { + "value": "", + "type": "Resource", + "label": "Heightmap image", + "description": "Optional. Replaces the relief: black is the lowest, white the highest (the object depth).", + "group": "Shape", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "HeightmapImage" + }, + { + "value": "", + "type": "MultilineString", + "label": "Edits", + "description": "Changes of the relief or heightmap, applied in order, as a JSON list, for example [{\"tool\": \"raise\", \"x\": 0.3, \"y\": 0.4, \"radius\": 0.15, \"height\": 0.4}, {\"tool\": \"paint\", \"x\": 0.1, \"y\": 0.9, \"toX\": 0.8, \"toY\": 0.2, \"radius\": 0.02, \"layer\": 2}]. Tools: raise (height added to the ground, negative to lower), flatten (z: the ground is brought to this height, fully at the center, cutting what is above it and filling what is below; with toX and toY, toZ gives the height at the end of the line, for a road going up), smooth (strength), paint (layer, from 1 to 4, and strength), tint (color, like \"120;140;60\", multiplying the layers, white removing the tint, and strength), wetness (amount, from 0 for dry to 1 for wet, and strength), hole (no ground in the radius, for the entrances of tunnels and caves) and fill (the holes in the radius are filled with the layers of the ground around them). x, y and radius are fractions (0 to 1) of the terrain size (x is (scene X - terrain X) / terrain width). height and z are fractions of its depth: the ground at z is at Z = terrain Z + z * terrain depth. Add toX and toY to change the ground along a line (paths, rivers, ridges). Shown in the scene editor.", + "group": "Shape", + "advanced": true, + "name": "Edits" + }, + { + "value": "256", + "type": "Choice", + "label": "Resolution", + "description": "The number of cells on each side of the terrain. Higher is more detailed but slower.", + "group": "Shape", + "choices": [ + { + "label": "64 x 64", + "value": "64" + }, + { + "label": "128 x 128", + "value": "128" + }, + { + "label": "256 x 256", + "value": "256" + }, + { + "label": "512 x 512", + "value": "512" + }, + { + "label": "1024 x 1024", + "value": "1024" + } + ], + "name": "Resolution" + }, + { + "value": "96;160;64", + "type": "Color", + "label": "Layer 1 color (grass)", + "group": "Layers", + "name": "Layer1Color" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 1 texture", + "description": "Optional. Tinted by the layer color.", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer1Texture" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 1 normal map", + "description": "Optional. The bumps of the texture, lit by the lights (an OpenGL normal map, like the textures of ambientCG).", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer1NormalMap" + }, + { + "value": "150;112;72", + "type": "Color", + "label": "Layer 2 color (dirt)", + "group": "Layers", + "name": "Layer2Color" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 2 texture", + "description": "Optional. Tinted by the layer color.", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer2Texture" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 2 normal map", + "description": "Optional. The bumps of the texture, lit by the lights (an OpenGL normal map, like the textures of ambientCG).", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer2NormalMap" + }, + { + "value": "124;118;112", + "type": "Color", + "label": "Layer 3 color (rock)", + "group": "Layers", + "name": "Layer3Color" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 3 texture", + "description": "Optional. Tinted by the layer color.", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer3Texture" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 3 normal map", + "description": "Optional. The bumps of the texture, lit by the lights (an OpenGL normal map, like the textures of ambientCG).", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer3NormalMap" + }, + { + "value": "224;204;148", + "type": "Color", + "label": "Layer 4 color (sand)", + "group": "Layers", + "name": "Layer4Color" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 4 texture", + "description": "Optional. Tinted by the layer color.", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer4Texture" + }, + { + "value": "", + "type": "Resource", + "label": "Layer 4 normal map", + "description": "Optional. The bumps of the texture, lit by the lights (an OpenGL normal map, like the textures of ambientCG).", + "group": "Layers", + "extraInformation": [ + "image" + ], + "choices": [], + "name": "Layer4NormalMap" + }, + { + "value": "1", + "type": "Number", + "label": "Normal map strength", + "description": "How much the normal maps bump the ground: 0 for none, 1 as they are, more to exaggerate them.", + "group": "Layers", + "name": "NormalMapStrength" + }, + { + "value": "256", + "type": "Number", + "unit": "Pixel", + "label": "Texture size", + "description": "The size, in the scene, of one repetition of the layer textures.", + "group": "Layers", + "name": "TextureSize" + }, + { + "value": "0.5", + "type": "Number", + "label": "Height blending", + "description": "Where layers meet, the bright parts of textures (stones, tufts) cover the dark ones (gaps, sand) instead of fading into each other: 0 for none, 1 for the most.", + "group": "Layers", + "name": "HeightBlending" + }, + { + "value": "0.5", + "type": "Number", + "label": "Texture variation", + "description": "Makes the repetition of textures less visible, with patches of bigger and rotated textures and colors slowly varying: 0 for none, 1 for the most.", + "group": "Layers", + "name": "TextureVariation" + }, + { + "value": "false", + "type": "Boolean", + "label": "Wet shore", + "description": "Make the ground wet (darker and shiny) under a Z position, like the sand of a beach near the water.", + "group": "Wetness", + "name": "WetShore" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Wet below Z", + "description": "The ground is wet under this Z position (for example, the Z of a 3D water object).", + "group": "Wetness", + "name": "WetShoreZ" + }, + { + "value": "60", + "type": "Number", + "unit": "Pixel", + "label": "Wet shore fade", + "description": "The ground becomes dry over this height above \"Wet below Z\".", + "group": "Wetness", + "name": "WetShoreFade" + }, + { + "value": "3", + "type": "Choice", + "label": "Layer on steep slopes", + "description": "This layer is shown where the ground is steep, whatever is painted.", + "group": "Layers", + "choices": [ + { + "label": "None", + "value": "0" + }, + { + "label": "Layer 1", + "value": "1" + }, + { + "label": "Layer 2", + "value": "2" + }, + { + "label": "Layer 3", + "value": "3" + }, + { + "label": "Layer 4", + "value": "4" + } + ], + "name": "CliffLayer" + }, + { + "value": "45", + "type": "Number", + "unit": "DegreeAngle", + "label": "Steep slope angle", + "group": "Layers", + "name": "CliffAngle" + }, + { + "value": "true", + "type": "Boolean", + "label": "Cast shadows", + "group": "Rendering", + "name": "CastShadow" + }, + { + "value": "true", + "type": "Boolean", + "label": "Receive shadows", + "group": "Rendering", + "name": "ReceiveShadow" + }, + { + "value": "4", + "type": "Choice", + "label": "Anisotropic filtering", + "description": "Keeps layer textures sharp where the ground is seen at a low angle (like from a car). Lower is faster on slow graphics cards, but blurs the ground in the distance.", + "group": "Rendering", + "choices": [ + { + "label": "None (fastest)", + "value": "1" + }, + { + "label": "2x", + "value": "2" + }, + { + "label": "4x", + "value": "4" + }, + { + "label": "8x", + "value": "8" + }, + { + "label": "16x (sharpest)", + "value": "16" + } + ], + "advanced": true, + "name": "Anisotropy" + }, + { + "value": "", + "type": "String", + "label": "Sculpted and painted data", + "description": "Written by the sculpt and paint tools of the scene editor, in a compact format not meant to be read or written by hand: use Edits instead. Clear it to go back to the relief, heightmap and edits.", + "advanced": true, + "name": "SculptData" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Shape", + "children": [ + { + "propertyName": "Relief" + }, + { + "propertyName": "Seed" + }, + { + "propertyName": "HeightmapImage" + }, + { + "propertyName": "Edits" + }, + { + "propertyName": "Resolution" + } + ] + }, + { + "folderName": "Layers", + "children": [ + { + "propertyName": "Layer1Color" + }, + { + "propertyName": "Layer1Texture" + }, + { + "propertyName": "Layer1NormalMap" + }, + { + "propertyName": "Layer2Color" + }, + { + "propertyName": "Layer2Texture" + }, + { + "propertyName": "Layer2NormalMap" + }, + { + "propertyName": "Layer3Color" + }, + { + "propertyName": "Layer3Texture" + }, + { + "propertyName": "Layer3NormalMap" + }, + { + "propertyName": "Layer4Color" + }, + { + "propertyName": "Layer4Texture" + }, + { + "propertyName": "Layer4NormalMap" + }, + { + "propertyName": "NormalMapStrength" + }, + { + "propertyName": "TextureSize" + }, + { + "propertyName": "HeightBlending" + }, + { + "propertyName": "TextureVariation" + }, + { + "propertyName": "CliffLayer" + }, + { + "propertyName": "CliffAngle" + } + ] + }, + { + "folderName": "Wetness", + "children": [ + { + "propertyName": "WetShore" + }, + { + "propertyName": "WetShoreZ" + }, + { + "propertyName": "WetShoreFade" + } + ] + }, + { + "folderName": "Rendering", + "children": [ + { + "propertyName": "CastShadow" + }, + { + "propertyName": "ReceiveShadow" + }, + { + "propertyName": "Anisotropy" + } + ] + }, + { + "propertyName": "SculptData" + } + ] + }, + "variants": [] + }, + { + "areaMaxX": 1000, + "areaMaxY": 1000, + "areaMaxZ": 40, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Grass", + "description": "A field of grass blades swaying in the wind and pushed aside by characters. They grow in the area of the object, on the highest 3D terrain at each point (one field can cover several terrains), or at the Z position of the object where there is no terrain.", + "fullName": "Terrain grass", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zIDIxYzEtNSAxLTkgMC0xMyAyIDMgMyA3IDMgMTN6bTQgMGMwLTYgMS0xMSA0LTE2LTEgNS0xIDEwIDAgMTZ6bTUgMGMwLTUgMi05IDUtMTItMiA0LTIgOC0xIDEyem01IDBjMS00IDItNiA0LTgtMSAzLTEgNS0xIDh6Ii8+PC9zdmc+", + "is3D": true, + "isUsingLegacyInstancesRenderer": true, + "name": "TerrainGrass", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/732ef90b7fcf5dd9171fe95d0cf262e09159b487304915a4693baa893d9ce16c_grass.svg", + "objects": [ + { + "assetStoreId": "", + "name": "AreaPlaceholder", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 1000, + "height": 1000, + "depth": 40, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "backFaceUpThroughWhichAxisRotation": "X", + "materialType": "Basic", + "tint": "255;255;255", + "frontFaceResourceName": "", + "frontFaceVisible": false, + "frontFaceResourceRepeat": false, + "backFaceResourceName": "", + "backFaceVisible": false, + "backFaceResourceRepeat": false, + "leftFaceResourceName": "", + "leftFaceVisible": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceName": "", + "rightFaceVisible": false, + "rightFaceResourceRepeat": false, + "topFaceResourceName": "", + "topFaceVisible": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceName": "", + "bottomFaceVisible": false, + "bottomFaceResourceRepeat": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "AreaPlaceholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 40, + "height": 1000, + "keepRatio": true, + "layer": "", + "name": "AreaPlaceholder", + "persistentUuid": "5d7a8b1e-3c2f-4e6a-9b1d-001000001000", + "width": 1000, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Terrain3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Terrain3D::DefineGrassHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "for (const child of object.getChildrenContainer().getAdhocListOfAllInstances()) {", + " child.deleteFromScene();", + "}", + "if (object.__terrainGrass) object.__terrainGrass.dispose();", + "object.__terrainGrass = new gdjs.__terrainGrassExtension.Grass(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::TerrainGrass", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrainGrass.dispose();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::TerrainGrass", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const game = runtimeScene.getGame();", + "// Time doesn't pass in the scene editor: real time is used to show the wind.", + "const isInGameEdition = game.isInGameEdition && game.isInGameEdition();", + "const elapsedTime = isInGameEdition ? 1 / 60 : object.getElapsedTime() / 1000;", + "const time = isInGameEdition", + " ? performance.now() / 1000", + " : object.getRuntimeScene().getTimeManager().getTimeFromStart() / 1000;", + "object.__terrainGrass.update(elapsedTime, time, gdjs.__terrain3DExtension.getCamera(object));" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::TerrainGrass", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrainGrass.updateFromProperties();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::TerrainGrass", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + } + ] + }, + "propertyDescriptors": [ + { + "value": "60", + "type": "Number", + "label": "Density", + "description": "The number of blades in a square of 100 x 100 pixels.", + "group": "Blades", + "name": "Density" + }, + { + "value": "36", + "type": "Number", + "unit": "Pixel", + "label": "Blade height", + "description": "The average height of blades (each blade is between 60% and 140% of it).", + "group": "Blades", + "name": "BladeHeight" + }, + { + "value": "5", + "type": "Number", + "unit": "Pixel", + "label": "Blade width", + "group": "Blades", + "name": "BladeWidth" + }, + { + "value": "52;104;36", + "type": "Color", + "label": "Base color", + "group": "Blades", + "name": "BaseColor" + }, + { + "value": "150;196;82", + "type": "Color", + "label": "Tip color", + "group": "Blades", + "name": "TipColor" + }, + { + "value": "1", + "type": "Number", + "label": "Seed", + "description": "Each seed places blades differently.", + "group": "Blades", + "name": "Seed" + }, + { + "value": "1", + "type": "Choice", + "label": "Grows on terrain layer", + "description": "On a 3D terrain, blades only grow where this layer is painted. A new terrain has layer 1 painted everywhere.", + "group": "Ground", + "choices": [ + { + "label": "Any", + "value": "0" + }, + { + "label": "Layer 1", + "value": "1" + }, + { + "label": "Layer 2", + "value": "2" + }, + { + "label": "Layer 3", + "value": "3" + }, + { + "label": "Layer 4", + "value": "4" + } + ], + "name": "GroundLayer" + }, + { + "value": "40", + "type": "Number", + "unit": "DegreeAngle", + "label": "Maximum slope", + "description": "No blades grow on steeper ground.", + "group": "Ground", + "name": "MaxSlope" + }, + { + "value": "1", + "type": "Number", + "label": "Wind strength", + "description": "0 for no wind.", + "group": "Wind", + "name": "WindStrength" + }, + { + "value": "2", + "type": "Number", + "label": "Wind speed", + "group": "Wind", + "name": "WindSpeed" + }, + { + "value": "", + "type": "String", + "label": "Object bending the grass", + "description": "The name of an object pushing blades aside when walking through the grass, like the player. The 8 first instances are used.", + "group": "Wind", + "name": "BendingObject" + }, + { + "value": "2500", + "type": "Number", + "unit": "Pixel", + "label": "Fade distance", + "description": "Blades are less and less dense up to this distance from the camera, and hidden after.", + "group": "Rendering", + "name": "FadeDistance" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Blades", + "children": [ + { + "propertyName": "Density" + }, + { + "propertyName": "BladeHeight" + }, + { + "propertyName": "BladeWidth" + }, + { + "propertyName": "BaseColor" + }, + { + "propertyName": "TipColor" + }, + { + "propertyName": "Seed" + } + ] + }, + { + "folderName": "Ground", + "children": [ + { + "propertyName": "GroundLayer" + }, + { + "propertyName": "MaxSlope" + } + ] + }, + { + "folderName": "Wind", + "children": [ + { + "propertyName": "WindStrength" + }, + { + "propertyName": "WindSpeed" + }, + { + "propertyName": "BendingObject" + } + ] + }, + { + "folderName": "Rendering", + "children": [ + { + "propertyName": "FadeDistance" + } + ] + } + ] + }, + "variants": [] + }, + { + "areaMaxX": 2000, + "areaMaxY": 2000, + "areaMaxZ": 200, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "3d scattered models", + "defaultName": "ScatteredModels", + "description": "Many copies of a 3D model (trees, rocks, bushes, flowers...) placed in the area of the object and drawn all at once, which is much faster than an object for each one. They stand on the highest 3D terrain at each point, or at the Z position of the object where there is no terrain. Paint where they grow with the brushes of the scene editor.", + "fullName": "Scattered models (forests, rocks...)", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCAyMXYtM0gzbDUtNUg1bDUtNUg3bDUtNSA1IDVoLTNsNSA1aC0zbDUgNWgtN3YzeiIvPjwvc3ZnPg==", + "is3D": true, + "isUsingLegacyInstancesRenderer": true, + "name": "ScatteredModels", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "name": "AreaPlaceholder", + "persistentUuid": "06ba5ea9-2e29-4867-90ba-dd3268867171", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 2000, + "height": 2000, + "depth": 200, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "backFaceUpThroughWhichAxisRotation": "X", + "materialType": "Basic", + "tint": "255;255;255", + "frontFaceResourceName": "", + "frontFaceVisible": false, + "frontFaceResourceRepeat": false, + "backFaceResourceName": "", + "backFaceVisible": false, + "backFaceResourceRepeat": false, + "leftFaceResourceName": "", + "leftFaceVisible": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceName": "", + "rightFaceVisible": false, + "rightFaceResourceRepeat": false, + "topFaceResourceName": "", + "topFaceVisible": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceName": "", + "bottomFaceVisible": false, + "bottomFaceResourceRepeat": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "AreaPlaceholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 200, + "height": 2000, + "keepRatio": true, + "layer": "", + "name": "AreaPlaceholder", + "persistentUuid": "5d7a8b1e-3c2f-4e6a-9b1d-002000002000", + "width": 2000, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.35, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Terrain3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Terrain3D::DefineScatterHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "for (const child of object.getChildrenContainer().getAdhocListOfAllInstances()) {", + " child.deleteFromScene();", + "}", + "if (object.__terrainScatter) object.__terrainScatter.dispose();", + "object.__terrainScatter = new gdjs.__terrainScatterExtension.Scatter(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrainScatter.dispose();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const game = runtimeScene.getGame();", + "const isInGameEdition = game.isInGameEdition && game.isInGameEdition();", + "const elapsedTime = isInGameEdition ? 1 / 60 : object.getElapsedTime() / 1000;", + "object.__terrainScatter.update(elapsedTime, gdjs.__terrain3DExtension.getCamera(object));" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "object.__terrainScatter.onHotReloading();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Paint the density of copies around a position, up to the density of the object (copies removed with \"Erase copies\" come back). The effect fades out up to the radius.", + "fullName": "Add copies", + "functionType": "Action", + "group": "Paint", + "name": "AddCopies", + "sentence": "Add copies of _PARAM0_ around _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "object.__terrainScatter.addCopies(x, y, radius);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "name": "Radius", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Remove the copies standing in a circle, for example a tree cut by the player (use the position of the nearest copy and a small radius) or a forest cleared for a building. They come back when the scene is restarted.", + "fullName": "Erase copies", + "functionType": "Action", + "group": "Paint", + "name": "EraseCopies", + "sentence": "Erase the copies of _PARAM0_ in a circle at _PARAM1_; _PARAM2_ with a radius of _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const radius = eventsFunctionContext.getArgument(\"Radius\");", + "object.__terrainScatter.removeCopies(x, y, radius);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position of the center", + "name": "X", + "type": "expression" + }, + { + "description": "Y position of the center", + "name": "Y", + "type": "expression" + }, + { + "description": "Radius", + "name": "Radius", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the number of copies placed in the area.", + "fullName": "Number of copies", + "functionType": "ExpressionAndCondition", + "group": "Copies", + "name": "CopyCount", + "sentence": "the number of copies", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "eventsFunctionContext.returnValue = object.__terrainScatter.getCopyCount();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "The X position of the base of the copy nearest to a position (the position itself if there is no copy).", + "fullName": "X position of the nearest copy", + "functionType": "Expression", + "group": "Copies", + "name": "NearestCopyX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const copy = object.__terrainScatter.findNearestCopy(x, y);", + "eventsFunctionContext.returnValue = copy ? copy.x : x;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The Y position of the base of the copy nearest to a position (the position itself if there is no copy).", + "fullName": "Y position of the nearest copy", + "functionType": "Expression", + "group": "Copies", + "name": "NearestCopyY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const copy = object.__terrainScatter.findNearestCopy(x, y);", + "eventsFunctionContext.returnValue = copy ? copy.y : y;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The Z position of the base of the copy nearest to a position (on the ground).", + "fullName": "Z position of the nearest copy", + "functionType": "Expression", + "group": "Copies", + "name": "NearestCopyZ", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const copy = object.__terrainScatter.findNearestCopy(x, y);", + "eventsFunctionContext.returnValue = copy ? copy.z : object.getZ();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the distance (on X and Y) from a position to the base of the nearest copy. It's a very big number when there is no copy.", + "fullName": "Distance to the nearest copy", + "functionType": "ExpressionAndCondition", + "group": "Copies", + "name": "NearestCopyDistance", + "sentence": "the distance from _PARAM1_; _PARAM2_ to the nearest copy", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const copy = object.__terrainScatter.findNearestCopy(x, y);", + "eventsFunctionContext.returnValue = copy ? Math.hypot(copy.x - x, copy.y - y) : Number.MAX_VALUE;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The angle (in degrees, around the Z axis) of the copy nearest to a position (0 when there is no copy).", + "fullName": "Angle of the nearest copy", + "functionType": "Expression", + "group": "Copies", + "name": "NearestCopyAngle", + "sentence": "", + "events": [ + { + "aiGeneratedEventId": "01M6W13A1GCBRR93J2V6ZPRBYZ", + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const copy = object.__terrainScatter.findNearestCopy(x, y);", + "eventsFunctionContext.returnValue = copy ? (copy.angle * 180) / Math.PI : 0;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The scale factor of the copy nearest to a position (1 = the model at its original size, 0 when there is no copy).", + "fullName": "Scale of the nearest copy", + "functionType": "Expression", + "group": "Copies", + "name": "NearestCopyScale", + "sentence": "", + "events": [ + { + "aiGeneratedEventId": "01M6W15Y2Y5KXQHWMS0ZX3RSMT", + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */", + "const object = objects[0];", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "const copy = object.__terrainScatter.findNearestCopy(x, y);", + "eventsFunctionContext.returnValue = copy ? copy.scale : 0;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Terrain3D::ScatteredModels", + "type": "object" + }, + { + "description": "X position", + "name": "X", + "type": "expression" + }, + { + "description": "Y position", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "folderName": "Paint", + "children": [ + { + "functionName": "AddCopies" + }, + { + "functionName": "EraseCopies" + } + ] + }, + { + "folderName": "Copies", + "children": [ + { + "functionName": "CopyCount" + }, + { + "functionName": "NearestCopyX" + }, + { + "functionName": "NearestCopyY" + }, + { + "functionName": "NearestCopyZ" + }, + { + "functionName": "NearestCopyDistance" + }, + { + "functionName": "NearestCopyAngle" + }, + { + "functionName": "NearestCopyScale" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Resource", + "label": "3D model", + "description": "The model copied everywhere (a .glb file).", + "group": "Model", + "extraInformation": [ + "model3D" + ], + "choices": [], + "name": "Model" + }, + { + "value": "Y", + "type": "Choice", + "label": "Model up axis", + "description": "The axis the model stands on in the file. Most models of the asset store stand on Y, they are stood up along Z.", + "group": "Model", + "choices": [ + { + "label": "Y (like most models)", + "value": "Y" + }, + { + "label": "Z (like the scene)", + "value": "Z" + } + ], + "name": "ModelUpAxis" + }, + { + "value": "ModelOrigin", + "type": "Choice", + "label": "Point put on the ground", + "description": "The point of the model put on the ground, also at the center of the trunk collision. Use the origin of the model when the trunk is not at the center of the model (asymmetric canopy, leaning tree), or to sink the base of copies in the ground on slopes.", + "group": "Model", + "choices": [ + { + "label": "Center of the model base", + "value": "BaseCenter" + }, + { + "label": "Origin of the model", + "value": "ModelOrigin" + } + ], + "name": "ModelAnchor" + }, + { + "value": "100", + "type": "Number", + "unit": "Dimensionless", + "label": "Scale factor of a copy", + "description": "The size of a copy, in percent of the original model size (100 = the model at its original size, like a 3D model object with a scale of 1). For objects made before this property, like the ones of the asset store, it is a percent of their former height of a copy. Copies keep the proportions of the model.", + "group": "Model", + "name": "ScaleFactor" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Height of a copy", + "description": "Kept for objects made before \"Scale factor of a copy\": when greater than 0, copies have this height, multiplied by the scale factor.", + "group": "Model", + "deprecated": true, + "name": "Size" + }, + { + "value": "0.8", + "type": "Number", + "label": "Smallest random scale", + "description": "Each copy is scaled at random between the smallest and the largest scale.", + "group": "Model", + "name": "MinScale" + }, + { + "value": "1.2", + "type": "Number", + "label": "Largest random scale", + "group": "Model", + "name": "MaxScale" + }, + { + "value": "true", + "type": "Boolean", + "label": "Random rotation", + "description": "Turn each copy around the Z axis at random.", + "group": "Model", + "name": "RandomRotation" + }, + { + "value": "255;255;255", + "type": "Color", + "label": "Random tint", + "description": "Each copy is tinted between white and this color, at random. White for no tint.", + "group": "Model", + "name": "RandomTint" + }, + { + "value": "0.3", + "type": "Number", + "label": "Density", + "description": "The number of copies in a square of 100 x 100 pixels where the density is fully painted (0.3 is about one copy every 180 pixels). Copies never overlap their neighbors much: they are placed at random in a grid.", + "group": "Placement", + "name": "Density" + }, + { + "value": "1", + "type": "Number", + "label": "Seed", + "description": "Each seed places copies differently.", + "group": "Placement", + "name": "Seed" + }, + { + "value": "Everywhere", + "type": "Choice", + "label": "Copies grow", + "description": "Everywhere in the area, or only where they are painted with the \"Add copies\" brush (or the edits).", + "group": "Placement", + "choices": [ + { + "label": "Everywhere (erase them with the brush)", + "value": "Everywhere" + }, + { + "label": "Only where painted", + "value": "Painted" + } + ], + "name": "Coverage" + }, + { + "value": "1", + "type": "Choice", + "label": "Grows on terrain layer", + "description": "On a 3D terrain, copies only grow where this layer is painted, away from its borders (so that trees don't stand on roads painted with another layer). A new terrain has layer 1 painted everywhere.", + "group": "Ground", + "choices": [ + { + "label": "Any", + "value": "0" + }, + { + "label": "Layer 1", + "value": "1" + }, + { + "label": "Layer 2", + "value": "2" + }, + { + "label": "Layer 3", + "value": "3" + }, + { + "label": "Layer 4", + "value": "4" + } + ], + "name": "GroundLayer" + }, + { + "value": "30", + "type": "Number", + "unit": "DegreeAngle", + "label": "Maximum slope", + "description": "No copies grow on steeper ground.", + "group": "Ground", + "name": "MaxSlope" + }, + { + "value": "-100000", + "type": "Number", + "unit": "Pixel", + "label": "Minimum ground Z", + "description": "No copies grow where the ground is lower (for example, under the water level).", + "group": "Ground", + "name": "MinGroundZ" + }, + { + "value": "100000", + "type": "Number", + "unit": "Pixel", + "label": "Maximum ground Z", + "description": "No copies grow where the ground is higher (for example, above the tree line).", + "group": "Ground", + "name": "MaxGroundZ" + }, + { + "value": "false", + "type": "Boolean", + "label": "Trunk collisions", + "description": "Give each copy a static collision shape around its trunk, for the 3D physics behavior (add it to this object, with the \"Static\" type) and navigation meshes. Without them, these behaviors have no effect on this object.", + "group": "Collisions", + "name": "TrunkCollisions" + }, + { + "value": "30", + "type": "Number", + "unit": "Pixel", + "label": "Trunk diameter", + "description": "The diameter of the collision shape of a copy at the scale given in \"Scale factor of a copy\" (it is scaled with the copy).", + "group": "Collisions", + "name": "TrunkDiameter" + }, + { + "value": "8000", + "type": "Number", + "unit": "Pixel", + "label": "Draw distance", + "description": "Copies shrink and are hidden at this distance from the camera.", + "group": "Rendering", + "name": "DrawDistance" + }, + { + "value": "true", + "type": "Boolean", + "label": "Cast shadows", + "group": "Rendering", + "name": "CastShadow" + }, + { + "value": "true", + "type": "Boolean", + "label": "Receive shadows", + "group": "Rendering", + "name": "ReceiveShadow" + }, + { + "value": "", + "type": "MultilineString", + "label": "Edits", + "description": "Where copies are added or erased, applied in order, as a JSON list, for example [{\"tool\": \"add\", \"x\": 0.3, \"y\": 0.4, \"radius\": 0.15}, {\"tool\": \"erase\", \"x\": 0.1, \"y\": 0.9, \"toX\": 0.8, \"toY\": 0.2, \"radius\": 0.02}]. Tools: add (density: from 0 to 1, 1 by default, how dense copies are compared to the Density property) and erase. strength (from 0 to 1) makes a stroke lighter. x, y and radius are fractions (0 to 1) of the object size (x is (scene X - object X) / object width). Add toX and toY to paint along a line (a row of trees, a path through a forest). With \"Copies grow: only where painted\", only the added areas have copies. Shown in the scene editor.", + "group": "Placement", + "advanced": true, + "name": "Edits" + }, + { + "value": "", + "type": "String", + "label": "Painted data", + "description": "Written by the brushes of the scene editor, in a compact format not meant to be read or written by hand: use Edits instead. Clear it to go back to the coverage and the edits.", + "advanced": true, + "name": "PaintData" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Model", + "children": [ + { + "propertyName": "Model" + }, + { + "propertyName": "ModelUpAxis" + }, + { + "propertyName": "ModelAnchor" + }, + { + "propertyName": "ScaleFactor" + }, + { + "propertyName": "MinScale" + }, + { + "propertyName": "MaxScale" + }, + { + "propertyName": "RandomRotation" + }, + { + "propertyName": "RandomTint" + }, + { + "propertyName": "Size" + } + ] + }, + { + "folderName": "Placement", + "children": [ + { + "propertyName": "Density" + }, + { + "propertyName": "Seed" + }, + { + "propertyName": "Coverage" + }, + { + "propertyName": "Edits" + } + ] + }, + { + "folderName": "Ground", + "children": [ + { + "propertyName": "GroundLayer" + }, + { + "propertyName": "MaxSlope" + }, + { + "propertyName": "MinGroundZ" + }, + { + "propertyName": "MaxGroundZ" + } + ] + }, + { + "folderName": "Collisions", + "children": [ + { + "propertyName": "TrunkCollisions" + }, + { + "propertyName": "TrunkDiameter" + } + ] + }, + { + "folderName": "Rendering", + "children": [ + { + "propertyName": "DrawDistance" + }, + { + "propertyName": "CastShadow" + }, + { + "propertyName": "ReceiveShadow" + } + ] + }, + { + "propertyName": "PaintData" + } + ] + }, + "variants": [] + } + ] + }, + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Touch steering wheel and pedals", + "gdevelopVersion": ">=5.5.230", + "helpPath": "", + "iconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "name": "MultitouchDrivingControls", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "shortDescription": "A steering wheel and pedals for touchscreens, for racing and driving games.", + "version": "1.0.0", + "description": [ + "Turn a sprite into a steering wheel or a pedal for touchscreens:", + "- The **steering wheel** turns with a touch and moves a stick of a multitouch controller to the left or to the right.", + "- The **gas pedal** pushes a stick up, and the **brake pedal** pushes it down.", + "", + "They work like the multitouch joysticks: add a \"multitouch mapper\" behavior to the vehicle (for example the 3D car mapper, which steers with the primary stick and accelerates with the secondary stick) and it is driven without any event.", + "The value of the wheel can also be read with an expression, to move a vehicle with events.", + "", + "Ready-to-use steering wheels and pedals in many styles are in the asset store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." + ], + "origin": { + "identifier": "MultitouchDrivingControls", + "name": "gdevelop-extension-store" + }, + "tags": [ + "steering wheel", + "pedal", + "racing", + "car", + "driving", + "touchscreen", + "mobile", + "joystick", + "controls" + ], + "authorIds": [ + "R0F5QGNCzgOY5w2cxGeKJOq2UaD2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "requiredExtensions": [ + { + "extensionName": "SpriteMultitouchJoystick", + "extensionVersion": "1.9.3" + } + ], + "eventsBasedBehaviors": [ + { + "description": "Turn the object like a steering wheel with a touch. It moves the stick of a multitouch controller to the left or to the right, like the joysticks do, so the mapper behaviors (for example the 3D car mapper) work with it.", + "fullName": "Touch steering wheel", + "helpPath": "", + "iconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "name": "SteeringWheel", + "objectType": "", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Hold the wheel with a touch (or the mouse) that starts on it." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))", + "<=", + "Object.Width() / 2" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastTouchAngle", + "=", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn the wheel by the angle the touch moved around its center, up to the maximum angle." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchAngle", + "=", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer()), TouchY(TouchId, Object.Layer()))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "WheelAngle", + "=", + "clamp(WheelAngle + AngleDifference(TouchAngle, LastTouchAngle), -MaxAngle, MaxAngle)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastTouchAngle", + "=", + "TouchAngle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Once released, the wheel turns back to the center." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "WheelAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "WheelAngle", + "=", + "sign(WheelAngle) * max(0, abs(WheelAngle) - ReturnSpeed * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "WheelAngle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the stick of the multitouch controller: to the right when the wheel turns clockwise. An idle wheel leaves the stick alone, so that a joystick can use it too." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "WheelAngle", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsMovingStick", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "WheelAngle", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "WheelAngle / MaxAngle", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "WheelAngle", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "-WheelAngle / MaxAngle", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "180", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "WheelAngle", + "=", + "0" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsMovingStick", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsMovingStick", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "0", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MultitouchDrivingControls::SteeringWheel", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Steering wheel is held", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Steering wheel _PARAM0_ is held", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MultitouchDrivingControls::SteeringWheel", + "type": "behavior" + } + ], + "objectGroups": [], + "description": "Check if the steering wheel is held by a touch." + }, + { + "fullName": "Steering value", + "functionType": "Expression", + "name": "Value", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "WheelAngle / MaxAngle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MultitouchDrivingControls::SteeringWheel", + "type": "behavior" + } + ], + "objectGroups": [], + "description": "How much the wheel is turned, from -1 (fully to the left) to 1 (fully to the right).", + "expressionType": { + "type": "expression" + } + }, + { + "fullName": "Wheel angle", + "functionType": "Expression", + "name": "WheelAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "WheelAngle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MultitouchDrivingControls::SteeringWheel", + "type": "behavior" + } + ], + "objectGroups": [], + "description": "The angle of the wheel, in degrees (negative to the left).", + "expressionType": { + "type": "expression" + } + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "group": "Controls", + "unit": "Dimensionless" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick", + "name": "JoystickIdentifier", + "description": "The stick of the multitouch controller that it moves.", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ] + }, + { + "value": "120", + "type": "Number", + "label": "Maximum angle of the wheel", + "name": "MaxAngle", + "description": "The wheel is fully turned at this angle, in degrees.", + "unit": "DegreeAngle" + }, + { + "value": "360", + "type": "Number", + "label": "Speed of the return to the center", + "name": "ReturnSpeed", + "description": "In degrees per second, once the wheel is released.", + "unit": "AngularSpeed" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "TouchId", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "TouchIndex", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "TouchAngle", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "LastTouchAngle", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "WheelAngle", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "name": "IsMovingStick", + "hidden": true + } + ] + }, + { + "description": "Press the object like a pedal with a touch. It pushes the stick of a multitouch controller up (accelerate) or down (brake or reverse), like the joysticks do, so the mapper behaviors (for example the 3D car mapper) work with it.", + "fullName": "Touch pedal", + "helpPath": "", + "iconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "name": "Pedal", + "objectType": "", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Press the pedal with a touch (or the mouse) that starts on it." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer())", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "WasReleased", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PedalAngle", + "=", + "-90" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PedalAngle", + "=", + "90" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "While pressed, push the stick of the multitouch controller fully up (accelerate) or down (brake or reverse)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "1", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "PedalAngle", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Once released, put the stick back to the center, unless another pedal pushes it the other way." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "WasReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "WasReleased", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "=", + "PedalAngle" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "0", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MultitouchDrivingControls::Pedal", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Pedal is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Pedal _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "MultitouchDrivingControls::Pedal", + "type": "behavior" + } + ], + "objectGroups": [], + "description": "Check if the pedal is pressed by a touch." + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "group": "Controls", + "unit": "Dimensionless" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Joystick", + "name": "JoystickIdentifier", + "description": "The stick of the multitouch controller that it moves.", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ] + }, + { + "value": "Up", + "type": "Choice", + "label": "Pushes the stick", + "name": "Direction", + "description": "Up to accelerate (gas pedal), down to brake or reverse (brake pedal).", + "group": "Controls", + "choices": [ + { + "label": "Up (accelerate)", + "value": "Up" + }, + { + "label": "Down (brake)", + "value": "Down" + } + ] + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "TouchId", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "TouchIndex", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "PedalAngle", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "name": "WasReleased", + "hidden": true + } + ] + } + ], + "eventsBasedObjects": [] + } + ], + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/3d-car-touch-controls/README.md b/examples/3d-car-touch-controls/README.md new file mode 100644 index 000000000..9cb8a8940 --- /dev/null +++ b/examples/3d-car-touch-controls/README.md @@ -0,0 +1,10 @@ +# 3D car touch controls + +Two ways to drive a 3D car on a touchscreen: a floating joystick or a steering wheel to steer, with gas and brake pedals. + +The car has the "3D car multitouch mapper" behavior, which reads the sticks of the multitouch controller: the primary stick steers and the secondary stick accelerates or brakes. No event drives the car: +- The **floating joystick** appears where the left side of the screen is touched, and follows the finger. +- The **steering wheel** is turned with the finger (switch to it with the text at the top right, or the C key). +- The **gas and brake pedals** push the secondary stick up or down while they are pressed. + +The keyboard (arrows) still works too. diff --git a/examples/3d-car-touch-controls/assets/Flat dark joystick border horizontal.png b/examples/3d-car-touch-controls/assets/Flat dark joystick border horizontal.png new file mode 100644 index 0000000000000000000000000000000000000000..4f772d873797453c44bb85fc6df481926391d4fa GIT binary patch literal 4013 zcmV;e4^r@nP)005u}1^@s6i_d2*00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3labT3lag+-G2N4000McNliru>IW4L8Up%JUjzUE4?0Oi zK~#9!?VW9GTi1EVe-BC76e-2B!<)#C1F*G<(y13KfLpljJ_tyHDOiHdLxTorhPkMN zET5VH87q(cxagN+93zfahyI?JuD)Jfdjx- zfJ_apPRawazz4v)z&P-(>$(LCV8DR`Mu3NaZvw+zfUOxQCxKr9W58HgfDAN%sZ?sO zhY}xQ$c--T~eO-f~?xX8|__C@#=QnRCK7;R3;3cYy0DP-xG)jMe|IOc3l|rFFxm@-;ggM~5 zuIr9j0B_Ir;v#aqR^9qLX%^v*JMKW_cGIaUpMU;2s%k=h=o@b+K7cPHB5zP#iQ;?p z_xBTxMpyk`xm;#`e%_QKWfFMYb=~Y%UPNSzL++Cz@}4R1B@&4>;kyxzmlYNOq;=hZf{GVzH|iE?tH%4g3-V7Y>NXy5Vl}Eg!Tew9LE_6 z1c0ejY7{ud%1@D5`B#0wsaoHe3*Z;`9~`ZX@!1tD<|!^BZ+vn8!Hz=Mu^e#U{(~b@ z^?dQq@*msoG*CNIdjLwRJTjdZw_8}3up_gH6~&w4`R;H%dZTK?)(cCu|N zt=r}S)0yFTMfG(y7-Y7d&{+5YhLGs%>GW{ScL2sj|5jkMO%1j3AAC3TP^?$~v0dkF z%Utl#{)0~fKWM7PPxN!WIB$F2EckBdYdf96>8trG=e9ft+;`vo8BuwU7RUN*PG}r_ zH&jCPfvN1dO|2)~R0vLIhU230I-3}1w&B=F_yFRFyphff$F~f?nCNlZ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