VertexTangentsHelper constructor
VertexTangentsHelper(
- dynamic object, [
- dynamic size = 1,
- dynamic color = 0x00ffff
Implementation
factory VertexTangentsHelper(object, [size = 1, color = 0x00ffff]) {
var nTangents = object.geometry.attributes["tangent"].count;
var geometry = BufferGeometry();
var positions = Float32BufferAttribute(Float32Array(nTangents * 2 * 3), 3);
geometry.setAttribute('position', positions);
var vth = VertexTangentsHelper.create(geometry, LineBasicMaterial({"color": color, "toneMapped": false}));
vth.object = object;
vth.size = size;
vth.type = 'VertexTangentsHelper';
//
vth.matrixAutoUpdate = false;
vth.update();
return vth;
}