three.js Questions

2

Solved

In this Three.js shader example a function called rand() (taking a vec2 as an argument) is used to generate random numbers. However, the function is not defined in the shader code. Instead, it see...
Dextrality asked 25/1, 2018 at 9:15

4

trying to import my first .gltf model in three.js with the parcel when greeted with a black screen and this error SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSO...
Sort asked 1/12, 2022 at 16:43

5

Solved

I have a BufferedGeometry for which I would like to set color per face. However, as I understand, the color attribute on the geometry sets color per vertex, not face. I tried using it anyhow by se...
Lunseth asked 16/1, 2017 at 6:1

2

Solved

I have already installed THREE.js in my angular project.I am trying to use OrbitControls in the below fashion but it is giving an error:- var controls = new THREE.OrbitControls(this.camera,this.re...
Sorbian asked 2/5, 2020 at 9:29

2

Solved

I am looking for a way to draw several objects with unique textures. I came across this old question about instancedMesh where someone got the multiple instances with different textures but on desk...
What asked 30/1, 2021 at 23:37

1

I would like to find the best way to add lights from a blender scene into a THREE.js project. I can not find an explanation of how to import the lighting from blender to THREE.js anywhere. You are ...
Ironwork asked 2/9, 2020 at 3:50

1

I guess this could be considered a continuation of this question so please check it out for context about his one, especially the JSFiddle reported in said question. I'm basically trying to achieve...
Shaker asked 9/8 at 14:32

0

Note: I'm using the WebGPU build 167 of three.js for this question and JSFiddle. See screenshot and JSFiddle. I have a simple sphere between two "floors", with a DirectionalLight pointing...
Antecedence asked 20/8 at 17:13

3

Solved

I have a threejs scene with intersection checking on objects. I'm adding every scene object to the array which is then checked by the raycaster. var intersects = raycaster.intersectObjects( scene....
Crymotherapy asked 6/2, 2014 at 14:15

2

I'm getting the following warning when trying to use @react-three/fiber and @react-three/drei in the same project. Steps to reproduce npx create-react-app reproduced-warning cd reproduced-warning ...
Separation asked 26/4, 2021 at 18:24

4

Solved

I have been tinkering around with Three.js and I have a canvas I'd like to use as kind of a GUI. For that I have to check if an object is in the camera frustum. My current code: camera.updateMatrix...
Nonmetallic asked 22/7, 2014 at 2:21

3

Solved

https://www.dropbox.com/s/h59v7elqn05t7lc/bag.js the following code gives the link to the json file is given SyntaxError: JSON.parse: expected double-quoted property name Javascript: var init ...
Unruffled asked 21/3, 2013 at 18:24

11

Solved

I'm getting the error Error creating WebGL context. Uncaught TypeError: Cannot read property 'getExtension' of null This is happening on google chrome 71 but I find it odd because if I open up dev...
Pennell asked 17/1, 2019 at 9:16

1

I'm trying to load an image texture using useTexture and apply it to a meshStandardMaterial in my react-native app. The texturing works fine when I import the image from local assets folder. But, w...

5

i have been trying to add a scroll area to my the app i was building but i just keep getting this error: Uncaught Div is not part of the THREE namespace! Did you forget to extend? I'm very new to...
Mythos asked 18/8, 2021 at 22:36

16

Solved

I'm not able to get this example of using the aforementioned combo going in TypeScript. I have <script src="lib/three.min.js"></script> and <script src="lib/OrbitControls.js">&lt...
Binghi asked 18/10, 2013 at 8:5

5

Solved

First I want to say that I'm very new to javascript and working with libraries. I'm trying to get some basic three.js code to work but it's not working and I'm not sure why. I have set up a basic s...
Timbal asked 20/7, 2021 at 23:29

6

Solved

I'm currently creating a mesh in three.js using the following: sphereGeometry = new THREE.SphereGeometry( 1, 16,16 ); mesh = new THREE.Mesh( sphereGeometry, material ); I've also created a torus...
Bureaucratic asked 19/6, 2013 at 22:35

4

Solved

In this minimal react-three-fiber App I am trying to load and include the same GLTF model twice: import React, { Suspense } from "react"; import { Canvas } from "@react-three/fiber&q...
Folse asked 17/8, 2021 at 8:3

7

Solved

I am following a 3d portfolio tutorial from Youtube and got caught in this error. Here I am trying to render a mesh but the console is showing a warning that "This element is unrecognized in t...
Caroleecarolin asked 6/3, 2023 at 20:7

7

Solved

I was thinking that for some projects I do 60fps is not totally needed. I figured I could have more objects and things that ran at 30fps if I could get it to run smoothly at that framerate. I figur...
Reactant asked 1/7, 2012 at 19:39

2

Solved

I m trying to load my 3d model which have glb format. Here's the code: What I exept: Image What I have: Image var renderer = new THREE.WebGLRenderer(); renderer.setSize(1000, 1000); renderer.set...
Evonneevonymus asked 28/12, 2020 at 20:11

2

Solved

I am creating three.js application. I have loaded my STL objects. I have used 'OrbitControls'. When I start zoom my object with middle scroll button of mouse, it breaks at certain point. My camer...
Alyssaalyssum asked 26/2, 2016 at 12:11

3

In my app I want to add texture to the loaded .obj model. I have the same situation with my .fbx loaded models. Below is my example code, but this works only with something like sphereGeometry not ...
Coulometer asked 10/8, 2021 at 10:33

5

Solved

I try to render both sides of a transparent object with three.js. Other objects located within the transparent object should show too. Sadly I get artifacts I don't know too handle. Here is a test ...
Pademelon asked 4/11, 2012 at 18:4

© 2022 - 2024 — McMap. All rights reserved.