How to render three.js server-side?

11,579

There are several discussions about using three.js on node.js on the three.js GitHub page. Check for example:

There is also this question on stackoverflow which could be considered a duplicate of your question.

This one is dealing with a project called node-three.js on GitHub. It will support rendering in three.js on node.js. Not sure if it does exactly what you want (I have no first hand experience with this library) but worth checking it out I guess.

Share:
11,579

Related videos on Youtube

Amicon Interactive
Author by

Amicon Interactive

Updated on September 14, 2022

Comments

  • Amicon Interactive
    Amicon Interactive over 1 year

    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 with people with less-end computers (people can inject the code into console and have it render god knows what..)

    I looked into using node.js but all documentation on that is vague and appears to be quite outdated..

    Any help would be useful

    Current local: http://pastebin.com/yv5Qamfz

    • Sean3z
      Sean3z about 8 years
      People will always be able to open their console and have the ability to "render god knows what". three.js is a client side library. Even if you dynamically generate markup server-side, the code will still be executed client-side. Also, node.js documentation is generally always up to date.
    • JanR
      JanR about 8 years
      You could write something that renders the model serverside and somehow streams it to the front-end, but I reckon you are better off just using three.js clientside as intended
  • B''H Bi'ezras -- Boruch Hashem
    B''H Bi'ezras -- Boruch Hashem about 4 years
    Even if its in a hidden div, any client could make a browser extension that injects code into that div