Zim ble question

in the demo https://codepen.io/yan01/pen/empENQj
I use ble(),and i want show bg0 ,how can do this?

The destination-in will go to the object underneath on the canvas - so perhaps adding it to a second frame?

import zim from "https://zimjs.org/cdn/018/zim.js";
const assets = ["outerspace04.jpg","spacer08.png","beach02.jpg"];
const path = "https://zimjs.org/assets/";
new Frame("fit", 800, 600, "#f603", "#555", ready, assets, path);
function ready(frame1, stage1){	
	new Frame(FIT, 800, 600, clear, "#555", ready2);
	function ready2(frame2, stage2) {       
		const bg0 = new Pic('beach02.jpg').center(stage1);
		const bg1 = new Pic('outerspace04.jpg').center(stage2);
		const man = new Pic('spacer08.png').center(stage2).ble('destination-in');
		stage1.update();		
	}
}

Or use an AlphaEffect https://zimjs.com/docs.html?item=AlphaEffect

1 Like