Skip to content
Skip to content
Skip to content

Experiment

Draws any picture as source code on a canvas. It runs the portrait at the top of this site.

stars
1,260
downloads
9,400
license
MIT
Install
npm install glyphfield
Concrete letterforms in hard light, black and white

README.mdMIT

glyphfield draws any picture as text on a canvas. It samples the light of the image per cell and sets one glyph from the text you give it, brighter cells first. The portrait at the top of this site runs on it.

Usage

ts
import { glyphfield } from "glyphfield"

const field = glyphfield(canvas, {
  image: "/portrait.webp",
  text: source,       // any string, it repeats
  cell: 9,            // px
  ink: "#F1F2EC",
})

field.reveal()        // glyphs settle once

Notes

  • One canvas, no dependencies, 2.4 kB
  • Pauses when it is off screen or the tab is hidden
  • Respects reduced motion: it draws the final frame and stops

The image must be served from the same origin, or with CORS headers, because the pixels are read.

Experiment

Draws any picture as source code on a canvas. It runs the portrait at the top of this site.

stars
1,260
downloads
9,400
license
MIT
Install
npm install glyphfield
Concrete letterforms in hard light, black and white

README.mdMIT

glyphfield draws any picture as text on a canvas. It samples the light of the image per cell and sets one glyph from the text you give it, brighter cells first. The portrait at the top of this site runs on it.

Usage

ts
import { glyphfield } from "glyphfield"

const field = glyphfield(canvas, {
  image: "/portrait.webp",
  text: source,       // any string, it repeats
  cell: 9,            // px
  ink: "#F1F2EC",
})

field.reveal()        // glyphs settle once

Notes

  • One canvas, no dependencies, 2.4 kB
  • Pauses when it is off screen or the tab is hidden
  • Respects reduced motion: it draws the final frame and stops

The image must be served from the same origin, or with CORS headers, because the pixels are read.

Experiment

Draws any picture as source code on a canvas. It runs the portrait at the top of this site.

stars
1,260
downloads
9,400
license
MIT
Install
npm install glyphfield
Concrete letterforms in hard light, black and white

README.mdMIT

glyphfield draws any picture as text on a canvas. It samples the light of the image per cell and sets one glyph from the text you give it, brighter cells first. The portrait at the top of this site runs on it.

Usage

ts
import { glyphfield } from "glyphfield"

const field = glyphfield(canvas, {
  image: "/portrait.webp",
  text: source,       // any string, it repeats
  cell: 9,            // px
  ink: "#F1F2EC",
})

field.reveal()        // glyphs settle once

Notes

  • One canvas, no dependencies, 2.4 kB
  • Pauses when it is off screen or the tab is hidden
  • Respects reduced motion: it draws the final frame and stops

The image must be served from the same origin, or with CORS headers, because the pixels are read.

Start a project

Three quick picks so the first reply is useful. You finish the message on the contact page.

What do you need?

Rough budget

brief.tsdraft, not sent

Brief so far: nothing picked yet

or write to hello@sorenhale.dev

Nothing is sent from this page. Your picks are kept in this browser tab and wait for you on the contact form.

Start a project

Three quick picks so the first reply is useful. You finish the message on the contact page.

What do you need?

Rough budget

brief.tsdraft, not sent

Brief so far: nothing picked yet

or write to hello@sorenhale.dev

Nothing is sent from this page. Your picks are kept in this browser tab and wait for you on the contact form.

Start a project

Three quick picks so the first reply is useful. You finish the message on the contact page.

What do you need?

Rough budget

brief.tsdraft, not sent

Brief so far: nothing picked yet

or write to hello@sorenhale.dev

Nothing is sent from this page. Your picks are kept in this browser tab and wait for you on the contact form.

Footer

Local time, Oslo

Footer

Local time, Oslo

Footer

Local time, Oslo

Create a free website with Framer, the website builder loved by startups, designers and agencies.