enso/gui
Danilo Guanabara cd95b281e8 60 steps per second Physics Simulator (Kinematics, Spring, Air Dragging) (https://github.com/enso-org/ide/pull/91)
* 60 steps per second Physics Simulator (Kinematics, Spring, Air Dragging)

* Style fix

* Review refactoring

* Moved mass to Kinematics

* Linter fixes

* Vertical alignemnt update

* Removing std::mem::forget from physics test

* Physically correct interpolated simulator

* PhysicsSimulator implementation only with one Animator

* Added source commcents

* Safer Physics mod setters

* Removed use of performance.now() in set_time


Original commit: 0596cc5097
2019-12-26 13:53:25 -03:00
..
.github Add wasm-pack test to github workflows (https://github.com/enso-org/ide/pull/49) 2019-11-25 11:52:51 +01:00
build-utilities Text display: letters alignment (https://github.com/enso-org/ide/pull/62) 2019-12-04 17:45:31 +01:00
docs Refactoring file structure. (https://github.com/enso-org/ide/pull/94) 2019-12-24 09:29:10 +01:00
examples Refactoring file structure. (https://github.com/enso-org/ide/pull/94) 2019-12-24 09:29:10 +01:00
lib 60 steps per second Physics Simulator (Kinematics, Spring, Air Dragging) (https://github.com/enso-org/ide/pull/91) 2019-12-26 13:53:25 -03:00
script Line of chars (https://github.com/enso-org/ide/pull/57) 2019-12-03 22:46:38 +01:00
.gitignore Buffer Management for BaseGL (https://github.com/enso-org/ide/pull/51) 2019-11-27 18:04:33 +01:00
.rustfmt.toml Buffer Management for BaseGL (https://github.com/enso-org/ide/pull/51) 2019-11-27 18:04:33 +01:00
Cargo.toml Refactoring file structure. (https://github.com/enso-org/ide/pull/94) 2019-12-24 09:29:10 +01:00
LICENSE Init 2019-10-06 21:47:17 +02:00
README.md Text scrolling (https://github.com/enso-org/ide/pull/84) 2019-12-19 12:06:48 +01:00

License Actions Status Coverage Stability

BaseGL

BaseGL is a blazing fast 2D drawing API. This repository is a work in progress of BaseGL 2.0. Please refer to BaseGL 1.0 repository for more information: https://github.com/luna/basegl-old.

Working with the code

The Rust toolchain

In order to use some of the WASM pipeline features we need to use a nightly Rust channel. The same applies to the code auto-formatter and it's advanced configuration options used here. You would neither be able to compile not format the code using the stable branch.

To setup the toolchain, please use the the Rust toolchain installer :

rustup toolchain install nightly-2019-11-04 # Install the nightly channel.
rustup default nightly                      # Set it as the default one.
rustup component add rustfmt                # Install the code auto-formatter.
rustup component add clippy                 # Install the linter.

Building and testing the project

Please use the script/build.sh, script/watch.sh, and script/lint.sh scripts to build, watch, and lint the project respectively. We need to use a simple custom wrappers here because of the several Rust toolchain issues:

In order to build an example demo scene, please use the following commands:

./script/watch.sh # Build and watch for changes.

# Wait till the project finishes building.
# Run the following lines from other cmd:

cd examples/01-scene
npm install
npm run start

You can now open the following address in your browser: http://localhost:8080.

There are also web test which are run in browser and produce some output. To run them, pick a test suite (html_renderer for instance) and run:

wasm-pack test lib/core --chrome --release -- --test html_renderer

Now the test output is available at http://127.0.0.1:8000. There are benchmark tests too (that's why --release flag is recommended).

Please remember to disable the cache in your browser!

Working with the source code

Formatting

All codebase should be auto-formatted using rustfmt. It is highly recommended that you use an IDE which takes care of formatting the code as you type. Please remember that auto-formatting does not mean you should not care of the way your code looks and feels! Be sure to carefully read the Rust style guide and apply it everywhere in your codebase.

Linting

Please be sure to fix all errors reported by cargo clippy before creating a pull request to this repository.