diff --git a/HISTORY.md b/HISTORY.md index b3c9706e..9019e91b 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,10 +2,15 @@ ## in development: -* **New Features:** +* **New Minor Features:** * added "bar / lines" option for plotting charts in the "frequency distribution analysis" library * new "add comment" option in the block context menu, thanks, Rob Fidler! * new "48 kHz" option in the "sampling rate" dropdown +* **Notable Changes:** + * specifying alpha values are now optional for generating pixels in bitmaps (costumes), none means the pixel is solid + +### 2020-10-04 +* threads: made alpha values optional for generating costume pixels, none = solid ### 2020-09-28 * tweaked "frequency distribution analysis" library to plot lines in any color or style diff --git a/snap.html b/snap.html index bcf9a429..981f7576 100755 --- a/snap.html +++ b/snap.html @@ -9,7 +9,7 @@ - + diff --git a/src/threads.js b/src/threads.js index 2efec49b..32d03ad2 100644 --- a/src/threads.js +++ b/src/threads.js @@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK, TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/ -modules.threads = '2020-September-02'; +modules.threads = '2020-October-04'; var ThreadManager; var Process; @@ -5560,9 +5560,10 @@ Process.prototype.reportNewCostume = function (pixels, width, height, name) { dta = ctx.createImageData(width, height); for (i = 0; i < src.length; i += 1) { px = src[i].asArray(); - for (k = 0; k < 4; k += 1) { + for (k = 0; k < 3; k += 1) { dta.data[(i * 4) + k] = px[k]; } + dta.data[i * 4 + 3] = (px[3] === undefined ? 255 : px[3]); } ctx.putImageData(dta, 0, 0); return new Costume(