From 7d877a624461e121f55f6d19bc4e5c8e0d90adef Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 8 Jan 2019 17:28:52 +0100 Subject: [PATCH] renamed "color" to "hue" in pen-blocks and in location sensor --- HISTORY.md | 3 ++- snap.html | 2 +- src/blocks.js | 10 +++++----- src/objects.js | 10 +++++----- src/threads.js | 10 +++++----- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 04589442..370bd0aa 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,7 +4,8 @@ ### 2019-01-08 * Objects: automatically parse csv files on import, experimental "raw data" and "parse" ops * Lists: fixed an off-by-one error in becomeLinked() -* Store: optimized serialization of lists with atomic data in project files +* Store: optimized serialization of lists with atomic data in project files +* Blocks, Objects, Threads: renamed "color" to "hue" in pen-blocks and in location sensor ### 2019-01-07 * Lists, Objects: directly export and import lists as csv files, under construction diff --git a/snap.html b/snap.html index cd13f4da..c0ab69a5 100755 --- a/snap.html +++ b/snap.html @@ -7,7 +7,7 @@ - + diff --git a/src/blocks.js b/src/blocks.js index b5f0182e..75860be1 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2019-January-04'; +modules.blocks = '2019-January-08'; var SyntaxElementMorph; var BlockMorph; @@ -1301,21 +1301,21 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { null, false, { - color : ['color'], + hue : ['hue'], saturation : ['saturation'], brightness : ['brightness'], transparency : ['transparency'] }, true ); - part.setContents(['front']); + part.setContents(['hue']); break; case '%asp': // aspect part = new InputSlotMorph( null, false, { - color : ['color'], + hue : ['hue'], saturation : ['saturation'], brightness : ['brightness'], transparency : ['transparency'], @@ -1324,7 +1324,7 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { }, true ); - part.setContents(['color']); + part.setContents(['hue']); break; case '%txtfun': part = new InputSlotMorph( diff --git a/src/objects.js b/src/objects.js index a0058a2a..d434be43 100644 --- a/src/objects.js +++ b/src/objects.js @@ -508,14 +508,14 @@ SpriteMorph.prototype.initBlocks = function () { type: 'command', category: 'pen', spec: 'set pen %hsva to %n', - defaults: [['color'], 50] + defaults: [['hue'], 50] }, changePenHSVA: { only: SpriteMorph, type: 'command', category: 'pen', spec: 'change pen %hsva by %n', - defaults: [['color'], 10] + defaults: [['hue'], 10] }, changeSize: { only: SpriteMorph, @@ -741,7 +741,7 @@ SpriteMorph.prototype.initBlocks = function () { type: 'reporter', category: 'sensing', spec: '%asp at %loc', - defaults: [['color']] + defaults: [['hue']] }, reportStackSize: { dev: true, @@ -1234,7 +1234,7 @@ SpriteMorph.prototype.initBlockMigrations = function () { }, setHue: { selector: 'setPenHSVA', - inputs: [['color']], + inputs: [['hue']], offset: 1 }, setBrightness: { @@ -1244,7 +1244,7 @@ SpriteMorph.prototype.initBlockMigrations = function () { }, changeHue: { selector: 'changePenHSVA', - inputs: [['color']], + inputs: [['hue']], offset: 1 }, changeBrightness: { diff --git a/src/threads.js b/src/threads.js index 5bc125f9..a59f35b1 100644 --- a/src/threads.js +++ b/src/threads.js @@ -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-January-04'; +modules.threads = '2019-January-08'; var ThreadManager; var Process; @@ -3091,7 +3091,7 @@ Process.prototype.goToLayer = function (name) { Process.prototype.setPenHSVA = function (name, num) { var choice = this.inputOption(name), - options = ['color', 'saturation', 'brightness', 'transparency'], + options = ['hue', 'saturation', 'brightness', 'transparency'], thisObj = this.blockReceiver(); if (thisObj instanceof SpriteMorph) { thisObj.setColorComponentHSVA(options.indexOf(choice), +num); @@ -3100,7 +3100,7 @@ Process.prototype.setPenHSVA = function (name, num) { Process.prototype.changePenHSVA = function (name, num) { var choice = this.inputOption(name), - options = ['color', 'saturation', 'brightness', 'transparency'], + options = ['hue', 'saturation', 'brightness', 'transparency'], thisObj = this.blockReceiver(); if (thisObj instanceof SpriteMorph) { thisObj.changeColorComponentHSVA(options.indexOf(choice), +num); @@ -3275,7 +3275,7 @@ Process.prototype.reportAspect = function (aspect, location) { // ---------------- // left input (aspect): // - // 'color' - hsv HUE on a scale of 0 - 100 + // 'hue' - hsv HUE on a scale of 0 - 100 // 'saturation' - hsv SATURATION on a scale of 0 - 100 // 'brightness' - hsv VALUE on a scale of 0 - 100 // 'transparency' - rgba ALPHA on a reversed (!) scale of 0 - 100 @@ -3301,7 +3301,7 @@ Process.prototype.reportAspect = function (aspect, location) { var choice = this.inputOption(aspect), target = this.inputOption(location), - options = ['color', 'saturation', 'brightness', 'transparency'], + options = ['hue', 'saturation', 'brightness', 'transparency'], idx = options.indexOf(choice), thisObj = this.blockReceiver(), thatObj,