Web design & Development

2D Animations jscript
Author: Sam Ruos
Simple viewport control: Using Javascript & JQuery
Knowing your perimeter of your viewport. That was my approach before I put my simple idea into practice, and the idea was to just move a DIV element around/across certain boundary within the internet browser.

Wouldn't you like to have control over your DIV elements' movements? There are known issues where javascript and jquery don't seem to work as expected with browsers like FireFox and Safari.

Open your console and take a peek at the codes to how simple my approach is and let me know your views.



Click on object (move within viewport)

Designed to:

  • On every click (left-mouse-button), the object will move automatically according to a fixed path as described below: around the edges of the viewport, diagonally across the viewport.
  • Around the edges of the viewport, diagonally across the viewport.
  • Diagonally across the viewport, the back to its original position (top-left of viewport).
  • To the center of the viewport.
  • To a diamond shape at the center of the viewport.
  • Finally, to a clock-wise circular move at the center of the viewport.

Case study:

When moving diagonally, the object doesn't land exactly right on the corner without having to slide into position relating to x/y axes

ie. it's sliding vertically into position (at least 1/2 of the object size)

I might need to play with pi/cos/sin... perhaps?



Tools:

"Links to Tools & Tips for open source resources"

Crooked Palm Records
Royalty-free Audio-loops Downloads
URL: https://crookedpalmrecords.com/

3D Software free Downloads
Full-fledged 3D software
URL: https://www.blender.org

3D Texture Downloads
Tools & Tips
URL: https://www.poliigon.com/

3D Texture Downloads

URL: https://cc0textures.com/

Programmers quick references
Tools & Tips
URL: https://www.w3schools.com/

Open source Scripting language
Downloads & Documenttations
URL: https://www.php.net/

Open source Database
Downloads & Documentations
URL: https://www.mysql.com/

Open source Database
Downloads & Documentations
URL: https://mariadb.com/

Action:

"You gotta play it..."
Open for collaborations. Drop me an email!
eMail: sam.ruos@gsunit.com