Created
October 27, 2016 20:23
-
-
Save evejweinberg/6164b48acf19f63c3304f694541b28de to your computer and use it in GitHub Desktop.
3js add helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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