phoria2 rebuilds a canvas 3D library on WebGL 2 with agent-friendly errors

A Show HN post introduces phoria2, a small JavaScript library for 3D on the web. According to the post's title, it is a rebuild of an older canvas 3D library, now running on a WebGL 2 renderer. The project page describes it as small and fast, aimed at charts, labelled scenes, dashboards and product viewers, with an API "you can learn in an afternoon". It is billed as designed for ease of use by both agents and humans from the ground up.

The page lists four selling points. First, "everything you need": PBR materials, instancing, points, lines, labels, picking, shadows, particles and glTF models. Second, "light and quick": no runtime dependencies, plain ES modules, and views that only draw when something changes. Third, "tells you what to write": every option is validated, and a mistake comes back as an error that details the fix, whether the reader is a person or a coding agent. Fourth, it is open source under the MIT licence.

Installation is npm install phoria2. The page points to the code, the docs and a React example on GitHub. The page header plays on the name: it carries a dictionary-style definition of "phoria" as the relative directions of the eyes during binocular fixation on a given object.

The claims about speed and lightness are the project's own and come without benchmarks or numbers.

Key facts

  • phoria2 is a small JavaScript library for 3D on the web, running on a WebGL 2 renderer; per the post title it is a rebuild of an older canvas 3D library.
  • Target uses named on the page: charts, labelled scenes, dashboards and product viewers.
  • Features listed: PBR materials, instancing, points, lines, labels, picking, shadows, particles and glTF models.
  • No runtime dependencies, plain ES modules, and views that only draw when something changes.
  • Every option is validated, and a mistake returns an error that details the fix, for a human or a coding agent.

Why it matters

Most of the page's pitch is about ease of use. A 3D library with an API that can be learned in an afternoon and errors that say how to fix a mistake lowers the cost of adding 3D to a chart, dashboard or product viewer. The explicit design for coding agents is the distinctive part: the library tries to make an agent's wrong call self-correcting by returning a message that spells out the fix. The project also shows an older canvas-based 3D library moving to WebGL 2.

Who it affects

Web developers who want 3D in charts, labelled scenes, dashboards or product viewers without a heavy dependency chain. Developers who write code with the help of coding agents are the second audience the page names directly. React users get an example in the GitHub repository.

How to use it

Run npm install phoria2. The library ships as plain ES modules with no runtime dependencies. The page points to the code, the docs and a React example on GitHub. It is MIT licensed, so it is free to use under that licence's terms.

How solid is it

The only source is the project's own page, so every claim is the author's self-description. The page does not give performance benchmarks or comparisons with other libraries such as three.js; "fast" and "light and quick" are unquantified. It also gives no version number, release date or browser-support information, no user numbers or adoption figures, and no bundle size. The page does not name the author or describe the older canvas 3D library; the rebuild story comes only from the post title.

Risks and caveats

The performance and ease-of-use claims are untested here and unquantified on the page. WebGL 2 is the renderer the page names, and the page gives no browser-support information. Whether the fix-detailing errors actually help coding agents in practice is the project's claim, not something the page demonstrates.

“Designed for ease-of-use by agents and humans from the ground up!”

— phoria2 project page