This commit is contained in:
Richard Davey 2018-09-03 13:13:52 +01:00
commit 0399ca178e
2 changed files with 20 additions and 12 deletions

View file

@ -5,7 +5,7 @@
*/
var Class = require('../utils/Class');
var Components = require('./components');
var ComponentsToJSON = require('./components/ToJSON');
var DataManager = require('../data/DataManager');
var EventEmitter = require('eventemitter3');
@ -440,7 +440,7 @@ var GameObject = new Class({
*/
toJSON: function ()
{
return Components.ToJSON(this);
return ComponentsToJSON(this);
},
/**

View file

@ -7,8 +7,16 @@
var BaseCamera = require('../../cameras/2d/BaseCamera.js');
var Class = require('../../utils/Class');
var Commands = require('./Commands');
var Components = require('../components');
var Ellipse = require('../../geom/ellipse/');
var ComponentsAlpha = require('../components/Alpha');
var ComponentsBlendMode = require('../components/BlendMode');
var ComponentsDepth = require('../components/Depth');
var ComponentsMask = require('../components/Mask');
var ComponentsPipeline = require('../components/Pipeline');
var ComponentsTransform = require('../components/Transform');
var ComponentsVisible = require('../components/Visible');
var ComponentsScrollFactor = require('../components/ScrollFactor');
var Ellipse = require('../../geom/ellipse/Ellipse');
var GameObject = require('../GameObject');
var GetFastValue = require('../../utils/object/GetFastValue');
var GetValue = require('../../utils/object/GetValue');
@ -117,14 +125,14 @@ var Graphics = new Class({
Extends: GameObject,
Mixins: [
Components.Alpha,
Components.BlendMode,
Components.Depth,
Components.Mask,
Components.Pipeline,
Components.Transform,
Components.Visible,
Components.ScrollFactor,
ComponentsAlpha,
ComponentsBlendMode,
ComponentsDepth,
ComponentsMask,
ComponentsPipeline,
ComponentsTransform,
ComponentsVisible,
ComponentsScrollFactor,
Render
],