I have a sprite called "Tank" on "Layer 0"
Trying to reference the name of a sprite or a layer with javascript.
Do these elements have ID's like <div id="Layer 0"> or <img id="Tank" scr......>
First time delving into SDK so go easy on me
Develop games in your browser. Powerful, performant & highly capable.
Take a look at the sdk section of the manual. Specifacally the runtime reference. You can get a layer by name so that helps, but you can't get a type by name. The usual method is to use a object type parameter for an action or something. Then you can get a reference to that object like that.
Type name will be minify after exported.
Thanks, I obviously need to do some major reading on this.
The only thing in the engine that are DOM elements are the form controls. Everything else is pure JS rendering to a canvas. So there are no div, img or any other kind of elements at all for those things.