Last active
March 27, 2021 20:05
-
-
Save sorskoot/8df5d3e66d8caf3a6b280b5ae8959f91 to your computer and use it in GitHub Desktop.
VSCode Code Snippets for Wonderland Engine
This file contains hidden or 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
Show hidden characters
{ | |
"component-parameter-enum": { | |
"body": "${1:name}: {type: WL.Type.Enum, values: ['A','B'], default: 'A'}$0", | |
"description": "adds a component parameter of type enum", | |
"scope": "javascript", | |
"prefix": "wl:param:enum" | |
}, | |
"component-parameter-float": { | |
"body": "${1:name}: {type: WL.Type.Float, default: ${2:1.0}}$0", | |
"description": "adds a component parameter of type float", | |
"scope": "javascript", | |
"prefix": "wl:param:float" | |
}, | |
"component-parameter-object": { | |
"body": "${1:name}: {type: WL.Type.Object, default: null}$0", | |
"description": "adds a component parameter of type object", | |
"scope": "javascript", | |
"prefix": "wl:param:object" | |
}, | |
"component-parameter-bool": { | |
"body": "${1:name}: {type: WL.Type.Bool, default: ${2:false}}$0", | |
"description": "adds a component parameter of type boolean", | |
"scope": "javascript", | |
"prefix": "wl:param:bool" | |
}, | |
"component-parameter-mesh": { | |
"body": "${1:name}: {type: WL.Type.Material}$0", | |
"description": "adds a component parameter of type material", | |
"scope": "javascript", | |
"prefix": "wl:param:material" | |
}, | |
"component-parameter-material": { | |
"body": "${1:name}: {type: WL.Type.Mesh}$0", | |
"description": "adds a component parameter of type mesh", | |
"scope": "javascript", | |
"prefix": "wl:param:mesh" | |
}, | |
"component-parameter-int": { | |
"body": "${1:name}: {type: WL.Type.Int, default: $2}$0", | |
"description": "adds a component parameter of type int", | |
"scope": "javascript", | |
"prefix": "wl:param:int" | |
}, | |
"Wonderland Script Reference":{ | |
"body": "/// <reference path=\"../../deploy/wonderland.js\" />", | |
"description": "add a reference to the deploy folder with the wonderland script", | |
"scope": "javascript", | |
"prefix":"wl:script-reference" | |
}, | |
"Wonderland new component":{ | |
"description": "New and empty component", | |
"scope": "javascript", | |
"prefix": "wl:component", | |
"body": [ | |
"/// <reference path=\"../deploy/wonderland.js\" />", | |
"WL.registerComponent('$TM_FILENAME_BASE', {", | |
" $0", | |
"}, {", | |
" init: function() {", | |
" ", | |
" },", | |
" start: function() {", | |
" ", | |
" },", | |
" update: function(dt) {", | |
" ", | |
" },", | |
"});" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment