Re: WaveShaperNode.curve

I wish to correct an error in my previous email -

On Thu, May 16, 2013 at 7:46 PM, Srikumar Karaikudi Subramanian <
srikumarks@gmail.com> wrote:


> shaper1.curve = shaper2.curve = buffer; // One internal copy made in
> shaper2 which is shared with shaper1.
>
>
I just learnt that Javascript interprets "x = y = z" to mean "y = z; x =
z;". So the above combined assignment behaves exactly like -

shaper2.curve = buffer;
shaper1.curve = buffer;

.. resulting in two copies being made as well. Only one copy would be
necessary if the code were -

shaper1.curve = buffer; // Copy from Float32Array to Blob
shaper2.curve = shaper1.curve; // Shared Blob between shaper1 and shaper2.

Best,
-Kumar

Received on Friday, 17 May 2013 07:06:38 UTC