Capítulo 63 de 859

Chapter 63: LineDashedMaterial

Core Idea

A material for rendering line primitives.

Materials define the appearance of renderable 3D objects.

Key Concepts

  • dashSize : number: The size of the dash. This is both the gap with the stroke.
  • gapSize : number: The size of the gap.
  • isLineDashedMaterial : boolean (readonly): This flag can be used for type testing.
  • scale : number: The scale of the dashed part of a line.

Code Examples

const material = new THREE.LineDashedMaterial( {
	color: 0xffffff,
	scale: 1,
	dashSize: 3,
	gapSize: 1,
} );
  • What it demonstrates: Typical usage of LineDashedMaterial.

Reference Tables

Constructor

Signature
new LineDashedMaterial( parameters : Object )

Properties

PropertyDescription
.dashSize : numberThe size of the dash. This is both the gap with the stroke.
.gapSize : numberThe size of the gap.
.isLineDashedMaterial : boolean (readonly)This flag can be used for type testing.
.scale : numberThe scale of the dashed part of a line.

Key Takeaways

  1. LineDashedMaterial extends: EventDispatcher → Material → LineBasicMaterial
  2. Most relevant properties: dashSize, gapSize, isLineDashedMaterial, scale.

Connects To