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.
three.js
21,196
questions
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 ...
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/...
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.
...
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 ...
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.
...
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 = () => {
...
-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 ...
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 ...
-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%',
...
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 ...
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 ...
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.
...
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 ...
-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 ...
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 ...