How to render three.js server-side?

后端 未结 2 1248
轮回少年
轮回少年 2021-02-20 13:06

How can I render three.js server side? At the moment our website renders player avatars using three.js locally, however that issues security things as well as potential bugs wit

2条回答
  •  不思量自难忘°
    2021-02-20 13:56

    Check out this blog post. Its from a few years ago, but trying to solve a similar issue. Apparently there isn't an off-the-shelf solution yet.

    Perhaps you could render it client-side as you are currently doing, but inside a hidden div, and then render the canvas to an image and display the image to the user? See here for an example.

提交回复
热议问题