Comments (10)
Here it says:
camera targetposition (x,y,z): THREE.Vector3 ( 0, 0, 1.8369701987210297e-13 )
from three.js.
which is 0,0,0 :-)
( 1.8369701987210297e-13 == 1.8369702 × 10^-13 =~ 0 )
from three.js.
If you put it to ( 0, 0, 0 ) is it on the middle?
from three.js.
It's still on the bottom. I uploaded the updated version so you can check...
from three.js.
I am afraid I can't help you on this one. There are many examples with the camera target in 0,0,0 working fine. It's probably something else...
from three.js.
the camera targeted at 0,0,0 happens often indeed (and it works), but the difference (I think) is that the camera position itself is often on y=0 while in my case it is at 1000 while both x and z are 0.
I will see if I can refine this issue :-)
I will come back here...!
from three.js.
Hi MrDoob, apologies for my bug-screaming :-)
It was indeed an error on my side...
Lighting does also work, looks pretty neat now!
I however encountered another glitch on the way.
http://fabricasapiens.nl/projecten/spel/snelletest.html
What happens is that the camera (x=0, y=100) flies over the cube by moving from x=1000 to x=0, while looking at the same target 0,0,0. At the very end, when the camera is right above the cube, the cube disappears. If I make x or z simply 1 instead of 0, it works properly with displaying, but it 'shakes' a little at the end, see:
http://fabricasapiens.nl/projecten/spel/snelletest2.html
The html files can be downloaded and placed in the same folder as you extracted my zip in, if you want to test some.
from three.js.
I managed to tests this a bit. It all works fine until the camera.position.x
and camera.position.z
get to the same position where camera.target.position.x
and camera.target.position.z
are.
In other words, avoid having both points of the camera in the same vertical. I don't know exactly what's the mathematics problem with that but it has always been a problem in all 3d applications I've used.
from three.js.
Great, thanks! :-)
Maybe it is that the engine does not know how to orient the camera, in that there is no single 'logic' view of the target. In airplane-terms: if we were flying towards the target from exactly above, rolling the aircraft in any direction would still be a 'valid' way of looking at the target. The engine thus cannot decide and turns blank.
</ vague theory > ;-)
from three.js.
Something along those lines... ;)
from three.js.
Related Issues (20)
- FBX mesh breakage morphing MTIs HOT 1
- GLTFLoader addon is missing (import from examples?!) HOT 1
- Distortion of the model due to being too far from the origin HOT 2
- MapControls requires enableRotate=false on IOS HOT 1
- wrong z order when rendering material with alpha mode "BLEND" HOT 7
- It appears that the resources associated with DRACOLoader may not be completely released, leading to memory consumption issues HOT 4
- I wish an example for the outputStruct node HOT 3
- Adding postprocessing support to the three. js editor HOT 1
- WebGLRenderer.setSize cannot set properties of undefined (setting 'width') HOT 2
- Enhance target type for SpotLight and DirectionalLight HOT 1
- Build a grid through custom coordinates HOT 1
- `.equals` in class `Spherical` HOT 6
- FBXLoader loads default Unreal model with wrong rotation HOT 4
- Editor can't import glTF with .ktx2 textures HOT 1
- MRT needs a filter if there are several objects with different shader counts in the scene HOT 3
- File Export Whole Scene feature was removed 😨 HOT 2
- RectAreaLight passes through material HOT 6
- Editor: drop event in UIOutliner of ui.three.js not being call HOT 9
- Editor: Export GLB and GLTF fails to fetch HOT 2
- MeshToonMaterial support for WebGPU
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js.