phaser4-rex-plugins
Version:
13 lines (10 loc) • 483 B
JavaScript
import Sizer from './Sizer.js';
import ObjectFactory from '../ObjectFactory.js';
import SetValue from '../../../plugins/utils/object/SetValue.js';
ObjectFactory.register('sizer', function (x, y, minWidth, minHeight, orientation, config) {
var gameObject = new Sizer(this.scene, x, y, minWidth, minHeight, orientation, config);
this.scene.add.existing(gameObject);
return gameObject;
});
SetValue(window, 'RexPlugins.UI.Sizer', Sizer);
export default Sizer;