Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lanfei/playable.js
A lightweight HTML5 game engine.
https://github.com/lanfei/playable.js
canvas game-engine html5 playable
Last synced: 5 days ago
JSON representation
A lightweight HTML5 game engine.
- Host: GitHub
- URL: https://github.com/lanfei/playable.js
- Owner: Lanfei
- License: mit
- Created: 2015-03-02T08:15:51.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T06:51:05.000Z (2 months ago)
- Last Synced: 2025-02-05T04:33:09.302Z (7 days ago)
- Topics: canvas, game-engine, html5, playable
- Language: TypeScript
- Homepage: http://lanfei.github.io/playable.js/
- Size: 6.55 MB
- Stars: 17
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# playable.js
[![Build Status][build-image]][build-url]
[![Coverage Status][coverage-image]][coverage-url]
[![Version][version-image]][version-url]
[![License][license-image]][license-url]A lightweight HTML5 game engine.
## Installation
### Webpack/Browserify
```bash
npm install playable.js
```### Direct `` Include
Simply [download](https://github.com/Lanfei/playable.js/releases) and include with a script tag. `playable` will be registered as a global variable.
### CDN
For prototyping or learning purposes, you can use the latest version with:
```html
<script src="https://cdn.jsdelivr.net/npm/playable.js">
```For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:
```html
```
You can browse the source of the NPM package at [jsDelivr](https://cdn.jsdelivr.net/npm/playable.js/) or [unpkg](https://unpkg.com/playable.js/).
## Hello World
### JavaScript
```js
let stage = new playable.Stage();
let text = new playable.Text('Hello playable.js');
stage.addChild(text);
```[Try it on CodePen](https://codepen.io/Lanfei/pen/WPzBLW/left/?editors=0010)
### TypeScript(Recommended)
```typescript
class Main extends playable.Stage {
public constructor() {
super();
let text = new playable.Text('Hello playable.js');
this.addChild(text);
}
}new Main();
```[Try it on CodePen](https://codepen.io/Lanfei/pen/qgoeZg/left/?editors=0010)
## Documentation
- [Guide](https://lanfei.github.io/playable.js/)
- [Examples](https://lanfei.github.io/playable.js/examples/)
- [API Reference](https://lanfei.github.io/playable.js/docs/)[build-url]: https://circleci.com/gh/Lanfei/playable.js
[build-image]: https://img.shields.io/circleci/project/github/Lanfei/playable.js.svg
[coverage-url]: https://coveralls.io/github/Lanfei/playable.js
[coverage-image]: https://coveralls.io/repos/github/Lanfei/playable.js/badge.svg
[version-url]: https://npmjs.org/package/playable.js
[version-image]: https://img.shields.io/npm/v/playable.js.svg
[license-url]: https://github.com/Lanfei/playable.js/blob/master/LICENSE
[license-image]: https://img.shields.io/npm/l/playable.js.svg