mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-13 15:00:49 -04:00
Tweak whirl, color effects for #ifdef-based shader
Also fixed a typo in effect value conversion
This commit is contained in:
parent
d9a89fdd06
commit
8b461e0651
2 changed files with 35 additions and 16 deletions
src
|
@ -211,7 +211,7 @@ Drawable.prototype._buildShader = function () {
|
|||
var numEffects = Drawable.EFFECTS.length;
|
||||
|
||||
for (var index = 0; index < numEffects; ++index) {
|
||||
if (this._shaderIndex & (1 << index) != 0) {
|
||||
if ((this._shaderIndex & (1 << index)) != 0) {
|
||||
defines.push('#define ENABLE_' + Drawable.EFFECTS[index]);
|
||||
}
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ Drawable.prototype.updateProperties = function (properties) {
|
|||
else {
|
||||
this._shaderIndex &= ~mask;
|
||||
}
|
||||
var converter = Drawable.effectCoverter[propertyName];
|
||||
var converter = Drawable._effectCoverter[propertyName];
|
||||
this._uniforms['u_' + propertyName] = converter(rawValue);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue