Appreciate your expert help on this…

I'm no coder, and as an exercise in learning Javascript, I tried to
help Adam by writing a patch to take in a variable for the number of
sides, and to output a structure to create a mesh from.

The Javascript is a terribly hacked version of the Mouse Ribbon.qtz
Apple example. (disclaimer: I can't code)

var _Vertices = [];
var segmentSize = 3;

function (__structure Vertices) main (__number numberOfSegments) {
        var result = new Object();
        var v=0;
        if (numberOfSegments != null) {
                var arcLength =(360/60);
                for (var i=0; i < 360;60){
                        var pos = i/60;
                        _Vertices[v++] = [Math.sin(i), Math.cos(i),
0.0 ];                }
        }

        return result;
}


Problem is, if I paste this in a (unconnected) Javascript patch,
Quartz Composer becomes unresponsive, requires me to Force Quit.


Is this normal?


 ie, that some poorly written Javascript can make QC require a force
quit (losing work). Or is my install acting weird?



Keith



########

On Wed, Nov 24, 2010 at 5:25 AM, adam morten <[email protected]> wrote:
> I would like to create a circle which reacts to audio input. I want the 
> circle to change colour with frequency and change size with volume. I have 
> done this but the part which I am struggling with is that when the frequency 
> changes I want the circle to change through a series of shapes in this order; 
> circle, octagon, heptagon, hexagon, pentagon, square, triangle. So when the 
> frequency is highest it will be a triangle.
>
> Thank you in advance,
> Adam _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quartzcomposer-dev/songcarver%40gmail.com
>
> This email sent to [email protected]
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to