I’m more than 1h searching and trying the right parameter value to insert in a code…
first I found one for my opacities:
this.entity.model.meshInstances[0].setParameter(“material_opacity”, 0.5);
ok, and now I tried all of the following for diffuse and I only get errors:
this.entity.model.meshInstances[0].setParameter(“material_diffuse”, new pc.Color(1,1,1));
this.entity.model.meshInstances[0].setParameter(“material_diffuse”, pc.Color(1,1,1));
this.entity.model.meshInstances[0].setParameter(“material_diffuse”, Color(1,1,1));
this.entity.model.meshInstances[0].setParameter(“material_diffuse”, new Color(1,1,1));
this.entity.model.meshInstances[0].setParameter(“material_diffuse”, (1,1,1));
this.entity.model.meshInstances[0].setParameter(“material_diffuse”, 1,1,1);
I search a lot on the docs but half of the things I found (like the “material_opacity”) is inside of some tutorial…
Then, for changing diffuse for example, I found “material.diffuse.set” but this changes the original material and this is not what I need
I tried “material_diffuse” cause of this doc page:
https://developer.playcanvas.com/en/api/pc.StandardMaterial.html#opacity
But it seems that there is nothing “really useful” there cause pc.Color diffuse doesn’t work and there is a huge lack of examples for me to be able to compare what I could be doing wrong…
Is there anyone that could help me, pls? Does “material_diffuse” even exists like “material_opacity”? It wouldn’t make sense if it doens’t…