https://github.com/bigasdev/tiny-bigas
my npm package to work with canvas on electron-js
https://github.com/bigasdev/tiny-bigas
Last synced: 4 months ago
JSON representation
my npm package to work with canvas on electron-js
- Host: GitHub
- URL: https://github.com/bigasdev/tiny-bigas
- Owner: bigasdev
- License: mit
- Created: 2022-08-04T19:39:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T13:24:49.000Z (almost 3 years ago)
- Last Synced: 2024-12-29T07:43:24.868Z (5 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiny-bigas
Package created to help with adding pixel-art elements and buttons to my electron.js development.
It uses the canvas html element to display stuff in the screen, and with stuff such as a update() function we can add callbacks to everything.
# How to install
```
npm i tiny-bigas
```# How to use
```js
const tinyBigas = require('tiny-bigas');
const render = require('./node_modules/tiny-bigas/bigasrender.js');// And then, inside the preload.js
window.addEventListener('DOMContentLoaded', () => {
tinyBigas.exports.addButton(new tinyBigas.Button("Test", 5, [150,0], ()=>{
console.log("I'm a button!");
}));render.exports.main();
render.exports.initialize();
});
```