@soonspacejs/plugin-sbmz-loader 2.5.52 → 2.5.54

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.esm.js CHANGED
@@ -12,4 +12,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
12
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
13
  PERFORMANCE OF THIS SOFTWARE.
14
14
  ***************************************************************************** */
15
- function t(t,o,n,i){return new(n||(n=Promise))((function(s,e){function a(t){try{l(i.next(t))}catch(t){e(t)}}function c(t){try{l(i.throw(t))}catch(t){e(t)}}function l(t){var o;t.done?s(t.value):(o=t.value,o instanceof n?o:new n((function(t){t(o)}))).then(a,c)}l((i=i.apply(t,o||[])).next())}))}class o{constructor(t){this.modelData=[],this.modelList=[],this.ssp=t}load(o){return t(this,void 0,void 0,(function*(){const{fetchFile:t}=this.ssp.utils,n=yield t(`${o}/metadata.json`).then((t=>t.json()));this.modelData=n.items;const i=`${o}_group`;this.ssp.createGroup({id:i});const s=yield this.ssp.addModelForGroup(i,this.modelData.map((({name:t,position:n,rotation:i,scale:s,path:e},a)=>({id:a,name:t,url:`${o}/${e}`,position:{x:n[0],y:n[1],z:n[2]},rotation:{x:i[0],y:i[1],z:i[2]},scale:{x:s[0],y:s[1],z:s[2]}}))));this.modelList=null==s?void 0:s.children}))}}export{o as default};
15
+ function t(t,o,n,i){return new(n||(n=Promise))((function(s,e){function a(t){try{l(i.next(t))}catch(t){e(t)}}function c(t){try{l(i.throw(t))}catch(t){e(t)}}function l(t){var o;t.done?s(t.value):(o=t.value,o instanceof n?o:new n((function(t){t(o)}))).then(a,c)}l((i=i.apply(t,o||[])).next())}))}class o{constructor(t){this.modelData=[],this.modelList=[],this.ssp=t}load(o){return t(this,void 0,void 0,(function*(){const{fetchFile:t}=this.ssp.utils,n=yield t(`${o}/metadata.json`).then((t=>t.json()));this.modelData=n.items;const i=`${o}_group`;this.ssp.createGroup({id:i});const s=yield this.ssp.addModelForGroup(i,this.modelData.map(((t,n)=>{let{name:i,position:s,rotation:e,scale:a,path:c}=t;return{id:n,name:i,url:`${o}/${c}`,position:{x:s[0],y:s[1],z:s[2]},rotation:{x:e[0],y:e[1],z:e[2]},scale:{x:a[0],y:a[1],z:a[2]}}})));this.modelList=null==s?void 0:s.children}))}}export{o 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.5.52",
4
+ "version": "2.5.54",
5
5
  "description": "Sbmz-loader plugin for SoonSpace.js",
6
6
  "main": "dist/index.esm.js",
7
7
  "module": "dist/index.esm.js",
@@ -13,5 +13,8 @@
13
13
  ],
14
14
  "author": "xuek",
15
15
  "license": "UNLICENSED",
16
- "gitHead": "23dac225ca5572236615bd98110d906606ca4e27"
16
+ "gitHead": "e65c1d193de1b285780a1c6aebc6cb25d2d2d50c",
17
+ "peerDependencies": {
18
+ "soonspacejs": "2.5.54"
19
+ }
17
20
  }