vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
575 stars 102 forks source link

WebGL support #40

Open pierre0042 opened 8 years ago

pierre0042 commented 8 years ago

The screenshot of a page with WebGL elements doesn't seem to work with any of the engines.

example : http://webglsamples.org/blob/blob.html

It would be great if it could be supported :)

vbauer commented 8 years ago

I've already seen this issue: https://github.com/vbauer/manet/issues/5

Could you please try to switch engine to slimerjs and configure delay parameter (for example: 1000)? I've just tried to catch screenshot using http://localhost:8891/?url=http%3A%2F%2Fwebglsamples.org%2Fblob%2Fblob.html&delay=1000&force=true and it works fine.

pierre0042 commented 8 years ago

Sorry for not seeing the closed issue.

The fact is that I used those parameters (I even set delay to 2000). All I am getting is this : https://imgur.com/sgeyY7J

What could be wrong? I am using Ubuntu Linux 15.04

vbauer commented 8 years ago

Hmm.. I've just checked it on OS X 10.11 and Windows 10 and got the following result:

test

Command: http://localhost:8891/?url=http%3A%2F%2Fwebglsamples.org%2Fblob%2Fblob.html&delay=2000&force=true&engine=slimerjs

Is it possible test it on another OS? Could you please also try to set some big value for delay parameter (something like 30000)?

pierre0042 commented 8 years ago

setting delay to 30000 doesn't change the result

pierre0042 commented 8 years ago

It works fine on Windows 7 SP1. (I just had to specify --command as the default binary name for slimerjs seems now to be just "slimerjs" and not "slimerjs.bat")

pierre0042 commented 8 years ago

Ok I got it to run in my Linux with overriding the command too (manet --command slimerjs).

Using xvfb doesn't work when you are using a real graphical environment.

I will try to test it now in a Linux server without X.

pierre0042 commented 8 years ago

I tried with the docker image https://github.com/pdelsante/manet-dockerfile and it doesn't seem to work

kriscarle commented 8 years ago

I made a fork of the docker image that fixes WebGL rendering. https://github.com/openmaphub/manet-dockerfile

The two main things I did were:

vbauer commented 8 years ago

I'm really sorry for a long response - just a lot of work...

@kriscarle Thank you for https://github.com/openmaphub/manet-dockerfile ! I've just updated README and added information about this project.

@pierre0042 Have you tried https://github.com/openmaphub/manet-dockerfile ?