From 78ffd417047f0a4e803e58e4adc7a361eee37943 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 3 Sep 2018 13:12:37 +0100 Subject: [PATCH] More specific includes --- src/gameobjects/GameObject.js | 4 ++-- src/gameobjects/graphics/Graphics.js | 28 ++++++++++++++++++---------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/gameobjects/GameObject.js b/src/gameobjects/GameObject.js index 158ba5343..279d9e8c6 100644 --- a/src/gameobjects/GameObject.js +++ b/src/gameobjects/GameObject.js @@ -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); }, /** diff --git a/src/gameobjects/graphics/Graphics.js b/src/gameobjects/graphics/Graphics.js index 3f73a7728..0573199dc 100644 --- a/src/gameobjects/graphics/Graphics.js +++ b/src/gameobjects/graphics/Graphics.js @@ -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 ],