Mekanimo 1.2 Beta is the release candidate for Mekanimo’s first commercial release. To download it please go to http://www.mekanimo.net.
The sprite browser (see Figure 1) allows you to view sprites before assigning them to a rigid body. The multi-picture sprites are displayed as animations. The user can toggle the “No sprite” checkbox located on the upper right corner to inactivate assigned sprite.
Figure 1: Sprite Browser
The texture browser (see Figure 2) allows you to view textures before assigning them to a rigid body. Texture blocks are displayed in their stitched state. The user can toggle the “No texture” checkbox located on the upper right corner to inactivate assigned texture.
Figure 2: Texture Browser
The sound sampler (see Figure 3) allows you to listen to the sounds before assigning them. The user can assign sounds to conditions defined via the behavior dialog box.
Figure 3: Sound Sampler
When creating instructional exhibits or animations, text plays an important role in the presentation. In previous versions, the user was only able to edit fonts using Python code to manipulate a wxPython font object. Now, the user can change fonts via the Font dialog box, as shown in Figure 5.
Figure 5: Font Dialog
When the same animated sprite is used for several objects in a model, the animations are in synch by default (see Figure 6). The user can change the rigid bodies’ spriteSequenceOffset property from the object tree (see Figure 5) to make them look more realistic. For example, if you assign the same sprite to two circles with one of the circles having the spriteSequenceOffset set at 3, the canvas will display the fourth sprite for this circle and first sprite for the other one at the first time-step (see Figure 7).
Figure 5: Sprite Sequence Offset
Figure 6: Animated Sprites with spriteSequenceOffset = 0
Figure 7: Animated Sprites with spriteSequenceOffset Set to Different Values
In this version, rigid bodies can be displayed as 3D-like blobs by setting their showBlob property to True. For circles, blobs resemble spheres; for rectangles and polygons, they resemble ellipsoids (see Figures 8 and 9). The following code snippet can be used to show blobs for all rigid bodies in a model.
>>> for rb in system.rigidBodies:
.... rb.showBlob = True
....
Figure 8: Model with No Blobs
Figure 9: Model with Blobs
In this version, the user can edit individiual properties not only in the object tree itself (see Figure 11) but also by double-clicking on them, which launches an edit dialog box (see Figure 12).
Figure 11: New Object Tree
Figure 12: Edit Dialog
Figure 13: New conditions in Automatic Behavior Definitions
In this version, the following actions are added to the behaviors dialog:
Figure 14: New actions
We added trees, clouds, and sea shells to the sprites library (see Figures 15, 16, and 17).
Figure 15: Sample of Newly-added Sea Shell Sprites
Figure 16: Sample of Newly-added Tree Sprites
Figure 17: Sample of Newly-added Cloud Sprites
Now, there are two tutorials showing how two classic puzzles, Minesweeper (re-named as Thornsweeper) and 15-puzzle, can be programmed using Mekanimo (see Figures 18 and 19). The tutorials can be viewed at http://mekanimoquickhelp.s3.amazonaws.com/tutorials/index.html.
Figure 18: Thornsweeper
Figure 19: 15-puzzle
We added the following sprite control properties:
Paste and paste with offset operations now generate auto-code. The undo/redo for these operations also work properly in this version.
For consistency, when the gravity vector is updated, the weights of the rigid bodies are automatically updated as well.
This new method enables a user to draw to the canvas while a model is running. We will post a tutorial about this feature soon.
In this version, it is possible to create C++ files for Box2D version 2.02 in addition to version 2.01.
>>> system.createBox2DCpp('c://yourdirectory//test.cpp', version=202)
To create C++ code for version 2.01 use ‘version=201‘.
Now, it is possible to set the joint limits and enable limits in one line of code instead of three.
>>> system.setJointLimits(joint=pin1, upperAngle=pi/2, lowerAngle=0)
The above snippet is equivalent to:
>>> pin1.upperAngle = pi/2
>>> pin1.lowerAngle = 0
>>> pin1.enableLimits = True
After assigning a texture to a rigid body, it is possible to convert the assigned texture to a sprite as shown below.
>>> system.setTextureAsSprite(element=circle1)