Hello, I am in need of assistance to solve an error that I have been struggling with. Despite my efforts, I have not been able to find a solution for it. Below is the code snippet causing the issue:
const canvas = document.querySelector('.cube ')
// Scene
const scene = new THREE.Scene()
// Red cube
const geometry = new THREE.BoxGeometry(1,1,1)
const material = new THREE.MeshBasicMaterial({color: 'red'})
const cube = new THREE.Mesh(geometry,material)
scene.add(cube)
//
const size = {
width:800,
height:600
}
// Camera
const camera = new THREE.PerspectiveCamera(75, size.width / size.height)
scene.add(camera)
// renderer
const renderer = new THREE.WEBGLRenderer({
canvas
})