LoginSignup
1
3

More than 3 years have passed since last update.

まるで風景の中にいるみたい。パノラマ画像表示ビューワーCTPanoramaViewがすごい。

Last updated at Posted at 2020-12-08

パノラマ写真を360度表示できるライブラリ。一枚もののパノラマなのに、歪みが補正されてすごい臨場感。
SceneKitの球体もしくは円筒にパノラマ写真を貼り付けてSceneカメラを回転させる原理みたい。
いいアイデアだなあ。
timothy-oldfield-luufnHoChRU-unsplash.jpg
Dec-09-2020 02-06-43.gif

CTPanoramaView

使い方

CTPanoramaViewをZipでダウンロード。
プロジェクトにCTPanoramaView.swiftを追加。

使い方はUIImageViewとおなじ。


let panoramaView = CTPanoramaView(frame: view.bounds)
panoramaView.image = UIImage(named: "panorama")
view.addSubview(panoramaView)

あとはドラッグで写真を動かせます。

デバイスのジャイロでも動かせます。

panaromaView.controlMethod = .motion // Accelerometer & gyroscope based control

🐣


フリーランスエンジニアです。
お仕事のご相談こちらまで
rockyshikoku@gmail.com

Core MLを使ったアプリを作っています。
機械学習関連の情報を発信しています。

Twitter
Medium

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3