melonjs 10.3.0 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/melonjs.js +2419 -3072
- package/dist/melonjs.min.js +3 -3
- package/dist/melonjs.module.d.ts +3417 -3816
- package/dist/melonjs.module.js +2737 -3002
- package/package.json +16 -16
- package/src/audio/audio.js +29 -30
- package/src/camera/camera2d.js +46 -56
- package/src/entity/draggable.js +12 -13
- package/src/entity/droptarget.js +13 -15
- package/src/entity/entity.js +30 -36
- package/src/game.js +21 -22
- package/src/geometries/ellipse.js +40 -46
- package/src/geometries/line.js +9 -11
- package/src/geometries/poly.js +53 -53
- package/src/geometries/rectangle.js +42 -44
- package/src/index.js +4 -14
- package/src/input/gamepad.js +11 -10
- package/src/input/input.js +2 -3
- package/src/input/keyboard.js +113 -113
- package/src/input/pointer.js +30 -31
- package/src/input/pointerevent.js +26 -26
- package/src/lang/deprecated.js +25 -6
- package/src/level/level.js +23 -24
- package/src/level/tiled/TMXGroup.js +7 -8
- package/src/level/tiled/TMXLayer.js +30 -32
- package/src/level/tiled/TMXObject.js +21 -21
- package/src/level/tiled/TMXTile.js +18 -18
- package/src/level/tiled/TMXTileMap.js +37 -44
- package/src/level/tiled/TMXTileset.js +12 -15
- package/src/level/tiled/TMXTilesetGroup.js +9 -9
- package/src/level/tiled/renderer/TMXHexagonalRenderer.js +7 -8
- package/src/level/tiled/renderer/TMXIsometricRenderer.js +7 -8
- package/src/level/tiled/renderer/TMXOrthogonalRenderer.js +4 -5
- package/src/level/tiled/renderer/TMXRenderer.js +24 -25
- package/src/level/tiled/renderer/TMXStaggeredRenderer.js +1 -4
- package/src/loader/loader.js +14 -15
- package/src/loader/loadingscreen.js +2 -4
- package/src/math/color.js +47 -66
- package/src/math/math.js +15 -16
- package/src/math/matrix2.js +53 -58
- package/src/math/matrix3.js +56 -62
- package/src/math/observable_vector2.js +75 -76
- package/src/math/observable_vector3.js +79 -80
- package/src/math/vector2.js +91 -92
- package/src/math/vector3.js +94 -96
- package/src/particles/emitter.js +38 -40
- package/src/particles/particle.js +4 -5
- package/src/particles/particlecontainer.js +2 -3
- package/src/physics/body.js +44 -142
- package/src/physics/bounds.js +47 -47
- package/src/physics/collision.js +13 -14
- package/src/physics/detector.js +14 -14
- package/src/physics/quadtree.js +17 -19
- package/src/physics/sat.js +26 -26
- package/src/physics/world.js +24 -28
- package/src/plugin/plugin.js +11 -14
- package/src/renderable/GUI.js +41 -46
- package/src/renderable/collectable.js +4 -8
- package/src/renderable/colorlayer.js +6 -10
- package/src/renderable/container.js +87 -72
- package/src/renderable/imagelayer.js +25 -31
- package/src/renderable/nineslicesprite.js +41 -41
- package/src/renderable/renderable.js +112 -122
- package/src/renderable/sprite.js +62 -68
- package/src/renderable/trigger.js +25 -30
- package/src/state/stage.js +13 -17
- package/src/state/state.js +26 -27
- package/src/system/device.js +74 -75
- package/src/system/event.js +71 -72
- package/src/system/pooling.js +11 -12
- package/src/system/save.js +3 -4
- package/src/system/timer.js +19 -20
- package/src/text/bitmaptext.js +57 -54
- package/src/text/bitmaptextdata.js +10 -10
- package/src/text/glyph.js +3 -0
- package/src/text/text.js +44 -49
- package/src/tweens/easing.js +1 -1
- package/src/tweens/interpolation.js +1 -1
- package/src/tweens/tween.js +43 -44
- package/src/utils/agent.js +3 -4
- package/src/utils/array.js +4 -5
- package/src/utils/file.js +3 -4
- package/src/utils/function.js +4 -5
- package/src/utils/string.js +7 -9
- package/src/utils/utils.js +4 -5
- package/src/video/canvas/canvas_renderer.js +58 -59
- package/src/video/renderer.js +49 -53
- package/src/video/texture.js +98 -111
- package/src/video/texture_cache.js +2 -2
- package/src/video/video.js +15 -16
- package/src/video/webgl/glshader.js +37 -38
- package/src/video/webgl/webgl_compositor.js +31 -32
- package/src/video/webgl/webgl_renderer.js +79 -80
package/src/physics/world.js
CHANGED
|
@@ -9,20 +9,16 @@ import state from "./../state/state.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* @classdesc
|
|
11
11
|
* an object representing the physic world, and responsible for managing and updating all childs and physics
|
|
12
|
-
* @
|
|
13
|
-
* @augments me.Container
|
|
14
|
-
* @memberof me
|
|
15
|
-
* @param {number} [x=0] position of the container (accessible via the inherited pos.x property)
|
|
16
|
-
* @param {number} [y=0] position of the container (accessible via the inherited pos.y property)
|
|
17
|
-
* @param {number} [w=me.game.viewport.width] width of the container
|
|
18
|
-
* @param {number} [h=me.game.viewport.height] height of the container
|
|
12
|
+
* @augments Container
|
|
19
13
|
*/
|
|
20
14
|
class World extends Container {
|
|
21
15
|
/**
|
|
22
|
-
* @
|
|
16
|
+
* @param {number} [x=0] position of the container (accessible via the inherited pos.x property)
|
|
17
|
+
* @param {number} [y=0] position of the container (accessible via the inherited pos.y property)
|
|
18
|
+
* @param {number} [width=game.viewport.width] width of the container
|
|
19
|
+
* @param {number} [height=game.viewport.height] height of the container
|
|
23
20
|
*/
|
|
24
21
|
constructor(x = 0, y = 0, width = Infinity, height = Infinity) {
|
|
25
|
-
|
|
26
22
|
// call the super constructor
|
|
27
23
|
super(x, y, width, height, true);
|
|
28
24
|
|
|
@@ -36,21 +32,21 @@ class World extends Container {
|
|
|
36
32
|
* the rate at which the game world is updated,
|
|
37
33
|
* may be greater than or lower than the display fps
|
|
38
34
|
* @public
|
|
39
|
-
* @type {
|
|
35
|
+
* @type {Vector2d}
|
|
40
36
|
* @default 60
|
|
41
37
|
* @name fps
|
|
42
|
-
* @memberof
|
|
43
|
-
* @see
|
|
38
|
+
* @memberof World
|
|
39
|
+
* @see timer.maxfps
|
|
44
40
|
*/
|
|
45
41
|
this.fps = 60;
|
|
46
42
|
|
|
47
43
|
/**
|
|
48
44
|
* world gravity
|
|
49
45
|
* @public
|
|
50
|
-
* @type {
|
|
46
|
+
* @type {Vector2d}
|
|
51
47
|
* @default <0,0.98>
|
|
52
48
|
* @name gravity
|
|
53
|
-
* @memberof
|
|
49
|
+
* @memberof World
|
|
54
50
|
*/
|
|
55
51
|
this.gravity = new Vector2d(0, 0.98);
|
|
56
52
|
|
|
@@ -64,14 +60,14 @@ class World extends Container {
|
|
|
64
60
|
* property to your layer (in Tiled).
|
|
65
61
|
* @type {boolean}
|
|
66
62
|
* @default false
|
|
67
|
-
* @memberof
|
|
63
|
+
* @memberof World
|
|
68
64
|
*/
|
|
69
65
|
this.preRender = false;
|
|
70
66
|
|
|
71
67
|
/**
|
|
72
68
|
* the active physic bodies in this simulation
|
|
73
69
|
* @name bodies
|
|
74
|
-
* @memberof
|
|
70
|
+
* @memberof World
|
|
75
71
|
* @public
|
|
76
72
|
* @type {Set}
|
|
77
73
|
*/
|
|
@@ -80,9 +76,9 @@ class World extends Container {
|
|
|
80
76
|
/**
|
|
81
77
|
* the instance of the game world quadtree used for broadphase
|
|
82
78
|
* @name broadphase
|
|
83
|
-
* @memberof
|
|
79
|
+
* @memberof World
|
|
84
80
|
* @public
|
|
85
|
-
* @type {
|
|
81
|
+
* @type {QuadTree}
|
|
86
82
|
*/
|
|
87
83
|
this.broadphase = new QuadTree(this.getBounds().clone(), collision.maxChildren, collision.maxDepth);
|
|
88
84
|
|
|
@@ -99,7 +95,7 @@ class World extends Container {
|
|
|
99
95
|
/**
|
|
100
96
|
* reset the game world
|
|
101
97
|
* @name reset
|
|
102
|
-
* @memberof
|
|
98
|
+
* @memberof World
|
|
103
99
|
* @function
|
|
104
100
|
*/
|
|
105
101
|
reset() {
|
|
@@ -120,11 +116,11 @@ class World extends Container {
|
|
|
120
116
|
/**
|
|
121
117
|
* Add a physic body to the game world
|
|
122
118
|
* @name addBody
|
|
123
|
-
* @memberof
|
|
124
|
-
* @see
|
|
119
|
+
* @memberof World
|
|
120
|
+
* @see Container.addChild
|
|
125
121
|
* @function
|
|
126
|
-
* @param {
|
|
127
|
-
* @returns {
|
|
122
|
+
* @param {Body} body
|
|
123
|
+
* @returns {World} this game world
|
|
128
124
|
*/
|
|
129
125
|
addBody(body) {
|
|
130
126
|
//add it to the list of active body
|
|
@@ -135,11 +131,11 @@ class World extends Container {
|
|
|
135
131
|
/**
|
|
136
132
|
* Remove a physic body from the game world
|
|
137
133
|
* @name removeBody
|
|
138
|
-
* @memberof
|
|
139
|
-
* @see
|
|
134
|
+
* @memberof World
|
|
135
|
+
* @see Container.removeChild
|
|
140
136
|
* @function
|
|
141
|
-
* @param {
|
|
142
|
-
* @returns {
|
|
137
|
+
* @param {Body} body
|
|
138
|
+
* @returns {World} this game world
|
|
143
139
|
*/
|
|
144
140
|
removeBody(body) {
|
|
145
141
|
//remove from the list of active body
|
|
@@ -150,7 +146,7 @@ class World extends Container {
|
|
|
150
146
|
/**
|
|
151
147
|
* update the game world
|
|
152
148
|
* @name reset
|
|
153
|
-
* @memberof
|
|
149
|
+
* @memberof World
|
|
154
150
|
* @function
|
|
155
151
|
* @param {number} dt the time passed since the last frame update
|
|
156
152
|
* @returns {boolean} true if the word is dirty
|
package/src/plugin/plugin.js
CHANGED
|
@@ -3,9 +3,8 @@ import { version } from "./../index.js";
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This namespace is a container for all registered plugins.
|
|
6
|
-
* @see
|
|
7
|
-
* @namespace
|
|
8
|
-
* @memberof me
|
|
6
|
+
* @see plugin.register
|
|
7
|
+
* @namespace plugins
|
|
9
8
|
*/
|
|
10
9
|
export var plugins = {};
|
|
11
10
|
|
|
@@ -19,7 +18,7 @@ class BasePlugin {
|
|
|
19
18
|
* @public
|
|
20
19
|
* @type {string}
|
|
21
20
|
* @default "__VERSION__"
|
|
22
|
-
* @name
|
|
21
|
+
* @name plugin.Base#version
|
|
23
22
|
*/
|
|
24
23
|
this.version = "__VERSION__";
|
|
25
24
|
}
|
|
@@ -27,25 +26,23 @@ class BasePlugin {
|
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* @namespace plugin
|
|
30
|
-
* @memberof me
|
|
31
29
|
*/
|
|
32
30
|
export var plugin = {
|
|
33
31
|
|
|
34
32
|
/**
|
|
35
33
|
* a base Object for plugin <br>
|
|
36
34
|
* plugin must be installed using the register function
|
|
37
|
-
* @see
|
|
35
|
+
* @see plugin
|
|
38
36
|
* @class
|
|
39
|
-
* @
|
|
40
|
-
* @
|
|
41
|
-
* @memberof me
|
|
37
|
+
* @name Base
|
|
38
|
+
* @memberof plugin
|
|
42
39
|
*/
|
|
43
40
|
Base : BasePlugin,
|
|
44
41
|
|
|
45
42
|
/**
|
|
46
43
|
* patch a melonJS function
|
|
47
44
|
* @name patch
|
|
48
|
-
* @memberof
|
|
45
|
+
* @memberof plugin
|
|
49
46
|
* @public
|
|
50
47
|
* @function
|
|
51
48
|
* @param {object} proto target object
|
|
@@ -65,7 +62,7 @@ export var plugin = {
|
|
|
65
62
|
if (typeof proto.prototype !== "undefined") {
|
|
66
63
|
proto = proto.prototype;
|
|
67
64
|
}
|
|
68
|
-
// reuse the logic behind
|
|
65
|
+
// reuse the logic behind object extends
|
|
69
66
|
if (typeof(proto[name]) === "function") {
|
|
70
67
|
// save the original function
|
|
71
68
|
var _parent = proto[name];
|
|
@@ -90,11 +87,11 @@ export var plugin = {
|
|
|
90
87
|
/**
|
|
91
88
|
* Register a plugin.
|
|
92
89
|
* @name register
|
|
93
|
-
* @memberof
|
|
94
|
-
* @see
|
|
90
|
+
* @memberof plugin
|
|
91
|
+
* @see Base
|
|
95
92
|
* @public
|
|
96
93
|
* @function
|
|
97
|
-
* @param {
|
|
94
|
+
* @param {plugin.Base} pluginObj Plugin object to instantiate and register
|
|
98
95
|
* @param {string} name
|
|
99
96
|
* @param {object} [...arguments] all extra parameters will be passed to the plugin constructor
|
|
100
97
|
* @example
|
package/src/renderable/GUI.js
CHANGED
|
@@ -9,43 +9,38 @@ import { registerPointerEvent, releasePointerEvent} from "./../input/input.js";
|
|
|
9
9
|
* A very basic object to manage GUI elements <br>
|
|
10
10
|
* The object simply register on the "pointerdown" <br>
|
|
11
11
|
* or "touchstart" event and call the onClick function"
|
|
12
|
-
* @
|
|
13
|
-
* @augments me.Sprite
|
|
14
|
-
* @memberof me
|
|
15
|
-
* @param {number} x the x coordinate of the GUI Object
|
|
16
|
-
* @param {number} y the y coordinate of the GUI Object
|
|
17
|
-
* @param {object} settings See {@link me.Sprite}
|
|
18
|
-
* @example
|
|
19
|
-
* // create a basic GUI Object
|
|
20
|
-
* class myButton extends GUI_Object {
|
|
21
|
-
* constructor(x, y) {
|
|
22
|
-
* var settings = {}
|
|
23
|
-
* settings.image = "button";
|
|
24
|
-
* settings.framewidth = 100;
|
|
25
|
-
* settings.frameheight = 50;
|
|
26
|
-
* // super constructor
|
|
27
|
-
* super(x, y, settings);
|
|
28
|
-
* // define the object z order
|
|
29
|
-
* this.pos.z = 4;
|
|
30
|
-
* }
|
|
31
|
-
*
|
|
32
|
-
* // output something in the console
|
|
33
|
-
* // when the object is clicked
|
|
34
|
-
* onClick:function (event) {
|
|
35
|
-
* console.log("clicked!");
|
|
36
|
-
* // don't propagate the event
|
|
37
|
-
* return false;
|
|
38
|
-
* }
|
|
39
|
-
* });
|
|
40
|
-
*
|
|
41
|
-
* // add the object at pos (10,10)
|
|
42
|
-
* me.game.world.addChild(new myButton(10,10));
|
|
12
|
+
* @augments Sprite
|
|
43
13
|
*/
|
|
44
|
-
|
|
45
14
|
class GUI_Object extends Sprite {
|
|
46
|
-
|
|
47
15
|
/**
|
|
48
|
-
* @
|
|
16
|
+
* @param {number} x the x coordinate of the GUI Object
|
|
17
|
+
* @param {number} y the y coordinate of the GUI Object
|
|
18
|
+
* @param {object} settings See {@link Sprite}
|
|
19
|
+
* @example
|
|
20
|
+
* // create a basic GUI Object
|
|
21
|
+
* class myButton extends GUI_Object {
|
|
22
|
+
* constructor(x, y) {
|
|
23
|
+
* var settings = {}
|
|
24
|
+
* settings.image = "button";
|
|
25
|
+
* settings.framewidth = 100;
|
|
26
|
+
* settings.frameheight = 50;
|
|
27
|
+
* // super constructor
|
|
28
|
+
* super(x, y, settings);
|
|
29
|
+
* // define the object z order
|
|
30
|
+
* this.pos.z = 4;
|
|
31
|
+
* }
|
|
32
|
+
*
|
|
33
|
+
* // output something in the console
|
|
34
|
+
* // when the object is clicked
|
|
35
|
+
* onClick:function (event) {
|
|
36
|
+
* console.log("clicked!");
|
|
37
|
+
* // don't propagate the event
|
|
38
|
+
* return false;
|
|
39
|
+
* }
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // add the object at pos (10,10)
|
|
43
|
+
* me.game.world.addChild(new myButton(10,10));
|
|
49
44
|
*/
|
|
50
45
|
constructor(x, y, settings) {
|
|
51
46
|
|
|
@@ -57,7 +52,7 @@ class GUI_Object extends Sprite {
|
|
|
57
52
|
* @public
|
|
58
53
|
* @type {boolean}
|
|
59
54
|
* @default true
|
|
60
|
-
* @name
|
|
55
|
+
* @name GUI_Object#isClickable
|
|
61
56
|
*/
|
|
62
57
|
this.isClickable = true;
|
|
63
58
|
|
|
@@ -65,7 +60,7 @@ class GUI_Object extends Sprite {
|
|
|
65
60
|
* Tap and hold threshold timeout in ms
|
|
66
61
|
* @type {number}
|
|
67
62
|
* @default 250
|
|
68
|
-
* @name
|
|
63
|
+
* @name GUI_Object#holdThreshold
|
|
69
64
|
*/
|
|
70
65
|
this.holdThreshold = 250;
|
|
71
66
|
|
|
@@ -74,7 +69,7 @@ class GUI_Object extends Sprite {
|
|
|
74
69
|
* @public
|
|
75
70
|
* @type {boolean}
|
|
76
71
|
* @default false
|
|
77
|
-
* @name
|
|
72
|
+
* @name GUI_Object#isHoldable
|
|
78
73
|
*/
|
|
79
74
|
this.isHoldable = false;
|
|
80
75
|
|
|
@@ -83,7 +78,7 @@ class GUI_Object extends Sprite {
|
|
|
83
78
|
* @public
|
|
84
79
|
* @type {boolean}
|
|
85
80
|
* @default false
|
|
86
|
-
* @name
|
|
81
|
+
* @name GUI_Object#hover
|
|
87
82
|
*/
|
|
88
83
|
this.hover = false;
|
|
89
84
|
|
|
@@ -121,10 +116,10 @@ class GUI_Object extends Sprite {
|
|
|
121
116
|
/**
|
|
122
117
|
* function called when the object is pressed (to be extended)
|
|
123
118
|
* @name onClick
|
|
124
|
-
* @memberof
|
|
119
|
+
* @memberof GUI_Object.prototype
|
|
125
120
|
* @public
|
|
126
121
|
* @function
|
|
127
|
-
* @param {
|
|
122
|
+
* @param {Pointer} event the event object
|
|
128
123
|
* @returns {boolean} return false if we need to stop propagating the event
|
|
129
124
|
*/
|
|
130
125
|
onClick(/* event */) {
|
|
@@ -144,10 +139,10 @@ class GUI_Object extends Sprite {
|
|
|
144
139
|
/**
|
|
145
140
|
* function called when the pointer is over the object
|
|
146
141
|
* @name onOver
|
|
147
|
-
* @memberof
|
|
142
|
+
* @memberof GUI_Object.prototype
|
|
148
143
|
* @public
|
|
149
144
|
* @function
|
|
150
|
-
* @param {
|
|
145
|
+
* @param {Pointer} event the event object
|
|
151
146
|
*/
|
|
152
147
|
onOver(/* event */) {}
|
|
153
148
|
|
|
@@ -165,10 +160,10 @@ class GUI_Object extends Sprite {
|
|
|
165
160
|
/**
|
|
166
161
|
* function called when the pointer is leaving the object area
|
|
167
162
|
* @name onOut
|
|
168
|
-
* @memberof
|
|
163
|
+
* @memberof GUI_Object.prototype
|
|
169
164
|
* @public
|
|
170
165
|
* @function
|
|
171
|
-
* @param {
|
|
166
|
+
* @param {Pointer} event the event object
|
|
172
167
|
*/
|
|
173
168
|
onOut(/* event */) {
|
|
174
169
|
|
|
@@ -190,7 +185,7 @@ class GUI_Object extends Sprite {
|
|
|
190
185
|
/**
|
|
191
186
|
* function called when the object is pressed and released (to be extended)
|
|
192
187
|
* @name onRelease
|
|
193
|
-
* @memberof
|
|
188
|
+
* @memberof GUI_Object.prototype
|
|
194
189
|
* @public
|
|
195
190
|
* @function
|
|
196
191
|
* @returns {boolean} return false if we need to stop propagating the event
|
|
@@ -215,7 +210,7 @@ class GUI_Object extends Sprite {
|
|
|
215
210
|
* function called when the object is pressed and held<br>
|
|
216
211
|
* to be extended <br>
|
|
217
212
|
* @name onHold
|
|
218
|
-
* @memberof
|
|
213
|
+
* @memberof GUI_Object.prototype
|
|
219
214
|
* @public
|
|
220
215
|
* @function
|
|
221
216
|
*/
|
|
@@ -6,17 +6,13 @@ import collision from "./../physics/collision.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* @classdesc
|
|
8
8
|
* a basic collectable helper class for immovable object (e.g. a coin)
|
|
9
|
-
* @
|
|
10
|
-
* @augments me.Sprite
|
|
11
|
-
* @memberof me
|
|
12
|
-
* @param {number} x the x coordinates of the collectable
|
|
13
|
-
* @param {number} y the y coordinates of the collectable
|
|
14
|
-
* @param {object} settings See {@link me.Sprite}
|
|
9
|
+
* @augments Sprite
|
|
15
10
|
*/
|
|
16
|
-
|
|
17
11
|
class Collectable extends Sprite {
|
|
18
12
|
/**
|
|
19
|
-
* @
|
|
13
|
+
* @param {number} x the x coordinates of the collectable
|
|
14
|
+
* @param {number} y the y coordinates of the collectable
|
|
15
|
+
* @param {object} settings See {@link Sprite}
|
|
20
16
|
*/
|
|
21
17
|
constructor(x, y, settings) {
|
|
22
18
|
|
|
@@ -6,17 +6,13 @@ import Renderable from "./renderable.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* @classdesc
|
|
8
8
|
* a generic Color Layer Object. Fills the entire Canvas with the color not just the container the object belongs to.
|
|
9
|
-
* @
|
|
10
|
-
* @augments me.Renderable
|
|
11
|
-
* @memberof me
|
|
12
|
-
* @param {string} name Layer name
|
|
13
|
-
* @param {me.Color|string} color CSS color
|
|
14
|
-
* @param {number} [z = 0] z-index position
|
|
9
|
+
* @augments Renderable
|
|
15
10
|
*/
|
|
16
11
|
class ColorLayer extends Renderable {
|
|
17
|
-
|
|
18
12
|
/**
|
|
19
|
-
* @
|
|
13
|
+
* @param {string} name Layer name
|
|
14
|
+
* @param {Color|string} color CSS color
|
|
15
|
+
* @param {number} [z = 0] z-index position
|
|
20
16
|
*/
|
|
21
17
|
constructor(name, color, z) {
|
|
22
18
|
// parent constructor
|
|
@@ -25,9 +21,9 @@ class ColorLayer extends Renderable {
|
|
|
25
21
|
/**
|
|
26
22
|
* the layer color component
|
|
27
23
|
* @public
|
|
28
|
-
* @type {
|
|
24
|
+
* @type {Color}
|
|
29
25
|
* @name color
|
|
30
|
-
* @memberof
|
|
26
|
+
* @memberof ColorLayer#
|
|
31
27
|
*/
|
|
32
28
|
this.color = pool.pull("Color").parseCSS(color);
|
|
33
29
|
|