Inspired by the network pane in SideFX Houdini 3D application. I've set out to replicate the same kind of navigation.
This is a great start for any canvas that you need to pan around in or zoom about the cursor. Mouse Wheel Part doesn't work so well in a browser with a side scroll bar. I Plan on adding a Right Mouse Click for zoom in addition to the current Mouse Wheel Zoom.
Notice how the length of the Hypotenuse(c) stays fixed on the triangle no matter where you move the rig.
Please Note that this only demos the Z,Y axis an not the X,Z axis. But the principle is the same for X,Z and gives full 3D positional control of the rig as long as the boom (Hypotenuse) is long enough to accommodate the max distance of where you want to place the camera(mouse in this case).
A newew version now with images for graphics. Still poorly optimised but you get the idea. I'm not planning on doing too much more until we have v001_001 example ported to the touchSheild.
Another approach to a round cornered rectangle button class. This time I am building the shape out of ONE rectangle using strokeJoin(ROUND) to give me my round corners
Keyboard Controls are:
r + mouse x = radius
s + mouse x,y = size
p + mouse x,y = position