refactored threads.js with new Morphic constants

pull/95/head
jmoenig 2020-07-01 18:59:32 +02:00
rodzic 16d7374730
commit fb75db25c9
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -8,7 +8,7 @@
<script src="src/symbols.js?version=2020-06-17"></script> <script src="src/symbols.js?version=2020-06-17"></script>
<script src="src/widgets.js?version=2020-05-06"></script> <script src="src/widgets.js?version=2020-05-06"></script>
<script src="src/blocks.js?version=2020-07-01"></script> <script src="src/blocks.js?version=2020-07-01"></script>
<script src="src/threads.js?version=2020-06-27"></script> <script src="src/threads.js?version=2020-07-01"></script>
<script src="src/objects.js?version=2020-07-01"></script> <script src="src/objects.js?version=2020-07-01"></script>
<script src="src/gui.js?version=2020-07-01"></script> <script src="src/gui.js?version=2020-07-01"></script>
<script src="src/paint.js?version=2020-05-17"></script> <script src="src/paint.js?version=2020-05-17"></script>

Wyświetl plik

@ -58,10 +58,10 @@ MultiArgMorph, Point, ReporterBlockMorph, SyntaxElementMorph, contains, Costume,
degrees, detect, nop, radians, ReporterSlotMorph, CSlotMorph, RingMorph, Sound, degrees, detect, nop, radians, ReporterSlotMorph, CSlotMorph, RingMorph, Sound,
IDE_Morph, ArgLabelMorph, localize, XML_Element, hex_sha512, TableDialogMorph, IDE_Morph, ArgLabelMorph, localize, XML_Element, hex_sha512, TableDialogMorph,
StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map, StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK,
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/ TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
modules.threads = '2020-June-27'; modules.threads = '2020-July-01';
var ThreadManager; var ThreadManager;
var Process; var Process;
@ -4571,7 +4571,7 @@ Process.prototype.colorAtSprite = function (sprite) {
child, child,
i; i;
if (!stage) {return new Color(); } if (!stage) {return BLACK; }
for (i = stage.children.length; i > 0; i -= 1) { for (i = stage.children.length; i > 0; i -= 1) {
child = stage.children[i - 1]; child = stage.children[i - 1];
if ((child !== sprite) && if ((child !== sprite) &&
@ -4585,7 +4585,7 @@ Process.prototype.colorAtSprite = function (sprite) {
if (stage.bounds.containsPoint(point)) { if (stage.bounds.containsPoint(point)) {
return stage.getPixelColor(point); return stage.getPixelColor(point);
} }
return new Color(); return BLACK;
}; };
Process.prototype.colorBelowSprite = function (sprite) { Process.prototype.colorBelowSprite = function (sprite) {
@ -4601,7 +4601,7 @@ Process.prototype.colorBelowSprite = function (sprite) {
child, child,
i; i;
if (!stage) {return new Color(); } if (!stage) {return BLACK; }
for (i = 0; i < stage.children.length; i += 1) { for (i = 0; i < stage.children.length; i += 1) {
if (!found) { if (!found) {
child = stage.children[i]; child = stage.children[i];
@ -4618,7 +4618,7 @@ Process.prototype.colorBelowSprite = function (sprite) {
if (below.bounds.containsPoint(point)) { if (below.bounds.containsPoint(point)) {
return below.getPixelColor(point); return below.getPixelColor(point);
} }
return new Color(); return BLACK;
}; };
Process.prototype.spritesAtPoint = function (point, stage) { Process.prototype.spritesAtPoint = function (point, stage) {