mirror of https://github.com/CesiumGS/cesium.git
Merge pull request #12871 from CesiumGS/revert-createBitMap-options
Revert create bit map options
This commit is contained in:
commit
a899c1c369
|
|
@ -7,6 +7,7 @@
|
|||
#### Fixes :wrench:
|
||||
|
||||
- Materials loaded from type now respect submaterials present in the referenced material type. [#10566](https://github.com/CesiumGS/cesium/issues/10566)
|
||||
- Reverts `createImageBitmap` options update to continue support for older browsers [#12846](https://github.com/CesiumGS/cesium/issues/12846)
|
||||
- Fix flickering artifact in Gaussian splat models caused by incorrect sorting results. [#12662](https://github.com/CesiumGS/cesium/issues/12662)
|
||||
|
||||
#### Additions :tada:
|
||||
|
|
|
|||
|
|
@ -231,6 +231,8 @@ Resource.supportsImageBitmapOptions = function () {
|
|||
})
|
||||
.then(function (blob) {
|
||||
const imageBitmapOptions = {
|
||||
// 'from-image' is deprecated, new option is 'none'. However, we still need to support older browsers,
|
||||
// and there's no good way to detect support for these options. For now, continue to use 'from-image'. See: https://github.com/CesiumGS/cesium/issues/12846
|
||||
imageOrientation: "flipY", // default is "from-image"
|
||||
premultiplyAlpha: "none", // default is "default"
|
||||
colorSpaceConversion: "none", // default is "default"
|
||||
|
|
@ -2036,7 +2038,9 @@ Resource.createImageBitmapFromBlob = function (blob, options) {
|
|||
);
|
||||
|
||||
return createImageBitmap(blob, {
|
||||
imageOrientation: options.flipY ? "flipY" : "from-image",
|
||||
// 'from-image' is deprecated, new option is 'none'. However, we still need to support older browsers,
|
||||
// and there's no good way to detect support for these options. For now, continue to use 'from-image'. See: https://github.com/CesiumGS/cesium/issues/12846
|
||||
imageOrientation: options.flipY ? "flipY" : "none",
|
||||
premultiplyAlpha: options.premultiplyAlpha ? "premultiply" : "none",
|
||||
colorSpaceConversion: options.skipColorSpaceConversion ? "none" : "default",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ describe("Core/loadImageFromTypedArray", function () {
|
|||
})
|
||||
.then(function () {
|
||||
expect(window.createImageBitmap).toHaveBeenCalledWith(blob, {
|
||||
imageOrientation: "from-image",
|
||||
imageOrientation: "none",
|
||||
premultiplyAlpha: "none",
|
||||
colorSpaceConversion: "default",
|
||||
});
|
||||
|
|
@ -91,7 +91,7 @@ describe("Core/loadImageFromTypedArray", function () {
|
|||
return loadImageFromTypedArray(options)
|
||||
.then(function () {
|
||||
expect(window.createImageBitmap).toHaveBeenCalledWith(blob, {
|
||||
imageOrientation: "from-image",
|
||||
imageOrientation: "none",
|
||||
premultiplyAlpha: "none",
|
||||
colorSpaceConversion: "none",
|
||||
});
|
||||
|
|
@ -102,7 +102,7 @@ describe("Core/loadImageFromTypedArray", function () {
|
|||
})
|
||||
.then(function () {
|
||||
expect(window.createImageBitmap).toHaveBeenCalledWith(blob, {
|
||||
imageOrientation: "from-image",
|
||||
imageOrientation: "none",
|
||||
premultiplyAlpha: "none",
|
||||
colorSpaceConversion: "default",
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue