Open Vista Smalltalk in your browser.
Above is a demo of the new “AnimationCanvas” class. To run it, open a Smalltalk workspace, type “AnimationDemo open”, and “Do It” from right menu. The Lisp source code for the above demo is here.
The graphics model in Vista Smalltalk has three core classes:
- DesignerCanvas allows users to select and move individual objects in a panel
- AnimationCanvas (a subclass of DesignerCanvas) provides animation capabilities for objects
- AbstractSprite is the primitive type for graphic objects
AnimationCanvas simulates physical constraints to help animations appear realistic:
- boundaries – so that objects remain within the window
- force fields – such as gravitation or magnetic fields
- collision detection amongst objects
- momentum conservation after collisions
- object behaviors by type
- control of animation speed
Currently, there are only a few Lisp primitives for setting animation parameters, but the situation should improve quite dramatically over the coming weeks.
