Annotator is a lightweight annotation system for Babylon Lite that provides world-space labels, dimensions, callouts, markers, and stable annotations for regular meshes and @litools/instancer instances.
Babylon Lite provides the rendering foundation required for interactive 3D applications, but application developers still need higher-level tools for presenting spatial information.
Common use cases include:
- Displaying labels above objects.
- Showing dimensions between points.
- Attaching callouts to parts.
- Placing markers in world space.
- Keeping annotations readable on screen.
- Hiding labels behind geometry.
- Preventing label overlap.
- Attaching annotations to stable Instancer IDs.
- Making annotations interactive.
@litools/annotator provides these capabilities without becoming a general GUI framework.
Babylon Lite renders the scene. @litools/annotator explains the scene.
Annotator Demo (some of them really worth to see
).
The HTML backend renders annotations as DOM elements over the canvas. It is the best choice for rich CSS styling, accessibility, familiar browser layout, and smaller annotation counts.
The fast GPU TextRenderer backend renders text, markers, backgrounds, and leader lines through Babylon Lite. It batches large annotation sets efficiently and is the better choice for dense or frequently changing 3D scenes.
Yes, it is FAST!
npm install @litools/annotator
The next steps will be further GPU TextRenderer path optimization, then DynamicTexture support.
Feedback and PRs are welcome!
