Getting RGB Values of a Material

Hey, it is possible to do the same as JavaScript using Typescript. Your problem here is the usage of scene.marerials that are instances of « Material ». ambient color is available on StandardMaterial so you can:

  • cast using (material as StandardMaterial).ambienColor = …
  • access the member using the brackets accessor: material[« ambienColor »] = …

Does it fit your needs ?

1 Like