Re: WaveShaperNode.curve issues

On Sun, May 5, 2013 at 11:52 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> 1) Scripts can modify the content of the array at any time and it's not
> clear when those changes take effect.
> 2) This is especially acute when script can actually replace the "curve"
> array with a different JS array altogether (at any time).
> 3) What if the array is empty?
>

We could either treat this as setting the curve to its default (linear)
curve, or ignore, possibly throwing an exception.


> 4) What if it contains infinities or NaNs?
>

Ideally I suppose we would not accept such ArrayBuffers.  They could either
be ignored or an exception thrown.


> We could avoid all these problems by changing from "curve" to a method
> "setCurve(Float32Array)" that throws if the array is empty or contains
> non-finite values, and neuters the array so that no copy is required but JS
> can't modify the data anymore. But can we do that, or are we forced to
> support this for compatibility?
>

We can throw or ignore and still keep the attribute.


>
> Rob
> --
> q“qIqfq qyqoquq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qyqoquq,q
> qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq
> qsqiqnqnqeqrqsq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qtqhqeqmq.q qAqnqdq
> qiqfq qyqoquq qdqoq qgqoqoqdq qtqoq qtqhqoqsqeq qwqhqoq qaqrqeq qgqoqoqdq
> qtqoq qyqoquq,q qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q
> qEqvqeqnq qsqiqnqnqeqrqsq qdqoq qtqhqaqtq.q"
>

Received on Monday, 13 May 2013 18:45:22 UTC