@luma.gl/webgl 8.5.10 → 8.5.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/esm/init.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { log } from '@luma.gl/gltools';
2
2
  import { Stats } from 'probe.gl';
3
- import { isBrowser, global } from 'probe.gl/env';
4
- const VERSION = typeof "8.5.10" !== 'undefined' ? "8.5.10" : 'untranspiled source';
3
+ import { isBrowser } from '@probe.gl/env';
4
+ const VERSION = typeof "8.5.11" !== 'undefined' ? "8.5.11" : 'untranspiled source';
5
5
  const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
6
6
 
7
7
  class StatsManager {
@@ -23,16 +23,16 @@ class StatsManager {
23
23
 
24
24
  const lumaStats = new StatsManager();
25
25
 
26
- if (global.luma && global.luma.VERSION !== VERSION) {
27
- throw new Error(`luma.gl - multiple VERSIONs detected: ${global.luma.VERSION} vs ${VERSION}`);
26
+ if (globalThis.luma && globalThis.luma.VERSION !== VERSION) {
27
+ throw new Error(`luma.gl - multiple VERSIONs detected: ${globalThis.luma.VERSION} vs ${VERSION}`);
28
28
  }
29
29
 
30
- if (!global.luma) {
30
+ if (!globalThis.luma) {
31
31
  if (isBrowser()) {
32
32
  log.log(1, `luma.gl ${VERSION} - ${STARTUP_MESSAGE}`)();
33
33
  }
34
34
 
35
- global.luma = global.luma || {
35
+ globalThis.luma = globalThis.luma || {
36
36
  VERSION,
37
37
  version: VERSION,
38
38
  log,
@@ -45,5 +45,5 @@ if (!global.luma) {
45
45
  }
46
46
 
47
47
  export { lumaStats };
48
- export default global.luma;
48
+ export default globalThis.luma;
49
49
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/init.js"],"names":["log","Stats","isBrowser","global","VERSION","STARTUP_MESSAGE","StatsManager","constructor","stats","Map","get","name","has","set","id","lumaStats","luma","Error","version","globals","modules","nodeIO"],"mappings":"AAA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,OAAO,EAAE;AACPC,MAAAA,OAAO,EAAE,EADF;AAEPC,MAAAA,MAAM,EAAE;AAFD;AAdkB,GAA7B;AAmBD;;AAED,SAAQN,SAAR;AACA,eAAeZ,MAAM,CAACa,IAAtB","sourcesContent":["import {log} from '@luma.gl/gltools';\nimport {Stats} from 'probe.gl';\nimport {isBrowser, global} from 'probe.gl/env';\n\n// Version detection using babel plugin\n/* global __VERSION__ */\n// @ts-ignore\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'untranspiled source';\n\nconst STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';\n// Assign luma.log.level in console to control logging: \\\n// 0: none, 1: minimal, 2: verbose, 3: attribute/uniforms, 4: gl logs\n// luma.log.break[], set to gl funcs, luma.log.profile[] set to model names`;\n\nclass StatsManager {\n constructor() {\n this.stats = new Map();\n }\n\n get(name) {\n if (!this.stats.has(name)) {\n this.stats.set(name, new Stats({id: name}));\n }\n\n return this.stats.get(name);\n }\n}\n\nconst lumaStats = new StatsManager();\n\nif (global.luma && global.luma.VERSION !== VERSION) {\n throw new Error(`luma.gl - multiple VERSIONs detected: ${global.luma.VERSION} vs ${VERSION}`);\n}\n\nif (!global.luma) {\n if (isBrowser()) {\n log.log(1, `luma.gl ${VERSION} - ${STARTUP_MESSAGE}`)();\n }\n\n global.luma = global.luma || {\n VERSION,\n version: VERSION,\n log,\n\n // A global stats object that various components can add information to\n // E.g. see webgl/resource.js\n stats: lumaStats,\n\n // Keep some luma globals in a sub-object\n // This allows us to dynamically detect if certain modules have been\n // included (such as IO and headless) and enable related functionality,\n // without unconditionally requiring and thus bundling big dependencies\n // into the app.\n globals: {\n modules: {},\n nodeIO: {}\n }\n };\n}\n\nexport {lumaStats};\nexport default global.luma;\n"],"file":"init.js"}
1
+ {"version":3,"sources":["../../src/init.js"],"names":["log","Stats","isBrowser","VERSION","STARTUP_MESSAGE","StatsManager","constructor","stats","Map","get","name","has","set","id","lumaStats","globalThis","luma","Error","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cnCK,IAAAA,OAAO,EAAE;AACPC,MAAAA,OAAO,EAAE,EADF;AAEPC,MAAAA,MAAM,EAAE;AAFD;AAd0B,GAArC;AAmBD;;AAED,SAAQP,SAAR;AACA,eAAeC,UAAU,CAACC,IAA1B","sourcesContent":["import {log} from '@luma.gl/gltools';\nimport {Stats} from 'probe.gl';\nimport {isBrowser} from '@probe.gl/env';\n\n// Version detection using babel plugin\n/* global __VERSION__ */\n// @ts-ignore\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'untranspiled source';\n\nconst STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';\n// Assign luma.log.level in console to control logging: \\\n// 0: none, 1: minimal, 2: verbose, 3: attribute/uniforms, 4: gl logs\n// luma.log.break[], set to gl funcs, luma.log.profile[] set to model names`;\n\nclass StatsManager {\n constructor() {\n this.stats = new Map();\n }\n\n get(name) {\n if (!this.stats.has(name)) {\n this.stats.set(name, new Stats({id: name}));\n }\n\n return this.stats.get(name);\n }\n}\n\nconst lumaStats = new StatsManager();\n\nif (globalThis.luma && globalThis.luma.VERSION !== VERSION) {\n throw new Error(`luma.gl - multiple VERSIONs detected: ${globalThis.luma.VERSION} vs ${VERSION}`);\n}\n\nif (!globalThis.luma) {\n if (isBrowser()) {\n log.log(1, `luma.gl ${VERSION} - ${STARTUP_MESSAGE}`)();\n }\n\n globalThis.luma = globalThis.luma || {\n VERSION,\n version: VERSION,\n log,\n\n // A global stats object that various components can add information to\n // E.g. see webgl/resource.js\n stats: lumaStats,\n\n // Keep some luma globals in a sub-object\n // This allows us to dynamically detect if certain modules have been\n // included (such as IO and headless) and enable related functionality,\n // without unconditionally requiring and thus bundling big dependencies\n // into the app.\n globals: {\n modules: {},\n nodeIO: {}\n }\n };\n}\n\nexport {lumaStats};\nexport default globalThis.luma;\n"],"file":"init.js"}
@@ -1,4 +1,4 @@
1
- import { getBrowser } from 'probe.gl/env';
1
+ import { getBrowser } from '@probe.gl/env';
2
2
  export function isOldIE(opts = {}) {
3
3
  return getBrowser(opts.userAgent) === 'IE';
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/is-old-ie.js"],"names":["getBrowser","isOldIE","opts","userAgent"],"mappings":"AAAA,SAAQA,UAAR,QAAyB,cAAzB;AAGA,OAAO,SAASC,OAAT,CAAiBC,IAAI,GAAG,EAAxB,EAA4B;AACjC,SAAOF,UAAU,CAACE,IAAI,CAACC,SAAN,CAAV,KAA+B,IAAtC;AACD","sourcesContent":["import {getBrowser} from 'probe.gl/env';\n\n// opts allows user agent to be overridden for testing\nexport function isOldIE(opts = {}) {\n return getBrowser(opts.userAgent) === 'IE';\n}\n"],"file":"is-old-ie.js"}
1
+ {"version":3,"sources":["../../../src/utils/is-old-ie.js"],"names":["getBrowser","isOldIE","opts","userAgent"],"mappings":"AAAA,SAAQA,UAAR,QAAyB,eAAzB;AAGA,OAAO,SAASC,OAAT,CAAiBC,IAAI,GAAG,EAAxB,EAA4B;AACjC,SAAOF,UAAU,CAACE,IAAI,CAACC,SAAN,CAAV,KAA+B,IAAtC;AACD","sourcesContent":["import {getBrowser} from '@probe.gl/env';\n\n// opts allows user agent to be overridden for testing\nexport function isOldIE(opts = {}) {\n return getBrowser(opts.userAgent) === 'IE';\n}\n"],"file":"is-old-ie.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/webgl",
3
- "version": "8.5.10",
3
+ "version": "8.5.11",
4
4
  "description": "WebGL2 Classes",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -35,9 +35,10 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.0.0",
38
- "@luma.gl/constants": "8.5.10",
39
- "@luma.gl/gltools": "8.5.10",
38
+ "@luma.gl/constants": "8.5.11",
39
+ "@luma.gl/gltools": "8.5.11",
40
+ "@probe.gl/env": "^3.5.0",
40
41
  "probe.gl": "^3.4.0"
41
42
  },
42
- "gitHead": "830155841c1e574d36061c2d71880a28d68b3cb3"
43
+ "gitHead": "9047970bf97ac2f0265551a5ed3453852f59ab54"
43
44
  }
package/src/bundle.js CHANGED
@@ -1,8 +1,7 @@
1
1
  const moduleExports = require('./index');
2
2
 
3
- const _global = typeof window === 'undefined' ? global : window;
4
3
  // @ts-ignore
5
- _global.luma = _global.luma || {};
4
+ globalThis.luma = globalThis.luma || {};
6
5
 
7
6
  // @ts-ignore
8
- module.exports = Object.assign(_global.luma, moduleExports);
7
+ module.exports = Object.assign(globalThis.luma, moduleExports);
@@ -1,6 +1,5 @@
1
1
  import GL from '@luma.gl/constants';
2
2
  import {isWebGL2, assertWebGL2Context, withParameters, log} from '@luma.gl/gltools';
3
- import {global} from 'probe.gl/env';
4
3
 
5
4
  import Resource from './resource';
6
5
  import Buffer from './buffer';
@@ -19,7 +18,7 @@ const NPOT_MIN_FILTERS = [GL.LINEAR, GL.NEAREST];
19
18
 
20
19
  // Polyfill
21
20
  // Note (Tarek): Do we really need to support this API?
22
- const WebGLBuffer = global.WebGLBuffer || function WebGLBuffer() {};
21
+ const WebGLBuffer = globalThis.WebGLBuffer || function WebGLBuffer() {};
23
22
 
24
23
  export default class Texture extends Resource {
25
24
  static isSupported(gl, opts = {}) {
package/src/init.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {log} from '@luma.gl/gltools';
2
2
  import {Stats} from 'probe.gl';
3
- import {isBrowser, global} from 'probe.gl/env';
3
+ import {isBrowser} from '@probe.gl/env';
4
4
 
5
5
  // Version detection using babel plugin
6
6
  /* global __VERSION__ */
@@ -28,16 +28,16 @@ class StatsManager {
28
28
 
29
29
  const lumaStats = new StatsManager();
30
30
 
31
- if (global.luma && global.luma.VERSION !== VERSION) {
32
- throw new Error(`luma.gl - multiple VERSIONs detected: ${global.luma.VERSION} vs ${VERSION}`);
31
+ if (globalThis.luma && globalThis.luma.VERSION !== VERSION) {
32
+ throw new Error(`luma.gl - multiple VERSIONs detected: ${globalThis.luma.VERSION} vs ${VERSION}`);
33
33
  }
34
34
 
35
- if (!global.luma) {
35
+ if (!globalThis.luma) {
36
36
  if (isBrowser()) {
37
37
  log.log(1, `luma.gl ${VERSION} - ${STARTUP_MESSAGE}`)();
38
38
  }
39
39
 
40
- global.luma = global.luma || {
40
+ globalThis.luma = globalThis.luma || {
41
41
  VERSION,
42
42
  version: VERSION,
43
43
  log,
@@ -59,4 +59,4 @@ if (!global.luma) {
59
59
  }
60
60
 
61
61
  export {lumaStats};
62
- export default global.luma;
62
+ export default globalThis.luma;
@@ -1,4 +1,4 @@
1
- import {getBrowser} from 'probe.gl/env';
1
+ import {getBrowser} from '@probe.gl/env';
2
2
 
3
3
  // opts allows user agent to be overridden for testing
4
4
  export function isOldIE(opts = {}) {