|
@@ -0,0 +1,98 @@
|
|
|
+[
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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});",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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});",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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});",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label" : "Show the Inspector",
|
|
|
+ "documentation" : "https://doc.babylonjs.com/features/playground_debuglayer",
|
|
|
+ "insertText" : "scene.debugLayer.show({\n embedMode:true\n});",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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);",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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});",
|
|
|
+ "language" : "javascript"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "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;",
|
|
|
+ "language" : "javascript"
|
|
|
+ }
|
|
|
+]
|