@sayduck/viewer-threejs
v3.5.7-pre-2
Published
### Currently based on Three.js and glTF 2.0.
Downloads
26
Keywords
Readme
Sayduck's static 3D viewer app.
Currently based on Three.js and glTF 2.0.
Development Setup
Make sure you have nodejs installed
NPM
- Ask a developer to invite you to the all packages access team on sayduck npm.
- Create a new access token and copy it.
- Export a path variable in the form of
NPM_AUTH_TOKEN=<token>
from your shell. (Replace with the token you got in step 2) source
your shell config e.gsource ~/.zshrc
App
- Add a
.npmrc
to the root of the project directory, and paste
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
- Create a
.env
file and add these values
PUBLIC_URL=http://static.sayduck.com/2021.04.23.3d_viewer_comparison/
REACT_APP_ENVIRONMENT=development
REACT_APP_HOSTNAME=dvpt-xx-api.sayduck.io
REACT_APP_API_URL=https://dvpt-fs-cable.ngrok.io
REACT_APP_API_SUBSCRIPTION_URL=wss://dvpt-xx-api.sayduck.io/cable
REACT_APP_GA_TRACKING_ID=UA-126878791-3
REACT_APP_SENTRY_DSN=https://[email protected]/1293641
REACT_APP_CONFIGURATOR_PICKER_URL=https://staging-configurator-picker.sayduck.com
- Substitute
xx
for the initials you chose during setup of https://github.com/Sayduck/sayduck-api-rails - Run
npm install
- Run
npm start
Deploying the viewer:
Pre-requirement
- Install Pip
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ (sudo) python get-pip.py
- Install & configure AWS CLI
$ sudo pip install awscli
( might need$ sudo pip install awscli --ignore-installed six
on macOS. Also maybe$ sudo pip install nose
,sudo pip install tornado
)- Configure AWS
$ aws configure
AWS Access Key ID: [YOUR-ACCESS-KEY-ID]
AWS Secret Access Key: [YOUR-ACCESS-KEY-SECRET]
Default region name [None]: us-east-1
Default output format [None]: json
Deploying
Just run
npm run staging-deploy
ornpm run deploy