Capítulo 29 de 859

Chapter 29: DecalGeometry

Core Idea

This class can be used to create a decal mesh that serves different kinds of purposes e.g. adding unique details to models, performing dynamic visual environmental changes or covering seams.

Please not that decal projections can be distorted when used around corners. More information at this GitHub issue: Decal projections without distortions.

Reference: How to project decals

Code Examples

const geometry = new DecalGeometry( mesh, position, orientation, size );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
  • What it demonstrates: Typical usage of DecalGeometry.

Reference Tables

Constructor

Signature
new DecalGeometry( mesh : Mesh, position : Vector3, orientation : Euler, size : Vector3 )

Key Takeaways

  1. DecalGeometry extends: EventDispatcher → BufferGeometry

Connects To