How to use pixi - 10 common examples

To help you get started, we’ve selected a few pixi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AliaElKattan / survivalofthebestfit / game / public / components / pixi / ml-stage / resume.js View on Github external
draw() {
        this.resume = new PIXI.Sprite(cvTexture);
        this.resume.scale.set(SCALES.RESUME[screenSizeDetector()]);
        this.resume.x = this.xAnchor;
        this.resume.type = 'resume-on-belt';
        this.parent.addChild(this.resume);
    }
github AliaElKattan / survivalofthebestfit / game-source / public / game / components / pixi / ml-stage / resume.js View on Github external
draw() {
        this.resume = new PIXI.Sprite(cvTexture);
        this.resume.scale.set(SCALES.RESUME[screenSizeDetector()]);
        this.resume.x = this.xAnchor;
        this.resume.type = 'resume-on-belt';
        this.parent.addChild(this.resume);
    }
github kreezii / jsgam / src / game.js View on Github external
addBlackScreen(){
    this.blackScreen=new PIXI.Sprite(PIXI.Texture.WHITE);
    this.blackScreen.width=this.width;
    this.blackScreen.height=this.height;
    this.blackScreen.tint=0x000000;
    this.blackScreen.parentLayer = this.layerUI;
  }
github dacaher / pixijs-ts-boilerplate / src / scripts / pixi-app / pixi-app.ts View on Github external
constructor(options?: PixiAppOptions) {
        if (!options) {
            options = this.defaultOptions;
        }

        this.mediaInfoViewer = new MediaInfoViewer();

        this.app = new PIXI.Application(options);
        this.configure(options);
        this.ticker.add(this.resize.bind(this));

        this.appOptions = options;
    }
github davidfig / pixi-viewport / docs / ts / demo.ts View on Github external
function createApplication()
{
    renderer = new PIXI.Application({ transparent: true, width: window.innerWidth, height: window.innerHeight, resolution: window.devicePixelRatio })
    document.body.appendChild(renderer.view)
    renderer.view.style.position = 'fixed'
    renderer.view.style.width = '100vw'
    renderer.view.style.height = '100vh'
    renderer.view.style.top = 0
    renderer.view.style.left = 0
    renderer.view.style.background = 'rgba(0,0,0,.1)'
}
github davidfig / intersects / docs / code.js View on Github external
function setup()
{
    renderer = new PIXI.Application({ transparent: true, resolution: window.devicePixelRatio, view: document.querySelector('.view') })
    document.body.appendChild(renderer.view)
    ease = new Ease.list()
}
github Jeremboo / scribble-lab / scribbles / pixiJsRopes / ropeGenerator / app.js View on Github external
/**/   constructor(width, height) {
/**/     this.renderableCount = 0;
/**/     this.renderables = [];
/**/     this.renderer = autoDetectRenderer(width, height, {
/**/       antialias: true, resolution: 1,
/**/     });
/**/     this.renderer.backgroundColor = bgColor;
/**/     this.dom = this.renderer.view;
/**/     this.scene = new Container();
/**/     this.animate = this.animate.bind(this);
/**/     this.resizeHandler = this.resizeHandler.bind(this);
/**/   }
/**/   add(renderable) {
github Jeremboo / scribble-lab / scribbles / 2D / retroComposition / app.js View on Github external
constructor(width, height) {
    this.renderableCount = 0;
    this.renderables = [];
    this.renderer = autoDetectRenderer(width, height, {
      antialias: true, transparent: true, resolution: 1,
    });
    if (bgColor) this.renderer.backgroundColor = bgColor;
    this.dom = this.renderer.view;
    this.scene = new Container();
    this.animate = this.animate.bind(this);
    this.resizeHandler = this.resizeHandler.bind(this);
  }
  add(renderable) {
github ild-games / duckling-legacy / src / duckling / canvas / canvas.component.ts View on Github external
canvasCoordsFromStageCoords(stageCoords: Vector): Vector {
        if (!this.entitySystemDisplayObject) {
            return stageCoords;
        }

        return this.entitySystemDisplayObject.toGlobal(
            new Point(stageCoords.x, stageCoords.y)
        );
    }
github eranimo / terranova / src / interface / worldview / ChunkRenderer.ts View on Github external
private renderChunkMapMode(chunkX: number, chunkY: number) {
    const mapMode = this.mapModes[this.viewOptions.mapMode];
    const chunkCells = this.getCellsInChunk(chunkX, chunkY);
    const { cellWidth, cellHeight, chunkWidth, chunkHeight } = this.options;
    const chunkPosition = new Point(
      chunkX * chunkWidth * cellWidth,
      chunkY * chunkHeight * cellHeight,
    );
    mapMode.updateChunk(
      chunkX, chunkY,
      chunkCells,
      chunkPosition,
    );
  }

pixi

Super fast 2D rendering engine for browserify, that uses WebGL with a context 2d fallback.

MIT
Latest version published 9 years ago

Package Health Score

45 / 100
Full package analysis