This is what I'd like to achieve (a modifiable polygon where the red circles are vertices) and I'd like to build the polygon dynamically.    When initiating the geometry as  var geometry = new THREE.Geometry();  geometry.vertices.push(point...
I'm creating a 3D multiplayer game with Three.js, where players can join various existing games. Once "play" is clicked, the renderer is appended to the page and fullscreens. This works great, but the problem is that, when I exit the fu...
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...
I sometimes find myself struggling between declaring the buffers (with createBuffer/bindBuffer/bufferdata) in different order and rebinding them in other parts of the code, usually in the draw loop.  If I don't rebind the vertex buffer before d...
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 noticed that THREE.js uses shaders internally to create core material "e.g. MeshLambertMaterial", So I decided to copy the lambert shader from Three.js code into a new shader and build on it.  This is the code I got (Copied faithfully fro...
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...
In the learningwebgl tutorial1 I've found an interesting line in the fragment shader.  precision mediump float;   I've found an article about it here, but I still can't understand what does it mean?  And if I remove this line, nothing cha...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.