Skip to content

Commit 4467d23

Browse files
committed
Merge branch 'master' into texture-transform
2 parents ef534ae + 502f34a commit 4467d23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1634
-314
lines changed

Apps/Sandcastle/gallery/3D Tiles Interior.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
var viewer = new Cesium.Viewer('cesiumContainer');
3232

3333
var tileset = new Cesium.Cesium3DTileset({
34-
url: Cesium.IonResource.fromAssetId(5742)
34+
url: Cesium.IonResource.fromAssetId(19365)
3535
});
3636
viewer.scene.primitives.add(tileset);
3737

2.89 KB
Loading

Apps/Sandcastle/gallery/3D Tiles Point Cloud Shading.html

+2
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@
174174
destination: new Cesium.Cartesian3(4401744.644145314, 225051.41078911052, 4595420.374784433),
175175
orientation: new Cesium.HeadingPitchRoll(5.646733805039757, -0.276607153839886, 6.281110875400085)
176176
});
177+
178+
tilesetToViewModel(tileset);
177179
}
178180

179181
function checkZero(newValue) {

CHANGES.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
11
Change Log
22
==========
33

4+
### 1.57 - 2019-05-01
5+
6+
##### Additions :tada:
7+
* Added support for the `KHR_texture_transform` glTF extension. [#7549](https://github.com/AnalyticalGraphicsInc/cesium/pull/7549)
8+
9+
##### Fixes :wrench:
10+
* Fixed an error where `clampToHeightMostDetailed` or `sampleHeightMostDetailed` would crash if entities were created when the promise resolved. [#7690](https://github.com/AnalyticalGraphicsInc/cesium/pull/7690)
11+
12+
### 1.56.1 - 2019-04-02
13+
14+
##### Additions :tada:
15+
* `Resource.fetchImage` now takes a `preferImageBitmap` option to use `createImageBitmap` when supported to move image decode off the main thread. This option defaults to `false`.
16+
17+
##### Breaking Changes :mega:
18+
* The following breaking changes are relative to 1.56. The `Resource.fetchImage` behavior is now identical to 1.55 and earlier.
19+
* Changed `Resource.fetchImage` back to return an `Image` by default, instead of an `ImageBitmap` when supported. Note that an `ImageBitmap` cannot be flipped during texture upload. Instead, set `flipY : true` during fetch to flip it.
20+
* Changed the default `flipY` option in `Resource.fetchImage` to false. This only has an effect when ImageBitmap is used.
21+
422
### 1.56 - 2019-04-01
523

624
##### Breaking Changes :mega:
725
* `Resource.fetchImage` now returns an `ImageBitmap` instead of `Image` when supported. This allows for decoding images while fetching using `createImageBitmap` to greatly speed up texture upload and decrease frame drops when loading models with large textures. [#7579](https://github.com/AnalyticalGraphicsInc/cesium/pull/7579)
26+
* `Cesium3DTileStyle.style` now has an empty `Object` as its default value, instead of `undefined`. [#7567](https://github.com/AnalyticalGraphicsInc/cesium/issues/7567)
27+
* `Scene.clampToHeight` now takes an optional `width` argument before the `result` argument. [#7693](https://github.com/AnalyticalGraphicsInc/cesium/pull/7693)
28+
* In the `Resource` class, `addQueryParameters` and `addTemplateValues` have been removed. Please use `setQueryParameters` and `setTemplateValues` instead. [#7695](https://github.com/AnalyticalGraphicsInc/cesium/issues/7695)
829

930
##### Deprecated :hourglass_flowing_sand:
1031
* `Resource.fetchImage` now takes an options object. Use `resource.fetchImage({ preferBlob: true })` instead of `resource.fetchImage(true)`. The previous function definition will no longer work in 1.57. [#7579](https://github.com/AnalyticalGraphicsInc/cesium/pull/7579)
1132

1233
##### Additions :tada:
34+
* Added support for touch and hold gesture. The touch and hold delay can be customized by updating `ScreenSpaceEventHandler.touchHoldDelayMilliseconds`. [#7286](https://github.com/AnalyticalGraphicsInc/cesium/pull/7286)
1335
* `Resource.fetchImage` now has a `flipY` option to vertically flip an image during fetch & decode. It is only valid when `ImageBitmapOptions` is supported by the browser. [#7579](https://github.com/AnalyticalGraphicsInc/cesium/pull/7579)
1436
* Added `backFaceCulling` and `normalShading` options to `PointCloudShading`. Both options are only applicable for point clouds containing normals. [#7399](https://github.com/AnalyticalGraphicsInc/cesium/pull/7399)
15-
* Added support for touch and hold gesture. The touch and hold delay can be customized by updating `ScreenSpaceEventHandler.touchHoldDelayMilliseconds`. [#7286](https://github.com/AnalyticalGraphicsInc/cesium/pull/7286)
16-
* Added support for the `KHR_texture_transform` glTF extension. [#7549](https://github.com/AnalyticalGraphicsInc/cesium/pull/7549)
37+
* `Cesium3DTileStyle.style` reacts to updates and represents the current state of the style. [#7567](https://github.com/AnalyticalGraphicsInc/cesium/issues/7567)
1738

1839
##### Fixes :wrench:
1940
* Fixed the value for `BlendFunction.ONE_MINUS_CONSTANT_COLOR`. [#7624](https://github.com/AnalyticalGraphicsInc/cesium/pull/7624)
20-
* Fixed `HeadingPitchRoll.pitch` being `NaN` when using `.fromQuaternion` do to a rounding error
21-
for pitches close to +/- 90°. [#7654](https://github.com/AnalyticalGraphicsInc/cesium/pull/7654)
41+
* Fixed `HeadingPitchRoll.pitch` being `NaN` when using `.fromQuaternion` due to a rounding error for pitches close to +/- 90°. [#7654](https://github.com/AnalyticalGraphicsInc/cesium/pull/7654)
42+
* Fixed a type of crash caused by the camera being rotated through terrain. [#6783](https://github.com/AnalyticalGraphicsInc/cesium/issues/6783)
43+
* Fixed an error in `Resource` when used with template replacements using numeric keys. [#7668](https://github.com/AnalyticalGraphicsInc/cesium/pull/7668)
44+
* Fixed an error in `Cesium3DTilePointFeature` where `anchorLineColor` used the same color instance instead of cloning the color [#7686](https://github.com/AnalyticalGraphicsInc/cesium/pull/7686)
2245

2346
### 1.55 - 2019-03-01
2447

Source/Assets/IAU2006_XYS/IAU2006_XYS_0.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_1.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_10.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_11.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_12.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_13.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_14.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_15.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_16.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_17.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_18.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_19.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_2.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_20.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_21.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_22.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_23.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_24.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_25.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_26.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_27.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_3.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_4.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_5.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_6.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_7.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_8.json

+1-1
Large diffs are not rendered by default.

Source/Assets/IAU2006_XYS/IAU2006_XYS_9.json

+1-1
Large diffs are not rendered by default.

Source/Core/Ion.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define([
99
'use strict';
1010

1111
var defaultTokenCredit;
12-
var defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkZDJhY2VhYy0wYzljLTRiNWUtYmNhOC04OTQyZDk1YmZhMDkiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTUxNDUyMjc4fQ.B5BkE4TUBja1yOnT9sC6t8rrWghvVep21tzBq6r7aHo';
12+
var defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlZTNjZGYzNC0wMzI5LTQ3NGEtOWM1Yy03YzhhOWU4NTI2MGQiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTU0MTQwMTQxfQ.egqhQs14qStY2dQTESVJz2JnUoXFNz4EFkdl50yqoOw';
1313

1414
/**
1515
* Default settings for accessing the Cesium ion API.

Source/Core/IonResource.js

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ define([
172172
};
173173
if (defined(userOptions)) {
174174
options.flipY = userOptions.flipY;
175+
options.preferImageBitmap = userOptions.preferImageBitmap;
175176
}
176177
}
177178

Source/Core/Resource.js

+67-70
Original file line numberDiff line numberDiff line change
@@ -569,15 +569,17 @@ define([
569569
// objectToQuery escapes the placeholders. Undo that.
570570
var url = uri.toString().replace(/%7B/g, '{').replace(/%7D/g, '}');
571571

572-
var template = this._templateValues;
573-
var keys = Object.keys(template);
574-
if (keys.length > 0) {
575-
for (var i = 0; i < keys.length; i++) {
576-
var key = keys[i];
577-
var value = template[key];
578-
url = url.replace(new RegExp('{' + key + '}', 'g'), encodeURIComponent(value));
572+
var templateValues = this._templateValues;
573+
url = url.replace(/{(.*?)}/g, function(match, key) {
574+
var replacement = templateValues[key];
575+
if (defined(replacement)) {
576+
// use the replacement value from templateValues if there is one...
577+
return encodeURIComponent(replacement);
579578
}
580-
}
579+
// otherwise leave it unchanged
580+
return match;
581+
});
582+
581583
if (proxy && defined(this.proxy)) {
582584
url = this.proxy.getURL(url);
583585
}
@@ -599,21 +601,6 @@ define([
599601
}
600602
};
601603

602-
/**
603-
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
604-
* as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
605-
*
606-
* @param {Object} params The query parameters
607-
* @param {Boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
608-
*
609-
* @deprecated
610-
*/
611-
Resource.prototype.addQueryParameters = function(params, useAsDefault) {
612-
deprecationWarning('Resource.addQueryParameters', 'addQueryParameters has been deprecated and will be removed 1.45. Use setQueryParameters or appendQueryParameters instead.');
613-
614-
return this.setQueryParameters(params, useAsDefault);
615-
};
616-
617604
/**
618605
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
619606
* as opposed to adding them one at a time to the queryParameters property.
@@ -639,21 +626,6 @@ define([
639626
}
640627
};
641628

642-
/**
643-
* Combines the specified object and the existing template values. This allows you to add many values at once,
644-
* as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
645-
*
646-
* @param {Object} template The template values
647-
* @param {Boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.
648-
*
649-
* @deprecated
650-
*/
651-
Resource.prototype.addTemplateValues = function(template, useAsDefault) {
652-
deprecationWarning('Resource.addTemplateValues', 'addTemplateValues has been deprecated and will be removed 1.45. Use setTemplateValues.');
653-
654-
return this.setTemplateValues(template, useAsDefault);
655-
};
656-
657629
/**
658630
* Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.
659631
*
@@ -870,12 +842,13 @@ define([
870842

871843
/**
872844
* Asynchronously loads the given image resource. Returns a promise that will resolve to
873-
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if the browser supports `createImageBitmap` or otherwise an
845+
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if <code>preferImageBitmap</code> is true and the browser supports <code>createImageBitmap</code> or otherwise an
874846
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
875847
*
876848
* @param {Object} [options] An object with the following properties.
877849
* @param {Boolean} [options.preferBlob=false] If true, we will load the image via a blob.
878-
* @param {Boolean} [options.flipY=true] If true, image will be vertially flipped during decode. Only applies if the browser supports `createImageBitmap`.
850+
* @param {Boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
851+
* @param {Boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports <code>createImageBitmap</code>.
879852
* @returns {Promise.<ImageBitmap>|Promise.<Image>|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
880853
*
881854
*
@@ -897,14 +870,15 @@ define([
897870
*/
898871
Resource.prototype.fetchImage = function (options) {
899872
if (typeof options === 'boolean') {
900-
deprecationWarning('fetchImage-parameter-change', 'fetchImage now takes an options object in CesiumJS 1.56. Use resource.fetchImage({ preferBlob: true }) instead of resource.fetchImage(true).');
873+
deprecationWarning('fetchImage-parameter-change', 'fetchImage now takes an options object in CesiumJS 1.57. Use resource.fetchImage({ preferBlob: true }) instead of resource.fetchImage(true).');
901874
options = {
902875
preferBlob : options
903876
};
904877
}
905878
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
879+
var preferImageBitmap = defaultValue(options.preferImageBitmap, false);
906880
var preferBlob = defaultValue(options.preferBlob, false);
907-
var flipY = defaultValue(options.flipY, true);
881+
var flipY = defaultValue(options.flipY, false);
908882

909883
checkAndResetRequest(this.request);
910884

@@ -914,7 +888,11 @@ define([
914888
// 3. It's a blob URI
915889
// 4. It doesn't have request headers and we preferBlob is false
916890
if (!xhrBlobSupported || this.isDataUri || this.isBlobUri || (!this.hasHeaders && !preferBlob)) {
917-
return fetchImage(this, flipY);
891+
return fetchImage({
892+
resource: this,
893+
flipY: flipY,
894+
preferImageBitmap: preferImageBitmap
895+
});
918896
}
919897

920898
var blobPromise = this.fetchBlob();
@@ -923,40 +901,46 @@ define([
923901
}
924902

925903
var supportsImageBitmap;
904+
var useImageBitmap;
926905
var generatedBlobResource;
927906
var generatedBlob;
928907
return Resource.supportsImageBitmapOptions()
929908
.then(function(result) {
930909
supportsImageBitmap = result;
910+
useImageBitmap = supportsImageBitmap && preferImageBitmap;
931911
return blobPromise;
932912
})
933913
.then(function(blob) {
934914
if (!defined(blob)) {
935915
return;
936916
}
937-
if (supportsImageBitmap) {
917+
generatedBlob = blob;
918+
if (useImageBitmap) {
938919
return Resource._Implementations.createImageBitmapFromBlob(blob, flipY);
939920
}
940-
generatedBlob = blob;
941921
var blobUrl = window.URL.createObjectURL(blob);
942922
generatedBlobResource = new Resource({
943923
url: blobUrl
944924
});
945925

946-
return fetchImage(generatedBlobResource, flipY);
926+
return fetchImage({
927+
resource: generatedBlobResource,
928+
flipY: flipY,
929+
preferImageBitmap: false
930+
});
947931
})
948932
.then(function(image) {
949933
if (!defined(image)) {
950934
return;
951935
}
952-
if (supportsImageBitmap) {
953-
return image;
954-
}
955-
window.URL.revokeObjectURL(generatedBlobResource.url);
956-
957936
// This is because the blob object is needed for DiscardMissingTileImagePolicy
958937
// See https://github.com/AnalyticalGraphicsInc/cesium/issues/1353
959938
image.blob = generatedBlob;
939+
if (useImageBitmap) {
940+
return image;
941+
}
942+
943+
window.URL.revokeObjectURL(generatedBlobResource.url);
960944
return image;
961945
})
962946
.otherwise(function(error) {
@@ -968,7 +952,21 @@ define([
968952
});
969953
};
970954

971-
function fetchImage(resource, flipY) {
955+
/**
956+
* Fetches an image and returns a promise to it.
957+
*
958+
* @param {Object} [options] An object with the following properties.
959+
* @param {Resource} [options.resource] Resource object that points to an image to fetch.
960+
* @param {Boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
961+
* @param {Boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports <code>createImageBitmap</code>.
962+
*
963+
* @private
964+
*/
965+
function fetchImage(options) {
966+
var resource = options.resource;
967+
var flipY = options.flipY;
968+
var preferImageBitmap = options.preferImageBitmap;
969+
972970
var request = resource.request;
973971
request.url = resource.url;
974972
request.requestFunction = function() {
@@ -982,7 +980,7 @@ define([
982980

983981
var deferred = when.defer();
984982

985-
Resource._Implementations.createImage(url, crossOrigin, deferred, flipY);
983+
Resource._Implementations.createImage(url, crossOrigin, deferred, flipY, preferImageBitmap);
986984

987985
return deferred.promise;
988986
};
@@ -1006,7 +1004,11 @@ define([
10061004
request.state = RequestState.UNISSUED;
10071005
request.deferred = undefined;
10081006

1009-
return fetchImage(resource, flipY);
1007+
return fetchImage({
1008+
resource: resource,
1009+
flipY: flipY,
1010+
preferImageBitmap: preferImageBitmap
1011+
});
10101012
}
10111013

10121014
return when.reject(e);
@@ -1023,18 +1025,20 @@ define([
10231025
* @param {Object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
10241026
* @param {Object} [options.headers={}] Additional HTTP headers that will be sent.
10251027
* @param {DefaultProxy} [options.proxy] A proxy to be used when loading the resource.
1026-
* @param {Boolean} [options.flipY = true] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap.
1028+
* @param {Boolean} [options.flipY=false] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports <code>createImageBitmap</code>.
10271029
* @param {Resource~RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
10281030
* @param {Number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
10291031
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
1030-
* @param {Boolean} [options.preferBlob = false] If true, we will load the image via a blob.
1032+
* @param {Boolean} [options.preferBlob=false] If true, we will load the image via a blob.
1033+
* @param {Boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
10311034
* @returns {Promise.<ImageBitmap>|Promise.<Image>|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
10321035
*/
10331036
Resource.fetchImage = function (options) {
10341037
var resource = new Resource(options);
10351038
return resource.fetchImage({
10361039
flipY: options.flipY,
1037-
preferBlob: options.preferBlob
1040+
preferBlob: options.preferBlob,
1041+
preferImageBitmap: options.preferImageBitmap
10381042
});
10391043
};
10401044

@@ -1846,17 +1850,17 @@ define([
18461850
image.src = url;
18471851
}
18481852

1849-
Resource._Implementations.createImage = function(url, crossOrigin, deferred, flipY) {
1853+
Resource._Implementations.createImage = function(url, crossOrigin, deferred, flipY, preferImageBitmap) {
18501854
// Passing an Image to createImageBitmap will force it to run on the main thread
18511855
// since DOM elements don't exist on workers. We convert it to a blob so it's non-blocking.
18521856
// See:
18531857
// https://bugzilla.mozilla.org/show_bug.cgi?id=1044102#c38
18541858
// https://bugs.chromium.org/p/chromium/issues/detail?id=580202#c10
18551859
Resource.supportsImageBitmapOptions()
1856-
.then(function(result) {
1860+
.then(function(supportsImageBitmap) {
18571861
// We can only use ImageBitmap if we can flip on decode.
18581862
// See: https://github.com/AnalyticalGraphicsInc/cesium/pull/7579#issuecomment-466146898
1859-
if (!result) {
1863+
if (!(supportsImageBitmap && preferImageBitmap)) {
18601864
loadImageElement(url, crossOrigin, deferred);
18611865
return;
18621866
}
@@ -1883,16 +1887,9 @@ define([
18831887
};
18841888

18851889
Resource._Implementations.createImageBitmapFromBlob = function(blob, flipY) {
1886-
return Resource.supportsImageBitmapOptions()
1887-
.then(function(result) {
1888-
if (!result) {
1889-
return createImageBitmap(blob);
1890-
}
1891-
1892-
return createImageBitmap(blob, {
1893-
imageOrientation: flipY ? 'flipY' : 'none'
1894-
});
1895-
});
1890+
return createImageBitmap(blob, {
1891+
imageOrientation: flipY ? 'flipY' : 'none'
1892+
});
18961893
};
18971894

18981895
function decodeResponse(loadWithHttpResponse, responseType) {

0 commit comments

Comments
 (0)