mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
move audio state vars into rendered target
This commit is contained in:
parent
9cc1c316d6
commit
4022703537
1 changed files with 25 additions and 0 deletions
|
@ -46,6 +46,19 @@ var RenderedTarget = function (sprite, runtime) {
|
|||
brightness: 0,
|
||||
ghost: 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Map of current audio effect values.
|
||||
* @type {!Object.<string, number>}
|
||||
*/
|
||||
this.audioEffects = {
|
||||
pitch: 0,
|
||||
pan: 0,
|
||||
echo: 0,
|
||||
reverb: 0,
|
||||
fuzz: 0.,
|
||||
robot: 0
|
||||
};
|
||||
};
|
||||
util.inherits(RenderedTarget, Target);
|
||||
|
||||
|
@ -151,6 +164,18 @@ RenderedTarget.prototype.rotationStyle = (
|
|||
RenderedTarget.ROTATION_STYLE_ALL_AROUND
|
||||
);
|
||||
|
||||
/**
|
||||
* Volume for playback of sounds, as a percentage
|
||||
* @type {number}
|
||||
*/
|
||||
RenderedTarget.prototype.volume = 100;
|
||||
|
||||
/**
|
||||
* Currently selected instrument
|
||||
* @type {number}
|
||||
*/
|
||||
RenderedTarget.prototype.currentInstrument = 0;
|
||||
|
||||
/**
|
||||
* Set the X and Y coordinates.
|
||||
* @param {!number} x New X coordinate, in Scratch coordinates.
|
||||
|
|
Loading…
Reference in a new issue