-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added JSON-based procedural code generator to the Playground (#15243)
* Added JSON-based procedural code generator to the Playground * Fixing Linting in PG procedural code generator * try catch the JSON fetch in case of broken JSON * Linting Fix - console.error --> console.log * Linting Fix - drop console
- Loading branch information
Showing
8 changed files
with
712 additions
and
220 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
[ | ||
{ | ||
"label": "Run", | ||
"tooltip": "Run the code generator with these params", | ||
"onClick": "onGenerate" | ||
}, | ||
{ | ||
"label": "Run Auto", | ||
"tooltip": "Automatic run of the code generator on param change", | ||
"storeKey": "generateAuto", | ||
"defaultValue": true, | ||
"onCheck": "empty", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Debug Layer", | ||
"tooltip": "Open debug layer", | ||
"storeKey": "debugLayer", | ||
"defaultValue": false, | ||
"onCheck": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Camera", | ||
"tooltip": "Select a camera type", | ||
"storeKey": "useCamera", | ||
"defaultValue": "Arc Rotate (Rad)", | ||
"subItems": ["Arc Rotate (Rad)", "Arc Rotate (Deg)", "Free", "WebXR"], | ||
"onClick": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Light", | ||
"tooltip": "Select a light type", | ||
"storeKey": "useLight", | ||
"defaultValue": "Hemispheric", | ||
"subItems": ["Hemispheric", "Directionnal", "Point", "Spot", "3 Spots"], | ||
"onClick": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Shadows", | ||
"tooltip": "Enable shadows", | ||
"storeKey": "useShadows", | ||
"defaultValue": false, | ||
"onCheck": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Mesh Builder", | ||
"tooltip": "Build meshes using BABYLON.MeshBuilder", | ||
"storeKeys": ["useGround", "useSphere", "useBox", "useCylinder"], | ||
"defaultValues": [true, true, false, false], | ||
"subItems": ["Ground", "Sphere", "Box", "Cylinder"], | ||
"onCheck": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Animations", | ||
"tooltip": "Import animated characters", | ||
"storeKey": "useAnimation", | ||
"defaultValue": "None", | ||
"subItems": ["None", "Dude", "Dummy", "Samba Girl"], | ||
"onClick": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Particles", | ||
"tooltip": "Add a simple particle system to the scene", | ||
"storeKey": "useParticles", | ||
"defaultValue": "None", | ||
"subItems": ["None", "Simple", "Color Gradient", "Complex"], | ||
"onClick": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Load Snippet", | ||
"tooltip": "Load asset from Snippet Server", | ||
"storeKey": "useSnippet", | ||
"defaultValue": "None", | ||
"subItems": ["None", "Particles", "Node Material", "GUI", "GUI on Mesh"], | ||
"onClick": "onUpdateGenerator", | ||
"keepExpanded": true | ||
}, | ||
{ | ||
"label": "Import / Export", | ||
"tooltip": "Import or Export assets", | ||
"storeKey": "useImport", | ||
"defaultValue": "None", | ||
"subItems": ["None", "Import Mesh", "Export GLB", "Export GLTF"], | ||
"onClick": "onUpdateGenerator", | ||
"keepExpanded": true | ||
} | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.