Files
cocos4/editor/inspector/assets/texture/index.js
T
2021-05-12 16:36:57 +08:00

44 lines
889 B
JavaScript

'use strict';
const texture = require('./texture');
exports.template = texture.template;
exports.style = texture.style;
exports.$ = texture.$;
/**
* attribute corresponds to the edit element
*/
const Elements = texture.Elements;
/**
* Methods for automatic rendering of components
* @param assetList
* @param metaList
*/
exports.update = function(assetList, metaList) {
this.assetList = assetList;
this.metaList = metaList;
this.asset = assetList[0];
this.meta = metaList[0];
this.userData = this.meta.userData;
this.userDataList = this.metaList.map((item) => item.userData);
for (const prop in Elements) {
const element = Elements[prop];
if (element.update) {
element.update.call(this);
}
}
};
/**
* Method of initializing the panel
*/
exports.ready = texture.ready;
exports.methods = texture.methods;