A high performance 3D rendering engine for the web.
- Install Git.
- Install Node.js from here: https://nodejs.org/en/download/ using the default options. It should be straight forward.
- Install dependencies.
- Install the Yarn package manager (it should be included in the latest Node.js version).
- Run
yarn install
- Build:
- See the scripts section below.
Note: The Zea Engine documentation uses yarn
commands, but npm
will also work.
You can compare yarn
and npm
commands in the yarn docs, here.
yarn run build
- Produces the production version of ZeaEngine.yarn run build:watch
- Produces the development version of ZeaEngine and triggers a re-compilation on file changes.
In your development environment you can run:
yarn test
Or, to trigger a re-compilation on file changes:
yarn run test:watch
In your CI environment you can run:
yarn install --frozen-lockfile --ignore-scripts
yarn run build
yarn test
- In your development environment, run:
yarn run test:debug
-
In your Chromium based browser, use this address to open the inspector:
chrome://inspect/#devices
-
From the list of targets, click the one that corresponds to the Zea Engine.
-
Use the debugger statement to add breakpoints to your code.
-
Your browser will reload and now you're ready to start debugging.
-
Open your preferred terminal.
-
Navigate to the directory containing the ZeaEngine sources. E.g.
cd ~/your-dir/zea-engine/
-
Build ZeaEngine in development mode:
- Run
yarn run build:watch
. Produces the development version of ZeaEngine and triggers a re-compilation on file changes.
The End-to-End (E2E) testing technique allows us to ensure that the rendering results are always the expected ones. We use the Percy visual review platform to capture and compare snapshots. It's also a very important part of our CI/CD workflow, so we can catch and fix bugs as soon as they happen.
-
From the Percy project settings, copy the project token.
-
In your terminal, assign the project token to an environment variable. For convenience, you can use a tool such as direnv.
-
Run:
yarn run test:e2e
Or, if you want to inspect the tests as they run:
yarn run test:e2e:watch
- Run:
yarn generate e2e-test
You'll be prompted for the test's name.
The testing framework launches chrome in headless mode, which uses an emulated software GPU called the Google Swiftshader.
While fast, the swiftshader is an order of magnitude slower than discrete GPUs. To run the e2e tests in non-headless mode, while also running the swiftshader, launch chrome with the following flags.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-gpu
Note: the SwiftShader GPU is detected as a 'low-end' GPU and so runs all code at the same quality settings as mobile devices.
-
All unit and E2E tests must be passing.
-
To generate the release notes and bump the version, run:
yarn run release
This will generate a tag in the repo. This tag will be the basis of the next release.
- Regenerate the API docs
Clean up te CHANGELOG.md, check for spelling issues and other inconsistencies.
yarn docs
Commit changes.
- Push the main branch and the tags in one action like this. This will cause a publish to NPM
git push && git push --tags
- Check that the release process completes in GitHub.
https://github.com/ZeaInc/zea-engine/actions
- Release using GitHub
- Wait for the "Publish to the "next" release channel" action to complete
- Go to the Tags page in the engine repo in GitHub: https://github.com/ZeaInc/zea-engine/tags
- See the most recent tag. Prett the 3 dot to the right side and select 'Create release'
- in the release page, press the 'generate release notes'
- Press the 'Publish release' button
- check the status of the release int he actions page: https://github.com/ZeaInc/zea-engine/actions/workflows/publish.yaml
Pre-releases are potentially unstable releases meant for tests of new features before they are published to an production release.
Please get familiar with the yarn version
command.
Navigate to the branch that you wish to use to make a pre-release.
Adds an identifier specified by <pre-identifier>
to be used to prefix premajor,
preminor, prepatch or prerelease version increments.
yarn version --prerelease --preid <pre-identifier>
yarn publish --public --tag <pre-identifier>