12345678910111213141516171819202122232425262728 |
- if(! ("ghostforest" in state)){
- state.ghostforest <- false;
- print("[DEBUG] Ghost Forest state initialized\n");
- }
- function go_ghostforest(under){
- fade_time <- 0.35;
- ghost_darkness.fade(under ? 1 : 0, fade_time);
- ghost_land.fade(under ? 1 : 0, fade_time);
- ghost_convex.fade(under ? 1 : 0, fade_time);
- ghost_edges.fade(under ? 1 : 0, fade_time);
- ghost_back.fade(under ? 1 : 0, fade_time);
- ghost_front.fade(under ? 1 : 0, fade_time);
- ghost_trees0.fade(under ? 1 : 0, fade_time);
- ghost_trees1.fade(under ? 1 : 0, fade_time);
- ghost_trees2.fade(under ? 1 : 0, fade_time);
- ghost_trees3.fade(under ? 1 : 0, fade_time);
- ghost_trees4.fade(under ? 1 : 0, fade_time);
- land_trees1.fade(under ? 0 : 1, fade_time);
- land_trees2.fade(under ? 0 : 1, fade_time);
- land_trees3.fade(under ? 0 : 1, fade_time);
- land_trees4.fade(under ? 0 : 1, fade_time);
- back_trees.fade(under ? 0 : 1, fade_time);
- state.ghostforest <- under;
- }
- go_ghostforest(state.ghostforest);
|