git clone https://gist.github.com/6780d7cc0cabb1b4d6c8.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> [email protected] start /Users/bsergean/src/offscreen_sample
| #!/usr/bin/env coffee | |
| PNG = require('pngjs').PNG | |
| fs = require('fs') | |
| bunny = require('bunny') | |
| normals = require('normals') | |
| Shader = require('gl-shader') | |
| camera = require('lookat-camera')() |
| > [email protected] test /home/bsergean/src/headless-gl | |
| > tape test/*.js | |
| TAP version 13 | |
| # attribs_gl-disabled-vertex-attrib | |
| DESCRIPTION: undefined | |
| BENJAMIN WAS HERE | |
| BENJAMIN WAS HERE 2 | |
| BENJAMIN WAS HERE 3 |
git clone https://gist.github.com/6780d7cc0cabb1b4d6c8.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> [email protected] start /Users/bsergean/src/offscreen_sample
git clone https://gist.github.com/08be90a2f21205062ccc.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> [email protected] start /Users/bsergean/src/offscreen_sample
| mkdir /tmp/node | |
| cd /tmp/node | |
| curl https://nodejs.org/dist/v4.2.1/node-v4.2.1-linux-x64.tar.xz | tar Jxf - | |
| cd node-v4.2.1-linux-x64 | |
| sudo cp -rvf * /usr/local/ |
| mkdir /tmp/node | |
| cd /tmp/node | |
| curl https://nodejs.org/dist/v4.2.1/node-v4.2.1-linux-x86.tar.xz | tar Jxf - | |
| cd node-v4.2.1-linux-x86 | |
| sudo cp -rvf * /usr/local/ |
| # | |
| # Run in the foreground locally | |
| # nginx -p . -c nginx.conf | |
| # | |
| worker_processes 1; | |
| daemon off; | |
| error_log nginx_error.log; | |
| events { | |
| worker_connections 1024; |
| time_namelookup: %{time_namelookup}\n | |
| time_connect: %{time_connect}\n | |
| time_appconnect: %{time_appconnect}\n | |
| time_pretransfer: %{time_pretransfer}\n | |
| time_redirect: %{time_redirect}\n | |
| time_starttransfer: %{time_starttransfer}\n | |
| ----------\n | |
| time_total: %{time_total}\n |
| FROM python:3.8.0-alpine3.10 | |
| RUN pip install websockets | |
| COPY ws_proxy.py /usr/bin | |
| RUN chmod +x /usr/bin/ws_proxy.py | |
| EXPOSE 8765 | |
| CMD ["python", "/usr/bin/ws_proxy.py"] |