Change a material texture

Hi there !
I have an object (a plane) with a pc.scene.BasicMaterial on it.
I can change the color (with material.color and material.update()), this works perfectly well !
I am trying to change the texture (with material.colorMap) and this doesn’t seem to work.
(I created a texture from a canvas with text renderered inside inspired by this :
Shouldn’t that work ?
I can’t find any simple textured primitive code sample anywhere…
Could someone point me out to the steps to convert, for instance, the spinning cube demo to a textured spinning cube ?
Thanks !

Hey there,

Not sure about BasicMaterial. But I’ve just update the examples with a textured spinning cube using the PhongMaterial.

Code is here: