0 votes
by (250 points)

I am trying to figure out a way to have a longer fade out when clicking to a new passage by using passage tags. I have created a working 5 second transition fade using this code:

.fivesectrans.passage {
transition: opacity 5s ease-in;
}

/*Then give incoming passage this tag: fivesectrans*/

but when I do the same for the fade out, the animation does not work:

.passageout.passage{
transition: opacity 5s ease-out 1s;
}

What am I doing wrong?

 

1 Answer

0 votes
by (68.6k points)

Outgoing passage transitions are not enabled by default.  I'd suggest reading the documentation for the Config.passages.transitionOut configuration property.

In short, you'll need to add something like the following to your script section: (Twine 2: Story JavaScript; Twine 1: script-tagged passage)

Config.passages.transitionOut = "opacity";

 

...