@luma.gl/webgl 8.6.0-alpha.5 → 9.0.0-alpha.2
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/README.md +3 -67
- package/dist/adapter/converters/device-parameters.d.ts +17 -0
- package/dist/adapter/converters/device-parameters.d.ts.map +1 -0
- package/dist/adapter/converters/{set-device-parameters.js → device-parameters.js} +36 -5
- package/dist/adapter/converters/device-parameters.js.map +1 -0
- package/dist/{classes → adapter/converters}/renderbuffer-formats.d.ts +0 -0
- package/dist/adapter/converters/renderbuffer-formats.d.ts.map +1 -0
- package/dist/{classes → adapter/converters}/renderbuffer-formats.js +1 -1
- package/dist/adapter/converters/renderbuffer-formats.js.map +1 -0
- package/dist/adapter/converters/sampler-parameters.d.ts +19 -0
- package/dist/adapter/converters/sampler-parameters.d.ts.map +1 -0
- package/dist/adapter/converters/sampler-parameters.js +208 -0
- package/dist/adapter/converters/sampler-parameters.js.map +1 -0
- package/dist/adapter/converters/texture-formats.d.ts +93 -0
- package/dist/adapter/converters/texture-formats.d.ts.map +1 -0
- package/dist/adapter/converters/texture-formats.js +954 -0
- package/dist/adapter/converters/texture-formats.js.map +1 -0
- package/dist/adapter/converters/vertex-formats.d.ts +4 -0
- package/dist/adapter/converters/vertex-formats.d.ts.map +1 -0
- package/dist/adapter/converters/vertex-formats.js +35 -0
- package/dist/adapter/converters/vertex-formats.js.map +1 -0
- package/dist/adapter/device-helpers/device-features.d.ts +3 -6
- package/dist/adapter/device-helpers/device-features.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-features.js +27 -48
- package/dist/adapter/device-helpers/device-features.js.map +1 -1
- package/dist/adapter/device-helpers/device-limits.d.ts +1 -0
- package/dist/adapter/device-helpers/device-limits.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-limits.js +1 -0
- package/dist/adapter/device-helpers/device-limits.js.map +1 -1
- package/dist/adapter/device-helpers/get-device-info.js +7 -7
- package/dist/adapter/device-helpers/get-device-info.js.map +1 -1
- package/dist/adapter/helpers/attribute-utils.d.ts +11 -0
- package/dist/adapter/helpers/attribute-utils.d.ts.map +1 -0
- package/dist/adapter/helpers/attribute-utils.js +81 -0
- package/dist/adapter/helpers/attribute-utils.js.map +1 -0
- package/dist/adapter/helpers/get-shader-layout.d.ts +55 -0
- package/dist/adapter/helpers/get-shader-layout.d.ts.map +1 -0
- package/dist/adapter/helpers/get-shader-layout.js +306 -0
- package/dist/adapter/helpers/get-shader-layout.js.map +1 -0
- package/dist/{webgl-utils → adapter/helpers}/parse-shader-compiler-log.d.ts +0 -0
- package/dist/adapter/helpers/parse-shader-compiler-log.d.ts.map +1 -0
- package/dist/{esm/webgl-utils → adapter/helpers}/parse-shader-compiler-log.js +0 -0
- package/dist/adapter/helpers/parse-shader-compiler-log.js.map +1 -0
- package/dist/adapter/helpers/set-uniform.d.ts +4 -0
- package/dist/adapter/helpers/set-uniform.d.ts.map +1 -0
- package/dist/adapter/helpers/set-uniform.js +115 -0
- package/dist/adapter/helpers/set-uniform.js.map +1 -0
- package/dist/adapter/helpers/uniforms.d.ts +26 -0
- package/dist/adapter/helpers/uniforms.d.ts.map +1 -0
- package/dist/adapter/helpers/uniforms.js +99 -0
- package/dist/adapter/helpers/uniforms.js.map +1 -0
- package/dist/adapter/objects/constants-to-keys.d.ts +5 -0
- package/dist/adapter/objects/constants-to-keys.d.ts.map +1 -0
- package/dist/{esm/webgl-utils → adapter/objects}/constants-to-keys.js +1 -0
- package/dist/adapter/objects/constants-to-keys.js.map +1 -0
- package/dist/adapter/objects/webgl-renderbuffer.d.ts +40 -0
- package/dist/adapter/objects/webgl-renderbuffer.d.ts.map +1 -0
- package/dist/{esm/classes/renderbuffer.js → adapter/objects/webgl-renderbuffer.js} +38 -72
- package/dist/adapter/objects/webgl-renderbuffer.js.map +1 -0
- package/dist/{classes → adapter/objects}/webgl-resource.d.ts +15 -14
- package/dist/adapter/objects/webgl-resource.d.ts.map +1 -0
- package/dist/{classes → adapter/objects}/webgl-resource.js +7 -3
- package/dist/adapter/objects/webgl-resource.js.map +1 -0
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts +27 -0
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts.map +1 -0
- package/dist/adapter/objects/webgl-vertex-array-object.js +84 -0
- package/dist/adapter/objects/webgl-vertex-array-object.js.map +1 -0
- package/dist/adapter/resources/webgl-buffer.d.ts +27 -0
- package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-buffer.js +164 -0
- package/dist/adapter/resources/webgl-buffer.js.map +1 -0
- package/dist/adapter/resources/webgl-command-buffer.d.ts +25 -0
- package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-command-buffer.js +65 -0
- package/dist/adapter/resources/webgl-command-buffer.js.map +1 -0
- package/dist/adapter/resources/webgl-command-encoder.d.ts +18 -0
- package/dist/adapter/resources/webgl-command-encoder.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-command-encoder.js +53 -0
- package/dist/adapter/resources/webgl-command-encoder.js.map +1 -0
- package/dist/adapter/resources/webgl-external-texture.d.ts +1 -0
- package/dist/adapter/resources/webgl-external-texture.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-external-texture.js +2 -0
- package/dist/{es5/helpers/program-bindings.js.map → adapter/resources/webgl-external-texture.js.map} +1 -1
- package/dist/adapter/resources/webgl-framebuffer.d.ts +40 -0
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-framebuffer.js +265 -0
- package/dist/adapter/resources/webgl-framebuffer.js.map +1 -0
- package/dist/adapter/resources/webgl-render-pass.d.ts +11 -0
- package/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-render-pass.js +19 -0
- package/dist/adapter/resources/webgl-render-pass.js.map +1 -0
- package/dist/adapter/resources/webgl-render-pipeline.d.ts +55 -0
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-render-pipeline.js +400 -0
- package/dist/adapter/resources/webgl-render-pipeline.js.map +1 -0
- package/dist/adapter/resources/webgl-sampler.d.ts +20 -0
- package/dist/adapter/resources/webgl-sampler.d.ts.map +1 -0
- package/dist/adapter/resources/webgl-sampler.js +50 -0
- package/dist/adapter/resources/webgl-sampler.js.map +1 -0
- package/dist/adapter/{webgl-shader.d.ts → resources/webgl-shader.d.ts} +3 -6
- package/dist/adapter/resources/webgl-shader.d.ts.map +1 -0
- package/dist/{esm/adapter → adapter/resources}/webgl-shader.js +13 -20
- package/dist/adapter/resources/webgl-shader.js.map +1 -0
- package/dist/adapter/resources/webgl-texture.d.ts +193 -0
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -0
- package/dist/{classes/texture.js → adapter/resources/webgl-texture.js} +274 -229
- package/dist/adapter/resources/webgl-texture.js.map +1 -0
- package/dist/adapter/webgl-canvas-context.d.ts +36 -0
- package/dist/adapter/webgl-canvas-context.d.ts.map +1 -0
- package/dist/adapter/webgl-canvas-context.js +54 -0
- package/dist/adapter/webgl-canvas-context.js.map +1 -0
- package/dist/adapter/webgl-device.d.ts +58 -76
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +184 -111
- package/dist/adapter/webgl-device.js.map +1 -1
- package/dist/classic/accessor.d.ts +32 -0
- package/dist/classic/accessor.d.ts.map +1 -0
- package/dist/{classes → classic}/accessor.js +33 -1
- package/dist/classic/accessor.js.map +1 -0
- package/dist/{classes/webgl-buffer.d.ts → classic/buffer.d.ts} +28 -33
- package/dist/classic/buffer.d.ts.map +1 -0
- package/dist/{esm/classes/webgl-buffer.js → classic/buffer.js} +53 -51
- package/dist/classic/buffer.js.map +1 -0
- package/dist/{webgl-utils → classic}/typed-array-utils.d.ts +3 -2
- package/dist/classic/typed-array-utils.d.ts.map +1 -0
- package/dist/{esm/webgl-utils → classic}/typed-array-utils.js +0 -0
- package/dist/classic/typed-array-utils.js.map +1 -0
- package/dist/context/context/context-state.d.ts.map +1 -1
- package/dist/context/context/context-state.js +1 -1
- package/dist/context/context/context-state.js.map +1 -1
- package/dist/context/context/create-context.d.ts +1 -0
- package/dist/context/context/create-context.d.ts.map +1 -1
- package/dist/context/context/create-context.js +12 -0
- package/dist/context/context/create-context.js.map +1 -1
- package/dist/context/context/device-pixels.d.ts +1 -1
- package/dist/context/context/device-pixels.d.ts.map +1 -1
- package/dist/context/context/device-pixels.js.map +1 -1
- package/dist/context/debug/spector.d.ts +18 -0
- package/dist/context/debug/spector.d.ts.map +1 -0
- package/dist/context/debug/spector.js +76 -0
- package/dist/context/debug/spector.js.map +1 -0
- package/dist/context/debug/webgl-developer-tools.d.ts +19 -0
- package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -0
- package/dist/context/debug/webgl-developer-tools.js +121 -0
- package/dist/context/debug/webgl-developer-tools.js.map +1 -0
- package/dist/context/parameters/unified-parameter-api.d.ts +3 -2
- package/dist/context/parameters/unified-parameter-api.d.ts.map +1 -1
- package/dist/context/parameters/unified-parameter-api.js +4 -4
- package/dist/context/parameters/unified-parameter-api.js.map +1 -1
- package/dist/context/parameters/webgl-parameter-tables.d.ts +40 -36
- package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
- package/dist/context/parameters/webgl-parameter-tables.js.map +1 -1
- package/dist/context/polyfill/get-parameter-polyfill.js.map +1 -1
- package/dist/context/polyfill/polyfill-context.js +4 -3
- package/dist/context/polyfill/polyfill-context.js.map +1 -1
- package/dist/context/state-tracker/deep-array-equal.d.ts.map +1 -1
- package/dist/context/state-tracker/deep-array-equal.js.map +1 -1
- package/dist/context/state-tracker/track-context-state.d.ts.map +1 -1
- package/dist/context/state-tracker/track-context-state.js +25 -11
- package/dist/context/state-tracker/track-context-state.js.map +1 -1
- package/dist/es5/adapter/converters/{set-device-parameters.js → device-parameters.js} +37 -5
- package/dist/es5/adapter/converters/device-parameters.js.map +1 -0
- package/dist/es5/{classes → adapter/converters}/renderbuffer-formats.js +1 -1
- package/dist/es5/adapter/converters/renderbuffer-formats.js.map +1 -0
- package/dist/es5/adapter/converters/sampler-parameters.js +226 -0
- package/dist/es5/adapter/converters/sampler-parameters.js.map +1 -0
- package/dist/es5/adapter/converters/texture-formats.js +1031 -0
- package/dist/es5/adapter/converters/texture-formats.js.map +1 -0
- package/dist/es5/adapter/converters/vertex-formats.js +45 -0
- package/dist/es5/adapter/converters/vertex-formats.js.map +1 -0
- package/dist/es5/adapter/device-helpers/device-features.js +46 -54
- package/dist/es5/adapter/device-helpers/device-features.js.map +1 -1
- package/dist/es5/adapter/device-helpers/device-limits.js +1 -1
- package/dist/es5/adapter/device-helpers/device-limits.js.map +1 -1
- package/dist/es5/adapter/device-helpers/get-device-info.js +7 -7
- package/dist/es5/adapter/device-helpers/get-device-info.js.map +1 -1
- package/dist/es5/adapter/helpers/attribute-utils.js +91 -0
- package/dist/es5/adapter/helpers/attribute-utils.js.map +1 -0
- package/dist/es5/{helpers/get-program-bindings.js → adapter/helpers/get-shader-layout.js} +184 -87
- package/dist/es5/adapter/helpers/get-shader-layout.js.map +1 -0
- package/dist/es5/{webgl-utils → adapter/helpers}/parse-shader-compiler-log.js +0 -0
- package/dist/es5/adapter/helpers/parse-shader-compiler-log.js.map +1 -0
- package/dist/es5/adapter/helpers/set-uniform.js +125 -0
- package/dist/es5/adapter/helpers/set-uniform.js.map +1 -0
- package/dist/es5/adapter/helpers/uniforms.js +112 -0
- package/dist/es5/adapter/helpers/uniforms.js.map +1 -0
- package/dist/es5/{webgl-utils → adapter/objects}/constants-to-keys.js +1 -0
- package/dist/es5/adapter/objects/constants-to-keys.js.map +1 -0
- package/dist/es5/{classes/renderbuffer.js → adapter/objects/webgl-renderbuffer.js} +48 -98
- package/dist/es5/adapter/objects/webgl-renderbuffer.js.map +1 -0
- package/dist/es5/{classes → adapter/objects}/webgl-resource.js +8 -3
- package/dist/es5/adapter/objects/webgl-resource.js.map +1 -0
- package/dist/es5/adapter/objects/webgl-vertex-array-object.js +137 -0
- package/dist/es5/adapter/objects/webgl-vertex-array-object.js.map +1 -0
- package/dist/es5/adapter/resources/webgl-buffer.js +243 -0
- package/dist/es5/adapter/resources/webgl-buffer.js.map +1 -0
- package/dist/es5/adapter/resources/webgl-command-buffer.js +96 -0
- package/dist/es5/adapter/resources/webgl-command-buffer.js.map +1 -0
- package/dist/es5/adapter/resources/webgl-command-encoder.js +98 -0
- package/dist/es5/adapter/resources/webgl-command-encoder.js.map +1 -0
- package/dist/es5/adapter/resources/webgl-external-texture.js +2 -0
- package/dist/{esm/helpers/program-bindings.js.map → es5/adapter/resources/webgl-external-texture.js.map} +1 -1
- package/dist/es5/adapter/resources/webgl-framebuffer.js +345 -0
- package/dist/es5/adapter/resources/webgl-framebuffer.js.map +1 -0
- package/dist/es5/{classes/texture-2d.js → adapter/resources/webgl-render-pass.js} +25 -45
- package/dist/es5/adapter/resources/webgl-render-pass.js.map +1 -0
- package/dist/es5/adapter/resources/webgl-render-pipeline.js +505 -0
- package/dist/es5/adapter/resources/webgl-render-pipeline.js.map +1 -0
- package/dist/es5/adapter/resources/webgl-sampler.js +96 -0
- package/dist/es5/adapter/resources/webgl-sampler.js.map +1 -0
- package/dist/es5/adapter/{webgl-shader.js → resources/webgl-shader.js} +12 -18
- package/dist/es5/adapter/resources/webgl-shader.js.map +1 -0
- package/dist/es5/{classes/texture.js → adapter/resources/webgl-texture.js} +336 -260
- package/dist/es5/adapter/resources/webgl-texture.js.map +1 -0
- package/dist/es5/adapter/webgl-canvas-context.js +97 -0
- package/dist/es5/adapter/webgl-canvas-context.js.map +1 -0
- package/dist/es5/adapter/webgl-device.js +253 -133
- package/dist/es5/adapter/webgl-device.js.map +1 -1
- package/dist/es5/{classes → classic}/accessor.js +25 -1
- package/dist/es5/classic/accessor.js.map +1 -0
- package/dist/es5/{classes/webgl-buffer.js → classic/buffer.js} +74 -66
- package/dist/es5/classic/buffer.js.map +1 -0
- package/dist/es5/{webgl-utils → classic}/typed-array-utils.js +0 -0
- package/dist/es5/classic/typed-array-utils.js.map +1 -0
- package/dist/es5/context/context/context-state.js +1 -1
- package/dist/es5/context/context/context-state.js.map +1 -1
- package/dist/es5/context/context/create-context.js +12 -0
- package/dist/es5/context/context/create-context.js.map +1 -1
- package/dist/es5/context/context/device-pixels.js.map +1 -1
- package/dist/es5/context/debug/spector.js +133 -0
- package/dist/es5/context/debug/spector.js.map +1 -0
- package/dist/es5/context/debug/webgl-developer-tools.js +198 -0
- package/dist/es5/context/debug/webgl-developer-tools.js.map +1 -0
- package/dist/es5/context/parameters/unified-parameter-api.js +7 -5
- package/dist/es5/context/parameters/unified-parameter-api.js.map +1 -1
- package/dist/es5/context/parameters/webgl-parameter-tables.js.map +1 -1
- package/dist/es5/context/polyfill/get-parameter-polyfill.js.map +1 -1
- package/dist/es5/context/polyfill/polyfill-context.js +4 -3
- package/dist/es5/context/polyfill/polyfill-context.js.map +1 -1
- package/dist/es5/context/state-tracker/deep-array-equal.js.map +1 -1
- package/dist/es5/context/state-tracker/track-context-state.js +26 -11
- package/dist/es5/context/state-tracker/track-context-state.js.map +1 -1
- package/dist/es5/index.js +65 -307
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/init.js +1 -41
- package/dist/es5/init.js.map +1 -1
- package/dist/es5/{context/parameters/webgl-parameters.js → types/webgl.js} +1 -1
- package/dist/es5/types/webgl.js.map +1 -0
- package/dist/esm/adapter/converters/{set-device-parameters.js → device-parameters.js} +36 -5
- package/dist/esm/adapter/converters/device-parameters.js.map +1 -0
- package/dist/esm/{classes → adapter/converters}/renderbuffer-formats.js +1 -1
- package/dist/esm/adapter/converters/renderbuffer-formats.js.map +1 -0
- package/dist/esm/adapter/converters/sampler-parameters.js +208 -0
- package/dist/esm/adapter/converters/sampler-parameters.js.map +1 -0
- package/dist/esm/adapter/converters/texture-formats.js +954 -0
- package/dist/esm/adapter/converters/texture-formats.js.map +1 -0
- package/dist/esm/adapter/converters/vertex-formats.js +35 -0
- package/dist/esm/adapter/converters/vertex-formats.js.map +1 -0
- package/dist/esm/adapter/device-helpers/device-features.js +27 -48
- package/dist/esm/adapter/device-helpers/device-features.js.map +1 -1
- package/dist/esm/adapter/device-helpers/device-limits.js +1 -0
- package/dist/esm/adapter/device-helpers/device-limits.js.map +1 -1
- package/dist/esm/adapter/device-helpers/get-device-info.js +7 -7
- package/dist/esm/adapter/device-helpers/get-device-info.js.map +1 -1
- package/dist/esm/adapter/helpers/attribute-utils.js +81 -0
- package/dist/esm/adapter/helpers/attribute-utils.js.map +1 -0
- package/dist/esm/adapter/helpers/get-shader-layout.js +306 -0
- package/dist/esm/adapter/helpers/get-shader-layout.js.map +1 -0
- package/dist/{webgl-utils → esm/adapter/helpers}/parse-shader-compiler-log.js +0 -0
- package/dist/esm/adapter/helpers/parse-shader-compiler-log.js.map +1 -0
- package/dist/esm/adapter/helpers/set-uniform.js +115 -0
- package/dist/esm/adapter/helpers/set-uniform.js.map +1 -0
- package/dist/esm/adapter/helpers/uniforms.js +99 -0
- package/dist/esm/adapter/helpers/uniforms.js.map +1 -0
- package/dist/{webgl-utils → esm/adapter/objects}/constants-to-keys.js +1 -0
- package/dist/esm/adapter/objects/constants-to-keys.js.map +1 -0
- package/dist/{classes/renderbuffer.js → esm/adapter/objects/webgl-renderbuffer.js} +38 -72
- package/dist/esm/adapter/objects/webgl-renderbuffer.js.map +1 -0
- package/dist/esm/{classes → adapter/objects}/webgl-resource.js +7 -3
- package/dist/esm/adapter/objects/webgl-resource.js.map +1 -0
- package/dist/esm/adapter/objects/webgl-vertex-array-object.js +84 -0
- package/dist/esm/adapter/objects/webgl-vertex-array-object.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-buffer.js +164 -0
- package/dist/esm/adapter/resources/webgl-buffer.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-command-buffer.js +65 -0
- package/dist/esm/adapter/resources/webgl-command-buffer.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-command-encoder.js +53 -0
- package/dist/esm/adapter/resources/webgl-command-encoder.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-external-texture.js +2 -0
- package/dist/{helpers/program-bindings.js.map → esm/adapter/resources/webgl-external-texture.js.map} +1 -1
- package/dist/esm/adapter/resources/webgl-framebuffer.js +265 -0
- package/dist/esm/adapter/resources/webgl-framebuffer.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-render-pass.js +19 -0
- package/dist/esm/adapter/resources/webgl-render-pass.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-render-pipeline.js +400 -0
- package/dist/esm/adapter/resources/webgl-render-pipeline.js.map +1 -0
- package/dist/esm/adapter/resources/webgl-sampler.js +50 -0
- package/dist/esm/adapter/resources/webgl-sampler.js.map +1 -0
- package/dist/{adapter → esm/adapter/resources}/webgl-shader.js +13 -20
- package/dist/esm/adapter/resources/webgl-shader.js.map +1 -0
- package/dist/esm/{classes/texture.js → adapter/resources/webgl-texture.js} +274 -229
- package/dist/esm/adapter/resources/webgl-texture.js.map +1 -0
- package/dist/esm/adapter/webgl-canvas-context.js +54 -0
- package/dist/esm/adapter/webgl-canvas-context.js.map +1 -0
- package/dist/esm/adapter/webgl-device.js +184 -111
- package/dist/esm/adapter/webgl-device.js.map +1 -1
- package/dist/esm/{classes → classic}/accessor.js +33 -1
- package/dist/esm/classic/accessor.js.map +1 -0
- package/dist/{classes/webgl-buffer.js → esm/classic/buffer.js} +53 -51
- package/dist/esm/classic/buffer.js.map +1 -0
- package/dist/{webgl-utils → esm/classic}/typed-array-utils.js +0 -0
- package/dist/esm/classic/typed-array-utils.js.map +1 -0
- package/dist/esm/context/context/context-state.js +1 -1
- package/dist/esm/context/context/context-state.js.map +1 -1
- package/dist/esm/context/context/create-context.js +12 -0
- package/dist/esm/context/context/create-context.js.map +1 -1
- package/dist/esm/context/context/device-pixels.js.map +1 -1
- package/dist/esm/context/debug/spector.js +76 -0
- package/dist/esm/context/debug/spector.js.map +1 -0
- package/dist/esm/context/debug/webgl-developer-tools.js +121 -0
- package/dist/esm/context/debug/webgl-developer-tools.js.map +1 -0
- package/dist/esm/context/parameters/unified-parameter-api.js +4 -4
- package/dist/esm/context/parameters/unified-parameter-api.js.map +1 -1
- package/dist/esm/context/parameters/webgl-parameter-tables.js.map +1 -1
- package/dist/esm/context/polyfill/get-parameter-polyfill.js.map +1 -1
- package/dist/esm/context/polyfill/polyfill-context.js +4 -3
- package/dist/esm/context/polyfill/polyfill-context.js.map +1 -1
- package/dist/esm/context/state-tracker/deep-array-equal.js.map +1 -1
- package/dist/esm/context/state-tracker/track-context-state.js +25 -11
- package/dist/esm/context/state-tracker/track-context-state.js.map +1 -1
- package/dist/esm/index.js +19 -31
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/init.js +2 -31
- package/dist/esm/init.js.map +1 -1
- package/dist/esm/types/webgl.js +2 -0
- package/dist/esm/types/webgl.js.map +1 -0
- package/dist/index.d.ts +22 -46
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -31
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +1 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +2 -31
- package/dist/init.js.map +1 -1
- package/dist/types/webgl.d.ts +144 -0
- package/dist/types/webgl.d.ts.map +1 -0
- package/dist/types/webgl.js +2 -0
- package/dist/types/webgl.js.map +1 -0
- package/package.json +5 -5
- package/src/adapter/converters/{set-device-parameters.ts → device-parameters.ts} +52 -9
- package/src/{classes → adapter/converters}/renderbuffer-formats.ts +1 -1
- package/src/adapter/converters/sampler-parameters.ts +175 -0
- package/src/adapter/converters/texture-formats.ts +633 -0
- package/src/adapter/converters/vertex-formats.ts +22 -0
- package/src/adapter/device-helpers/device-features.ts +46 -123
- package/src/adapter/device-helpers/device-limits.ts +5 -2
- package/src/adapter/device-helpers/get-device-info.ts +8 -8
- package/src/adapter/helpers/attribute-utils.ts +61 -0
- package/src/adapter/helpers/get-shader-layout.ts +388 -0
- package/src/{webgl-utils → adapter/helpers}/parse-shader-compiler-log.ts +0 -0
- package/src/adapter/helpers/set-uniform.ts +87 -0
- package/src/adapter/helpers/uniforms.ts +110 -0
- package/src/{webgl-utils → adapter/objects}/constants-to-keys.ts +6 -3
- package/src/adapter/objects/webgl-renderbuffer.ts +104 -0
- package/src/{classes → adapter/objects}/webgl-resource.ts +23 -17
- package/src/adapter/objects/webgl-vertex-array-object.ts +111 -0
- package/src/adapter/resources/webgl-buffer.ts +219 -0
- package/src/adapter/resources/webgl-command-buffer.ts +94 -0
- package/src/adapter/resources/webgl-command-encoder.ts +58 -0
- package/src/adapter/resources/webgl-external-texture.ts +92 -0
- package/src/adapter/resources/webgl-framebuffer.ts +279 -0
- package/src/adapter/resources/webgl-render-pass.ts +23 -0
- package/src/adapter/resources/webgl-render-pipeline.ts +413 -0
- package/src/adapter/resources/webgl-sampler.ts +54 -0
- package/src/adapter/{webgl-shader.ts → resources/webgl-shader.ts} +14 -20
- package/src/adapter/resources/webgl-texture.ts +1023 -0
- package/src/adapter/webgl-canvas-context.ts +74 -0
- package/src/adapter/webgl-device.ts +226 -275
- package/{dist/esm/classes/accessor.ts.disabled → src/classic/accessor.ts} +50 -36
- package/src/{classes/webgl-buffer.ts → classic/buffer.ts} +69 -77
- package/src/{webgl-utils → classic}/typed-array-utils.ts +3 -1
- package/src/context/context/context-state.ts +4 -2
- package/src/context/context/create-context.ts +28 -1
- package/src/context/context/device-pixels.ts +9 -4
- package/src/context/debug/spector.ts +92 -0
- package/src/context/debug/webgl-developer-tools.ts +162 -0
- package/src/context/parameters/unified-parameter-api.ts +6 -4
- package/src/context/parameters/webgl-parameter-tables.ts +38 -36
- package/src/context/polyfill/get-parameter-polyfill.ts +1 -1
- package/src/context/polyfill/polyfill-context.ts +4 -3
- package/src/context/state-tracker/deep-array-equal.ts +1 -1
- package/src/context/state-tracker/track-context-state.ts +27 -20
- package/src/index.ts +33 -102
- package/src/init.ts +2 -46
- package/src/types/webgl.ts +283 -0
- package/dist/_deprecated/context-api.d.ts +0 -85
- package/dist/_deprecated/context-api.d.ts.map +0 -1
- package/dist/_deprecated/context-api.js +0 -76
- package/dist/_deprecated/context-api.js.map +0 -1
- package/dist/_deprecated/features.d.ts +0 -27
- package/dist/_deprecated/features.d.ts.map +0 -1
- package/dist/_deprecated/features.js +0 -111
- package/dist/_deprecated/features.js.map +0 -1
- package/dist/adapter/converters/set-device-parameters.d.ts +0 -5
- package/dist/adapter/converters/set-device-parameters.d.ts.map +0 -1
- package/dist/adapter/converters/set-device-parameters.js.map +0 -1
- package/dist/adapter/converters/webgpu-texture-formats.d.ts +0 -281
- package/dist/adapter/converters/webgpu-texture-formats.d.ts.map +0 -1
- package/dist/adapter/converters/webgpu-texture-formats.js +0 -285
- package/dist/adapter/converters/webgpu-texture-formats.js.map +0 -1
- package/dist/adapter/webgl-shader.d.ts.map +0 -1
- package/dist/adapter/webgl-shader.js.map +0 -1
- package/dist/classes/accessor.d.ts +0 -28
- package/dist/classes/accessor.d.ts.map +0 -1
- package/dist/classes/accessor.js.map +0 -1
- package/dist/classes/accessor.ts.disabled +0 -159
- package/dist/classes/clear.d.ts +0 -17
- package/dist/classes/clear.d.ts.map +0 -1
- package/dist/classes/clear.js +0 -105
- package/dist/classes/clear.js.map +0 -1
- package/dist/classes/copy-and-blit.d.ts +0 -86
- package/dist/classes/copy-and-blit.d.ts.map +0 -1
- package/dist/classes/copy-and-blit.js +0 -338
- package/dist/classes/copy-and-blit.js.map +0 -1
- package/dist/classes/framebuffer.d.ts +0 -139
- package/dist/classes/framebuffer.d.ts.map +0 -1
- package/dist/classes/framebuffer.js +0 -656
- package/dist/classes/framebuffer.js.map +0 -1
- package/dist/classes/program-configuration.d.ts +0 -24
- package/dist/classes/program-configuration.d.ts.map +0 -1
- package/dist/classes/program-configuration.js +0 -73
- package/dist/classes/program-configuration.js.map +0 -1
- package/dist/classes/program.d.ts +0 -66
- package/dist/classes/program.d.ts.map +0 -1
- package/dist/classes/program.js +0 -379
- package/dist/classes/program.js.map +0 -1
- package/dist/classes/query.d.ts +0 -27
- package/dist/classes/query.d.ts.map +0 -1
- package/dist/classes/query.js +0 -145
- package/dist/classes/query.js.map +0 -1
- package/dist/classes/renderbuffer-formats.d.ts.map +0 -1
- package/dist/classes/renderbuffer-formats.js.map +0 -1
- package/dist/classes/renderbuffer.d.ts +0 -60
- package/dist/classes/renderbuffer.d.ts.map +0 -1
- package/dist/classes/renderbuffer.js.map +0 -1
- package/dist/classes/shader.d.ts +0 -42
- package/dist/classes/shader.d.ts.map +0 -1
- package/dist/classes/shader.js +0 -118
- package/dist/classes/shader.js.map +0 -1
- package/dist/classes/texture-2d.d.ts +0 -9
- package/dist/classes/texture-2d.d.ts.map +0 -1
- package/dist/classes/texture-2d.js +0 -36
- package/dist/classes/texture-2d.js.map +0 -1
- package/dist/classes/texture-3d.d.ts +0 -29
- package/dist/classes/texture-3d.d.ts.map +0 -1
- package/dist/classes/texture-3d.js +0 -76
- package/dist/classes/texture-3d.js.map +0 -1
- package/dist/classes/texture-cube.d.ts +0 -28
- package/dist/classes/texture-cube.d.ts.map +0 -1
- package/dist/classes/texture-cube.js +0 -130
- package/dist/classes/texture-cube.js.map +0 -1
- package/dist/classes/texture-formats.d.ts +0 -37
- package/dist/classes/texture-formats.d.ts.map +0 -1
- package/dist/classes/texture-formats.js +0 -98
- package/dist/classes/texture-formats.js.map +0 -1
- package/dist/classes/texture.d.ts +0 -123
- package/dist/classes/texture.d.ts.map +0 -1
- package/dist/classes/texture.js.map +0 -1
- package/dist/classes/transform-feedback.d.ts +0 -33
- package/dist/classes/transform-feedback.d.ts.map +0 -1
- package/dist/classes/transform-feedback.js +0 -198
- package/dist/classes/transform-feedback.js.map +0 -1
- package/dist/classes/uniform-buffer-layout.d.ts +0 -17
- package/dist/classes/uniform-buffer-layout.d.ts.map +0 -1
- package/dist/classes/uniform-buffer-layout.js +0 -104
- package/dist/classes/uniform-buffer-layout.js.map +0 -1
- package/dist/classes/uniforms.d.ts +0 -37
- package/dist/classes/uniforms.d.ts.map +0 -1
- package/dist/classes/uniforms.js +0 -250
- package/dist/classes/uniforms.js.map +0 -1
- package/dist/classes/vertex-array-object.d.ts +0 -76
- package/dist/classes/vertex-array-object.d.ts.map +0 -1
- package/dist/classes/vertex-array-object.js +0 -261
- package/dist/classes/vertex-array-object.js.map +0 -1
- package/dist/classes/vertex-array.d.ts +0 -75
- package/dist/classes/vertex-array.d.ts.map +0 -1
- package/dist/classes/vertex-array.js +0 -408
- package/dist/classes/vertex-array.js.map +0 -1
- package/dist/classes/webgl-buffer.d.ts.map +0 -1
- package/dist/classes/webgl-buffer.js.map +0 -1
- package/dist/classes/webgl-resource.d.ts.map +0 -1
- package/dist/classes/webgl-resource.js.map +0 -1
- package/dist/context/context/get-canvas.d.ts +0 -13
- package/dist/context/context/get-canvas.d.ts.map +0 -1
- package/dist/context/context/get-canvas.js +0 -31
- package/dist/context/context/get-canvas.js.map +0 -1
- package/dist/context/context/resize-context.d.ts +0 -20
- package/dist/context/context/resize-context.d.ts.map +0 -1
- package/dist/context/context/resize-context.js +0 -15
- package/dist/context/context/resize-context.js.map +0 -1
- package/dist/context/parameters/webgl-parameters.d.ts +0 -144
- package/dist/context/parameters/webgl-parameters.d.ts.map +0 -1
- package/dist/context/parameters/webgl-parameters.js +0 -2
- package/dist/context/parameters/webgl-parameters.js.map +0 -1
- package/dist/debug/debug-program-configuration.d.ts +0 -2
- package/dist/debug/debug-program-configuration.d.ts.map +0 -1
- package/dist/debug/debug-program-configuration.js +0 -40
- package/dist/debug/debug-program-configuration.js.map +0 -1
- package/dist/debug/debug-uniforms.d.ts +0 -12
- package/dist/debug/debug-uniforms.d.ts.map +0 -1
- package/dist/debug/debug-uniforms.js +0 -108
- package/dist/debug/debug-uniforms.js.map +0 -1
- package/dist/debug/debug-vertex-array.d.ts +0 -5
- package/dist/debug/debug-vertex-array.d.ts.map +0 -1
- package/dist/debug/debug-vertex-array.js +0 -118
- package/dist/debug/debug-vertex-array.js.map +0 -1
- package/dist/es5/_deprecated/context-api.js +0 -116
- package/dist/es5/_deprecated/context-api.js.map +0 -1
- package/dist/es5/_deprecated/features.js +0 -118
- package/dist/es5/_deprecated/features.js.map +0 -1
- package/dist/es5/adapter/converters/set-device-parameters.js.map +0 -1
- package/dist/es5/adapter/converters/webgpu-texture-formats.js +0 -296
- package/dist/es5/adapter/converters/webgpu-texture-formats.js.map +0 -1
- package/dist/es5/adapter/webgl-shader.js.map +0 -1
- package/dist/es5/classes/accessor.d.ts +0 -28
- package/dist/es5/classes/accessor.js.map +0 -1
- package/dist/es5/classes/accessor.ts.disabled +0 -159
- package/dist/es5/classes/clear.js +0 -135
- package/dist/es5/classes/clear.js.map +0 -1
- package/dist/es5/classes/copy-and-blit.js +0 -382
- package/dist/es5/classes/copy-and-blit.js.map +0 -1
- package/dist/es5/classes/framebuffer.js +0 -807
- package/dist/es5/classes/framebuffer.js.map +0 -1
- package/dist/es5/classes/program-configuration.js +0 -119
- package/dist/es5/classes/program-configuration.js.map +0 -1
- package/dist/es5/classes/program.js +0 -471
- package/dist/es5/classes/program.js.map +0 -1
- package/dist/es5/classes/query.js +0 -222
- package/dist/es5/classes/query.js.map +0 -1
- package/dist/es5/classes/renderbuffer-formats.js.map +0 -1
- package/dist/es5/classes/renderbuffer.js.map +0 -1
- package/dist/es5/classes/shader.js +0 -195
- package/dist/es5/classes/shader.js.map +0 -1
- package/dist/es5/classes/texture-2d.js.map +0 -1
- package/dist/es5/classes/texture-3d.js +0 -142
- package/dist/es5/classes/texture-3d.js.map +0 -1
- package/dist/es5/classes/texture-cube.js +0 -202
- package/dist/es5/classes/texture-cube.js.map +0 -1
- package/dist/es5/classes/texture-formats.js +0 -87
- package/dist/es5/classes/texture-formats.js.map +0 -1
- package/dist/es5/classes/texture.js.map +0 -1
- package/dist/es5/classes/transform-feedback.js +0 -267
- package/dist/es5/classes/transform-feedback.js.map +0 -1
- package/dist/es5/classes/uniform-buffer-layout.js +0 -130
- package/dist/es5/classes/uniform-buffer-layout.js.map +0 -1
- package/dist/es5/classes/uniforms.js +0 -232
- package/dist/es5/classes/uniforms.js.map +0 -1
- package/dist/es5/classes/vertex-array-object.js +0 -337
- package/dist/es5/classes/vertex-array-object.js.map +0 -1
- package/dist/es5/classes/vertex-array.js +0 -465
- package/dist/es5/classes/vertex-array.js.map +0 -1
- package/dist/es5/classes/webgl-buffer.js.map +0 -1
- package/dist/es5/classes/webgl-resource.js.map +0 -1
- package/dist/es5/context/context/get-canvas.js +0 -40
- package/dist/es5/context/context/get-canvas.js.map +0 -1
- package/dist/es5/context/context/resize-context.js +0 -23
- package/dist/es5/context/context/resize-context.js.map +0 -1
- package/dist/es5/context/parameters/webgl-parameters.js.map +0 -1
- package/dist/es5/debug/debug-program-configuration.js +0 -76
- package/dist/es5/debug/debug-program-configuration.js.map +0 -1
- package/dist/es5/debug/debug-uniforms.js +0 -156
- package/dist/es5/debug/debug-uniforms.js.map +0 -1
- package/dist/es5/debug/debug-vertex-array.js +0 -126
- package/dist/es5/debug/debug-vertex-array.js.map +0 -1
- package/dist/es5/helpers/get-program-bindings.js.map +0 -1
- package/dist/es5/helpers/program-bindings.js +0 -2
- package/dist/es5/types/accessor.d.ts +0 -29
- package/dist/es5/webgl-utils/attribute-utils.js +0 -186
- package/dist/es5/webgl-utils/attribute-utils.js.map +0 -1
- package/dist/es5/webgl-utils/constants-to-keys.js.map +0 -1
- package/dist/es5/webgl-utils/format-utils.js +0 -58
- package/dist/es5/webgl-utils/format-utils.js.map +0 -1
- package/dist/es5/webgl-utils/get-error.js +0 -49
- package/dist/es5/webgl-utils/get-error.js.map +0 -1
- package/dist/es5/webgl-utils/index.js +0 -74
- package/dist/es5/webgl-utils/index.js.map +0 -1
- package/dist/es5/webgl-utils/parse-shader-compiler-log.js.map +0 -1
- package/dist/es5/webgl-utils/request-animation-frame.js +0 -16
- package/dist/es5/webgl-utils/request-animation-frame.js.map +0 -1
- package/dist/es5/webgl-utils/texture-utils.js +0 -61
- package/dist/es5/webgl-utils/texture-utils.js.map +0 -1
- package/dist/es5/webgl-utils/typed-array-utils.js.map +0 -1
- package/dist/esm/_deprecated/context-api.js +0 -76
- package/dist/esm/_deprecated/context-api.js.map +0 -1
- package/dist/esm/_deprecated/features.js +0 -111
- package/dist/esm/_deprecated/features.js.map +0 -1
- package/dist/esm/adapter/converters/set-device-parameters.js.map +0 -1
- package/dist/esm/adapter/converters/webgpu-texture-formats.js +0 -285
- package/dist/esm/adapter/converters/webgpu-texture-formats.js.map +0 -1
- package/dist/esm/adapter/webgl-shader.js.map +0 -1
- package/dist/esm/classes/accessor.d.ts +0 -28
- package/dist/esm/classes/accessor.js.map +0 -1
- package/dist/esm/classes/clear.js +0 -105
- package/dist/esm/classes/clear.js.map +0 -1
- package/dist/esm/classes/copy-and-blit.js +0 -338
- package/dist/esm/classes/copy-and-blit.js.map +0 -1
- package/dist/esm/classes/framebuffer.js +0 -656
- package/dist/esm/classes/framebuffer.js.map +0 -1
- package/dist/esm/classes/program-configuration.js +0 -73
- package/dist/esm/classes/program-configuration.js.map +0 -1
- package/dist/esm/classes/program.js +0 -379
- package/dist/esm/classes/program.js.map +0 -1
- package/dist/esm/classes/query.js +0 -145
- package/dist/esm/classes/query.js.map +0 -1
- package/dist/esm/classes/renderbuffer-formats.js.map +0 -1
- package/dist/esm/classes/renderbuffer.js.map +0 -1
- package/dist/esm/classes/shader.js +0 -118
- package/dist/esm/classes/shader.js.map +0 -1
- package/dist/esm/classes/texture-2d.js +0 -36
- package/dist/esm/classes/texture-2d.js.map +0 -1
- package/dist/esm/classes/texture-3d.js +0 -76
- package/dist/esm/classes/texture-3d.js.map +0 -1
- package/dist/esm/classes/texture-cube.js +0 -130
- package/dist/esm/classes/texture-cube.js.map +0 -1
- package/dist/esm/classes/texture-formats.js +0 -98
- package/dist/esm/classes/texture-formats.js.map +0 -1
- package/dist/esm/classes/texture.js.map +0 -1
- package/dist/esm/classes/transform-feedback.js +0 -198
- package/dist/esm/classes/transform-feedback.js.map +0 -1
- package/dist/esm/classes/uniform-buffer-layout.js +0 -104
- package/dist/esm/classes/uniform-buffer-layout.js.map +0 -1
- package/dist/esm/classes/uniforms.js +0 -250
- package/dist/esm/classes/uniforms.js.map +0 -1
- package/dist/esm/classes/vertex-array-object.js +0 -261
- package/dist/esm/classes/vertex-array-object.js.map +0 -1
- package/dist/esm/classes/vertex-array.js +0 -408
- package/dist/esm/classes/vertex-array.js.map +0 -1
- package/dist/esm/classes/webgl-buffer.js.map +0 -1
- package/dist/esm/classes/webgl-resource.js.map +0 -1
- package/dist/esm/context/context/get-canvas.js +0 -31
- package/dist/esm/context/context/get-canvas.js.map +0 -1
- package/dist/esm/context/context/resize-context.js +0 -15
- package/dist/esm/context/context/resize-context.js.map +0 -1
- package/dist/esm/context/parameters/webgl-parameters.js +0 -2
- package/dist/esm/context/parameters/webgl-parameters.js.map +0 -1
- package/dist/esm/debug/debug-program-configuration.js +0 -40
- package/dist/esm/debug/debug-program-configuration.js.map +0 -1
- package/dist/esm/debug/debug-uniforms.js +0 -108
- package/dist/esm/debug/debug-uniforms.js.map +0 -1
- package/dist/esm/debug/debug-vertex-array.js +0 -118
- package/dist/esm/debug/debug-vertex-array.js.map +0 -1
- package/dist/esm/helpers/get-program-bindings.js +0 -228
- package/dist/esm/helpers/get-program-bindings.js.map +0 -1
- package/dist/esm/helpers/program-bindings.js +0 -2
- package/dist/esm/types/accessor.d.ts +0 -29
- package/dist/esm/webgl-utils/attribute-utils.js +0 -182
- package/dist/esm/webgl-utils/attribute-utils.js.map +0 -1
- package/dist/esm/webgl-utils/constants-to-keys.js.map +0 -1
- package/dist/esm/webgl-utils/format-utils.js +0 -45
- package/dist/esm/webgl-utils/format-utils.js.map +0 -1
- package/dist/esm/webgl-utils/get-error.js +0 -41
- package/dist/esm/webgl-utils/get-error.js.map +0 -1
- package/dist/esm/webgl-utils/index.js +0 -5
- package/dist/esm/webgl-utils/index.js.map +0 -1
- package/dist/esm/webgl-utils/parse-shader-compiler-log.js.map +0 -1
- package/dist/esm/webgl-utils/request-animation-frame.js +0 -7
- package/dist/esm/webgl-utils/request-animation-frame.js.map +0 -1
- package/dist/esm/webgl-utils/texture-utils.js +0 -48
- package/dist/esm/webgl-utils/texture-utils.js.map +0 -1
- package/dist/esm/webgl-utils/typed-array-utils.js.map +0 -1
- package/dist/helpers/get-program-bindings.d.ts +0 -8
- package/dist/helpers/get-program-bindings.d.ts.map +0 -1
- package/dist/helpers/get-program-bindings.js +0 -228
- package/dist/helpers/get-program-bindings.js.map +0 -1
- package/dist/helpers/program-bindings.d.ts +0 -41
- package/dist/helpers/program-bindings.d.ts.map +0 -1
- package/dist/helpers/program-bindings.js +0 -2
- package/dist/types/accessor.d.ts +0 -29
- package/dist/webgl-utils/attribute-utils.d.ts +0 -18
- package/dist/webgl-utils/attribute-utils.d.ts.map +0 -1
- package/dist/webgl-utils/attribute-utils.js +0 -182
- package/dist/webgl-utils/attribute-utils.js.map +0 -1
- package/dist/webgl-utils/constants-to-keys.d.ts +0 -4
- package/dist/webgl-utils/constants-to-keys.d.ts.map +0 -1
- package/dist/webgl-utils/constants-to-keys.js.map +0 -1
- package/dist/webgl-utils/format-utils.d.ts +0 -3
- package/dist/webgl-utils/format-utils.d.ts.map +0 -1
- package/dist/webgl-utils/format-utils.js +0 -45
- package/dist/webgl-utils/format-utils.js.map +0 -1
- package/dist/webgl-utils/get-error.d.ts +0 -3
- package/dist/webgl-utils/get-error.d.ts.map +0 -1
- package/dist/webgl-utils/get-error.js +0 -41
- package/dist/webgl-utils/get-error.js.map +0 -1
- package/dist/webgl-utils/index.d.ts +0 -5
- package/dist/webgl-utils/index.d.ts.map +0 -1
- package/dist/webgl-utils/index.js +0 -5
- package/dist/webgl-utils/index.js.map +0 -1
- package/dist/webgl-utils/parse-shader-compiler-log.d.ts.map +0 -1
- package/dist/webgl-utils/parse-shader-compiler-log.js.map +0 -1
- package/dist/webgl-utils/request-animation-frame.d.ts +0 -4
- package/dist/webgl-utils/request-animation-frame.d.ts.map +0 -1
- package/dist/webgl-utils/request-animation-frame.js +0 -7
- package/dist/webgl-utils/request-animation-frame.js.map +0 -1
- package/dist/webgl-utils/texture-utils.d.ts +0 -15
- package/dist/webgl-utils/texture-utils.d.ts.map +0 -1
- package/dist/webgl-utils/texture-utils.js +0 -48
- package/dist/webgl-utils/texture-utils.js.map +0 -1
- package/dist/webgl-utils/typed-array-utils.d.ts.map +0 -1
- package/dist/webgl-utils/typed-array-utils.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/src/_deprecated/context-api.ts +0 -146
- package/src/_deprecated/features.ts +0 -159
- package/src/adapter/converters/webgpu-texture-formats.ts +0 -167
- package/src/classes/accessor.d.ts +0 -28
- package/src/classes/accessor.js +0 -129
- package/src/classes/accessor.ts.disabled +0 -159
- package/src/classes/clear.ts +0 -108
- package/src/classes/copy-and-blit.ts +0 -460
- package/src/classes/framebuffer.ts +0 -763
- package/src/classes/program-configuration.ts +0 -77
- package/src/classes/program.ts +0 -431
- package/src/classes/query.ts +0 -171
- package/src/classes/renderbuffer.ts +0 -154
- package/src/classes/shader.ts +0 -129
- package/src/classes/texture-2d.ts +0 -35
- package/src/classes/texture-3d.ts +0 -123
- package/src/classes/texture-cube.ts +0 -162
- package/src/classes/texture-formats.ts +0 -171
- package/src/classes/texture.ts +0 -965
- package/src/classes/transform-feedback.ts +0 -191
- package/src/classes/uniform-buffer-layout.ts +0 -113
- package/src/classes/uniforms.ts +0 -394
- package/src/classes/vertex-array-object.ts +0 -339
- package/src/classes/vertex-array.ts +0 -484
- package/src/context/context/get-canvas.ts +0 -37
- package/src/context/context/resize-context.ts +0 -37
- package/src/context/parameters/webgl-parameters.ts +0 -197
- package/src/debug/debug-program-configuration.ts +0 -32
- package/src/debug/debug-uniforms.ts +0 -100
- package/src/debug/debug-vertex-array.ts +0 -123
- package/src/helpers/get-program-bindings.ts +0 -244
- package/src/helpers/program-bindings.ts +0 -46
- package/src/types/accessor.d.ts +0 -29
- package/src/webgl-utils/attribute-utils.ts +0 -171
- package/src/webgl-utils/format-utils.ts +0 -43
- package/src/webgl-utils/get-error.ts +0 -56
- package/src/webgl-utils/index.ts +0 -12
- package/src/webgl-utils/request-animation-frame.ts +0 -14
- package/src/webgl-utils/texture-utils.ts +0 -60
|
@@ -23,9 +23,10 @@ function initializeExtensions(gl) {
|
|
|
23
23
|
const contextState = getContextState(gl);
|
|
24
24
|
const EXTENSIONS = gl.getSupportedExtensions() || [];
|
|
25
25
|
|
|
26
|
-
for (const
|
|
27
|
-
|
|
28
|
-
contextState[
|
|
26
|
+
for (const extensionName of EXTENSIONS) {
|
|
27
|
+
const extension = gl.getExtension(extensionName);
|
|
28
|
+
contextState._extensions[extensionName] = extension;
|
|
29
|
+
contextState[extensionName] = extension;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/polyfill/polyfill-context.ts"],"names":["assert","polyfillVertexArrayObject","WEBGL2_CONTEXT_POLYFILLS","WEBGL2_CONTEXT_OVERRIDES","getContextState","polyfillContext","gl","contextState","_polyfilled","initializeExtensions","installPolyfills","installOverrides","target","target2","EXTENSIONS","getSupportedExtensions","
|
|
1
|
+
{"version":3,"sources":["../../../../src/context/polyfill/polyfill-context.ts"],"names":["assert","polyfillVertexArrayObject","WEBGL2_CONTEXT_POLYFILLS","WEBGL2_CONTEXT_OVERRIDES","getContextState","polyfillContext","gl","contextState","_polyfilled","initializeExtensions","installPolyfills","installOverrides","target","target2","EXTENSIONS","getSupportedExtensions","extensionName","extension","getExtension","_extensions","polyfills","Object","getOwnPropertyNames","polyfillExtension","defaults","meta","suffix","ext","key","keys","extKey","polyfill","args","bind","forEach","originalFunc"],"mappings":"AASA,SAAQA,MAAR,QAAqB,cAArB;AACA,SAAQC,yBAAR,QAAwC,gCAAxC;AAEA,SAAQC,wBAAR,EAAkCC,wBAAlC,QAAiE,kBAAjE;AACA,SAAQC,eAAR,QAA8B,0BAA9B;AAKA,OAAO,SAASC,eAAT,CAAyBC,EAAzB,EAA4E;AACjF,QAAMC,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AACM,EAAAA,MAAD;AAASC,EAAAA;AAAT,CAA9B,EAAiD;AAC/CQ,EAAAA,MAAM,CAACQ,IAAP,CAAY1B,wBAAZ,EAAsC+B,OAAtC,CAA+CN,GAAD,IAAS;AACrD,QAAI,OAAOzB,wBAAwB,CAACyB,GAAD,CAA/B,KAAyC,UAA7C,EAAyD;AAEvD,YAAMO,YAAY,GAAG7B,EAAE,CAACsB,GAAD,CAAF,GAAUtB,EAAE,CAACsB,GAAD,CAAF,CAAQK,IAAR,CAAa3B,EAAb,CAAV,GAA6B,MAAM,CAAE,CAA1D;AACA,YAAMyB,QAAQ,GAAG5B,wBAAwB,CAACyB,GAAD,CAAxB,CAA8BK,IAA9B,CAAmC,IAAnC,EAAyC3B,EAAzC,EAA6C6B,YAA7C,CAAjB;AACAvB,MAAAA,MAAM,CAACgB,GAAD,CAAN,GAAcG,QAAd;AACAlB,MAAAA,OAAO,CAACe,GAAD,CAAP,GAAeG,QAAf;AACD;AACF,GARD;AASD","sourcesContent":["// WebGL1/WebGL2 extension polyfill support\n//\n// Provides a function that creates polyfills for WebGL2 functions based\n// on available extensions and installs them on a supplied target (could be\n// the WebGLContext or its prototype, or a separate object).\n//\n// This is intended to be a stand-alone file with minimal dependencies,\n// easy to reuse or repurpose in other projects.\n\nimport {assert} from '@luma.gl/api';\nimport {polyfillVertexArrayObject} from './polyfill-vertex-array-object';\n\nimport {WEBGL2_CONTEXT_POLYFILLS, WEBGL2_CONTEXT_OVERRIDES} from './polyfill-table';\nimport {getContextState} from '../context/context-state';\n\n/**\n * Registers extensions, polyfills or mock functions for extensions in the polyfills list\n */\nexport function polyfillContext(gl: WebGLRenderingContext): WebGL2RenderingContext {\n const contextState = getContextState(gl);\n\n if (!contextState._polyfilled) {\n polyfillVertexArrayObject(gl);\n initializeExtensions(gl);\n installPolyfills(gl, WEBGL2_CONTEXT_POLYFILLS);\n installOverrides(gl, {target: contextState, target2: gl});\n contextState._polyfilled = true;\n }\n\n // Note - only supports a subset of WebGL2\n return gl as WebGL2RenderingContext;\n}\n\nfunction initializeExtensions(gl: WebGLRenderingContext): void {\n const contextState = getContextState(gl);\n // `getSupportedExtensions` can return null when context is lost.\n const EXTENSIONS = gl.getSupportedExtensions() || [];\n for (const extensionName of EXTENSIONS) {\n const extension = gl.getExtension(extensionName);\n contextState._extensions[extensionName] = extension;\n // TODO - this looks like a mistake?\n contextState[extensionName] = extension;\n }\n}\n\nfunction installPolyfills(gl: WebGLRenderingContext, polyfills): void {\n const contextState = getContextState(gl);\n for (const extension of Object.getOwnPropertyNames(polyfills)) {\n if (extension !== 'overrides') {\n polyfillExtension(gl, {extension, target: contextState, target2: gl});\n }\n }\n}\n\n/** Polyfills a single WebGL extension into the `target` object */\nfunction polyfillExtension(gl: WebGLRenderingContext, {extension, target, target2}): void {\n const defaults = WEBGL2_CONTEXT_POLYFILLS[extension];\n assert(defaults);\n\n const {meta = {}} = defaults;\n const {suffix = ''} = meta;\n\n const ext = gl.getExtension(extension);\n\n for (const key of Object.keys(defaults)) {\n const extKey = `${key}${suffix}`;\n\n let polyfill = null;\n if (key === 'meta') {\n // ignore\n } else if (typeof gl[key] === 'function') {\n // WebGL2 implementation is already\n } else if (ext && typeof ext[extKey] === 'function') {\n // pick extension implementation,if available\n polyfill = (...args) => ext[extKey](...args);\n } else if (typeof defaults[key] === 'function') {\n // pick the mock implementation, if no implementation was detected\n polyfill = defaults[key].bind(target);\n }\n\n if (polyfill) {\n target[key] = polyfill;\n target2[key] = polyfill;\n }\n }\n}\n\n/** Install simple overrides (mostly get* functions) */\nfunction installOverrides(gl, {target, target2}) {\n Object.keys(WEBGL2_CONTEXT_OVERRIDES).forEach((key) => {\n if (typeof WEBGL2_CONTEXT_OVERRIDES[key] === 'function') {\n // install an override, if no implementation was detected\n const originalFunc = gl[key] ? gl[key].bind(gl) : () => {};\n const polyfill = WEBGL2_CONTEXT_OVERRIDES[key].bind(null, gl, originalFunc);\n target[key] = polyfill;\n target2[key] = polyfill;\n }\n });\n}\n"],"file":"polyfill-context.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/state-tracker/deep-array-equal.ts"],"names":["deepArrayEqual","x","y","isArrayX","Array","isArray","ArrayBuffer","isView","isArrayY","length","i"],"mappings":"AAEA,OAAO,SAASA,cAAT,CAAwBC,CAAxB,
|
|
1
|
+
{"version":3,"sources":["../../../../src/context/state-tracker/deep-array-equal.ts"],"names":["deepArrayEqual","x","y","isArrayX","Array","isArray","ArrayBuffer","isView","isArrayY","length","i"],"mappings":"AAEA,OAAO,SAASA,cAAT,CAAwBC,CAAxB,EAAgCC,CAAhC,EAAiD;AACtD,MAAID,CAAC,KAAKC,CAAV,EAAa;AACX,WAAO,IAAP;AACD;;AACD,QAAMC,QAAQ,GAAGC,KAAK,CAACC,OAAN,CAAcJ,CAAd,KAAoBK,WAAW,CAACC,MAAZ,CAAmBN,CAAnB,CAArC;AACA,QAAMO,QAAQ,GAAGJ,KAAK,CAACC,OAAN,CAAcH,CAAd,KAAoBI,WAAW,CAACC,MAAZ,CAAmBL,CAAnB,CAArC;;AAEA,MAAIC,QAAQ,IAAIK,QAAZ,IAAwBP,CAAC,CAACQ,MAAF,KAAaP,CAAC,CAACO,MAA3C,EAAmD;AAEjD,SAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGT,CAAC,CAACQ,MAAtB,EAA8B,EAAEC,CAAhC,EAAmC;AACjC,UAAIT,CAAC,CAACS,CAAD,CAAD,KAASR,CAAC,CAACQ,CAAD,CAAd,EAAmB;AACjB,eAAO,KAAP;AACD;AACF;;AACD,WAAO,IAAP;AACD;;AACD,SAAO,KAAP;AACD","sourcesContent":["\n/** deeply compare two arrays */\nexport function deepArrayEqual(x: any, y: any): boolean {\n if (x === y) {\n return true;\n }\n const isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);\n const isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);\n // @ts-expect-error TODO fix\n if (isArrayX && isArrayY && x.length === y.length) {\n // @ts-expect-error TODO fix\n for (let i = 0; i < x.length; ++i) {\n if (x[i] !== y[i]) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n"],"file":"deep-array-equal.js"}
|
|
@@ -69,6 +69,10 @@ class GLState {
|
|
|
69
69
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
function getContextState(gl) {
|
|
73
|
+
return gl.state;
|
|
74
|
+
}
|
|
75
|
+
|
|
72
76
|
export function trackContextState(gl, options) {
|
|
73
77
|
const {
|
|
74
78
|
enable = true,
|
|
@@ -92,21 +96,26 @@ export function trackContextState(gl, options) {
|
|
|
92
96
|
installGetterOverride(gl, 'isEnabled');
|
|
93
97
|
}
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
const glState = getContextState(gl);
|
|
100
|
+
glState.enable = enable;
|
|
96
101
|
return gl;
|
|
97
102
|
}
|
|
98
103
|
export function pushContextState(gl) {
|
|
99
|
-
|
|
104
|
+
let glState = getContextState(gl);
|
|
105
|
+
|
|
106
|
+
if (!glState) {
|
|
100
107
|
trackContextState(gl, {
|
|
101
108
|
copyState: false
|
|
102
109
|
});
|
|
110
|
+
glState = getContextState(gl);
|
|
103
111
|
}
|
|
104
112
|
|
|
105
|
-
|
|
113
|
+
glState.push();
|
|
106
114
|
}
|
|
107
115
|
export function popContextState(gl) {
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
const glState = getContextState(gl);
|
|
117
|
+
assert(glState);
|
|
118
|
+
glState.pop();
|
|
110
119
|
}
|
|
111
120
|
|
|
112
121
|
function installGetterOverride(gl, functionName) {
|
|
@@ -117,11 +126,13 @@ function installGetterOverride(gl, functionName) {
|
|
|
117
126
|
return originalGetterFunc(pname);
|
|
118
127
|
}
|
|
119
128
|
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
const glState = getContextState(gl);
|
|
130
|
+
|
|
131
|
+
if (!(pname in glState.cache)) {
|
|
132
|
+
glState.cache[pname] = originalGetterFunc(pname);
|
|
122
133
|
}
|
|
123
134
|
|
|
124
|
-
return
|
|
135
|
+
return glState.enable ? glState.cache[pname] : originalGetterFunc(pname);
|
|
125
136
|
};
|
|
126
137
|
|
|
127
138
|
Object.defineProperty(gl[functionName], 'name', {
|
|
@@ -138,10 +149,11 @@ function installSetterSpy(gl, functionName, setter) {
|
|
|
138
149
|
const originalSetterFunc = gl[functionName].bind(gl);
|
|
139
150
|
|
|
140
151
|
gl[functionName] = function set(...params) {
|
|
152
|
+
const glState = getContextState(gl);
|
|
141
153
|
const {
|
|
142
154
|
valueChanged,
|
|
143
155
|
oldValue
|
|
144
|
-
} = setter(
|
|
156
|
+
} = setter(glState._updateCache, ...params);
|
|
145
157
|
|
|
146
158
|
if (valueChanged) {
|
|
147
159
|
originalSetterFunc(...params);
|
|
@@ -160,9 +172,11 @@ function installProgramSpy(gl) {
|
|
|
160
172
|
const originalUseProgram = gl.useProgram.bind(gl);
|
|
161
173
|
|
|
162
174
|
gl.useProgram = function useProgramLuma(handle) {
|
|
163
|
-
|
|
175
|
+
const glState = getContextState(gl);
|
|
176
|
+
|
|
177
|
+
if (glState.program !== handle) {
|
|
164
178
|
originalUseProgram(handle);
|
|
165
|
-
|
|
179
|
+
glState.program = handle;
|
|
166
180
|
}
|
|
167
181
|
};
|
|
168
182
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/state-tracker/track-context-state.ts"],"names":["assert","GL_PARAMETER_DEFAULTS","GL_HOOKED_SETTERS","NON_CACHE_PARAMETERS","setParameters","getParameters","deepArrayEqual","GLState","constructor","gl","copyState","log","cache","Object","assign","_updateCache","bind","seal","push","values","stateStack","pop","length","oldValues","valueChanged","oldValue","key","undefined","value","cached","trackContextState","options","enable","state","global_","global","window","installProgramSpy","setter","installSetterSpy","installGetterOverride","pushContextState","popContextState","functionName","originalGetterFunc","get","pname","has","defineProperty","configurable","originalSetterFunc","set","params","originalUseProgram","useProgram","useProgramLuma","handle","program"],"mappings":";AAEA,SAAQA,MAA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AT,CAA2B5B,EAA3B,EAA+B;AAC7B,QAAM4C,kBAAkB,GAAG5C,EAAE,CAAC6C,UAAH,CAActC,IAAd,CAAmBP,EAAnB,CAA3B;;AAEAA,EAAAA,EAAE,CAAC6C,UAAH,GAAgB,SAASC,cAAT,CAAwBC,MAAxB,EAAgC;AAC9C,QAAI/C,EAAE,CAACwB,KAAH,CAASwB,OAAT,KAAqBD,MAAzB,EAAiC;AAC/BH,MAAAA,kBAAkB,CAACG,MAAD,CAAlB;AACA/C,MAAAA,EAAE,CAACwB,KAAH,CAASwB,OAAT,GAAmBD,MAAnB;AACD;AACF,GALD;AAMD","sourcesContent":["// Support for listening to context state changes and intercepting state queries\n// NOTE: this system does not handle buffer bindings\nimport {assert} from '@luma.gl/api';\nimport {GL_PARAMETER_DEFAULTS, GL_HOOKED_SETTERS, NON_CACHE_PARAMETERS} from '../parameters/webgl-parameter-tables';\nimport {setParameters, getParameters} from '../parameters/unified-parameter-api';\nimport {deepArrayEqual} from './deep-array-equal';\n\n// HELPER CLASS - GLState\n\n/* eslint-disable no-shadow */\nclass GLState {\n gl: WebGLRenderingContext;\n program = null;\n stateStack = [];\n enable = true;\n cache;\n log;\n\n constructor(\n gl,\n {\n copyState = false, // Copy cache from params (slow) or initialize from WebGL defaults (fast)\n log = () => {} // Logging function, called when gl parameter change calls are actually issued\n } = {}\n ) {\n this.gl = gl;\n this.cache = copyState ? getParameters(gl) : Object.assign({}, GL_PARAMETER_DEFAULTS);\n this.log = log;\n\n this._updateCache = this._updateCache.bind(this);\n Object.seal(this);\n }\n\n push(values = {}) {\n this.stateStack.push({});\n }\n\n pop() {\n assert(this.stateStack.length > 0);\n // Use the saved values in the state stack to restore parameters\n const oldValues = this.stateStack[this.stateStack.length - 1];\n setParameters(this.gl, oldValues);\n // Don't pop until we have reset parameters (to make sure other \"stack frames\" are not affected)\n this.stateStack.pop();\n }\n\n /**\n // interceptor for context set functions - update our cache and our stack\n // values (Object) - the key values for this setter\n * @param values\n * @returns\n */\n _updateCache(values) {\n let valueChanged = false;\n let oldValue; // = undefined\n\n const oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];\n\n for (const key in values) {\n assert(key !== undefined);\n const value = values[key];\n const cached = this.cache[key];\n // Check that value hasn't already been shadowed\n if (!deepArrayEqual(value, cached)) {\n valueChanged = true;\n oldValue = cached;\n\n // First, save current value being shadowed\n // If a state stack frame is active, save the current parameter values for pop\n // but first check that value hasn't already been shadowed and saved\n if (oldValues && !(key in oldValues)) {\n oldValues[key] = cached;\n }\n\n // Save current value being shadowed\n this.cache[key] = value;\n }\n }\n\n return {valueChanged, oldValue};\n }\n}\n\n// PUBLIC API\n\n/**\n * Initialize WebGL state caching on a context\n * can be called multiple times to enable/disable\n *\n * @note After calling this function, context state will be cached\n * gl.state.push() and gl.state.pop() will be available for saving,\n * temporarily modifying, and then restoring state.\n */\n export function trackContextState(\n gl: WebGLRenderingContext,\n options?: {\n enable?: boolean;\n copyState?: boolean;\n log?: any;\n }\n): WebGLRenderingContext {\n const {enable = true, copyState} = options;\n assert(copyState !== undefined);\n // @ts-expect-error\n if (!gl.state) {\n const global_ = typeof global !== 'undefined' ? global : window;\n // @ts-ignore\n // const {polyfillContext} = global_;\n // if (polyfillContext) {\n // polyfillContext(gl);\n // }\n\n // Create a state cache\n // @ts-expect-error\n gl.state = new GLState(gl, {copyState});\n\n installProgramSpy(gl);\n\n // intercept all setter functions in the table\n for (const key in GL_HOOKED_SETTERS) {\n const setter = GL_HOOKED_SETTERS[key];\n installSetterSpy(gl, key, setter);\n }\n\n // intercept all getter functions in the table\n installGetterOverride(gl, 'getParameter');\n installGetterOverride(gl, 'isEnabled');\n }\n\n // @ts-expect-error\n gl.state.enable = enable;\n\n return gl;\n}\n\n/**\n * Saves current WebGL context state onto an internal per-context stack\n */\n export function pushContextState(gl: WebGLRenderingContext): void {\n // @ts-expect-error\n if (!gl.state) {\n trackContextState(gl, {copyState: false});\n }\n // @ts-expect-error\n gl.state.push();\n}\n\n\n/**\n * Restores previously saved WebGL context state\n */\nexport function popContextState(gl: WebGLRenderingContext): void {\n // @ts-expect-error\n assert(gl.state);\n // @ts-expect-error\n gl.state.pop();\n}\n\n// HELPER FUNCTIONS - INSTALL GET/SET INTERCEPTORS (SPYS) ON THE CONTEXT\n\n/**\n// Overrides a WebGLRenderingContext state \"getter\" function\n// to return values directly from cache\n * @param gl\n * @param functionName\n */\nfunction installGetterOverride(gl, functionName) {\n // Get the original function from the WebGLRenderingContext\n const originalGetterFunc = gl[functionName].bind(gl);\n\n // Wrap it with a spy so that we can update our state cache when it gets called\n gl[functionName] = function get(pname) {\n if (pname === undefined || NON_CACHE_PARAMETERS.has(pname)) {\n // Invalid or blacklisted parameter, do not cache\n return originalGetterFunc(pname);\n }\n\n if (!(pname in gl.state.cache)) {\n // WebGL limits are not prepopulated in the cache, call the original getter when first queried.\n gl.state.cache[pname] = originalGetterFunc(pname);\n }\n\n // Optionally call the original function to do a \"hard\" query from the WebGLRenderingContext\n return gl.state.enable\n ? // Call the getter the params so that it can e.g. serve from a cache\n gl.state.cache[pname]\n : // Optionally call the original function to do a \"hard\" query from the WebGLRenderingContext\n originalGetterFunc(pname);\n };\n\n // Set the name of this anonymous function to help in debugging and profiling\n Object.defineProperty(gl[functionName], 'name', {\n value: `${functionName}-from-cache`,\n configurable: false\n });\n}\n\n/**\n// Overrides a WebGLRenderingContext state \"setter\" function\n// to call a setter spy before the actual setter. Allows us to keep a cache\n// updated with a copy of the WebGL context state.\n * @param gl\n * @param functionName\n * @param setter\n * @returns\n */\nfunction installSetterSpy(gl, functionName, setter) {\n // Get the original function from the WebGLRenderingContext\n if (!gl[functionName]) {\n // This could happen if we try to intercept WebGL2 method on a WebGL1 context\n return;\n }\n const originalSetterFunc = gl[functionName].bind(gl);\n\n // Wrap it with a spy so that we can update our state cache when it gets called\n gl[functionName] = function set(...params) {\n // Update the value\n // Call the setter with the state cache and the params so that it can store the parameters\n const {valueChanged, oldValue} = setter(gl.state._updateCache, ...params);\n\n // Call the original WebGLRenderingContext func to make sure the context actually gets updated\n if (valueChanged) {\n originalSetterFunc(...params);\n }\n\n // Note: if the original function fails to set the value, our state cache will be bad\n // No solution for this at the moment, but assuming that this is unlikely to be a real problem\n // We could call the setter after the originalSetterFunc. Concern is that this would\n // cause different behavior in debug mode, where originalSetterFunc can throw exceptions\n\n return oldValue;\n };\n\n // Set the name of this anonymous function to help in debugging and profiling\n Object.defineProperty(gl[functionName], 'name', {\n value: `${functionName}-to-cache`,\n configurable: false\n });\n}\n\nfunction installProgramSpy(gl) {\n const originalUseProgram = gl.useProgram.bind(gl);\n\n gl.useProgram = function useProgramLuma(handle) {\n if (gl.state.program !== handle) {\n originalUseProgram(handle);\n gl.state.program = handle;\n }\n };\n}\n"],"file":"track-context-state.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/context/state-tracker/track-context-state.ts"],"names":["assert","GL_PARAMETER_DEFAULTS","GL_HOOKED_SETTERS","NON_CACHE_PARAMETERS","setParameters","getParameters","deepArrayEqual","GLState","constructor","gl","copyState","log","cache","Object","assign","_updateCache","bind","seal","push","values","stateStack","pop","length","oldValues","valueChanged","oldValue","key","undefined","value","cached","getContextState","state","trackContextState","options","enable","global_","global","window","installProgramSpy","setter","installSetterSpy","installGetterOverride","glState","pushContextState","popContextState","functionName","originalGetterFunc","get","pname","has","defineProperty","configurable","originalSetterFunc","set","params","originalUseProgram","useProgram","useProgramLuma","handle","program"],"mappings":";AAEA,SAAQA,MAAR,QAAqB,cAArB;AACA,SAAQC,qBAAR,EAA+BC,iBAA/B,EAAkDC,oBAAlD,QAA6E,sCAA7E;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,qCAA3C;AACA,SAAQC,cAAR,QAA6B,oBAA7B;;AAKA,MAAMC,OAAN,CAAc;AAQZC,EAAAA,WAAW,CACTC,EADS,EAET;AACEC,IAAAA,SAAS,GAAG,KADd;AAEEC,IAAAA,GAAG,GAAG,MAAM,CAAE;AAFhB,MAGI,EALK,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AM8C,kBAAkB,GAAG9C,EAAE,CAAC+C,UAAH,CAAcxC,IAAd,CAAmBP,EAAnB,CAA3B;;AAEAA,EAAAA,EAAE,CAAC+C,UAAH,GAAgB,SAASC,cAAT,CAAwBC,MAAxB,EAAgC;AAC9C,UAAMhB,OAAO,GAAGZ,eAAe,CAACrB,EAAD,CAA/B;;AACA,QAAIiC,OAAO,CAACiB,OAAR,KAAoBD,MAAxB,EAAgC;AAC9BH,MAAAA,kBAAkB,CAACG,MAAD,CAAlB;AACAhB,MAAAA,OAAO,CAACiB,OAAR,GAAkBD,MAAlB;AACD;AACF,GAND;AAOD","sourcesContent":["// Support for listening to context state changes and intercepting state queries\n// NOTE: this system does not handle buffer bindings\nimport {assert} from '@luma.gl/api';\nimport {GL_PARAMETER_DEFAULTS, GL_HOOKED_SETTERS, NON_CACHE_PARAMETERS} from '../parameters/webgl-parameter-tables';\nimport {setParameters, getParameters} from '../parameters/unified-parameter-api';\nimport {deepArrayEqual} from './deep-array-equal';\n\n// HELPER CLASS - GLState\n\n/* eslint-disable no-shadow */\nclass GLState {\n gl: WebGLRenderingContext;\n program = null;\n stateStack = [];\n enable = true;\n cache;\n log;\n\n constructor(\n gl,\n {\n copyState = false, // Copy cache from params (slow) or initialize from WebGL defaults (fast)\n log = () => {} // Logging function, called when gl parameter change calls are actually issued\n } = {}\n ) {\n this.gl = gl;\n this.cache = copyState ? getParameters(gl) : Object.assign({}, GL_PARAMETER_DEFAULTS);\n this.log = log;\n\n this._updateCache = this._updateCache.bind(this);\n Object.seal(this);\n }\n\n push(values = {}) {\n this.stateStack.push({});\n }\n\n pop() {\n assert(this.stateStack.length > 0);\n // Use the saved values in the state stack to restore parameters\n const oldValues = this.stateStack[this.stateStack.length - 1];\n setParameters(this.gl, oldValues);\n // Don't pop until we have reset parameters (to make sure other \"stack frames\" are not affected)\n this.stateStack.pop();\n }\n\n /**\n // interceptor for context set functions - update our cache and our stack\n // values (Object) - the key values for this setter\n * @param values\n * @returns\n */\n _updateCache(values) {\n let valueChanged = false;\n let oldValue; // = undefined\n\n const oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];\n\n for (const key in values) {\n assert(key !== undefined);\n const value = values[key];\n const cached = this.cache[key];\n // Check that value hasn't already been shadowed\n if (!deepArrayEqual(value, cached)) {\n valueChanged = true;\n oldValue = cached;\n\n // First, save current value being shadowed\n // If a state stack frame is active, save the current parameter values for pop\n // but first check that value hasn't already been shadowed and saved\n if (oldValues && !(key in oldValues)) {\n oldValues[key] = cached;\n }\n\n // Save current value being shadowed\n this.cache[key] = value;\n }\n }\n\n return {valueChanged, oldValue};\n }\n}\n\nfunction getContextState(gl: WebGLRenderingContext): GLState {\n // @ts-expect-error\n return gl.state as GLState;\n}\n\n// PUBLIC API\n\n/**\n * Initialize WebGL state caching on a context\n * can be called multiple times to enable/disable\n *\n * @note After calling this function, context state will be cached\n * gl.state.push() and gl.state.pop() will be available for saving,\n * temporarily modifying, and then restoring state.\n */\n export function trackContextState(\n gl: WebGLRenderingContext,\n options?: {\n enable?: boolean;\n copyState?: boolean;\n log?: any;\n }\n): WebGLRenderingContext {\n const {enable = true, copyState} = options;\n assert(copyState !== undefined);\n // @ts-expect-error\n if (!gl.state) {\n const global_ = typeof global !== 'undefined' ? global : window;\n // @ts-ignore\n // const {polyfillContext} = global_;\n // if (polyfillContext) {\n // polyfillContext(gl);\n // }\n\n // Create a state cache\n // @ts-expect-error\n gl.state = new GLState(gl, {copyState});\n\n installProgramSpy(gl);\n\n // intercept all setter functions in the table\n for (const key in GL_HOOKED_SETTERS) {\n const setter = GL_HOOKED_SETTERS[key];\n installSetterSpy(gl, key, setter);\n }\n\n // intercept all getter functions in the table\n installGetterOverride(gl, 'getParameter');\n installGetterOverride(gl, 'isEnabled');\n }\n\n const glState = getContextState(gl);\n glState.enable = enable;\n\n return gl;\n}\n\n/**\n * Saves current WebGL context state onto an internal per-context stack\n */\n export function pushContextState(gl: WebGLRenderingContext): void {\n let glState = getContextState(gl);\n if (!glState) {\n trackContextState(gl, {copyState: false});\n glState = getContextState(gl);\n }\n glState.push();\n}\n\n\n/**\n * Restores previously saved WebGL context state\n */\nexport function popContextState(gl: WebGLRenderingContext): void {\n const glState = getContextState(gl);\n assert(glState);\n glState.pop();\n}\n\n// HELPER FUNCTIONS - INSTALL GET/SET INTERCEPTORS (SPYS) ON THE CONTEXT\n\n/**\n// Overrides a WebGLRenderingContext state \"getter\" function\n// to return values directly from cache\n * @param gl\n * @param functionName\n */\nfunction installGetterOverride(gl: WebGLRenderingContext, functionName: string) {\n // Get the original function from the WebGLRenderingContext\n const originalGetterFunc = gl[functionName].bind(gl);\n\n // Wrap it with a spy so that we can update our state cache when it gets called\n gl[functionName] = function get(pname) {\n if (pname === undefined || NON_CACHE_PARAMETERS.has(pname)) {\n // Invalid or blacklisted parameter, do not cache\n return originalGetterFunc(pname);\n }\n\n const glState = getContextState(gl);\n if (!(pname in glState.cache)) {\n // WebGL limits are not prepopulated in the cache, call the original getter when first queried.\n glState.cache[pname] = originalGetterFunc(pname);\n }\n\n // Optionally call the original function to do a \"hard\" query from the WebGLRenderingContext\n return glState.enable\n ? // Call the getter the params so that it can e.g. serve from a cache\n glState.cache[pname]\n : // Optionally call the original function to do a \"hard\" query from the WebGLRenderingContext\n originalGetterFunc(pname);\n };\n\n // Set the name of this anonymous function to help in debugging and profiling\n Object.defineProperty(gl[functionName], 'name', {\n value: `${functionName}-from-cache`,\n configurable: false\n });\n}\n\n/**\n// Overrides a WebGLRenderingContext state \"setter\" function\n// to call a setter spy before the actual setter. Allows us to keep a cache\n// updated with a copy of the WebGL context state.\n * @param gl\n * @param functionName\n * @param setter\n * @returns\n */\nfunction installSetterSpy(gl: WebGLRenderingContext, functionName, setter) {\n // Get the original function from the WebGLRenderingContext\n if (!gl[functionName]) {\n // This could happen if we try to intercept WebGL2 method on a WebGL1 context\n return;\n }\n const originalSetterFunc = gl[functionName].bind(gl);\n\n // Wrap it with a spy so that we can update our state cache when it gets called\n gl[functionName] = function set(...params) {\n // Update the value\n // Call the setter with the state cache and the params so that it can store the parameters\n const glState = getContextState(gl);\n const {valueChanged, oldValue} = setter(glState._updateCache, ...params);\n\n // Call the original WebGLRenderingContext func to make sure the context actually gets updated\n if (valueChanged) {\n originalSetterFunc(...params);\n }\n\n // Note: if the original function fails to set the value, our state cache will be bad\n // No solution for this at the moment, but assuming that this is unlikely to be a real problem\n // We could call the setter after the originalSetterFunc. Concern is that this would\n // cause different behavior in debug mode, where originalSetterFunc can throw exceptions\n\n return oldValue;\n };\n\n // Set the name of this anonymous function to help in debugging and profiling\n Object.defineProperty(gl[functionName], 'name', {\n value: `${functionName}-to-cache`,\n configurable: false\n });\n}\n\nfunction installProgramSpy(gl: WebGLRenderingContext): void {\n const originalUseProgram = gl.useProgram.bind(gl);\n\n gl.useProgram = function useProgramLuma(handle) {\n const glState = getContextState(gl);\n if (glState.program !== handle) {\n originalUseProgram(handle);\n glState.program = handle;\n }\n };\n}\n"],"file":"track-context-state.js"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,39 +1,27 @@
|
|
|
1
|
+
import '@luma.gl/api';
|
|
1
2
|
import './init';
|
|
2
|
-
export { default as WebGLDevice
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as Texture3D } from './classes/texture-3d';
|
|
18
|
-
export { default as TransformFeedback } from './classes/transform-feedback';
|
|
19
|
-
export { default as VertexArrayObject } from './classes/vertex-array-object';
|
|
20
|
-
export { default as VertexArray } from './classes/vertex-array';
|
|
21
|
-
export { default as UniformBufferLayout } from './classes/uniform-buffer-layout';
|
|
22
|
-
export { setDeviceParameters } from './adapter/converters/set-device-parameters';
|
|
3
|
+
export { default as WebGLDevice } from './adapter/webgl-device';
|
|
4
|
+
export { default as WebGLCanvasContext } from './adapter/webgl-canvas-context';
|
|
5
|
+
export { default as Accessor } from './classic/accessor';
|
|
6
|
+
export { default as Buffer } from './classic/buffer';
|
|
7
|
+
export { default as WEBGLResource, default as WebGLResource } from './adapter/objects/webgl-resource';
|
|
8
|
+
export { default as WEBGLBuffer } from './adapter/resources/webgl-buffer';
|
|
9
|
+
export { default as WEBGLTexture } from './adapter/resources/webgl-texture';
|
|
10
|
+
export { default as WEBGLShader } from './adapter/resources/webgl-shader';
|
|
11
|
+
export { default as WEBGLSampler } from './adapter/resources/webgl-sampler';
|
|
12
|
+
export { default as WEBGLFramebuffer } from './adapter/resources/webgl-framebuffer';
|
|
13
|
+
export { default as WEBGLRenderPipeline } from './adapter/resources/webgl-render-pipeline';
|
|
14
|
+
export { default as WEBGLCommandEncoder } from './adapter/resources/webgl-command-encoder';
|
|
15
|
+
export { default as WEBGLRenderPass } from './adapter/resources/webgl-render-pass';
|
|
16
|
+
export { default as WEBGLRenderbuffer } from './adapter/objects/webgl-renderbuffer';
|
|
17
|
+
export { default as WEBGLVertexArrayObject } from './adapter/objects/webgl-vertex-array-object';
|
|
23
18
|
export { isWebGL, isWebGL2, getWebGL2Context, assertWebGLContext, assertWebGL2Context } from './context/context/webgl-checks';
|
|
24
19
|
export { cssToDeviceRatio, cssToDevicePixels } from './context/context/device-pixels';
|
|
20
|
+
export { setDeviceParameters, withDeviceParameters } from './adapter/converters/device-parameters';
|
|
25
21
|
export { getParameters, setParameters, resetParameters } from './context/parameters/unified-parameter-api';
|
|
26
22
|
export { withParameters } from './context/state-tracker/with-parameters';
|
|
27
23
|
export { trackContextState, pushContextState, popContextState } from './context/state-tracker/track-context-state';
|
|
28
24
|
export { polyfillContext } from './context/polyfill/polyfill-context';
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export { getDebugTableForVertexArray } from './debug/debug-vertex-array';
|
|
32
|
-
export { getDebugTableForProgramConfiguration } from './debug/debug-program-configuration';
|
|
33
|
-
export { getProgramBindings } from './helpers/get-program-bindings';
|
|
34
|
-
export { lumaStats } from './init';
|
|
35
|
-
export { log, assert, uid, isObjectEmpty } from '@luma.gl/api';
|
|
36
|
-
export { setPathPrefix, loadFile, loadImage } from '@luma.gl/api';
|
|
37
|
-
export { createGLContext, instrumentGLContext, resizeGLContext, hasFeature, hasFeatures, getFeatures, getContextInfo, getGLContextInfo, getContextLimits, getContextDebugInfo } from './_deprecated/context-api';
|
|
38
|
-
export { DEPRECATED_FEATURES as FEATURES } from './_deprecated/features';
|
|
25
|
+
export { getShaderLayout, getProgramBindings } from './adapter/helpers/get-shader-layout';
|
|
26
|
+
export { _checkFloat32ColorAttachment } from './adapter/converters/texture-formats';
|
|
39
27
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"names":["default","WebGLDevice","
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":["default","WebGLDevice","WebGLCanvasContext","Accessor","Buffer","WEBGLResource","WebGLResource","WEBGLBuffer","WEBGLTexture","WEBGLShader","WEBGLSampler","WEBGLFramebuffer","WEBGLRenderPipeline","WEBGLCommandEncoder","WEBGLRenderPass","WEBGLRenderbuffer","WEBGLVertexArrayObject","isWebGL","isWebGL2","getWebGL2Context","assertWebGLContext","assertWebGL2Context","cssToDeviceRatio","cssToDevicePixels","setDeviceParameters","withDeviceParameters","getParameters","setParameters","resetParameters","withParameters","trackContextState","pushContextState","popContextState","polyfillContext","getShaderLayout","getProgramBindings","_checkFloat32ColorAttachment"],"mappings":"AAOA,OAAO,cAAP;AACA,OAAO,QAAP;AAEA,SAAQA,OAAO,IAAIC,WAAnB,QAAqC,wBAArC;AACA,SAAQD,OAAO,IAAIE,kBAAnB,QAA4C,gCAA5C;AAGA,SAAQF,OAAO,IAAIG,QAAnB,QAAkC,oBAAlC;AAEA,SAAQH,OAAO,IAAII,MAAnB,QAAgC,kBAAhC;AACA,SAAQJ,OAAO,IAAIK,aAAnB,EAAkCL,OAAO,IAAIM,aAA7C,QAAiE,kCAAjE;AACA,SAAQN,OAAO,IAAIO,WAAnB,QAAqC,kCAArC;AACA,SAAQP,OAAO,IAAIQ,YAAnB,QAAsC,mCAAtC;AAEA,SAAQR,OAAO,IAAIS,WAAnB,QAAqC,kCAArC;AACA,SAAQT,OAAO,IAAIU,YAAnB,QAAsC,mCAAtC;AACA,SAAQV,OAAO,IAAIW,gBAAnB,QAA0C,uCAA1C;AAEA,SAAQX,OAAO,IAAIY,mBAAnB,QAA6C,2CAA7C;AAGA,SAAQZ,OAAO,IAAIa,mBAAnB,QAA6C,2CAA7C;AACA,SAAQb,OAAO,IAAIc,eAAnB,QAAyC,uCAAzC;AAIA,SAAQd,OAAO,IAAIe,iBAAnB,QAA2C,sCAA3C;AACA,SAAQf,OAAO,IAAIgB,sBAAnB,QAAgD,6CAAhD;AAEA,SACEC,OADF,EAEEC,QAFF,EAGEC,gBAHF,EAIEC,kBAJF,EAKEC,mBALF,QAMO,gCANP;AASA,SAAQC,gBAAR,EAA0BC,iBAA1B,QAAkD,iCAAlD;AAIA,SAAQC,mBAAR,EAA6BC,oBAA7B,QAAwD,wCAAxD;AAGA,SACEC,aADF,EAEEC,aAFF,EAGEC,eAHF,QAIO,4CAJP;AAMA,SACEC,cADF,QAEO,yCAFP;AAKA,SACEC,iBADF,EAEEC,gBAFF,EAGEC,eAHF,QAIO,6CAJP;AAOA,SAAQC,eAAR,QAA8B,qCAA9B;AAGA,SAAQC,eAAR,EAAyBC,kBAAzB,QAAkD,qCAAlD;AACA,SAAQC,4BAAR,QAA2C,sCAA3C","sourcesContent":["// luma.gl Base WebGL wrapper library\n// Provides simple class/function wrappers around the low level webgl objects\n// These classes are intentionally close to the WebGL API\n// but make it easier to use.\n// Higher level abstractions can be built on these classes\n\n// Initialize any global state\nimport '@luma.gl/api';\nimport './init'\n\nexport {default as WebGLDevice} from './adapter/webgl-device';\nexport {default as WebGLCanvasContext} from './adapter/webgl-canvas-context';\n\n// Legacy WebGL Classes - will be moved to gltools\nexport {default as Accessor} from './classic/accessor';\nexport type {ClassicBufferProps as BufferProps} from './classic/buffer';\nexport {default as Buffer} from './classic/buffer';\nexport {default as WEBGLResource, default as WebGLResource} from './adapter/objects/webgl-resource';\nexport {default as WEBGLBuffer} from './adapter/resources/webgl-buffer';\nexport {default as WEBGLTexture} from './adapter/resources/webgl-texture';\n// export {default as WEBGLExternalTexture} from './adapter/resources/webgl-external-texture';\nexport {default as WEBGLShader} from './adapter/resources/webgl-shader';\nexport {default as WEBGLSampler} from './adapter/resources/webgl-sampler';\nexport {default as WEBGLFramebuffer} from './adapter/resources/webgl-framebuffer';\n\nexport {default as WEBGLRenderPipeline} from './adapter/resources/webgl-render-pipeline';\n\n// export {default as WEBGLComputePipeline} from './adapter/resources/webgl-compute-pipeline';\nexport {default as WEBGLCommandEncoder} from './adapter/resources/webgl-command-encoder';\nexport {default as WEBGLRenderPass} from './adapter/resources/webgl-render-pass';\n//export {default as WEBGLComputePass} from './adapter/resources/webgl-compute-pass';\n\nexport type {RenderbufferProps} from './adapter/objects/webgl-renderbuffer';\nexport {default as WEBGLRenderbuffer} from './adapter/objects/webgl-renderbuffer';\nexport {default as WEBGLVertexArrayObject} from './adapter/objects/webgl-vertex-array-object';\n\nexport {\n isWebGL,\n isWebGL2,\n getWebGL2Context,\n assertWebGLContext,\n assertWebGL2Context\n} from './context/context/webgl-checks';\n\n// Device ratio\nexport {cssToDeviceRatio, cssToDevicePixels} from './context/context/device-pixels';\n\n// Unified parameter API\n\nexport {setDeviceParameters, withDeviceParameters} from './adapter/converters/device-parameters';\n\nexport type {GLParameters} from './types/webgl';\nexport {\n getParameters,\n setParameters,\n resetParameters\n} from './context/parameters/unified-parameter-api';\n\nexport {\n withParameters\n} from './context/state-tracker/with-parameters';\n\n// State tracking\nexport {\n trackContextState,\n pushContextState,\n popContextState\n} from './context/state-tracker/track-context-state';\n\n// Polyfills (supports a subset of WebGL2 APIs on WebGL1 contexts)\nexport {polyfillContext} from './context/polyfill/polyfill-context';\n\n// HELPERS - EXPERIMENTAL\nexport {getShaderLayout, getProgramBindings} from './adapter/helpers/get-shader-layout';\nexport {_checkFloat32ColorAttachment} from './adapter/converters/texture-formats';\n"],"file":"index.js"}
|
package/dist/esm/init.js
CHANGED
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isBrowser } from '@probe.gl/env';
|
|
3
|
-
import { luma, lumaStats } from '@luma.gl/api';
|
|
1
|
+
import { luma } from '@luma.gl/api';
|
|
4
2
|
import WebGLDevice from './adapter/webgl-device';
|
|
5
|
-
|
|
6
|
-
const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
|
|
7
|
-
|
|
8
|
-
if (globalThis.luma && globalThis.luma.VERSION !== VERSION) {
|
|
9
|
-
throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION, " vs ").concat(VERSION));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (!globalThis.luma) {
|
|
13
|
-
luma.registerDevices([WebGLDevice]);
|
|
14
|
-
|
|
15
|
-
if (isBrowser()) {
|
|
16
|
-
log.log(1, "luma.gl ".concat(VERSION, " - ").concat(STARTUP_MESSAGE))();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
globalThis.luma = globalThis.luma || {
|
|
20
|
-
VERSION,
|
|
21
|
-
version: VERSION,
|
|
22
|
-
log,
|
|
23
|
-
stats: lumaStats,
|
|
24
|
-
globals: {
|
|
25
|
-
modules: {},
|
|
26
|
-
nodeIO: {}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { lumaStats };
|
|
32
|
-
export default globalThis.luma;
|
|
3
|
+
luma.registerDevices([WebGLDevice]);
|
|
33
4
|
//# sourceMappingURL=init.js.map
|
package/dist/esm/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/init.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../src/init.ts"],"names":["luma","WebGLDevice","registerDevices"],"mappings":"AAAA,SAAQA,IAAR,QAAmB,cAAnB;AACA,OAAOC,WAAP,MAAwB,wBAAxB;AAEAD,IAAI,CAACE,eAAL,CAAqB,CAACD,WAAD,CAArB","sourcesContent":["import {luma} from '@luma.gl/api';\nimport WebGLDevice from './adapter/webgl-device';\n\nluma.registerDevices([WebGLDevice]);\n"],"file":"init.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/types/webgl.ts"],"names":["GL"],"mappings":"AACA,OAAOA,EAAP,MAAe,oBAAf","sourcesContent":["import type {NumberArray} from '@luma.gl/api';\nimport GL from '@luma.gl/constants';\n\ntype Framebuffer = any;\n\nexport type GLDrawMode =\n | GL.POINTS\n | GL.LINES\n | GL.LINE_STRIP\n | GL.LINE_LOOP\n | GL.TRIANGLES\n | GL.TRIANGLE_STRIP\n | GL.TRIANGLE_FAN;\n\nexport type GLPrimitive = GL.POINTS | GL.LINES | GL.TRIANGLES;\n\nexport type GLType =\n | GL.FLOAT\n | GL.UNSIGNED_SHORT\n | GL.UNSIGNED_INT\n | GL.UNSIGNED_BYTE\n | GL.BYTE\n | GL.SHORT\n | GL.INT;\n\nexport type GLPackedType =\n | GL.UNSIGNED_SHORT_5_6_5\n | GL.UNSIGNED_SHORT_4_4_4_4\n | GL.UNSIGNED_SHORT_5_5_5_1;\n\nexport type GLUniformType = GLSamplerType | GLCompositeType;\n\nexport type GLSamplerType =\n | GL.SAMPLER_2D\n | GL.SAMPLER_CUBE\n | GL.SAMPLER_3D\n | GL.SAMPLER_2D_SHADOW\n | GL.SAMPLER_2D_ARRAY\n | GL.SAMPLER_2D_ARRAY_SHADOW\n | GL.SAMPLER_CUBE_SHADOW\n | GL.INT_SAMPLER_2D\n | GL.INT_SAMPLER_3D\n | GL.INT_SAMPLER_CUBE\n | GL.INT_SAMPLER_2D_ARRAY\n | GL.UNSIGNED_INT_SAMPLER_2D\n | GL.UNSIGNED_INT_SAMPLER_3D\n | GL.UNSIGNED_INT_SAMPLER_CUBE\n | GL.UNSIGNED_INT_SAMPLER_2D_ARRAY;\n\n// Composite types table\nexport type GLCompositeType =\n | GL.FLOAT\n | GL.FLOAT_VEC2\n | GL.FLOAT_VEC3\n | GL.FLOAT_VEC4\n | GL.INT\n | GL.INT_VEC2\n | GL.INT_VEC3\n | GL.INT_VEC4\n | GL.UNSIGNED_INT\n | GL.UNSIGNED_INT_VEC2\n | GL.UNSIGNED_INT_VEC3\n | GL.UNSIGNED_INT_VEC4\n | GL.BOOL\n | GL.BOOL_VEC2\n | GL.BOOL_VEC3\n | GL.BOOL_VEC4\n | GL.FLOAT_MAT2\n | GL.FLOAT_MAT2x3\n | GL.FLOAT_MAT2x4\n | GL.FLOAT_MAT3x2\n | GL.FLOAT_MAT3\n | GL.FLOAT_MAT3x4\n | GL.FLOAT_MAT4x2\n | GL.FLOAT_MAT4x3\n | GL.FLOAT_MAT4;\n\nexport type GLFunction =\n | GL.NEVER\n | GL.LESS\n | GL.EQUAL\n | GL.LEQUAL\n | GL.GREATER\n | GL.NOTEQUAL\n | GL.GEQUAL\n | GL.ALWAYS;\n\nexport type GLBlendEquation =\n | GL.FUNC_ADD\n | GL.FUNC_SUBTRACT\n | GL.FUNC_REVERSE_SUBTRACT\n | GL.MIN_EXT\n | GL.MAX_EXT;\n\nexport type GLBlendFunction =\n | GL.ZERO\n | GL.ONE\n | GL.SRC_COLOR\n | GL.ONE_MINUS_SRC_COLOR\n | GL.DST_COLOR\n | GL.ONE_MINUS_DST_COLOR\n | GL.SRC_ALPHA\n | GL.ONE_MINUS_SRC_ALPHA\n | GL.DST_ALPHA\n | GL.ONE_MINUS_DST_ALPHA\n | GL.CONSTANT_COLOR\n | GL.ONE_MINUS_CONSTANT_COLOR\n | GL.CONSTANT_ALPHA\n | GL.ONE_MINUS_CONSTANT_ALPHA\n | GL.SRC_ALPHA_SATURATE;\n\nexport type GLStencilOp =\n | GL.KEEP\n | GL.ZERO\n | GL.REPLACE\n | GL.INCR\n | GL.INCR_WRAP\n | GL.DECR\n | GL.DECR_WRAP\n | GL.INVERT;\n\n/** Parameters for textures and samplers */\nexport type WebGLSamplerParameters = {\n [GL.TEXTURE_WRAP_S]?: GL.CLAMP_TO_EDGE | GL.REPEAT | GL.MIRRORED_REPEAT;\n [GL.TEXTURE_WRAP_T]?: GL.CLAMP_TO_EDGE | GL.REPEAT | GL.MIRRORED_REPEAT;\n [GL.TEXTURE_WRAP_R]?: GL.CLAMP_TO_EDGE | GL.REPEAT | GL.MIRRORED_REPEAT;\n [GL.TEXTURE_MAG_FILTER]?: GL.NEAREST | GL.LINEAR;\n [GL.TEXTURE_MIN_FILTER]?:\n | GL.NEAREST\n | GL.LINEAR\n | GL.NEAREST_MIPMAP_NEAREST\n | GL.NEAREST_MIPMAP_LINEAR\n | GL.LINEAR_MIPMAP_NEAREST\n | GL.LINEAR_MIPMAP_LINEAR;\n [GL.TEXTURE_MIN_LOD]?: number;\n [GL.TEXTURE_MAX_LOD]?: number;\n [GL.TEXTURE_COMPARE_FUNC]?: number; // COMPARE_FUNC);\n [GL.TEXTURE_MAX_ANISOTROPY_EXT]?: number; //\n};\n\n/**\n * All global WebGL values set by a variety of setter gl.enable ...\n */\nexport type GLValueParameters = {\n [GL.BLEND]?: boolean;\n [GL.BLEND_COLOR]?: [number, number, number, number] | NumberArray;\n [GL.BLEND_EQUATION_RGB]?: GLBlendEquation;\n [GL.BLEND_EQUATION_ALPHA]?: GLBlendEquation;\n [GL.BLEND_SRC_RGB]?: GLBlendFunction;\n [GL.BLEND_DST_RGB]?: GLBlendFunction;\n [GL.BLEND_SRC_ALPHA]?: GLBlendFunction;\n [GL.BLEND_DST_ALPHA]?: GLBlendFunction;\n [GL.COLOR_CLEAR_VALUE]?: [number, number, number, number] | NumberArray;\n [GL.COLOR_WRITEMASK]?: [boolean, boolean, boolean, boolean] | boolean[];\n [GL.CULL_FACE]?: boolean;\n [GL.CULL_FACE_MODE]?: GL.FRONT | GL.BACK | GL.FRONT_AND_BACK;\n [GL.DEPTH_TEST]?: boolean;\n [GL.DEPTH_CLEAR_VALUE]?: number;\n [GL.DEPTH_FUNC]?: GLFunction;\n [GL.DEPTH_RANGE]?: [number, number] | NumberArray;\n [GL.DEPTH_WRITEMASK]?: boolean;\n [GL.DITHER]?: boolean;\n [GL.FRAGMENT_SHADER_DERIVATIVE_HINT]?: GL.FASTEST | GL.NICEST | GL.DONT_CARE;\n [GL.CURRENT_PROGRAM]?: WebGLProgram | null;\n [GL.FRAMEBUFFER_BINDING]?: WebGLFramebuffer | null;\n [GL.RENDERBUFFER_BINDING]?: WebGLRenderbuffer | null;\n [GL.TRANSFORM_FEEDBACK_BINDING]?: WebGLTransformFeedback | null;\n [GL.VERTEX_ARRAY_BINDING]?: WebGLVertexArrayObject | null;\n [GL.ARRAY_BUFFER_BINDING]?: WebGLBuffer | null;\n [GL.COPY_READ_BUFFER_BINDING]?: WebGLBuffer | null;\n [GL.COPY_WRITE_BUFFER_BINDING]?: WebGLBuffer | null;\n [GL.PIXEL_PACK_BUFFER_BINDING]?: WebGLBuffer | null;\n [GL.PIXEL_UNPACK_BUFFER_BINDING]?: WebGLBuffer | null;\n [GL.TEXTURE_BINDING_2D]?: WebGLTexture | null;\n [GL.TEXTURE_BINDING_2D_ARRAY]?: WebGLTexture | null;\n [GL.TEXTURE_BINDING_3D]?: WebGLTexture | null;\n [GL.TEXTURE_BINDING_CUBE_MAP]?: WebGLTexture | null;\n [GL.FRONT_FACE]?: GL.CW | GL.CCW;\n [GL.GENERATE_MIPMAP_HINT]?: GL.FASTEST | GL.NICEST | GL.DONT_CARE;\n [GL.LINE_WIDTH]?: number;\n [GL.POLYGON_OFFSET_FILL]?: boolean;\n [GL.POLYGON_OFFSET_FACTOR]?: number;\n [GL.POLYGON_OFFSET_UNITS]?: number;\n [GL.SAMPLE_ALPHA_TO_COVERAGE]?: boolean;\n [GL.SAMPLE_COVERAGE]?: boolean;\n [GL.RASTERIZER_DISCARD]?: boolean;\n [GL.SAMPLE_COVERAGE_VALUE]?: number;\n [GL.SAMPLE_COVERAGE_INVERT]?: boolean;\n [GL.SCISSOR_TEST]?: boolean;\n [GL.SCISSOR_BOX]?: [number, number, number, number] | NumberArray;\n [GL.STENCIL_TEST]?: boolean;\n [GL.STENCIL_CLEAR_VALUE]?: number;\n [GL.STENCIL_WRITEMASK]?: number;\n [GL.STENCIL_BACK_WRITEMASK]?: number;\n [GL.STENCIL_FUNC]?: GLFunction;\n [GL.STENCIL_REF]?: GLFunction;\n [GL.STENCIL_VALUE_MASK]?: GLFunction;\n [GL.STENCIL_BACK_FUNC]?: GLFunction;\n [GL.STENCIL_BACK_REF]?: GLFunction;\n [GL.STENCIL_BACK_VALUE_MASK]?: GLFunction;\n [GL.STENCIL_FAIL]?: GLStencilOp;\n [GL.STENCIL_PASS_DEPTH_FAIL]?: GLStencilOp;\n [GL.STENCIL_PASS_DEPTH_PASS]?: GLStencilOp;\n [GL.STENCIL_BACK_FAIL]?: GLStencilOp;\n [GL.STENCIL_BACK_PASS_DEPTH_FAIL]?: GLStencilOp;\n [GL.STENCIL_BACK_PASS_DEPTH_PASS]?: GLStencilOp;\n [GL.VIEWPORT]?: [number, number, number, number] | NumberArray;\n\n // WEBGL1 PIXEL PACK/UNPACK MODES\n [GL.PACK_ALIGNMENT]?: number;\n [GL.UNPACK_ALIGNMENT]?: number;\n [GL.UNPACK_FLIP_Y_WEBGL]?: boolean;\n [GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL]?: boolean;\n [GL.UNPACK_COLORSPACE_CONVERSION_WEBGL]?: GL.NONE | GL.BROWSER_DEFAULT_WEBGL;\n\n // WEBGL2 PIXEL PACK/UNPACK MODES\n // RASTERIZER_DISCARD ...\n [GL.PACK_ROW_LENGTH]?: number;\n [GL.PACK_SKIP_PIXELS]?: number;\n [GL.PACK_SKIP_ROWS]?: number;\n [GL.READ_FRAMEBUFFER_BINDING]?: Framebuffer | null;\n [GL.UNPACK_ROW_LENGTH]?: number;\n [GL.UNPACK_IMAGE_HEIGHT]?: number;\n [GL.UNPACK_SKIP_PIXELS]?: number;\n [GL.UNPACK_SKIP_ROWS]?: number;\n [GL.UNPACK_SKIP_IMAGES]?: number;\n};\n\nexport type GLFunctionParameters = {\n // Function-style setters\n framebuffer?: Framebuffer | null;\n blend?: boolean;\n blendColor?: [number, number, number, number] | NumberArray;\n blendEquation?: GLBlendEquation | [GLBlendEquation, GLBlendEquation];\n blendFunc?:\n | [GLBlendFunction, GLBlendFunction]\n | [GLBlendFunction, GLBlendFunction, GLBlendFunction, GLBlendFunction];\n\n clearColor?: [number, number, number, number] | NumberArray;\n clearDepth?: number;\n clearStencil?: number;\n\n colorMask?: [boolean, boolean, boolean, boolean];\n\n cull?: boolean;\n cullFace?: GL.FRONT | GL.BACK | GL.FRONT_AND_BACK;\n\n depthTest?: boolean;\n depthFunc?: GLFunction;\n depthMask?: boolean;\n depthRange?: [number, number] | NumberArray;\n\n dither?: boolean;\n\n derivativeHint?: GL.FASTEST | GL.NICEST | GL.DONT_CARE;\n\n frontFace?: GL.CW | GL.CCW;\n\n mipmapHint?: GL.FASTEST | GL.NICEST | GL.DONT_CARE;\n\n lineWidth?: number;\n\n polygonOffsetFill?: boolean;\n polygonOffset?: [number, number];\n\n sampleCoverage?: [number, boolean];\n\n scissorTest?: boolean;\n scissor?: [number, number, number, number] | NumberArray;\n\n stencilTest?: boolean;\n stencilMask?: number | [number, number];\n stencilFunc?:\n | [GLFunction, number, number]\n | [GLFunction, number, number, GLFunction, number, number];\n stencilOp?:\n | [GLStencilOp, GLStencilOp, GLStencilOp]\n | [GLStencilOp, GLStencilOp, GLStencilOp, GLStencilOp, GLStencilOp, GLStencilOp];\n viewport?: [number, number, number, number] | NumberArray;\n};\n\n/** WebGL style parameters object (with both GL constants and function style fields) */\nexport type GLParameters = GLValueParameters | GLFunctionParameters;\n"],"file":"webgl.js"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,54 +1,30 @@
|
|
|
1
|
+
import '@luma.gl/api';
|
|
1
2
|
import './init';
|
|
2
|
-
export
|
|
3
|
-
export { default as
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { default as
|
|
8
|
-
export
|
|
9
|
-
export { default as
|
|
10
|
-
export
|
|
11
|
-
export { default as
|
|
12
|
-
export
|
|
13
|
-
export { default as
|
|
14
|
-
export
|
|
15
|
-
export { default as
|
|
16
|
-
export type {
|
|
17
|
-
export { default as
|
|
18
|
-
export
|
|
19
|
-
export { default as Renderbuffer } from './classes/renderbuffer';
|
|
20
|
-
export type { ShaderProps } from './classes/shader';
|
|
21
|
-
export { Shader, VertexShader, FragmentShader } from './classes/shader';
|
|
22
|
-
export { clear, clearBuffer } from './classes/clear';
|
|
23
|
-
export { readPixelsToArray, readPixelsToBuffer, copyToDataUrl, copyToImage, copyToTexture, blit } from './classes/copy-and-blit';
|
|
24
|
-
export type { QueryProps } from './classes/query';
|
|
25
|
-
export { default as Query } from './classes/query';
|
|
26
|
-
export type { Texture3DProps } from './classes/texture-3d';
|
|
27
|
-
export { default as Texture3D } from './classes/texture-3d';
|
|
28
|
-
export type { TransformFeedbackProps } from './classes/transform-feedback';
|
|
29
|
-
export { default as TransformFeedback } from './classes/transform-feedback';
|
|
30
|
-
export type { VertexArrayObjectProps } from './classes/vertex-array-object';
|
|
31
|
-
export { default as VertexArrayObject } from './classes/vertex-array-object';
|
|
32
|
-
export type { VertexArrayProps } from './classes/vertex-array';
|
|
33
|
-
export { default as VertexArray } from './classes/vertex-array';
|
|
34
|
-
export { default as UniformBufferLayout } from './classes/uniform-buffer-layout';
|
|
35
|
-
export { setDeviceParameters } from './adapter/converters/set-device-parameters';
|
|
3
|
+
export { default as WebGLDevice } from './adapter/webgl-device';
|
|
4
|
+
export { default as WebGLCanvasContext } from './adapter/webgl-canvas-context';
|
|
5
|
+
export { default as Accessor } from './classic/accessor';
|
|
6
|
+
export type { ClassicBufferProps as BufferProps } from './classic/buffer';
|
|
7
|
+
export { default as Buffer } from './classic/buffer';
|
|
8
|
+
export { default as WEBGLResource, default as WebGLResource } from './adapter/objects/webgl-resource';
|
|
9
|
+
export { default as WEBGLBuffer } from './adapter/resources/webgl-buffer';
|
|
10
|
+
export { default as WEBGLTexture } from './adapter/resources/webgl-texture';
|
|
11
|
+
export { default as WEBGLShader } from './adapter/resources/webgl-shader';
|
|
12
|
+
export { default as WEBGLSampler } from './adapter/resources/webgl-sampler';
|
|
13
|
+
export { default as WEBGLFramebuffer } from './adapter/resources/webgl-framebuffer';
|
|
14
|
+
export { default as WEBGLRenderPipeline } from './adapter/resources/webgl-render-pipeline';
|
|
15
|
+
export { default as WEBGLCommandEncoder } from './adapter/resources/webgl-command-encoder';
|
|
16
|
+
export { default as WEBGLRenderPass } from './adapter/resources/webgl-render-pass';
|
|
17
|
+
export type { RenderbufferProps } from './adapter/objects/webgl-renderbuffer';
|
|
18
|
+
export { default as WEBGLRenderbuffer } from './adapter/objects/webgl-renderbuffer';
|
|
19
|
+
export { default as WEBGLVertexArrayObject } from './adapter/objects/webgl-vertex-array-object';
|
|
36
20
|
export { isWebGL, isWebGL2, getWebGL2Context, assertWebGLContext, assertWebGL2Context } from './context/context/webgl-checks';
|
|
37
21
|
export { cssToDeviceRatio, cssToDevicePixels } from './context/context/device-pixels';
|
|
38
|
-
export
|
|
22
|
+
export { setDeviceParameters, withDeviceParameters } from './adapter/converters/device-parameters';
|
|
23
|
+
export type { GLParameters } from './types/webgl';
|
|
39
24
|
export { getParameters, setParameters, resetParameters } from './context/parameters/unified-parameter-api';
|
|
40
25
|
export { withParameters } from './context/state-tracker/with-parameters';
|
|
41
26
|
export { trackContextState, pushContextState, popContextState } from './context/state-tracker/track-context-state';
|
|
42
27
|
export { polyfillContext } from './context/polyfill/polyfill-context';
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export { getDebugTableForVertexArray } from './debug/debug-vertex-array';
|
|
46
|
-
export { getDebugTableForProgramConfiguration } from './debug/debug-program-configuration';
|
|
47
|
-
export { getProgramBindings } from './helpers/get-program-bindings';
|
|
48
|
-
export { lumaStats } from './init';
|
|
49
|
-
export { log, assert, uid, isObjectEmpty } from '@luma.gl/api';
|
|
50
|
-
export { setPathPrefix, loadFile, loadImage } from '@luma.gl/api';
|
|
51
|
-
export type { GLContextOptions } from './_deprecated/context-api';
|
|
52
|
-
export { createGLContext, instrumentGLContext, resizeGLContext, hasFeature, hasFeatures, getFeatures, getContextInfo, getGLContextInfo, getContextLimits, getContextDebugInfo } from './_deprecated/context-api';
|
|
53
|
-
export { DEPRECATED_FEATURES as FEATURES } from './_deprecated/features';
|
|
28
|
+
export { getShaderLayout, getProgramBindings } from './adapter/helpers/get-shader-layout';
|
|
29
|
+
export { _checkFloat32ColorAttachment } from './adapter/converters/texture-formats';
|
|
54
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,cAAc,CAAC;AACtB,OAAO,QAAQ,CAAA;AAEf,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAC,kBAAkB,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACnD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AChB,eAAe,EAChB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AAGpE,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAC,4BAA4B,EAAC,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,39 +1,27 @@
|
|
|
1
|
+
import '@luma.gl/api';
|
|
1
2
|
import './init';
|
|
2
|
-
export { default as WebGLDevice
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as Texture3D } from './classes/texture-3d';
|
|
18
|
-
export { default as TransformFeedback } from './classes/transform-feedback';
|
|
19
|
-
export { default as VertexArrayObject } from './classes/vertex-array-object';
|
|
20
|
-
export { default as VertexArray } from './classes/vertex-array';
|
|
21
|
-
export { default as UniformBufferLayout } from './classes/uniform-buffer-layout';
|
|
22
|
-
export { setDeviceParameters } from './adapter/converters/set-device-parameters';
|
|
3
|
+
export { default as WebGLDevice } from './adapter/webgl-device';
|
|
4
|
+
export { default as WebGLCanvasContext } from './adapter/webgl-canvas-context';
|
|
5
|
+
export { default as Accessor } from './classic/accessor';
|
|
6
|
+
export { default as Buffer } from './classic/buffer';
|
|
7
|
+
export { default as WEBGLResource, default as WebGLResource } from './adapter/objects/webgl-resource';
|
|
8
|
+
export { default as WEBGLBuffer } from './adapter/resources/webgl-buffer';
|
|
9
|
+
export { default as WEBGLTexture } from './adapter/resources/webgl-texture';
|
|
10
|
+
export { default as WEBGLShader } from './adapter/resources/webgl-shader';
|
|
11
|
+
export { default as WEBGLSampler } from './adapter/resources/webgl-sampler';
|
|
12
|
+
export { default as WEBGLFramebuffer } from './adapter/resources/webgl-framebuffer';
|
|
13
|
+
export { default as WEBGLRenderPipeline } from './adapter/resources/webgl-render-pipeline';
|
|
14
|
+
export { default as WEBGLCommandEncoder } from './adapter/resources/webgl-command-encoder';
|
|
15
|
+
export { default as WEBGLRenderPass } from './adapter/resources/webgl-render-pass';
|
|
16
|
+
export { default as WEBGLRenderbuffer } from './adapter/objects/webgl-renderbuffer';
|
|
17
|
+
export { default as WEBGLVertexArrayObject } from './adapter/objects/webgl-vertex-array-object';
|
|
23
18
|
export { isWebGL, isWebGL2, getWebGL2Context, assertWebGLContext, assertWebGL2Context } from './context/context/webgl-checks';
|
|
24
19
|
export { cssToDeviceRatio, cssToDevicePixels } from './context/context/device-pixels';
|
|
20
|
+
export { setDeviceParameters, withDeviceParameters } from './adapter/converters/device-parameters';
|
|
25
21
|
export { getParameters, setParameters, resetParameters } from './context/parameters/unified-parameter-api';
|
|
26
22
|
export { withParameters } from './context/state-tracker/with-parameters';
|
|
27
23
|
export { trackContextState, pushContextState, popContextState } from './context/state-tracker/track-context-state';
|
|
28
24
|
export { polyfillContext } from './context/polyfill/polyfill-context';
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export { getDebugTableForVertexArray } from './debug/debug-vertex-array';
|
|
32
|
-
export { getDebugTableForProgramConfiguration } from './debug/debug-program-configuration';
|
|
33
|
-
export { getProgramBindings } from './helpers/get-program-bindings';
|
|
34
|
-
export { lumaStats } from './init';
|
|
35
|
-
export { log, assert, uid, isObjectEmpty } from '@luma.gl/api';
|
|
36
|
-
export { setPathPrefix, loadFile, loadImage } from '@luma.gl/api';
|
|
37
|
-
export { createGLContext, instrumentGLContext, resizeGLContext, hasFeature, hasFeatures, getFeatures, getContextInfo, getGLContextInfo, getContextLimits, getContextDebugInfo } from './_deprecated/context-api';
|
|
38
|
-
export { DEPRECATED_FEATURES as FEATURES } from './_deprecated/features';
|
|
25
|
+
export { getShaderLayout, getProgramBindings } from './adapter/helpers/get-shader-layout';
|
|
26
|
+
export { _checkFloat32ColorAttachment } from './adapter/converters/texture-formats';
|
|
39
27
|
//# sourceMappingURL=index.js.map
|