renamed 'colorAtSprite' to 'colorBelowSprite'

(first step to refactoring it altogether)
pull/89/head
jmoenig 2019-03-17 19:28:43 +01:00
rodzic 4fdbdf3e61
commit 65944c9849
3 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -50,6 +50,9 @@
* Catalan, thanks, Joan!
* German
### 2019-03-17
* Threads: renamed 'colorAtSprite' to 'colorBelowSprite' (first step to refactoring it altogether)
### 2019-03-15
* Objects: improved microphone pitch detection

Wyświetl plik

@ -7,7 +7,7 @@
<script type="text/javascript" src="src/morphic.js?version=2019-02-07"></script>
<script type="text/javascript" src="src/widgets.js?version=2018-10-02"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-03-11"></script>
<script type="text/javascript" src="src/threads.js?version=2019-03-12"></script>
<script type="text/javascript" src="src/threads.js?version=2019-03-17"></script>
<script type="text/javascript" src="src/objects.js?version=2019-03-15"></script>
<script type="text/javascript" src="src/gui.js?version=2019-03-11"></script>
<script type="text/javascript" src="src/paint.js?version=2019-02-22"></script>

Wyświetl plik

@ -62,7 +62,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, Map*/
modules.threads = '2019-March-12';
modules.threads = '2019-March-17';
var ThreadManager;
var Process;
@ -3347,7 +3347,7 @@ Process.prototype.reportAspect = function (aspect, location) {
}
return this.spritesAtPoint(point, stage);
} else {
clr = this.colorAtSprite(thisObj);
clr = this.colorBelowSprite(thisObj);
}
} else if (target === 'mouse-pointer') {
if (choice === 'sprites') {
@ -3374,7 +3374,7 @@ Process.prototype.reportAspect = function (aspect, location) {
thatObj.rotationCenter() : thatObj.center();
return this.spritesAtPoint(point, stage);
} else {
clr = this.colorAtSprite(thatObj);
clr = this.colorBelowSprite(thatObj);
}
} else {
return;
@ -3391,7 +3391,7 @@ Process.prototype.reportAspect = function (aspect, location) {
return clr.hsv()[idx] * 100;
};
Process.prototype.colorAtSprite = function (sprite) {
Process.prototype.colorBelowSprite = function (sprite) {
// private - helper function for aspect of location
// answer the color underneath the layer of the sprite's rotation center
var point = sprite instanceof SpriteMorph ? sprite.rotationCenter()