⚡ 5분 시작 가이드

최근 가장 많이 활용되는 React 환경을 기준으로 소개합니다.

1단계: 설치 (1분)

npm install @vrism/viewer-sdk

2단계: 기본 코드 (2분)

  • token : 계약된 사용자에 할당되는 Token (VRISM 제공)
  • contentId : 각 3D 모델에 할당되는 ContentId (VRISM 제공)
import { VrismViewer } from '@vrism/viewer-sdk';

function App() {
  return (
    <div style={{ width: '100%', height: '500px' }}>
      <VrismViewer
        token="your-token-here"
        contentId="your-content-id"
      />
    </div>
  );
}

3단계: 첫 커스터마이징 (2분)

<VrismViewer
  token="your-token-here"
  contentId="your-content-id"
  ui={{
    viewerBackgroundColor: '#f8f9fa',
    gestureGuide: true,
    fullscreenButton: true
  }}
  camera={{ autoRotation: -2 }}
/>

🎉 완료! 이제 3D 뷰어가 작동합니다.