Skip to content

Nightre/Rapid.js

Repository files navigation

Rapid.js

A highly efficient (stress-test) and lightweight WebGL-based 2D rendering engine focused on rendering capabilities.

Features

  • Fast Rendering
  • TileMap - YSort, isometric 🗺️
  • Light Shadow 💡
  • Particle 🎆
  • Camera 🎥
  • Graphics Drawing ✏️
  • Text Rendering 📝
  • Line Drawing - line texture 〰️
  • Custom Shaders 🎨
  • Mask 🎭
  • Frame Buffer Object 🖼️

Performance Testing

32x32 Texture Sprites 60FPS

  • Intel® Iris® Xe Graphics : 42K sprites

Install

npm i rapid-render

Or via CDN:

<script src="https://unpkg.com/rapid-render/dist/rapid.umd.cjs"></script>

Quick Start

import { Rapid, Color, Vec2 } from "rapid-render"

// Initialize
const rapid = new Rapid({
    canvas: document.getElementById("gameCanvas"),
    backgroundColor: Color.fromHex("E6F0FF")
})

// Render example
rapid.render(() => {
    rapid.renderRect({ 
        offset: new Vec2(100, 100), 
        width: 50, 
        height: 50, 
        color: Color.Red 
    })
})

For more examples and detailed documentation, visit our website.

Roadmap

  • 9-slice 🚧 (In Progress)
  • Nodejs Support

Contributing

Issues and PRs are welcome!

Screen shot

1 2 3 4