logo
down
shadow

THREE.JS QUESTIONS

Example three.js glTF loader not rendering 3D model
Example three.js glTF loader not rendering 3D model
This might help you It is because you are just opening the file, rather than serving the file via a local server.It is outlined on the three.js docs page titled How to run things locally.
TAG : three.js
Date : January 02 2021, 06:48 AM , By : Anonymous
Floor of skybox is rotated 180 degrees in THREE.js
Floor of skybox is rotated 180 degrees in THREE.js
it should still fix some issue There are much easier ways to use a skybox in three.jsUse the CubeTextureLoader and just assign the result to the scene.background like this
TAG : three.js
Date : January 02 2021, 06:48 AM , By : FarmerDave
In three.js how to position image texture similar to 'contain' in css?
In three.js how to position image texture similar to 'contain' in css?
seems to work fine This is how THREE.ShapeGeometry() computes UV coordinate: https://github.com/mrdoob/three.js/blob/e622cc7890e86663011d12ec405847baa4068515/src/geometries/ShapeGeometry.jsL157But you can re-compute them, to put in range [0..1]. Here
TAG : three.js
Date : December 25 2020, 09:30 AM , By : itsmegb
How to mesh images to dodecahedronGeometry so that in each face there will be different images and captions as well? in
How to mesh images to dodecahedronGeometry so that in each face there will be different images and captions as well? in
it should still fix some issue Applying multiple diffuse textures in three.js requires the usage of multiple materials. THREE.DodecahedronGeometry as well as all other geometry classes derived from THREE.PolyhedronGeometry do no support multiple mate
TAG : three.js
Date : December 23 2020, 01:30 PM , By : Eran Yahav
Modified meshes lighting doesn't look right
Modified meshes lighting doesn't look right
Does that help It's a bit complicated but here goes:Each vertex has a normal.. the normal is computed as the weighted average of all the neighboring vertex normals.
TAG : three.js
Date : December 23 2020, 10:01 AM , By : Vlad Sirenko
A-frame: How to give a primitive like Ring or Cylinder depth?
A-frame: How to give a primitive like Ring or Cylinder depth?
will help you To extrude a shape, you will need to use THREE.js. Below is an example for how to do this. https://threejs.org/examples/?q=extrudewebgl_geometry_extrude_shapes2How to use THREE.js geometery inside AFrame? You make a custom component tha
TAG : three.js
Date : December 17 2020, 07:32 AM , By : mlapida
Why is my SpotLight casting a perfect circle?
Why is my SpotLight casting a perfect circle?
it fixes the issue In the demo, you can see it takes the camera position but offsets it a little
TAG : three.js
Date : December 10 2020, 05:24 AM , By : mobi phil
Applying Alpha Map to model using material causes model to show up as white
Applying Alpha Map to model using material causes model to show up as white
this will help I think the line that's messing you up is transparent: false, when it should be transparent: true. I just tried the code below (click here for a live CodePen demo), and the transparency works as expected. I also don't think you need al
TAG : three.js
Date : December 09 2020, 05:32 AM , By : Jack
Rotating an Object properly around a pivot point given axis and angle
Rotating an Object properly around a pivot point given axis and angle
around this issue In Three.js there seems to be quite a few ways of rotation which i personally do not find very intuitive. See e.g. the example , Question a) Basically it works as expected:
TAG : three.js
Date : December 05 2020, 12:25 PM , By : user93312
How to perform all slow THREE.Texture computation at load instead of at runtime?
How to perform all slow THREE.Texture computation at load instead of at runtime?
I hope this helps you . Finally I found that the issue was simply a dummy typo..the field is called Objects3D.frustumCulled and not Objects3D.frustumCulling.
TAG : three.js
Date : December 01 2020, 04:36 PM , By : Bart van Bragt
three.js light leaking from object
three.js light leaking from object
Does that help Ok so I started reading a bit more about light properties and found out that in my case it was the following issue:
TAG : three.js
Date : November 29 2020, 03:01 PM , By : ffmmjj
threejs raycasting does not work
threejs raycasting does not work
may help you . You need to update the world transform of the ground mesh prior to raycasting. (Normally, the renderer does this for your in the render() call.)
TAG : three.js
Date : November 27 2020, 09:01 AM , By : chawei
Three.js particles
Three.js particles
I wish did fix the issue. map: THREE.TextureLoader("x.png"), should be map: new THREE.TextureLoader().load("x.png"),
TAG : three.js
Date : November 27 2020, 04:01 AM , By : scotta01
Properly scaling textures in three.js / proctree.js
Properly scaling textures in three.js / proctree.js
hop of those help? Your problem sounds very similar to this one I'm pretty certain that the smaller-resolution mipmaps (when you zoom out) are blending your leaf textures and changing the alpha values to which the alphaTest threshold compares to. The
TAG : three.js
Date : November 26 2020, 03:04 PM , By : judith
How to create PlaneGeometry object at some height along z axis?
How to create PlaneGeometry object at some height along z axis?
help you fix your problem I am using this: , Assuming your mesh is captured as a variable like this:
TAG : three.js
Date : November 26 2020, 01:01 AM , By : cynix
Three.js cylinder example keeps drawing torus
Three.js cylinder example keeps drawing torus
wish of those help The reason you fiddle does not work is that the script you invoke (https://threejs.org/docs/scenes/js/geometry.js) looks at the hash in the URL of the window to select the object. If you go to https://threejs.org/docs/scenes/geomet
TAG : three.js
Date : November 25 2020, 11:01 PM , By : ranja
Can't update old code to Three.js 88
Can't update old code to Three.js 88
Hope this helps The answer is as broad as the question.Using of THREE.Raycaster() and THREE.Plane() simplifies the things a lot. It allows to rid off such functions as projectOntoPlane, findNearestIntersectingObject, getRayCasterFromScreenCoord, and
TAG : three.js
Date : November 24 2020, 03:01 PM , By : waarg
How to dispatch event on object method call in Three.js?
How to dispatch event on object method call in Three.js?
I hope this helps you . THREE.EventDispatcher has nothing to do with DOM events. It just enables an event-driven API on custom JavaScript objects. The following example from the github repository might help to better understand this:
TAG : three.js
Date : November 24 2020, 04:01 AM , By : NewGirl
draw sprite on where mouse clicked
draw sprite on where mouse clicked
With these it helps I found out it is because I have a div up to the canvas, when using the formula, i have to minus the height of that div, in other words, when calculate mouse.x, mouse.y, 'event.clientX' 'event.clientY' should be relative to the c
TAG : three.js
Date : November 23 2020, 11:01 PM , By : toma
Add opacity to chromakey shader in aframe
Add opacity to chromakey shader in aframe
I wish this help you When you update the value of the uniform (function update), the you have to set the value property and you have to set the notification, that the uniforms of the material needs to be updated (needsUpdate):
TAG : three.js
Date : November 20 2020, 03:01 PM , By : user106284
collada 3D object mouse event
collada 3D object mouse event
should help you out coincidentally, i'm also working on a project requiring mouse events, and coded a small object to use.
TAG : three.js
Date : November 19 2020, 12:41 AM , By : Jesse
ThreeJS doesn't display dae 3D model
ThreeJS doesn't display dae 3D model
hop of those help? Looks like you are only rendering the scene once. Missing requestAnimationFrame( func ) on your render functionLook under "Rendering the scene" http://threejs.org/docs/Manual/Introduction/Creating_a_scene
TAG : three.js
Date : November 15 2020, 09:01 AM , By : todor
Project image and update texture on a Three.js object
Project image and update texture on a Three.js object
it helps some times The subject is answered in this thread:THREEJS : Vertex Color Baking
TAG : three.js
Date : November 15 2020, 06:54 AM , By : Nick Coats
aframe get object3d children
aframe get object3d children
hope this fix your issue I am working with a gltf model for a game. It is referenced as - , It should be data.target.getObject3D('mesh')
TAG : three.js
Date : November 13 2020, 04:01 AM , By : Feroz
Partially transparent shader occluding objects in THREE.js
Partially transparent shader occluding objects in THREE.js
should help you out Your example looks pretty weird. By setting depthWrite:false on your fog material the two boxes render. version 0.87.1
TAG : three.js
Date : November 05 2020, 03:01 PM , By : user185751
Alpha color with ShaderMaterial
Alpha color with ShaderMaterial
help you fix your problem You need to enable alpha blending within the OpenGL context. I am not sure if there is a way to do this using three.js, but adding these GL commands to your render() function will suffice:
TAG : three.js
Date : October 31 2020, 05:41 PM , By : user121350
three.js MultiMaterial opacity depth order
three.js MultiMaterial opacity depth order
To fix the issue you can do You will have to render your player twice.In the first render of your player, for each material in your materials array, set material.colorWrite = false;. This will render to the depth buffer only.
TAG : three.js
Date : October 29 2020, 11:32 PM , By : 22.
Three.js - how can I get rid of the flashing red lights on my objects
Three.js - how can I get rid of the flashing red lights on my objects
it should still fix some issue I'm new to using Three.js and am using this to learn so hopefully this isn't a ridiculous question. , You have these rows in the render method:
TAG : three.js
Date : October 28 2020, 08:10 AM , By : Salikh
Three.js:Help for generating a FlowMap
Three.js:Help for generating a FlowMap
it should still fix some issue I’m trying to generate a flowmap with Three.js: https://threejs.org/examples/webgl_water_flowmap , The browser console reveals some error messages:
TAG : three.js
Date : October 08 2020, 09:00 AM , By : stu73
Three.js MeshDepthMaterial not calculating as expected - too dark
Three.js MeshDepthMaterial not calculating as expected - too dark
around this issue You're using logarithmicDepthBuffer: true, which changes the depth function to look more like this:
TAG : three.js
Date : October 04 2020, 10:00 PM , By : KL.
How to show only edge lines in three.js?
How to show only edge lines in three.js?
To fix this issue You can use EdgesGeometryYou pass it some other geometry and a threshold angle
TAG : three.js
Date : October 02 2020, 04:00 AM , By : Josh
Viewing arbitrary geometry in THREE JS
Viewing arbitrary geometry in THREE JS
wish help you to fix your issue A typical approach is to compute the AABB for the geometry and use it to center the geometry at the origin. The typical code in three.js for this looks like so:
TAG : three.js
Date : October 01 2020, 07:00 PM , By : PPD
Error referencing same basis texture files with Promise in Three.js
Error referencing same basis texture files with Promise in Three.js
I wish this helpful for you The problem was basis loader won't read the same file more than once, e.g. metallic in B channel and rough in G channel. I couldn't get the right code using Promise. to @Mugen87 and @donmccurdy who helped solved the issue,
TAG : three.js
Date : September 30 2020, 09:00 PM , By : Eric
SpriteMaterial with alphaMap
SpriteMaterial with alphaMap
This might help you Why don't you use a .png file with transparency? You can see that's the method they employ in this example.When you click on the bottom-right (< >) icon, you can see the source code, and it's just a transparent png set to the map
TAG : three.js
Date : September 30 2020, 05:00 PM , By : Aires
Raycaster-intersected events for glb model children
Raycaster-intersected events for glb model children
I hope this helps . This method works with primitive entities, but gltf-model entities work a little differently. That is because the gltf-model entity contains many child objects, so you need to write a custom component to get a reference to the mod
TAG : three.js
Date : September 27 2020, 08:00 AM , By : Bruce
How to disable THREE notification messages?
How to disable THREE notification messages?
help you fix your problem There is no built-in way to disable these messages, with the exception of OBJLoader2.setLogging.Messages like these are extremely useful for debugging, not just in your development environment, but also when your code is out
TAG : three.js
Date : September 26 2020, 07:00 AM , By : cautionsign
Only see one mesh object out of 16 on ThreeJS canvas?
Only see one mesh object out of 16 on ThreeJS canvas?
this one helps. I have a ThreeJS scene with 16 objects that are supposed to end up in a 4 by 4 square grid. However, when I run the code, I only see one of the objects. I wrote a "dump" function to show me all the current XYZ values of the mesh objec
TAG : three.js
Date : September 18 2020, 08:00 PM , By : rhyhann
shadow
Privacy Policy - Terms - Contact Us © scrbit.com