Closed supermoos closed 2 years ago
The constructor issue should be fixed in 1.1.11
About the types, the MeshPhysicalMaterialParameters
type from @types/three
seems to not have thickness
as a property, the only option is to open an issue in ThreeJS and use ts-ignore
Also, LayerMaterial
and all derived classes are of type Material
and will give you type errors if you try to do LayerMaterial.transmission
for example. This is because transmission
is a property on the MeshPhysicalMaterial
class and not on the base Material
class. Only option here is to cast your material to MeshPhysicalMaterial
I'm making a new material like this:
However some properties like thickness gives a typescript error, and transmission isn't even set on the material created. I have to set it manually with that last line in the example for it to take effect.