I didn’t quite digest the api
the idea is this:
var myMaterial = new Some_built_in_Material()
decorateMaterialWithFOO( myMaterial )
decorateMaterialWithBAR( myMaterial )
decorateMaterialWithBAZ( myMaterial )
//now my material has extra things
myMaterial.foo.copy(new THREE.Vector2(2,2))
myMaterial.bar = new Texture()
myMaterial.baz = new Color()
Also the example combines 3 “extensions” and then applies yet another 4th “inline” extension on top of the extended materials, so even that part is possible. I think i was also able to serialize this with no problems.