提交 eca6b3b7 编写于 作者: M Mr.doob

More post-release fixes.

上级 4ff9cfc5
...@@ -283,11 +283,15 @@ var Viewport = function ( editor ) { ...@@ -283,11 +283,15 @@ var Viewport = function ( editor ) {
switch ( value ) { switch ( value ) {
case 'css/light.css': case 'css/light.css':
grid.setColors( 0x444444, 0x888888 ); sceneHelpers.remove( grid );
grid = new THREE.GridHelper( 30, 1, 0x444444, 0x888888 );
sceneHelpers.add( grid );
clearColor = 0xaaaaaa; clearColor = 0xaaaaaa;
break; break;
case 'css/dark.css': case 'css/dark.css':
grid.setColors( 0xbbbbbb, 0x888888 ); sceneHelpers.remove( grid );
grid = new THREE.GridHelper( 30, 1, 0xbbbbbb, 0x888888 );
sceneHelpers.add( grid );
clearColor = 0x333333; clearColor = 0x333333;
break; break;
......
...@@ -1884,11 +1884,7 @@ ...@@ -1884,11 +1884,7 @@
"GridHelper": { "GridHelper": {
"!url": "http://threejs.org/docs/#Reference/extras/helpers/GridHelper", "!url": "http://threejs.org/docs/#Reference/extras/helpers/GridHelper",
"prototype": { "prototype": {
"!proto": "THREE.Line.prototype", "!proto": "THREE.Line.prototype"
"setColors": {
"!type": "fn(colorCenterLine: number, colorGrid: number)",
"!doc": "Updates the color of the grid lines."
}
}, },
"!doc": "The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.", "!doc": "The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.",
"!type": "fn(size: number, step: number)" "!type": "fn(size: number, step: number)"
......
...@@ -74,8 +74,7 @@ ...@@ -74,8 +74,7 @@
scene.add( camera ); scene.add( camera );
var grid = new THREE.GridHelper( 25, 1.0 ); var grid = new THREE.GridHelper( 25, 1.0, 0xffffff, 0x555555 );
grid.setColors( 0xffffff, 0x555555 );
grid.rotateOnAxis( new THREE.Vector3( 1, 0, 0 ), 90 * ( Math.PI/180 ) ); grid.rotateOnAxis( new THREE.Vector3( 1, 0, 0 ), 90 * ( Math.PI/180 ) );
scene.add( grid ); scene.add( grid );
......
...@@ -62,8 +62,7 @@ ...@@ -62,8 +62,7 @@
scene = new THREE.Scene(); scene = new THREE.Scene();
// grid // grid
var gridHelper = new THREE.GridHelper( 14, 1 ); var gridHelper = new THREE.GridHelper( 14, 1, 0x303030, 0x303030 );
gridHelper.setColors( 0x303030, 0x303030 );
gridHelper.position.set( 0, - 0.04, 0 ); gridHelper.position.set( 0, - 0.04, 0 );
scene.add( gridHelper ); scene.add( gridHelper );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册