File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const TYPE_ZONE = "zone";
6969 *
7070 * @param {Phaser.Scene } scene Phaser scene to create component at
7171 * @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
7373 */
7474export default class ComponentClip extends Phaser . GameObjects . Container {
7575 constructor ( scene , config , textures ) {
@@ -92,7 +92,7 @@ export default class ComponentClip extends Phaser.GameObjects.Container {
9292 * list of texture names to use in this component
9393 * @type {Array<String> }
9494 * */
95- this . _textures = textures ;
95+ this . _textures = Array . isArray ( textures ) ? textures : [ textures ] ;
9696
9797 /**
9898 * Texture frames to texture names map
You can’t perform that action at this time.
0 commit comments