ThreeJS Example
This document provides a guide for creating a sample app in Three.js, building the app with Vite and deploying the app to VIVERSE.
Last updated
Was this helpful?
This document provides a guide for creating a sample app in Three.js, building the app with Vite and deploying the app to VIVERSE.
Last updated
Was this helpful?
In this getting-started guide, we will cover the basics of setting up a ThreeJS project and publishing to VIVERSE using .
This guide is a walkthrough for creating an example Three.js project
A. To create a development build of the Three.js project, type the following command inside command prompt under the Three.js project directory: npx vite.
B. Confirm the development build of the Three.js project was built successfully when Vite provides a localhost URL to test.
A. To create a production build of the Three.js project, type the following command inside command prompt under the Three.js project directory: npx vite build.
B. Confirm the production build of the Three.js project was built successfully by confirming the dist folder was created and populated.
A. Inside a command prompt, type: npm install -g @viverse/cli, then click Enter. Installing a package with -g installs the package globally. The location of globally installed packages depends on your operating system and npm configuration:
Windows : In windows, packages are installed in %APPDATA%\npm\node_modules.
macOS and Linux : In mac or Linux packages are typically installed in /usr/local/lib/node_modules or a user-specific directory like ~/.npm-global.
B. Confirm that the command line tool is installed based on screen feedback.
A. To re-publish content to VIVERSE when a project is already published, type the following command with the project path to the project's production build folder: viverse-cli publish <path>, then click Enter.
B. Confirm the manifest file is updated.
C. Confirm the content was published successfully.