Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

craters

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

craters

A Compact Game Engine that helps you build fast, modern HTML5 Games

  • 1.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Craters.js

npm bundle size es modules

craters logo craters documentation

Short description

A Compact html5 Game Engine that helps you build fast, modern HTML5 Games

Features ✨
Rigid Body Physics.
  • QuadTrees Spatial Subdivision

    • Broadphase collision detection
  • Separating Axis Theorem

    • Narrow phase collision detection
Tile Engine
  • Sprite system
    • Renders animated images and solid color.
Additional features
  • Emscript6 modules
    • Reduces your package size
Additional Modules
  • Assets module

    • Loads images, Audio and json files.
  • Input module

    • Captures keyboard input
  • Sound module

    • Creates instances of audio files a fork of Soundbox.js

Installation

  • Clone git repository
git clone https://github.com/swashvirus/craters.git
  • Npm package
npm install craters
Let's make a game 🚀

example games are included in the examples and test directory

Writing an example "it's working" game.
import {Game, Vector} from '../../craters/craters'
class mygame extends Game {
    constructor() {
        super({
	        fps: 60,
	        container: '#container',
	        size: new Vector(1024, 512)
        });
    }

    render() {
        super.render();
		// draw some text on the screen
        this.context.fillStyle = "#fff";
        this.context.font = '2em Arial'
        this.context.fillText('It\'s working.️', 65, (this.state.size.y / 2), (this.state.size.x))
    }
}
let game = new mygame();

Submit Issues, fixes and Contributions.

Keywords

FAQs

Package last updated on 20 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc