Hi!
I’m currently toying with Monarch transitions to understand how it works, overall I get the principle but in a specific context, a graphical glitch occurs and I can’t figure out why.
As you can see in this video, the background (space/planet) is displayed for a very short time (1 frame?) before the fade-in animation (black filter):
The background is a collection (like in the Monarch advanced example)
put at the bottom of the stack in the loader.script:
function on_message(self, message_id, message, sender)
if message_id == hash("show_screen_home") then
monarch.show(("background"), { no_stack = true })
monarch.show("screen_home")
print("SCREEN_HOME TRIGGERED!")
end
end
screen_home.script (the code is weirdly displayed here but still there):
function init(self)
msg.post(".", "acquire_input_focus")
gui.set_render_order(1)
self.transition_black_filter = transitions.create(gui.get_node("black_filter"))
.show_in(transitions.fade_out, gui.EASING_LINEAR, 3, 0)
.show_out(transitions.fade_in, gui.EASING_LINEAR, 3, 0)
.back_in(transitions.fade_out, gui.EASING_LINEAR, 3, 0)
.back_out(transitions.fade_in, gui.EASING_LINEAR, 3, 0)
end
and
function on_message(self, message_id, message, sender)
self.transition_black_filter.handle(message_id, message, sender)
end
I suppose there is something wrong with the way I manage the background collection, but I don’t what.
Is there a trick, an option/property, a work-around or just another way to proceed to prevent the background from being displayed before the fade-in?