@scratch/scratch-render 12.1.2-membership-program → 12.2.0
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/node/scratch-render.js +6 -3
- package/dist/node/scratch-render.js.map +1 -1
- package/dist/web/scratch-render.js +6 -3
- package/dist/web/scratch-render.js.map +1 -1
- package/dist/web/scratch-render.min.js +6 -3
- package/dist/web/scratch-render.min.js.map +1 -1
- package/package.json +6 -6
- package/src/BitmapSkin.js +4 -3
|
@@ -32054,9 +32054,12 @@ var BitmapSkin = /*#__PURE__*/function (_Skin) {
|
|
|
32054
32054
|
// memory.
|
|
32055
32055
|
var textureData = bitmapData;
|
|
32056
32056
|
if (bitmapData instanceof HTMLCanvasElement) {
|
|
32057
|
-
// Given a HTMLCanvasElement get the image data to pass to
|
|
32058
|
-
//
|
|
32059
|
-
|
|
32057
|
+
// Given a HTMLCanvasElement, get the image data to pass to WebGL and the Silhouette. The 2D context was
|
|
32058
|
+
// likely already created, so `willReadFrequently` is likely ignored here, but it's good documentation and
|
|
32059
|
+
// may help if the code path changes someday.
|
|
32060
|
+
var context = bitmapData.getContext('2d', {
|
|
32061
|
+
willReadFrequently: true
|
|
32062
|
+
});
|
|
32060
32063
|
textureData = context.getImageData(0, 0, bitmapData.width, bitmapData.height);
|
|
32061
32064
|
}
|
|
32062
32065
|
if (this._texture === null) {
|