During my work on calculating oriented bounding boxes I started implementing the QR algorithm for finding eigenvectors, but also I wanted to check third party libs and I’ve found a great open library for such calculations and many others.
Yes, we use third-party libraries. There is a list of them in LICENSE.md.
As Chris mentioned, the license must be compatible with our Apache 2.0 license. The most popular compatible licenses are MIT, BSD, and Apache. GPL and its variants are not compatible. From a license perspective, numeric is compatible with Cesium.
We use third-party licenses that:
Provide capabilities we don’t have the time and/or expertise to code ourselves.
Are small and light.
Are reasonably popular, tested, and maintained.
Provide enough value that we are willing to add another third-party library whose integration needs to be maintained and has the potential to slightly count against us when folks evaluate Cesium (generally, less third-party is better).
numeric looks like a quality library, but it is quite large at 74 KB minified. When not using AMD, Cesium.js is 1.2 MB minified, and we are always thinking about making it smaller, not larger.
Given this, I recommend
Using numeric as-is if we have other high-impact near-to-medium term uses for it. I don’t have any off the top of my head, but there may be some. Or -
Using just the part of numeric that we need if it pulls out of the library easily. This has the potential to create a maintain problem for us, but given the nature of this kind of code and its GitHub history, I suspect this code won’t change often. Also, this is allowed by their MIT license. Or -
Use numeric as a guide for your own implementation. If we use any parts of numeric, we will credit them and include their license.
(2) is probably the best path here.
Also - with your work in general - the community would love to see a pull request with some of your initial code. It doesn’t need to be big; just some foundations will do, but we like to get folks up to speed with integrating code into the main repo and practice transparency. Dan can even setup a branch for you to pull into, instead of going into master.
Can you help in this please? I got stuck a little bit. I wanted to use numeric.js, so I added it to the ThirdParty folder. In my ObjectOrientedBoundingBox.js I added to the defines as ‘…/ThirdParty/numeric’, and as a function parameter numeric. The parameters are in the same order.
After building and combining I find it in the Cesium.js, but not in Cesium unminified. When I start the server and check sandcastle I get an error that I should run combine because it cannot find numeric.
Dan is out today. Did you put it in Source/ThirdParty? Not ThirdParty? It should be in Source/ThirdParty and copy the pattern of the other .js files like Tween.js. Also try clearing your browsers cache.
What fork are you working in? In general, when you need help, it will help us if we are able to see and build your code.
Unfortunately numericJS is in bad state. It took me a lot of hours to figure out that the problem is not on my side. NumericJS contains references because of some historical reason, to it’s own functions which are renamed, removed (I checked it’s git log), so I fixed some parts of numericJS, but I don’t like this way. I will create a pull request with this hack and change it later.
Sorry NumericJS is causing you problems. Given what I saw about the library, I am very surprised to hear this.
You are welcome to open pull requests with hacks into Dan’s fork or even into a branch in the main repo if Dan made one for merging, but we won’t merge them into the master branch in the main repo until it is production quality. In general, you should strive to open high-quality fine-grained pull requests so you can get prompt focused feedback and get into the rhythm of contributing code.