Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FactoryGroup

The Factory.Group for create and control groups of sprite

import * as PIXI from 'pixi.js';
import Factory from 'pixi-factory';
import { hitTestRectangle } from './contain';
// ...
function setup() {
 const sprite = Factory.Sprite.create(new PIXI.Sprite(resources.example.texture));
 const group = Factory.Group.create([ sprite ], { container: app.stage });

 // or

 const sprite = Factory.Sprite.create(new PIXI.Sprite(resources.example.texture));
 const group = Factory.Group.create([['foo', sprite]], { container: app.stage, key: true });
}

Hierarchy

  • FactoryGroup

Constructors

Methods

Constructors

constructor

Methods

create

  • The Factory.Group for create and control groups of sprite

    import * as PIXI from 'pixi.js';
    import Factory from 'pixi-factory';
    // ...
    function setup() {
     const sprite = Factory.Sprite.create(new PIXI.Sprite(resources.example.texture));
     const group = Factory.Group.create([ sprite ], { container: app.stage });
    
     // or
    
     const sprite = Factory.Sprite.create(new PIXI.Sprite(resources.example.texture));
     const group = Factory.Group.create([['foo', sprite]], { container: app.stage, key: true });
    }
    

    Parameters

    Returns Group

    A Factory.Group instance.

Generated using TypeDoc