Skip to content

Instantly share code, notes, and snippets.

@evejweinberg
Created October 27, 2016 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evejweinberg/6164b48acf19f63c3304f694541b28de to your computer and use it in GitHub Desktop.
Save evejweinberg/6164b48acf19f63c3304f694541b28de to your computer and use it in GitHub Desktop.
3js add helpers
function addHelpers(grid_width,dims,light_name) {
if (light_name){
var directionalLightHelper = new THREE.DirectionalLightHelper(light_name, 50);
scene.add(directionalLightHelper)
}
var axes = new THREE.AxisHelper(200);
scene.add(axes);
var gridXY = new THREE.GridHelper(grid_width, dims, 0xff0000, 0xffffff);
gridXY.rotation.x = Math.PI;
gridXY.position.set(0, 0, 0);
// gridXY.setColors(new THREE.Color(0xff0000), new THREE.Color(0xffffff));
scene.add(gridXY);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment