Multi-touch
By default, Moscrif applications still do not use multi touch. Before the multi-touch can be used, it is needed to allow it by Game.multiTouch (Window.multiTouch) property. Then the application receives events like pointerPressed, pointerReleased and pointerDragged separately for every tap. The taps can be differentiated by the last parameter of these messages - zero-based index of tap (If multi touch is not allowed the index is -1).
Gestures
The newest release supports also gestures. The gestures are strong tool for recognizing user’s multi or single touch gestures connected with some actions. Probably every smartphone’s user zooms photos by pinch gestures (moving two taps closer or further) or rotate it by rotate gestures (two taps rotation). At present Moscrif supports six gestures: pinch, rotate, pan, swipe, press and tap.
The gestures can be allowed and customized by setGesture[Pinch / Rotate / Tap etc…] Then when the gesture is recognized the onGesture[Pinch / Rotate / Tap etc…] event is raised.
Lets’s see how easy is zoom photo by pinch gesture:
game.onGesturePinch = function(state, scale, velocity)
{
photo. Scale/* photo scale*/ = photo.scale * scale/* gesture scale*/;
}
Facebook
Facebook is an indivisible part of many games and applications. In this release Moscrif brings Facebook API support on iOS. Android and Bada will be added soon (I hope :) ).
Drawing into bitmap.
Moscrif allows creating many interesting graphics effects. However, it spends too much time to create some of these effects also on the newest devices. From now, whole canvas can be drawn outside the draw method into one bitmap and then this bitmap can be drawn onto the screen really fast.