mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
updated pixi to v2
This commit is contained in:
parent
a5b3d2f671
commit
58b83f7297
95 changed files with 44677 additions and 3522 deletions
|
|
@ -60,7 +60,7 @@ function (Parent, PIXI, ColorRangeReplaceFilter, Settings) {
|
|||
var texture = PIXI.Texture.fromImage(texturePaths[i]);
|
||||
texture.width = options.width;
|
||||
texture.height = options.height;
|
||||
PIXI.texturesToUpdate.push(texture);
|
||||
//PIXI.texturesToUpdate.push(texture);
|
||||
textures.push(texture);
|
||||
}
|
||||
|
||||
|
|
@ -85,6 +85,7 @@ function (Parent, PIXI, ColorRangeReplaceFilter, Settings) {
|
|||
if (options.yScale) mesh.scale.y = options.yScale;
|
||||
if (options.visible === true || options.visible === false) mesh.visible = options.visible;
|
||||
if (options.pivot) mesh.pivot = new PIXI.Point(options.pivot.x, options.pivot.y);
|
||||
if (options.anchor) mesh.anchor = options.anchor;
|
||||
};
|
||||
|
||||
Layer.prototype.addFilter = function(mesh, filterName, options) {
|
||||
|
|
|
|||
|
|
@ -34,16 +34,23 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
|
||||
PixiView.prototype.init = function () {
|
||||
|
||||
var transparent = false;
|
||||
var antialias = true;
|
||||
var canvas = DomController.getCanvas();
|
||||
var rendererOptions = {
|
||||
view: DomController.getCanvas(),
|
||||
antialiasing: true,
|
||||
transparent: false,
|
||||
resolution: 1
|
||||
}
|
||||
|
||||
if(Settings.USE_WEBGL) {
|
||||
this.renderer = new PIXI.WebGLRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT, canvas, transparent, antialias);
|
||||
console.log('WebGLRenderer')
|
||||
|
||||
this.renderer = new PIXI.WebGLRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT, rendererOptions);
|
||||
console.log('WebGLRenderer');
|
||||
|
||||
} else {
|
||||
this.renderer = new PIXI.CanvasRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT, canvas, transparent, antialias);
|
||||
console.log('CanvasRenderer - not using WebGL!')
|
||||
|
||||
this.renderer = new PIXI.CanvasRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT, rendererOptions);
|
||||
console.warn('CanvasRenderer - not using WebGL!');
|
||||
|
||||
}
|
||||
|
||||
this.stage = new PIXI.Stage(0x333333);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue