File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const TYPE_ZONE = "zone";
69
69
*
70
70
* @param {Phaser.Scene } scene Phaser scene to create component at
71
71
* @param {ComponentConfig } config jsfl-generated config object
72
- * @param {Array<String> } textures Array of texture names, where component should find its texture frames
72
+ * @param {Array<String>|String } textures texure name or Array of texture names, where component should find its texture frames
73
73
*/
74
74
export default class ComponentClip extends Phaser . GameObjects . Container {
75
75
constructor ( scene , config , textures ) {
@@ -92,7 +92,7 @@ export default class ComponentClip extends Phaser.GameObjects.Container {
92
92
* list of texture names to use in this component
93
93
* @type {Array<String> }
94
94
* */
95
- this . _textures = textures ;
95
+ this . _textures = Array . isArray ( textures ) ? textures : [ textures ] ;
96
96
97
97
/**
98
98
* Texture frames to texture names map
You can’t perform that action at this time.
0 commit comments