glge

Translating mouse location to Object coordinates

北城余情 提交于 2020-01-06 08:23:11
问题 I'm trying to get basic mouse integration into a small demo using a Collada object. I am able to get the correct mouse x and y, but I don't know how to translate them into coordinates to be used for the object. I was hoping the GLGE function duck.setLoc(mousepos.x, mousepos.y) would convert from pixels, but that is not the case. What do I have to do to translate the 2D mousepos pixels into a 3D point? 回答1: If you have point with screen coordinates (x0, y0), you can un-project them and

GLGE API setRot/setRotX doesn't work

▼魔方 西西 提交于 2019-12-07 20:30:18
问题 I'm trying to make a little scene for viewing 3D models. I modified the GLGE Collada example to add a .dae model from code. http://goleztrol.nl/SO/GLGE/01/ What I've got So far it works. The camera is rotated using an animation. Using the buttons 'Add' and 'Remove' the model is added and removed from the scene, using the following code (Don't mind 'duck'. It was a duck in the original example.) var duck = null; function addDuck() { if (duck) return; duck = new GLGE.Collada(); doc.getElement(

GLGE API setRot/setRotX doesn't work

本小妞迷上赌 提交于 2019-12-06 08:15:50
I'm trying to make a little scene for viewing 3D models. I modified the GLGE Collada example to add a .dae model from code. http://goleztrol.nl/SO/GLGE/01/ What I've got So far it works. The camera is rotated using an animation. Using the buttons 'Add' and 'Remove' the model is added and removed from the scene, using the following code (Don't mind 'duck'. It was a duck in the original example.) var duck = null; function addDuck() { if (duck) return; duck = new GLGE.Collada(); doc.getElement("mainscene").addCollada(duck); duck.setId("duck"); duck.setDocument("amyrose.dae"); duck.setLocY(-15);

Is there a way to run unit test for a WebGL webapp in a headless browser

ε祈祈猫儿з 提交于 2019-12-03 05:42:32
Is there a way to run unit test for a WebGL (GLGE) webapp in a headless browser? I'd like to run the tests on a jenkins server, so the tests must run on a headless (phantom.js) brower. Anybody already tried that? Cheers gman The Chromium project runs automated webgl and other gpu tests on normal machines that are unattended but they have a shared monitor and are vnc connected so we can remotely service them. You can also run Chromium with osmesa. See https://stackoverflow.com/a/39060739/128511 来源: https://stackoverflow.com/questions/13763325/is-there-a-way-to-run-unit-test-for-a-webgl-webapp