kopia lustrzana https://github.com/backface/turtlestitch
new "penColorModel" setting, can e 'hsv' or 'hsl'
rodzic
56dc157084
commit
b82e380bf3
|
@ -51,6 +51,9 @@
|
|||
* German
|
||||
* Chinese, thanks, Simon!
|
||||
|
||||
### 2021-11-10
|
||||
* objects, store: new "penColorModel" setting, can e 'hsv' or 'hsl'
|
||||
|
||||
### 2021-11-09
|
||||
* objects, store: refactored block-migration mechanism
|
||||
* gui: changed display of project name in the IDE to PROJECT (SCENE)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<script src="src/widgets.js?version=2021-17-09"></script>
|
||||
<script src="src/blocks.js?version=2021-11-09"></script>
|
||||
<script src="src/threads.js?version=2021-11-08"></script>
|
||||
<script src="src/objects.js?version=2021-11-09"></script>
|
||||
<script src="src/objects.js?version=2021-11-10"></script>
|
||||
<script src="src/scenes.js?version=2021-10-12"></script>
|
||||
<script src="src/gui.js?version=2021-11-09"></script>
|
||||
<script src="src/paint.js?version=2021-07-05"></script>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<script src="src/maps.js?version=2021-06-15"></script>
|
||||
<script src="src/extensions.js?version=2021-11-08"></script>
|
||||
<script src="src/xml.js?version=2021-07-05"></script>
|
||||
<script src="src/store.js?version=2021-11-09"></script>
|
||||
<script src="src/store.js?version=2021-11-10"></script>
|
||||
<script src="src/locale.js?version=2021-10-28"></script>
|
||||
<script src="src/cloud.js?version=2021-02-04"></script>
|
||||
<script src="src/api.js?version=2021-07-05"></script>
|
||||
|
|
|
@ -87,7 +87,7 @@ BlockVisibilityDialogMorph*/
|
|||
|
||||
/*jshint esversion: 6*/
|
||||
|
||||
modules.objects = '2021-November-09';
|
||||
modules.objects = '2021-November-10';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -185,6 +185,7 @@ SpriteMorph.prototype.enableNesting = true;
|
|||
SpriteMorph.prototype.enableFirstClass = true;
|
||||
SpriteMorph.prototype.showingExtensions = false;
|
||||
SpriteMorph.prototype.useFlatLineEnds = false;
|
||||
SpriteMorph.prototype.penColorModel = 'hsl'; // or 'hsv'
|
||||
SpriteMorph.prototype.highlightColor = new Color(250, 200, 130);
|
||||
SpriteMorph.prototype.highlightBorder = 8;
|
||||
|
||||
|
@ -1904,7 +1905,7 @@ SpriteMorph.prototype.init = function (globals) {
|
|||
|
||||
this.isCachingImage = true;
|
||||
this.isFreeForm = true;
|
||||
this.cachedColorDimensions = this.color.hsl();
|
||||
this.cachedColorDimensions = this.color[this.penColorModel]();
|
||||
this.isDraggable = true;
|
||||
this.isDown = false;
|
||||
this.heading = 90;
|
||||
|
@ -1935,7 +1936,7 @@ SpriteMorph.prototype.fullCopy = function (forClone) {
|
|||
c.primitivesCache = {};
|
||||
c.paletteCache = {};
|
||||
c.imageData = {};
|
||||
c.cachedColorDimensions = c.color.hsl();
|
||||
c.cachedColorDimensions = c.color[this.penColorModel]();
|
||||
arr = [];
|
||||
this.inheritedAttributes.forEach(att => arr.push(att));
|
||||
c.inheritedAttributes = arr;
|
||||
|
@ -4480,7 +4481,7 @@ SpriteMorph.prototype.setColor = function (aColor) {
|
|||
this.rerender();
|
||||
this.silentGotoXY(x, y);
|
||||
}
|
||||
this.cachedColorDimensions = this.color.hsl();
|
||||
this.cachedColorDimensions = this.color[this.penColorModel]();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -7861,7 +7862,7 @@ StageMorph.prototype.init = function (globals) {
|
|||
|
||||
this.setExtent(this.dimensions);
|
||||
this.isCachingImage = true;
|
||||
this.cachedColorDimensions = this.color.hsl();
|
||||
this.cachedColorDimensions = this.color[this.penColorModel]();
|
||||
this.acceptsDrops = false;
|
||||
this.setColor(new Color(255, 255, 255));
|
||||
this.fps = this.frameRate;
|
||||
|
@ -9307,7 +9308,9 @@ StageMorph.prototype.setColor = function (aColor) {
|
|||
if (!this.color.eq(aColor, true)) { // observeAlpha
|
||||
this.color = aColor.copy();
|
||||
this.rerender();
|
||||
this.cachedColorDimensions = this.color.hsl();
|
||||
this.cachedColorDimensions = this.color[
|
||||
SpriteMorph.prototype.penColorModel
|
||||
]();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
10
src/store.js
10
src/store.js
|
@ -63,7 +63,7 @@ Project*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2021-November-09';
|
||||
modules.store = '2021-November-10';
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
/*
|
||||
|
@ -408,7 +408,9 @@ SnapSerializer.prototype.loadScene = function (xmlNode, remixID) {
|
|||
}
|
||||
if (model.stage.attributes.color) {
|
||||
scene.stage.color = this.loadColor(model.stage.attributes.color);
|
||||
scene.stage.cachedColorDimensions = scene.stage.color.hsl();
|
||||
scene.stage.cachedColorDimensions = scene.stage.color[
|
||||
SpriteMorph.prototype.penColorModel
|
||||
]();
|
||||
}
|
||||
if (model.stage.attributes.scheduled === 'true') {
|
||||
scene.stage.fps = 30;
|
||||
|
@ -714,7 +716,7 @@ SnapSerializer.prototype.loadSprites = function (xmlString, ide) {
|
|||
}
|
||||
if (model.attributes.color) {
|
||||
sprite.color = this.loadColor(model.attributes.color);
|
||||
sprite.cachedColorDimensions = sprite.color.hsl();
|
||||
sprite.cachedColorDimensions = sprite.color[sprite.penColorModel]();
|
||||
}
|
||||
if (model.attributes.pen) {
|
||||
sprite.penPoint = model.attributes.pen;
|
||||
|
@ -1453,7 +1455,7 @@ SnapSerializer.prototype.loadValue = function (model, object) {
|
|||
}
|
||||
if (model.attributes.color) {
|
||||
v.color = this.loadColor(model.attributes.color);
|
||||
v.cachedColorDimensions = v.color.hsl();
|
||||
v.cachedColorDimensions = v.color[v.penColorModel]();
|
||||
}
|
||||
if (model.attributes.pen) {
|
||||
v.penPoint = model.attributes.pen;
|
||||
|
|
Ładowanie…
Reference in New Issue