The individual years as a template copied e.g. for 2020 view-source:https://hofk.de/main/discourse.threejs/2020/index2020.html .
So would you like to put everything that is under https://hofk.de/main/discourse.threejs on GitHub to make it easy to propose changes? Or you’re not interested in that? EDIT: Oh, I just saw your private message after this. I can reply there.
Hello: I am very new at threejs, but I really like it a lot!
I just got the Collection of examples from discourse.threejs.org…
I download and open the folders. I just double click on the .html file and some of them work, and some don’t… the DraggingObjects.html on folder 2019
works fine when double click on my computer…
but if I upload it to my server to see it on my web-page… it doesn’t work
I don’t change anything, why is not working on my site: http://songnes.com/g/DraggingObjects.html
and why some of them work, and some don’t
it has to do with this?:
The console shows
ReferenceError: THREE is not defined
You must respect the structure of the folders.
in source code.
By the way, have you read this book? https://discoverthreejs.com/ by three.js co-author and moderator looeee
Thank you for that, but I guess that was my question…
when it says “…/” it means from somewhere …
where do I get that file, so I can upload it into my server
http://songnes.com/js/threeJS/three.min.106.js <------ here
when I go to github, I don’t know how to get the actual file…
is there any place I can go and just download it easy…
Actually this does not fit into this topic, but since other beginners may have similar problems, here are some explanations.
If you download the zip-file from * discourse.threejs.hofk.de you will get all necessary things in the folder structure I use.
If you look in the source code of
“…/” does not mean somewhere, but means “go to the next higher level folder”.
Then it says “js/”, so together “…/js/”
So you will find the file three.min.106.js in the folder js in the next higher level folder.
If you unzip the zip file, you will have many folders with the examples in the folder of the year.
Open the folder and you will see the files I needed for the examples in this particular year.
If you put examples on your server, you either need to create the folder structure like mine, or you change the path to access the files.
In one of your examples I have seen:
So you have your own structure /js/threeJS/ , which you probably always choose. You should be a bit constant there, otherwise you get mixed up easily.
Sometimes I see examples where the version of three.js is not clear to me, or the author has changed three.js. This is allowed. Then I just copy the file.
Just click on the .js link in the source code and the file will be displayed in the browser. Copy with Ctrl + C and paste it into your own code editor with Ctrl + V .
Now you can name the file correctly and copy it into your appropriate directory.
A statement (GetSources) was added below.
With the module version it gets a bit more complicated for beginners.
Further information can be found at the bottom left corner of
* discourse.threejs.hofk.de – Module usage
Thank you. I got the first part…
I will read the module explanations!!!
Changes for 2018
Since 2018 the restrictions in the browsers have been tightened. Therefore the example VideoProjection and the underlying fiddle did not work anymore.
A play button was added.
In the example ChangeTextureByTime I had forgotten to copy the textures. Meanwhile the texture UV_Grid_Sm.jpg no longer exists on threejs. org examples textures.
Replaced by uv_grid_opengl.jpg
Please also download and replace the corrected file 2018.zip if necessary.
UPDATE 2020 See original post.
The note on local use of the examples has been adapted with regard to the use of ES 6 modules since 2020.
I have presented a very simple variant suitable for beginners. But I can only test it for Windows 10. If someone should test and briefly describe a correspondingly simple variant for other operating systems (with Apache?), I would like to add this.
Happy and healthy New Year.
And the collection of last year’s examples is now available as a zip file. See original post.
This year @prisoner849 contributed more than 40 basic examples to the Collection of examples from discourse.
More than any other author.
By doing so, he has helped many users. For this he deserves a lot of thanks.
There are also excellent things from him in the extended examples.
Thank you, keep up the excellent work!
As I said before, it wouldn’t be possible without our great three.js community
I just noticed it and would like to just ask for the Hypnotising Ever-Rotating Squirrel of The Beginner Example to not be removed or tampered with during the further constructions - as it is absolutely perfect in every way. :’)
Have you ever worked on the task and put // in front of the line?
gltf.scene.position.set( -c.x, size.y / 2 - c.y, -c.z ); // put // in front of this line, try it out
Nope - I bet putting
// in front of that line would make the squirrel disappear and I’m not falling for that.
Btw, is the Almighty Omniorbitational Squirrel and the code part of an upcoming tutorial / guide ?
The code is the tutorial itself. From practice I know that beginners want to experience visible successes quickly. And do not want to read pages and pages of theoretical introductions. Also too many hints, what else you can do, distract too much at the beginning and confuse.
Therefore only the links, so that one can read up with interest.
One thing I’m curious about (or maybe a suggestion?) - browsing the page, both examples and the Home of The Squirrel, it’s very easy to see the result you mention - is there some obvious way to see the source ? (I 100% blind, so I might be missing something super obvious )
Is there a way to see sources of the examples / squirrel without opening the devtools (like in three’s official examples, the bottom-right button) ?
and also to the original codes (jsfiddle, codepen …)
More effort I can’t do, see
I just take Ctrl + U and see the copied code and the links above. In the script again the author.
Changed on a hint, it was for Windows only.
thank you hofk, your collection is super