🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

p5ex

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p5ex

An extension of p5.js.

latest
Source
npmnpm
Version
0.5.7
Version published
Maintainers
1
Created
Source

p5ex.js

An extension of p5.js.

Usage

Install

npm install p5ex --save

Load

Both ES6 module and UMD (and also their minified versions) are available. Note: p5.js must be loaded before loading p5ex.

// Example: loading in ES6 or TypeScript

import * as p5ex from 'p5ex';
<!-- Example: loading in HTML -->
<!-- This will define a new namespace 'p5ex' in the global namespace. -->

<script src="(your directory path)/p5ex.min.js"></script>

Create

Create a p5ex instance by new p5exClass(); instead of new p5();.
For details, refer to documents about instance mode of p5.js.

new p5ex.p5exClass([sketch[, node[, sync]]]);
// or
new p5ex.p5exClass([sketch[, sync]]);

// sketch function:
sketch(p5exInstance);

// node: any HTMLElement or its ID attribute
// sync: boolean

Reference

See doc/index.html (very rough for now)

FAQs

Package last updated on 07 Sep 2018

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