Skip to content

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 basebal…

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 …

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 …

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 th…