0

I have 2 different map cubes. After 10 seconds I want the first map cube to fade out and the second map cube to fade in. I was told to use keyFrameAnimation but the only examples I've seen are to make an object move or rotate. If anyone has any examples or a starting point for me..

Any help is greatly appreciated. Thanks!

1 Answer 1

2

Change the opacity on the 2 materials in the animation routine.

mesh2.material.opacity = newOpacity;

Be sure that transparent is set to true on the material.

Sign up to request clarification or add additional context in comments.

2 Comments

Would you recommend I use the Clock() property or the keyFrameAnimation()?
You could just use regular javascript time function to check when 10 seconds have passed and then fade out over some interval you want. Depends what kind of precision you want I guess. You could also just wait for a few hundred calls of your renderer and then start the fade out over the next few hundred calls, if precision is not super important. Just count calls.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.