I was reading about animation using JavaFX, and stumbled across a blog which explained it quite nicely.
I wrote the jAnimation library to see if it was possible to use animation from B4J, obviously it was or else I would not have posted this.
Two things about the library :
1, It exposes loads of methods and fields, which I frankly don't understand (more reading required).
2, It only works (the demo I have included) in RELEASE mode, if run under Debug mode, you get one frame per run.
I have included the source for the library, just in case someone spots something I missed and can improve upon it.
The web address for the picture I used is in the B4J source, that way you wont have to calculate the offsets etc if you use the same one for testing.
Latest version now 1.10 for library
Added Transitions - can now move items on a path, make them fade etc.
AnimationTest shows how to call the new routines.
Again source code for library included.
New Version 1.15
use in conjunction with simpleGame , just a demo to show what can be done with the new functions etc
I have included the image file for the paper plane in the project zip.
I drew the picture, as you see I am no artist, but it could be an animated bird for example flying around.
Working on documenting the library now.
Enjoy
I wrote the jAnimation library to see if it was possible to use animation from B4J, obviously it was or else I would not have posted this.
Two things about the library :
1, It exposes loads of methods and fields, which I frankly don't understand (more reading required).
2, It only works (the demo I have included) in RELEASE mode, if run under Debug mode, you get one frame per run.
I have included the source for the library, just in case someone spots something I missed and can improve upon it.
The web address for the picture I used is in the B4J source, that way you wont have to calculate the offsets etc if you use the same one for testing.
Latest version now 1.10 for library
Added Transitions - can now move items on a path, make them fade etc.
AnimationTest shows how to call the new routines.
Again source code for library included.
New Version 1.15
use in conjunction with simpleGame , just a demo to show what can be done with the new functions etc
I have included the image file for the paper plane in the project zip.
I drew the picture, as you see I am no artist, but it could be an animated bird for example flying around.
Working on documenting the library now.
Enjoy
Attachments
Last edited: