Scene Editor
Quick Start
×v0.2
Note:
Some behavior for the Car Game is restricted within the editor to ensure the default playable experience.
You can still modify these models, but it will require adjustments in the Game file (File 2).
Basic Behavior:
1. Selecting a mesh allows you to modify its properties.
2. Double-tapping on a mesh focuses the camera on the selected point.
3. Double-tapping in empty space or on non-pickable models deselects the currently selected mesh.
Code Editor:
File 1
This file extends the scene. Here, you can define animations, add models not supported by the toolbar, and adjust advanced scene settings.
To execute code from File 1, press the "Run Code" button located to the right of the files.
Changes made in File 1 permanently alter the scene. Undoing these changes via the toolbar is not possible. For example, if you adjust a model's position, you won't be able to revert it through the toolbar, as the toolbar doesn't recognize these changes.
Predefined variables include canvas
and scene.
To access the engine itself, you would use scene.getEngine()
File 2
This is the main game file where you start the game with the green "Play" button below the toolbar. Define actions and behaviors you want to see in your game here.
Unlike File 1, changes defined here are not permanent. Exiting the game resets to the state before executing this file.
Run Code
Executes the code located in File 1.
Imported Libraries:
BABYLON - @babylonjs/core
MATERIALS - @babylonjs/materials
GUI - @babylonjs/gui
SERIALIZERS - @babylonjs/serializers
LOADERS - @babylonjs/loaders
How to use code from BabylonJS Playground in Arcade Studio?
Remove the declaration of the scene from Playground file
This line -> var scene = new BABYLON.Scene(engine);
Call createScene() at the bottom of the Arcade Studio file