THREE.js - Can someone please explain how to use this library? - three.js

I downloaded three.js (three.js-master) and am confused by what I'm seeing because of the following 3 things:
- There is a Three.Legacy.js vs a Three.js under the /src folder.
- Also under the /src folder there are various smaller files (e.g. scene.js).
- Under /examples/js there are even more various files.
Question
If I want to create a new application using the latest & greatest version of Three.js, what files must I be referencing?
thanks.
Update
So I discovered that three.js exists under /src AND under /build. The one under /src is a mere 7 KB in size while the other one is 949 KB. The 7KB file has many things missing. What is the purpose of this file and why does it even exist? It's simply confusing.

The Documentation says that you only need the three.js so use the three.min.js inside build folder is the best.
In practical development, we should not edit the source code, that's why they write every new and/or customised feature into separate small files.
http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene

Related

c# DocFx. Direct way to create the web page or pdf of documentation?

I have my visual studio 2022 project with c# and I want to create the documentation but I don't want more files and folders to my project.
Docfx create folders and files.
SandCastle you even have to create another project inside your solution.
There is a way to run a command and generate the web page without creating any extra file in the project/solution?
Thanks.
If you are just wanting to generate documentation from your source code xml comments than DocFx does not require that many new files to be be checked into source control. Sure you will need the basic project structure but all the intermediate / generated files in the output can be excluded from your committed source code using .gitignore files (assuming you are using git).
For example, in these tutorials
https://dotnet.github.io/docfx/tutorial/walkthrough/walkthrough_create_a_docfx_project_2.html
https://dotnet.github.io/docfx/tutorial/walkthrough/walkthrough_create_a_docfx_project.html
You would only really need
docfx.json
index.md
toc.yml
api/index.md
api.index.yml
.gitignore
If you add the following lines to the generated .gitignore from tutorial 1 then all the intermediate and generated documentation yml files will never be committed to git.
api/*.yml
api/.manifest
Hopefully this helps, I know it does not get you 0 extra files like you asked but its a fairly light weight solution to generating api documentation.

DJI iOS SDK 4.7 add so many bin files

I noticed that in the commit a6e2288 on 30 Aug in the repository Mobile-SDK-iOS of dji-sdk, it add a lot of bin files in the Sample Code/ObjcSampleCode/DJISdkDemo/Resource directory. And I found that those files names are only appeared in the DJIWidget project by searching the file name. Therefore according to this commit, there are two things confused me.
Firstly, I wonder if I need put those files in my swift application which only uses the swift version of DJI SDK since those files only add in ObjcSampleCode directory. To be honest, I don't know much about Objective-C.
Moreover, I found that there is no such commit in the Mobile-UXSDK-iOS repository. So dose it need this commit as well?
By the way, the code of DUXSDK in previous version such as 4.6 use a bundle file to manage those images that are used in the VideoPreviewer project. Why those images are added into project directly in version 4.7? I am not very familiar with the file structures in Xcode project and can someone explain to me?
Those bin files are for Mavic 2 decode image distortion calibrate. The reason why those files only add in ObjcSampleCode directory is SwiftSampleCode is not supporting DJIWidget features.
Mobile-UXSDK-iOS is still not supporting this feature now. Will coming next release.
The reason why we add the bin files as resource file is it's used by DJIWidget and the bin files import in the application project. If we used a resource bundle we need to add it to DJIWidget.

Why Derived Data - why do we need it

For years I have just blindly excepted that once in a while I need to delete the Derived Data folder.
The Internet - mostly comes up with ways to delete it :-)
Can someone explain why we need Derived Data and not just have output relative to each
project in Xcode - I am sure it is something smart, but what?
Note:
I know how to change it, but it is more if there is any thoughts behind having it.
I also know how to git ignore.
So if it is for speeding up builds, there must be a way to reference other Derived Data frameworks in projects?
Thanks
The module-based nature of Swift building and linking requires the creation of dozens of ancillary files (apinotesc and pcm files) in the module cache. It is cheaper and (subsequently) faster to create these once for all projects. Thus the default is that there is one location for one module cache.
Another advantage is that when cleaning up the derived data files (which take up a lot of room) — as you yourself admit one needs to do from time to time — it is easier to find them all if they are in once location together. Imagine if they were distributed inside every individual project folder!
Can someone explain why we need Derived Data and not just have output relative to each project in Xcode - I am sure it is something smart, but what?
The files in the derived data folder are intermediate files. Having them around let's Xcode avoid doing work that it has already done previously, and so speeds up your builds. If you delete those files, there's no long-term harm done -- Xcode just has to go and create them again. That takes time, so your build will take longer, but otherwise you'll get the same result.
The reason not to put them in the project folder is that they're not really party of the project. If you use version control (you do, right?), you wouldn't want to have to configure your software to ignore parts of the project, and you wouldn't want to commit any of those derived data files either. And again, removing the derived data files doesn't change the project at all; it only changes what Xcode remembers about the project from one build to the next.

XNA 4.0 resources not found

I'm using XNA 4.0 with VS 2010. When I start a new project, a decent amount of the resources have broken links; other sites where people have encountered this problem suggest manually fixing the file paths, which works but is bothersome when I'm creating several new projects (I'm following various tutorials to learn my way around XNA). Does anyone know if there is a way to fix the underlying problem, rather than changing the file paths for each new project?
Are you trying to use Contents of other project in one solution ? Than you add to your Content Project Reference's the external Content you want to use. Jon's answer is already works fine, I already prefer Jon's answer :)
If you put your resources in the Content directory, then copy the Content directory to your new project, it should retain all the files and the links should still be good.
Not sure what the problem is exactly, possibly provide more information on the problem so that we can get a better idea of what is wrong.

a few basic xcode questions

what is copy items into destination group's folder (if needed)
is this a good option? If I dont choose it will it just make a reference to my files?
Also if I have two images with the same name like /images/home.gif, /public/home.gif
but they are in different groups how does the compile know which image to use? is this even possible?
I'll have a crack at this :-)
1 & 2 - Used when adding files to a project. If selected, the file you are adding is copied into the projects directory from wherever it originally was. Note it is copied. If not selected, the project can still use it, it just has a reference to the original source file. Which means that if something happens to the original file, the project will not longer have a copy it can use. Personally for files such as images I copy them into the project so they stay with the project. For other things such as external apis, I don't because I don't want multiple copies everywhere.
3 - If you have two images with the same name you won't be able to copy them in without renaming one. XCode may do this for you, I've never tried. I'd suggest renaming one so you control it's name.
4 - Don't get confused by groups. They are logical groupings of files within XCode and do not refer to the underlying file system. Having said that you can actually assign a directory to a group so if you really wanted to you can match the two. I tend to do it a little. In my projects I generally have a src and test directory. I setup two groups and assign them to refer to these directories. Then when I create a new source code file I can create it in the src or test group and it will be created in the sub-directory instead of the project root directory. Often below src and test I will use other groups, but they do not map to any sub directories. The result is that the root directory of the project is free of source code files and the source code also has source and test code separated.

Resources