webgl-3d-object
Installation
SKILL.md
WebGL 3D Object
Use When
- A hero, feature block, or product moment needs one strong 3D object.
- The visual should show real geometry, lighting, highlights, and edges.
- A faceted mesh should float or rotate subtly inside a web layout.
- CSS transforms, SVG illusions, or flat gradients are not enough.
Rules
- Use real 3D geometry:
IcosahedronGeometry,DodecahedronGeometry,BoxGeometry, customBufferGeometry, or a glTF mesh. - Use a perspective camera so the object has depth and scale.
- Use PBR material:
MeshStandardMaterialorMeshPhysicalMaterial. - Tune
metalness,roughness, andemissiveto match the brand mood. - Light the object with at least one directional light plus ambient or hemisphere fill.
- Animate transforms only: subtle rotation, bobbing, or parallax.
- Handle resize and dispose geometry/material/renderer on teardown.