Add capsule navigation simplification for voxel output#192
Add capsule navigation simplification for voxel output#192slimbuck merged 22 commits intoplaycanvas:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a capsule-based navigation simplification pass to the voxel output pipeline, aiming to carve away unreachable space (from a capsule-center flood fill) to reduce voxel data size for navigation use cases.
Changes:
- Introduces
simplifyForCapsule(dense 1-bit voxel grid + dilation/BFS/invert/erosion + cropping) and exports it publicly. - Integrates nav simplification into voxel writing, controlled via new options and CLI flags (
--no-nav-simplify,--nav-capsule,--nav-seed). - Adds unit tests covering several representative navigation/cropping scenarios.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/nav-simplify.test.mjs | New unit tests for capsule-based nav simplification behavior. |
| src/lib/writers/write-voxel.ts | Hooks nav simplification into the voxel write pipeline and adjusts progress step counting. |
| src/lib/write.ts | Wires library Options into writeVoxel including nav defaults/enablement. |
| src/lib/voxel/nav-simplify.ts | New implementation of the capsule navigation simplification algorithm. |
| src/lib/types.ts | Adds navSimplify, navCapsule, navSeed to public options type. |
| src/lib/index.ts | Exports simplifyForCapsule and related types from the public API. |
| src/cli/index.ts | Adds CLI flags + parsing for nav simplification; updates help text and Node logger wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Adds a nav simplification pass to the voxel pipeline that carves away geometry unreachable by an upright capsule, reducing voxel data size for navigation use cases.
Algorithm
Changes
simplifyForCapsulefunction insrc/lib/voxel/nav-simplify.tswith bitfield storage (1 bit/voxel) and ping-ponged buffers for memory efficiencywriteVoxelpipeline, gated bynavCapsule/navSeedoptions--no-nav-simplify,--nav-capsule <height,radius>,--nav-seed <x,y,z>ProgressNode.depthproperty for nested progress indentationsimplifyForCapsule,NavSeed, andNavSimplifyResultfrom the public APICLI defaults
-n/--no-nav-simplify