"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IconImageLayer = void 0;
var tslib_1 = require("tslib");
var constants_1 = require("./constants");
var icon_1 = require("./icon");
var IconImageLayer = /** @class */ (function (_super) {
    tslib_1.__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 = constants_1.DEFAULT_OPTIONS;
    return IconImageLayer;
}(icon_1.IconLayer));
exports.IconImageLayer = IconImageLayer;
//# sourceMappingURL=icon-image.js.map