@loaders.gl/obj 3.2.0-alpha.2 → 3.2.0

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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports._typecheckMTLLoader = exports.MTLLoader = void 0;
7
- var VERSION = typeof "3.2.0-alpha.2" !== 'undefined' ? "3.2.0-alpha.2" : 'latest';
7
+ var VERSION = typeof "3.2.0" !== 'undefined' ? "3.2.0" : 'latest';
8
8
  var MTLLoader = {
9
9
  name: 'MTL',
10
10
  id: 'mtl',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mtl-loader.ts"],"names":["VERSION","MTLLoader","name","id","module","version","worker","extensions","mimeTypes","testText","text","includes","options","mtl","_typecheckMTLLoader"],"mappings":";;;;;;AAMA,IAAMA,OAAO,GAAG,2BAAuB,WAAvB,qBAAmD,QAAnE;AAUO,IAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAE,kBAACC,IAAD;AAAA,WAA2BA,IAAI,CAACC,QAAL,CAAc,QAAd,CAA3B;AAAA,GARa;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;;AAcA,IAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["// loaders.gl, MIT license\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ParseMTLOptions} from './lib/parse-mtl';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type MTLLoaderOptions = LoaderOptions & {\n mtl?: ParseMTLOptions;\n};\n\n/**\n * Loader for the MTL material format\n * Parses a Wavefront .mtl file specifying materials\n */\nexport const MTLLoader = {\n name: 'MTL',\n id: 'mtl',\n module: 'mtl',\n version: VERSION,\n worker: true,\n extensions: ['mtl'],\n mimeTypes: ['text/plain'],\n testText: (text: string): boolean => text.includes('newmtl'),\n options: {\n mtl: {}\n }\n};\n\nexport const _typecheckMTLLoader: Loader = MTLLoader;\n"],"file":"mtl-loader.js"}
