forked from BabylonJS/Babylon.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
413 changed files
with
3,745 additions
and
3,918 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,104 +1,104 @@ | ||
[ | ||
{ | ||
"label" : "Create a sphere", | ||
"documentation" : "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText" : "var sphere = BABYLON.MeshBuilder.CreateSphere(\"${1:sphere}\", {diameter: ${2:1}}, scene);" | ||
}, | ||
{ | ||
"label" : "Create a box", | ||
"documentation" : "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText" : "var box = BABYLON.MeshBuilder.CreateBox(\"${1:box}\", {size: ${2:1}}, scene);" | ||
}, | ||
{ | ||
"label" : "Load CPU Particle System from Snippet Server", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/particles#snippet-server", | ||
"insertText" : "BABYLON.ParticleHelper.CreateFromSnippetAsync(\"${1:your_snippet_url_no_#}\", scene, false).then(system => {\n\n});" | ||
}, | ||
{ | ||
"label" : "Load GPU Particle System from Snippet Server", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/particles#snippet-server", | ||
"insertText" : "BABYLON.ParticleHelper.CreateFromSnippetAsync(\"${1:your_snippet_url_no_#}\", scene, true).then(system => {\n\n});" | ||
}, | ||
{ | ||
"label" : "Create a cylinder", | ||
"documentation" : "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText" : "var cylinder = BABYLON.MeshBuilder.CreateCylinder(\"${1:cylinder}\", {height: ${2:2}, diameter: ${3:1}}, scene);" | ||
}, | ||
{ | ||
"label" : "Create a ground plane", | ||
"documentation" : "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText" : "var ground = BABYLON.MeshBuilder.CreateGround(\"${1:ground}\", {width: ${2:6}, height: ${3:6}}, scene);" | ||
}, | ||
{ | ||
"label" : "Create a point light", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/lights#the-point-light", | ||
"insertText" : "var pointLight = new BABYLON.PointLight(\"${1:pointLight}\", new BABYLON.Vector3(${2:0},${3:5},${4:0}), scene);" | ||
}, | ||
{ | ||
"label" : "Create a directional light", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/lights#the-directional-light", | ||
"insertText" : "var dirLight = new BABYLON.DirectionalLight(\"${1:dirLight}\", new BABYLON.Vector3(${2:0.25},${3:-1},${4:-0.25}), scene);" | ||
}, | ||
{ | ||
"label" : "Create a spot light", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/lights#the-spot-light", | ||
"insertText" : "var spotLight = new BABYLON.SpotLight(\"${1:spotLight}\", new BABYLON.Vector3(${2:0}, ${3:30}, ${4:-10}), new BABYLON.Vector3(${5:0}, ${6:-1}, ${7:0}), ${8:Math.PI / 3}, ${9:2}, scene);" | ||
}, | ||
{ | ||
"label" : "Create a hemispheric light", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/lights#the-hemispheric-light", | ||
"insertText" : "var hemiLight = new BABYLON.HemisphericLight(\"${1:hemiLight}\", new BABYLON.Vector3(${2:0}, ${3:1}, ${4:0}), scene);" | ||
}, | ||
{ | ||
"label" : "Load a Node Material from snippet w/callback", | ||
"documentation" : "https://doc.babylonjs.com/how_to/node_material#loading-from-a-file-saved-from-the-node-material-editor", | ||
"insertText" : "BABYLON.NodeMaterial.ParseFromSnippetAsync(\"${1:your_snippet_url_no_#}\", scene).then(nodeMaterial => {\n ${2:mesh_to_apply_node_material_to}.material = nodeMaterial;\n});" | ||
}, | ||
{ | ||
"label" : "Load a fullscreen GUI from the snippet server", | ||
"documentation" : "Coming Soon", | ||
"insertText" : "let advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI(\"${1:name}\", true, scene);\nlet loadedGUI = advancedTexture.parseFromSnippetAsync(\"${2:your_snippet_url_no_#}\");" | ||
}, | ||
{ | ||
"label" : "Show the Inspector", | ||
"documentation" : "https://doc.babylonjs.com/features/playground_debuglayer", | ||
"insertText" : "scene.debugLayer.show({\n embedMode:true\n});" | ||
}, | ||
{ | ||
"label" : "Create an Arc Rotate Camera w/Degrees", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera", | ||
"insertText" : "var camera = new BABYLON.ArcRotateCamera(\"${1:camera}\", BABYLON.Tools.ToRadians(${2:90}), BABYLON.Tools.ToRadians(${3:65}), ${4:10}, ${5:BABYLON.Vector3.Zero()}, scene);" | ||
}, | ||
{ | ||
"label" : "Create an Arc Rotate Camera w/Radians", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera", | ||
"insertText" : "var camera = new BABYLON.ArcRotateCamera(\"${1:camera}\", ${2:0}, ${3:Math.PI/2}, ${4:10}, ${5:BABYLON.Vector3.Zero()}, scene);" | ||
}, | ||
{ | ||
"label": "Create a WebXR Camera", | ||
"documentation": "https://doc.babylonjs.com/divingDeeper/webXR/introToWebXR", | ||
"insertText": "scene.createDefaultXRExperienceAsync({}).then((defaultXRExperience) => {\n ${1}\n});" | ||
}, | ||
{ | ||
"label" : "Import a Mesh w/callback", | ||
"documentation" : "https://doc.babylonjs.com/resources/external_pg_assets", | ||
"insertText" : "BABYLON.SceneLoader.ImportMesh(\"${1:meshName}\", \"${2:url to the mesh parent directory}\", \"${3:Mesh filename.fileextension}\", scene, function(newMeshes){\n\n});" | ||
}, | ||
{ | ||
"label" : "Setup a shadow generator", | ||
"documentation" : "https://doc.babylonjs.com/babylon101/shadows", | ||
"insertText" : "var shadowGenerator = new BABYLON.ShadowGenerator(${1:size}, ${2:the_light_source});\nshadowGenerator.getShadowMap().renderList.push(${3:the_mesh_that_casts_a_shadow});\n${4:mesh_that_receives_the_shadow}.receiveShadows = true;" | ||
}, | ||
{ | ||
"label" : "Export scene to GLB", | ||
"documentation" : "https://doc.babylonjs.com/extensions/gltfexporter#exporting-a-scene-to-gltf", | ||
"insertText" : "BABYLON.GLTF2Export.GLBAsync(scene, \"${1:fileName}\").then((glb) => {\n glb.downloadFiles();\n});", | ||
"language" : "javascript" | ||
}, | ||
{ | ||
"label" : "Export scene to GLTF", | ||
"documentation" : "https://doc.babylonjs.com/extensions/gltfexporter#exporting-a-scene-to-gltf", | ||
"insertText" : "BABYLON.GLTF2Export.GLTFAsync(scene, \"${1:fileName}\").then((gltf) => {\n gltf.downloadFiles();\n});", | ||
"language" : "javascript" | ||
} | ||
{ | ||
"label": "Create a sphere", | ||
"documentation": "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText": "var sphere = BABYLON.MeshBuilder.CreateSphere(\"${1:sphere}\", {diameter: ${2:1}}, scene);" | ||
}, | ||
{ | ||
"label": "Create a box", | ||
"documentation": "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText": "var box = BABYLON.MeshBuilder.CreateBox(\"${1:box}\", {size: ${2:1}}, scene);" | ||
}, | ||
{ | ||
"label": "Load CPU Particle System from Snippet Server", | ||
"documentation": "https://doc.babylonjs.com/babylon101/particles#snippet-server", | ||
"insertText": "BABYLON.ParticleHelper.CreateFromSnippetAsync(\"${1:your_snippet_url_no_#}\", scene, false).then(system => {\n\n});" | ||
}, | ||
{ | ||
"label": "Load GPU Particle System from Snippet Server", | ||
"documentation": "https://doc.babylonjs.com/babylon101/particles#snippet-server", | ||
"insertText": "BABYLON.ParticleHelper.CreateFromSnippetAsync(\"${1:your_snippet_url_no_#}\", scene, true).then(system => {\n\n});" | ||
}, | ||
{ | ||
"label": "Create a cylinder", | ||
"documentation": "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText": "var cylinder = BABYLON.MeshBuilder.CreateCylinder(\"${1:cylinder}\", {height: ${2:2}, diameter: ${3:1}}, scene);" | ||
}, | ||
{ | ||
"label": "Create a ground plane", | ||
"documentation": "https://doc.babylonjs.com/how_to/set_shapes", | ||
"insertText": "var ground = BABYLON.MeshBuilder.CreateGround(\"${1:ground}\", {width: ${2:6}, height: ${3:6}}, scene);" | ||
}, | ||
{ | ||
"label": "Create a point light", | ||
"documentation": "https://doc.babylonjs.com/babylon101/lights#the-point-light", | ||
"insertText": "var pointLight = new BABYLON.PointLight(\"${1:pointLight}\", new BABYLON.Vector3(${2:0},${3:5},${4:0}), scene);" | ||
}, | ||
{ | ||
"label": "Create a directional light", | ||
"documentation": "https://doc.babylonjs.com/babylon101/lights#the-directional-light", | ||
"insertText": "var dirLight = new BABYLON.DirectionalLight(\"${1:dirLight}\", new BABYLON.Vector3(${2:0.25},${3:-1},${4:-0.25}), scene);" | ||
}, | ||
{ | ||
"label": "Create a spot light", | ||
"documentation": "https://doc.babylonjs.com/babylon101/lights#the-spot-light", | ||
"insertText": "var spotLight = new BABYLON.SpotLight(\"${1:spotLight}\", new BABYLON.Vector3(${2:0}, ${3:30}, ${4:-10}), new BABYLON.Vector3(${5:0}, ${6:-1}, ${7:0}), ${8:Math.PI / 3}, ${9:2}, scene);" | ||
}, | ||
{ | ||
"label": "Create a hemispheric light", | ||
"documentation": "https://doc.babylonjs.com/babylon101/lights#the-hemispheric-light", | ||
"insertText": "var hemiLight = new BABYLON.HemisphericLight(\"${1:hemiLight}\", new BABYLON.Vector3(${2:0}, ${3:1}, ${4:0}), scene);" | ||
}, | ||
{ | ||
"label": "Load a Node Material from snippet w/callback", | ||
"documentation": "https://doc.babylonjs.com/how_to/node_material#loading-from-a-file-saved-from-the-node-material-editor", | ||
"insertText": "BABYLON.NodeMaterial.ParseFromSnippetAsync(\"${1:your_snippet_url_no_#}\", scene).then(nodeMaterial => {\n ${2:mesh_to_apply_node_material_to}.material = nodeMaterial;\n});" | ||
}, | ||
{ | ||
"label": "Load a fullscreen GUI from the snippet server", | ||
"documentation": "Coming Soon", | ||
"insertText": "let advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI(\"${1:name}\", true, scene);\nlet loadedGUI = advancedTexture.parseFromSnippetAsync(\"${2:your_snippet_url_no_#}\");" | ||
}, | ||
{ | ||
"label": "Show the Inspector", | ||
"documentation": "https://doc.babylonjs.com/features/playground_debuglayer", | ||
"insertText": "scene.debugLayer.show({\n embedMode:true\n});" | ||
}, | ||
{ | ||
"label": "Create an Arc Rotate Camera w/Degrees", | ||
"documentation": "https://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera", | ||
"insertText": "var camera = new BABYLON.ArcRotateCamera(\"${1:camera}\", BABYLON.Tools.ToRadians(${2:90}), BABYLON.Tools.ToRadians(${3:65}), ${4:10}, ${5:BABYLON.Vector3.Zero()}, scene);" | ||
}, | ||
{ | ||
"label": "Create an Arc Rotate Camera w/Radians", | ||
"documentation": "https://doc.babylonjs.com/babylon101/cameras#arc-rotate-camera", | ||
"insertText": "var camera = new BABYLON.ArcRotateCamera(\"${1:camera}\", ${2:0}, ${3:Math.PI/2}, ${4:10}, ${5:BABYLON.Vector3.Zero()}, scene);" | ||
}, | ||
{ | ||
"label": "Create a WebXR Camera", | ||
"documentation": "https://doc.babylonjs.com/divingDeeper/webXR/introToWebXR", | ||
"insertText": "scene.createDefaultXRExperienceAsync({}).then((defaultXRExperience) => {\n ${1}\n});" | ||
}, | ||
{ | ||
"label": "Import a Mesh w/callback", | ||
"documentation": "https://doc.babylonjs.com/resources/external_pg_assets", | ||
"insertText": "BABYLON.SceneLoader.ImportMesh(\"${1:meshName}\", \"${2:url to the mesh parent directory}\", \"${3:Mesh filename.fileextension}\", scene, function(newMeshes){\n\n});" | ||
}, | ||
{ | ||
"label": "Setup a shadow generator", | ||
"documentation": "https://doc.babylonjs.com/babylon101/shadows", | ||
"insertText": "var shadowGenerator = new BABYLON.ShadowGenerator(${1:size}, ${2:the_light_source});\nshadowGenerator.getShadowMap().renderList.push(${3:the_mesh_that_casts_a_shadow});\n${4:mesh_that_receives_the_shadow}.receiveShadows = true;" | ||
}, | ||
{ | ||
"label": "Export scene to GLB", | ||
"documentation": "https://doc.babylonjs.com/extensions/gltfexporter#exporting-a-scene-to-gltf", | ||
"insertText": "BABYLON.GLTF2Export.GLBAsync(scene, \"${1:fileName}\").then((glb) => {\n glb.downloadFiles();\n});", | ||
"language": "javascript" | ||
}, | ||
{ | ||
"label": "Export scene to GLTF", | ||
"documentation": "https://doc.babylonjs.com/extensions/gltfexporter#exporting-a-scene-to-gltf", | ||
"insertText": "BABYLON.GLTF2Export.GLTFAsync(scene, \"${1:fileName}\").then((gltf) => {\n gltf.downloadFiles();\n});", | ||
"language": "javascript" | ||
} | ||
] |
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
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ | |
"engines": { | ||
"node": "*" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
"scene": { | ||
"debug": false | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -29,4 +29,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
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
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.