mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Warn on set or change unknown color parameter
This commit is contained in:
parent
aab1b834d6
commit
b5ad5e1f6b
1 changed files with 4 additions and 1 deletions
|
@ -5,7 +5,7 @@ const Clone = require('../util/clone');
|
||||||
const Color = require('../util/color');
|
const Color = require('../util/color');
|
||||||
const MathUtil = require('../util/math-util');
|
const MathUtil = require('../util/math-util');
|
||||||
const RenderedTarget = require('../sprites/rendered-target');
|
const RenderedTarget = require('../sprites/rendered-target');
|
||||||
|
const log = require('../util/log');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum for pen color parameters.
|
* Enum for pen color parameters.
|
||||||
|
@ -431,6 +431,9 @@ class Scratch3PenBlocks {
|
||||||
case ColorParam.TRANSPARENCY:
|
case ColorParam.TRANSPARENCY:
|
||||||
penState.transparency = this._clampColorParam(value + (change ? penState.transparency : 0));
|
penState.transparency = this._clampColorParam(value + (change ? penState.transparency : 0));
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
log.warn(`Tried to set or change unknown color parameter: ${param}`);
|
||||||
|
|
||||||
}
|
}
|
||||||
this._updatePenColor(penState);
|
this._updatePenColor(penState);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue