This example requires a browser that supports the HTML5 <canvas> feature.

SceneJS WebSockets Example 2

Sending Pick Events through a WebSocket


Click on a teapot to change it's color. When you do that, a SceneJS.Socket within the scene graph catches the pick event and fires a request at the WebSocket server for a new random colour for the picked teapot.

The server responds with a config map containing a new colour for the picked teapot. The Socket then pushes the config down into the Material node for the teapot.


SceneJS Log: