@luma.gl/webgl 9.0.0-alpha.16 → 9.0.0-alpha.17
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/adapter/converters/device-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/device-parameters.js +117 -200
- package/dist/adapter/converters/device-parameters.js.map +1 -0
- package/dist/adapter/converters/renderbuffer-formats.d.ts +1 -1
- package/dist/adapter/converters/renderbuffer-formats.d.ts.map +1 -1
- package/dist/adapter/converters/renderbuffer-formats.js +172 -62
- package/dist/adapter/converters/renderbuffer-formats.js.map +1 -0
- package/dist/adapter/converters/sampler-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/sampler-parameters.js +151 -149
- package/dist/adapter/converters/sampler-parameters.js.map +1 -0
- package/dist/adapter/converters/texture-formats.d.ts +2 -2
- package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
- package/dist/adapter/converters/texture-formats.js +847 -438
- package/dist/adapter/converters/texture-formats.js.map +1 -0
- package/dist/adapter/converters/vertex-formats.js +24 -15
- package/dist/adapter/converters/vertex-formats.js.map +1 -0
- package/dist/adapter/device-helpers/device-features.js +84 -120
- package/dist/adapter/device-helpers/device-features.js.map +1 -0
- package/dist/adapter/device-helpers/device-limits.d.ts +1 -1
- package/dist/adapter/device-helpers/device-limits.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-limits.js +83 -88
- package/dist/adapter/device-helpers/device-limits.js.map +1 -0
- package/dist/adapter/device-helpers/get-device-info.js +37 -42
- package/dist/adapter/device-helpers/get-device-info.js.map +1 -0
- package/dist/adapter/device-helpers/is-old-ie.js +8 -10
- package/dist/adapter/device-helpers/is-old-ie.js.map +1 -0
- package/dist/adapter/helpers/attribute-utils.js +57 -50
- package/dist/adapter/helpers/attribute-utils.js.map +1 -0
- package/dist/adapter/helpers/get-shader-info.d.ts +1 -1
- package/dist/adapter/helpers/get-shader-info.d.ts.map +1 -1
- package/dist/adapter/helpers/get-shader-info.js +19 -21
- package/dist/adapter/helpers/get-shader-info.js.map +1 -0
- package/dist/adapter/helpers/get-shader-layout.js +251 -310
- package/dist/adapter/helpers/get-shader-layout.js.map +1 -0
- package/dist/adapter/helpers/parse-shader-compiler-log.js +26 -32
- package/dist/adapter/helpers/parse-shader-compiler-log.js.map +1 -0
- package/dist/adapter/helpers/set-uniform.d.ts.map +1 -1
- package/dist/adapter/helpers/set-uniform.js +80 -67
- package/dist/adapter/helpers/set-uniform.js.map +1 -0
- package/dist/adapter/helpers/uniforms.js +75 -80
- package/dist/adapter/helpers/uniforms.js.map +1 -0
- package/dist/adapter/objects/constants-to-keys.js +26 -33
- package/dist/adapter/objects/constants-to-keys.js.map +1 -0
- package/dist/adapter/objects/webgl-renderbuffer.d.ts +1 -1
- package/dist/adapter/objects/webgl-renderbuffer.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-renderbuffer.js +70 -67
- package/dist/adapter/objects/webgl-renderbuffer.js.map +1 -0
- package/dist/adapter/objects/webgl-resource.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-resource.js +158 -213
- package/dist/adapter/objects/webgl-resource.js.map +1 -0
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.js +66 -74
- package/dist/adapter/objects/webgl-vertex-array-object.js.map +1 -0
- package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-buffer.js +118 -150
- package/dist/adapter/resources/webgl-buffer.js.map +1 -0
- package/dist/adapter/resources/webgl-command-buffer.d.ts +5 -5
- package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-command-buffer.js +41 -40
- package/dist/adapter/resources/webgl-command-buffer.js.map +1 -0
- package/dist/adapter/resources/webgl-command-encoder.js +37 -26
- package/dist/adapter/resources/webgl-command-encoder.js.map +1 -0
- package/dist/adapter/resources/webgl-external-texture.js +1 -91
- package/dist/adapter/resources/webgl-external-texture.js.map +1 -0
- package/dist/adapter/resources/webgl-framebuffer.d.ts +2 -2
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +198 -231
- package/dist/adapter/resources/webgl-framebuffer.js.map +1 -0
- package/dist/adapter/resources/webgl-render-pass.js +11 -8
- package/dist/adapter/resources/webgl-render-pass.js.map +1 -0
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +289 -316
- package/dist/adapter/resources/webgl-render-pipeline.js.map +1 -0
- package/dist/adapter/resources/webgl-sampler.js +35 -42
- package/dist/adapter/resources/webgl-sampler.js.map +1 -0
- package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-shader.js +53 -57
- package/dist/adapter/resources/webgl-shader.js.map +1 -0
- package/dist/adapter/resources/webgl-texture.d.ts +4 -4
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-texture.js +697 -661
- package/dist/adapter/resources/webgl-texture.js.map +1 -0
- package/dist/adapter/webgl-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgl-canvas-context.js +35 -55
- package/dist/adapter/webgl-canvas-context.js.map +1 -0
- package/dist/adapter/webgl-device.d.ts +5 -0
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +270 -287
- package/dist/adapter/webgl-device.js.map +1 -0
- package/dist/classic/accessor.js +103 -120
- package/dist/classic/accessor.js.map +1 -0
- package/dist/classic/buffer.d.ts +1 -1
- package/dist/classic/buffer.d.ts.map +1 -1
- package/dist/classic/buffer.js +300 -325
- package/dist/classic/buffer.js.map +1 -0
- package/dist/classic/typed-array-utils.d.ts +1 -1
- package/dist/classic/typed-array-utils.d.ts.map +1 -1
- package/dist/classic/typed-array-utils.js +81 -91
- package/dist/classic/typed-array-utils.js.map +1 -0
- package/dist/context/context/create-browser-context.d.ts +3 -1
- package/dist/context/context/create-browser-context.d.ts.map +1 -1
- package/dist/context/context/create-browser-context.js +49 -66
- package/dist/context/context/create-browser-context.js.map +1 -0
- package/dist/context/context/create-headless-context.d.ts +1 -1
- package/dist/context/context/create-headless-context.d.ts.map +1 -1
- package/dist/context/context/create-headless-context.js +30 -24
- package/dist/context/context/create-headless-context.js.map +1 -0
- package/dist/context/context/webgl-checks.js +17 -25
- package/dist/context/context/webgl-checks.js.map +1 -0
- package/dist/context/debug/spector.d.ts +3 -1
- package/dist/context/debug/spector.d.ts.map +1 -1
- package/dist/context/debug/spector.js +50 -53
- package/dist/context/debug/spector.js.map +1 -0
- package/dist/context/debug/webgl-developer-tools.d.ts +1 -1
- package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -1
- package/dist/context/debug/webgl-developer-tools.js +76 -107
- package/dist/context/debug/webgl-developer-tools.js.map +1 -0
- package/dist/context/parameters/unified-parameter-api.js +46 -93
- package/dist/context/parameters/unified-parameter-api.js.map +1 -0
- package/dist/context/parameters/webgl-parameter-tables.d.ts +1 -1
- package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
- package/dist/context/parameters/webgl-parameter-tables.js +404 -462
- package/dist/context/parameters/webgl-parameter-tables.js.map +1 -0
- package/dist/context/polyfill/context-data.js +10 -16
- package/dist/context/polyfill/context-data.js.map +1 -0
- package/dist/context/polyfill/get-parameter-polyfill.js +71 -91
- package/dist/context/polyfill/get-parameter-polyfill.js.map +1 -0
- package/dist/context/polyfill/polyfill-context.js +73 -75
- package/dist/context/polyfill/polyfill-context.js.map +1 -0
- package/dist/context/polyfill/polyfill-table.d.ts.map +1 -1
- package/dist/context/polyfill/polyfill-table.js +116 -133
- package/dist/context/polyfill/polyfill-table.js.map +1 -0
- package/dist/context/polyfill/polyfill-vertex-array-object.d.ts.map +1 -1
- package/dist/context/polyfill/polyfill-vertex-array-object.js +227 -255
- package/dist/context/polyfill/polyfill-vertex-array-object.js.map +1 -0
- package/dist/context/state-tracker/deep-array-equal.js +14 -16
- package/dist/context/state-tracker/deep-array-equal.js.map +1 -0
- package/dist/context/state-tracker/track-context-state.d.ts.map +1 -1
- package/dist/context/state-tracker/track-context-state.js +127 -183
- package/dist/context/state-tracker/track-context-state.js.map +1 -0
- package/dist/context/state-tracker/with-parameters.d.ts.map +1 -1
- package/dist/context/state-tracker/with-parameters.js +29 -43
- package/dist/context/state-tracker/with-parameters.js.map +1 -0
- package/dist/dist.dev.js +9205 -0
- package/dist/index.cjs +5948 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -41
- package/dist/index.js.map +1 -0
- package/dist/types/webgl.d.ts +16 -16
- package/dist/types/webgl.d.ts.map +1 -1
- package/dist/types/webgl.js +1 -0
- package/dist/types/webgl.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/dist.min.js +36 -0
- package/package.json +18 -9
- package/src/.DS_Store +0 -0
- package/src/adapter/.DS_Store +0 -0
- package/src/adapter/converters/device-parameters.ts +5 -2
- package/src/adapter/converters/sampler-parameters.ts +4 -2
- package/src/adapter/converters/texture-formats.ts +3 -1
- package/src/adapter/device-helpers/get-device-info.ts +8 -8
- package/src/adapter/helpers/get-shader-info.ts +1 -1
- package/src/adapter/helpers/get-shader-layout.ts +4 -4
- package/src/adapter/helpers/parse-shader-compiler-log.ts +1 -1
- package/src/adapter/helpers/set-uniform.ts +2 -0
- package/src/adapter/objects/webgl-renderbuffer.ts +1 -1
- package/src/adapter/objects/webgl-resource.ts +1 -1
- package/src/adapter/objects/webgl-vertex-array-object.ts +1 -1
- package/src/adapter/resources/webgl-buffer.ts +5 -5
- package/src/adapter/resources/webgl-command-encoder.ts +1 -1
- package/src/adapter/resources/webgl-framebuffer.ts +3 -4
- package/src/adapter/resources/webgl-render-pipeline.ts +19 -20
- package/src/adapter/resources/webgl-shader.ts +1 -1
- package/src/adapter/resources/webgl-texture.ts +8 -9
- package/src/adapter/webgl-canvas-context.ts +2 -2
- package/src/adapter/webgl-device.ts +12 -2
- package/src/classic/accessor.ts +1 -1
- package/src/classic/buffer.ts +3 -3
- package/src/classic/typed-array-utils.ts +1 -1
- package/src/context/.DS_Store +0 -0
- package/src/context/context/create-browser-context.ts +4 -2
- package/src/context/context/create-headless-context.ts +2 -2
- package/src/context/debug/spector.ts +5 -4
- package/src/context/debug/webgl-developer-tools.ts +1 -0
- package/src/context/polyfill/polyfill-table.ts +1 -0
- package/src/context/polyfill/polyfill-vertex-array-object.ts +2 -0
- package/src/context/state-tracker/track-context-state.ts +6 -5
- package/src/context/state-tracker/with-parameters.ts +1 -1
- package/src/index.ts +1 -5
- package/src/types/webgl.ts +2 -0
- package/dist/bundle.d.ts +0 -2
- package/dist/bundle.d.ts.map +0 -1
- package/dist/bundle.js +0 -4
- package/dist/dist.min.js +0 -1
- package/dist/es5/adapter/converters/device-parameters.js +0 -139
- package/dist/es5/adapter/converters/device-parameters.js.map +0 -1
- package/dist/es5/adapter/converters/renderbuffer-formats.js +0 -151
- package/dist/es5/adapter/converters/renderbuffer-formats.js.map +0 -1
- package/dist/es5/adapter/converters/sampler-parameters.js +0 -182
- package/dist/es5/adapter/converters/sampler-parameters.js.map +0 -1
- package/dist/es5/adapter/converters/texture-formats.js +0 -950
- package/dist/es5/adapter/converters/texture-formats.js.map +0 -1
- package/dist/es5/adapter/converters/vertex-formats.js +0 -36
- package/dist/es5/adapter/converters/vertex-formats.js.map +0 -1
- package/dist/es5/adapter/device-helpers/device-features.js +0 -121
- package/dist/es5/adapter/device-helpers/device-features.js.map +0 -1
- package/dist/es5/adapter/device-helpers/device-limits.js +0 -54
- package/dist/es5/adapter/device-helpers/device-limits.js.map +0 -1
- package/dist/es5/adapter/device-helpers/get-device-info.js +0 -49
- package/dist/es5/adapter/device-helpers/get-device-info.js.map +0 -1
- package/dist/es5/adapter/device-helpers/is-old-ie.js +0 -15
- package/dist/es5/adapter/device-helpers/is-old-ie.js.map +0 -1
- package/dist/es5/adapter/helpers/attribute-utils.js +0 -69
- package/dist/es5/adapter/helpers/attribute-utils.js.map +0 -1
- package/dist/es5/adapter/helpers/get-shader-info.js +0 -31
- package/dist/es5/adapter/helpers/get-shader-info.js.map +0 -1
- package/dist/es5/adapter/helpers/get-shader-layout.js +0 -311
- package/dist/es5/adapter/helpers/get-shader-layout.js.map +0 -1
- package/dist/es5/adapter/helpers/parse-shader-compiler-log.js +0 -54
- package/dist/es5/adapter/helpers/parse-shader-compiler-log.js.map +0 -1
- package/dist/es5/adapter/helpers/set-uniform.js +0 -92
- package/dist/es5/adapter/helpers/set-uniform.js.map +0 -1
- package/dist/es5/adapter/helpers/uniforms.js +0 -88
- package/dist/es5/adapter/helpers/uniforms.js.map +0 -1
- package/dist/es5/adapter/objects/constants-to-keys.js +0 -43
- package/dist/es5/adapter/objects/constants-to-keys.js.map +0 -1
- package/dist/es5/adapter/objects/webgl-renderbuffer.js +0 -122
- package/dist/es5/adapter/objects/webgl-renderbuffer.js.map +0 -1
- package/dist/es5/adapter/objects/webgl-resource.js +0 -233
- package/dist/es5/adapter/objects/webgl-resource.js.map +0 -1
- package/dist/es5/adapter/objects/webgl-vertex-array-object.js +0 -109
- package/dist/es5/adapter/objects/webgl-vertex-array-object.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-buffer.js +0 -196
- package/dist/es5/adapter/resources/webgl-buffer.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-command-buffer.js +0 -70
- package/dist/es5/adapter/resources/webgl-command-buffer.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-command-encoder.js +0 -80
- package/dist/es5/adapter/resources/webgl-command-encoder.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-external-texture.js +0 -2
- package/dist/es5/adapter/resources/webgl-external-texture.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-framebuffer.js +0 -275
- package/dist/es5/adapter/resources/webgl-framebuffer.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-render-pass.js +0 -45
- package/dist/es5/adapter/resources/webgl-render-pass.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-render-pipeline.js +0 -385
- package/dist/es5/adapter/resources/webgl-render-pipeline.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-sampler.js +0 -75
- package/dist/es5/adapter/resources/webgl-sampler.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-shader.js +0 -111
- package/dist/es5/adapter/resources/webgl-shader.js.map +0 -1
- package/dist/es5/adapter/resources/webgl-texture.js +0 -826
- package/dist/es5/adapter/resources/webgl-texture.js.map +0 -1
- package/dist/es5/adapter/webgl-canvas-context.js +0 -72
- package/dist/es5/adapter/webgl-canvas-context.js.map +0 -1
- package/dist/es5/adapter/webgl-device.js +0 -387
- package/dist/es5/adapter/webgl-device.js.map +0 -1
- package/dist/es5/bundle.js +0 -6
- package/dist/es5/bundle.js.map +0 -1
- package/dist/es5/classic/accessor.js +0 -151
- package/dist/es5/classic/accessor.js.map +0 -1
- package/dist/es5/classic/buffer.js +0 -398
- package/dist/es5/classic/buffer.js.map +0 -1
- package/dist/es5/classic/typed-array-utils.js +0 -99
- package/dist/es5/classic/typed-array-utils.js.map +0 -1
- package/dist/es5/context/context/create-browser-context.js +0 -66
- package/dist/es5/context/context/create-browser-context.js.map +0 -1
- package/dist/es5/context/context/create-headless-context.js +0 -47
- package/dist/es5/context/context/create-headless-context.js.map +0 -1
- package/dist/es5/context/context/webgl-checks.js +0 -44
- package/dist/es5/context/context/webgl-checks.js.map +0 -1
- package/dist/es5/context/debug/spector.js +0 -99
- package/dist/es5/context/debug/spector.js.map +0 -1
- package/dist/es5/context/debug/webgl-developer-tools.js +0 -146
- package/dist/es5/context/debug/webgl-developer-tools.js.map +0 -1
- package/dist/es5/context/parameters/unified-parameter-api.js +0 -76
- package/dist/es5/context/parameters/unified-parameter-api.js.map +0 -1
- package/dist/es5/context/parameters/webgl-parameter-tables.js +0 -346
- package/dist/es5/context/parameters/webgl-parameter-tables.js.map +0 -1
- package/dist/es5/context/polyfill/context-data.js +0 -18
- package/dist/es5/context/polyfill/context-data.js.map +0 -1
- package/dist/es5/context/polyfill/get-parameter-polyfill.js +0 -69
- package/dist/es5/context/polyfill/get-parameter-polyfill.js.map +0 -1
- package/dist/es5/context/polyfill/polyfill-context.js +0 -109
- package/dist/es5/context/polyfill/polyfill-context.js.map +0 -1
- package/dist/es5/context/polyfill/polyfill-table.js +0 -143
- package/dist/es5/context/polyfill/polyfill-table.js.map +0 -1
- package/dist/es5/context/polyfill/polyfill-vertex-array-object.js +0 -271
- package/dist/es5/context/polyfill/polyfill-vertex-array-object.js.map +0 -1
- package/dist/es5/context/state-tracker/deep-array-equal.js +0 -23
- package/dist/es5/context/state-tracker/deep-array-equal.js.map +0 -1
- package/dist/es5/context/state-tracker/track-context-state.js +0 -167
- package/dist/es5/context/state-tracker/track-context-state.js.map +0 -1
- package/dist/es5/context/state-tracker/with-parameters.js +0 -40
- package/dist/es5/context/state-tracker/with-parameters.js.map +0 -1
- package/dist/es5/index.js +0 -249
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/init.js +0 -7
- package/dist/es5/init.js.map +0 -1
- package/dist/es5/types/webgl.js +0 -5
- package/dist/es5/types/webgl.js.map +0 -1
- package/dist/es5/types.js +0 -2
- package/dist/es5/types.js.map +0 -1
- package/dist/esm/adapter/converters/device-parameters.js +0 -137
- package/dist/esm/adapter/converters/device-parameters.js.map +0 -1
- package/dist/esm/adapter/converters/renderbuffer-formats.js +0 -181
- package/dist/esm/adapter/converters/renderbuffer-formats.js.map +0 -1
- package/dist/esm/adapter/converters/sampler-parameters.js +0 -172
- package/dist/esm/adapter/converters/sampler-parameters.js.map +0 -1
- package/dist/esm/adapter/converters/texture-formats.js +0 -901
- package/dist/esm/adapter/converters/texture-formats.js.map +0 -1
- package/dist/esm/adapter/converters/vertex-formats.js +0 -29
- package/dist/esm/adapter/converters/vertex-formats.js.map +0 -1
- package/dist/esm/adapter/device-helpers/device-features.js +0 -95
- package/dist/esm/adapter/device-helpers/device-features.js.map +0 -1
- package/dist/esm/adapter/device-helpers/device-limits.js +0 -88
- package/dist/esm/adapter/device-helpers/device-limits.js.map +0 -1
- package/dist/esm/adapter/device-helpers/get-device-info.js +0 -42
- package/dist/esm/adapter/device-helpers/get-device-info.js.map +0 -1
- package/dist/esm/adapter/device-helpers/is-old-ie.js +0 -9
- package/dist/esm/adapter/device-helpers/is-old-ie.js.map +0 -1
- package/dist/esm/adapter/helpers/attribute-utils.js +0 -64
- package/dist/esm/adapter/helpers/attribute-utils.js.map +0 -1
- package/dist/esm/adapter/helpers/get-shader-info.js +0 -25
- package/dist/esm/adapter/helpers/get-shader-info.js.map +0 -1
- package/dist/esm/adapter/helpers/get-shader-layout.js +0 -282
- package/dist/esm/adapter/helpers/get-shader-layout.js.map +0 -1
- package/dist/esm/adapter/helpers/parse-shader-compiler-log.js +0 -30
- package/dist/esm/adapter/helpers/parse-shader-compiler-log.js.map +0 -1
- package/dist/esm/adapter/helpers/set-uniform.js +0 -85
- package/dist/esm/adapter/helpers/set-uniform.js.map +0 -1
- package/dist/esm/adapter/helpers/uniforms.js +0 -89
- package/dist/esm/adapter/helpers/uniforms.js.map +0 -1
- package/dist/esm/adapter/objects/constants-to-keys.js +0 -35
- package/dist/esm/adapter/objects/constants-to-keys.js.map +0 -1
- package/dist/esm/adapter/objects/webgl-renderbuffer.js +0 -78
- package/dist/esm/adapter/objects/webgl-renderbuffer.js.map +0 -1
- package/dist/esm/adapter/objects/webgl-resource.js +0 -163
- package/dist/esm/adapter/objects/webgl-resource.js.map +0 -1
- package/dist/esm/adapter/objects/webgl-vertex-array-object.js +0 -74
- package/dist/esm/adapter/objects/webgl-vertex-array-object.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-buffer.js +0 -134
- package/dist/esm/adapter/resources/webgl-buffer.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-command-buffer.js +0 -50
- package/dist/esm/adapter/resources/webgl-command-buffer.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-command-encoder.js +0 -41
- package/dist/esm/adapter/resources/webgl-command-encoder.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-external-texture.js +0 -2
- package/dist/esm/adapter/resources/webgl-external-texture.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-framebuffer.js +0 -207
- package/dist/esm/adapter/resources/webgl-framebuffer.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-render-pass.js +0 -14
- package/dist/esm/adapter/resources/webgl-render-pass.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-render-pipeline.js +0 -311
- package/dist/esm/adapter/resources/webgl-render-pipeline.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-sampler.js +0 -42
- package/dist/esm/adapter/resources/webgl-sampler.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-shader.js +0 -62
- package/dist/esm/adapter/resources/webgl-shader.js.map +0 -1
- package/dist/esm/adapter/resources/webgl-texture.js +0 -714
- package/dist/esm/adapter/resources/webgl-texture.js.map +0 -1
- package/dist/esm/adapter/webgl-canvas-context.js +0 -41
- package/dist/esm/adapter/webgl-canvas-context.js.map +0 -1
- package/dist/esm/adapter/webgl-device.js +0 -276
- package/dist/esm/adapter/webgl-device.js.map +0 -1
- package/dist/esm/bundle.js +0 -4
- package/dist/esm/bundle.js.map +0 -1
- package/dist/esm/classic/accessor.js +0 -120
- package/dist/esm/classic/accessor.js.map +0 -1
- package/dist/esm/classic/buffer.js +0 -327
- package/dist/esm/classic/buffer.js.map +0 -1
- package/dist/esm/classic/typed-array-utils.js +0 -92
- package/dist/esm/classic/typed-array-utils.js.map +0 -1
- package/dist/esm/context/context/create-browser-context.js +0 -53
- package/dist/esm/context/context/create-browser-context.js.map +0 -1
- package/dist/esm/context/context/create-headless-context.js +0 -39
- package/dist/esm/context/context/create-headless-context.js.map +0 -1
- package/dist/esm/context/context/webgl-checks.js +0 -31
- package/dist/esm/context/context/webgl-checks.js.map +0 -1
- package/dist/esm/context/debug/spector.js +0 -64
- package/dist/esm/context/debug/spector.js.map +0 -1
- package/dist/esm/context/debug/webgl-developer-tools.js +0 -97
- package/dist/esm/context/debug/webgl-developer-tools.js.map +0 -1
- package/dist/esm/context/parameters/unified-parameter-api.js +0 -55
- package/dist/esm/context/parameters/unified-parameter-api.js.map +0 -1
- package/dist/esm/context/parameters/webgl-parameter-tables.js +0 -427
- package/dist/esm/context/parameters/webgl-parameter-tables.js.map +0 -1
- package/dist/esm/context/polyfill/context-data.js +0 -12
- package/dist/esm/context/polyfill/context-data.js.map +0 -1
- package/dist/esm/context/polyfill/get-parameter-polyfill.js +0 -86
- package/dist/esm/context/polyfill/get-parameter-polyfill.js.map +0 -1
- package/dist/esm/context/polyfill/polyfill-context.js +0 -84
- package/dist/esm/context/polyfill/polyfill-context.js.map +0 -1
- package/dist/esm/context/polyfill/polyfill-table.js +0 -138
- package/dist/esm/context/polyfill/polyfill-table.js.map +0 -1
- package/dist/esm/context/polyfill/polyfill-vertex-array-object.js +0 -265
- package/dist/esm/context/polyfill/polyfill-vertex-array-object.js.map +0 -1
- package/dist/esm/context/state-tracker/deep-array-equal.js +0 -17
- package/dist/esm/context/state-tracker/deep-array-equal.js.map +0 -1
- package/dist/esm/context/state-tracker/track-context-state.js +0 -148
- package/dist/esm/context/state-tracker/track-context-state.js.map +0 -1
- package/dist/esm/context/state-tracker/with-parameters.js +0 -34
- package/dist/esm/context/state-tracker/with-parameters.js.map +0 -1
- package/dist/esm/index.js +0 -27
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/init.js +0 -4
- package/dist/esm/init.js.map +0 -1
- package/dist/esm/types/webgl.js +0 -2
- package/dist/esm/types/webgl.js.map +0 -1
- package/dist/esm/types.js +0 -2
- package/dist/esm/types.js.map +0 -1
- package/dist/init.d.ts +0 -2
- package/dist/init.d.ts.map +0 -1
- package/dist/init.js +0 -3
- package/src/bundle.ts +0 -4
- package/src/init.ts +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.js","names":["_api","require","_constants","_interopRequireDefault","_webglChecks","_accessor","_typedArrayUtils","_webglDevice","_webglBuffer","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","_objectSpread","target","i","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","DEBUG_DATA_LENGTH","DEPRECATED_PROPS","offset","stride","type","size","divisor","normalized","integer","instanced","isInstanced","PROP_CHECKS_INITIALIZE","removedProps","replacedProps","bytes","deprecatedProps","PROP_CHECKS_SET_PROPS","getWEBGLBufferProps","props","ArrayBuffer","isView","data","byteLength","checkProps","bufferProps","byteOffset","ClassicBuffer","_WEBGLBuffer","_inherits2","_super","device","_this","undefined","_classCallCheck2","WebGLDevice","attach","_assertThisInitialized2","setAccessor","assign","accessor","getGLTypeFromTypedArray","assert","Accessor","seal","_createClass2","value","write","subData","getElementCount","Math","round","getBytesPerElement","getVertexCount","getBytesPerVertex","initialize","Number","isFinite","webglUsage","GL","STATIC_DRAW","debugData","_setData","_setByteLength","setProps","buffer","reallocate","bytesUsed","setData","options","_options","_options$offset","_options$srcOffset","srcOffset","gl","webgl2","COPY_WRITE_BUFFER","bindBuffer","handle","assertWebGL2Context","bufferSubData","_inferType","copyData","sourceBuffer","_options$readOffset","readOffset","_options$writeOffset","writeOffset","gl2","COPY_READ_BUFFER","copyBufferSubData","getData","_this$gl","_ref","_ref$dstData","dstData","_ref$length","_ref2","_ref2$srcByteOffset","srcByteOffset","_ref2$dstOffset","dstOffset","ArrayType","getTypedArrayFromGLType","FLOAT","clamped","sourceAvailableElementCount","_getAvailableElementCount","dstElementOffset","dstAvailableElementCount","dstElementCount","min","copyElementCount","getBufferSubData","bind","_ref3","_ref3$target","_ref3$index","index","_ref3$offset","UNIFORM_BUFFER","TRANSFORM_FEEDBACK_BUFFER","_this$gl2","bindBufferRange","_this$gl3","bindBufferBase","unbind","_ref4","_ref4$target","_ref4$index","isIndexedBuffer","_this$gl4","getDebugData","changed","invalidateDebugData","trackDeallocatedMemory","_getTarget","bufferData","slice","trackAllocatedMemory","Float32Array","sourceElementOffset","BYTES_PER_ELEMENT","getParameter","pname","getBufferParameter","get","WEBGLBuffer","exports"],"sources":["../../../src/classic/buffer.ts"],"sourcesContent":["// luma.gl, MIT license\n\nimport type {Device, BufferProps, TypedArray} from '@luma.gl/api';\nimport {assert, checkProps} from '@luma.gl/api';\nimport GL from '@luma.gl/constants';\nimport {assertWebGL2Context} from '../context/context/webgl-checks';\nimport {AccessorObject} from '../types';\nimport Accessor from './accessor';\nimport {getGLTypeFromTypedArray, getTypedArrayFromGLType} from './typed-array-utils';\n\nimport WebGLDevice from '../adapter/webgl-device';\nimport WEBGLBuffer from '../adapter/resources/webgl-buffer';\n\nconst DEBUG_DATA_LENGTH = 10;\n\n// Shared prop checks for constructor and setProps\nconst DEPRECATED_PROPS = {\n offset: 'accessor.offset',\n stride: 'accessor.stride',\n type: 'accessor.type',\n size: 'accessor.size',\n divisor: 'accessor.divisor',\n normalized: 'accessor.normalized',\n integer: 'accessor.integer',\n instanced: 'accessor.divisor',\n isInstanced: 'accessor.divisor'\n};\n\n// Prop checks for constructor\nconst PROP_CHECKS_INITIALIZE = {\n removedProps: {},\n replacedProps: {\n bytes: 'byteLength'\n },\n // new Buffer() with individual accessor props is still used in apps, emit warnings\n deprecatedProps: DEPRECATED_PROPS\n};\n\n// Prop checks for setProps\nconst PROP_CHECKS_SET_PROPS = {\n // Buffer.setProps() with individual accessor props is rare => emit errors\n removedProps: DEPRECATED_PROPS\n};\n\nfunction getWEBGLBufferProps(props: ClassicBufferProps | ArrayBufferView | number): BufferProps {\n // Signature `new Buffer(gl, new Float32Array(...)`\n if (ArrayBuffer.isView(props)) {\n return {data: props};\n }\n\n // Signature: `new Buffer(gl, 100)`\n else if (typeof props === 'number') {\n return {byteLength: props as number};\n }\n\n props = checkProps('Buffer', props, PROP_CHECKS_INITIALIZE);\n const bufferProps = {...props as ClassicBufferProps};\n if (bufferProps.offset) {\n bufferProps.byteOffset = bufferProps.offset;\n }\n return bufferProps;\n}\n\n/** WebGL Buffer interface */\nexport type ClassicBufferProps = BufferProps & {\n handle?: WebGLBuffer;\n\n target?: number;\n webglUsage?: number;\n\n accessor?: AccessorObject;\n\n /** @deprecated */\n index?: number;\n /** @deprecated */\n offset?: number;\n /** @deprecated */\n size?: number;\n /** @deprecated */\n type?: number\n}\n\n/** WebGL Buffer interface */\nexport default class ClassicBuffer extends WEBGLBuffer {\n usage: number;\n accessor: Accessor;\n\n constructor(device: Device | WebGLRenderingContext, props?: ClassicBufferProps);\n constructor(device: Device | WebGLRenderingContext, data: ArrayBufferView | number[]);\n constructor(device: Device | WebGLRenderingContext, byteLength: number);\n\n constructor(device: Device | WebGLRenderingContext, props = {}) {\n super(WebGLDevice.attach(device), getWEBGLBufferProps(props));\n\n // Base class initializes\n // this.initialize(props);\n\n // Deprecated: Merge main props and accessor\n this.setAccessor(Object.assign({}, props, (props as ClassicBufferProps).accessor));\n\n // infer GL type from supplied typed array\n if (this.props.data) {\n const type = getGLTypeFromTypedArray(this.props.data as TypedArray);\n assert(type);\n this.setAccessor(new Accessor(this.accessor, {type}));\n }\n\n Object.seal(this);\n }\n\n override write(data: TypedArray, byteOffset?: number): void {\n this.subData({data, offset: byteOffset});\n }\n\n // returns number of elements in the buffer (assuming that the full buffer is used)\n getElementCount(accessor: AccessorObject = this.accessor): number {\n return Math.round(this.byteLength / Accessor.getBytesPerElement(accessor));\n }\n\n // returns number of vertices in the buffer (assuming that the full buffer is used)\n getVertexCount(accessor: AccessorObject = this.accessor): number {\n return Math.round(this.byteLength / Accessor.getBytesPerVertex(accessor));\n }\n\n // Creates and initializes the buffer object's data store.\n // Signature: `new Buffer(gl, {data: new Float32Array(...)})`\n // Signature: `new Buffer(gl, new Float32Array(...))`\n // Signature: `new Buffer(gl, 100)`\n initialize(props: ClassicBufferProps = {}): this {\n // Signature `new Buffer(gl, new Float32Array(...)`\n if (ArrayBuffer.isView(props)) {\n props = {data: props};\n }\n\n // Signature: `new Buffer(gl, 100)`\n if (Number.isFinite(props)) {\n // @ts-expect-error\n props = {byteLength: props};\n }\n\n props = checkProps('Buffer', props, PROP_CHECKS_INITIALIZE);\n\n // Initialize member fields\n this.webglUsage = props.webglUsage || GL.STATIC_DRAW;\n this.debugData = null;\n\n // Deprecated: Merge main props and accessor\n this.setAccessor(Object.assign({}, props, props.accessor));\n\n // Set data: (re)initializes the buffer\n if (props.data) {\n this._setData(props.data, props.offset, props.byteLength);\n } else {\n this._setByteLength(props.byteLength || 0);\n }\n\n return this;\n }\n\n setProps(props: ClassicBufferProps): this {\n props = checkProps('Buffer', props, PROP_CHECKS_SET_PROPS);\n\n if ('accessor' in props) {\n this.setAccessor(props.accessor);\n }\n\n return this;\n }\n\n // Optionally stores an accessor with the buffer, makes it easier to use it as an attribute later\n // {type, size = 1, offset = 0, stride = 0, normalized = false, integer = false, divisor = 0}\n setAccessor(accessor: AccessorObject | Accessor): this {\n // NOTE: From luma.gl v7.0, Accessors have an optional `buffer `field\n // (mainly to support \"interleaving\")\n // To avoid confusion, ensure `buffer.accessor` does not have a `buffer.accessor.buffer` field:\n accessor = Object.assign({}, accessor);\n // @ts-expect-error\n delete accessor.buffer;\n\n // This new statement ensures that an \"accessor object\" is re-packaged as an Accessor instance\n this.accessor = new Accessor(accessor);\n return this;\n }\n\n // Allocate a bigger GPU buffer (if the current buffer is not big enough).\n // If a reallocation is triggered it clears the buffer\n // Returns:\n // `true`: buffer was reallocated, data was cleared\n // `false`: buffer was big enough, data is intact\n reallocate(byteLength: number): boolean {\n if (byteLength > this.byteLength) {\n this._setByteLength(byteLength);\n return true;\n }\n this.bytesUsed = byteLength;\n return false;\n }\n\n // Update with new data. Reinitializes the buffer\n setData(props: ClassicBufferProps) {\n return this.initialize(props);\n }\n\n // Updates a subset of a buffer object's data store.\n // Data (Typed Array or ArrayBuffer), length is inferred unless provided\n // Offset into buffer\n // WebGL2 only: Offset into srcData\n // WebGL2 only: Number of bytes to be copied\n subData(options: TypedArray | {data: TypedArray, offset?: number; srcOffset?: number; byteLength?: number, length?: number}) {\n // Signature: buffer.subData(new Float32Array([...]))\n if (ArrayBuffer.isView(options)) {\n options = {data: options};\n }\n\n const {data, offset = 0, srcOffset = 0} = options;\n const byteLength = options.byteLength || options.length;\n\n assert(data);\n\n // Create the buffer - binding it here for the first time locks the type\n // In WebGL2, use GL.COPY_WRITE_BUFFER to avoid locking the type\n // @ts-expect-error\n const target = this.gl.webgl2 ? GL.COPY_WRITE_BUFFER : this.target;\n this.gl.bindBuffer(target, this.handle);\n // WebGL2: subData supports additional srcOffset and length parameters\n if (srcOffset !== 0 || byteLength !== undefined) {\n assertWebGL2Context(this.gl);\n // @ts-expect-error\n this.gl.bufferSubData(this.target, offset, data, srcOffset, byteLength);\n } else {\n this.gl.bufferSubData(target, offset, data);\n }\n this.gl.bindBuffer(target, null);\n\n // TODO - update local `data` if offsets are right\n this.debugData = null;\n\n this._inferType(data);\n\n return this;\n }\n\n /**\n * Copies part of the data of another buffer into this buffer\n * @note WEBGL2 ONLY\n */\n copyData(options: {\n sourceBuffer: any;\n readOffset?: number;\n writeOffset?: number;\n size: any;\n }): this {\n const {sourceBuffer, readOffset = 0, writeOffset = 0, size} = options;\n const {gl, gl2} = this;\n assertWebGL2Context(gl);\n\n // Use GL.COPY_READ_BUFFER+GL.COPY_WRITE_BUFFER avoid disturbing other targets and locking type\n gl.bindBuffer(GL.COPY_READ_BUFFER, sourceBuffer.handle);\n gl.bindBuffer(GL.COPY_WRITE_BUFFER, this.handle);\n gl2?.copyBufferSubData(GL.COPY_READ_BUFFER, GL.COPY_WRITE_BUFFER, readOffset, writeOffset, size);\n gl.bindBuffer(GL.COPY_READ_BUFFER, null);\n gl.bindBuffer(GL.COPY_WRITE_BUFFER, null);\n\n // TODO - update local `data` if offsets are 0\n this.debugData = null;\n\n return this;\n }\n\n /**\n * Reads data from buffer into an ArrayBufferView or SharedArrayBuffer.\n * @note WEBGL2 ONLY\n */\n override getData(options?: {\n dstData?: any;\n srcByteOffset?: number;\n dstOffset?: number;\n length?: number;\n }): any {\n let {dstData = null, length = 0} = options || {};\n const {srcByteOffset = 0, dstOffset = 0} = options || {};\n assertWebGL2Context(this.gl);\n\n const ArrayType = getTypedArrayFromGLType(this.accessor.type || GL.FLOAT, {clamped: false});\n const sourceAvailableElementCount = this._getAvailableElementCount(srcByteOffset);\n\n const dstElementOffset = dstOffset;\n\n let dstAvailableElementCount;\n let dstElementCount;\n if (dstData) {\n dstElementCount = dstData.length;\n dstAvailableElementCount = dstElementCount - dstElementOffset;\n } else {\n // Allocate ArrayBufferView with enough size to copy all eligible data.\n dstAvailableElementCount = Math.min(\n sourceAvailableElementCount,\n length || sourceAvailableElementCount\n );\n dstElementCount = dstElementOffset + dstAvailableElementCount;\n }\n\n const copyElementCount = Math.min(sourceAvailableElementCount, dstAvailableElementCount);\n length = length || copyElementCount;\n assert(length <= copyElementCount);\n dstData = dstData || new ArrayType(dstElementCount);\n\n // Use GL.COPY_READ_BUFFER to avoid disturbing other targets and locking type\n this.gl.bindBuffer(GL.COPY_READ_BUFFER, this.handle);\n this.gl2?.getBufferSubData(GL.COPY_READ_BUFFER, srcByteOffset, dstData, dstOffset, length);\n this.gl.bindBuffer(GL.COPY_READ_BUFFER, null);\n\n // TODO - update local `data` if offsets are 0\n return dstData;\n }\n\n /**\n * Binds a buffer to a given binding point (target).\n * GL.TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER take an index, and optionally a range.\n * - GL.TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER need an index to affect state\n * - GL.UNIFORM_BUFFER: `offset` must be aligned to GL.UNIFORM_BUFFER_OFFSET_ALIGNMENT.\n * - GL.UNIFORM_BUFFER: `size` must be a minimum of GL.UNIFORM_BLOCK_SIZE_DATA.\n */\n bind(options?: {target?: number; index?: any; offset?: number; size: any}): this {\n const {\n target = this.target, // target for the bind operation\n index = this.accessor && this.accessor.index, // index = index of target (indexed bind point)\n offset = 0,\n size\n } = options || {};\n // NOTE: While GL.TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER could\n // be used as direct binding points, they will not affect transform feedback or\n // uniform buffer state. Instead indexed bindings need to be made.\n if (target === GL.UNIFORM_BUFFER || target === GL.TRANSFORM_FEEDBACK_BUFFER) {\n if (size !== undefined) {\n this.gl2?.bindBufferRange(target, index, this.handle, offset, size);\n } else {\n assert(offset === 0); // Make sure offset wasn't supplied\n this.gl2?.bindBufferBase(target, index, this.handle);\n }\n } else {\n this.gl.bindBuffer(target, this.handle);\n }\n\n return this;\n }\n\n unbind(options?: {target?: any; index?: any}): this {\n const {target = this.target, index = this.accessor && this.accessor.index} = options || {};\n const isIndexedBuffer = target === GL.UNIFORM_BUFFER || target === GL.TRANSFORM_FEEDBACK_BUFFER;\n if (isIndexedBuffer) {\n this.gl2?.bindBufferBase(target, index, null);\n } else {\n this.gl.bindBuffer(target, null);\n }\n return this;\n }\n\n // PROTECTED METHODS (INTENDED FOR USE BY OTHER FRAMEWORK CODE ONLY)\n\n // Returns a short initial data array\n getDebugData(): {\n data: any;\n changed: boolean;\n } {\n if (!this.debugData) {\n this.debugData = this.getData({length: Math.min(DEBUG_DATA_LENGTH, this.byteLength)});\n return {data: this.debugData, changed: true};\n }\n return {data: this.debugData, changed: false};\n }\n\n invalidateDebugData() {\n this.debugData = null;\n }\n\n // PRIVATE METHODS\n\n // Allocate a new buffer and initialize to contents of typed array\n _setData(data, offset: number = 0, byteLength: number = data.byteLength + offset): this {\n assert(ArrayBuffer.isView(data));\n\n this.trackDeallocatedMemory();\n\n const target = this._getTarget();\n this.gl.bindBuffer(target, this.handle);\n this.gl.bufferData(target, byteLength, this.webglUsage);\n this.gl.bufferSubData(target, offset, data);\n this.gl.bindBuffer(target, null);\n\n this.debugData = data.slice(0, DEBUG_DATA_LENGTH);\n this.bytesUsed = byteLength;\n this.byteLength = byteLength;\n this.trackAllocatedMemory(byteLength);\n\n // infer GL type from supplied typed array\n const type = getGLTypeFromTypedArray(data);\n assert(type);\n this.setAccessor(new Accessor(this.accessor, {type}));\n return this;\n }\n\n // Allocate a GPU buffer of specified size.\n _setByteLength(byteLength: number, webglUsage = this.webglUsage): this {\n assert(byteLength >= 0);\n\n this.trackDeallocatedMemory();\n\n // Workaround needed for Safari (#291):\n // gl.bufferData with size equal to 0 crashes. Instead create zero sized array.\n let data = byteLength;\n if (byteLength === 0) {\n // @ts-expect-error\n data = new Float32Array(0);\n }\n\n const target = this._getTarget();\n this.gl.bindBuffer(target, this.handle);\n this.gl.bufferData(target, data, webglUsage);\n this.gl.bindBuffer(target, null);\n\n this.webglUsage = webglUsage;\n this.debugData = null;\n this.bytesUsed = byteLength;\n this.byteLength = byteLength;\n\n this.trackAllocatedMemory(byteLength);\n\n return this;\n }\n\n // Binding a buffer for the first time locks the type\n // In WebGL2, use GL.COPY_WRITE_BUFFER to avoid locking the type\n _getTarget() {\n // @ts-expect-error\n return this.gl.webgl2 ? GL.COPY_WRITE_BUFFER : this.target;\n }\n\n _getAvailableElementCount(srcByteOffset: number) {\n const ArrayType = getTypedArrayFromGLType(this.accessor.type || GL.FLOAT, {clamped: false});\n const sourceElementOffset = srcByteOffset / ArrayType.BYTES_PER_ELEMENT;\n return this.getElementCount() - sourceElementOffset;\n }\n\n // Automatically infers type from typed array passed to setData\n // Note: No longer that useful, since type is now autodeduced from the compiled shaders\n _inferType(data) {\n if (!this.accessor.type) {\n this.setAccessor(new Accessor(this.accessor, {type: getGLTypeFromTypedArray(data)}));\n }\n }\n\n // RESOURCE METHODS\n\n getParameter(pname: GL): any {\n this.gl.bindBuffer(this.target, this.handle);\n const value = this.gl.getBufferParameter(this.target, pname);\n this.gl.bindBuffer(this.target, null);\n return value;\n }\n\n // DEPRECATIONS - v7.0\n /** @deprecated Use Buffer.accessor.type */\n get type() {\n return this.accessor.type;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAEA,IAAAM,YAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,YAAA,GAAAL,sBAAA,CAAAF,OAAA;AAA4D,SAAAQ,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAP,KAAA,EAAAQ,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAS,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAR,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAQ,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAAA,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAA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O,IAAI,CAAC1G,QAAQ,CAACnC,IAAI;IAC3B;EAAC;EAAA,OAAAsB,aAAA;AAAA,EA9XwCwH,oBAAW;AAAAC,OAAA,CAAA1L,OAAA,GAAAiE,aAAA"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.flipRows = flipRows;
|
|
8
|
-
exports.getGLTypeFromTypedArray = getGLTypeFromTypedArray;
|
|
9
|
-
exports.getTypedArrayFromGLType = getTypedArrayFromGLType;
|
|
10
|
-
exports.scalePixels = scalePixels;
|
|
11
|
-
var _constants = _interopRequireDefault(require("@luma.gl/constants"));
|
|
12
|
-
var ERR_TYPE_DEDUCTION = 'Failed to deduce GL constant from typed array';
|
|
13
|
-
function getGLTypeFromTypedArray(arrayOrType) {
|
|
14
|
-
var type = ArrayBuffer.isView(arrayOrType) ? arrayOrType.constructor : arrayOrType;
|
|
15
|
-
switch (type) {
|
|
16
|
-
case Float32Array:
|
|
17
|
-
return _constants.default.FLOAT;
|
|
18
|
-
case Uint16Array:
|
|
19
|
-
return _constants.default.UNSIGNED_SHORT;
|
|
20
|
-
case Uint32Array:
|
|
21
|
-
return _constants.default.UNSIGNED_INT;
|
|
22
|
-
case Uint8Array:
|
|
23
|
-
return _constants.default.UNSIGNED_BYTE;
|
|
24
|
-
case Uint8ClampedArray:
|
|
25
|
-
return _constants.default.UNSIGNED_BYTE;
|
|
26
|
-
case Int8Array:
|
|
27
|
-
return _constants.default.BYTE;
|
|
28
|
-
case Int16Array:
|
|
29
|
-
return _constants.default.SHORT;
|
|
30
|
-
case Int32Array:
|
|
31
|
-
return _constants.default.INT;
|
|
32
|
-
default:
|
|
33
|
-
throw new Error(ERR_TYPE_DEDUCTION);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function getTypedArrayFromGLType(glType, options) {
|
|
37
|
-
var _ref = options || {},
|
|
38
|
-
_ref$clamped = _ref.clamped,
|
|
39
|
-
clamped = _ref$clamped === void 0 ? true : _ref$clamped;
|
|
40
|
-
switch (glType) {
|
|
41
|
-
case _constants.default.FLOAT:
|
|
42
|
-
return Float32Array;
|
|
43
|
-
case _constants.default.UNSIGNED_SHORT:
|
|
44
|
-
case _constants.default.UNSIGNED_SHORT_5_6_5:
|
|
45
|
-
case _constants.default.UNSIGNED_SHORT_4_4_4_4:
|
|
46
|
-
case _constants.default.UNSIGNED_SHORT_5_5_5_1:
|
|
47
|
-
return Uint16Array;
|
|
48
|
-
case _constants.default.UNSIGNED_INT:
|
|
49
|
-
return Uint32Array;
|
|
50
|
-
case _constants.default.UNSIGNED_BYTE:
|
|
51
|
-
return clamped ? Uint8ClampedArray : Uint8Array;
|
|
52
|
-
case _constants.default.BYTE:
|
|
53
|
-
return Int8Array;
|
|
54
|
-
case _constants.default.SHORT:
|
|
55
|
-
return Int16Array;
|
|
56
|
-
case _constants.default.INT:
|
|
57
|
-
return Int32Array;
|
|
58
|
-
default:
|
|
59
|
-
throw new Error('Failed to deduce typed array type from GL constant');
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function flipRows(options) {
|
|
63
|
-
var data = options.data,
|
|
64
|
-
width = options.width,
|
|
65
|
-
height = options.height,
|
|
66
|
-
_options$bytesPerPixe = options.bytesPerPixel,
|
|
67
|
-
bytesPerPixel = _options$bytesPerPixe === void 0 ? 4 : _options$bytesPerPixe,
|
|
68
|
-
temp = options.temp;
|
|
69
|
-
var bytesPerRow = width * bytesPerPixel;
|
|
70
|
-
var tempBuffer = temp || new Uint8Array(bytesPerRow);
|
|
71
|
-
for (var y = 0; y < height / 2; ++y) {
|
|
72
|
-
var topOffset = y * bytesPerRow;
|
|
73
|
-
var bottomOffset = (height - y - 1) * bytesPerRow;
|
|
74
|
-
tempBuffer.set(data.subarray(topOffset, topOffset + bytesPerRow));
|
|
75
|
-
data.copyWithin(topOffset, bottomOffset, bottomOffset + bytesPerRow);
|
|
76
|
-
data.set(tempBuffer, bottomOffset);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function scalePixels(options) {
|
|
80
|
-
var data = options.data,
|
|
81
|
-
width = options.width,
|
|
82
|
-
height = options.height;
|
|
83
|
-
var newWidth = Math.round(width / 2);
|
|
84
|
-
var newHeight = Math.round(height / 2);
|
|
85
|
-
var newData = new Uint8Array(newWidth * newHeight * 4);
|
|
86
|
-
for (var y = 0; y < newHeight; y++) {
|
|
87
|
-
for (var x = 0; x < newWidth; x++) {
|
|
88
|
-
for (var c = 0; c < 4; c++) {
|
|
89
|
-
newData[(y * newWidth + x) * 4 + c] = data[(y * 2 * width + x * 2) * 4 + c];
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
data: newData,
|
|
95
|
-
width: newWidth,
|
|
96
|
-
height: newHeight
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=typed-array-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typed-array-utils.js","names":["_constants","_interopRequireDefault","require","ERR_TYPE_DEDUCTION","getGLTypeFromTypedArray","arrayOrType","type","ArrayBuffer","isView","constructor","Float32Array","GL","FLOAT","Uint16Array","UNSIGNED_SHORT","Uint32Array","UNSIGNED_INT","Uint8Array","UNSIGNED_BYTE","Uint8ClampedArray","Int8Array","BYTE","Int16Array","SHORT","Int32Array","INT","Error","getTypedArrayFromGLType","glType","options","_ref","_ref$clamped","clamped","UNSIGNED_SHORT_5_6_5","UNSIGNED_SHORT_4_4_4_4","UNSIGNED_SHORT_5_5_5_1","flipRows","data","width","height","_options$bytesPerPixe","bytesPerPixel","temp","bytesPerRow","tempBuffer","y","topOffset","bottomOffset","set","subarray","copyWithin","scalePixels","newWidth","Math","round","newHeight","newData","x","c"],"sources":["../../../src/classic/typed-array-utils.ts"],"sourcesContent":["// luma.gl, MIT license\n\nimport {TypedArray} from '@luma.gl/api';\nimport GL from '@luma.gl/constants';\nimport {GLType} from '../types/webgl'\n\nconst ERR_TYPE_DEDUCTION = 'Failed to deduce GL constant from typed array';\n\ntype TypedArrayConstructor =\n | Float32ArrayConstructor\n | Uint16ArrayConstructor\n | Uint32ArrayConstructor\n | Uint8ArrayConstructor\n | Uint8ClampedArrayConstructor\n | Int8ArrayConstructor\n | Int16ArrayConstructor\n | Int32ArrayConstructor;\n\n/**\n * Converts TYPED ARRAYS to corresponding GL constant\n * Used to auto deduce gl parameter types\n * @param {*} arrayOrType\n * @returns\n */\nexport function getGLTypeFromTypedArray(arrayOrType: TypedArray): GLType {\n // If typed array, look up constructor\n const type = ArrayBuffer.isView(arrayOrType) ? arrayOrType.constructor : arrayOrType;\n switch (type) {\n case Float32Array:\n return GL.FLOAT;\n case Uint16Array:\n return GL.UNSIGNED_SHORT;\n case Uint32Array:\n return GL.UNSIGNED_INT;\n case Uint8Array:\n return GL.UNSIGNED_BYTE;\n case Uint8ClampedArray:\n return GL.UNSIGNED_BYTE;\n case Int8Array:\n return GL.BYTE;\n case Int16Array:\n return GL.SHORT;\n case Int32Array:\n return GL.INT;\n default:\n throw new Error(ERR_TYPE_DEDUCTION);\n }\n}\n\n/**\n * Converts GL constant to corresponding TYPED ARRAY\n * Used to auto deduce gl parameter types\n * @param {*} glType\n * @param {*} param1\n * @returns\n */\n// eslint-disable-next-line complexity\nexport function getTypedArrayFromGLType(\n glType: any,\n options?: {\n clamped?: boolean;\n }\n): TypedArrayConstructor {\n const {clamped = true} = options || {};\n // Sorted in some order of likelihood to reduce amount of comparisons\n switch (glType) {\n case GL.FLOAT:\n return Float32Array;\n case GL.UNSIGNED_SHORT:\n case GL.UNSIGNED_SHORT_5_6_5:\n case GL.UNSIGNED_SHORT_4_4_4_4:\n case GL.UNSIGNED_SHORT_5_5_5_1:\n return Uint16Array;\n case GL.UNSIGNED_INT:\n return Uint32Array;\n case GL.UNSIGNED_BYTE:\n return clamped ? Uint8ClampedArray : Uint8Array;\n case GL.BYTE:\n return Int8Array;\n case GL.SHORT:\n return Int16Array;\n case GL.INT:\n return Int32Array;\n default:\n throw new Error('Failed to deduce typed array type from GL constant');\n }\n}\n\n/**\n * Flip rows (can be used on arrays returned from `Framebuffer.readPixels`)\n * https: *stackoverflow.com/questions/41969562/\n * how-can-i-flip-the-result-of-webglrenderingcontext-readpixels\n * @param {*} param0\n */\n export function flipRows(options: {\n data: any;\n width: any;\n height: any;\n bytesPerPixel?: number;\n temp?: any;\n}): void {\n const {data, width, height, bytesPerPixel = 4, temp} = options;\n const bytesPerRow = width * bytesPerPixel;\n\n // make a temp buffer to hold one row\n const tempBuffer = temp || new Uint8Array(bytesPerRow);\n for (let y = 0; y < height / 2; ++y) {\n const topOffset = y * bytesPerRow;\n const bottomOffset = (height - y - 1) * bytesPerRow;\n // make copy of a row on the top half\n tempBuffer.set(data.subarray(topOffset, topOffset + bytesPerRow));\n // copy a row from the bottom half to the top\n data.copyWithin(topOffset, bottomOffset, bottomOffset + bytesPerRow);\n // copy the copy of the top half row to the bottom half\n data.set(tempBuffer, bottomOffset);\n }\n}\n\n\nexport function scalePixels(options: {\n data: any;\n width: any;\n height: any;\n}): {\n data: Uint8Array;\n width: number;\n height: number;\n} {\n const {data, width, height} = options;\n const newWidth = Math.round(width / 2);\n const newHeight = Math.round(height / 2);\n const newData = new Uint8Array(newWidth * newHeight * 4);\n for (let y = 0; y < newHeight; y++) {\n for (let x = 0; x < newWidth; x++) {\n for (let c = 0; c < 4; c++) {\n newData[(y * newWidth + x) * 4 + c] = data[(y * 2 * width + x * 2) * 4 + c];\n }\n }\n }\n return {data: newData, width: newWidth, height: newHeight};\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAMC,kBAAkB,GAAG,+CAA+C;AAkBnE,SAASC,uBAAuBA,CAACC,WAAu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BU,MAAM;EAC1B,IAAMa,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAChB,KAAK,GAAG,CAAC,CAAC;EACtC,IAAMiB,SAAS,GAAGF,IAAI,CAACC,KAAK,CAACf,MAAM,GAAG,CAAC,CAAC;EACxC,IAAMiB,OAAO,GAAG,IAAIvC,UAAU,CAACmC,QAAQ,GAAGG,SAAS,GAAG,CAAC,CAAC;EACxD,KAAK,IAAIV,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGU,SAAS,EAAEV,CAAC,EAAE,EAAE;IAClC,KAAK,IAAIY,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,QAAQ,EAAEK,CAAC,EAAE,EAAE;MACjC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;QAC1BF,OAAO,CAAC,CAACX,CAAC,GAAGO,QAAQ,GAAGK,CAAC,IAAI,CAAC,GAAGC,CAAC,CAAC,GAAGrB,IAAI,CAAC,CAACQ,CAAC,GAAG,CAAC,GAAGP,KAAK,GAAGmB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAGC,CAAC,CAAC;MAC7E;IACF;EACF;EACA,OAAO;IAACrB,IAAI,EAAEmB,OAAO;IAAElB,KAAK,EAAEc,QAAQ;IAAEb,MAAM,EAAEgB;EAAS,CAAC;AAC5D"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createBrowserContext = createBrowserContext;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
var DEFAULT_CONTEXT_PROPS = {
|
|
12
|
-
webgl2: true,
|
|
13
|
-
webgl1: true,
|
|
14
|
-
powerPreference: 'high-performance',
|
|
15
|
-
onContextLost: function onContextLost() {
|
|
16
|
-
return console.error('WebGL context lost');
|
|
17
|
-
},
|
|
18
|
-
onContextRestored: function onContextRestored() {
|
|
19
|
-
return console.info('WebGL context restored');
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function createBrowserContext(canvas, props) {
|
|
23
|
-
props = _objectSpread(_objectSpread({}, DEFAULT_CONTEXT_PROPS), props);
|
|
24
|
-
var errorMessage = null;
|
|
25
|
-
var onCreateError = function onCreateError(error) {
|
|
26
|
-
return errorMessage = error.statusMessage || errorMessage;
|
|
27
|
-
};
|
|
28
|
-
canvas.addEventListener('webglcontextcreationerror', onCreateError, false);
|
|
29
|
-
var gl = null;
|
|
30
|
-
if (props.type === 'webgl2') {
|
|
31
|
-
props = _objectSpread(_objectSpread({}, props), {}, {
|
|
32
|
-
webgl1: false
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
if (props.type === 'webgl1') {
|
|
36
|
-
props = _objectSpread(_objectSpread({}, props), {}, {
|
|
37
|
-
webgl2: false
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (props.webgl2) {
|
|
41
|
-
gl = gl || canvas.getContext('webgl2', props);
|
|
42
|
-
}
|
|
43
|
-
if (props.webgl1) {
|
|
44
|
-
gl = gl || canvas.getContext('webgl', props);
|
|
45
|
-
}
|
|
46
|
-
canvas.removeEventListener('webglcontextcreationerror', onCreateError, false);
|
|
47
|
-
if (!gl) {
|
|
48
|
-
throw new Error("Failed to create ".concat(props.webgl2 && !props.webgl1 ? 'WebGL2' : 'WebGL', " context: ").concat(errorMessage || 'Unknown error'));
|
|
49
|
-
}
|
|
50
|
-
if (props.onContextLost) {
|
|
51
|
-
var _props = props,
|
|
52
|
-
onContextLost = _props.onContextLost;
|
|
53
|
-
canvas.addEventListener('webglcontextlost', function (event) {
|
|
54
|
-
return onContextLost(event);
|
|
55
|
-
}, false);
|
|
56
|
-
}
|
|
57
|
-
if (props.onContextRestored) {
|
|
58
|
-
var _props2 = props,
|
|
59
|
-
onContextRestored = _props2.onContextRestored;
|
|
60
|
-
canvas.addEventListener('webglcontextrestored', function (event) {
|
|
61
|
-
return onContextRestored(event);
|
|
62
|
-
}, false);
|
|
63
|
-
}
|
|
64
|
-
return gl;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=create-browser-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-browser-context.js","names":["DEFAULT_CONTEXT_PROPS","webgl2","webgl1","powerPreference","onContextLost","console","error","onContextRestored","info","createBrowserContext","canvas","props","_objectSpread","errorMessage","onCreateError","statusMessage","addEventListener","gl","type","getContext","removeEventListener","Error","concat","_props","event","_props2"],"sources":["../../../../src/context/context/create-browser-context.ts"],"sourcesContent":["// luma.gl, MIT license\n\n/**\n * ContextProps\n* @param webgl2 Set to false to not create a WebGL2 context (force webgl1)\n* @param webgl1 set to false to not create a WebGL1 context (fail if webgl2 not available)\n* @param onContextLost\n* @param onContextRestored\n*\n* BROWSER CONTEXT PARAMETERS\n* @param debug Instrument context (at the expense of performance).\n* @param alpha Default render target has an alpha buffer.\n* @param depth Default render target has a depth buffer of at least 16 bits.\n* @param stencil Default render target has a stencil buffer of at least 8 bits.\n* @param antialias Boolean that indicates whether or not to perform anti-aliasing.\n* @param premultipliedAlpha Boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.\n* @param preserveDrawingBuffer Default render target buffers will not be automatically cleared and will preserve their values until cleared or overwritten\n* @param failIfMajorPerformanceCaveat Do not create if the system performance is low.\n*/\ntype ContextProps = {\n type?: 'webgl' | 'webgl1' | 'webgl2' | string;\n webgl1?: boolean;\n webgl2?: boolean;\n onContextLost?: (event: Event) => void;\n onContextRestored?: (event: Event) => void;\n alpha?: boolean; // indicates if the canvas contains an alpha buffer.\n desynchronized?: boolean; // hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop\n antialias?: boolean; // indicates whether or not to perform anti-aliasing.\n depth?: boolean; // indicates that the drawing buffer has a depth buffer of at least 16 bits.\n failIfMajorPerformanceCaveat?: boolean, // indicates if a context will be created if the system performance is low or if no hardware GPU is available.\n powerPreference?: 'default' | 'high-performance' | 'low-power',\n premultipliedAlpha?: boolean, // page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.\n preserveDrawingBuffer?: boolean // buffers will not be cleared and will preserve their values until cleared or overwritten by the author.\n};\n\nconst DEFAULT_CONTEXT_PROPS: ContextProps = {\n webgl2: true, // Attempt to create a WebGL2 context\n webgl1: true, // Attempt to create a WebGL1 context (false to fail if webgl2 not available)\n powerPreference: 'high-performance', // After all, most apps are using WebGL for performance reasons\n onContextLost: () => console.error('WebGL context lost'),\n onContextRestored: () => console.info('WebGL context restored'),\n};\n\n/**\n * Create a WebGL context for a canvas\n * Note calling this multiple time on the same canvas does return the same context\n* @param canvas A canvas element or offscreen canvas\n */\n export function createBrowserContext(canvas: HTMLCanvasElement | OffscreenCanvas, props: ContextProps): WebGLRenderingContext {\n props = {...DEFAULT_CONTEXT_PROPS, ...props};\n\n // Try to extract any extra information about why context creation failed\n let errorMessage = null;\n const onCreateError = (error) => (errorMessage = error.statusMessage || errorMessage);\n canvas.addEventListener('webglcontextcreationerror', onCreateError, false);\n\n // Create the desired context\n let gl: WebGLRenderingContext | null = null;\n\n if (props.type === 'webgl2') {\n props = {...props, webgl1: false};\n }\n if (props.type === 'webgl1') {\n props = {...props, webgl2: false};\n }\n\n // Prefer webgl2 over webgl1 if both are acceptable\n if (props.webgl2) {\n gl = gl || canvas.getContext('webgl2', props) as WebGL2RenderingContext | null;\n }\n if (props.webgl1) {\n gl = gl || canvas.getContext('webgl', props) as WebGLRenderingContext | null;\n }\n\n // TODO are we removing this listener before giving it a chance to fire?\n canvas.removeEventListener('webglcontextcreationerror', onCreateError, false);\n\n if (!gl) {\n throw new Error(\n `Failed to create ${props.webgl2 && !props.webgl1 ? 'WebGL2' : 'WebGL'} context: ${\n errorMessage || 'Unknown error'\n }`\n );\n }\n\n if (props.onContextLost) {\n // Carefully extract and wrap callbacks to prevent addEventListener from rebinding them.\n const {onContextLost} = props;\n canvas.addEventListener('webglcontextlost',(event: Event) => onContextLost(event), false);\n }\n if (props.onContextRestored) {\n // Carefully extract and wrap callbacks to prevent addEventListener from rebinding them.\n const {onContextRestored} = props;\n canvas.addEventListener('webglcontextrestored', (event: Event) => onContextRestored(event), false);\n }\n\n return gl;\n}\n\n/* TODO - can we call this asynchronously to catch the error events?\nexport async function createBrowserContextAsync(canvas: HTMLCanvasElement | OffscreenCanvas, props: ContextProps): Promise<WebGLRenderingContext> {\n props = {...DEFAULT_CONTEXT_PROPS, ...props};\n\n // Try to extract any extra information about why context creation failed\n let errorMessage = null;\n const onCreateError = (error) => (errorMessage = error.statusMessage || errorMessage);\n canvas.addEventListener('webglcontextcreationerror', onCreateError, false);\n\n const gl = createBrowserContext(canvas, props);\n\n // Give the listener a chance to fire\n await new Promise(resolve => setTimeout(resolve, 0));\n\n canvas.removeEventListener('webglcontextcreationerror', onCreateError, false);\n\n return gl;\n}\n*/\n"],"mappings":";;;;;;;;;;AAmCA,IAAMA,qBAAmC,GAAG;EAC1CC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,I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AC;EAE7E,IAAI,CAACG,EAAE,EAAE;IACP,MAAM,IAAII,KAAK,qBAAAC,MAAA,CACOX,KAAK,CAACV,MAAM,IAAI,CAACU,KAAK,CAACT,MAAM,GAAG,QAAQ,GAAG,OAAO,gBAAAoB,MAAA,CACpET,YAAY,IAAI,eAAe,EAElC;EACH;EAEA,IAAIF,KAAK,CAACP,aAAa,EAAE;IAEvB,IAAAmB,MAAA,GAAwBZ,KAAK;MAAtBP,aAAa,GAAAmB,MAAA,CAAbnB,aAAa;IACpBM,MAAM,CAACM,gBAAgB,CAAC,kBAAkB,EAAC,UAACQ,KAAY;MAAA,OAAKpB,aAAa,CAACoB,KAAK,CAAC;IAAA,GAAE,KAAK,CAAC;EAC3F;EACA,IAAIb,KAAK,CAACJ,iBAAiB,EAAE;IAE3B,IAAAkB,OAAA,GAA4Bd,KAAK;MAA1BJ,iBAAiB,GAAAkB,OAAA,CAAjBlB,iBAAiB;IACxBG,MAAM,CAACM,gBAAgB,CAAC,sBAAsB,EAAE,UAACQ,KAAY;MAAA,OAAKjB,iBAAiB,CAACiB,KAAK,CAAC;IAAA,GAAE,KAAK,CAAC;EACpG;EAEA,OAAOP,EAAE;AACX"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createHeadlessContext = createHeadlessContext;
|
|
8
|
-
exports.isHeadlessGLRegistered = isHeadlessGLRegistered;
|
|
9
|
-
exports.registerHeadlessGL = registerHeadlessGL;
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
var ERR_HEADLESSGL_FAILED = 'Failed to create WebGL context in Node.js, headless gl returned null';
|
|
14
|
-
var ERR_HEADLESSGL_LOAD = " luma.gl: loaded under Node.js without headless gl installed, meaning that WebGL contexts can not be created. This may not be an error. For example, this is a typical configuration for isorender applications running on the server.";
|
|
15
|
-
var CONTEXT_DEFAULTS = {
|
|
16
|
-
width: 1,
|
|
17
|
-
height: 1,
|
|
18
|
-
debug: true,
|
|
19
|
-
throwOnError: false
|
|
20
|
-
};
|
|
21
|
-
var headlessGL = null;
|
|
22
|
-
function registerHeadlessGL(headlessgl) {
|
|
23
|
-
headlessGL = headlessgl;
|
|
24
|
-
}
|
|
25
|
-
function isHeadlessGLRegistered() {
|
|
26
|
-
return headlessGL !== null;
|
|
27
|
-
}
|
|
28
|
-
function createHeadlessContext(options) {
|
|
29
|
-
options = _objectSpread(_objectSpread({}, CONTEXT_DEFAULTS), options);
|
|
30
|
-
var _options = options,
|
|
31
|
-
width = _options.width,
|
|
32
|
-
height = _options.height,
|
|
33
|
-
webgl1 = _options.webgl1,
|
|
34
|
-
webgl2 = _options.webgl2;
|
|
35
|
-
if (webgl2 && !webgl1) {
|
|
36
|
-
throw new Error('headless-gl does not support WebGL2');
|
|
37
|
-
}
|
|
38
|
-
if (!headlessGL) {
|
|
39
|
-
throw new Error(ERR_HEADLESSGL_LOAD);
|
|
40
|
-
}
|
|
41
|
-
var gl = headlessGL(width, height, options);
|
|
42
|
-
if (!gl) {
|
|
43
|
-
throw new Error(ERR_HEADLESSGL_FAILED);
|
|
44
|
-
}
|
|
45
|
-
return gl;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=create-headless-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-headless-context.js","names":["ERR_HEADLESSGL_FAILED","ERR_HEADLESSGL_LOAD","CONTEXT_DEFAULTS","width","height","debug","throwOnError","headlessGL","registerHeadlessGL","headlessgl","isHeadlessGLRegistered","createHeadlessContext","options","_objectSpread","_options","webgl1","webgl2","Error","gl"],"sources":["../../../../src/context/context/create-headless-context.ts"],"sourcesContent":["const ERR_HEADLESSGL_FAILED =\n 'Failed to create WebGL context in Node.js, headless gl returned null';\n\nconst ERR_HEADLESSGL_LOAD = `\\\n luma.gl: loaded under Node.js without headless gl installed, meaning that WebGL \\\n contexts can not be created. This may not be an error. For example, this is a \\\n typical configuration for isorender applications running on the server.`;\n\nconst CONTEXT_DEFAULTS = {\n width: 1,\n height: 1,\n debug: true,\n throwOnError: false\n};\n\n/** Duck typing for the main headless gl export, a function to create contexts */\nexport type HeadlessGL = (width: number, height: number, options: Record<string, unknown>) => WebGLRenderingContext;\n\nlet headlessGL: HeadlessGL | null = null; \n\n/** By importing `gl` and registering it with this function, contexts can be created under Node.js */\nexport function registerHeadlessGL(headlessgl: HeadlessGL) {\n headlessGL = headlessgl;\n}\n\n/** @returns true if headless gl is registered */\nexport function isHeadlessGLRegistered(): boolean {\n return headlessGL !== null;\n}\n\n/** Create headless gl context (for running under Node.js) */\nexport function createHeadlessContext(options?: Record<string, any>): WebGLRenderingContext {\n options = {...CONTEXT_DEFAULTS, ...options};\n\n const {width, height, webgl1, webgl2} = options;\n\n if (webgl2 && !webgl1) {\n throw new Error('headless-gl does not support WebGL2');\n }\n if (!headlessGL) {\n throw new Error(ERR_HEADLESSGL_LOAD);\n }\n const gl = headlessGL(width, height, options);\n if (!gl) {\n throw new Error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
-
});
|
|
6
|
-
exports.ERR_WEBGL2 = exports.ERR_WEBGL = void 0;
|
|
7
|
-
exports.assertWebGL2Context = assertWebGL2Context;
|
|
8
|
-
exports.assertWebGLContext = assertWebGLContext;
|
|
9
|
-
exports.getWebGL2Context = getWebGL2Context;
|
|
10
|
-
exports.isWebGL = isWebGL;
|
|
11
|
-
exports.isWebGL2 = isWebGL2;
|
|
12
|
-
var _api = require("@luma.gl/api");
|
|
13
|
-
var ERR_CONTEXT = 'Invalid WebGLRenderingContext';
|
|
14
|
-
var ERR_WEBGL = ERR_CONTEXT;
|
|
15
|
-
exports.ERR_WEBGL = ERR_WEBGL;
|
|
16
|
-
var ERR_WEBGL2 = 'Requires WebGL2';
|
|
17
|
-
exports.ERR_WEBGL2 = ERR_WEBGL2;
|
|
18
|
-
function isWebGL(gl) {
|
|
19
|
-
if (typeof WebGLRenderingContext !== 'undefined' && gl instanceof WebGLRenderingContext) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
return Boolean(gl && Number.isFinite(gl._version));
|
|
26
|
-
}
|
|
27
|
-
function isWebGL2(gl) {
|
|
28
|
-
if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
return Boolean(gl && gl._version === 2);
|
|
32
|
-
}
|
|
33
|
-
function getWebGL2Context(gl) {
|
|
34
|
-
return isWebGL2(gl) ? gl : null;
|
|
35
|
-
}
|
|
36
|
-
function assertWebGLContext(gl) {
|
|
37
|
-
(0, _api.assert)(isWebGL(gl), ERR_CONTEXT);
|
|
38
|
-
return gl;
|
|
39
|
-
}
|
|
40
|
-
function assertWebGL2Context(gl) {
|
|
41
|
-
(0, _api.assert)(isWebGL2(gl), ERR_WEBGL2);
|
|
42
|
-
return gl;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=webgl-checks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-checks.js","names":["_api","require","ERR_CONTEXT","ERR_WEBGL","exports","ERR_WEBGL2","isWebGL","gl","WebGLRenderingContext","WebGL2RenderingContext","Boolean","Number","isFinite","_version","isWebGL2","getWebGL2Context","assertWebGLContext","assert","assertWebGL2Context"],"sources":["../../../../src/context/context/webgl-checks.ts"],"sourcesContent":["// luma.gl, MIT license\nimport {assert} from '@luma.gl/api';\n\nconst ERR_CONTEXT = 'Invalid WebGLRenderingContext';\nexport const ERR_WEBGL = ERR_CONTEXT;\nexport const ERR_WEBGL2 = 'Requires WebGL2';\n\n\n/** Check if supplied parameter is a WebGLRenderingContext */\nexport function isWebGL(gl: any): boolean {\n if (typeof WebGLRenderingContext !== 'undefined' && gl instanceof WebGLRenderingContext) {\n return true;\n }\n if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {\n return true;\n }\n // Look for debug contexts, headless gl etc\n return Boolean(gl && Number.isFinite(gl._version));\n}\n\n\n/** Check if supplied parameter is a WebGL2RenderingContext */\nexport function isWebGL2(gl: any): boolean {\n if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {\n return true;\n }\n // Look for debug contexts, headless gl etc\n return Boolean(gl && gl._version === 2);\n}\n\n\n/** Returns a properly typed WebGL2RenderingContext from a WebGL1 context, or null */\nexport function getWebGL2Context(gl: WebGLRenderingContext): WebGL2RenderingContext | null {\n // @ts-expect-error\n return isWebGL2(gl) ? gl : null;\n}\n\n\n/** Throw if supplied parameter is not a WebGLRenderingContext, otherwise return properly typed value */\nexport function assertWebGLContext(gl: any): WebGLRenderingContext {\n assert(isWebGL(gl), ERR_CONTEXT);\n return gl;\n}\n\n/** Throw if supplied parameter is not a WebGL2RenderingContext, otherwise return properly typed value */\nexport function assertWebGL2Context(gl: any): WebGL2RenderingContext {\n assert(isWebG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-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.initializeSpectorJS = initializeSpectorJS;
|
|
8
|
-
exports.loadSpectorJS = loadSpectorJS;
|
|
9
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
-
var _api = require("@luma.gl/api");
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
var DEFAULT_SPECTOR_PROPS = {
|
|
16
|
-
spector: _api.log.get('spector') || _api.log.get('inspect')
|
|
17
|
-
};
|
|
18
|
-
var SPECTOR_CDN_URL = 'https://spectorcdn.babylonjs.com/spector.bundle.js';
|
|
19
|
-
var LOG_LEVEL = 1;
|
|
20
|
-
var spector = null;
|
|
21
|
-
var initialized = false;
|
|
22
|
-
function loadSpectorJS(_x) {
|
|
23
|
-
return _loadSpectorJS.apply(this, arguments);
|
|
24
|
-
}
|
|
25
|
-
function _loadSpectorJS() {
|
|
26
|
-
_loadSpectorJS = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(props) {
|
|
27
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
28
|
-
while (1) switch (_context.prev = _context.next) {
|
|
29
|
-
case 0:
|
|
30
|
-
if (globalThis.SPECTOR) {
|
|
31
|
-
_context.next = 9;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
_context.prev = 1;
|
|
35
|
-
_context.next = 4;
|
|
36
|
-
return (0, _api.loadScript)(SPECTOR_CDN_URL);
|
|
37
|
-
case 4:
|
|
38
|
-
_context.next = 9;
|
|
39
|
-
break;
|
|
40
|
-
case 6:
|
|
41
|
-
_context.prev = 6;
|
|
42
|
-
_context.t0 = _context["catch"](1);
|
|
43
|
-
_api.log.warn(String(_context.t0));
|
|
44
|
-
case 9:
|
|
45
|
-
case "end":
|
|
46
|
-
return _context.stop();
|
|
47
|
-
}
|
|
48
|
-
}, _callee, null, [[1, 6]]);
|
|
49
|
-
}));
|
|
50
|
-
return _loadSpectorJS.apply(this, arguments);
|
|
51
|
-
}
|
|
52
|
-
function initializeSpectorJS(props) {
|
|
53
|
-
var _props, _props2;
|
|
54
|
-
props = _objectSpread(_objectSpread({}, DEFAULT_SPECTOR_PROPS), props);
|
|
55
|
-
if (!((_props = props) !== null && _props !== void 0 && _props.spector)) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
if (!spector && globalThis.SPECTOR) {
|
|
59
|
-
_api.log.probe(LOG_LEVEL, "SPECTOR found and initialized")();
|
|
60
|
-
spector = new globalThis.SPECTOR.Spector();
|
|
61
|
-
if (globalThis.luma) {
|
|
62
|
-
globalThis.luma.spector = spector;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (!spector) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
if (!initialized) {
|
|
69
|
-
var _spector, _spector2;
|
|
70
|
-
initialized = true;
|
|
71
|
-
spector.spyCanvases();
|
|
72
|
-
(_spector = spector) === null || _spector === void 0 ? void 0 : _spector.onCaptureStarted.add(function (capture) {
|
|
73
|
-
return _api.log.info("Spector capture started:", capture)();
|
|
74
|
-
});
|
|
75
|
-
(_spector2 = spector) === null || _spector2 === void 0 ? void 0 : _spector2.onCapture.add(function (capture) {
|
|
76
|
-
var _spector3, _spector4, _spector5;
|
|
77
|
-
_api.log.info("Spector capture complete:", capture)();
|
|
78
|
-
(_spector3 = spector) === null || _spector3 === void 0 ? void 0 : _spector3.getResultUI();
|
|
79
|
-
(_spector4 = spector) === null || _spector4 === void 0 ? void 0 : _spector4.resultView.display();
|
|
80
|
-
(_spector5 = spector) === null || _spector5 === void 0 ? void 0 : _spector5.resultView.addCapture(capture);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
if ((_props2 = props) !== null && _props2 !== void 0 && _props2.canvas) {
|
|
84
|
-
var _spector6, _props3;
|
|
85
|
-
if (typeof props.spector === 'string' && props.spector !== props.canvas.id) {
|
|
86
|
-
return spector;
|
|
87
|
-
}
|
|
88
|
-
(_spector6 = spector) === null || _spector6 === void 0 ? void 0 : _spector6.startCapture((_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.canvas, 500);
|
|
89
|
-
new Promise(function (resolve) {
|
|
90
|
-
return setTimeout(resolve, 2000);
|
|
91
|
-
}).then(function (_) {
|
|
92
|
-
var _spector7;
|
|
93
|
-
_api.log.info("Spector capture stopped after 2 seconds")();
|
|
94
|
-
(_spector7 = spector) === null || _spector7 === void 0 ? void 0 : _spector7.stopCapture();
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return spector;
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=spector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spector.js","names":["_api","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","DEFAULT_SPECTOR_PROPS","spector","log","get","SPECTOR_CDN_URL","LOG_LEVEL","initialized","loadSpectorJS","_x","_loadSpectorJS","_asyncToGenerator2","_regenerator","mark","_callee","props","wrap","_callee$","_context","prev","next","globalThis","SPECTOR","loadScript","t0","warn","String","stop","initializeSpectorJS","_props","_props2","probe","Spector","luma","_spector","_spector2","spyCanvases","onCaptureStarted","add","capture","info","onCapture","_spector3","_spector4","_spector5","getResultUI","resultView","display","addCapture","canvas","_spector6","_props3","id","startCapture","Promise","resolve","setTimeout","then","_","_spector7","stopCapture"],"sources":["../../../../src/context/debug/spector.ts"],"sourcesContent":["// luma.gl, MIT license\nimport {log, loadScript} from '@luma.gl/api';\n\n/** Spector debug initialization options */\ntype SpectorProps = {\n /** Canvas to monitor */\n canvas?: HTMLCanvasElement | OffscreenCanvas;\n /** Whether debug is enabled. Auto-detected if ommitted */\n debug?: boolean;\n /** Whether spector is disabled */\n spector?: boolean | string | object;\n};\n\nconst DEFAULT_SPECTOR_PROPS: SpectorProps = {\n spector: log.get('spector') || log.get('inspect')\n};\n\n// https://github.com/BabylonJS/Spector.js#basic-usage\nconst SPECTOR_CDN_URL = 'https://spectorcdn.babylonjs.com/spector.bundle.js';\nconst LOG_LEVEL = 1;\n\nlet spector: any = null;\nlet initialized: boolean = false;\n\ndeclare global {\n var SPECTOR: any;\n}\n\n/** Loads spector from CDN if not already installed */\nexport async function loadSpectorJS(props?: SpectorProps) {\n if (!globalThis.SPECTOR) {\n try {\n await loadScript(SPECTOR_CDN_URL);\n } catch(error) {\n log.warn(String(error))\n }\n }\n}\n\nexport function initializeSpectorJS(props?: SpectorProps) {\n props = {...DEFAULT_SPECTOR_PROPS, ...props};\n if (!props?.spector) {\n return null;\n }\n\n if (!spector && globalThis.SPECTOR) {\n log.probe(LOG_LEVEL, \"SPECTOR found and initialized\")();\n spector = new globalThis.SPECTOR.Spector();\n if (globalThis.luma) {\n globalThis.luma.spector = spector;\n }\n }\n\n if (!spector) {\n return null;\n }\n\n if (!initialized) {\n initialized = true;\n\n // enables recording some extra information merged in the capture like texture memory sizes and formats\n spector.spyCanvases();\n // A callback when results are ready\n spector?.onCaptureStarted.add((capture: unknown) => log.info(`Spector capture started:`, capture)());\n spector?.onCapture.add((capture: unknown) => {\n log.info(`Spector capture complete:`, capture)();\n // Use undocumented Spector API to open the UI with our capture\n // See https://github.com/BabylonJS/Spector.js/blob/767ad1195a25b85a85c381f400eb50a979239eca/src/spector.ts#L124\n spector?.getResultUI()\n spector?.resultView.display();\n spector?.resultView.addCapture(capture)\n });\n }\n\n if (props?.canvas) {\n // @ts-expect-error If spector is specified as a canvas id, only monitor that canvas\n if (typeof props.spector === 'string' && props.spector !== props.canvas.id) {\n return spector;\n }\n\n // capture startup\n // spector?.captureCanvas(props?.canvas);\n spector?.startCapture(props?.canvas, 500); // 500 commands\n new Promise(resolve => setTimeout(resolve, 2000)).then(_ => {\n log.info(`Spector capture stopped after 2 seconds`)();\n spector?.stopCapture();\n // spector?.displayUI();\n });\n }\n\n return spector;\n}\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AAA6C,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAA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