Custom material on a Rectangle Entity

You would have to create a custom MaterialProperty. Entities use properties to create a higher level interface that handles changes automatically so the user doesn’t have to delete and re-add geometry when things change.

I’m not incredibly familiar with this code, but this function is responsible for creating a Material from the MaterialProperty:

To create a custom material for your new MaterialProperty to use, I think you just have to write a shader.

I think the function Material.fromType(‘myType’, uniforms) creates a material that uses myTypeMaterial.glsl.

Hopefully someone else can elaborate on this if I’m missing something or got something wrong. haha.

Best,

Hannah