All Questions
235
questions
0
votes
1
answer
143
views
Reduce CPU usage in threejs application
I am currently working on a project where I am programming Snake in Threejs (yes I know there are simpler methods). Everything seems to work fine, but when the snake reaches a certain size the CPU ...
2
votes
1
answer
64
views
Placing an object on the surface of a rotated Sphere
this is my first post so I will try my best to explain. Every time I place an object on a rotating spheres surface, it gets offset the more the sphere rotates.
I tried offsetting it back to the mouse, ...
0
votes
1
answer
756
views
THREE.js PlaneGeometry Converting a triangle drawing to a square
In the link below there is an animation created with triangles. How can I convert triangular areas into squares? A line runs through the middle when using "PlaneGeometry". When this line is ...
0
votes
1
answer
84
views
how do i make the html code appear on top of the animation and not behind it
I tried putting this in CSS p{ z-index: 99 !important; } it didn't work
I Just want to make everything in html appear on top of the animation
here is the code::
<!DOCTYPE html>
<html>
&...
1
vote
0
answers
118
views
Three Js gltf object material
I am trying to change texture of gltf object with jquery array passed in variables. Following is the code where I am stuck or not able to apply click and change material.
import * as THREE from 'three'...
0
votes
1
answer
128
views
Three.js How do I define variables and/or positions after a gsap position change
Basically, what im trying to do is, that I have three cubes, and on each click they switch positions. This works fine when done once. Now, I added 3 Lines in the end of the function called "...
1
vote
0
answers
117
views
How can I take a screenshot of scene with childrens in a particular camera positions even after moving the scene of HTML page in Three.js?
In an HTML page using Three.js, I developed a scene of a product which contains multiple GLTFLoader childrens. The product parts can be updated. How can I take a screenshot of a product in a ...
1
vote
1
answer
86
views
How to join two box geometries?
I want to join 2 Box Geometries to each other (image below) which are than drag rotatable as one object.
Below is the code for one drag-rotatable boxgeometry ( var geometry1 ), what do I need to add ...
0
votes
1
answer
84
views
Problem with click corner of fabricjs using threejs raycast
i'm trying to recreate this app, and it is currently working now. But i can't click the corner of the text perfectly, it always need to be offset.
https://jsfiddle.net/naonvl/ecdxfkbm/3/
right now, it'...
0
votes
1
answer
59
views
Jquery .html method does not seem to work
The editor project I am making should allow me to Import a cdn library and use it to write code . So to show my problem , enter https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js in the ...
1
vote
1
answer
369
views
A-frame change sound properties onclick
I have some sound in my scene using A-frame (https://aframe.io). I also have a button button at the top of my screen. What I'm wondering is how can I make it so when a button is clicked, the ...
1
vote
0
answers
159
views
A-frame rotate to a random rotation point
I have some code using A-frame (https://aframe.io) that rotates a cube. What I'm wondering is how can I rotate the cube from a random amount anywhere from 0, 0, 0 to 360, 360, 360? Currently my ...
0
votes
1
answer
350
views
Changing color dynamically three js not realtime
i'm trying to create a 3d configurator
i wanted to change the color of specific material using colorpicker like this
$('#color-block').on('colorchange', function() {
var newColor = $(this)....
0
votes
2
answers
465
views
How to override setTimeout?
This is part of a larger Three.js project but basically what I am trying to do is display a div for 5 seconds and then making it disappear based on user interaction. However, if the user triggers the ...
3
votes
1
answer
655
views
A-frame animate box to randomly move in certain area
I am creating a scene using A-frame (https://aframe.io) and I'm wondering how I can animate a box to move randomly throughout a certain area. I want to use the animation property (https://aframe.io/...