Giter Site home page Giter Site logo

flow-ts's Introduction

๐ŸŒŠ Flow

A Flexbox layouting engine for Lua

CI Wally

About

Flow aims to be a high-performance Flexbox layout engine that adheres closely to the Flexbox specification. It is based on Meta's Yoga library. For more details, refer to the Acknowledgements section.

Testing

Adding Tests

Flow generates many of its tests automatically from HTML fixtures. These fixtures describe the node structure and are rendered in Chrome to get expected layout outcomes. To add new fixtures, place them in the scripts/gentest/fixtures directory.

<div id="my_test" style="width: 100px; height: 100px; align-items: center;">
  <div style="width: 50px; height: 50px;"></div>
</div>

To generate new tests:

  1. Navigate to the scripts/gentest directory and run npm install to set up the test generator.
  2. Execute node index.js in the same directory.

Running Tests

Roblox Studio is required to execute Flow's benchmarks unit tests. See this issue for more details.

To run tests in Roblox Studio:

  1. Use just install-packages to set up required packages.
  2. Build the project via rojo build --output Flow.rbxl.
  3. Open the generated Roblox file and toggle the RunBench or RunTests scripts as needed (found under ServerScriptService).
  4. Run the game and the results will be printed to the output.

Benchmarks

TODO: Add benchmarks here

Acknowledgements

Flow is a Lua adaptation of Typeflex, a Typescript port of Yoga. It also incorporates some work by Roblox for Flexbox exploration in Lua.

As time goes on, it's likely Flow will deviate from Typeflex and align more closely with upstream Yoga. See this issue for more details.

flow-ts's People

Contributors

grilme99 avatar metrowaii avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.