pixi-createfrom

0.0.9 • Public • Published

pixi-createfrom

Create sprites trees from an objet

instalation

with npm :

npm i pixi-createFrom

with html :

<script src="url"></script>

example

var CreateFrom = require('pixi-createfrom')
 
var doc = {
  name:'main',
  type:container,
  children:[
    {
      type:'sprite',
      src:'/assets/bunny.png',
      x:100,
      y:100,
      children:[
        type:'sprite',
        src:'/assets/glass.png',
        x:0,
        y:5
      ]
    }
  ]
}
 
var stage = CreateFrom(doc)
 
Pixi.renderer.render(stage)
 

plug-in

pixi-createFrom-photoshop

This repo was create to be combine with pixi-createFrom-photoshop.
Photoshop is well know and awesome to create pixels.

1- We will use this tools to generate an json
2- this json will be read by pixi-createFrom
3- pixi-createFrom will create an PIXI.Container with a tree of Sprites
4- and this PIXI.Container will be render by Pixi !

API

createFrom(object)

return PIXI.Container

Package Sidebar

Install

npm i pixi-createfrom

Weekly Downloads

0

Version

0.0.9

License

ISC

Last publish

Collaborators

  • florianbellazouz