@glyphcss/vue

Native Vue 3 components for the glyphcss ASCII polygon mesh rendering engine.
3,681 221
Install
npm install @glyphcss/vue
Latest Version:0.3.1
Vue:3
License:MIT
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: apresmoi

Status: pre-1.0. APIs may still change before a stable 1.0 release.

@glyphcss/vue

Native Vue 3 components for glyphcss — an ASCII polygon mesh renderer that projects 3D scenes into a single <pre> element. Loads OBJ, glTF, GLB, STL, and MagicaVoxel .vox files; renders the result as monospace text in the browser.

Full documentation: https://glyphcss.com

Install

npm install @glyphcss/vue

Requires Vue 3 as a peer dependency.

Quickstart

<template>
  <GlyphCamera>
    <GlyphScene :cols="80" :rows="40">
      <GlyphOrbitControls />
      <GlyphMesh src="/cottage.glb" />
    </GlyphScene>
  </GlyphCamera>
</template>

<script setup lang="ts">
import {
  GlyphCamera,
  GlyphScene,
  GlyphMesh,
  GlyphOrbitControls,
} from "@glyphcss/vue";
</script>

Component reference

<GlyphCamera> / <GlyphOrthographicCamera>

Orthographic camera. GlyphCamera is the ergonomic default alias. Wraps <GlyphScene> — the camera is always the outermost element.

Prop Type Default Description
rot-x number 65 Tilt in degrees
rot-y number 45 Azimuth in degrees
zoom number 0.65 CSS pixels per world unit

<GlyphPerspectiveCamera>

Perspective (foreshortened) camera. Required for <GlyphFirstPersonControls>.

Prop Type Default Description
rot-x number 65 Tilt in degrees
rot-y number 45 Azimuth in degrees
distance number 0 Perspective pull-back; CSS pixels with CSS perspective, world units only in legacy perspective="0" mode
zoom number 0.65 CSS pixels per world unit

<GlyphScene>

Root of every Vue glyphcss render tree. Owns the <pre> output element and rasterizes all meshes on camera or state change. Must be a child of a camera component.

Prop Type Default Description
cols number 80 Grid width in character cells
rows number 24 Grid height in character cells
mode "wireframe" | "solid" | "voxel" | "ink" "solid" Render mode

<GlyphMesh>

Loads and displays a 3D mesh. Supports .obj, .glb, .gltf, .stl, .vox.

Prop Type Description
src string URL of the mesh file
color string Override mesh color

<GlyphOrbitControls> / <GlyphMapControls>

Mouse/touch/keyboard camera controls.

Composables

  • useGlyphCamera() — access the camera context
  • useGlyphSceneContext() — access scene state
  • useGlyphMesh(polygons, options?) — register polygon data as a mesh
  • useGlyphAnimation(clips, controller) — three.js-style animation mixer

License

MIT

Related Packages

paraview-glance

Web application for Visualizing Scientific and Medical datasets

9,591 278
fourdom

A DOM toolkit library

43,700 1
simple-panzoom

保留 vue3-sketch-ruler 实际用到的功能,移除 SVG、IE 与多指捏合等未用特性,提升性...

1,539 303
hopla

3D model viewer plugin for Vue3 based on 3Dhop (3dhop.net)

246
polygon-splitter

Split a polygon using a polyline.

512,281 53

Version History

Version Released Vue License
0.3.1 ^3.0.0 MIT
0.3.0 ^3.0.0 MIT
0.2.1 ^3.0.0 MIT
0.2.0 ^3.0.0 MIT
0.1.6 ^3.0.0 MIT