How to fade lineSystem

Hello forum,

Could you help me to animate fading of a LineSystem? I tried to gradually change its visibility (inherited from AbstractMesh) between 0 and 1, but it does not seem to work.
https://playground.babylonjs.com/#UYP5TC#2

Perhaps somebody knows another way?

I found the answer myself. Changing alpha works
https://playground.babylonjs.com/#UYP5TC#4

1 Like

You also can use FadeInOutBehavior to create more complex effects.
Example - https://playground.babylonjs.com/#WX1U2V#1

@labris That’s an interesting tip. Unfortunately FadeInOutBehavior seems to use visibility property to implement its behavior and this does not work with LineSystem, which acts as if visibility was 0 or 1. All values in between have the same effect as visibility = 1. Please have a look at the difference how LineSystem and Mesh fade in this example:
https://playground.babylonjs.com/#J7HD33#2

So it is not a solutions. Unless I miss something obvious. Sadly Mesh behaviors does not mention this behavior.