Crafty.domLayer

Collection of mostly private methods to represent entities using the DOM.

Methods and Properties

Back to top

Crafty.domLayer._div

Crafty.domLayer._div is a div inside the #cr-stage div that holds all DOM entities. If you use canvas, a canvas element is created at the same level in the dom as the the Crafty.domLayer._div div. So the hierarchy in the DOM is

Crafty.stage.elem
 - Crafty.domLayer._div (a div HTMLElement)
 - Crafty.canvasLayer._canvas (a canvas HTMLElement)
Back to top

Crafty.domLayer._render

public Crafty.domLayer.render()

When "RenderScene" is triggered, draws all DOM entities that have been flagged

See Also

Back to top

Crafty.domLayer.add

public Crafty.domLayer.add(ent)
ent

The entity to add

Add an entity to the list of DOM object to draw

Back to top

Crafty.domLayer.debug

public Crafty.domLayer.debug()