1
+ {"version":3,"sources":["../../src/mtl-loader.ts"],"names":["VERSION","MTLLoader","name","id","module","version","worker","extensions","mimeTypes","testText","text","includes","options","mtl","_typecheckMTLLoader"],"mappings":";;;;;;AAMA,IAAMA,OAAO,GAAG,mBAAuB,WAAvB,aAAmD,QAAnE;AAUO,IAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAE,kBAACC,IAAD;AAAA,WAA2BA,IAAI,CAACC,QAAL,CAAc,QAAd,CAA3B;AAAA,GARa;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;;AAcA,IAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["// loaders.gl, MIT license\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ParseMTLOptions} from './lib/parse-mtl';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type MTLLoaderOptions = LoaderOptions & {\n mtl?: ParseMTLOptions;\n};\n\n/**\n * Loader for the MTL material format\n * Parses a Wavefront .mtl file specifying materials\n */\nexport const MTLLoader = {\n name: 'MTL',\n id: 'mtl',\n module: 'mtl',\n version: VERSION,\n worker: true,\n extensions: ['mtl'],\n mimeTypes: ['text/plain'],\n testText: (text: string): boolean => text.includes('newmtl'),\n options: {\n mtl: {}\n }\n};\n\nexport const _typecheckMTLLoader: Loader = MTLLoader;\n"],"file":"mtl-loader.js"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports._typecheckOBJLoader = exports.OBJLoader = void 0;
7
- var VERSION = typeof "3.2.0-alpha.2" !== 'undefined' ? "3.2.0-alpha.2" : 'latest';
7
+ var VERSION = typeof "3.2.0" !== 'undefined' ? "3.2.0" : 'latest';
8
8
  var OBJLoader = {
9
9
  name: 'OBJ',
10
10
  id: 'obj',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/obj-loader.ts"],"names":["VERSION","OBJLoader","name","id","module","version","worker","extensions","mimeTypes","testText","testOBJFile","options","obj","text","_typecheckOBJLoader"],"mappings":";;;;;;AAIA,IAAMA,OAAO,GAAG,2BAAuB,WAAvB,qBAAmD,QAAnE;AASO,IAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAEC,WARa;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;;;AAcP,SAASF,WAAT,CAAqBG,IAArB,EAA4C;AAE1C,SAAOA,IAAI,CAAC,CAAD,CAAJ,KAAY,GAAnB;AACD;;AAEM,IAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type OBJLoaderOptions = LoaderOptions & {\n obj?: {};\n};\n\n/**\n * Worker loader for the OBJ geometry format\n */\nexport const OBJLoader = {\n name: 'OBJ',\n id: 'obj',\n module: 'obj',\n version: VERSION,\n worker: true,\n extensions: ['obj'],\n mimeTypes: ['text/plain'],\n testText: testOBJFile,\n options: {\n obj: {}\n }\n};\n\nfunction testOBJFile(text: string): boolean {\n // TODO - There could be comment line first\n return text[0] === 'v';\n}\n\nexport const _typecheckOBJLoader: Loader = OBJLoader;\n"],"file":"obj-loader.js"}
1
+ {"version":3,"sources":["../../src/obj-loader.ts"],"names":["VERSION","OBJLoader","name","id","module","version","worker","extensions","mimeTypes","testText","testOBJFile","options","obj","text","_typecheckOBJLoader"],"mappings":";;;;;;AAIA,IAAMA,OAAO,GAAG,mBAAuB,WAAvB,aAAmD,QAAnE;AASO,IAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAEC,WARa;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;;;AAcP,SAASF,WAAT,CAAqBG,IAArB,EAA4C;AAE1C,SAAOA,IAAI,CAAC,CAAD,CAAJ,KAAY,GAAnB;AACD;;AAEM,IAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type OBJLoaderOptions = LoaderOptions & {\n obj?: {};\n};\n\n/**\n * Worker loader for the OBJ geometry format\n */\nexport const OBJLoader = {\n name: 'OBJ',\n id: 'obj',\n module: 'obj',\n version: VERSION,\n worker: true,\n extensions: ['obj'],\n mimeTypes: ['text/plain'],\n testText: testOBJFile,\n options: {\n obj: {}\n }\n};\n\nfunction testOBJFile(text: string): boolean {\n // TODO - There could be comment line first\n return text[0] === 'v';\n}\n\nexport const _typecheckOBJLoader: Loader = OBJLoader;\n"],"file":"obj-loader.js"}
@@ -1,4 +1,4 @@
1
- const VERSION = typeof "3.2.0-alpha.2" !== 'undefined' ? "3.2.0-alpha.2" : 'latest';
1
+ const VERSION = typeof "3.2.0" !== 'undefined' ? "3.2.0" : 'latest';
2
2
  export const MTLLoader = {
3
3
  name: 'MTL',
4
4
  id: 'mtl',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mtl-loader.ts"],"names":["VERSION","MTLLoader","name","id","module","version","worker","extensions","mimeTypes","testText","text","includes","options","mtl","_typecheckMTLLoader"],"mappings":"AAMA,MAAMA,OAAO,GAAG,2BAAuB,WAAvB,qBAAmD,QAAnE;AAUA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAGC,IAAD,IAA2BA,IAAI,CAACC,QAAL,CAAc,QAAd,CARd;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;AAcP,OAAO,MAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["// loaders.gl, MIT license\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ParseMTLOptions} from './lib/parse-mtl';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type MTLLoaderOptions = LoaderOptions & {\n mtl?: ParseMTLOptions;\n};\n\n/**\n * Loader for the MTL material format\n * Parses a Wavefront .mtl file specifying materials\n */\nexport const MTLLoader = {\n name: 'MTL',\n id: 'mtl',\n module: 'mtl',\n version: VERSION,\n worker: true,\n extensions: ['mtl'],\n mimeTypes: ['text/plain'],\n testText: (text: string): boolean => text.includes('newmtl'),\n options: {\n mtl: {}\n }\n};\n\nexport const _typecheckMTLLoader: Loader = MTLLoader;\n"],"file":"mtl-loader.js"}
1
+ {"version":3,"sources":["../../src/mtl-loader.ts"],"names":["VERSION","MTLLoader","name","id","module","version","worker","extensions","mimeTypes","testText","text","includes","options","mtl","_typecheckMTLLoader"],"mappings":"AAMA,MAAMA,OAAO,GAAG,mBAAuB,WAAvB,aAAmD,QAAnE;AAUA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAGC,IAAD,IAA2BA,IAAI,CAACC,QAAL,CAAc,QAAd,CARd;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;AAcP,OAAO,MAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["// loaders.gl, MIT license\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ParseMTLOptions} from './lib/parse-mtl';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type MTLLoaderOptions = LoaderOptions & {\n mtl?: ParseMTLOptions;\n};\n\n/**\n * Loader for the MTL material format\n * Parses a Wavefront .mtl file specifying materials\n */\nexport const MTLLoader = {\n name: 'MTL',\n id: 'mtl',\n module: 'mtl',\n version: VERSION,\n worker: true,\n extensions: ['mtl'],\n mimeTypes: ['text/plain'],\n testText: (text: string): boolean => text.includes('newmtl'),\n options: {\n mtl: {}\n }\n};\n\nexport const _typecheckMTLLoader: Loader = MTLLoader;\n"],"file":"mtl-loader.js"}
@@ -1,4 +1,4 @@
1
- const VERSION = typeof "3.2.0-alpha.2" !== 'undefined' ? "3.2.0-alpha.2" : 'latest';
1
+ const VERSION = typeof "3.2.0" !== 'undefined' ? "3.2.0" : 'latest';
2
2
  export const OBJLoader = {
3
3
  name: 'OBJ',
4
4
  id: 'obj',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/obj-loader.ts"],"names":["VERSION","OBJLoader","name","id","module","version","worker","extensions","mimeTypes","testText","testOBJFile","options","obj","text","_typecheckOBJLoader"],"mappings":"AAIA,MAAMA,OAAO,GAAG,2BAAuB,WAAvB,qBAAmD,QAAnE;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAEC,WARa;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;;AAcP,SAASF,WAAT,CAAqBG,IAArB,EAA4C;AAE1C,SAAOA,IAAI,CAAC,CAAD,CAAJ,KAAY,GAAnB;AACD;;AAED,OAAO,MAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type OBJLoaderOptions = LoaderOptions & {\n obj?: {};\n};\n\n/**\n * Worker loader for the OBJ geometry format\n */\nexport const OBJLoader = {\n name: 'OBJ',\n id: 'obj',\n module: 'obj',\n version: VERSION,\n worker: true,\n extensions: ['obj'],\n mimeTypes: ['text/plain'],\n testText: testOBJFile,\n options: {\n obj: {}\n }\n};\n\nfunction testOBJFile(text: string): boolean {\n // TODO - There could be comment line first\n return text[0] === 'v';\n}\n\nexport const _typecheckOBJLoader: Loader = OBJLoader;\n"],"file":"obj-loader.js"}
1
+ {"version":3,"sources":["../../src/obj-loader.ts"],"names":["VERSION","OBJLoader","name","id","module","version","worker","extensions","mimeTypes","testText","testOBJFile","options","obj","text","_typecheckOBJLoader"],"mappings":"AAIA,MAAMA,OAAO,GAAG,mBAAuB,WAAvB,aAAmD,QAAnE;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,KADiB;AAEvBC,EAAAA,EAAE,EAAE,KAFmB;AAGvBC,EAAAA,MAAM,EAAE,KAHe;AAIvBC,EAAAA,OAAO,EAAEL,OAJc;AAKvBM,EAAAA,MAAM,EAAE,IALe;AAMvBC,EAAAA,UAAU,EAAE,CAAC,KAAD,CANW;AAOvBC,EAAAA,SAAS,EAAE,CAAC,YAAD,CAPY;AAQvBC,EAAAA,QAAQ,EAAEC,WARa;AASvBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE;AADE;AATc,CAAlB;;AAcP,SAASF,WAAT,CAAqBG,IAArB,EAA4C;AAE1C,SAAOA,IAAI,CAAC,CAAD,CAAJ,KAAY,GAAnB;AACD;;AAED,OAAO,MAAMC,mBAA2B,GAAGb,SAApC","sourcesContent":["import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type OBJLoaderOptions = LoaderOptions & {\n obj?: {};\n};\n\n/**\n * Worker loader for the OBJ geometry format\n */\nexport const OBJLoader = {\n name: 'OBJ',\n id: 'obj',\n module: 'obj',\n version: VERSION,\n worker: true,\n extensions: ['obj'],\n mimeTypes: ['text/plain'],\n testText: testOBJFile,\n options: {\n obj: {}\n }\n};\n\nfunction testOBJFile(text: string): boolean {\n // TODO - There could be comment line first\n return text[0] === 'v';\n}\n\nexport const _typecheckOBJLoader: Loader = OBJLoader;\n"],"file":"obj-loader.js"}
@@ -118,12 +118,13 @@
118
118
  switch (type) {
119
119
  case "process":
120
120
  try {
121
- const { input, options = {} } = payload;
121
+ const { input, options = {}, context = {} } = payload;
122
122
  const result = await parseData({
123
123
  loader,
124
124
  arrayBuffer: input,
125
125
  options,
126
126
  context: {
127
+ ...context,
127
128
  parse: parseOnMainThread
128
129
  }
129
130
  });
@@ -1204,7 +1205,7 @@
1204
1205
  }
1205
1206
 
1206
1207
  // src/obj-loader.ts
1207
- var VERSION = true ? "3.2.0-alpha.2" : "latest";
1208
+ var VERSION = true ? "3.2.0" : "latest";
1208
1209
  var OBJLoader = {
1209
1210
  name: "OBJ",
1210
1211
  id: "obj",
@@ -1223,7 +1224,7 @@
1223
1224
  }
1224
1225
 
1225
1226
  // src/mtl-loader.ts
1226
- var VERSION2 = true ? "3.2.0-alpha.2" : "latest";
1227
+ var VERSION2 = true ? "3.2.0" : "latest";
1227
1228
  var MTLLoader = {
1228
1229
  name: "MTL",
1229
1230
  id: "mtl",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/obj",
3
- "version": "3.2.0-alpha.2",
3
+ "version": "3.2.0",
4
4
  "description": "Framework-independent loader for the OBJ format",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.3.1",
37
- "@loaders.gl/loader-utils": "3.2.0-alpha.2",
38
- "@loaders.gl/schema": "3.2.0-alpha.2"
37
+ "@loaders.gl/loader-utils": "3.2.0",
38
+ "@loaders.gl/schema": "3.2.0"
39
39
  },
40
- "gitHead": "52a602739cbfce60fc314f474efc984d199dff78"
40
+ "gitHead": "6660dc9291526752c40063b73a3f9dd97cc0ccc5"
41
41
  }