Density 3

Quick. Efficient. TypeScript.

GitHub

Density 3

The next generation of Density is almost here!

Gone is the old slow and junky JS library. Welcome to Density 3.

So whats new anyway?

  • Density has been rewritten in TypeScript
  • Improved Performance
  • Renamed Drawables to Entities to avoid confusion
  • Better support for Custom Entities
  • Instancing support replacing the legacy Cluster-Renderer system
  • Removed opacity default entity property
  • Added setting to change between Manual rendering and rendering on requestAnimationFrame | FrameMode.Manual and FrameMode.Browser
  • Added setting to toggle culling on and off. Might improve performance in some cases
  • Complete webpack support
  • Default entities have been moved to their own script in order to reduce library size when compiled
  • Removed the circle Default Entity
import Density, { Vec2 } from "Density";
import {Text, TextProps} from "Density/DefaultEntities";
const renderer:Density = new Density();
renderer.draw(new Text(<TextProps>{pos: new Vec2(0,0), scale: new Vec2(100, 100), text: "Hello World!"}));