Built a 3D model viewer inside
@Rive .
Not a plugin, not an embed β an actual glTF renderer running on
@Rive 's GPU Canvas, written in Luau and WGSL, living inside the .riv file.
Drop in a .glb and it loads, lights, animates and orbits. Every control is a data-bound property, so the whole scene is drivable from a state machine, a timeline, or app code. Nothing is hardcoded to one model.
What's in it:
β’ glTF parsing written from scratch β Luau has no JSON library, so the decoder is hand-rolled
β’ PBR shading (Cook-Torrance GGX) with key/fill/rim lighting
β’ Skeletal skinning, 128-joint palette
β’ Rigid node animation with full keyframe interpolation
β’ Orbit camera with per-axis locks
β’ Auto-fit, so any model frames correctly regardless of authored scale
β’ ~40 data-bound properties: camera, transform, material, animation
Most of it was built by driving the Rive editor over its MCP server with Claude Code β scripted, not clicked.
Runtime support is nearly there. GPU Canvas landed in the web runtime last week. A couple of scripting APIs still need to follow before this can ship to a live site.
Here is the Github Repo for Instructions:
https://lnkd.in/dAMXQJBR