Skip to content

hyperbeam/threejs-example

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

threejs-example

Hyperbeam virtual computers in Three.js! 🀯

  • Spatial audio 🎡
  • Handles mouse, keyboard and wheel events πŸ–±οΈ
  • OrbitControls πŸš€
  • Oh, and the virtual computer is multiplayer πŸ˜‰

Try it out here πŸ‘‰ https://threejs-example.hyperbeam.com

Show me the magic! πŸͺ„

Make sure you turn on the audio 😎

2022-08-18.12-33-29.mp4

Running locally πŸ’»

npm install
npm run dev

Setting custom embed URL πŸ€”

  1. You'll need to get a Hyperbeam API key β€” you can generate a free API key by signing up at https://hyperbeam.com πŸŽ‰
  2. Start a virtual computer session using curl:
curl -X POST -H 'Authorization: Bearer <your-api-key>' https://engine.hyperbeam.com/v0/vm
{
  "session_id": "85a208c0-8fc1-4b27-bcbc-941f6208480b",
  "embed_url": "https://96xljbfypmn3ibra366yqapci.hyperbeam.com/haIIwI_BSye8vJQfYghICw?token=QAWRxLz6exTKbxlFG3MTBxsoPePyDa7_WO3FCxKO73M",
  "admin_token": "OjIulaS-YO4qWHoGap2iK3KqUvAX5qEi9_fDCxESNj0"
}
  1. Copy the value of the "embed_url" key and set the embedURL variable in main.js.

About

πŸͺ© Hyperbeam virtual computers in Three.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published