[Jprogramming] 2D animation
Louis de Forcrand
olius at bluewin.ch
Wed Feb 8 16:42:27 UTC 2017
Hi everyone,
I've been looking into the Qt facilities available in J recently, and I read that 2D graphics are best done with gl2.
I hacked together a simple program that displays a ball which bounces around the isidraw container. Having never really done any graphics-related programming, I used the window driver's timer function to call sys_timer at regular intervals, which erases the previous circle, draws the new one, and updates speed and position global vars.
The advantage of using the wd timer is that I can create a button which calls "wd 'timer 0; pclose'" in order to exit the program in a clean fashion without having to break.
I suspect there is a better way to do this; how would the seasoned J programmers on this forum go about creating such an animation?
All help appreciated!
Louis
PS: I hardly have any web-related (html, css, php, etc.) programming skills, but any info about doing this in JHS is welcome as well.
More information about the Programming
mailing list