Stephane Posted November 2, 2018 Share Posted November 2, 2018 Hi ! I have a mobile game based on pixi.js+pixi-spine (let's call it the client). I also have a backend in node.js (let's call it the server). Now, I want to dynamically generate gifs from my spine characters and display/send them from server's side. I have 2 options: generate the gif files on the client, send them to the server store my spine assets on server, generate the gifs server side I'd prefer option 2, but rendering on an headless server seems to not be a straight road. I tried quickly node-pixi, just the require is complaining about window missing. Anybody has experience doing tis kind of server side rendering? Any suggestions? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 2, 2018 Share Posted November 2, 2018 https://www.npmjs.com/package/pixi-shim Also beware of serious speed reduce of node-canvas on server-side. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 2, 2018 Share Posted November 2, 2018 Please look at this and previous page of pixijs subforum, we had issue like that not so long ago. Quote Link to comment Share on other sites More sharing options...
b10b Posted November 2, 2018 Share Posted November 2, 2018 You may also want to consider using PhantomJS. It's going to be much slower than in the browser (and WebGL won't be an option last time I checked) but it can often create "server-side" graphical results close to the "client-side" equivalent (and using the same code). Quote Link to comment Share on other sites More sharing options...
Stephane Posted November 3, 2018 Author Share Posted November 3, 2018 Nice ! I'll first explore pixi-shim as it seems more lightweight. The slow issue should not be a problem in my case (although it is quite scary). Thanks ! I'll post my experience here ? Quote Link to comment Share on other sites More sharing options...
b10b Posted November 3, 2018 Share Posted November 3, 2018 I dunno about being lightweight ... the shim and other node canvas dependencies can be significant. From my experience of server-side rendering I'd say the phantom route is less hassle, especially if using a remote service (e.g. phantomjscloud). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.