API Reference Cauldron3D.Net v#0.3.3

Copy Markdown View Source

Modules

3D scenes in the browser. A Cauldron3D.Net.Scene takes the same changes CauldronGPU.submit/2 does and broadcasts them as CauldronGPU.Stream bytes; browsers joining a Cauldron3D.Net.Channel get the whole scene and then each tick, and draw it with three.js (priv/static/cauldron3d.js, served by Cauldron3D.Net.Page).

The Phoenix channel a browser joins to watch a Cauldron3D.Net.Scene.

Browser input as CauldronGPU window events. The client (cauldron3d.js) sends maps with a "type"; decode/1 turns each into the event tuple a native window would send, or :error. Key names are those cauldron3d.js reports ("w", "space", "left_shift", "up", …); names outside that set arrive as strings.

A plug serving a page that shows one scene, filling the browser window, with the scripts it loads: GET / the page, GET /cauldron3d.js the client, GET /phoenix.min.js Phoenix's socket client. three.js comes from jsDelivr (version three_version/0).

A scene browsers watch: it keeps everything sent to it (CauldronGPU.Host.Record) so a browser that joins later gets the whole scene, and broadcasts each batch to the browsers already watching as CauldronGPU.Stream bytes.

The socket browsers watching scenes connect through, with the channel Cauldron3D.Net.Channel defines.