LineDashedMaterial 虚线线条材质

—> Material

使用虚线线条材质时, 几何体不能为一个直接的类对象, 比如 new THREE.BoxGeometry(4, 4, 4), 而必须由点组成的.

function LineDashedMaterial( parameters ) { } var v1 = new THREE.Vector2(-3, 0), v2 = new THREE.Vector2(-1, -4), v3 = new THREE.Vector2(1, 4), v4 = new THREE.Vector2(3, 0); var curve = new THREE.CubicBezierCurve(v1, v2, v3, v4), points = curve.getPoints(60); var geometry = new THREE.Geometry().setFromPoints(points), material = new THREE.LineDashedMaterial({ color: '#ff9900'}), line = new THREE.LineSegments(geometry, material); scene.add(line);

Attributes

type : String

Default value : 'LineDashedMaterial'
Description : 类型.

scale : Float

Default value : 1
Description : 虚线部分的比例.

dashSize : Float

Default value : 3
Description : 虚线的尺寸.

gapSize : Float

Default value : 1
Description : 间隔的尺寸.