Forums > Javascript

MGraphics – moving circle

May 1, 2012 | 10:35 am

I have some questions regarding the attached patch:
-why is the circle at the beginning not in the center?
-why is the screen not empty when you open the patch?
-why does the patch crash after it has been running for a while?

Any help very much appreciated.



ak
May 1, 2012 | 12:15 pm

1) x,y describe the position of upper left corner of rectangle with inscribed ellipse.
2) because jsui paints its contents (also do so on resize, lock/unlock patcher). As name suggests it’s for UI, and there this is desirable behavior. I used to do some animation in jsui but moved to jitter (due to – ironically – jitter of jsui)
3) i think it’s a yet another bug… inevitably ends with crash here [max 6.0.4 on lion]. log attached.


May 2, 2012 | 6:10 am

Andrzej,
thanks a lot for your help.
What do you do then? Create image matrices in a js object using Javascript and GLSketch and then send this to a pwindow? Is there a library I have to initialise to use OpenGL?


May 6, 2012 | 9:17 am

I changed the patch hoping that the banging is the problem but the patch crashes even without the banging. Any idea why this is?


May 6, 2012 | 7:59 pm

This is the gl.sketch version. That does not seem to crash. How do I bring the latest circle to the front (rather than it being in the back)?

Attachments:
  1. rectangle.js

Viewing 5 posts - 1 through 5 (of 5 total)