{ "author": "https://github.com/FlokiTV", "category": "", "extensionNamespace": "", "fullName": "Plane Projection", "helpPath": "https://github.com/FlokiTV/GDevelop-Plane-Projection", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMSwyMyAxLDkgMTYsMSAzMSw5IDMxLDIzICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiwxNSAxLDIzIDE2LDMxIDMxLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMTYsMSAxNiwxNSAyMSw5IDI0LDE1IDI2LDEzIDMxLDIzICIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTYuOSwxNS45bDMuOC0yLjJjMC44LTAuNCwxLjMtMS4zLDEuMy0yLjJ2LTAuMWMwLTEuOS0yLjEtMy4xLTMuOC0yLjFsMCwwQzcuNSw5LjcsNywxMC41LDcsMTEuNFYxM2wtMS4zLDAuNg0KCUM1LjMsMTMuOSw1LDE0LjMsNSwxNC44djBDNSwxNS44LDYuMSwxNi40LDYuOSwxNS45eiIvPg0KPC9zdmc+DQo=", "name": "PlaneProjection", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Virtual Reality/Virtual Reality_3d_room_vr_scene.svg", "shortDescription": "Plane Projection", "version": "beta 0.0.1", "description": "", "tags": [], "authorIds": [ "nopQpwNfA7acPQcwExwWmp1NgLZ2" ], "dependencies": [], "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onScenePreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Camera Scale", "comment2": "" }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "runtimeScene.getVariables().get(\"CAMERA_STACK\").setValue(1)\nconst MAIN = runtimeScene.getLayer().getRenderer().getRendererObject().parent\nconst ISOMETRIC = runtimeScene.getVariables().get(\"CAMERA_STACK\").getValue() == 1 ? true : false\nconst LAYER = runtimeScene.getLayer()\nwindow.MAIN = MAIN\nwindow.LAYER = LAYER\n\nMAIN.scale.y = 0.5\nMAIN.pivot.y = -((LAYER.getCameraHeight()*LAYER.getCameraZoom())/2)\n", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": true }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Camera Angle", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ModVarScene" }, "parameters": [ "camAngle", "=", "round(mod(CameraAngle()+90,360))" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Camera Arm System", "comment2": "" }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let layer = runtimeScene.getLayer()\nlet angle = runtimeScene.getVariables().get(\"camAngle\").getValue()\nvar r = 250 //size of arm\n\nlet rotation = 90//layer.getCameraRotation() + 90\nlet quad = parseInt( angle % 360 / 90 )\n\nruntimeScene.getVariables().get(\"camQuad\").setValue(quad)\n\nruntimeScene.getVariables().get(\"_armX\").setNumber(layer.getCameraX() + r * Math.cos(gdjs.toRad(angle)))\nruntimeScene.getVariables().get(\"_armY\").setNumber(layer.getCameraY() + r * Math.sin(gdjs.toRad(angle)))\n\nruntimeScene.getVariables().get(\"armX2\").setNumber(layer.getCameraX() + r * Math.cos(gdjs.toRad(180)))\nruntimeScene.getVariables().get(\"armY2\").setNumber(layer.getCameraY() + r * Math.sin(gdjs.toRad(180)))\n\nif(angle > 180){\n rotation = -90\n}\nif(angle > 270 || angle < 90){\n runtimeScene.getVariables().get(\"armX2\").setNumber(layer.getCameraX() + r * Math.cos(gdjs.toRad(0)))\n runtimeScene.getVariables().get(\"armY2\").setNumber(layer.getCameraY() + r * Math.sin(gdjs.toRad(0)))\n}\n\nlet rot = gdjs.toRad(rotation)\n\nvar dx = r * Math.cos(rot);\nvar dy = r * Math.sin(rot);\n\nlet x2 = layer.getCameraX() + dx\nlet y2 = layer.getCameraY() + dy\n\nruntimeScene.getVariables().get(\"armX\").setNumber(x2)\nruntimeScene.getVariables().get(\"armY\").setNumber(y2)\n\n\n", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": true } ] } ], "parameters": [], "objectGroups": [] }, { "description": "Normalize Layer to non 3D scale", "fullName": "Normalize Layer to non 3D scale", "functionType": "Action", "name": "NormalizeLayer", "sentence": "Normalize _PARAM1_ to non 3D scale", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "const normalize = (val, max, min) => (val - min) / (max - min)\nlet ISOMETRIC = runtimeScene.getVariables().get(\"CAMERA_STACK\").getValue() == 1 ? true : false\nlet layer = runtimeScene.getLayer(eventsFunctionContext.getArgument(\"Layer\"))\nlet pixiContainer = layer._renderer._pixiContainer\nconst angle = -gdjs.toRad(layer.getCameraRotation())\n\nif(ISOMETRIC){\n pixiContainer.scale.y = 2\n pixiContainer.pivot.y = layer.getCameraHeight() / 4\n}\n\nif(false){\n let rot = runtimeScene.getLayer().getCameraRotation()%360\n if(rot < 0) rot = rot+360\n // let an = gdjs.toRad(rot)\n // an = normalize(an, Math.PI, 0)\n rot = parseFloat(normalize(rot, 360, 0))\n\n let zoom = layer.getCameraZoom()\n let zoomFactor = zoom //- (zoom * rot) \n let zoomFactory = zoom //- (zoom * rot / 2) \n\n pixiContainer.scale.x = zoomFactor //+ (zoomFactor * an);\n pixiContainer.scale.y = zoomFactory //+ (zoomFactory * an);\n const cosValue = Math.cos(angle);\n const sinValue = Math.sin(angle);\n const centerX =\n layer.getCameraX() * zoomFactor * cosValue -\n layer.getCameraY() * zoomFactory * sinValue;\n const centerY =\n layer.getCameraX() * zoomFactor * sinValue +\n layer.getCameraY() * zoomFactory * cosValue;\n\n pixiContainer.position.x = -centerX;\n pixiContainer.position.y = -centerY;\n pixiContainer.position.x +=layer.getWidth() / 2;\n pixiContainer.position.y +=layer.getHeight() / 2;\n}\n", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": true }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [] } ], "parameters": [ { "description": "Layer", "name": "Layer", "type": "layer" } ], "objectGroups": [] }, { "description": "Set layer to follow camera", "fullName": "Follow base layer", "functionType": "Action", "name": "FollowBaseLayer", "sentence": "Follow base layer: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "runtimeScene.getLayer(eventsFunctionContext.getArgument(\"Layer\")).followBaseLayer(true)", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false } ], "parameters": [ { "description": "Layer name", "name": "Layer", "type": "layer" } ], "objectGroups": [] }, { "description": "Rotate camera with LeftMouse", "fullName": "Rotate camera with LeftMouse", "functionType": "Action", "name": "HandleCameraRotation", "sentence": "Camera rotation sensitivity _PARAM1_", "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "Camera Rotation", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "if(window._CameraInstall) return\nwindow._CameraInstall = true\nwindow.dragging = false\nconst normalize = (val, max, min) => (val - min) / (max - min)\nvar layer = runtimeScene.getLayer()\nvar canvas = runtimeScene.getRenderer().getPIXIRenderer().view\n\ndocument.addEventListener(\"mousemove\", e => {\n if(dragging){\n let sens = parseFloat(eventsFunctionContext.getArgument(\"Sensitivity\")) /10\n let r = layer.getCameraRotation()\n layer.setCameraRotation(r + sens * e.movementX)\n // runtimeScene.getLayer(\"shadow\").setCameraRotation(r + sens * e.movementX)\n div.innerText = \"X position: \" + e.movementX + \", Y position: \" + e.movementY \n }\n}, false)\n\nlet div = document.createElement('div')\ndiv.style.position = \"fixed\"\ndiv.style.zIndex = \"999\"\ndiv.innerText = \" \"\ndiv.style.top = 10 +\"px\"\ndiv.style.left = 200 +\"px\"\n//document.querySelector('body').appendChild(div) //Debug mousemove values\n", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": true } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "MouseButtonPressed" }, "parameters": [ "", "Right" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "var canvas = runtimeScene.getRenderer().getPIXIRenderer().view\ncanvas.requestPointerLock()\nwindow.dragging = true", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "MouseButtonPressed" }, "parameters": [ "", "Right" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "document.exitPointerLock()\nwindow.dragging = false", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false } ] } ], "parameters": [] } ], "parameters": [ { "description": "Sensitivity", "name": "Sensitivity", "type": "expression" } ], "objectGroups": [] }, { "description": "Create a box", "fullName": "Create a box", "functionType": "Action", "name": "MakeBox", "sentence": "Make a box on _PARAM1_ from _PARAM2_", "events": [ { "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let obj = objects[0]\nlet _obj = obj.getRendererObject()\nif(!obj.getVariables().has(\"_x\")){\n let vx = new gdjs.Variable()\n vx.setValue(obj.getCenterXInScene())\n obj.getVariables().add(\"_x\", vx)\n let vy = new gdjs.Variable()\n vy.setValue(obj.getCenterYInScene())\n obj.getVariables().add(\"_y\", vy)\n console.log(\"MakeBox\")\n}\n", "parameterObjects": "Base", "useStrict": true, "eventsSheetExpanded": true } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Base", "_x", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Base", "_y", "!=", "0" ] }, { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "1 - Top", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Sprite", "Base.CenterX()", "Base.CenterY()", "\"\"" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "Sprite", "=", "1" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Sprite", "=", "Base.CenterX()", "=", "Base.CenterY()-Base.Height()*1.25" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_pos", "=", "1" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Sprite", "Base" ] }, { "type": { "value": "ChangeScaleWidth" }, "parameters": [ "Sprite", "=", "Base.ScaleX()" ] }, { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Sprite", "=", "Base.ScaleY()" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "3 - Bottom", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Sprite", "Base.CenterX()", "Base.CenterY()", "\"\"" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "Sprite", "=", "3" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Sprite", "=", "Base.CenterX()", "=", "Base.CenterY()-Base.Height()*.25" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_pos", "=", "3" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Sprite", "Base" ] }, { "type": { "value": "ChangeScaleWidth" }, "parameters": [ "Sprite", "=", "Base.ScaleX()" ] }, { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Sprite", "=", "Base.ScaleY()" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "4 - Left", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Sprite", "Base.CenterX()", "Base.CenterY()", "\"\"" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "Sprite", "=", "4" ] }, { "type": { "value": "PlaneProjection::Project::setAxis" }, "parameters": [ "Sprite", "bh", "\"Y\"", "" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Sprite", "=", "Base.CenterX()-Base.Width()*.5", "=", "Base.CenterY()-Base.Height()*.75" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_pos", "=", "4" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Sprite", "Base" ] }, { "type": { "value": "ChangeScaleWidth" }, "parameters": [ "Sprite", "=", "Base.ScaleX()" ] }, { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Sprite", "=", "Base.ScaleY()" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "2 - Right", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Sprite", "Base.CenterX()", "Base.CenterY()", "\"\"" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "Sprite", "=", "2" ] }, { "type": { "value": "PlaneProjection::Project::setAxis" }, "parameters": [ "Sprite", "bh", "\"Y\"", "" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Sprite", "=", "Base.CenterX()+Base.Width()*.5", "=", "Base.CenterY()-Base.Height()*.75" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_pos", "=", "2" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Sprite", "Base" ] }, { "type": { "value": "ChangeScaleWidth" }, "parameters": [ "Sprite", "=", "Base.ScaleX()" ] }, { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Sprite", "=", "Base.ScaleY()" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "5 - Roof", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Sprite", "Base.CenterX()", "Base.CenterY()", "\"\"" ] }, { "type": { "value": "ActivateBehavior" }, "parameters": [ "Sprite", "bh", "no" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_pos", "=", "5" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "Sprite", "=", "5" ] }, { "type": { "value": "ChangeScaleWidth" }, "parameters": [ "Sprite", "=", "Base.ScaleX()" ] }, { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Sprite", "=", "Base.ScaleY()" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Sprite", "Base" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "z", "=", "Sprite.Width()" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "0 - Bottom", "comment2": "" }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Sprite", "Base.CenterX()", "Base.CenterY()", "\"\"" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_pos", "=", "0" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Sprite", "=", "Base.CenterX()", "=", "Base.CenterY()" ] }, { "type": { "value": "ActivateBehavior" }, "parameters": [ "Sprite", "bh", "no" ] }, { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Sprite", "=", "Base.ScaleY()" ] }, { "type": { "value": "ChangeScaleWidth" }, "parameters": [ "Sprite", "=", "Base.ScaleX()" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Sprite", "Base" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "z", "=", "-Sprite.Width()" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Sprite", "_pos", "=", "5" ] }, { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "MettreAutour" }, "parameters": [ "Sprite", "Base", "Sprite.Width()*1.5", "CameraAngle()-90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Sprite", "_pos", "=", "0" ] }, { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "MettreAutour" }, "parameters": [ "Sprite", "Base", "0", "CameraAngle()-90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Sprite", "_pos", "=", "1" ] }, { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_x", "=", "Base.CenterX()" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_y", "=", "Base.CenterY()-Base.Height()/2" ] }, { "type": { "value": "MettreAutourPos" }, "parameters": [ "Sprite", "Sprite.Variable(_x)", "Sprite.Variable(_y)", "-Sprite.Height()/2", "CameraAngle()+90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Sprite", "_pos", "=", "2" ] }, { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_x", "=", "Base.CenterX()+Base.Width()*.5" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_y", "=", "Base.CenterY()" ] }, { "type": { "value": "MettreAutourPos" }, "parameters": [ "Sprite", "Sprite.Variable(_x)", "Sprite.Variable(_y)", "-Sprite.Height()/2", "CameraAngle()+90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Sprite", "_pos", "=", "3" ] }, { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_x", "=", "Base.CenterX()" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_y", "=", "Base.CenterY()+Base.Height()/2" ] }, { "type": { "value": "MettreAutourPos" }, "parameters": [ "Sprite", "Sprite.Variable(_x)", "Sprite.Variable(_y)", "-Sprite.Height()/2", "CameraAngle()+90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Sprite", "_pos", "=", "4" ] }, { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_x", "=", "Base.CenterX()-Base.Width()*.5" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Sprite", "_y", "=", "Base.CenterY()" ] }, { "type": { "value": "MettreAutourPos" }, "parameters": [ "Sprite", "Sprite.Variable(_x)", "Sprite.Variable(_y)", "-Sprite.Height()/2", "CameraAngle()+90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Sprite", "Base" ] } ], "actions": [ { "type": { "value": "Opacity" }, "parameters": [ "Base", "=", "0" ] }, { "type": { "value": "Opacity" }, "parameters": [ "Sprite", "=", "255" ] } ] } ], "parameters": [ { "description": "", "name": "Base", "supplementaryInformation": "Sprite", "type": "objectList" }, { "description": "", "name": "Sprite", "supplementaryInformation": "Sprite", "type": "objectList" }, { "description": "", "name": "bh", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" } ], "objectGroups": [] }, { "description": "Create XYSort Collision ", "fullName": "Create XYSort Collision ", "functionType": "Action", "name": "XYCollision", "sentence": "Create XYSort Collision at _PARAM1_, from _PARAM2_ on group _PARAM3_; Debug: _PARAM4_", "events": [ { "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "BASE", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ModVarObjetTxt" }, "parameters": [ "Wall", "_name", "=", "Group.ObjectName()" ] }, { "type": { "value": "Create" }, "parameters": [ "", "WC", "Wall.Variable(X)", "Wall.Variable(Y)", "\"\"" ] }, { "type": { "value": "ModVarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"base\"" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "WC", "=", "2" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Wall", "WC" ] }, { "type": { "value": "ChangeLayer" }, "parameters": [ "WC", "\"Collisions\"" ] }, { "type": { "value": "SetAngle" }, "parameters": [ "WC", "=", "-Wall.Variable(angle)" ] }, { "type": { "value": "ChangeWidth" }, "parameters": [ "WC", "=", "1" ] }, { "type": { "value": "ChangeHeight" }, "parameters": [ "WC", "=", "Wall.Height()/4" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "WC", "=", "Wall.Variable(X)", "=", "Wall.Variable(Y)" ] }, { "type": { "value": "FlipX" }, "parameters": [ "WC", "yes" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Wall", "point_backY", "=", "WC.PointY(\"Origin\")" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Wall", "point_backX", "=", "WC.PointX(\"Origin\")" ] }, { "type": { "value": "FlipX" }, "parameters": [ "WC", "no" ] }, { "type": { "value": "FlipY" }, "parameters": [ "WC", "yes" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Wall", "point_frontY", "=", "WC.PointY(\"Origin\")" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Wall", "point_frontX", "=", "WC.PointX(\"Origin\")" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Wall", "point_angle", "=", "AngleBetweenPositions(Wall.Variable(point_backX), Wall.Variable(point_backY), Wall.Variable(point_frontX), Wall.Variable(point_frontY))" ] }, { "type": { "value": "ChangeWidth" }, "parameters": [ "WC", "=", "Wall.Width()" ] }, { "type": { "value": "ChangeHeight" }, "parameters": [ "WC", "=", "4" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "WC", "=", "Wall.Variable(X)", "=", "Wall.Variable(Y)" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "BACK", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "WC", "Wall.Variable(X)", "Wall.Variable(Y)", "\"\"" ] }, { "type": { "value": "ModVarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] }, { "type": { "value": "ChangeAnimation" }, "parameters": [ "WC", "=", "1" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Wall", "WC" ] }, { "type": { "value": "ChangeLayer" }, "parameters": [ "WC", "\"Collisions\"" ] }, { "type": { "value": "ChangeWidth" }, "parameters": [ "WC", "=", "Wall.Width()" ] }, { "type": { "value": "ChangeHeight" }, "parameters": [ "WC", "=", "Wall.Height()/4" ] }, { "type": { "value": "SetAngle" }, "parameters": [ "WC", "=", "-Wall.Variable(angle)" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "WC", "=", "Wall.Variable(point_backX)", "=", "Wall.Variable(point_backY)" ] }, { "type": { "value": "ChangePlan" }, "parameters": [ "WC", "=", "101" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "FRONT", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "WC", "Wall.Variable(X)", "Wall.Variable(Y)", "\"\"" ] }, { "type": { "value": "ModVarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Wall", "WC" ] }, { "type": { "value": "ChangeLayer" }, "parameters": [ "WC", "\"Collisions\"" ] }, { "type": { "value": "SetAngle" }, "parameters": [ "WC", "=", "-Wall.Variable(angle)" ] }, { "type": { "value": "ChangeWidth" }, "parameters": [ "WC", "=", "Wall.Width()" ] }, { "type": { "value": "ChangeHeight" }, "parameters": [ "WC", "=", "Wall.Height()/4" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "WC", "=", "Wall.Variable(point_frontX)", "=", "Wall.Variable(point_frontY)" ] }, { "type": { "value": "ChangePlan" }, "parameters": [ "WC", "=", "101" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "WC", "Wall" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "True" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] } ], "actions": [ { "type": { "value": "ChangeAnimation" }, "parameters": [ "WC", "=", "1" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] } ], "actions": [ { "type": { "value": "ChangeAnimation" }, "parameters": [ "WC", "=", "0" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "False" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] } ], "actions": [ { "type": { "value": "ChangeAnimation" }, "parameters": [ "WC", "=", "1" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] } ], "actions": [ { "type": { "value": "ChangeAnimation" }, "parameters": [ "WC", "=", "0" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "Wall", "Wall.Variable(point_frontX)", "Wall.Variable(point_frontY)" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] } ], "actions": [ { "type": { "value": "SetObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] } ], "actions": [ { "type": { "value": "SetObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "True" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "CollisionPoint" }, "parameters": [ "Wall", "Wall.Variable(point_frontX)", "Wall.Variable(point_frontY)" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] } ], "actions": [ { "type": { "value": "SetObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "False" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] } ], "actions": [ { "type": { "value": "SetObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "False" ] } ] } ] }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Animation" }, "parameters": [ "WC", "=", "0" ] } ], "actions": [ { "type": { "value": "ChangePlan" }, "parameters": [ "Sortable", "=", "Wall.ZOrder()+1" ] } ] }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Animation" }, "parameters": [ "WC", "=", "1" ] } ], "actions": [ { "type": { "value": "ChangePlan" }, "parameters": [ "Sortable", "=", "Wall.ZOrder()-1" ] } ] }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"base\"" ] } ], "actions": [ { "type": { "value": "SeparateFromObjects" }, "parameters": [ "Sortable", "WC", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "WC", "Sortable.CenterX()", "Sortable.CenterY()" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { "value": "BuiltinCommonInstructions::And" }, "parameters": [], "subInstructions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "True" ] }, { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] } ] }, { "type": { "value": "BuiltinCommonInstructions::And" }, "parameters": [], "subInstructions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] }, { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "False" ] } ] } ] } ], "actions": [ { "type": { "value": "ChangePlan" }, "parameters": [ "Sortable", "=", "Wall.ZOrder()-1" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { "value": "BuiltinCommonInstructions::And" }, "parameters": [], "subInstructions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "False" ] }, { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"front\"" ] } ] }, { "type": { "value": "BuiltinCommonInstructions::And" }, "parameters": [], "subInstructions": [ { "type": { "value": "VarObjetTxt" }, "parameters": [ "WC", "type", "=", "\"back\"" ] }, { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "WC", "flip", "True" ] } ] } ] } ], "actions": [ { "type": { "value": "ChangePlan" }, "parameters": [ "Sortable", "=", "Wall.ZOrder()+1" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "GetArgumentAsBoolean" }, "parameters": [ "\"Debug\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "WC", "" ] }, { "type": { "value": "Opacity" }, "parameters": [ "WC", "=", "150" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "GetArgumentAsBoolean" }, "parameters": [ "\"Debug\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "WC" ] } ] } ] } ], "parameters": [ { "description": "Wall Object", "name": "Wall", "type": "objectList" }, { "description": "Collision Object", "name": "WC", "supplementaryInformation": "Sprite", "type": "objectList" }, { "description": "Sortable Group", "name": "Sortable", "type": "objectList" }, { "description": "", "name": "Debug", "type": "trueorfalse" } ], "objectGroups": [] } ], "eventsBasedBehaviors": [ { "description": "Variables:\n[ _z ] Z axis value (ex: 100, -20) |\n[ _x ] real X position |\n[ _y ] real Y position | \nmodify _x, _y value to move projected sprite ", "fullName": "Add Z axis on object", "name": "zAxis", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let obj = objects[0]\nif(!obj.getVariables().has(\"_x\")){\n let vx = new gdjs.Variable()\n vx.setValue(obj.getCenterXInScene())\n obj.getVariables().add(\"_x\", vx)\n let vy = new gdjs.Variable()\n vy.setValue(obj.getCenterYInScene())\n obj.getVariables().add(\"_y\", vy)\n // console.log(\"zAxis\")\n}\n", "parameterObjects": "Object", "useStrict": true, "eventsSheetExpanded": true } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "PlaneProjection::zAxis::update" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::zAxis", "type": "behavior" } ], "objectGroups": [] }, { "description": "updatePosition", "fullName": "updatePosition", "functionType": "Action", "name": "updatePosition", "sentence": "update Position _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Egal" }, "parameters": [ "Object.CenterX()", "!=", "Object.Variable(_x)" ] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Object", "_x", "=", "Object.CenterX()" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Egal" }, "parameters": [ "Object.CenterY()", "!=", "Object.Variable(_y)" ] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Object", "_y", "=", "Object.CenterY()" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "DevToolkit::ConsoleLog" }, "parameters": [ "", "ToString(round(Object.CenterX()))+\" = \"+ToString( round(Object.Variable(_x)))", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::zAxis", "type": "behavior" } ], "objectGroups": [] }, { "description": "_update", "fullName": "_update", "functionType": "Action", "name": "update", "private": true, "sentence": "Update _PARAM0_ position", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_x", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_y", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_z", "!=", "0" ] } ], "actions": [ { "type": { "value": "MettreAutourPos" }, "parameters": [ "Object", "Object.Variable(_x)", "Object.Variable(_y)", "Object.Variable(_z)*1.5", "CameraAngle()-90" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::zAxis", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPostEvents", "sentence": "", "events": [ { "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "PlaneProjection::zAxis::update" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::zAxis", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [], "sharedPropertyDescriptors": [] }, { "description": "Set a Object to follow mouse position on world.\n", "fullName": "Project mouse on world", "name": "ProjectMouse", "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Object", "sens", "=", "1" ] }, { "type": { "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Object", "hold", "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ModVarObjet" }, "parameters": [ "Object", "dist", "=", "DistanceBetweenPositions(CameraX(), CameraY(), MouseX(), MouseY())" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Object", "ang", "=", "AngleBetweenPositions(CameraX(), CameraY(), MouseX(),MouseY())" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "Object", "hold", "True" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "MettreXY" }, "parameters": [ "Object", "=", "(MouseX()\n+XFromAngleAndDistance(\nObject.Variable(ang), Object.Variable(dist)/Object.Variable(sens)))", "=", "MouseY()+YFromAngleAndDistance(Object.Variable(ang), Object.Variable(dist)/Object.Variable(sens))" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::ProjectMouse::PropertyHideCursor" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "CacheSouris" }, "parameters": [ "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "PlaneProjection::ProjectMouse::PropertyHideCursor" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "MontreSouris" }, "parameters": [ "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::ProjectMouse::PropertyRotateSprite" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetAngle" }, "parameters": [ "Object", "=", "CameraAngle()" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "PlaneProjection::ProjectMouse::PropertyRotateSprite" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetAngle" }, "parameters": [ "Object", "=", "0" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "Object", "hold", "False" ] } ], "actions": [ { "type": { "value": "MontreSouris" }, "parameters": [ "" ] } ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::ProjectMouse", "type": "behavior" } ], "objectGroups": [] }, { "description": "Is hold cursor", "fullName": "Is hold cursor", "functionType": "Condition", "name": "isHold", "sentence": "_PARAM0_ Is hold cursor", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "Object", "hold", "True" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ObjectVariableAsBoolean" }, "parameters": [ "Object", "hold", "False" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "False" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::ProjectMouse", "type": "behavior" } ], "objectGroups": [] }, { "description": "Toggle Hold Cursor", "fullName": "Toggle Hold Cursor", "functionType": "Action", "name": "toggleHold", "sentence": "Toggle _PARAM0_ hold cursor", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ToggleObjectVariableAsBoolean" }, "parameters": [ "Object", "hold" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::ProjectMouse", "type": "behavior" } ], "objectGroups": [] }, { "description": "Set Hover", "fullName": "Set Hover", "functionType": "Action", "name": "setHover", "sentence": "_PARAM0_ Set Hover _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "GetArgumentAsBoolean" }, "parameters": [ "\"Hover\"" ] } ], "actions": [ { "type": { "value": "PlaneProjection::ProjectMouse::SetPropertyisHover" }, "parameters": [ "Object", "Behavior", "yes" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "GetArgumentAsBoolean" }, "parameters": [ "\"Hover\"" ] } ], "actions": [ { "type": { "value": "PlaneProjection::ProjectMouse::SetPropertyisHover" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::ProjectMouse", "type": "behavior" }, { "description": "Hover", "name": "Hover", "type": "yesorno" } ], "objectGroups": [] }, { "description": "Is hover", "fullName": "Is hover", "functionType": "Condition", "name": "isHover", "sentence": "_PARAM0_ Is hover", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::ProjectMouse::PropertyisHover" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "PlaneProjection::ProjectMouse::PropertyisHover" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "False" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::ProjectMouse", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "true", "type": "Boolean", "label": "Rotate Mouse Sprite", "description": "", "group": "", "extraInformation": [], "hidden": false, "name": "RotateSprite" }, { "value": "true", "type": "Boolean", "label": "Hide cursor", "description": "", "group": "", "extraInformation": [], "hidden": false, "name": "HideCursor" }, { "value": "", "type": "Boolean", "label": "isHover", "description": "", "group": "", "extraInformation": [], "hidden": true, "name": "isHover" } ], "sharedPropertyDescriptors": [] }, { "description": "Project Bitmap Text to normal scale and rotate to camera angle", "fullName": "Project Bitmap Text Rotate ", "name": "ProjectBitmapText", "objectType": "BitmapText::BitmapTextObject", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "objects[0].getRendererObject().scale.y = objects[0].getRendererObject().scale.y*1.5\n", "parameterObjects": "Object", "useStrict": true, "eventsSheetExpanded": false } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetAngle" }, "parameters": [ "Object", "=", "CameraAngle()+Object.Variable(angle)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::ProjectBitmapText", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [], "sharedPropertyDescriptors": [] }, { "description": "Project 2D Sprite to normal scale and rotate to camera angle", "fullName": "Project 2D Rotate Sprite", "name": "Project2DRotateSprite", "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [ { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Object", "*", "1.6" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetAngle" }, "parameters": [ "Object", "=", "CameraAngle()+Object.Variable(angle)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2DRotateSprite", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [], "sharedPropertyDescriptors": [] }, { "description": "Variables:\n[ _z ] Z axis value (ex: 100, -20) |\n[ _x ] real X position |\n[ _y ] real Y position | \nmodify _x, _y value to move projected sprite ", "fullName": "Project Sprite", "name": "Project", "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"_toggleAxis\"" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let obj = objects[0]\nlet _obj = obj.getRendererObject()\nlet axis = obj.getBehavior(\"Project\")._behaviorData.Axis\n\n/*\n Setup Object\n*/\nif(!obj.getVariables().has(\"_x\")){\n let init = (new gdjs.Variable()).setBoolean(true)\n obj.getVariables().add(\"_project_init\", init)\n // x axis\n let vx = new gdjs.Variable()\n vx.setValue(obj.getCenterXInScene())\n obj.getVariables().add(\"_x\", vx)\n // y axis\n let vy = new gdjs.Variable()\n vy.setValue(obj.getCenterYInScene() + obj.getHeight()/2)\n obj.getVariables().add(\"_y\", vy)\n // angle\n let an = new gdjs.Variable()\n an.setValue(obj.getAngle())\n obj.getVariables().add(\"angle\", an)\n\n // console.log(\"Project \"+obj.getAngle()+\" axis \"+axis)\n\n}\n\n\nlet an = -obj.getVariables().get(\"angle\").getValue() * -1\nlet cAngle = runtimeScene.getLayer().getCameraRotation()\nlet nAngle = cAngle //original rotation\ncAngle = cAngle % 360\ncAngle = cAngle < 0 ? cAngle + 360 : cAngle //normalize rotation\n// cAngle = cAngle == 0 ? 1 : cAngle\n\nlet quad = parseInt( cAngle % 360 / 90 )\n// console.log(quad)\n\ncAngle = cAngle % 90 //normalize rotation by quad\nif(axis.toLowerCase() == \"x\"){\n if(quad == 0){\n _obj.skew.y = -gdjs.toRad(cAngle + an)\n }\n if(quad == 2){\n _obj.skew.y = -gdjs.toRad(cAngle + an +180)\n }\n if(quad == 1){\n _obj.skew.y = -gdjs.toRad(cAngle + an-90 +180)\n }\n if(quad == 3){\n _obj.skew.y = -gdjs.toRad(cAngle + an-90)\n }\n}\n\nif(axis.toLowerCase() == \"y\"){\n if(quad == 0)\n _obj.skew.y = -gdjs.toRad(cAngle + an-90)\n if(quad == 2)\n _obj.skew.y = -gdjs.toRad(cAngle + an-90)\n if(quad == 1)\n _obj.skew.y = -gdjs.toRad(cAngle + an)\n if(quad == 3)\n _obj.skew.y = -gdjs.toRad(cAngle + an)\n}\nobj.setAngle(nAngle)\nobj.getVariables().get(\"X\").setNumber(obj.getXFromAngleAndDistance(nAngle, obj.getHeight()/2))\nobj.getVariables().get(\"Y\").setNumber(obj.getYFromAngleAndDistance(nAngle, obj.getHeight()/2))\nobj.getVariables().get(\"_X\").setNumber(obj.getXFromAngleAndDistance(nAngle, obj.getHeight()/2))\nobj.getVariables().get(\"_Y\").setNumber(obj.getYFromAngleAndDistance(nAngle, obj.getHeight()/2))\n", "parameterObjects": "Object", "useStrict": true, "eventsSheetExpanded": true }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_x", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_y", "!=", "0" ] } ], "actions": [ { "type": { "value": "MettreAutourPos" }, "parameters": [ "Object", "Object.Variable(_x)-XFromAngleAndDistance(Object.Variable(angle), Object.Variable(distance))", "Object.Variable(_y)+YFromAngleAndDistance(Object.Variable(angle), Object.Variable(distance))", "-Object.Height()/2", "CameraAngle()+90" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [ { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Object", "*", "1.5" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPostEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_x", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_y", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_z", "!=", "0" ] } ], "actions": [ { "type": { "value": "MettreAutourPos" }, "parameters": [ "Object", "Object.CenterX()", "Object.CenterY()", "Object.Variable(_z)*1.5", "CameraAngle()-90" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" } ], "objectGroups": [] }, { "description": "Set Axis", "fullName": "Set Axis", "functionType": "Action", "name": "setAxis", "sentence": "Set Axis of _PARAM0_ to _PARAM2_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "PlaneProjection::Project::SetPropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "GetArgumentAsString(\"Axis\")" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" }, { "description": "Set axis of plane (X or Y)", "name": "Axis", "supplementaryInformation": "[\"X\",\"Y\"]", "type": "string" } ], "objectGroups": [] }, { "description": "Toggle Axis", "fullName": "Toggle Axis", "functionType": "Action", "name": "toggleAxis", "sentence": "Toggle Axis _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::Project::PropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"X\"" ] }, { "type": { "value": "ObjectTimer" }, "parameters": [ "Object", "\"_toggleAxis\"", "0.2" ] } ], "actions": [ { "type": { "value": "PlaneProjection::Project::SetPropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"Y\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::Project::PropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"Y\"" ] }, { "type": { "value": "ObjectTimer" }, "parameters": [ "Object", "\"_toggleAxis\"", "0.2" ] } ], "actions": [ { "type": { "value": "PlaneProjection::Project::SetPropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"X\"" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" } ], "objectGroups": [] }, { "description": "getAxis", "fullName": "getAxis", "functionType": "StringExpression", "name": "getAxis", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "Object.Behavior::PropertyAxis()" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "X", "type": "String", "label": "Axis projection (X or Y)", "description": "", "group": "", "extraInformation": [], "hidden": true, "name": "Axis" } ], "sharedPropertyDescriptors": [] }, { "description": "Set zOrder based on XY center position and camera angle", "fullName": "Sort object by XY", "name": "XYSort", "objectType": "", "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": "OLD (try get from AABB)", "comment2": "" }, { "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [], "events": [ { "disabled": true, "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let _o = objects[0] // GD object\nlet __o = _o.getRendererObject() // Pixi Object\nlet layer = runtimeScene.getLayer()\n\nlet obj = objects[0]\n\n\nlet x2 = runtimeScene.getVariables().get(\"_armX\").getValue()\nlet y2 = runtimeScene.getVariables().get(\"_armY\").getValue()\nlet rotation = layer.getCameraRotation() + 90\n\nlet rmZ = parseFloat(_o.getVariables().get(\"z\").getValue()) || 0 //remove z\nlet distance = _o.getDistanceToPosition(x2,y2) + rmZ \n\nlet x = _o.getXFromAngleAndDistance(rotation, _o.getHeight()/2) - x2\nlet y = _o.getYFromAngleAndDistance(rotation, _o.getHeight()/2) - y2\nlet dis = Math.sqrt(x * x + y * y)\n\nlet tempz = y2 - _o.getYFromAngleAndDistance(rotation, _o.getHeight()/2)\nlet angle = runtimeScene.getVariables().get(\"camAngle\").getValue()\n// if(angle > 180)\n// _o.setZOrder(tempz)\n// else\n_o.setZOrder(tempz)\n// console.log( y2 - _o.getYFromAngleAndDistance(rotation, _o.getHeight()/2) )\n\n_o.getVariables().get(\"X\").setNumber(_o.getXFromAngleAndDistance(rotation, _o.getHeight()/2))\n_o.getVariables().get(\"Y\").setNumber(_o.getYFromAngleAndDistance(rotation, _o.getHeight()/2))\n\n/*\n The max\n*/\nlet max = _o.getAABB().max\nlet _x = max[0] - x2;\nlet _y = max[1] - y2;\nlet _dis = Math.sqrt(_x * _x + _y * _y)\nif(_dis < distance && false){\n _o.getVariables().get(\"X\").setNumber(max[0])\n _o.getVariables().get(\"Y\").setNumber(max[1])\n _o.setZOrder(_dis * -1)\n}\n\n/*\n The min\n*/\nlet min = _o.getAABB().min\nlet __x = min[0] - x2\nlet __y = min[1] - y2\nlet __dis = Math.sqrt(__x * __x + __y * __y)\nif(__dis < _dis && false){\n _o.getVariables().get(\"X\").setNumber(min[0])\n _o.getVariables().get(\"Y\").setNumber(min[1])\n _o.setZOrder(__dis * -1)\n}\n\n \n// console.log( \"--\" )\n// console.log( distance )\n// console.log( _dis , (_dis > distance))\n// console.log( __dis )\n// console.log( _o.zOrder )\n\n\n\n", "parameterObjects": "Object", "useStrict": true, "eventsSheetExpanded": false } ] }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let _o = objects[0] // GD object\nlet __o = _o.getRendererObject() // Pixi Object\nlet layer = runtimeScene.getLayer()\n\n\nvar r = 2000\nlet rotation = layer.getCameraRotation() + 90\nlet rot = gdjs.toRad(rotation)\n\n\n\nvar dx = r * Math.cos(rot);\nvar dy = r * Math.sin(rot);\nlet obj = objects[0]\n\nlet x2 = layer.getCameraX() + dx\nlet y2 = layer.getCameraY() + dy\nlet rmZ = parseFloat(_o.getVariables().get(\"z\").getValue()) || 0 //remove z\n// console.log(rmZ)\nlet distance = _o.getDistanceToPosition(x2,y2) + rmZ \n\nlet x = _o.getXFromAngleAndDistance(rotation, _o.getHeight()/2) - x2\nlet y = _o.getYFromAngleAndDistance(rotation, _o.getHeight()/2) - y2\nlet dis = Math.sqrt(x * x + y * y)\n_o.setZOrder((dis * -1) + rmZ )\n", "parameterObjects": "Object", "useStrict": true, "eventsSheetExpanded": true } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::XYSort", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [], "sharedPropertyDescriptors": [] }, { "description": "Variables:\n[ _z ] Z axis value (ex: 100, -20) |\n[ _x ] real X position |\n[ _y ] real Y position | \nmodify _x, _y value to move projected sprite ", "fullName": "Project Sprite 2", "name": "Project2", "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"_toggleAxis\"" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": "let obj = objects[0]\nlet _obj = obj.getRendererObject()\nlet axis = obj.getBehavior(\"Project2\")._behaviorData.Axis\n// let active = obj.getBehavior(\"Project\")._behaviorData.Active\nlet an = -obj.getVariables().get(\"angle\").getValue() * -1\n\nlet cAngle = runtimeScene.getLayer().getCameraRotation()\nlet nAngle = cAngle //original rotation\ncAngle = cAngle % 360\ncAngle = cAngle < 0 ? cAngle + 360 : cAngle//normalize rotation\n// cAngle = cAngle == 0 ? 1 : cAngle\n\nlet quad = parseInt( cAngle % 360 / 90 )\nwindow.quad = quad\nwindow._obj = _obj\ncAngle = cAngle % 90 //normalize rotation by quad\n\nif(axis.toLowerCase() == \"x\"){\n if(quad == 0){\n // _obj.skew.x = gdjs.toRad(cAngle + an)\n }\n if(quad == 2){\n // _obj.skew.x = gdjs.toRad(cAngle + an +180)\n _obj.skew.y = -gdjs.toRad(cAngle + an + 180)\n }\n if(quad == 1){\n // _obj.skew.x = gdjs.toRad(cAngle + an-90 +180)\n _obj.skew.y = -gdjs.toRad(cAngle + an + 90+ 180)\n \n }\n if(quad == 3){\n _obj.skew.x = gdjs.toRad(cAngle + an-90)\n _obj.skew.y = -gdjs.toRad(cAngle + an+90)\n }\n}\nobj.setAngle(nAngle+45-0)//+45)\n\nobj.getVariables().get(\"X\").setNumber(obj.getXFromAngleAndDistance(nAngle, obj.getHeight()/2))\nobj.getVariables().get(\"Y\").setNumber(obj.getYFromAngleAndDistance(nAngle, obj.getHeight()/2))\nobj.getVariables().get(\"_X\").setNumber(obj.getXFromAngleAndDistance(nAngle, obj.getHeight()/2))\nobj.getVariables().get(\"_Y\").setNumber(obj.getYFromAngleAndDistance(nAngle, obj.getHeight()/2))\n\nif(!obj.getVariables().has(\"_x\")){\n let vx = new gdjs.Variable()\n vx.setValue(obj.getCenterXInScene())\n obj.getVariables().add(\"_x\", vx)\n let vy = new gdjs.Variable()\n vy.setValue(obj.getCenterYInScene() + obj.getHeight()/2)\n obj.getVariables().add(\"_y\", vy)\n // _obj.scale.y = _obj.scale.y * 1.5\n console.log(\"Project\")\n}", "parameterObjects": "Object", "useStrict": true, "eventsSheetExpanded": true }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_x", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_y", "!=", "0" ] } ], "actions": [ { "type": { "value": "MettreAutourPos" }, "parameters": [ "Object", "Object.Variable(_x)-XFromAngleAndDistance(Object.Variable(angle), Object.Variable(distance))", "Object.Variable(_y)+YFromAngleAndDistance(Object.Variable(angle), Object.Variable(distance))", "-Object.Height()/2", "CameraAngle()+90" ] } ] } ] }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [ { "type": { "value": "ChangeScaleHeight" }, "parameters": [ "Object", "*", "1.5" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPostEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_x", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_y", "!=", "0" ] }, { "type": { "value": "VarObjet" }, "parameters": [ "Object", "_z", "!=", "0" ] } ], "actions": [ { "type": { "value": "MettreAutourPos" }, "parameters": [ "Object", "Object.CenterX()", "Object.CenterY()", "Object.Variable(_z)*1.5", "CameraAngle()-90" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2", "type": "behavior" } ], "objectGroups": [] }, { "description": "Set Axis", "fullName": "Set Axis", "functionType": "Action", "name": "setAxis", "sentence": "Set Axis of _PARAM0_ to _PARAM2_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "PlaneProjection::Project::SetPropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "GetArgumentAsString(\"Axis\")" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2", "type": "behavior" }, { "description": "Set axis of plane (X or Y)", "name": "Axis", "supplementaryInformation": "[\"X\",\"Y\"]", "type": "string" } ], "objectGroups": [] }, { "description": "Toggle Axis", "fullName": "Toggle Axis", "functionType": "Action", "name": "toggleAxis", "sentence": "Toggle Axis _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::Project::PropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"X\"" ] }, { "type": { "value": "ObjectTimer" }, "parameters": [ "Object", "\"_toggleAxis\"", "0.2" ] } ], "actions": [ { "type": { "value": "PlaneProjection::Project::SetPropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"Y\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::Project::PropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"Y\"" ] }, { "type": { "value": "ObjectTimer" }, "parameters": [ "Object", "\"_toggleAxis\"", "0.2" ] } ], "actions": [ { "type": { "value": "PlaneProjection::Project::SetPropertyAxis" }, "parameters": [ "Object", "Behavior", "=", "\"X\"" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2", "type": "behavior" } ], "objectGroups": [] }, { "description": "getAxis", "fullName": "getAxis", "functionType": "StringExpression", "name": "getAxis", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "Object.Behavior::PropertyAxis()" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::Project2", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "X", "type": "String", "label": "Axis projection (X or Y)", "description": "", "group": "", "extraInformation": [], "hidden": false, "name": "Axis" } ], "sharedPropertyDescriptors": [] }, { "description": "", "fullName": "", "name": "BoxManager", "objectType": "Sprite", "eventsFunctions": [ { "description": "Show a face", "fullName": "Show a face", "functionType": "Action", "name": "ShowFace", "sentence": "Box _PARAM0_ - Show face _PARAM2_ for texture _PARAM3_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Texture", "Object" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "1" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Back\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "Texture", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "3" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Front\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "Texture", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "2" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Right\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "Texture", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "4" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Left\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "Texture", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "0" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Ground\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "Texture", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "5" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Roof\"" ] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "Texture", "" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::BoxManager", "type": "behavior" }, { "description": "Face", "name": "Face", "supplementaryInformation": "[\"Roof\",\"Back\",\"Front\",\"Right\",\"Left\",\"Ground\"]", "type": "stringWithSelector" }, { "description": "Texture", "name": "Texture", "type": "objectList" } ], "objectGroups": [] }, { "description": "Hide a face", "fullName": "Hide a face", "functionType": "Action", "name": "HideFace", "sentence": "Box _PARAM0_ - Hide face _PARAM2_ for texture _PARAM3_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Texture", "Object" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "1" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Back\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "Texture" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "3" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Front\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "Texture" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "2" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Right\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "Texture" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "4" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Left\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "Texture" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "0" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Ground\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "Texture" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Texture", "_pos", "=", "5" ] }, { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Face\")", "=", "\"Roof\"" ] } ], "actions": [ { "type": { "value": "Cache" }, "parameters": [ "Texture" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::BoxManager", "type": "behavior" }, { "description": "Face", "name": "Face", "supplementaryInformation": "[\"Roof\",\"Back\",\"Front\",\"Right\",\"Left\",\"Ground\"]", "type": "stringWithSelector" }, { "description": "Texture", "name": "Texture", "type": "objectList" } ], "objectGroups": [] }, { "description": "Hide face colliding with connector", "fullName": "Hide face colliding with connector", "functionType": "Action", "name": "TriggerConnector", "sentence": "Box _PARAM0_ - _PARAM2_ Hide face colliding with _PARAM3_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Texture", "Object" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "Connector", "Object.PointX(\"T\")", "Object.PointY(\"T\")" ] } ], "actions": [ { "type": { "value": "PlaneProjection::BoxManager::HideFace" }, "parameters": [ "Object", "Behavior", "\"Back\"", "Texture", "" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "ObjectVariableChildExists" }, "parameters": [ "Connector", "Connections", "\"T\"" ] } ], "actions": [ { "type": { "value": "ObjectVariablePushString" }, "parameters": [ "Connector", "Connections", "\"T\"" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "Connector", "Object.PointX(\"B\")", "Object.PointY(\"B\")" ] } ], "actions": [ { "type": { "value": "PlaneProjection::BoxManager::HideFace" }, "parameters": [ "Object", "Behavior", "\"Front\"", "Texture", "" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "ObjectVariableChildExists" }, "parameters": [ "Connector", "Connections", "\"B\"" ] } ], "actions": [ { "type": { "value": "ObjectVariablePushString" }, "parameters": [ "Connector", "Connections", "\"B\"" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "Connector", "Object.PointX(\"R\")", "Object.PointY(\"R\")" ] } ], "actions": [ { "type": { "value": "PlaneProjection::BoxManager::HideFace" }, "parameters": [ "Object", "Behavior", "\"Right\"", "Texture", "" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "ObjectVariableChildExists" }, "parameters": [ "Connector", "Connections", "\"R\"" ] } ], "actions": [ { "type": { "value": "ObjectVariablePushString" }, "parameters": [ "Connector", "Connections", "\"R\"" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "Connector", "Object.PointX(\"L\")", "Object.PointY(\"L\")" ] } ], "actions": [ { "type": { "value": "PlaneProjection::BoxManager::HideFace" }, "parameters": [ "Object", "Behavior", "\"Left\"", "Texture", "" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "ObjectVariableChildExists" }, "parameters": [ "Connector", "Connections", "\"L\"" ] } ], "actions": [ { "type": { "value": "ObjectVariablePushString" }, "parameters": [ "Connector", "Connections", "\"L\"" ] } ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Egal" }, "parameters": [ "Connector.VariableChildCount(Connections)", ">=", "2" ] } ], "actions": [ { "type": { "value": "DevToolkit::ConsoleLog" }, "parameters": [ "", "\"2\"", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::BoxManager", "type": "behavior" }, { "description": "Texture", "name": "Texture", "type": "objectList" }, { "description": "Connector", "name": "Connector", "supplementaryInformation": "Sprite", "type": "objectList" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "PlaneProjection::BoxManager::PropertyhasConnT" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Object", "Object" ] } ], "actions": [] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::BoxManager", "type": "behavior" } ], "objectGroups": [] }, { "description": "Create connector on position", "fullName": "Create connector on position", "functionType": "Action", "name": "createConnector", "sentence": "Box _PARAM0_ - Create _PARAM2_ on position _PARAM3_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Connector", "Object" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Connector", "_pos", "=", "3" ] }, { "type": { "value": "PlaneProjection::BoxManager::PropertyhasConnB" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetCenter" }, "parameters": [ "Connector", "=", "Object.PointX(\"B\")", "=", "Object.PointY(\"B\")" ] }, { "type": { "value": "SetAngle" }, "parameters": [ "Connector", "=", "90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Connector", "_pos", "=", "1" ] }, { "type": { "value": "PlaneProjection::BoxManager::PropertyhasConnT" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetCenter" }, "parameters": [ "Connector", "=", "Object.PointX(\"T\")", "=", "Object.PointY(\"T\")" ] }, { "type": { "value": "SetAngle" }, "parameters": [ "Connector", "=", "-90" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Connector", "_pos", "=", "4" ] }, { "type": { "value": "PlaneProjection::BoxManager::PropertyhasConnL" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetCenter" }, "parameters": [ "Connector", "=", "Object.PointX(\"L\")", "=", "Object.PointY(\"L\")" ] }, { "type": { "value": "SetAngle" }, "parameters": [ "Connector", "=", "180" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "VarObjet" }, "parameters": [ "Connector", "_pos", "=", "2" ] }, { "type": { "value": "PlaneProjection::BoxManager::PropertyhasConnR" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetCenter" }, "parameters": [ "Connector", "=", "Object.PointX(\"R\")", "=", "Object.PointY(\"R\")" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Position\")", "=", "\"Back\"" ] }, { "type": { "inverted": true, "value": "PlaneProjection::BoxManager::PropertyhasConnT" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Connector", "Object.PointX(\"T\")", "Object.PointY(\"T\")", "\"\"" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Connector", "_pos", "=", "1" ] }, { "type": { "value": "DevToolkit::ConsoleLog" }, "parameters": [ "", "\"create\"", "" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Connector", "Object" ] }, { "type": { "value": "PlaneProjection::BoxManager::SetPropertyhasConnT" }, "parameters": [ "Object", "Behavior", "yes" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Position\")", "=", "\"Left\"" ] }, { "type": { "inverted": true, "value": "PlaneProjection::BoxManager::PropertyhasConnL" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Connector", "Object.PointX(\"L\")", "Object.PointY(\"L\")", "\"\"" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Connector", "_pos", "=", "4" ] }, { "type": { "value": "DevToolkit::ConsoleLog" }, "parameters": [ "", "\"create\"", "" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Connector", "Object" ] }, { "type": { "value": "PlaneProjection::BoxManager::SetPropertyhasConnL" }, "parameters": [ "Object", "Behavior", "yes" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Position\")", "=", "\"Right\"" ] }, { "type": { "inverted": true, "value": "PlaneProjection::BoxManager::PropertyhasConnR" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Connector", "Object.PointX(\"R\")", "Object.PointY(\"R\")", "\"\"" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Connector", "_pos", "=", "2" ] }, { "type": { "value": "DevToolkit::ConsoleLog" }, "parameters": [ "", "\"create\"", "" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Connector", "Object" ] }, { "type": { "value": "PlaneProjection::BoxManager::SetPropertyhasConnR" }, "parameters": [ "Object", "Behavior", "yes" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "StrEqual" }, "parameters": [ "GetArgumentAsString(\"Position\")", "=", "\"Front\"" ] }, { "type": { "inverted": true, "value": "PlaneProjection::BoxManager::PropertyhasConnB" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Connector", "Object.PointX(\"B\")", "Object.PointY(\"B\")", "\"\"" ] }, { "type": { "value": "ModVarObjet" }, "parameters": [ "Connector", "_pos", "=", "3" ] }, { "type": { "value": "DevToolkit::ConsoleLog" }, "parameters": [ "", "\"create\"", "" ] }, { "type": { "value": "LinkedObjects::LinkObjects" }, "parameters": [ "", "Connector", "Object" ] }, { "type": { "value": "PlaneProjection::BoxManager::SetPropertyhasConnB" }, "parameters": [ "Object", "Behavior", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "PlaneProjection::BoxManager", "type": "behavior" }, { "description": "Connector", "name": "Connector", "supplementaryInformation": "Sprite", "type": "objectList" }, { "description": "Position", "name": "Position", "supplementaryInformation": "[\"Front\",\"Back\",\"Right\",\"Left\"]", "type": "stringWithSelector" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Boolean", "label": "hasConnTop", "description": "", "group": "", "extraInformation": [], "hidden": true, "name": "hasConnT" }, { "value": "", "type": "Boolean", "label": "hasConnBot", "description": "", "group": "", "extraInformation": [], "hidden": true, "name": "hasConnB" }, { "value": "", "type": "Boolean", "label": "hasConnR", "description": "", "group": "", "extraInformation": [], "hidden": true, "name": "hasConnR" }, { "value": "", "type": "Boolean", "label": "hasConnL", "description": "", "group": "", "extraInformation": [], "hidden": true, "name": "hasConnL" } ], "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] }