Below is the code I am working with:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
var renderer = new THREE.WebGLRenderer({antialias:true});
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.dampingFactor = 0.25;
controls.enableZoom = true;
controls.autoRotate = true;
// Cube
var Cubegeometry = new THREE.BoxGeometry(1, 1, 1);
const CubeImgTexture = new THREE.CubeTextureLoader().setPath('imgs/textures/cube/').load([
's1.png', 's5.png',
's2.png', 's4.png',
's3.png', 's6.png'
]);
var Cubematerial = new THREE.MeshStandardMaterial({
map: CubeImgTexture
});
var CubeMesh = new THREE.Mesh(Cubegeometry, Cubematerial);
scene.add(CubeMesh);
camera.position.z = 5;
controls.update();
var animate = function() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
};
After running this code, the result is a blank screen and an error message stating that "Argument 6 is not valid for any of the 6-argument overloads."
https://i.sstatic.net/Zubx4.png
I am unsure of what this error implies. Can someone provide some insight?