KhaMenu

This demonstrates WynCamera and WynMouse updates

This demo shows the ability to project several cameras onto the screen, very much like FlxCameras. Cameras are basically just images, so it's possible to do anything we want with them as we would on sprite images, e.g. scrolling the camera viewport, resize/rescale/rotate, tinting, adding shaders, transparent backgrounds and more.

The demo shows 4 cameras: Zoomed-out (x0.5, top left), Normal (x1.0, top-right), Zoomed-in (x2.0, bottom-left), Zoomed-in with transparency (x3.0, center). There's nothing on the bottom-right, to show that the default background is black. Notice that top-left and top-right are same zoom, even though top-left is supposed to be zoomed out (0.5). I capped WynCamera's library to never allow zooming out below x1.0, because there's visual glitches at the edges when you zoom out.

If you open the browser console (CMD+ALT+J on Mac, probably CTRL+ALT+J on Windows), you'll see debug messages for the mouse click events. Notice if you scroll the camera (using arrow keys), the mouse click x/y positions are offset by the camera's scroll position.

Controls

W,S,A,D - Move bitmap text

Arrow Keys - Scroll top-left camera

Mouse click - show mouse click debug message