Read the article Serverless 3D WebGL rendering with ThreeJS.
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
First, you'll need a .glTF (or .GLB) formatted 3D model to render. Here's one you can use.
https://serverless-3d-rendering.vercel.app?model={URL}
Example:
https://serverless-3d-rendering.vercel.app?model=/DamagedHelmet.glb
https://serverless-3d-rendering.vercel.app/api/render?model={URL}
Example:
https://serverless-3d-rendering.vercel.app/api/render?model=https://serverless-3d-rendering.vercel.app/DamagedHelmet.glb
This image below was rendered serverlessly when this page was loaded through the API listed above:
To learn more about Next.js, take a look at the following resources:
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。