Capítulo 520 de 859

Chapter 520: AsciiEffect

Core Idea

A class that creates an ASCII effect.

The ASCII generation is based on jsascii.

Key Concepts

  • domElement : HTMLDivElement: The DOM element of the effect. This element must be used instead of the default WebGLRenderer#domElement.

Code Examples

import { AsciiEffect } from 'three/addons/effects/AsciiEffect.js';
  • What it demonstrates: Typical usage of AsciiEffect.

Reference Tables

Constructor

Signature
new AsciiEffect( renderer : WebGLRenderer, charSet : string, options : AsciiEffect~Options )

Properties

PropertyDescription
.domElement : HTMLDivElementThe DOM element of the effect. This element must be used instead of the default WebGLRenderer#domElement.

Methods

MethodDescription
.render( scene : Object3D, camera : Camera )When using this effect, this method should be called instead of the default WebGLRenderer#render.
.setSize( w : number, h : number )Resizes the effect.

Key Takeaways

  1. Most relevant properties: domElement.
  2. Key methods: render, setSize.

Connects To