HemisphereLightHelper constructor
HemisphereLightHelper(
- Light light,
- dynamic size,
- Color? color
)
Implementation
HemisphereLightHelper(this.light, size, this.color) : super() {
light.updateMatrixWorld(false);
matrix = light.matrixWorld;
matrixAutoUpdate = false;
var geometry = OctahedronGeometry(size);
geometry.rotateY(Math.PI * 0.5);
material = MeshBasicMaterial(
{"wireframe": true, "fog": false, "toneMapped": false});
if (color == null) material.vertexColors = true;
var position = geometry.getAttribute('position');
var colors = Float32Array(position.count * 3);
geometry.setAttribute(
'color', Float32BufferAttribute(colors, 3, false));
add(Mesh(geometry, material));
update();
}