Line component is generated from a curve/line and amount of vectors that should be used (points).
const line = new WHS.Line({
geometry: {
curve: new THREE.LineCurve3(new THREE.Vector3(10, 10, 0), new THREE.Vector3(10, 30, 0))
},
material: new THREE.MeshBasicMaterial({
color: 0xffffff
})
});
line.addTo(GAME);
Parameters
Geometry defaults
{
// ...
geometry: {
curve: false, // Boolean
points: 50 // Number
}
}
These defaults are additional, there are also defaults filled by
MeshComponent
, etc.
Instructions
{
// ...
geometry: ['curve', 'points']
}
Updated almost 8 years ago