I’ve been looking for something along the lines of alpha or opacity, but can’t seem to find it.
It feels like it should be something as simple as entity.opacity or entity.alpha or something along those lines doesn’t it?..and then that would also affect it’s children on the hierarchy. Is there something available like this?
This is what I’m trying to accomplish…
The “Ship Focal Point” is the object I’d like to fade on (instead of toggling “enabled”). Changing the parent’s opacity/alpha/whatever would fade up the child particles and halo image (using Plane).
var tl = new TimelineMax();
// TEST
var erf = app.root.findByName('Earth Model').model.model.meshInstances[0].material;
tl.fromTo(erf, 10, {opacity:0, onUpdate:erf.update}, {opacity:1});
// TEST END
I’m getting the following error:
Looking in the playcanvas-stable.js:9913, it shows the following:
Got it working. Here’s the final fade out script I used. I attached this to a plane with a black material on it, so it fades out when the scene is loaded.