We are a community that encourages contributions. Join us. Here's how.
git config --get-regexp user.*.
git config --global push.default simple- when running
git push, only push the current branch (default in Git 2.0).
git config --global branch.autosetuprebase always- when pulling remote changes, rebase your local changes on top of the remote changes, to avoid unnecessary merge commits.
git clone firstname.lastname@example.org:yourusername/cesium.git.
git clone email@example.com:AnalyticalGraphicsInc/cesium.git.
git checkout -b myFeature.
From the root Cesium directory, run:
./Tools/apache-ant-1.8.2/bin/ant combine runServer
Then browse to http://localhost:8080/.
sudo apt-get install ia32-libs), or you can install NodeJS yourself and use a binary from your PATH by specifying
-DnodePath=nodewhen running Ant.
For a default developer build, run Ant from the root Cesium directory:
To run the HTTP server for testing, run:
For all build options, see Build Targets below.
We encourage contributors to use their IDE of choice, but many of us use Eclipse. Here's how we set it up.
Download the Eclipse IDE for Java Developers. Extract to a directory of your choice. Run it.
Run Eclipse. Close the Welcome page.
Window - Preferences:
Import Cesium into your workspace: File - Import, General - Existing Projects into Workspace, Next. Fill in the path to the root Cesium directory, Finish.
Window - Show View - Console.
Also consider the Optional Eclipse Configuration options below.
At this point you are ready to contribute. Continue reading below for more details on the developer setup, or read about Cesium's architecture; check out the roadmap; join the forum; and start hacking.
This section has additional information on our development tools.
The following targets can be built:
build- A fast, developer-oriented build that prepares the source tree for use as standard Asynchronous Module Definition (AMD) modules, suitable for running tests and most examples (some Sandcastle examples require running
combine). This runs automatically when saving files in Eclipse.
build, plus uses NodeJS to run the RequireJS optimizer to combine Cesium and the Almond AMD loader to produce all-in-one files in the
Build/Cesiumdirectory that expose the entire Cesium API attached to a single global Cesium object. This version is useful if you don't want to use the modules directly with a standard AMD loader.
combine, plus [minifies](http://en.wikipedia.org/wiki/Minification_(programming\)) Cesium.js using UglifyJS2 for a smaller deployable file.
combine, plus uses the optimizer to remove debugging code that validates function input and throws DeveloperErrors.
minify, and removes debugging code.
buildApps- Builds the example applications (such as Cesium Viewer) to produce self-contained, minified, deployable versions in the
generateDocumentation- Generates HTML documentation in
Build/Documentationusing JSDoc 3.
release- A full release build that creates a shippable product, including building apps and generating documentation.
instrumentForCoverage- Runs JSCoverage on the source tree to allow running tests with coverage information. Use the link in index.html. Currently Windows only.
jsHint- Runs JSHint on the entire source tree. If you use Eclipse, see below for how to run JSHint automatically as you develop.
runServer- Launches a Jetty-based HTTP server on http://localhost:8080 for easy access to the tests, examples, and documentation. This also provides proxying for tile server providers that don't yet support CORS for retrieving tiles, which is required for use as textures. To change the port, pass
Xis the desired port.
runPublicServer- The same as
-DrunServer.public=trueargument to allow for external connections.
makeZipFile- Builds zip files containing all release files. This includes the source tree (suitable for use from an AMD-aware application), plus the combined Cesium.js files, the generated documentation, the test suite, and the example applications (in both built and source form).
clean- Removes all generated build artifacts.
cloc- Runs CLOC to count the lines of code on the Source and Specs directories. This requires Perl to execute.
Specify the target(s) at the command line:
./Tools/apache-ant-1.8.2/bin/ant [target-name] [another-target-name] ...
For example, to build the release target and then start an HTTP server for testing, run:
./Tools/apache-ant-1.8.2/bin/ant release runServer
These steps are optional depending on your preference.
If you edit markdown files (.md) with Eclipse, installing the Markdown plugin is useful.
If you edit WebGL shader files (.glsl) with Eclipse, install GLShaders for GLSL syntax highlighting. First exit Eclipse, then download GLShaders and extract into Eclipse's dropins directory.
Most of us use Git from the command-line, but there is also an Eclipse plugin. To install it:
Window - Preferences: Team - Git - Configuration
Right click on Cesium in the Script Explorer. Team - Share project. Select Git, Next. Check Use or create repository in parent directory of project. Finish.
Then, to step into the test, step into
Use www.webglreport.com to see if WebGL is supported, and if so, what is exactly supported. For more goodness, including the ANGLE revision, browse to chrome://gpu-internals/ in Chrome.
For WebGL debugging such as stepping through draw calls, viewing textures and vertex buffers, etc., use the WebGL Inspector.
To run without ANGLE (Windows-only)
To debug shader problems when running with ANGLE enabled, it's sometimes useful to look at the generated HLSL code. To do that, run Chrome with the
--enable-privileged-webgl-extensions command-line option. Then, obtain the HLSL code by executing:
var hlsl = gl.getExtension("WEBGL_debug_shaders").getTranslatedShaderSource(fragmentShader)
For performance testing, turn off vsync
For an FPS counter in Chrome, browse to chrome://flags/ and check FPS counter. Create a FPS counter in Cesium with
Last edited by Scott Hunter,