threex | Game Extensions for three.js
kandi X-RAY | threex Summary
kandi X-RAY | threex Summary
from cgtexture kindof site.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of threex
threex Key Features
threex Examples and Code Snippets
Community Discussions
Trending Discussions on threex
QUESTION
As the title states, I am using es6 classes, but because they are all not modules apart from the main.js file, it makes it difficult to use API's because I cannot make use of import modules.
I used the code from this link's answer: How to add in Three.js PointerLockControl? and pasted the code into a js file, calling it up in my HTML, but I get an error stating:
Uncaught ReferenceError: PointerLockControls is not defined
It is not picking up the class when I reference it. I tried to link it to the GitHub raw code, and it didn't pick it up either.
This is my index.html code (only one line referencing the GitHub raw code):
...ANSWER
Answered 2021-May-26 at 18:31I changed all my es6 classes into es6 modules, and used import. I don't think there was a solution for this with cdn or raw git scripts.
QUESTION
I have uploaded a glb file with an animation, and the animation is moving extremely fast, and I do not know why.
This is my character's animation code:
...ANSWER
Answered 2021-May-24 at 21:38I think the issue is with your AnimationMixer.update()
call. If you look at the docs, update is expecting a time-delta in seconds, but it looks like you're passing the total running time. This means it should receive the time passed since the last frame. You can fix this by using clock.getDelta();
as the argument:
QUESTION
I am learning threejs by doing some games. I am able to render all models in the scene and added few lights to and it is perfect now, but when I try to cast and recieve shadows on the plane. The shadows of the objects in scene are not rendering.
I dont understand where I am doing wrong.
Below is the code
Please have a look and help me resolving the issue.
...ANSWER
Answered 2020-Jun-09 at 11:22I've tested your code offline and there are multiple issue and runtime errors:
AmbientLight
does not cast shadows. SettingcastShadow
will produce a runtime error.- You have not configured the shadow frustum for your instance of
DirectionalLight
correctly. Try it with this code:
QUESTION
I use DomEvents library to make clicks on elements in scene.
I create eleemets:
...ANSWER
Answered 2017-Feb-15 at 16:43I use something like this:
QUESTION
I am working on a 3D force-graph visualisation and I'm using the great library:
https://github.com/vasturiano/3d-force-graph
I would like to try to get some sort of glowing effect on the nodes of the force-graph and I was having a look at something like this to accomplish it, but it is proving a challenge:
https://github.com/jeromeetienne/threex.geometricglow
So far I only have the ability to add new shapes and texture them. I have also added text sprites that follow the nodes, so I suspect an approach that combines these two might be possible. See below the code.
Adding a glow effect or texture to this base code would also be very helpful:
https://github.com/vasturiano/3d-force-graph/blob/master/example/async-load/index.html
...ANSWER
Answered 2020-Feb-11 at 16:52I've been interested in getting this to work as well.
I used this threex example and seen that these two lines were necessary:
QUESTION
I'm working on Threejs to animate a cube with different text on each cube faces. I used DynamicTexture to place text on cube faces, but it places same text on each side of cube. I don't know how to place different text on each side. Is there any way to do is and place text on runtime by user inputs? Thanks.
Main.js
...ANSWER
Answered 2019-Dec-17 at 15:10You can use THREE.MeshFaceMaterial(materials)
to accomplish this. All you need to do is pass an array containing the materials and specifying the map for each of the faces.
QUESTION
I can add a click event to the model I loaded with Three.js, but I can't add a click event to a particular part of the model I've uploaded. For example, I can make a click event on the car model I have installed, but what I want to do is exactly this: when I click on the wheel of the car I want to write 'wheel' to the console. When I click on the glass I want to write 'glass'.
How can I do it?
...ANSWER
Answered 2019-Oct-10 at 12:45It's best to solve this issue during the design phase and ensure that your model does consist of multiple independent meshes grouped together to a more complex object. In this way, it will be much easier to select single components in three.js
(and any other 3D engine).
QUESTION
I am using A-Frame. I am trying to augment a Video (mp4) when the pattern or marker (HIRO) is hovered in front of my webcam, the video should be loaded or played on the marker. Now The issue with this code is when the page gets loaded the video gets played automatically without any marker or pattern (HIRO). The video is displayed on the marker.
I just want to load the video whenever the pattern or marker is shown. Without patter, it should not load. Please help me with this Eg: Video playBack in AR https://www.youtube.com/watch?v=jkcvfygpKiM&vl=en Video Augmentation on Marker
...ANSWER
Answered 2018-Jul-18 at 13:41QUESTION
I have a function that takes as input some of the values in a table and returns a tuple if you will - three separate return values, which I want to transpose into the output of a query. Here's a simplified example of what I want to achieve:
...ANSWER
Answered 2019-Oct-07 at 16:12If you're just looking for the results themselves you can extract (exec) as lists, create dictionary and then flip the dictionary into a table:
QUESTION
The Code was working fine yesterday but suddenly started showing the error above in orbit control js file in line 82 as follows.
Uncaught TypeError: Cannot read property 'ROTATE' of undefined at new THREE.OrbitControls (OrbitControls.js:82)
this issue completely breaks the 3d scene. commenting out the code for controls made the 3d scene work. Can some one help me with this issue.
...ANSWER
Answered 2019-Aug-19 at 20:34According to https://discourse.threejs.org/t/recent-change-to-orbitcontrols-breaks-some-projects/8780, the problem stems from version mismatch. Using https://threejs.org/build/three.js as your three.js include should fix the issue. The mismatch is from three.js - the original file - being updated, along with the example for orbit controls, however, your version of three.js may be an older one. Hope this helps!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install threex
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page