UNPKG

@s20.ai/safecam-360-rn

Version:

A React Native component to view the interior panorama and exterior 360 degree views of a product featuring suppport for hotspots. Compatible with Android and iOS

35 lines (26 loc) 844 B
import { Dimensions } from "react-native"; const {width, height} = Dimensions.get('window'); function wp(percentage) { const value = (percentage * width) / 100; return Math.round(value); } const slideHeight = height * 0.36; const slideWidth = wp(75); const itemHorizontalMargin = wp(2); export const sliderWidth = width; export const sliderHeight = height; export const itemWidth = slideWidth + itemHorizontalMargin * 2; export const itemHeight = slideHeight + itemHorizontalMargin * 2; export const viewportHeight = height; export const viewportWidth = width; export const carouselConfig = { windowSize: 1, loop: false, loopClonesPerSide: 1, autoplay: false, enableMomentum: true, layoutCardOffset: 0, //new style from figma, original was center // activeSlideAlignment: "start", removeClippedSubviews: false, };