import { __extends } from "tslib";
import { DEFAULT_OPTIONS } from './constants';
import { IconLayer } from './icon';
var IconImageLayer = /** @class */ (function (_super) {
    __extends(IconImageLayer, _super);
    function IconImageLayer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * 初始化资源
     */
    IconImageLayer.prototype.initAssets = function () {
        this.loadIconAtlas();
    };
    /**
     * load 图片资源
     */
    IconImageLayer.prototype.loadIconAtlas = function () {
        var iconAtlas = this.options.iconAtlas;
        var scene = this.scene;
        Object.keys(iconAtlas).forEach(function (icon) {
            scene === null || scene === void 0 ? void 0 : scene.addImage(icon, iconAtlas[icon]);
        });
    };
    /**
     * 默认配置项
     */
    IconImageLayer.DefaultOptions = DEFAULT_OPTIONS;
    return IconImageLayer;
}(IconLayer));
export { IconImageLayer };
//# sourceMappingURL=icon-image.js.map