kopia lustrzana https://github.com/backface/turtlestitch
let "getImageAttribute" deal with null costumes
rodzic
223e493316
commit
530afb1a60
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
### 2019-04-09
|
||||
* Blocks, Objects, Threads: new "getImageAttribute" reporter primitive
|
||||
* Objects, Threads: let "getImageAttribute" deal with null costumes
|
||||
|
||||
### 2019-04-08
|
||||
* Blocks, Objects, Threads: new "getSoundAttribute" reporter primitive
|
||||
|
|
|
|||
|
|
@ -8910,8 +8910,13 @@ Costume.prototype.rasterized = function () {
|
|||
};
|
||||
|
||||
Costume.prototype.pixels = function () {
|
||||
var i,
|
||||
pixels = [],
|
||||
var pixels = [],
|
||||
src,
|
||||
i;
|
||||
|
||||
if (!this.contents.width || !this.contents.height) {
|
||||
return pixels;
|
||||
}
|
||||
src = this.contents.getContext('2d').getImageData(
|
||||
0,
|
||||
0,
|
||||
|
|
|
|||
|
|
@ -4345,7 +4345,7 @@ Process.prototype.reportGetImageAttribute = function (choice, name) {
|
|||
this.blockReceiver().costumes.asArray(),
|
||||
function (c) {return c.name === name.toString(); }
|
||||
)
|
||||
),
|
||||
) || new Costume(),
|
||||
option = this.inputOption(choice);
|
||||
|
||||
switch (option) {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue