npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aura-2d

v0.15.5

Published

Aura2D is a general purpose TypeScript/WebGL game engine designed to facilitate the swift implementation of 2D browser games. It is the domain-specific 2D variant of [Aura](https://github.com/optionallychained/Aura), providing a swathe of utility, from st

Downloads

9

Readme

Aura2D

Aura2D is a general purpose TypeScript/WebGL game engine designed to facilitate the swift implementation of 2D browser games. It is the domain-specific 2D variant of Aura, providing a swathe of utility, from standard geometries to generally-useful shaders to common game object components and systems.

Built according to the Entity-Component-System architecture with applications broken up into distinct states, Aura2D aims to enable a compartmentalised development approach, supporting developments of varying complexity with focus on getting prototypes off the ground fast.

While functional, Aura2D is very much a work-in-progress, made purely for fun and self-education.

Documentation

(Under Construction) Aura Documentation

Getting Started

Quickstart

For getting up and running with Aura2D fast with recommended configurations and example applications, see the Aura2D template repository.

NPM

  • npm i --save aura-2d

It's recommended to write Aura2D applications in TypeScript and build with Webpack - though regular JS and other bundlers should work.

CDN

<script src="https://unpkg.com/aura-2d/_min/aura.2d.min.js"></script>

The minified Aura2D provides the library Aura2D. For example:

<!DOCTYPE html>
<html>
    <body>
        <script src="https://unpkg.com/aura-2d/_min/aura.2d.min.js"></script>

        <script>
            const { Game, State, Vec2 } = Aura2D;

            const game = new Game({ canvasDimensions: new Vec2(1024, 768) });

            game.addState(new State({ name: 'example', init: () => console.log('Aura2D'), tick: () => {} }));

            game.start('example');
        </script>
    </body>
</html>

Note for Text Rendering

Currently, for text rendering, Aura2D will require a res/font.png situated next to the application entry script. This is a uniform, one-dimensional texture atlas of characters for sampling onto in-game text.

Aura configures a default charset matching the example font found in the Aura repository; for now, this should be copied into Aura projects (or an alternative atlas configured on the Game).

This is naturally subject to change with an upcoming overhaul to texture management and text rendering.