Fork me on GitHub

Mouse/Key events on the x3d element

02.12.2010 Uncategorized

We now support (almost) all mouse and keyboard events directly on the x3d element. This allows the application developer to build own forms of navigation or mix 2D and 3D references freely. There is a new application prototype which utilizes those events to create a standard carousel menu.

carousel menu example

carousel menu example

These events are not just useful to build own navigation types but great for anything that needs pixels without a clear reference to a specific object (e.g. context menu). If you need an object reference you could use those events on the 3D-elements (e.g. group or shape) to get a standard MouseEvent which provides pixels and additional 3d properties (e.g. worldX, worldY,worldZ).