Hello I have a problem with my project, i don’t know if a topic about that already exists but nothing appear on my web page and i don’t think i have an error in my code. (tell me if i’m wrong).
When i go in chrome this text appear : "Uncaught SyntaxError: Cannot use import statement outside a module".
Here is my code :
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(35, window.innerWidth/window.innerHeight, 0.1, 3000);
camera.position.z = 100;
var rendu = new THREE.WebGLRenderer();
rendu.setSize(window.innerWidth, window.innerHeight);
rendu.setClearColor(0x132644);
document.body.appendChild(rendu.domElement);
rendu.render(scene, camera);
var forme = new THREE.Group();
var geometries = new THREE.TorusKnotGeometry(10, 3, 100, 16);
var materiel = new THREE.MeshNormalMaterial({
wireframe: true,
wireframeLineWidth: 5,
wireframeLinejoin : 'round',
wireframeLinecap : 'round'
});
forme.add(new THREE.Mesh(geometries, materiel));
scene.add(forme);