WTS/game/scripts/utility/parallax.rpy
LoafyLemon 2f4e3c3b35 Reimplement main menu (Partial)
* Add new main menu
* Add parallax transform
* Add art placeholders
2024-11-28 18:26:00 +00:00

17 lines
516 B
Plaintext

transform parallax(depth):
perspective True
subpixel True
zzoom True
zpos depth/100.0
function parallax_move
init python:
def parallax_move(trans, st, at):
x, y = renpy.get_mouse_pos()
xo = (x - config.screen_width // 2)
yo = (y - config.screen_height // 2)
trans.xoffset = xo * trans.zpos
trans.yoffset = yo * trans.zpos
trans.matrixtransform = Matrix.rotate(yo * 0.0004, xo * 0.000225, 0) * Matrix.scale(1.015, 1.015, 1.0)
return 0