(sry for bad eng, we are from Moskow and we are stupid D) We have a problem, so to speak: quation. I with my bro write sam any code on HTMl, JS. and we must make 3d model wiht interactive button, …
Tag: three.js
only part of gltf model appearing using three.js
I have been trying to add this gltf model ( https://poly.google.com/view/28RBIWE8jzc ) using threeJS’. The code below is the only way that I have been able to see anything and I only see a small part of the object. If anyone knows what needs to be changed I would appreciate some help. Answer The baseball asset is quite large so
Three.js – Model cannot receive any shadow
I’m currently new and learning about three.js. And i’m using react-three-fiber to make it happen with React, but i stumbled upon a problem. The model however, cannot receive any shadow from another model. I’ve tried to use obj.castShadow = true and obj.receiveShadow = true to one of the receiving shadow model object on the parent and the children as well
Raycaster do not stays in center when i am updating camera
guys i have a problem with Raycasting and i couldn’t find solution so far. What i am trying to archieve is that, i want Raycaster to stay always in center, like when i move my camera and look other direction i want Raycaster to stay in center and update please help me. I am using FirstPersonControls, This is the code
How to create WebGL 2 renderer in iOS?
I am trying to create a THREE.WebGLRenderer, but it seems that on iOS, it will only create a WebGL 1. Here is my code for creating the renderer and printing the capability: Is there a way to create WebGL2 renderer on iOS? Answer Browsers on iOS all use WebKit which does not yet support WebGL 2.
Javascript / Three.js is not working in https
I recently switched my http site to https. Since I made this change, one of my projects no longer works. In this random generator, the background using the Three.js library does not appear when the url is in https But in http , it works beautiful and well. Does anyone know any solution to this problem? Thank you for your
Clipping geometry made from merged faces, stenciled cap face not aligning properly
My project uses geometry where each face is its own mesh. I need to clip the geometry to cut away a portion of it and have a stenciled cap face cover the clipped edges. I examined and tinkered with the Three.js clipping stencil example and I understand how to use a stencil to cap trimmed solid geometry, but when I
(Three.js) How to slowly rotate a mesh until it reaches a specific value
I’ve just gotten into Three.JS, and I’ve ran into an issue. I’m trying to make a car, that is drivable using the Arrow Keys. So far, I’ve gotten it to move forwards, and backwards, and the wheels turn when you press Up (Forwards) and Down (Backwards). So, logically, the next step would be turning. However, that’s where I run I
How to scale a three.js sprite?
I am trying to display a sprite in three on javascript and make it bigger. I tried the following: and but the sprite was very very tiny in the middle of the browser window. I saw no error on the console. What am I doing wrong? Answer Sprite.size does not exist. Try to modify Sprite.scale instead. Check out the following
Three.js + OrbitControls – Uncaught TypeError: Cannot read property ‘addEventListener’ of undefined
I am tryint to use OrbitControls in THREE.js. If I removed the line let cameraControl = new OrbitControls(camera) from below, there will be no error. But now, I have “Uncaught TypeError: Cannot read property ‘addEventListener’ of undefined” I tried to change OrbitControls(camera) to THREE.OrbitControls(camera), and then I had “Uncaught TypeError: THREE.OrbitControls is not a constructor”. I tried to import OrbitControls.js