ZH

← JumPHP 引擎扩展

Effects v0.5.13

jumphp/effects · MIT · 0 次下载

Fades, wipes, an iris and a dissolve to change scene, a flash, a vignette and easing curves: all drawn with translucent rectangles.

适用于 JumPHP ^0.5

它带来什么

  • Transitions: fade, wipe (4 sides), iris on a point, blinds, dissolve; cover, change the scene under it, reveal
  • Flash: light the screen in a colour, it fades
  • Vignette: darker edges
  • Ease: 10 curves (quad, cubic, back, bounce, elastic) and lerp
  • Pure PHP, 32-bit safe: the same in the browser

添加到你的游戏

bin/jumphp extension:add <game> jumphp/effects

或使用 Composer:

bin/jumphp composer <game> require jumphp/effects

服务: JumPHP\Effects\Flash, JumPHP\Effects\Transition
project.yaml 键: effects

示例

$this->transition->cover('iris', 0.6, '#000000', fn () => $this->scenes()->switchTo(PlayScene::class, [], false));// the new scene's enter(): $this->transition->reveal('iris', 0.6);

文档 源代码 Packagist

Effects

Screen effects for JumPHP games (jumphp/effects): transitions (fade, wipes, iris, blinds, dissolve), a flash, a vignette, easing curves. Documentation: doc/index.md; samples: doc/samples/ (bin/jumphp extension:add <game> jumphp/effects copies both into your game). Example game: games/effects-demo.

对此扩展的评价

使用 GitHub 登录 请使用 GitHub 登录后为此扩展评分。

暂无评价:来做第一个吧。