// This file was auto-generated. Please do not edit it.
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
export = p5;
declare class p5 {
/**
* This is the p5 instance constructor. A p5 instance
* holds all the properties and methods related to a
* p5 sketch. It expects an incoming sketch closure
* and it can also take an optional node parameter
* for attaching the generated p5 canvas to a node.
* The sketch closure takes the newly created p5
* instance as its sole argument and may optionally
* set preload(), setup(), and/or draw() properties
* on it for running a sketch.
*
* A p5 sketch can run in "global" or "instance"
* mode: "global" - all properties and methods are
* attached to the window "instance" - all properties
* and methods are bound to this p5 object
*
* @param sketch a closure that can set optional
* preload(), setup(), and/or draw() properties on
* the given p5 instance
* @param [node] element to attach canvas to
* @return a p5 instance
*/
constructor(sketch: (...args: any[]) => any, node?: HTMLElement);
/**
* Called directly before setup(), the preload()
* function is used to handle asynchronous loading of
* external files in a blocking way. If a preload
* function is defined, setup() will wait until any
* load calls within have finished. Nothing besides
* load calls (loadImage, loadJSON, loadFont,
* loadStrings, etc.) should be inside the preload
* function. If asynchronous loading is preferred,
* the load methods can instead be called in setup()
* or anywhere else with the use of a callback
* parameter. By default the text "loading..." will
* be displayed. To make your own loading page,
* include an HTML element with id "p5_loading" in
* your page. More information here.
*/
preload(): void;
/**
* The setup() function is called once when the
* program starts. It's used to define initial
* environment properties such as screen size and
* background color and to load media such as images
* and fonts as the program starts. There can only be
* one setup() function for each program and it
* shouldn't be called again after its initial
* execution. Note: Variables declared within setup()
* are not accessible within other functions,
* including draw().
*/
setup(): void;
/**
* Called directly after setup(), the draw() function
* continuously executes the lines of code contained
* inside its block until the program is stopped or
* noLoop() is called. Note if noLoop() is called in
* setup(), draw() will still be executed once before
* stopping. draw() is called automatically and
* should never be called explicitly. It should
* always be controlled with noLoop(), redraw() and
* loop(). After noLoop() stops the code in draw()
* from executing, redraw() causes the code inside
* draw() to execute once, and loop() will cause the
* code inside draw() to resume executing
* continuously.
*
* The number of times draw() executes in each second
* may be controlled with the frameRate() function.
*
* There can only be one draw() function for each
* sketch, and draw() must exist if you want the code
* to run continuously, or to process events such as
* mousePressed(). Sometimes, you might have an empty
* call to draw() in your program, as shown in the
* above example.
*
* It is important to note that the drawing
* coordinate system will be reset at the beginning
* of each draw() call. If any transformations are
* performed within draw() (ex: scale, rotate,
* translate), their effects will be undone at the
* beginning of draw(), so transformations will not
* accumulate over time. On the other hand, styling
* applied (ex: fill, stroke, etc) will remain in
* effect.
*/
draw(): void;
/**
* Removes the entire p5 sketch. This will remove the
* canvas and any elements created by p5.js. It will
* also stop the draw loop and unbind any properties
* or methods from the window global scope. It will
* leave a variable p5 in case you wanted to create a
* new p5 sketch. If you like, you can set p5 = null
* to erase it. While all functions and variables and
* objects created by the p5 library will be removed,
* any other global variables created by your code
* will remain.
*/
remove(): void;
/**
* Turn off some features of the friendly error
* system (FES), which can give a significant boost
* to performance when needed. Note that this will
* disable the parts of the FES that cause
* performance slowdown (like argument checking).
* Friendly errors that have no performance cost
* (like giving a descriptive error if a file load
* fails, or warning you if you try to override p5.js
* functions in the global space), will remain in
* place.
*
* See disabling the friendly error system.
*/
disableFriendlyErrors: boolean;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface p5 extends p5.p5InstanceExtensions {}
declare namespace p5 {
type UNKNOWN_P5_CONSTANT = any;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface p5InstanceExtensions {}
}