Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [three.js]

Three.js is a lightweight cross-browser JavaScript library/API used to create and display animated 3D computer graphics on a Web browser. Three.js scripts may be used in conjunction with the HTML5 canvas element, SVG or WebGL.

0 votes
0 answers
21 views

ThreeJS hitbox manipulation

Very new here, apologies if this is super basic. I have a sphere. I want to: Be able to create zones on the mesh. So at a start there will be one zone completely around the mesh. This is essentially ...
Nilesh Magan's user avatar
0 votes
1 answer
24 views

Cannot find module 'three/examples/jsm/controls/OrbitControls' or its corresponding type declarations

I'm using TypeScript and three.js in my React project, and I'm importing OrbitControls like so: import * as THREE from "three"; import { OrbitControls } from "three/examples/jsm/...
Jasperan's user avatar
  • 2,505
0 votes
0 answers
16 views

How to access the ar.js camera feed in order to take a snapshot?

I'm trying to take a snapshot of the camera feed in order to scan QR codes in my application. I've tried to inspect the data using the code below, but I can't find a way to access the media stream. ...
marco6ocram's user avatar
0 votes
0 answers
17 views

Three.js: How to prevent flickering, which occurs when page restarts. (White flashing)

On my discover flickering occurs when page “off”. Effect act during 1-2ms in canvas. Moreover this problem may occur or not occur in any canvas blocks on page. I tested more variants of solution this ...
AlexGroz's user avatar
0 votes
0 answers
29 views

Camera Positioning Issue: Integrating Three.js MapControls with GSAP Animation for Precise Target Locations

I’m encountering a problem while animating my 3D model using GSAP and Three.js. Specifically, the issue occurs when I pan the model - the camera doesn’t move to the intended target position correctly. ...
Nadir Shaikh's user avatar
0 votes
0 answers
49 views

How to make completely white floor with shadows?

Please help. I want white floor and shadows on it, but all I get is lightgray floor with very thin shadow: lightgray floor My floor and light configuration: const ModelSceneEnvironment = () => { ...
kprovalov's user avatar
-1 votes
0 answers
16 views

How to Rotate Camera Around a 3D Map in React Three Fiber Without Moving Too Far From the Map (not in a circular path)

I am working on a 3D map using React Three Fiber, and I have implemented auto-rotation using OrbitControls. However, the camera rotates in a perfect circle, causing parts of the map to appear far away ...
janaka chamith's user avatar
2 votes
0 answers
58 views

Trouble with correctly triangulating a polygon on a sphere in THREE.js

tldr: help I can't correctly triangulate a GeoJSON polygon in 3D space to make it spherical and it has been haunting me for weeks. The question at the end of this novel is "Is this a poly2tri ...
kishetate's user avatar
-1 votes
0 answers
19 views

Environment from @react-three/drei triggering a rerender

I have a scene like this <Canvas className="App" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', ...
user25766836's user avatar
0 votes
0 answers
16 views

Error when integrating Spline3D Model into React Three Fiber

I made a model using Spline3D, and downloaded the react-three/fiber code directly from the site. When I integrate it into my React website, I'm getting the following errors: ReferenceError: Can't ...
Rama Al-Omar's user avatar
0 votes
1 answer
416 views

Why does the error While resolving: [email protected] occur while installing react-three-fiber in react-native?

I am trying to use react-three-fiber in react-native. When I try to install and run it according to the manual, the following error occurs. When I run npm install, the following error occurs. Can you ...
최윤석's user avatar
0 votes
0 answers
25 views

How Can I fit Three js object to screen?

I have multiple objects in my scene. I need to implement Zoom Extents feature that automatically fits(shows) all the objects to screen. In my case, I'm using Orthographic Camera and Arcball Controls. ...
zenhanu's user avatar
  • 21
0 votes
0 answers
26 views

Add MorphTargets in the gltf file

I am searching for realistic Avatar 3D models for lipsync I found the models but in that model, there are no MorphTargets so I'm not able to do lipsync with that avatar. Manually I want to add it Can ...
kanan dave's user avatar
-1 votes
0 answers
21 views

Three.js outline affect problem,can't show the scene clearly

I tried to add outline affect for a cube at scene.But the scene has some problem:the scene is so vague that I can't see the cube clearly.I tried to use SMAAPass before but it didn't work.I want to ...
JsonC's user avatar
  • 1
0 votes
1 answer
33 views

three.js rendering spheres in wrong position

I am new to three.js and I was trying this code but I encountered unexpected output so wanted to check what I am doing wrong here or looking to find reason behind output i am seeing. import * as THREE ...
Pravin Poudel's user avatar

15 30 50 per page