MCPcopy Create free account
hub / github.com/eva-engine/eva.js / init

Method init

packages/plugin-renderer-text/lib/htmlText.component.ts:124–141  ·  view source on GitHub ↗

* 初始化组件 * @param obj - 初始化参数 * @param obj.text - 富文本内容 * @param obj.style - 文本样式 * @param obj.textureStyle - 纹理配置

(obj?: HTMLTextParams)

Source from the content-addressed store, hash-verified

122 * @param obj.textureStyle - 纹理配置
123 */
124 init(obj?: HTMLTextParams) {
125 this.style = {
126 fontSize: 24,
127 fill: '#000000',
128 fontFamily: 'Arial',
129 ...obj?.style
130 };
131
132 this.textureStyle = {
133 scaleMode: 'linear',
134 resolution: window.devicePixelRatio || 1,
135 ...obj?.textureStyle
136 };
137
138 if (obj) {
139 this.text = obj.text;
140 }
141 }
142}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected