The type definitions for Node materials seem incomplete. All the shortcuts like color, alpha etc are missing.
+1
ShadowMaterial params are declared as ShaderMaterialParams, so passing the color there triggers the typescript, also.
Oh dear, the type declaration file for ShadowMaterial is totally messed up. Let's fix this...
@martinRenou What do you mean with shortcuts? Can you show the respective JS code, please?
Sorry, I was not super clear, and thanks for taking the time for opening a PR for this!
So there seem to be a "shortcut" logic in the code here: https://github.com/mrdoob/three.js/blob/master/examples/jsm/nodes/materials/StandardNodeMaterial.js#L22-L41
And my understanding is that it dynamically adds getter and setters to the Material prototype: https://github.com/mrdoob/three.js/blob/22ed6755399fa180ede84bf18ff6cea0ad66f6c0/examples/jsm/nodes/core/NodeUtils.js#L11-L27
None of those properties is part of the TypeScript definition.
This might be the case for other classes in the nodes examples. I could come up with a PR myself fixing those.
I could come up with a PR myself fixing those.
That would be great! /cc @sunag
That would be great!
+1
Most helpful comment
Oh dear, the type declaration file for
ShadowMaterialis totally messed up. Let's fix this...