🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@umm/simple_screenshot

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umm/simple_screenshot

Capture screen shot simply

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
6
Created
Source

What?

  • 実行中のゲーム画面 (など) をシンプルにキャプチャします。

Why?

  • 何かとスクショ撮る要件あるよね、ってコトで。

Install

$ npm install github:umm-projects/simple_screenshot.git

Usage

SimpleScreenshot
    .Install(Camera.main)
    .Capture()
    .Subscribe(texture => Debug.Log(texture));

SimpleScreenshot
    .Install(Camera.main)
    .CaptureToFile("/path/to/file")
    .Subscribe(_ => Debug.Log("Finish to output!"));
  • Install メソッドに撮影対象のカメラを渡します
    • List で渡すコトも可能です
  • Capture メソッドが、キャプチャ完了時に Texture を流すストリームを返します
    • あとはそれを REST API に送るなりなんなりご自由に
  • CaptureToFile メソッドはキャプチャ結果をファイルに出力します
    • これの戻り値のストリームは、出力完了時に Unit.Default を流します
    • 内部でランダムなファイル名生成して、それを流すコトも考えたけどメンドイのでひとまずパス

License

Copyright (c) 2017 Tetsuya Mori

Released under the MIT license, see LICENSE.txt

FAQs

Package last updated on 11 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts