helper.grid
helper.grid(props : Object) : GridHelper
props - 設定オブジェクト。
- size (Number) : グリッドのサイズ (デフォルト : 10)。
- divisions (Number) : 分割数 (デフォルト : 10)。
- colorCenterLine (Hex) : 中心線の色 (デフォルト : 0x444444)。
- colorGrid (Hex) : グリッド線の色 (デフォルト : 0x888888)。
グリッドヘルパーを作成してシーンに追加します。
コードの例
グリッドヘルパーの表示
const { camera, create, helper, animate } = init()
create.ambientLight();
create.directionalLight();
camera.position.set(2, 2, 2);
controls.connect()
helper.grid();
create.cube();
animate();