0.2.1 • Published 7 years ago

sabertooth v0.2.1

Weekly downloads
11
License
ISC
Repository
github
Last release
7 years ago

Sabertooth

A hardware accelerated user interface framework for JavaScript.

Sabertooth is inspired by QT, uses super-fast PIXI.js under-the-hood and renders in webGL with canvas fallback. Widgets are extensions of PIXI.Container and therefor most of those properties, such as tint, alpha, blending modes and filters(shaders) apply. Custom widgets and custom styling are easily accomplished by sub-classing existing widgets and modifying or creating new style sheets.

This project aims to be a full-fledged user interface framework for games, editors and other creative projects. A limited set of widgets and layouts are implemented and it may undergo some big changes before the first major release. See examples and stay up-to-date on what classes are available by viewing the docs.

Build Status Inline docs


Get Started

The easiest way to get started with Sabertooth is to download the latest release.

Example:

<script src="Sabertooth.min.js"></script>
<script>
    let app = new ST.App(/*options*/);

    let tb = new ST.Widgets.TextButton(app.root, {
        text: 'My Button',
        x: 100,
        y: 100,
        width: 200,
        height: 30,
    });

    // Set a click callback
    tb.on('click', ()=>{
        console.log('My Button Was Clicked!');
    });

    //main loop
    let main = function () {
        app.update(); // Update UI logic
        requestAnimationFrame(main); // Loop
    }

    main(); // Begin the main application loop
</script>

Install with npm:

 $> npm install Sabertooth

Example:

import * as ST from 'sabertooth'; // for es6 modules

let app = new ST.App(/*options*/);

let tb = new ST.Widgets.TextButton(app.root, {
    text: 'My Button',
    x: 100,
    y: 100,
    width: 200,
    height: 30,
});

// Set a click callback
tb.on('click', ()=>{
    console.log('My Button Was Clicked!');
});

//main loop
let main = function () {
    app.update(); // Update UI logic
    requestAnimationFrame(main); // Loop
}

main(); // Begin the main application loop

Test

gulp test

To build locally:

  • Fork Sabertooth
  • Clone
  • CD to the project directory
  • Install dependencies:
npm install

Build:

gulp

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the ISC license. See LICENSE.md for more details.

Acknowledgements

Special thanks to:

Questions?

Please contact AbydosDigital@gmail.com with any further questions.

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago