The full WorldWide Telescope rendering engine in JavaScript with WebGL
Перейти к файлу
cranko bfee2c5fcb Release commit created with Cranko.
+++ cranko-release-info-v1
[[projects]]
qnames = ["@wwtelescope/research-app-messages", "npm"]
version = "0.17.3"
age = 0

[[projects]]
qnames = ["@wwtelescope/engine-types", "npm"]
version = "0.6.7"
age = 1

[[projects]]
qnames = ["@wwtelescope/engine", "npm"]
version = "7.29.3"
age = 0

[[projects]]
qnames = ["@wwtelescope/embed-common", "npm"]
version = "0.3.5"
age = 2

[[projects]]
qnames = ["@wwtelescope/embed-creator", "npm"]
version = "0.5.0"
age = 2

[[projects]]
qnames = ["@wwtelescope/astro", "npm"]
version = "0.2.5"
age = 1

[[projects]]
qnames = ["@wwtelescope/engine-helpers", "npm"]
version = "0.16.0"
age = 2

[[projects]]
qnames = ["@wwtelescope/engine-pinia", "npm"]
version = "0.9.0"
age = 2

[[projects]]
qnames = ["@wwtelescope/research-app", "npm"]
version = "0.16.0"
age = 2

[[projects]]
qnames = ["@wwtelescope/embed", "npm"]
version = "1.7.0"
age = 2

+++
2023-11-10 03:06:05 +00:00
.config/cranko .config/cranko/config.toml: use new Cranko feature to use workspace protocol for internal deps 2022-11-29 18:52:24 -05:00
.yarn Basic NPM -> Yarn changes in CI. Update yarnrc and necessary parts of .yarn. 2022-11-28 09:46:00 -05:00
astro Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
ci ci/azure-main-build.yml: update Zola version to what I'm using locally 2023-10-11 16:24:58 -04:00
docs docs/engine/content/tutorial/fits-images/: next section 2023-10-13 13:28:02 -04:00
embed Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
embed-common Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
embed-creator Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
engine Release commit created with Cranko. 2023-11-10 03:06:05 +00:00
engine-helpers Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
engine-pinia Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
engine-types Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
research-app Release commit created with Cranko. 2023-11-03 19:58:17 +00:00
research-app-messages Release commit created with Cranko. 2023-11-10 03:06:05 +00:00
tests Update sponsorship branding in meta-files (automated) 2023-09-15 09:33:27 -04:00
.eslintignore Set up linting 2020-05-04 15:58:50 -04:00
.eslintrc.js Fix lint complaints 2023-10-06 12:10:58 -04:00
.gitattributes Added gitattributes 2020-11-17 08:32:13 +01:00
.gitignore Begin migrating from Lerna to Yarn workspaces. 2022-11-19 17:17:52 -05:00
.gitmodules docs/research-app: set up skeleton research-app docs 2021-02-15 16:32:33 -05:00
.yarnrc.yml Updates to Yarn configuration files; package file organization. 2022-11-19 17:17:52 -05:00
LICENSE Import reworked build framework 2019-12-30 19:54:54 -05:00
README.md README.md: add some notes about build challenges 2023-09-15 11:43:52 -04:00
package.json engine-pinia: lots of docs work 2023-10-08 08:49:37 -04:00
yarn.lock Release commit created with Cranko. 2023-11-03 19:58:17 +00:00

README.md

Build Status npm npm npm npm npm npm npm npm npm npm Powered by NumFOCUS

The WorldWide Telescope WebGL engine

The “WebGL engine” of the WorldWide Telescope (WWT) is a JavaScript/TypeScript framework that powers the Web-based versions of the WWT visualization software, as exemplified by the WWT web client.

Learn more about WWT here.

The WorldWide Telescope project uses an open governance model and is fiscally sponsored by NumFOCUS. Consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

Developers quick start

  1. Check out this repository to a machine with Node.js and Yarn.
    1. Builds with versions of Node.js around 18.17 may fail with an Invalid URL error.
    2. There have also been reports of builds that hang on Linux with Node 20.x.
  2. git submodule update --init
  3. yarn install
  4. yarn lint (uses ESLint)
  5. yarn build creates:
    1. The core engine package in the engine/ package.
    2. The engine tidied up into a Vue/Pinia module in engine-pinia/
    3. The WWT embed app intended for iframe inclusion in embed/
    4. The WWT research app in research-app/
    5. The user-facing app for creating embed iframe code in embed-creator/
  6. Commands to serve the web apps:
    1. yarn run serve-embed to serve the embed app
    2. yarn run serve-research to serve the research app
    3. yarn run serve-creator to serve the embed creator app
  7. yarn test (mainly uses mocha and chai; see also Integration Testing below)
  8. yarn doc (uses TypeDoc)

