In this sample we handle basic keyboard input and picking.
We start from
basic example. We create our custom event called "myEvent" that consumes a 3D location (p) where a new cube will be spawned. We add a "KeyPress" event to handle key
'X': when pressed, we fire "myEvent" using
ATON.fireEvent("myEvent", p)
passing current world location (p) of pointer intersection with 3D scene (if any).