提交 58b5ccee 编写于 作者: H Hectate

GridHelper docs and sensible defaults updated

上级 9043a6b6
......@@ -30,8 +30,8 @@
<h3>[name]( [page:number size], [page:Number divisions], [page:Color colorCenterLine], [page:Color colorGrid] )</h3>
<div>
size -- The size of the grid <br />
divisions -- The number of divisions across the grid <br />
size -- The size of the grid. Default is 10. <br />
divisions -- The number of divisions across the grid. Default is 10. <br />
colorCenterLine -- The color of the centerline. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 0x444444 <br />
colorGrid -- The color of the lines of the grid. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 0x888888
</div>
......
......@@ -11,7 +11,8 @@ import { Color } from '../../math/Color';
function GridHelper( size, divisions, color1, color2 ) {
divisions = divisions || 1;
size = size || 10;
divisions = divisions || 10;
color1 = new Color( color1 !== undefined ? color1 : 0x444444 );
color2 = new Color( color2 !== undefined ? color2 : 0x888888 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册