Materials dont change color, any of them

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.

playground here works. Babylon.js Playground

Can you change it to repro your problem?

Edit: I only have access to chrome and it works. The playground after you modify for your situation, may help others to help you.

3 Likes

I tested in Firefox (Windows 11), and it also works for me.

2 Likes

i decided not to use firefox at the moment but some other browser chromium based, btw i am using ubuntu 24.02 firefox browser, once i have a little time will look in detail, will let you know my finding.