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

marejs

v1.1.0

Published

MARE, which stands for **My Awesome Rendering Engine**, is, as the name suggests, a rendering engine, which uses the HTML canvas element.

Downloads

19

Readme

MARE

MARE, which stands for My Awesome Rendering Engine, is, as the name suggests, a rendering engine, which uses the HTML canvas element.

It was made to be used with another project of mine: My LIL CAT, which is a physics engine.

The library is written in ES6 and compiled through Webpack, so if you want to include just look in the lib folder and copy the mare.js in your libraries folder and add it to your index.html, or copy the source files and require them in your entry.

If you want to contribute it wuold be lovely, so don't hesitate to contact me or fork this repository!

Note that I have two different webpack configurations: one for when you want to build the demo app that is included, and one for when you want to update the library.

Run npm run dev:app to start building the app, and npm run dev:lib to just compile the library source.

Usage


To install this library, run the command npm install marejs and, once that completes, you'll be able to require it in your code:

const { Canvas } = require('marejs')

At this point you'll be able to create new canvases and draw onto them. Here is an example:

const { Canvas } = require('marejs')

// Create a 600 by 600 px canvas
let canvas = new Canvas(600, 600)

// Set a background color
canvas.background(51)

// Draw a rectangle at the point (20, 20), and make it 100 by 100 px
canvas.rect(20, 20, 100, 100)

Check out the wiki section of the github repo to learn how to use it!

Also, this package goes really well with another package, currently in development, which is My lil' cat, which is a physics engine, which uses this as its renderer.

As a conclusion I'd like to thank Elisa (Cat O' Mine) Quagliaroli for being a great friend and giving me an idea for the name of the two libraries. She really is an amazing person, and I am grateful to her.