Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screenshotを簡単に取れるようにする #162

Open
simiraaaa opened this issue Jun 17, 2015 · 1 comment
Open

screenshotを簡単に取れるようにする #162

simiraaaa opened this issue Jun 17, 2015 · 1 comment

Comments

@simiraaaa
Copy link
Contributor

具体的には
tm.graphics.Canvas.prototype.clone() メソッドの実装
tm.display.CanvasApp.prototype.screenshot プロパティの実装(getter)

スクリーンショットをダウンロードする例
http://goo.gl/7p7fwo

スクリーンショットを別ウィンドウで開く例
http://goo.gl/QqFWWt

今後、シーン遷移時のアクションを作れるようにしたいと思っています。
例えば、

  • TM-Shooterのステージ終了時にリザルトシーンへ遷移するときの画面がバラバラ崩れるエフェクト
  • 画面が回転しながら遷移する
  • 画面が真っ二つに分かれて遷移する

など考えれば色々ありますが、
そういうエフェクトをtmlib.jsで定義しておいて、popScene、replaceSceneで簡単にエフェクトをかけられたら良いなと思っています。

遷移先のsceneのenter イベントでスクリーンショットにエフェクトを掛けるメソッドが定義できれば、実現できると思います。

  • enterイベントで エフェクトを再生するためのオブジェクトを遷移先のシーンの子に追加するか
  • シーンに遷移してからpushSceneでエフェクトを再生するか
@simiraaaa
Copy link
Contributor Author

enterイベントで エフェクトを再生するためのオブジェクトを遷移先のシーンの子に追加するパターンではこういうことです。
http://goo.gl/6QhILr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant