degu
v0.0.303
Published
A general utility library for interactive websites, with a focus on performance.
Downloads
7
Readme
degu
A general utility library for interactive websites, with a focus on performance.
Motivation
degu is an interactive developer toolbox. It is not the next buzzword-filled, huge component library with ready-made UI solutions (such as modals, carousels, etc.) but it aims to provide the "hammer and nails" needed to build highly-interactive, performant, kickass websites.
Installation
npm install resize-observer-polyfill --save-dev
npm install intersection-observer --save-dev
npm install degu@latest --save-dev
Include resize-observer-polyfill
and intersection-observer
polyfill:
import '../../node_modules/intersection-observer/intersection-observer.js';
import ResizeObserver from 'resize-observer-polyfill';
window['ResizeObserver'] = ResizeObserver;
/* ... insert code that depends on degu ... */
Getting started
- Read the API docs
- Explore the examples folder
Import the library:
import {WebWorker} from 'degu';
const worker = new WebWorker((params)=> {
return params.a * params.b;
})
worker.run({a: 5, b: 2}).then((result)=> {
console.log(result); // 10
})
Import specific files:
import { mathf } from 'degu/lib/mathf/mathf/'
import { is } from 'degu/lib/is/is/'
import { dom } from 'degu/lib/dom/dom/'
ThreeJS deps
Classes under threef
require three.js deps. Currently supports r110.
npm install --save-dev [email protected]
npm install --save-dev @types/[email protected]
Browser compatibility
degu supports only "evergreen" browsers back to the latest two versions:
- Chrome
- Edge (Chromium version)
- Firefox
- Safari
Contributing
Please read CONTRIBUTING.md on how to develop for degu.
License
Please read LICENSE.md