Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylan-kentish/headless-threejs
Headless threejs using Puppeteer
https://github.com/dylan-kentish/headless-threejs
docker dockerfile headless headless-chrome runpod-serverless serverless threejs
Last synced: 1 day ago
JSON representation
Headless threejs using Puppeteer
- Host: GitHub
- URL: https://github.com/dylan-kentish/headless-threejs
- Owner: Dylan-Kentish
- Created: 2025-01-18T14:04:52.000Z (2 days ago)
- Default Branch: main
- Last Pushed: 2025-01-18T15:25:12.000Z (2 days ago)
- Last Synced: 2025-01-18T16:33:03.020Z (2 days ago)
- Topics: docker, dockerfile, headless, headless-chrome, runpod-serverless, serverless, threejs
- Language: HTML
- Homepage:
- Size: 2.02 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HEADLESS Three.js
This template is a simple starting point for a headless three.js project. It demonstrates how to create a scene, add a camera, load an environment and render the scene to a file.
This repo can be extended for numerous use cases. I have included an example `dockerfile`, its configured for runpod, but can be modified to run on any cloud provider.
## What to explore
1. Pass inputs into the script via cmd line args to adjust the scene/output
2. Return the rendered image as a base64 string in the runpod response
3. Rather than saving the image to disk, upload it to a cloud storage service
4. Use animations to create multiple frames and stitch them together to create a gif## Remember
- The puppeteer base image version should be the same as the package version in the `package.json`, otherwise you may have version conflicts that are difficult to debug.
- To update the three.js version, just update the version in the `importmap` at the top of `render.html` file.