hdr-canvas 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hdr-canvas.cjs +19 -0
- package/dist/hdr-canvas.cjs.map +1 -1
- package/dist/hdr-canvas.d.ts +3 -1
- package/dist/hdr-canvas.js +18 -1
- package/dist/hdr-canvas.js.map +1 -1
- package/dist/hdr-canvas.min.js +1 -1
- package/dist/hdr-canvas.min.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +5 -1
- package/three/HDRWebGPUBackend.js +2 -2
- package/three/HDRWebGPURenderer.js +2 -2
package/dist/hdr-canvas.cjs
CHANGED
@@ -5940,9 +5940,28 @@ function initHDRCanvas(canvas) {
|
|
5940
5940
|
const ctx = canvas.getContext("2d", hdr_options);
|
5941
5941
|
return ctx;
|
5942
5942
|
}
|
5943
|
+
function defaultGetContextHDR() {
|
5944
|
+
HTMLCanvasElement.prototype._getContext = HTMLCanvasElement.prototype.getContext;
|
5945
|
+
HTMLCanvasElement.prototype.getContext = function (type, options) {
|
5946
|
+
if (options !== undefined) {
|
5947
|
+
options = Object.assign({}, options, hdr_options);
|
5948
|
+
}
|
5949
|
+
else {
|
5950
|
+
options = hdr_options;
|
5951
|
+
}
|
5952
|
+
return this._getContext(type, options);
|
5953
|
+
};
|
5954
|
+
}
|
5955
|
+
function resetGetContext() {
|
5956
|
+
if (typeof HTMLCanvasElement.prototype._getContext === "function") {
|
5957
|
+
HTMLCanvasElement.prototype.getContext = HTMLCanvasElement.prototype._getContext;
|
5958
|
+
}
|
5959
|
+
}
|
5943
5960
|
|
5944
5961
|
exports.Uint16Image = Uint16Image;
|
5945
5962
|
exports.checkHDR = checkHDR;
|
5946
5963
|
exports.checkHDRCanvas = checkHDRCanvas;
|
5964
|
+
exports.defaultGetContextHDR = defaultGetContextHDR;
|
5947
5965
|
exports.initHDRCanvas = initHDRCanvas;
|
5966
|
+
exports.resetGetContext = resetGetContext;
|
5948
5967
|
//# sourceMappingURL=hdr-canvas.cjs.map
|