Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.3 KB

File metadata and controls

59 lines (40 loc) · 1.3 KB

q5.ts

This project is an TypeScript implementation of the q5xjs project.

Installation

npm i q5xts

Usage

import { Q5 } from 'q5xts';

export class Drawing extends Q5 {
  constructor(
    scope: 'global' | 'offscreen' | '',
    elm: HTMLElement,

  ) {
    super(scope, elm);
    this.setup = () => {
        console.log('setup function here')
        this.frameRate(60);
    };

    this.draw = () => {
        console.log('draw function here')
        this.rect(0,0,100,100)
    };
  }
}

Limitations

Currently this package does not provide the full usage of the original q5xjs package. Here we focus on utilizing it in a specified element scope and not the global scope.

This package is a work in progress and should include the capabilities of the original project later on

Docs

Refer to the original website or the original github repo

Sandbox

You can view the sandbox environment here: https://dchicchon.github.io/q5xts/

Example Projects

Links