i have this code:
const laserMaterial = new StandardMaterial( "laserMaterial" , this.scene );
laserMaterial.emissiveColor = new Color3(1,0,0)
for( let idx:number=0; idx < this.MAX_LASERS; idx++ )
{
const laser = MeshBuilder.CreateBox( "laser"+idx , {width: .5, height:.08}, this.scene );
laser.position = new Vector3( -100, 50, 0 )
laser.isVisible = false;
laser.setEnabled( false )
laser.material = laserMaterial;
this.lasers.push(laser);
}
the color of the lasers should red, but instead is white, i don’t know what is happening i tried with other colors and setting diffuseTexture property but it does not change.
any idea?
i was using firefox browser and materials weren’t changing the color, y changed to chrome and is working fine, seems is an issue with the browser.