I am trying to take structure as input of a javascript patch but getting 
nothing during execution.
The structure input port is connected with the output port of another path that 
outputs a 2 dimensional structure with first dimension as indexed and second is 
keyed. During execution when I hover my mouse cursor over output port it shows 
the members and keys but the input port of my script patch is always blank. 
What do I do to make it work please help!
Below is the code
function (__structure transformedCursors, __index count) main (__structure 
inputCursors){       var result = new Object();      var xpos, ypos, xspeed, 
yspeed; var touchPoints = new Object(); if(inputCursors != null)        {       
        if(inputCursors.length >= 1)                    touchPoints = 
inputCursors[0];                                  if(inputCursors.length >= 2)  
          {                                       touchPoints.xpos = 
(inputCursors[0].xpos + inputCursors[1].xpos)/2                      
touchPoints.ypos = (inputCursors[0].ypos + inputCursors[1].ypos)/2              
        touchPoints.xspeed = (inputCursors[0].xpos + inputCursors[1].xspeed)/2  
                touchPoints.yspeed = (inputCursors[0].xpos + 
inputCursors[1].yspeed)/2          }       
                if(inputCursors.length >= 3)            {                       
                touchPoints.xpos = (inputCursors[0].xpos + inputCursors[1].xpos 
+ inputCursors[2].xpos)/2                       touchPoints.ypos = 
(inputCursors[0].ypos + inputCursors[1].ypos + inputCursors[2].ypos)/2          
             touchPoints.xspeed = (inputCursors[0].xspeed + 
inputCursors[1].xspeed + inputCursors[2].xspeed)/2                       
touchPoints.yspeed = (inputCursors[0].yspeed + inputCursors[1].yspeed + 
inputCursors[2].yspeed)/2               }       
                result.count = inputCursors.length;
        }       result.transformedCursors = touchPoints;        return result;}
ThanksNisar                                       
 _______________________________________________
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