three-base 1.0.31 → 1.0.32
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/threeUtils.ts +6 -3
- package/package.json +3 -3
package/lib/threeUtils.ts
CHANGED
|
@@ -46,7 +46,6 @@ class ThreeUtils extends EventDispatcher {
|
|
|
46
46
|
|
|
47
47
|
// 获取模型大小
|
|
48
48
|
getSize(object3d: Object3D | BufferGeometry) {
|
|
49
|
-
|
|
50
49
|
if (object3d instanceof Object3D) {
|
|
51
50
|
this.box3.setFromObject(object3d);
|
|
52
51
|
this.box3.getSize(this.size);
|
|
@@ -59,8 +58,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
// 模型对齐底面
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
alignBottom(object3d: Object3D | BufferGeometry, y = 0) {
|
|
64
62
|
if (object3d instanceof Object3D) {
|
|
65
63
|
this.box3.setFromObject(object3d);
|
|
66
64
|
this.box3.getCenter(this.center);
|
|
@@ -101,6 +99,11 @@ class ThreeUtils extends EventDispatcher {
|
|
|
101
99
|
}
|
|
102
100
|
}
|
|
103
101
|
|
|
102
|
+
//TODO 导出gltf文件
|
|
103
|
+
// exportGltf(object3d: Object3D) {
|
|
104
|
+
|
|
105
|
+
// }
|
|
106
|
+
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
const threeUtils = new ThreeUtils();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "three 3d three-base",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"three",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"apng-js": "^1",
|
|
37
37
|
"element-resize-event": "^3",
|
|
38
38
|
"lodash": "^4",
|
|
39
|
-
"three": ">=0.
|
|
39
|
+
"three": ">=0.150.0",
|
|
40
40
|
"three-spritetext": "^1",
|
|
41
|
-
"@types/three": ">=0.
|
|
41
|
+
"@types/three": ">=0.149.0",
|
|
42
42
|
"@types/element-resize-event": "^3",
|
|
43
43
|
"@types/lodash": "^4",
|
|
44
44
|
"@types/node": "^18"
|