318 questions
4
votes
1
answer
70
views
i uploaded a 3d model file in cloudinary and want to fetch it but when i doi it, it says: it "cannot read property 'match' of undefined"
i want to show on the screen the 3d model when i import it from cloudinary and it is succesful but the problem is that it wontshow the 3d model on the screen and the error says failed to load GLF ...
0
votes
0
answers
31
views
Camera framing problem in R3F (CameraControls + different object aspect ratios +Screens with different sizes)
I’m building a 3D website in React Three Fiber, Three.js, and @react-three/drei.
The scene is a 3d circular monument with 4 wall-mounted objects spread evenly around the monument: Mirror, ATM, Statue, ...
0
votes
0
answers
42
views
Error “Converting circular structure to JSON” on Custom Postprocessing Effects
I’ve built a custom pixel distortion effect post-processing effect for R3F using @react-three/postprocessing’s . Here’s the gist:
CustomEffect file:
class CustomPixelDistortionEffect extends Effect {
...
0
votes
0
answers
51
views
How to add clean trail effect to R3F object component that is a scaled down glb?
I am trying to add a trailing effect to a glb model of Tinkerbell. I have the logic split into four components:
SimpleTrail.jsx which renders the trail effect on a particular target ref (working)
...
1
vote
0
answers
39
views
How to load animations one by one in GLTF using three js
I am using glb files and using useGLTF from @react-three/drei
I need to run specific functions in specific animation whenever it is running
the issue is I am getting all the animations at a time and ...
0
votes
2
answers
88
views
How to make a size-fixed sprite with proper scaling in React-fiber-three?
I'm new to R3F and I'm trying to learn some basic fundamentals, basically what I'm trying to do is render a car model from a .glb file and then render a circular button on the door of car which would ...
0
votes
1
answer
122
views
ThreeJs: How to rotate two object with positive and negative degree
I am trying to rotate each object separately, and each object has its own rotation field and, when I change the rotation field it should maintain the corner position.Right now only negative rotation ...
0
votes
1
answer
96
views
How to implement view offset translation when using CameraControls in React Three Fiber?
In the camera-controls source code, there is an example of a view offset. How can this be implemented using the CameraControls wrapped in '@react-three/drei'?
let offsetUpdated = false;
const ...
0
votes
1
answer
98
views
I'm trying to add a glass effect to my GLB model in React Three Fiber based on the angle
I need the same effect like the screenshot below. Here is the sandbox
import React, { useEffect } from "react";
import { useGLTF, OrbitControls } from "@react-three/drei";
import { ...
0
votes
0
answers
73
views
R3F couldn't load texture blob
So I have been building a 3D model showcase site, at random times I am getting this error of texture not being rendered, I am using Three.js drei package
At random times, I encounter a texture/...
0
votes
1
answer
41
views
Where is the threshold measured from in LOD rendering in three.js?
I'm doing LOD rendering for multiple meshes. I'm confused about where the threshold is measured from.
I have a demo that works, except the high and low resolution meshes are swapped out for both the ...
5
votes
1
answer
186
views
How to move inside scene with Orthographic camera?
I'm using CameraControls from React Three Drei, but I imagine my question is about three.js in general.
https://drei.docs.pmnd.rs/controls/camera-controls#cameracontrols
I need to be able to move ...
1
vote
1
answer
61
views
How do I reliably rotate a 3D cube to a specific face — even after users move it around?
I have a 3D cube with 6 sides. Two of those sides have icons: one for music and one for sports.
I also have two buttons: one labeled Music and one labeled Sports.
When the user hovers over the Music ...
0
votes
0
answers
70
views
React three fiber error rendering 3dmodels on expo react native 18.3.1
Im running into alot of issues trying to run react three fiber on react native app(expo sdk 52). I have a simple box setup but get error saying 'cannot convert undefined value to object'. I tried ...
0
votes
0
answers
47
views
Disappearing elements in a react-three animation
I created a simple animation of some boxes arranging themselves into a wall with react-three/fiber + react-three/rapier. Unfortunately, it seems that whenever the computational requirements increases -...
0
votes
0
answers
42
views
What is the correct way of adding textures to react-three/rapier RigidBodies?
I am trying to add a react-three/drei texture to a rigid body like this:
<RigidBody type="fixed" name="floor" friction={0.7}>
{/* ...
0
votes
1
answer
103
views
react three fiber and react drei causing all componnents not to render
I'm trying to learn and work with react and threejs specifically react-three/fiber. I'm running react and three 19 and @react-three/fiber 9.0.4 and react-three/drei 10.0.1. The scene renders fine as ...
0
votes
0
answers
58
views
Failed to parse source map from '\node_modules\@react-three\drei\node_modules\@mediapipe\tasks-vision\vision_bundle_mjs.j s.map'
Full Error:
Failed to parse source map from 'C:\Users\Leroy\ReactProjects\CoolVec\Frontend\node_modules\@react-three\drei\node_modules\@mediapipe\tasks-vision\vision_bundle_mjs.j
s.map' file: Error: ...
0
votes
0
answers
45
views
<Enviroment/> floating model
Seems is not possible to have a 'non-floating' mpdel within a , so I am trying to come up with a workaround as I have seen here:
hack for skyground from three.js,
since I couldnt figure out how to use ...
1
vote
1
answer
103
views
How to create a 3d Rugby ball with 2 different images on it's subsequent faces
I'm trying to create a 3d rugby ball using ThreeJS and RTF and I'm struggling to create 4 faces on the ball where two subsequent faces on the ball will have two different images. Something similar to ...
0
votes
1
answer
46
views
How to add background behind the three.js model in html for a section?
I want to move background behind the model covering the whole section.
I have created a stackblitz sandbox [https://stackblitz.com/edit/sb1-el22jkdo?file=src%2FApp.tsx] for my project so that it is ...
0
votes
0
answers
67
views
Video Texture Not Displaying on iPhone Model in React Three Fiber (R3F)
I am working on a React Three Fiber (R3F) project where I want to display a video texture on an iPhone model. The scene is using @react-three/fiber, @react-three/drei, and GSAP for animations. However,...
0
votes
0
answers
22
views
R3f video autoplay on iphone
I'm implementing video autoplay functionality in a React Three Fiber application using the useVideoTexture hook from @react-three/drei. While the video autoplays correctly on desktop browsers and ...
0
votes
0
answers
43
views
Html doesn't work properly with ScrollControls
<Html
portal={{ current: gl.domElement.parentNode }}
scale={100}
transformGroup >
<div
className="about-wall about-wall-text"
style={{
width: '40rem',
position: 'fixed',
...
1
vote
1
answer
52
views
How to stop React Three canvas elements from receiving an onClick event when behind another element in the 3D space?
Context
Using React Three Fiber and Drei I have created a simple rotating gallery of images to create a 3D carousel of projects.
I have set up an onClick event to fire on each of the cards as shown ...
0
votes
0
answers
33
views
NextJS re-rendering component on route change in prod (possibly due to dynamic?)
I'm having an issue where I have a dynamically loaded client-side component (because I'm using R3F and ThreeJS, and apparently it needs to be that way), and on route change in production (but not in ...
-1
votes
2
answers
2k
views
Issue Installing react-three/fiber@alpha react-three/drei dependency
I'm trying to install @react-three/drei and react-three/fiber@alpha for a 3d globe componenet in nextjs. but i get the below error when i try to install them.
npm error node_modules/@react-three/fiber
...
0
votes
0
answers
40
views
How to prevent animations from resetting when scrolling in Three.js/React Three Fiber?
I’m working on a project where I’m switching between multiple animations (e.g., sitting, pointing, phone) based on scroll position. The animations are loaded using useFBX and applied to a model using ...
0
votes
1
answer
73
views
Ripple not displaying in React Three Fiber, and I'm not sure why
I am trying to create a ripple, below is my code but it's not rendering on the screen. I seem not to be getting any errors.
import './App.css';
import { useMemo } from 'react';
import * as THREE from ...
1
vote
1
answer
384
views
Using Three.js, and Rapier physics: Why does this object have a jitter on moving?
I have a simple sphere which has an impulse added to it on a tap, but as it moves it seems to jitter a bit as the mesh doesn't quite keep up with the physical model. Is there a solution to this? The ...
2
votes
0
answers
80
views
react-three-fiber and react-three/drei orbitcontrols error
I have a very simple scene like so:
import React from 'react';
import { Canvas } from '@react-three/fiber';
import { OrbitControls } from '@react-three/drei';
const Scene = () => {
return (
&...
1
vote
1
answer
129
views
How to add dom elements behind the three.js model in canvas?
I want to move to last section "Color Transitions" text and background image behind of the 3d model. I am using react-three/fiber, drei
Deployed preview - https://astonishing-pony-00dd84....
0
votes
0
answers
38
views
Manually update 3D Object pivot point in three JS
I'm quite new to ThreeJS and I just got this car model on Sketchfab, but when i try to put it in my React Three Fiber app it display very far away in the scene, when I attempt to rotating it follow ...
0
votes
0
answers
34
views
How to hide or disable the extra handle of React-three TransformControls when using scale mode
enter image description here
I just want the red green and blue part and want to hide or disable other scale properties.I look for the option to hide or disable it but i didn't found on the library ...
0
votes
0
answers
25
views
Threejs clipping cast shadow
I have a 3D object, a New balance shoe with a <directionLight/> and directionalLightHelper to visualize the lightsource, the issue is the shadow on the shoes looks weird, it seems like the shoes ...
0
votes
0
answers
52
views
React Three Fiber calling useGLTF inside useEffect
I have a shoes component as below, whenever the props currentShoes change, I need to update the nodes and materials from useGLTF, is there a way to achieve this? Right now when parent component change ...
0
votes
1
answer
141
views
Large number of polygons with react-three-fiber
I need to display thousands of polygons (2d) of different shapes with react-three-fiber.
I thought the best option would be to use instances of the same polygon with, let's say 100 vertices. And then ...
0
votes
0
answers
40
views
Markers Positioned Below the Surface of .glb Model in Three.js
I'm working on a Three.js project (React) using the @react-three/fiber and @react-three/drei libraries. My goal is to place markers on the surface of a terrain .glb model based on specific coordinates....
0
votes
2
answers
167
views
Infinite marquee on a 3d/dynamic perspective path? Can it be done?
(perspective grid that might be useful to illustrate what I mean) I've been trying to create what I'd describe as a "dynamic perspective infinite marquee". Specifically I'm using this video ...
1
vote
0
answers
64
views
@react-three/fiber doesn't render the 3D model, leads to a blank screen
I'm trying to render a 3D animation using @react-three/fiber, @react-three/drei, and three. But it leads to an empty screen. No error logs are displayed. I checked whether WebGL was being supported by ...
0
votes
1
answer
207
views
"Html" Component turning black after setting occlude to "blending"
pretty new to r3f but having a blast so far. I've run into a bit of an issue when rendering HTML into the scene with the drei helper. I'll drop the code from my render function below:
<group ref={...
0
votes
1
answer
52
views
R3F Providing context of GLTF imported meshes causes typescript error when subscribing to and rendering meshes
So I'm rendering out instanced meshes in my scene using the code below
interface IInstanceContext {
[key: string]: Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], ...
2
votes
0
answers
788
views
Internal React error: Expected static flag was missing
I tried to add some png on 3d model using rtf(React Three Fiber).
Here is my code
import React from 'react';
import { Decal, useGLTF, useTexture } from '@react-three/drei';
export function ...
0
votes
1
answer
284
views
Low frame-rate w/events in R3F + DREI views
I'm having an issue with basic react-three-fiber events, specifically in the context of Drei Views (although that may or may not be related, and I'm hoping I'm just missing a simple implementation ...
1
vote
0
answers
99
views
"useGLTF" form React-three/drei throws "url.lastIndexOf is not a function" when used with Native
import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei/native'
import BaseWhite from './base.gltf'
export default function Model(props) {
const gltf = useGLTF(BaseWhite);
...
1
vote
0
answers
107
views
Three JS | Synchronize perspective camera position while switching between OrbitControls and DeviceOrientationControls
In my application ( React JS ) I'm switching between orbit controls and device orientation controls
import { DeviceOrientationControls, OrbitControls } from '@react-three/drei';
...
const [...
-1
votes
1
answer
65
views
Framer Motion preventing UI update upon re-filtering of objects
When changing a filter on an object array, the UI will never return to a higher quantity of objects after displaying a lower quantity. The array/filter functions correctly. I've deduced this to the ...
0
votes
1
answer
709
views
Use R3F drei view in nextjs
I'm playing around with Three for the first time, and trying to get React Three Fiber and React Three drei working in a NextJS environment.
I have a simple model working, but I can't figure out how to ...
1
vote
0
answers
28
views
2D assets loading before loading.tsx, then loading.tsx only shows while loading 3D assets in NextJS
I am facing an unexpected bug. On my page I have a bunch of 2D images and assets and one 3D model. When I open the website, the 2D assets show, then the loading.tsx file shows and then disappears when ...
3
votes
2
answers
161
views
Error: R3F: AndroidProgressBar is not part of the THREE namespace! Did you forget to extend?
I'm working on a React Native project, and I'm using Three.js for rendering 3D content. I encountered the following error:
Error: R3F: AndroidProgressBar is not part of the THREE namespace! Did you ...