2013-08-28 06:02:55 +00:00
|
|
|
/**
|
|
|
|
* @author Mat Groves http://matgroves.com/ @Doormat23
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @module PIXI
|
|
|
|
*/
|
|
|
|
var PIXI = PIXI || {};
|
2014-02-06 00:19:46 +00:00
|
|
|
|
2014-03-31 10:04:02 +00:00
|
|
|
/*
|
|
|
|
*
|
2014-02-12 01:25:36 +00:00
|
|
|
* This file contains a lot of pixi consts which are used across the rendering engine
|
|
|
|
* @class Consts
|
|
|
|
*/
|
2014-02-06 00:19:46 +00:00
|
|
|
PIXI.WEBGL_RENDERER = 0;
|
|
|
|
PIXI.CANVAS_RENDERER = 1;
|
|
|
|
|
|
|
|
// useful for testing against if your lib is using pixi.
|
2014-07-01 14:03:46 +00:00
|
|
|
PIXI.VERSION = 'v1.5.4';
|
2014-02-06 00:19:46 +00:00
|
|
|
|
|
|
|
// the various blend modes supported by pixi
|
|
|
|
PIXI.blendModes = {
|
|
|
|
NORMAL:0,
|
|
|
|
ADD:1,
|
|
|
|
MULTIPLY:2,
|
|
|
|
SCREEN:3,
|
|
|
|
OVERLAY:4,
|
|
|
|
DARKEN:5,
|
|
|
|
LIGHTEN:6,
|
|
|
|
COLOR_DODGE:7,
|
|
|
|
COLOR_BURN:8,
|
|
|
|
HARD_LIGHT:9,
|
|
|
|
SOFT_LIGHT:10,
|
|
|
|
DIFFERENCE:11,
|
|
|
|
EXCLUSION:12,
|
|
|
|
HUE:13,
|
|
|
|
SATURATION:14,
|
|
|
|
COLOR:15,
|
|
|
|
LUMINOSITY:16
|
|
|
|
};
|
|
|
|
|
|
|
|
// the scale modes
|
|
|
|
PIXI.scaleModes = {
|
|
|
|
DEFAULT:0,
|
|
|
|
LINEAR:0,
|
|
|
|
NEAREST:1
|
|
|
|
};
|
|
|
|
|
2014-07-01 14:03:46 +00:00
|
|
|
// used to create uids for various pixi objects..
|
|
|
|
PIXI._UID = 0;
|
|
|
|
|
|
|
|
PIXI.Float32Array = Float32Array || Array;
|
|
|
|
PIXI.Uint16Array = Uint16Array || Array;
|
|
|
|
|
2014-03-31 10:04:02 +00:00
|
|
|
// interaction frequency
|
2014-02-06 00:19:46 +00:00
|
|
|
PIXI.INTERACTION_FREQUENCY = 30;
|
2014-02-12 01:25:36 +00:00
|
|
|
PIXI.AUTO_PREVENT_DEFAULT = true;
|
|
|
|
|
|
|
|
PIXI.RAD_TO_DEG = 180 / Math.PI;
|
2014-07-01 14:03:46 +00:00
|
|
|
PIXI.DEG_TO_RAD = Math.PI / 180;
|
|
|
|
|
2014-07-03 09:49:58 +00:00
|
|
|
|
|
|
|
PIXI.dontSayHello = false;
|
|
|
|
|
|
|
|
PIXI.sayHello = function (type)
|
2014-07-01 14:03:46 +00:00
|
|
|
{
|
2014-07-03 09:49:58 +00:00
|
|
|
if(PIXI.dontSayHello)return;
|
|
|
|
|
2014-07-01 14:03:46 +00:00
|
|
|
if ( navigator.userAgent.toLowerCase().indexOf('chrome') > -1 )
|
|
|
|
{
|
|
|
|
var args = [
|
2014-07-09 04:40:50 +00:00
|
|
|
'%c %c %c Pixi.js ' + PIXI.VERSION + ' - ' + type + ' %c ' + ' %c ' + ' http://pixijs.com %c %c ♥%c♥%c♥ ',
|
2014-07-03 09:49:58 +00:00
|
|
|
'background: #ff66a5',
|
|
|
|
'background: #ff66a5',
|
|
|
|
'color: #ff66a5; background: #030307;',
|
|
|
|
'background: #ff66a5',
|
|
|
|
'background: #ffc3dc',
|
|
|
|
'background: #ff66a5',
|
2014-07-01 14:03:46 +00:00
|
|
|
'color: #ff2424; background: #fff',
|
|
|
|
'color: #ff2424; background: #fff',
|
|
|
|
'color: #ff2424; background: #fff'
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log.apply(console, args);
|
|
|
|
}
|
|
|
|
else if (window['console'])
|
|
|
|
{
|
|
|
|
console.log('Pixi.js ' + PIXI.VERSION + ' - http://pixjs.com');
|
|
|
|
}
|
|
|
|
|
2014-07-03 09:49:58 +00:00
|
|
|
PIXI.dontSayHello = true;
|
|
|
|
};
|