Capítulo 61 de 859

Chapter 61: LineBasicMaterial

Core Idea

A material for rendering line primitives.

Materials define the appearance of renderable 3D objects.

Key Concepts

  • color : Color: Color of the material.
  • fog : boolean: Whether the material is affected by fog or not.
  • isLineBasicMaterial : boolean (readonly): This flag can be used for type testing.
  • linecap : 'butt' | 'round' | 'square': Defines appearance of line ends.
  • linejoin : 'round' | 'bevel' | 'miter': Defines appearance of line joints.
  • linewidth : number: Controls line thickness or lines.
  • map : Texture: Sets the color of the lines using data from a texture. The texture map color is modulated by the diffuse color.

Code Examples

const material = new THREE.LineBasicMaterial( { color: 0xffffff } );
  • What it demonstrates: Typical usage of LineBasicMaterial.

Reference Tables

Constructor

Signature
new LineBasicMaterial( parameters : Object )

Properties

PropertyDescription
.color : ColorColor of the material.
.fog : booleanWhether the material is affected by fog or not.
.isLineBasicMaterial : boolean (readonly)This flag can be used for type testing.
`.linecap : 'butt''round'
`.linejoin : 'round''bevel'
.linewidth : numberControls line thickness or lines.
.map : TextureSets the color of the lines using data from a texture. The texture map color is modulated by the diffuse color.

Key Takeaways

  1. LineBasicMaterial extends: EventDispatcher → Material
  2. Most relevant properties: color, fog, isLineBasicMaterial, linecap.

Connects To