mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Merge branch 'master' of https://github.com/photonstorm/phaser
This commit is contained in:
commit
c4a9b11053
3 changed files with 22 additions and 7 deletions
|
@ -265,7 +265,7 @@ var EmitterOp = new Class({
|
||||||
*/
|
*/
|
||||||
toJSON: function ()
|
toJSON: function ()
|
||||||
{
|
{
|
||||||
return JSON.stringify(this.propertyValue);
|
return this.propertyValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -256,6 +256,7 @@ var ParticleEmitter = new Class({
|
||||||
this.configOpMap = [
|
this.configOpMap = [
|
||||||
'accelerationX',
|
'accelerationX',
|
||||||
'accelerationY',
|
'accelerationY',
|
||||||
|
'angle',
|
||||||
'alpha',
|
'alpha',
|
||||||
'bounce',
|
'bounce',
|
||||||
'delay',
|
'delay',
|
||||||
|
|
|
@ -20,11 +20,11 @@ var GetFastValue = require('../../utils/object/GetFastValue');
|
||||||
* @constructor
|
* @constructor
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string} key - [description]
|
* @param {(string|object)} key - The name of the asset to load or an object representing the asset
|
||||||
* @param {string} url - [description]
|
* @param {string} [url] - The asset's filename
|
||||||
* @param {string} path - [description]
|
* @param {string} [path] - The path the asset can be found in
|
||||||
* @param {XHRSettingsObject} [xhrSettings] - [description]
|
* @param {XHRSettingsObject} [xhrSettings] - Optional image specific XHR settings
|
||||||
* @param {object} [config] - [description]
|
* @param {object} [config] - config can include: frameWidth, frameHeight, startFrame, endFrame, margin, spacing
|
||||||
*/
|
*/
|
||||||
var ImageFile = new Class({
|
var ImageFile = new Class({
|
||||||
|
|
||||||
|
@ -45,12 +45,26 @@ var ImageFile = new Class({
|
||||||
// headerValue: 'text/xml'
|
// headerValue: 'text/xml'
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
// this.load.image([
|
||||||
|
// {
|
||||||
|
// key: 'bunny',
|
||||||
|
// file: 'assets/sprites/bunny.png',
|
||||||
|
// xhr: {
|
||||||
|
// user: 'root',
|
||||||
|
// password: 'th3G1bs0n',
|
||||||
|
// timeout: 30,
|
||||||
|
// header: 'Content-Type',
|
||||||
|
// headerValue: 'text/xml'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]);
|
||||||
// this.load.image({ key: 'bunny' });
|
// this.load.image({ key: 'bunny' });
|
||||||
// this.load.image({ key: 'bunny', extension: 'jpg' });
|
// this.load.image({ key: 'bunny', extension: 'jpg' });
|
||||||
|
|
||||||
function ImageFile (loader, key, url, xhrSettings, config)
|
function ImageFile (loader, key, url, xhrSettings, config)
|
||||||
{
|
{
|
||||||
var fileKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', '');
|
var fileKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', '');
|
||||||
|
var fileUrl = (url === undefined) ? GetFastValue(key, 'file') : url;
|
||||||
|
|
||||||
var fileConfig = {
|
var fileConfig = {
|
||||||
type: 'image',
|
type: 'image',
|
||||||
|
@ -58,7 +72,7 @@ var ImageFile = new Class({
|
||||||
extension: GetFastValue(key, 'extension', 'png'),
|
extension: GetFastValue(key, 'extension', 'png'),
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
key: fileKey,
|
key: fileKey,
|
||||||
url: GetFastValue(key, 'file', url),
|
url: fileUrl,
|
||||||
path: loader.path,
|
path: loader.path,
|
||||||
xhrSettings: GetFastValue(key, 'xhr', xhrSettings),
|
xhrSettings: GetFastValue(key, 'xhr', xhrSettings),
|
||||||
config: GetFastValue(key, 'config', config)
|
config: GetFastValue(key, 'config', config)
|
||||||
|
|
Loading…
Reference in a new issue