From 402270353750fe9b540219c636c5c63d14f6ecb0 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 11 Jan 2017 15:42:07 -0500 Subject: [PATCH] move audio state vars into rendered target --- src/sprites/rendered-target.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index b5b89365c..d7a94fd06 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -46,6 +46,19 @@ var RenderedTarget = function (sprite, runtime) { brightness: 0, ghost: 0 }; + + /** + * Map of current audio effect values. + * @type {!Object.} + */ + 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.