Chuck.js Now all new with WEB_GL ! haha stupid config typo! arrgh

This commit is contained in:
logsol 2014-01-17 02:13:59 +01:00
parent 73d24ed14c
commit 0072f0e6b5
4 changed files with 26 additions and 13 deletions

View file

@ -17,6 +17,7 @@ function (Parent, DomController, PIXI, Settings, NotificationCenter) {
this.stage = null;
this.container = null;
this.init();
this.pixi = PIXI;
}
PixiView.prototype = Object.create(Parent.prototype);
@ -25,14 +26,25 @@ function (Parent, DomController, PIXI, Settings, NotificationCenter) {
if(Settings.USE_WEBGL) {
this.renderer = new PIXI.WebGLRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT);
console.log('WebGLRenderer')
} else {
this.renderer = new PIXI.CanvasRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT);
console.log('CanvasRenderer')
}
this.stage = stage = new PIXI.Stage(0x333333);
this.stage = new PIXI.Stage(0x333333);
this.initCamera();
/*
var blurFilter = new PIXI.BlurFilter();
blurFilter.blurX = 12;
blurFilter.blurY = 0;
var grayFilter = new PIXI.GrayFilter();
grayFilter.gray = .6;
this.stage.filters = [grayFilter];
*/
this.setCanvas(this.renderer.view);
}
@ -106,6 +118,7 @@ function (Parent, DomController, PIXI, Settings, NotificationCenter) {
}
PixiView.prototype.initCamera = function () {
this.container = new PIXI.DisplayObjectContainer();
this.stage.addChild(this.container);
}