three-base 1.0.61 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Text3D/Text3D.ts
CHANGED
|
@@ -33,8 +33,8 @@ export default class Text3D extends Mesh {
|
|
|
33
33
|
this.setText({ text });
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// 字体的存储路径 例如 : "http://drm.gitee.io/
|
|
37
|
-
static path
|
|
36
|
+
// 字体的存储路径 例如 : "http://drm.gitee.io/three-base-font/simhei/字.js"
|
|
37
|
+
static path = "http://drm.gitee.io/three-base-font/";
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
material = new MeshStandardMaterial({
|
|
@@ -68,6 +68,7 @@ export default class Text3D extends Mesh {
|
|
|
68
68
|
text: this._config.text,
|
|
69
69
|
fontType: this._config.fontType,
|
|
70
70
|
callback: THREEFont => {
|
|
71
|
+
this.geometry.dispose();
|
|
71
72
|
this.geometry = new TextGeometry(this._config.text, {
|
|
72
73
|
font: THREEFont,
|
|
73
74
|
size: this._config.size,
|
|
@@ -179,7 +179,7 @@ class fontContorl {
|
|
|
179
179
|
|
|
180
180
|
// 加载外部字体.js
|
|
181
181
|
async _loadFontJson({ fontType = "simhei", fontName, fontBasePath }: { fontType: string, fontName: string, fontBasePath: string }) {
|
|
182
|
-
|
|
182
|
+
|
|
183
183
|
let fontJson = await this.getFont({ fontType, fontName });
|
|
184
184
|
|
|
185
185
|
if (!fontJson) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "three 3d three-base",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"element-resize-event": "^3",
|
|
43
43
|
"lodash": "^4",
|
|
44
44
|
"three": ">=0.150.0",
|
|
45
|
-
"vite": "
|
|
45
|
+
"vite": ">=3",
|
|
46
46
|
"dexie": "^3",
|
|
47
47
|
"three-spritetext": "^1",
|
|
48
48
|
"@types/three": ">=0.149.0",
|