@anov/3d 0.0.322 → 0.0.324

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.
@@ -30,6 +30,11 @@ var loadGlb = function loadGlb(url, id, events, sceneControl) {
30
30
  resolve(gltf);
31
31
  },
32
32
  onError: function onError(error) {
33
+ sceneControl === null || sceneControl === void 0 || sceneControl.context.emitter.emit('model-loading-progress', {
34
+ id: id,
35
+ url: url,
36
+ progress: 1
37
+ });
33
38
  reject(error);
34
39
  }
35
40
  });
@@ -1 +1 @@
1
- {"version":3,"names":["LoaderModule","MessageType","sendToMessage","EMessageStatus","load","loadGlb","url","id","events","sceneControl","_sceneControl$context","dracoPath","context","storeManagement","get","Promise","resolve","reject","loadGLTF","autoBackward","isCache","draco","onProgress","progress","params","loaded","total","messageType","Event","messageName","status","Success","global","emitter","emit","onLoad","gltf","onError","error"],"sources":["../../../../../src/module/entity/model/load/loadGlb.ts"],"sourcesContent":["import { LoaderModule, type SceneControl } from '@anov/3d-core'\nimport { MessageType, sendToMessage } from '../../../../utils/messageFn'\nimport { EMessageStatus } from '../../../../messageStatus'\n\nconst load = new LoaderModule()\n\nconst loadGlb = (url: string, id: string, events?: any, sceneControl?: SceneControl) => {\n const dracoPath = sceneControl?.context.storeManagement.get('decoderPath') ?? './draco/'\n return new Promise((resolve, reject) => {\n load.loadGLTF({\n url,\n autoBackward: false,\n isCache: true,\n draco: true,\n dracoPath,\n onProgress: (progress) => {\n const params = { id, url, progress: progress.loaded / progress.total }\n sendToMessage(\n {\n messageType: MessageType.Event,\n messageName: 'onProgress',\n status: EMessageStatus.Success,\n global: false,\n },\n params)\n sceneControl?.context.emitter.emit('model-loading-progress', params)\n },\n onLoad: (gltf) => {\n resolve(gltf)\n },\n onError: (error) => {\n reject(error)\n },\n })\n })\n}\n\nexport default loadGlb"],"mappings":"AAAA,SAASA,YAAY,QAA2B,eAAe;AAC/D,SAASC,WAAW,EAAEC,aAAa;AACnC,SAASC,cA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MACf;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC;AAED,eAAejC,OAAO"}
1
+ {"version":3,"names":["LoaderModule","MessageType","sendToMessage","EMessageStatus","load","loadGlb","url","id","events","sceneControl","_sceneControl$context","dracoPath","context","storeManagement","get","Promise","resolve","reject","loadGLTF","autoBackward","isCache","draco","onProgress","progress","params","loaded","total","messageType","Event","messageName","status","Success","global","emitter","emit","onLoad","gltf","onError","error"],"sources":["../../../../../src/module/entity/model/load/loadGlb.ts"],"sourcesContent":["import { LoaderModule, type SceneControl } from '@anov/3d-core'\nimport { MessageType, sendToMessage } from '../../../../utils/messageFn'\nimport { EMessageStatus } from '../../../../messageStatus'\n\nconst load = new LoaderModule()\n\nconst loadGlb = (url: string, id: string, events?: any, sceneControl?: SceneControl) => {\n const dracoPath = sceneControl?.context.storeManagement.get('decoderPath') ?? './draco/'\n return new Promise((resolve, reject) => {\n load.loadGLTF({\n url,\n autoBackward: false,\n isCache: true,\n draco: true,\n dracoPath,\n onProgress: (progress) => {\n const params = { id, url, progress: progress.loaded / progress.total }\n sendToMessage(\n {\n messageType: MessageType.Event,\n messageName: 'onProgress',\n status: EMessageStatus.Success,\n global: false,\n },\n params)\n sceneControl?.context.emitter.emit('model-loading-progress', params)\n },\n onLoad: (gltf) => {\n resolve(gltf)\n },\n onError: (error) => {\n sceneControl?.context.emitter.emit('model-loading-progress', { id, url, progress: 1 })\n reject(error)\n },\n })\n })\n}\n\nexport default loadGlb"],"mappings":"AAAA,SAASA,YAAY,QAA2B,eAAe;AAC/D,SAASC,WAAW,EAAEC,aAAa;AACnC,SAASC,cAAc;AAEvB,IAAMC,IAAI,GAAG,IAAIJ,YAAY,CAAC,CAAC;AAE/B,IAAMK,OAAO,GAAG,SAAVA,OAAOA,CAAIC,GAAW,EAAEC,EAAU,EAAEC,MAAY,EAAEC,YAA2B,EAAK;EAAA,IAAAC,qBAAA;EACtF,IAAMC,SAAS,IAAAD,qBAAA,GAAGD,YAAY,aAAZ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;AACJ,CAAC;AAED,eAAejC,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anov/3d",
3
- "version": "0.0.322",
3
+ "version": "0.0.324",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -30,8 +30,8 @@
30
30
  "rxjs": "7.8.1",
31
31
  "three-mesh-bvh": "^0.9.0",
32
32
  "uuid": "^9.0.1",
33
- "@anov/3d-ability": "^0.0.167",
34
- "@anov/3d-core": "^0.0.104"
33
+ "@anov/3d-core": "^0.0.106",
34
+ "@anov/3d-ability": "^0.0.169"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/uuid": "^9.0.7",