kopia lustrzana https://github.com/backface/turtlestitch
assume stage dimensions for "SWITCH TO COSTUME" with list if current costume dimensions don't fit
rodzic
1f6cdf16ff
commit
6624d3bc65
|
@ -6,6 +6,7 @@
|
||||||
* specifying alpha values is now optional for generating pixels in bitmaps (costumes), none means the pixel is solid
|
* specifying alpha values is now optional for generating pixels in bitmaps (costumes), none means the pixel is solid
|
||||||
* new "add comment" option in the block context menu, thanks, Rob Fidler!
|
* new "add comment" option in the block context menu, thanks, Rob Fidler!
|
||||||
* attribute selection in the SET block are now prefixed with "my"
|
* attribute selection in the SET block are now prefixed with "my"
|
||||||
|
* assume stage dimensions for "SWITCH TO COSTUME" with list if current costume dimensions don't fit
|
||||||
* added "bar / lines" option for plotting charts in the "frequency distribution analysis" library
|
* added "bar / lines" option for plotting charts in the "frequency distribution analysis" library
|
||||||
* new "48 kHz" option in the "sampling rate" dropdown
|
* new "48 kHz" option in the "sampling rate" dropdown
|
||||||
* **Notable Fixes:**
|
* **Notable Fixes:**
|
||||||
|
@ -18,6 +19,7 @@
|
||||||
* Greek translation updata, thanks, HM100!
|
* Greek translation updata, thanks, HM100!
|
||||||
* blocks, threads: prefixed attribute selection in the SET block with "my"
|
* blocks, threads: prefixed attribute selection in the SET block with "my"
|
||||||
* German translation update
|
* German translation update
|
||||||
|
* objects: assume stage dimensions for "SWITCH TO COSTUME" with list if current costume dimensions don't fit
|
||||||
|
|
||||||
### 2020-10-04
|
### 2020-10-04
|
||||||
* threads: made alpha values optional for generating costume pixels, none = solid
|
* threads: made alpha values optional for generating costume pixels, none = solid
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<script src="src/widgets.js?version=2020-07-27"></script>
|
<script src="src/widgets.js?version=2020-07-27"></script>
|
||||||
<script src="src/blocks.js?version=2020-10-05"></script>
|
<script src="src/blocks.js?version=2020-10-05"></script>
|
||||||
<script src="src/threads.js?version=2020-10-05"></script>
|
<script src="src/threads.js?version=2020-10-05"></script>
|
||||||
<script src="src/objects.js?version=2020-10-04"></script>
|
<script src="src/objects.js?version=2020-10-05"></script>
|
||||||
<script src="src/gui.js?version=2020-09-25"></script>
|
<script src="src/gui.js?version=2020-09-25"></script>
|
||||||
<script src="src/paint.js?version=2020-05-17"></script>
|
<script src="src/paint.js?version=2020-05-17"></script>
|
||||||
<script src="src/lists.js?version=2020-07-01"></script>
|
<script src="src/lists.js?version=2020-07-01"></script>
|
||||||
|
|
|
@ -84,7 +84,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, BooleanSlotMorph,
|
||||||
localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph,
|
localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph,
|
||||||
HandleMorph, AlignmentMorph, Process, XML_Element, WorldMap, copyCanvas*/
|
HandleMorph, AlignmentMorph, Process, XML_Element, WorldMap, copyCanvas*/
|
||||||
|
|
||||||
modules.objects = '2020-October-04';
|
modules.objects = '2020-October-05';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -3564,13 +3564,14 @@ SpriteMorph.prototype.doWearPreviousCostume = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
SpriteMorph.prototype.doSwitchToCostume = function (id, noShadow) {
|
SpriteMorph.prototype.doSwitchToCostume = function (id, noShadow) {
|
||||||
var w, h;
|
var w = 0, h = 0;
|
||||||
if (id instanceof List) { // try to turn a list of pixels into a costume
|
if (id instanceof List) { // try to turn a list of pixels into a costume
|
||||||
if (this.costume) {
|
if (this.costume) {
|
||||||
// recycle dimensions of current costume
|
// recycle dimensions of current costume
|
||||||
w = this.costume.width();
|
w = this.costume.width();
|
||||||
h = this.costume.height();
|
h = this.costume.height();
|
||||||
} else {
|
}
|
||||||
|
if (w * h !== id.length()) {
|
||||||
// assume stage's dimensions
|
// assume stage's dimensions
|
||||||
w = StageMorph.prototype.dimensions.x;
|
w = StageMorph.prototype.dimensions.x;
|
||||||
h = StageMorph.prototype.dimensions.y;
|
h = StageMorph.prototype.dimensions.y;
|
||||||
|
|
Ładowanie…
Reference in New Issue