lbry-desktop/ui/component/viewers/threeViewer/internal/grid.js

13 lines
426 B
JavaScript
Raw Permalink Normal View History

2019-03-07 04:37:25 +01:00
import { Color } from 'three-full/sources/math/Color';
import { GridHelper } from 'three-full/sources/helpers/GridHelper';
const ThreeGrid = ({ size, gridColor, centerLineColor }) => {
const divisions = size / 2;
const grid = new GridHelper(size, divisions, new Color(centerLineColor), new Color(gridColor));
grid.material.opacity = 0.4;
grid.material.transparent = true;
return grid;
};
export default ThreeGrid;