{"id":13561304,"url":"https://github.com/lightbasenl/react-native-panorama-view","last_synced_at":"2025-04-03T17:30:36.535Z","repository":{"id":34979553,"uuid":"192692436","full_name":"lightbasenl/react-native-panorama-view","owner":"lightbasenl","description":"A simple component for displaying panoramic images in your React Native app.","archived":true,"fork":false,"pushed_at":"2023-01-06T01:54:43.000Z","size":12657,"stargazers_count":130,"open_issues_count":59,"forks_count":48,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-04T13:37:13.514Z","etag":null,"topics":["360","android","ios","panorama","panorama-image","panorama-viewer","react","reactnative","typescript"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightbasenl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-19T08:35:31.000Z","updated_at":"2024-09-27T19:19:17.000Z","dependencies_parsed_at":"2023-01-15T11:30:49.680Z","dependency_job_id":null,"html_url":"https://github.com/lightbasenl/react-native-panorama-view","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightbasenl%2Freact-native-panorama-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightbasenl%2Freact-native-panorama-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightbasenl%2Freact-native-panorama-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightbasenl%2Freact-native-panorama-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightbasenl","download_url":"https://codeload.github.com/lightbasenl/react-native-panorama-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247046746,"owners_count":20874714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["360","android","ios","panorama","panorama-image","panorama-viewer","react","reactnative","typescript"],"created_at":"2024-08-01T13:00:54.704Z","updated_at":"2025-04-03T17:30:35.631Z","avatar_url":"https://github.com/lightbasenl.png","language":"Swift","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"![Lightbase](https://lightbase.nl/logo_small.png)\n\n# React Native Panorama View\n\nReact Native Panorama viewer for Android and iOS.\n\n![Demo](https://raw.githubusercontent.com/lightbasenl/react-native-panorama-view/master/demo.gif)\n\n## Mostly automatic installation (RN \u003e= 0.60)\n\n`$ npm install @lightbase/react-native-panorama-view --save` or\n`$ yarn add @lightbase/react-native-panorama-view`\n\n`$ cd ios \u0026\u0026 pod install`\n\n## Troubleshooting iOS\n\nIf you're app doesn't compile due to Swift or linker errors. Follow these steps.\n\n1. Make sure you have defined a `SWIFT_VERSION` in your project.\n2. Add `/usr/lib/swift` as the first argument to your **Runpath Search Paths**.\n3. Add `\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"` to your **Library Search Paths**.\n4. Add a dummy swift file on your project root and accept adding a bridging header\n\n## Usage\n\nYou can size your panorama anyway you'd like using the regular `View` styles.\n\nNOTE: On android, you need to make sure the View renders at least a few pixels (not invisible / display:\nnone). Otherwise, the VR viewer won't fire events. You may use `onImageDownloaded` to lazy load the VR\nrenderer instead.\n\nHere are some examples:\n\n### Embed a panorama as a part of your screen\n\n```tsx\nimport PanoramaView from \"@lightbase/react-native-panorama-view\";\n\nconst PanoramaDetails = () =\u003e (\n  \u003cView style={styles.container}\u003e\n    \u003cPanoramaView\n      style={styles.viewer}\n      dimensions={{ height: 230, width: Dimensions.get(\"window\").width }}\n      inputType=\"mono\"\n      imageUrl=\"https://raw.githubusercontent.com/googlevr/gvr-android-sdk/master/assets/panoramas/testRoom1_2kMono.jpg\"\n    /\u003e\n  \u003c/View\u003e\n);\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n  },\n  viewer: {\n    height: 230,\n  },\n});\n```\n\n### Fullscreen panorama\n\n```tsx\nimport PanoramaView from \"@lightbase/react-native-panorama-view\";\n\nconst FullScreenPanorama = () =\u003e (\n  \u003cPanoramaView\n    style={{ flex: 1 }}\n    dimensions={{\n      height: Dimensions.get(\"window\").height,\n      width: Dimensions.get(\"window\").width,\n    }}\n    inputType=\"mono\"\n    imageUrl=\"https://raw.githubusercontent.com/googlevr/gvr-android-sdk/master/assets/panoramas/testRoom1_2kMono.jpg\"\n  /\u003e\n);\n```\n\n## Props\n\n| Name                 | Type                                | Description                                                                                               |\n| -------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------- |\n| imageUrl             | string                              | Remote or local URI for fetching the panorama image.                                                      |\n| enableTouchTracking  | boolean                             | Enables dragging the panorama by touch when `true`.                                                       |\n| onImageLoadingFailed | callback                            | Fired when something goes wrong while trying to load the panorama.                                        |\n| onImageDownloaded    | callback                            | Fired when the image was successfully downloaded. This will fire before onImageLoaded                     |\n| onImageLoaded        | callback                            | Fired when the image was successfully loaded.                                                             |\n| style                | ViewStyle                           | Allows to style the `PanoramaView` like a regular `View`.                                                 |\n| inputType            | 'mono' or 'stereo'                  | Specify the type of panorama source image. **Android only**                                               |\n| dimensions           | `{ height: number, width: number }` | Is used to prevent loading unnecessarily large files into memory. **Currently required for Android only** |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightbasenl%2Freact-native-panorama-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightbasenl%2Freact-native-panorama-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightbasenl%2Freact-native-panorama-view/lists"}