hofk
1
I had a very strange mistake with the addition of the collection.
https://hofk.de/main/discourse.threejs/2019/index2019.html
During the local test of RestrictDragControls everything was perfect. After uploading it to my site I test it again. There was an error message.
In the source code (CTRL U) I found
if ( lastPosition.distanceToSquared( _this.object.position ) > EPS ||Â lastZoom !== _this.object.zoom ) {
That’s not correct. But why did it work locally?
If you look at the hexadecimal, you can see the code A0 after ||
The meaning is also
160 A0 U+00A0 No-break Space
My editor shows when I display non-printable characters
You have to look closely, then you can also see the problem there.
Why the difference local and after upload?
I accidentally overwrote the line meta charset=“utf-8” while copying the style.
Obviously this is no problem locally on my computer, but after the upload.
Should the small issue A0 be fixed
2 Likes
Yes, it would be great if you can make a PR
hofk
3
I’ll give it a try. Would be my first pull request. It may take a while, I have to (translate)read the many requirements and work steps first.
Since it is only a Bug (easy), there is no hurry.
Instead of forking the project you can also consider to directly edit the file at github. I guess this link should work: https://github.com/mrdoob/three.js/edit/dev/examples/js/controls/TrackballControls.js
You can then select the following option in order to create a PR:
1 Like
hofk
5
This is only possible with the necessary write permissions. Not every beginner like me should have that either. You are three.js professional!
So I’m gonna learn.
hofk
7
Forked three, started learning.
Have a look at the file three.js/TrackballControls.js at 3a324a69e3101407e24822fda1efdaf87fe77025 · mrdoob/three.js · GitHub again.
Like a miracle - the code A0 has changed to 20.
(I searched all files in the controls folder for A0 and found nothing.)
Am I too stupid ??? …
… or a diligent professional probably wanted to spare me the stress.
Mugen87
8
2 Likes