Skip to main content
177 votes
3 answers
146k views

The code work, but I'm having a problem setting transparent background to the canvas with three.js. I use: Background.renderer.setClearColor(0xffffff, 0); But then the background gets black. How do I ...
Robert Bue's user avatar
  • 1,914
173 votes
7 answers
222k views

I've been trying to change what seems to be the default background color of my canvas from black to transparent / any other color - but no luck. My HTML: <canvas id="canvasColor"> My CSS: <...
user1231561's user avatar
  • 3,369
163 votes
8 answers
64k views

I'm new and starting to learn about 3D computer graphics in web browsers. I'm interested in making 3D games in a browser. For anyone who has learned both WebGL and three.js... Is knowledge of WebGL ...
r1nzler's user avatar
  • 2,533
92 votes
2 answers
231k views

I'm facing Uncaught TypeError: Cannot destructure property 'basename' of 'React2.useContext(...)' as it is null. In the Link component of the code: import React, { useEffect, useState } from 'react';...
Subham Negi's user avatar
88 votes
11 answers
85k views

I've searched around for an example that matches my use case but cannot find one. I'm trying to convert screen mouse co-ordinates into 3D world co-ordinates taking into account the camera. Solutions ...
Rob Evans's user avatar
  • 7,008
87 votes
4 answers
102k views

I am trying to write a small program in Three.js that displays two spheres, one inside the other. The radius of sphere 2 is supposed to oscillate between 0.5 and 1.5 while the radius of sphere1 is ...
cefstat's user avatar
  • 2,416
80 votes
6 answers
100k views

I'm using Three.js with the WebGL renderer to make a game which fullscreens when a play link is clicked. For animation, I use requestAnimationFrame. I initiate it like this: self.animate = function()...
corazza's user avatar
  • 32.6k
77 votes
10 answers
89k views

I am using three.js. I have two mesh geometries in my scene. If these geometries are intersected (or would intersect if translated) I want to detect this as a collision. How do I go about ...
eqiproo's user avatar
  • 1,798
76 votes
7 answers
157k views

I have quite a few objects in my scene so rotating all of them could be a pain. So what is the most easy way to move camera around origin on mouse click and drag? This way all the lights, objects in ...
miki725's user avatar
  • 27.9k
75 votes
3 answers
127k views

I've found some letters but i need to find others such as "c", "m", "p", is this even possible?
Mahmoud Elgohary's user avatar
74 votes
13 answers
160k views

I'm using ThreeJS to develop a web application that displays a list of entities, each with corresponding "View" and "Hide" button; e.g. entityName View Hide. When user clicks View button, following ...
harman052's user avatar
  • 979
73 votes
8 answers
169k views

I have a mesh that I want to rotate by 90 degrees inside Three JS. Here is the image of the current situation: I want the selected mesh to be rotated parallelly to the large mesh. I have tried ...
Zaay's user avatar
  • 662
71 votes
6 answers
121k views

I am starting with THREE.js, and I am trying to draw a rectangle with a texture on it, lit by a single source of light. I think this is as simple as it gets (HTML omitted for brevity): function ...
Andrea's user avatar
  • 20.5k
71 votes
5 answers
66k views

two objects in the scene. the cube rotate axis should be the cube's center,that's my expect. but the shoe model's rotate axis is the world's y axis. my original code is. cube.rotation.y += 0.01; shoe....
Jinceon's user avatar
  • 1,342
62 votes
4 answers
83k views

I'm loading an OBJ file using Three.js and OBJLoader.js. This returns a Three.Object3D object, which has what you'd expect from a 3D model (position vector, up vector...) What I can't figure out is ...
larryq's user avatar
  • 16.4k

15 30 50 per page
1
2 3 4 5
1397