materialEmissive
Provides the material's final emissive color, with built-in logic that multiplies the `.emissive` color, `.emissiveMap` texture, and `.emissiveIntensity` together.
Core Advantages
Its core advantage is automatic combination: it completely encapsulates the blending of multiple properties (color, map, intensity) required for emissive effects, greatly simplifying the workflow and providing an API consistent with standard materials.
Common Uses
Simulating light sources like light bulbs, screens, or lava.
Adding glowing effects to sci-fi or magic elements (e.g., energy bars, runes).
Creating unlit 3D UI or indicators.
As the primary input source for post-processing effects like Bloom.
How to adjust
Configure by modifying material properties in JavaScript. `material.emissive` sets the base color, `material.emissiveMap` uses a texture to control which areas glow, and `material.emissiveIntensity` adjusts the overall brightness, which is crucial for effects like Bloom.
Code Examples
1// Create a pulsing emissive effect over time
2const pulseFactor = sin( timerLocal( 1 ) ).mul( 0.5 ).add( 0.5 ); // Oscillates between 0-1
3const finalEmissive = materialEmissive.mul( pulseFactor );