Description
Primrose is a syntax-highlighting text editor that renders into an HTML5 Canvas element. It is made in particular for texturing 3D objects in WebGL apps. The README lists its features as international keyboard support for left-to-right text, Unicode character awareness, line numbering, colour theming, and syntax highlighting for JavaScript, HTML and BASIC. It is released as free, open-source software under the MIT license and can be used with other FOSS projects. The README includes getting-started examples for a 2D web page and for a 3D WebGL app that uses Three.js. It notes that in a WebGL context the editor cannot tell what the pointer is pointing at, so mouse or VR controller support needs raycast-based picking that you implement yourself, although Primrose offers a simple interface for pointer operations. The public API is documented in the README: the Primrose class extends EventTarget and renders with the CanvasRenderingContext2D API. Anything not listed there is treated as internal or deprecated.…
Highlights
- Syntax-highlighted editor drawn on a canvas
- Unicode-aware, with line numbers and colour themes
- Highlighting for JavaScript, HTML and BASIC
- Built for textures in WebGL and Three.js
Ratings & Reviews
No ratings yet
Be the first to rate Primrose.
People also visit
Primrose FAQ
What is Primrose?
A syntax-highlighting text editor that renders to an HTML5 Canvas, made for texturing 3D objects in WebGL apps.
Which languages are highlighted?
JavaScript, HTML and BASIC, according to the README.
Can I use it in a 3D scene?
Yes. The README shows an example with Three.js, but it says pointer input such as mouse or VR controllers needs raycast-based picking that you add yourself.
Does it support right-to-left text?
No. The README says the international keyboard support works for left-to-right rendering only.
What license is it under?
The MIT license. The README describes it as free, open-source software.
What are the best Primrose alternatives?
Popular alternatives to Primrose include Smart-Text-Editor, Notectl and Storyai 3d Director Desk. See all Primrose alternatives