Repository structure

This repository is a monorepo containing the source for several interlocking TypeScript packages that together comprise the core of the WWT web framework. The most important subdirectories are:

  • @wwtelescope/engine in engine/, the core engine code with TypeScript annotations
  • @wwtelescope/engine-pinia in engine-pinia/, a higher-level package that turns the engine into a reusable Vue/Pinia component
  • @wwtelescope/embed in embed/, a web application that turns WWT into a configurable, embeddable iframe
  • @wwtelescope/research-app in research-app/, an embeddable web application for astrophysics research using WWT.
  • The narrative documentation in docs/

README files inside the individual subdirectories give more information about their contents and development workflows.

Previous versions used Vuex instead of Pinia in the engine-vuex/ subdirectory. That module has been superseded by the Pinia version.

Building the code

Code in this repository is built using standard Node.js/Yarn tooling. These tools must be installed before you can do anything else. To set up your checkout, follow the instructions in the Developers Quick Start above.

Once setup is complete, the following commands will be useful:

  • yarn build to build the subpackages
  • yarn lint to lint the subpackages (using eslint with TypeScript extensions)
  • yarn test to run the tests (mainly using mocha and chai)
  • yarn doc to build most of the documentation (using TypeDoc) — but see below
  • yarn clean to remove built files

You can run these commands from the top level, which will run them for all of the packages, or from the subdirectory of the package youre interested in.

Building the full documentation

Documentation is maintained in subdirectories of docs/. The documentation is a Frankenstein combination of the autogenerated API documentation and narrative material written in CommonMark Markdown. The final HTML is assembled with the static site generator Zola.

  1. Zola is fast and self-contained and ridiculously easy to install.
  2. The yarn doc command will install the autogenerated documentation into docs/engine/static/
  3. Running zola build in a subdirectory of docs will assembled the final HTML into docs/{subdir}/public/.
  4. The command zola check will check the narrative docs for broken links.
  5. The command zola serve will serve the documentation using a local server with autoreload.

Continuous Integration and Deployment

This repository uses Cranko to automate release workflows. This automation is essential to the smooth and reproducible deployment of the WWT web services.

Integration Testing

Integration testing of the apps is done using Selenium, Nightwatch, and BrowserStack. For the main branch, this is triggered automatically with each commit/pull request. However, the test suite can also be run using a version of the app on your local machine, either locally (using the Nightwatch binary) or using BrowserStack (provided that you have a BrowserStack account). In either case, you may need to modify the url in tests/page_objects/researchApp.js to point to the localhost port that you will be using (the default is http://localhost:8080).

To run the test suite on a local version of the app with ChromeDriver:

yarn run serve-research &  # or equivalent
cd tests
yarn build
yarn local

To run tests on a local version of the app via BrowserStack's multi-browser, multi-platform infrastructure, do the following:

  • Set the variables BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY to your BrowserStack username and access key, respectively. You can find these values in your BrowserStack Account Settings.
  • Run the test suite as above but with the final command: yarn bs-local

By default, both of these local options will run the tests in Chrome. You can adjust the testing environments adding the -e option, which can be accomplished with syntax such as

yarn bs-local -e firefox,edge

Getting involved

We love it when people get involved in the WWT community! You can get started by participating in our user forum or by signing up for our low-traffic newsletter. If you would like to help make WWT better, our Contributor Hub aims to be your one-stop shop for information about how to contribute to the project, with the Contributors Guide being the first thing you should read. Here on GitHub we operate with a standard fork-and-pull model.

All participation in WWT communities is conditioned on your adherence to the WWT Code of Conduct, which basically says that you should not be a jerk.

Acknowledgments

Work on the WorldWide Telescope system has been supported by the American Astronomical Society (AAS), the .NET Foundation, and other partners. See the WWT user website for details.

Legalities

The WWT code is licensed under the MIT License. The copyright to the code is owned by the .NET Foundation.