-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c800afb
commit 30a89b5
Showing
5 changed files
with
66 additions
and
36 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = (function () { | ||
'use strict'; | ||
|
||
var THREE = require('three'); | ||
|
||
return function box(parent, options) { | ||
var obj, | ||
size = options && options.size || 10, | ||
step = options && options.step || 1; | ||
|
||
obj = new THREE.GridHelper(size, step); | ||
obj.name = 'grid'; | ||
if (options) { | ||
obj.setColors(options.colorCenterLine || obj.color1, options.colorGrid || obj.color2); | ||
} | ||
obj.geometry.computeBoundingBox(); | ||
|
||
parent.add(obj); | ||
|
||
return obj; | ||
}; | ||
}()); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,8 @@ | |
'panorama', | ||
'image', | ||
'video', | ||
'text' | ||
'text', | ||
'grid' | ||
], | ||
|
||
//todo: use a weak map or set instead | ||
|