(height: number, width: number, view: View)
| 7 | export const viewStateProps = ['target', 'rotationOrbit', 'rotationX', 'zoom']; |
| 8 | |
| 9 | export function targetViewState(height: number, width: number, view: View): OrbitViewState { |
| 10 | const target = [width / 2, - height / 2, 0] as Position; |
| 11 | |
| 12 | if (view === '2d') { |
| 13 | return { |
| 14 | target, |
| 15 | rotationOrbit: 0, |
| 16 | rotationX: 90, |
| 17 | zoom: -0.2, |
| 18 | }; |
| 19 | } else { |
| 20 | return { |
| 21 | target, |
| 22 | rotationOrbit: 25, |
| 23 | rotationX: 30, |
| 24 | zoom: -0.4, |
| 25 | }; |
| 26 | } |
| 27 | } |
no outgoing calls
no test coverage detected