Capítulo 584 de 859

Chapter 584: OutlineEffect

Core Idea

An outline effect for toon shaders.

Note that this class can only be used with WebGLRenderer. When using WebGPURenderer, use ToonOutlinePassNode.

Code Examples

const effect = new OutlineEffect( renderer );
function render() {
	effect.render( scene, camera );
}
  • What it demonstrates: Typical usage of OutlineEffect.

Reference Tables

Constructor

Signature
new OutlineEffect( renderer : WebGLRenderer, parameters : OutlineEffect~Options )

Methods

MethodDescription
.render( scene : Object3D, camera : Camera )When using this effect, this method should be called instead of the default WebGLRenderer#render.
.renderOutline( scene : Object3D, camera : Camera )This method can be used to render outlines in VR.
.setSize( width : number, height : number )Resizes the effect.

Key Takeaways

  1. Key methods: render, renderOutline, setSize.

Connects To