Beryllium contains shared code that is used throughout all Beryllium apps, including Beryllium-Maven and Beryllium-MMS.
- beryllium-maven: Beryllium application for the Maven mission.
- beryllium-mms: Beryllium application for the MMS mission.
Beryllium itself provides a handful of Angular components and services for Beryllium apps to use. The most thorough documentation of what's available can be found in the code comments, but a few notable examples are listed here:
- The
<cesium></cesium>component: Renders a CesiumJs Viewer, which does all of the 3D work for us. Must be configured by adding custom directives/components in between the<cesium>tags. Those directives will probably want to require"^^cesium"to access the<cesium>Controller's API (see: require for directives, require for components) - The
AbstractClassservice: provides a global "superclass" to help with prototypal inheritance. Used byAbstractDataProvider,AbstractDataTransformer, and others. DataProviderss andDataTransformers: Subclasses ofAbstractDataProviderandAbstractDataTransformer. Both classes implement the same API so that they can be easily interchanged with each other. DataProviders are intended to provide raw data to the app (usually via ajax), and DataTransformers are intended to transform the raw data into a more usable form (usually Cesium.Property instances). DataTransformers can be linked directly to DataProviders, or to other DataTransformers to allow complex processing to be broken up into steps. Both DataProviders and DataTransformers can have any number of "children" ("children" can mean either attached DataTransformers, or visual components that display the data, or both. The attachment method is the same in either case).RequirementsandRequirementsManagerclasses: Provide a standard method for DataProviders and DataTransformers to request requirements (parameters) from the instances that depend on them.- The
berylliumColorsservice: Provides basic utilities for working with color gradients (e.g. color interpolation). Provides access to colormaps ripped from matplotlib. - The
Latisclass: Provides utility methods for making ajax requests to a latis instance.
We use a standard Gulp and Node build system for this project.
npm run build // removes the dist folder and any/all temporary folders and then rebuilds the project to the dist folder
npm run watch // watches the project and rebuilds when changes are detected
Since Beryllium is just a shared code repository, new changes will need to be tested through Beryllium-Maven or Beryllium-MMS. To test the local copy of beryllium, you can use the bower link command.
- In one terminal (you'll need 2 eventually):
cd berylliumnpm installbower link- This installs
berylliumas a link-able dependency globally on the current machine. You only need to run this once per machine
- This installs
npm run watch- Just leave this task running until we're done. You can skip this step and manually
npm run buildevery time you make changes if you would like.
- Just leave this task running until we're done. You can skip this step and manually
- In another terminal
cd beryllium-mavenorcd beryllium-mmsnpm installbower link beryllium- This replaces
bower_components/berylliumwith a symlink to theberylliumrepo you installed in the other terminal. Be sure not to commit this symlink.
- This replaces
npm start
- Make some easily-visible changes to the
berylliumproject (e.g. change some text in the dateRangePicker component)- Notice that the
npm run watchtask in the first tab automatically rebuilds theberylliumproject (it happens fast, don't blink!) - Notice that, once
berylliumhas been rebuilt, thenpm starttask in the second tab automatically rebuilds theberyllium-mmsproject and reloads your browser tab - Notice that your change is now visible in the browser
- Notice that the
- Kill the running
npm starttask (ctrl+c) bower uninstall berylliumto remove the symlink
cd beryllium-mavenorcd beryllium-mmsnpm install- This installs all the node modules required for this project.
bower install- This installs the copy of beryllium that is on the GitHub master branch.
npm start
Since Beryllium-Maven and Beryllium-MMS are connected to the master branch of the Beryllium repository,
simply push your most recent Beryllium code to the master branch. After running bower update beryllium in the Beryllium-Maven
or Beryllium-MMS project command line, the beryllium bower component will include your most recent changes.
For questions please contact LASP Web Team.
None yet
- CesiumJS Sandcastle: This has lots of useful feature demos. If you need to implement something and you don't know what the right class is, this is a useful place to look.
- CesiumJS API reference: If you know what you want to learn about, this is a helpful place to look.
- CesiumJS Tutorials: This is a good place to start if you're new to CesiumJS.
Copyright 2018 Regents of the University of Colorado. All rights reserved.
Commercial use of this project is forbidden due to the terms set forth by Highstock.