Props

Props reference

PropTypeDefaultDescription
modelstring"/models/model.glb"Path or URL to a .glb model file
hdrstring"/hdr/studio.hdr"Path or URL to an .hdr lighting file
presetstringPreset code generated by the Asthree Lab
settingsobjectSettings object (alternative to preset)
widthstring"100%"Canvas width
heightstring"100%"Canvas height
enableOrbitbooleantrueAllow rotating the model by dragging
enableZoombooleantrueAllow zooming with the scroll wheel or pinch gesture

If both preset and settings are provided, preset takes priority and settings is ignored.

Default settings object

This is the complete default configuration. Any field you omit when passing settings falls back to these values.

{
    camera: {
        position: { x: 0, y: 0, z: 5 },
        target:   { x: 0, y: 0, z: 0 },
        fov: 50,
        orbit: {
            theta:  0,
            phi:    1.5,
            radius: 4.5,
        },
    },

    model: {
        scale:           2,
        position:        { x: 0, y: 0, z: 0 },
        rotation:        { x: 0, y: 0, z: 0 },
        tilt:            { forward: 0, left: 0 },
        autoRotate:      true,
        autoRotateSpeed: 0.2,
    },

    lights: {
        ambient: 0,
        directional1: {
            position:  [2, 3.5, 6],
            intensity: 3,
        },
        directional2: {
            position:  [-2, 1.5, 4],
            intensity: 0.35,
        },
    },

    ascii: {
        style:            "standard",
        cellSize:         9,
        invert:           true,
        color:            true,
        volumeShading:    true,
        shadingIntensity: 0.5,
        glow:             true,
        glowIntensity:    7,
        glowSize:         3,
        tintColor:        "#6B51F0",
    },

    postfx: {
        contrastAdjust:   1.5,
        brightnessAdjust: 0.2,
    },
}

camera

Controls the viewpoint. orbit.theta and orbit.phi are the horizontal and vertical rotation angles in radians, orbit.radius is the distance from target. fov is the perspective camera's field of view in degrees.

model

Controls the model transform. scale is a uniform multiplier, tilt applies a fixed forward/left lean independent of rotation, and autoRotate/autoRotateSpeed control the idle spin animation.

lights

Two directional lights plus one ambient light. position is a [x, y, z] tuple, intensity follows Three.js's standard light intensity scale.

ascii

The core visual parameters of the effect. style selects the character pattern used per cell ("standard", "blocks", "shade", "thin", "dots"). cellSize controls how large each ASCII cell is in pixels — smaller values produce more detail. invert flips which areas render as characters vs. empty space. glow, glowIntensity, and glowSize add a colored bloom effect using tintColor.

postfx

Simple color grading applied before the ASCII conversion. contrastAdjust and brightnessAdjust shift the source image before it's sampled into the character grid.