Skip to content

Instantly share code, notes, and snippets.

View mkideal's full-sized avatar

王仕晋 mkideal

View GitHub Profile
@animeoakes
animeoakes / renderer.js
Created December 20, 2016 20:46
Render pixi.js on top of three.js in the same <canvas> element
const pixi = require('pixi.js');
const three = require('three');
// Create the pixi.js renderer
const pixiRenderer = pixi.autoDetectRenderer(512, 512, { transparent: true });
// Create the three.js renderer
const threeRenderer = new three.WebGLRenderer();
threeRenderer.setSize(window.innerWidth, window.innerHeight);
threeRenderer.autoClear = false;