Class: Resources

markus.elements.Resources

Implementing resource-loader for markusJS. Item properties are a resource for loading.

new markus.elements.Resources ()

Example
resources
  @level level.json
  @sprites sprites.json
  @bg bg.png

mark.get('resources').load(() => {
  mark.get('app').init();
});

Extends

  • PIXI.loaders.Loader

Mixes In

Members

this.childList Array.<Element>

Childs list

this.element string readonly

Element name

this.id string readonly

Element id

this.mark markus.View

Root view class

this.parentElement Element

Parent node

this.presets markus.View

Presets list

this.props Array.<function()> readonly

Element properties from markus markup

this.tags Array.<string>

Element tags

this.ticks Array.<function()>

Аrray of functions called every tick

Methods

addTag (props)

Add tag to tags list and app mixin props

Name Type Description
props string

tagName

addTick (cb)

Add function to ticks array

Name Type Description
cb funciton

Every tick is called

removeTag (props)

Remove tag from tags list and reuse mixins props

Name Type Description
props string

tagName

setProps (props)

Set props to element

Name Type Description
props Object

Props object