Three.js is a lightweight cross-browser JavaScript library/API used to create and display animated 3D computer graphics on a Web browser. Three.js scripts may be used in conjunction with the HTML5 canvas element, SVG or WebGL.
0
votes
0answers
12 views
Threejs Matrix4 Float32Array format bug with Chrome + Firefox
I am facing 2 bugs where I have an THREE.Object3D() with some other objects as children... a basic scene in fact. I am using Three.js R69.
Bug 1 (with Chrome) : The bug comes when I ...
0
votes
0answers
10 views
Detect insersection in three.js of 2 simple boxes
What is a proper way to detect if 2 simple box meshes has an intersection in Three.js
Here is the code I use
Bot.prototype.tryRotate = function(direction) {
var clone = engine.android.clone();
...
0
votes
1answer
13 views
Three.js set object opacity/transparent
I am creating a scene with some parts which are loaded from a JSON file.
I can hide and show every single object. But now I want to set the opacity/transparent for a single object.
I creating the ...
0
votes
1answer
10 views
Three.js raycast THREE.Object3D
I want to get the name of an object i clicked at. The model is loaded into the Scene with ColladaLoader.js.
My Problem is, i just get the THREE.Mesh object but i need the THREE.Object3D object, ...
0
votes
0answers
13 views
Adding text sprite as child of geometry
I need to add some text as child of geometry in order to move them together with drag function. I tried but no text are added as children of geometry.
In the function below I added some spheres as ...
0
votes
0answers
8 views
Webgl iOS8 anti-alising?
I am developing a 3d webapp with ThreeJS.
On the desktop i have antialiasing but on iPad iOS 8.1.3 the edges are not smooth.
I have tried with FXAA but nothing happened.
Do you have any idea if ...
0
votes
1answer
13 views
Edgeshelper not updating position of mesh
I would like to draw a coloured box, including the edges (in a different colour)
This is the code I am using to create the box and edges. I have added them both to a object3D since I will have a ...
0
votes
1answer
12 views
how can i use part of a image as texture in three.js
I have a image with 6 faces texture of a cube in it.How can i apply every part of the image to each side of the cube?Theie seems no relative option in three.js
0
votes
0answers
19 views
how can i use none repeat tiling texture in three.js
I am making a panorama like krpano.I want to know how can i use small images as a texture of one cube face?
http://stemkoski.github.io/Three.js/Skybox.html
This example uses 6 pics as texture of ...
0
votes
1answer
24 views
Cross-fade using quadmaterial - ThreeJS syntax
When coding a fade transition, what does the following code mean? I'm looking to achieve the same effect as http://jsfiddle.net/DW9q4/85/ but I have 2 scenes with 2 different map cubes rendered ...
0
votes
0answers
9 views
Applying device orientation to the camera in a three.js application
I'm currently working on a three.js VR project and ive gotten the cameras' orientation hooked up to the camera but my problem is that the default device orientation makes it so when the device is ...
0
votes
0answers
9 views
THREEjs: Vertex Colors with material map
I'm creating a hybrid material with vertex colors (using material.vertexColors) and a texture (using material.map). When both are applied, the vertex colors seem to show only the darks, effectively ...
0
votes
0answers
13 views
ThreeJS - Unable to load texture map on Basic Cube
I have an example here on my website of the problem.
I've been trying to create a simple box and map textures to it, but for some reason I'm not quite sure what the problem as I can load hex colors ...
0
votes
0answers
13 views
Is there a trick with blender and three.js to properly render objects?
I am able to export objects from blender to json three.js, but I can only see then if material is none or wireframe. There is no way to use map on them; Any ideas? (blender export latest, threejs 70, ...
0
votes
1answer
19 views
How to determine the angle of rotation for a rotating/animating cylinder? Three.js
I'm stuck on this and my Math skills are failing. I've set up a working fiddle here.
I have been able to extract the y and z positions from the rotating cylinder and am able to stop the animation ...
1
vote
1answer
28 views
distributing 2d vector points around a sphere
I'm using d3.js to create a bubble chart, which I'm then trying to wrap partially around a sphere in three.js. I'd like the end result to look like a dandelion, as pictured here:
The bubble chart ...
0
votes
0answers
16 views
Calculate camera position in change of FOV - three.js
I have a threeJS scene, and I have added a perspective camera in it.
I want to be able to just change the .fov of the camera and the camera not to zoom in/out.
So i have this code:
var ...
0
votes
0answers
19 views
Threejs attach text to geometry
I made some function to drag geometry with mouse on the screen. I attached to this geometry some spheres and if you drag the geometry also the sphere moves with it.
function makeSphereVertices(){
...
0
votes
0answers
14 views
Three.js JSONLoader blender model error: property 'length' undefined
I have been trying out Three.js lately and i used the exporter addon for Blender to test out making models in blender and exporting so i can use them in a three.js program.
I included the add-on to ...
0
votes
1answer
17 views
ThreeJS geometry not rendering causes drawElements: no ELEMENT_ARRAY_BUFFER bound
I am trying to render using Three.js an indexed face set. As an input data i have arrays containing indexes for coordinates, normals, texture and then the payload arrays with coordinates, normals and ...
0
votes
0answers
18 views
Three.js: displaying a <div> over a canvas with skybox
I created a skybox on a Three.js canvas like this:
var urls = [
'pos-x.jpg',
'neg-x.jpg',
'pos-y.jpg',
'neg-y.jpg',
'pos-z.jpg',
'neg-z.jpg'
]
window.cubemap = ...
0
votes
2answers
21 views
Callback function first time render out to call in three.js?
I want to know when is the first time all the object are rendered? Is there any callback function option?
It seems that there is only a callback function available for image loading.
I want to ...
0
votes
1answer
16 views
Unable to download three.js file using bower
I.m getting an error when I try to download three.js file by specifying the version in bower.json file.
"dependencies": {
"three.js":"~0.0.69"
}
Error :No ...
0
votes
1answer
33 views
three.js: local texture loading works, but not remotely
I have modified an official example for the Loader object to demonstrate my issue. I want to create a mesh, with a texture map that gets loaded preferably before creating the geometry.
Currently I ...
0
votes
1answer
30 views
Making a 3d Earth, made up of particles with Three.js
I am trying to replicate this effect: http://www.hys-inc.jp/ The only difference is that I want the particles to be positioned in such a way, that they resemble the Earth - a 'textured face' if you ...
0
votes
0answers
18 views
ThreeJS Local to World
My goal is to make the vertices of the blocks in the following scene mold to the next block's vertices.
http://www.fallingcode.com/demo.html
I'm having trouble getting the position of vertices and ...
0
votes
1answer
23 views
fade out transition with keyFrameAnimation - ThreeJS
I have 2 different map cubes. After 10 seconds I want the first map cube to fade out and the second map cube to fade in. I was told to use keyFrameAnimation but the only examples I've seen are to make ...
0
votes
0answers
21 views
Three.js Rendering is not working
I am trying to create a random particle system and connect them together using lines, I am not getting any errors but I am not getting any result either, here is my code:
//---------- Core
...
0
votes
1answer
14 views
Not seeing any shadows with a collada model on a MeshPhongMaterial ground and a spotlight
I've been trying to figure this out for ages but it's not working. I'm trying to add shadows to my .dea model, on a MeshPhongMaterial, but nothing is showing up.
The camera is correctly positioned, ...
0
votes
0answers
16 views
Three.js Buffergeometry Morphing
Is it possible to morph two buffergeometries in three.js? Is there a good example to reference? I am especially interested in manually morphing using morph target influences.
0
votes
0answers
22 views
“Uncaught TypeError: cannot read property 'x' of undefined” in the THREE.js library file when I try to implement THREE.SubdivisionModifier()?
The error's appearing at line 1631 in the THREE.js library file itself. Here's the code I'm running:
var cube_geo = new THREE.BoxGeometry(.1, .1, .1, 10, 10, 10);
var smooth = cube_geo.clone();
...
0
votes
1answer
26 views
WebGL & Three.js - two renderers, no shadows in FF in second one
we have a setup with two WebGLRenderers (using the clone of the same scene, to avoid issues). Same scene, same lights, same camera. Second renderer is used for snapshoting on demand (to avoid problems ...
0
votes
1answer
26 views
THREE.JS - Vector3.project returns weird result
I'm writing a program in THREE.JS and I need to project a Vector3. When I try to project the Vector3 (0,0,0), which should be in the center of the screen in my camera, I get NaN. Other Vector3s that ...
0
votes
0answers
8 views
CTM Loader with materials
I'm trying to split up materials inside a CTM model (actually, CTM file is just the 3D model, and a JS got the reference of CTM file and the materials).
In this example ...
0
votes
0answers
10 views
Threejs css3d image objects change position after cached
When I place css3d image objects in the scene. It looks fine, but after some repeated loading, the position of the images seems to be altered.
And also the css3d objects appear differently in chrome ...
0
votes
1answer
9 views
Three.js blend envmap with semi transparent texture
I have a plane with a MeshBasicMaterial and a cubecamera. I assign the cubecamera.renderTarget as an envmap to my material and a png image as a texture for my material. The png image is pransparent ...
-1
votes
0answers
41 views
Understanding Distortion in Perspective Camera - ThreeJS
I have a perspective camera in my scene, and I also have some spheres here and there. I want the user to be able to choose between 2 modes:
navigating in the scene with zero distortion in the ...
0
votes
2answers
43 views
Three.js Error with THREE.ObjectLoader
I seem to be having issues with Three.ObjectLoader. I am exporting a scene in JSON Format 4.3. This scene includes geometries, materials, and lights. The scene opens in the Three.js Editor just ...
1
vote
0answers
20 views
Loading Three.js models (.js files) into a hierarchy
My thanks in advance for the assistance ,
The problem I have is as follows :
I am trying to create a movable model in three.js , and would like to create a model hierarchy using the JSON variable ...
0
votes
1answer
16 views
Physijs and setLinearVelocity: moving objects
I have created a player object that consists of a Physijs.BoxMesh. The player has first person vision(right now it's third person so I can see the mesh while troubleshooting) and can rotate the camera ...
0
votes
0answers
37 views
How to Render a large number of meshes?
How to three.js facilitate rendering large amounts dinemicheskih meshes?
For example, I have pieces of the landscape on the quadtree.
If the scene added 50 tiles (1000 face each) I get 60 fps, but if ...
-1
votes
0answers
33 views
Retrieve WebGL 2D dimensions of 3D elements
I am finding the 2D coordinates of the 3D object by creating a new projector and using the 3D position to retrieve this info.
But in my project, I am interacting with the book that is centered on ...
0
votes
1answer
25 views
Three JS and clock
With three.js - clock:
what's the difference between getDelta() and getElapsedTime()?
Also, does anyone have an example where clock is used to transition between scenes or should I use ...
0
votes
1answer
25 views
Change the color of a Three.js globe
There is a really cool Three.js demo which has a 3D Globe: http://data-arts.appspot.com/globe/
I'd like to change the color of the globe itself from black to navy blue. I'm looking through all the ...
0
votes
0answers
9 views
three.js - multiple renders pass not showing all geomtries
I am trying to create a globe using three.js sphere geometry and i want to put a background image of starry background for which i am using plane geometry.I am creating two scenes and two cameras ...
0
votes
1answer
10 views
How can I change the position of my CSG object before subtraction when usingThreejs and ThreeCSG
I'm trying to subtract "holes" in platforms using ThreeCSG. I want the holes to be subtracted in specific locations on the larger platform.
var geometry = new THREE.CubeGeometry( 500, 10, 500 );
...
-2
votes
0answers
21 views
Apply texture to any custom shapes [on hold]
I want to apply a texture to blender generated object like print.ru 3D iPhone case.
Eg:- printio.ru 3D product :- http://printio.ru/iphone6_cases/new?product_id=403048
0
votes
0answers
27 views
C4D + Three.js + Skeleton
Hy everyone !
When I export my model from Cinema 4D and after import with Collada Three JS Loader I have an error:
"Uncaught TypeError: Cannot read property 'sid' of null"
I think maybe it's ...
0
votes
1answer
27 views
Three.js: Cannot change value in dat.GUI
i have an instance of dat.GUI. I added a "comboBox" to that instance to make a selection of possible values. When i run my app, the dat.GUI appears with the comboBox but there is a problem: I cannot ...
-1
votes
1answer
21 views
Three.js - how to set borders to objects?
I have polygon/polyhedron created with three.js? Is it possible to set border width and color for it?
Here is my example code, you may see a figure in it. How to set borders?
May be there are other ...