Documentation
¶
Overview ¶
Command viewport3d-section is a development example (step 30.10): a part (a box, a cylinder and a sphere) cut by a section plane, with its cap and the outline of the cut, in a viewport3d.View that the mouse and the touch orbit, pan and zoom. A tap picks what is under the pointer (ViewController.Pick), selects it (the highlight color and the outline) and shows what the pick found: the item, the triangle, the point of the world and the normal. A switch turns the cap on and off. It uses the part of internal/scenetest, so it is under examples/dev.
Run it with: go run ./examples/dev/viewport3d-section
It needs a GPU renderer (Vulkan, Direct3D 12 or WebGPU); with another one the view shows its fallback, a line of text.
Environment: GLUTTER_BACKEND=x11|wayland, GLUTTER_RENDERER=vulkan, GLUTTER_SCREENSHOT=<file.png>, GLUTTER_SCREENSHOT_AFTER=<duration>.