I'm attempting to build an fps game, but when I go to rotate the floor anywhere close to 90 degrees it just vanishes from the scene. Here's the code responsible for the plane.
var colorMap = new THREE.TextureLoader().load('/textures/wood_albedo.png');
var radian = 2 * Math.PI *(90 / 360);
var geometry = new THREE.BoxGeometry(20, 20);
var material = new THREE.MeshStandardMaterial({color: 'white', side: THREE.DoubleSide});
var mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
I'm not sure what I'm doing wrong. Any help would be appreciated, thanks for reading.
Your code seems fine, as I assume you are mapping the image to the plane behind the scenes. The only thing I would check is that 2 * Math.PI * (90 / 360) is the same thing as Math.PI / 2. Another thing you should check is that instead of white, it would be ideal to use a shade of grey for the map.
Your problem could have a simple solution - your rotation is making the plane parallel to the camera, making it invisible. You should typically keep your rotations in terms of Math.PI.
Let me know if you have any further questions on this.
Tip: Adding a jsfiddle link could help greatly debug your problem.