Flashing Entity Color

I currently have a GLTF model change to the color red from black when a specific event occurs, but I would like to have the object flash red every one second. I see that Material has some kind of fade property, but I can’t seem to find any sandcastle’s that illustrate how to use it. Do I have to create my own material that will fade in and out of red, or is there an easier way to do this?

Thanks for any help!

Hi @HoodedCrow21

Thanks for your question. For your use case, you could use something like setInterval to toggle the model.color property based on some definite time interval. Here is a Sandcastle that shows how it could be done.

color

Hope that helps!