Skip to content
glyphcss

Introduction

glyphcss turns 3D meshes into text. Drag to orbit; open Code.

Loading…
Mesh: apple.glb
import { cubePolygons } from "@glyphcss/core";
import { compileScene, createGlyphOrthographicCamera } from "glyphcss";
const { html } = compileScene({
polygons: cubePolygons({ center: [0, 0, 0], size: 1 }),
camera: createGlyphOrthographicCamera({ rotX: 60, rotY: 30, zoom: 200 }),
cols: 20, rows: 9, mode: "solid", useColors: false,
});
document.body.insertAdjacentHTML("beforeend", html);

Rendered HTML, blank margins omitted:

<pre class="glyph-output">
%%@%%
%%%%%%%%%%@
%%%@%%%@@@@
%%%%%%%@@@@
%@%%%@%@@@@
%%%%@
</pre>

Use a monospace font and line-height: 1. Scenes update on changes; static output needs no JavaScript.

PackageUse
glyphcssBrowser renderer
@glyphcss/coreMath, geometry, parsers
@glyphcss/reactReact bindings
@glyphcss/vueVue bindings
@glyphcss/compileBuild-time rendering and CLI
@glyphcss/effectsAnimated surface effects
@glyphcss/chartsData charts
@glyphcss/diagramsMermaid and graph diagrams
@glyphcss/mapsGeographic maps
@glyphcss/fluidBraille fluid text surface and speed reader
@glyphcss/fontsExtruded text meshes

Try the quickstart or gallery.