# @allestaire.acasio/all-around-the-world

> Marzipano wrapper Package

Latest version **1.0.9** (published 2023-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install @allestaire.acasio/all-around-the-world
pnpm add @allestaire.acasio/all-around-the-world
yarn add @allestaire.acasio/all-around-the-world
bun add @allestaire.acasio/all-around-the-world
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2023-07-04 |
| First published | 2023-07-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 6.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Al Lestaire Acasio |
| Maintainers | allestaire.acasio |
| Keywords | Marzipano |

## Links

- npm: https://www.npmjs.com/package/@allestaire.acasio/all-around-the-world
- Repository: https://github.com/Als-Laravel-Packages/all-around-the-world
- Homepage: https://github.com/Als-Laravel-Packages/all-around-the-world#readme
- Issues: https://github.com/Als-Laravel-Packages/all-around-the-world/issues
- npm.io page: https://npm.io/package/@allestaire.acasio/all-around-the-world

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^18.2.0
- [marzipano](https://npm.io/package/marzipano.md) ^0.10.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [@mui/material](https://npm.io/package/@mui/material.md) ^5.13.6
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.22.5

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.9 (latest) — 2023-07-04
- 1.0.8 — 2023-07-03
- 1.0.7 — 2023-07-03
- 1.0.6 — 2023-07-03
- 1.0.5 — 2023-07-03
- 1.0.4 — 2023-07-03
- 1.0.3 — 2023-07-03
- 1.0.2 — 2023-07-03
- 1.0.1 — 2023-07-03
- 1.0.0 — 2023-07-03

## README

# All Around The World

- Mazipano Package for React

![Demo](./demo.gif)

## Installation

```bash
# Using Yarn
yarn add @allestaire.acasio/all-around-the-world

# Using NPM
npm install @allestaire.acasio/all-around-the-world
```

## Usage

```js
import AllAroundTheWorld from '@allestaire.acasio/all-around-the-world'

const SCENE = [
  ...
  {
    label: 'Radiant Church of God',
    facesize: 4096,
    settings: {
      yaw: -0.8742276521196057,
      pitch: 0.13728319936422295,
      roll: 0,
      fov: Math.PI/1.5
    },
    image: '/imgs/cubemap/{f}.jpg',
    levels: [{ tileSize: 1024, size: 1024 }],
    hotspots: [
      {
        ele: 'outside',
        coordinates: {
          yaw: 2.2787784123665737,
          pitch: 0.08445560195570856,
        },
        perspective: {
          radius: 1640, extraTransforms: 'rotateX(0deg) rotateY(0deg) rotateZ(0deg)'
        }
      },
    ]
  }
]

const MyComponent = () => {
  const sceneEl = useRef(null)
  const handleClick = (coordinate, scene) => {
    console.log(coordinate, scene)
    // Change to next scene
    // scene.current.switchScene(sceneIndex, setting)
  }

  return (
    <AllAroundTheWorld ref={sceneEl} scenes={SCENE} onClick={handleClick}/>
  )
}

export default MyComponent
```

## Component Property

**Attribute** | **Type** | **Description**
----------|------|------------
**scenes** | `Array` | List of scenes (see Scene Format)
**limiter** | `Boolean` | This will add limiter to the scene
**onClick** | `Function` | Click event when click on the scene, this will have a parameter of coordinate and scene
_ | **coordinate** | Coordinate of the click position
_ | **scene** | Current data scene upon clicking


## Scene Format

**Property** | **Type** | **Description**
---------|------|------------
**label** | `String` | Title of the scene
**facesize** | `Number` | Face size of the screen (I guess) [See](https://www.marzipano.net/docs.html) for documentation
**settings** | `Object` | Custom view point
**image** | `String` | Image URL
**levels** | `Array` | List of leveles `[{ tileSize: 1024, size: 1024 }]`
**hotspots** | `Array` | List of hotspot configuration
_ | **ele** | Element ID, i.e my-hotspot
_ | **coordinates** | Coordinate consist of `{yaw: 0, pitch: 0}`
_ | **perspective** | Change perspective of the hotspot relative to its view, i.e `{radius: 0, extraTransforms: "rotateX(0deg) rotateY(0deg) rotateZ(0deg)"}`

---
_Source: https://npm.io/package/@allestaire.acasio/all-around-the-world · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
