I'm building a boardgame in WebGL. The board can be rotated/zoomed. I need a way to translate a click on the canvas element (x,y) into the relevant point in 3D space (x, y, z). The ultimate result is that I want to know the (x, y, z) coordinate...
Is it possible to lay multiple textures on top of each other on the same face in Three.js so that the alpha blending is done GPU accelerated in webGL?  The textures are (or should be) applied to the same face so that the bottom texture (texture 1)...
I am trying to convert the canvas element on this page to a png using the following snippet (e.g. enter in JavaScript console):  (function convertCanvasToImage(canvas) {   var image = new Image();   image.src = canvas.toDataURL("image/png");...
Is there some JavaScript event fired when user enables full screen in Chrome or FireFox?   I have WebGL application with canvas width and height set to a certain size and I would like to resize that among other things when user enables full screen. I...
I am under a situation that i have two canvas, and i want to display the same object in both canvas (in fact i have to display different objects in each canvas, but i want to start by showing same object in both), but i am not able to do this,    cou...
For educational purposes I need to compare the performance of WebGL with OpenGL. I have two equivalent programs written in WebGL and OpenGL, now I need to take the frame rate of them and compare them.    In Javascript I use requestAnimationFrame to a...
I'm playing around with Three.js and WebGL and can't quite get the controls the way I want. I chose to try to "roll my own" controls since Three.js's FirstPersonControls do not use pointer lock.  Anyway, I took most of my code fro...
I have a problem with image rendering in WebGL: I have a canva, with a quad that takes the whole canvas, and a texture which is supposed to be mapped onto the whole quad (I have set the correct texture coordinates).  The image is a Uint8array contain...
When using preserveDrawingBuffer for our context we need to take care of clearing the drawing buffer by our self. I use this technique in my app.  I read some article that says - setting this flag to false can get better performances.  In my app when...
I'm getting the Uncaught TypeError: undefined is not a function while using Three.js. The error is being shown for the line where I'm creating a THREE.PerspectiveCamera.  The script is   window.requestAnimFrame = (function(callback){...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.