import * as THREE from '/build/three.module.js';
let scene, camera, renderer, gridHelper;
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.set(0, 1500, 0);
camera.lookAt(0, 0, 0);
renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth/2, window.innerHeight);
const container = document.getElementById('smallContainer');
container.appendChild(renderer.domElement);
// Grid
gridHelper = new THREE.GridHelper(500, 4, 0xffffff, 0xff0000);
scene.add(gridHelper);
I need to adjust the width and height of my
gridhelper
manually. How can I do this? Can I scale it? This is my current code.
const v = new THREE.Vector3(1, 1/2, 1);
gridHelper.addScaledVector(v, 1);
I attempted the code above, but it didn't work as expected.