B Bachrock Member Licensed User Longtime User Apr 29, 2014 #1 I have some simple shapes on my website that I just created using the new websockets. I want to create a ROTATE animation on a rectangle. I would like to specify the degree and also I would like to offset the point of origin for the rotation. Ultimately I would like the angle of rotation to be based on a dynamic value.
I have some simple shapes on my website that I just created using the new websockets. I want to create a ROTATE animation on a rectangle. I would like to specify the degree and also I would like to offset the point of origin for the rotation. Ultimately I would like the angle of rotation to be based on a dynamic value.
Erel B4X founder Staff member Licensed User Longtime User Apr 29, 2014 #2 Can you post the html / css files? Upvote 0
B Bachrock Member Licensed User Longtime User Apr 29, 2014 #3 Erel, attached is the Html code and the jrotate.js file that I found on the web to animate images and shapes. I have it working fine however it only works on the client side. I am serving this up using the HelloWorldWebApp websockets you recently provided. Again it works good other than I want to animate #square1 from the server side not the client side. So that when the object rotates all viewing the website will see it. I was wondering if the janimate library or JavaObject library would work for this. Also one key beyond simple rotation is I need to offset the rotation point as I have done in this html code. Thanks Attachments index.zip index.zip 6.1 KB · Views: 484 Upvote 0
Erel, attached is the Html code and the jrotate.js file that I found on the web to animate images and shapes. I have it working fine however it only works on the client side. I am serving this up using the HelloWorldWebApp websockets you recently provided. Again it works good other than I want to animate #square1 from the server side not the client side. So that when the object rotates all viewing the website will see it. I was wondering if the janimate library or JavaObject library would work for this. Also one key beyond simple rotation is I need to offset the rotation point as I have done in this html code. Thanks
Erel B4X founder Staff member Licensed User Longtime User Apr 29, 2014 #4 Do you see any animation when you open index.html in a browser? So that when the object rotates all viewing the website will see it. Click to expand... You should remember that each connected client sees a different instance of the website. They are not sharing the same content (unless you explicitly implement it). Example of server animation: http://basic4ppc.com:51042/smiley/ (part of the online server examples). Though in most cases it is better to implement animations in the client. Not the server. I was wondering if the janimate library or JavaObject library would work for this. Click to expand... No. The animation is not really related to any Java API. Only JavaScript. Upvote 0
Do you see any animation when you open index.html in a browser? So that when the object rotates all viewing the website will see it. Click to expand... You should remember that each connected client sees a different instance of the website. They are not sharing the same content (unless you explicitly implement it). Example of server animation: http://basic4ppc.com:51042/smiley/ (part of the online server examples). Though in most cases it is better to implement animations in the client. Not the server. I was wondering if the janimate library or JavaObject library would work for this. Click to expand... No. The animation is not really related to any Java API. Only JavaScript.
B Bachrock Member Licensed User Longtime User Apr 29, 2014 #5 Erel was the question "Do you see any animation when you open index.html in a browser? for me? Yes I have animation working when I click on a button I can get the square to rotate. Works quite nicely. Again I need to do it at the server so that all see the animation. I will study the smiley example and see if this gives me any ideas. I was hoping one of the libraries would help but apparently not. I have some other options too I will investigate. Thanks for the help.. Upvote 0
Erel was the question "Do you see any animation when you open index.html in a browser? for me? Yes I have animation working when I click on a button I can get the square to rotate. Works quite nicely. Again I need to do it at the server so that all see the animation. I will study the smiley example and see if this gives me any ideas. I was hoping one of the libraries would help but apparently not. I have some other options too I will investigate. Thanks for the help..
Erel B4X founder Staff member Licensed User Longtime User Apr 29, 2014 #6 Again I need to do it at the server so that all see the animation. Click to expand... This is not how web apps work. I recommend you to start with the online examples code: http://www.b4x.com/android/forum/threads/39811/#content to better understand the main concepts. Upvote 0
Again I need to do it at the server so that all see the animation. Click to expand... This is not how web apps work. I recommend you to start with the online examples code: http://www.b4x.com/android/forum/threads/39811/#content to better understand the main concepts.
B Bachrock Member Licensed User Longtime User Apr 29, 2014 #7 Ok thanks for the help. Yeah I am pretty new to all this so I apologize if my questions are not inline with reality. I do appreciate your help though. Upvote 0
Ok thanks for the help. Yeah I am pretty new to all this so I apologize if my questions are not inline with reality. I do appreciate your help though.