Hello, I have an issue with firefox but the other browser works fine(even IE, MS Edge).
With below codes, I have only black screen.
But sometimes (when I replaced render();
to renderer.render(scene, camera);
) , it works fine.
On chrome, or any other browser, works fine but only firefox does not work.
++
But site still alive. I checked it with'mousedown' -> console.log('alive?');
event.
I’m using three.js r112, and firefox 72.0.2.
function animate()
{
stats.update();
render();
requestAnimationFrame( animate );
}
function render()
{
//201754
// console.log(renderer.info.render);
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects( scene.children, true );
if ( intersects.length > 0 )
{
if( __CLICKNAMES__.indexOf(intersects[0].object.name) != -1)
{
if (INSECTED != intersects[ 0 ].object) {
if( INSECTED ) INSECTED.material[0] = INSECTEDMaterial;
INSECTED = intersects[ 0 ].object;
INSECTEDMaterial = INSECTED.material[0]
INSECTED.material[0] = new THREE.MeshLambertMaterial( { color: 0x9986EE, emissiveIntensity: 0.5 } );
}
}
else
{
if( INSECTED ) INSECTED.material[0] = INSECTEDMaterial;
INSECTED = null;
}
} else {
if( INSECTED ) INSECTED.material[0] = INSECTEDMaterial;
INSECTED = null;
}
renderer.render( scene, camera );
}