@soonspacejs/plugin-sbmz-loader 2.13.10 → 2.13.11
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/dist/index.d.ts +17 -17
- package/dist/index.esm.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import SoonSpace from 'soonspacejs';
|
|
2
|
-
import type { Model } from 'soonspacejs';
|
|
3
|
-
export interface SbmzModelData {
|
|
4
|
-
matrix: number[];
|
|
5
|
-
name: string;
|
|
6
|
-
path: string;
|
|
7
|
-
position: [number, number, number];
|
|
8
|
-
rotation: [number, number, number];
|
|
9
|
-
scale: [number, number, number];
|
|
10
|
-
}
|
|
11
|
-
export default class SbmzLoader {
|
|
12
|
-
ssp: SoonSpace;
|
|
13
|
-
modelData: SbmzModelData[];
|
|
14
|
-
modelList: Model[];
|
|
15
|
-
constructor(ssp: SoonSpace);
|
|
16
|
-
load(path: string): Promise<void>;
|
|
17
|
-
}
|
|
1
|
+
import SoonSpace from 'soonspacejs';
|
|
2
|
+
import type { Model } from 'soonspacejs';
|
|
3
|
+
export interface SbmzModelData {
|
|
4
|
+
matrix: number[];
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
position: [number, number, number];
|
|
8
|
+
rotation: [number, number, number];
|
|
9
|
+
scale: [number, number, number];
|
|
10
|
+
}
|
|
11
|
+
export default class SbmzLoader {
|
|
12
|
+
ssp: SoonSpace;
|
|
13
|
+
modelData: SbmzModelData[];
|
|
14
|
+
modelList: Model[];
|
|
15
|
+
constructor(ssp: SoonSpace);
|
|
16
|
+
load(path: string): Promise<void>;
|
|
17
|
+
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{constructor(t){this.modelData=[],this.modelList=[],this.ssp=t}async load(t){const{fetchFile:s}=this.ssp.utils,a=await s(`${t}/metadata.json`,"json");this.modelData=a.items;const o=`${t}_group`;this.ssp.createGroup({id:o});const i=await this.ssp.addModelForGroup(o,this.modelData.map((
|
|
1
|
+
class t{constructor(t){this.modelData=[],this.modelList=[],this.ssp=t}async load(t){const{fetchFile:s}=this.ssp.utils,a=await s(`${t}/metadata.json`,"json");this.modelData=a.items;const o=`${t}_group`;this.ssp.createGroup({id:o});const i=await this.ssp.addModelForGroup(o,this.modelData.map(({name:s,position:a,rotation:o,scale:i,path:e},l)=>({id:`${l}${e}`,name:s,url:`${t}/${e}`,position:{x:a[0],y:a[1],z:a[2]},rotation:{x:o[0],y:o[1],z:o[2]},scale:{x:i[0],y:i[1],z:i[2]}})));this.modelList=null==i?void 0:i.children}}export{t as default};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soonspacejs/plugin-sbmz-loader",
|
|
3
3
|
"pluginName": "SbmzLoaderPlugin",
|
|
4
|
-
"version": "2.13.
|
|
4
|
+
"version": "2.13.11",
|
|
5
5
|
"description": "Sbmz-loader plugin for SoonSpace.js",
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
],
|
|
14
14
|
"author": "xunwei",
|
|
15
15
|
"license": "UNLICENSED",
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "08bf9efb38c291f22ca044b936fd49269c716bbb",
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"soonspacejs": "2.13.
|
|
18
|
+
"soonspacejs": "2.13.11"
|
|
19
19
|
}
|
|
20
20
|
}
|