running p5 from node?

Hello, apologies if this question is vague! I made a p5 sketch that generates a png, which works great. I also got a discord bot working with basic commands using node. The problem is I haven't the faintest idea how to run the p5 sketch from node to generate the image.

Is this a complicated/dumb thing to do? The ultimate goal was to be able to type parameters into discord which generates and uploads the image.

Answers

  • The problem is I haven't the faintest idea...

    Me neither! But I did some search and just maybe these Node.js libraries might work for p5.js: 8-|

    1. https://GitHub.com/tmpvar/jsdom/
    2. https://GitHub.com/alexscheelmeyer/node-phantom
  • awesome, thank you! I'll check them out.

    I'm a pretty new to programming, and it's crazy how quickly you drop into the deep end once you stray from tutorials.

  • You can check the shiffman channel in you tube. Check intro to node.js by him and explore his videos. There is a set of videos that he shows exactly what you want to do. I cannot provide you links atm. If you cannot find me, send me a PM and I will get it for you.

    Kf

Sign In or Register to comment.