From 812aa0e4fa49cd94e688a165ede337f3c77e5b41 Mon Sep 17 00:00:00 2001
From: Reshma R The web is much more than just canvas and the DOM functionality makes it easy to interact\nwith other HTML5 objects, including text, hyperlink, image, input, video,\naudio, and webcam.\nThere is a set of creation methods, DOM manipulation methods, and\nan extended p5.Element that supports a range of HTML elements. See the\n\nbeyond the canvas tutorial for a full overview of how this addon works. See tutorial: beyond the canvas\nfor more info on how to use this library. A class to describe a drawing surface that's separate from the main canvas. Each Note: createGraphics() is the recommended\nway to create an instance of this class. This is the p5 instance constructor. A p5 instance holds all the properties and methods related to\na p5 sketch. It expects an incoming sketch closure and it can also\ntake an optional node parameter for attaching the generated p5 canvas\nto a node. The sketch closure takes the newly created p5 instance as\nits sole argument and may optionally set preload(),\nsetup(), and/or\ndraw() properties on it for running a sketch. A p5 sketch can run in \"global\" or \"instance\" mode:\n\"global\" - all properties and methods are attached to the window\n\"instance\" - all properties and methods are bound to this p5 object A class to describe a Quaternion\nfor vector rotations in the p5js webgl renderer.\nPlease refer the following link for details on the implementation\nhttps://danceswithcode.net/engineeringnotes/quaternions/quaternions.html p5.sound extends p5 with Web Audio functionality including audio input,\nplayback, analysis and synthesis.\n p5.sound is on GitHub.\nDownload the latest version\nhere. This is the p5 instance constructor. A p5 instance holds all the properties and methods related to\na p5 sketch. It expects an incoming sketch closure and it can also\ntake an optional node parameter for attaching the generated p5 canvas\nto a node. The sketch closure takes the newly created p5 instance as\nits sole argument and may optionally set preload(),\nsetup(), and/or\ndraw() properties on it for running a sketch. A p5 sketch can run in \"global\" or \"instance\" mode:\n\"global\" - all properties and methods are attached to the window\n\"instance\" - all properties and methods are bound to this p5 object A class to describe a color. Each Color is stored internally as an array of ideal RGBA values in floating\npoint form, normalized from 0 to 1. These values are used to calculate the\nclosest screen colors, which are RGBA levels from 0 to 255. Screen colors\nare sent to the renderer. When different color representations are calculated, the results are cached\nfor performance. These values are normalized, floating-point numbers. Note: color() is the recommended way to create an\ninstance of this class. A class to describe an\nHTML element. Sketches can use many elements. Common elements include the drawing canvas,\nbuttons, sliders, webcam feeds, and so on. All elements share the methods of the A class to describe a drawing surface that's separate from the main canvas. Each Note: createGraphics() is the recommended\nway to create an instance of this class. Main graphics and rendering context, as well as the base API\nimplementation for p5.js \"core\". To be used as the superclass for\nRenderer2D and Renderer3D classes, respectively. Base class for all p5.Dictionary types. Specifically\n typed Dictionary classes inherit from this class. A simple Dictionary class for Strings. A simple Dictionary class for Numbers. A class to handle audio and video. A class to describe a file. A class to describe an image. Images are rectangular grids of pixels that can be displayed and modified. Existing images can be loaded by calling\nloadImage(). Blank images can be created by\ncalling createImage(). A class to describe a print stream. Each Note: createWriter() is the recommended way\nto make an instance of this class. Table objects store data with multiple rows and columns, much\nlike in a traditional spreadsheet. Tables can be generated from\nscratch, dynamically, or using data from an existing file. A TableRow object represents a single row of data values,\nstored in columns, from a table. A Table Row contains both an ordered array, and an unordered\nJSON object. A class to describe an XML object. Each Note: Use loadXML() to load external XML files. A class to describe a two or three-dimensional vector. A vector can be thought of in different ways. In one view, a vector is like\nan arrow pointing in space. Vectors have both magnitude (length) and\ndirection. Note: createVector() is the recommended way\nto make an instance of this class. A class to describe fonts. A class to describe a camera for viewing a 3D sketch. Each In WebGL mode, the default camera is a Note: A class to describe a high-performance drawing surface for textures. Each Note: createFramebuffer() is the\nrecommended way to create an instance of this class. A class to describe a 3D shape. Each The first parameter, The second parameter, The third parameter, A class to describe a shader program. Each A shader program consists of two files, a vertex shader and a fragment\nshader. The vertex shader affects where 3D geometry is drawn on the screen\nand the fragment shader affects color. Once the A shader can optionally describe hooks, which are functions in GLSL that\nusers may choose to provide to customize the behavior of the shader. For the\nvertex or the fragment shader, users can pass in an object where each key is\nthe type and name of a hook function, and each value is a string with the\nparameter list and default implementation of the hook. For example, to let users\noptionally run code at the start of the vertex shader, the options object could\ninclude: Then, in your vertex shader source, you can run a hook by calling a function\nwith the same name prefixed by Note: createShader(),\ncreateFilterShader(), and\nloadShader() are the recommended ways to\ncreate an instance of this class. SoundFile object with a path to a file. The p5.SoundFile may not be available immediately because\nit loads the file information asynchronously. To do something with the sound as soon as it loads\npass the name of a function as the second parameter. Only one file path is required. However, audio file formats\n(i.e. mp3, ogg, wav and m4a/aac) are not supported by all\nweb browsers. If you want to ensure compatability, instead of a single\nfile path, you may include an Array of filepaths, and the browser will\nchoose a format that works. Amplitude measures volume between 0.0 and 1.0.\nListens to all p5sound by default, or use setInput()\nto listen to a specific sound source. Accepts an optional\nsmoothing value, which defaults to 0. FFT (Fast Fourier Transform) is an analysis algorithm that\nisolates individual\n\naudio frequencies within a waveform. Once instantiated, a p5.FFT object can return an array based on\ntwo types of analyses: FFT analyzes a very short snapshot of sound called a sample\nbuffer. It returns an array of amplitude measurements, referred\nto as Creates a signal that oscillates between -1.0 and 1.0.\nBy default, the oscillation takes the form of a sinusoidal\nshape ('sine'). Additional types include 'triangle',\n'sawtooth' and 'square'. The frequency defaults to\n440 oscillations per second (440Hz, equal to the pitch of an\n'A' note). Set the type of oscillation with setType(), or by instantiating a\nspecific oscillator: p5.SinOsc, p5.TriOsc, p5.SqrOsc, or p5.SawOsc.\n Constructor: Constructor: Constructor: Constructor: Envelopes are pre-defined amplitude distribution over time.\nTypically, envelopes are used to control the output volume\nof an object, a series of fades referred to as Attack, Decay,\nSustain and Release (\nADSR\n). Envelopes can also control other Web Audio Parameters—for example, a p5.Envelope can\ncontrol an Oscillator's frequency like this: Use Use the Noise is a type of oscillator that generates a buffer with random values. Creates a Pulse object, an oscillator that implements\nPulse Width Modulation.\nThe pulse is created with two oscillators.\nAccepts a parameter for frequency, and to set the\nwidth between the pulses. See \n Get audio from an input, i.e. your computer's microphone. Turn the mic on/off with the start() and stop() methods. When the mic\nis on, its volume can be measured with getLevel or by connecting an\nFFT object. If you want to hear the AudioIn, use the .connect() method.\nAudioIn does not connect to p5.sound output by default to prevent\nfeedback. Note: This uses the getUserMedia/\nStream API, which is not supported by certain browsers. Access in Chrome browser\nis limited to localhost and https, but access over http may be limited. Effect is a base class for audio effects in p5. This class is extended by p5.Distortion,\np5.Compressor,\np5.Delay,\np5.Filter,\np5.Reverb. A p5.Filter uses a Web Audio Biquad Filter to filter\nthe frequency response of an input source. Subclasses\ninclude: The This class extends p5.Effect.\nMethods amp(), chain(),\ndrywet(), connect(), and\ndisconnect() are available. Constructor: Constructor: Constructor: p5.EQ is an audio effect that performs the function of a multiband\naudio equalizer. Equalization is used to adjust the balance of\nfrequency compoenents of an audio signal. This process is commonly used\nin sound production and recording to change the waveform before it reaches\na sound output device. EQ can also be used as an audio effect to create\ninteresting distortions by filtering out parts of the spectrum. p5.EQ is\nbuilt using a chain of Web Audio Biquad Filter Nodes and can be\ninstantiated with 3 or 8 bands. Bands can be added or removed from\nthe EQ by directly modifying p5.EQ.bands (the array that stores filters). This class extends p5.Effect.\nMethods amp(), chain(),\ndrywet(), connect(), and\ndisconnect() are available. Panner3D is based on the \nWeb Audio Spatial Panner Node.\nThis panner is a spatial processing node that allows audio to be positioned\nand oriented in 3D space. The position is relative to an \nAudio Context Listener, which can be accessed\nby Delay is an echo effect. It processes an existing sound source,\nand outputs a delayed version of that sound. The p5.Delay can\nproduce different effects depending on the delayTime, feedback,\nfilter, and type. In the example below, a feedback of 0.5 (the\ndefault value) will produce a looping delay that decreases in\nvolume by 50% each repeat. A filter will cut out the high\nfrequencies so that the delay does not sound as piercing as the\noriginal source. This class extends p5.Effect.\nMethods amp(), chain(),\ndrywet(), connect(), and\ndisconnect() are available. Reverb adds depth to a sound through a large number of decaying\nechoes. It creates the perception that sound is occurring in a\nphysical space. The p5.Reverb has parameters for Time (how long does the\nreverb last) and decayRate (how much the sound decays with each echo)\nthat can be set with the .set() or .process() methods. The p5.Convolver\nextends p5.Reverb allowing you to recreate the sound of actual physical\nspaces through convolution. This class extends p5.Effect.\nMethods amp(), chain(),\ndrywet(), connect(), and\ndisconnect() are available. p5.Convolver extends p5.Reverb. It can emulate the sound of real\nphysical spaces through a process called \nconvolution. Convolution multiplies any audio input by an \"impulse response\"\nto simulate the dispersion of sound over time. The impulse response is\ngenerated from an audio file that you provide. One way to\ngenerate an impulse response is to pop a balloon in a reverberant space\nand record the echo. Convolution can also be used to experiment with\nsound. Use the method A phrase is a pattern of musical events over time, i.e.\na series of notes and rests. Phrases must be added to a p5.Part for playback, and\neach part can play multiple phrases at the same time.\nFor example, one Phrase might be a kick drum, another\ncould be a snare, and another could be the bassline. The first parameter is a name so that the phrase can be\nmodified or deleted later. The callback is a a function that\nthis phrase will call at every step—for example it might be\ncalled A p5.Part plays back one or more p5.Phrases. Instantiate a part\nwith steps and tatums. By default, each step represents a 1/16th note. See p5.Phrase for more about musical timing. A Score consists of a series of Parts. The parts will\nbe played back in order. For example, you could have an\nA part, a B part, and a C part, and play them back in this order\n SoundLoop Compressor is an audio effect class that performs dynamics compression\non an audio input source. This is a very commonly used technique in music\nand sound production. Compression creates an overall louder, richer,\nand fuller sound by lowering the volume of louds and raising that of softs.\nCompression can be used to avoid clipping (sound distortion due to\npeaks in volume) and is especially useful when many sounds are played\nat once. Compression can be used on indivudal sound sources in addition\nto the main output. This class extends p5.Effect.\nMethods amp(), chain(),\ndrywet(), connect(), and\ndisconnect() are available. PeakDetect works in conjunction with p5.FFT to\nlook for onsets in some or all of the frequency spectrum.\n \nTo use p5.PeakDetect, call \nYou can listen for a specific part of the frequency spectrum by\nsetting the range between \nThe update method is meant to be run in the draw loop, and\nframes determines how many loops must pass before\nanother peak can be detected.\nFor example, if the frameRate() = 60, you could detect the beat of a\n120 beat-per-minute song with this equation:\n \nBased on example contribtued by @b2renger, and a simple beat detection\nexplanation by Felix Turner.\n Record sounds for playback and/or to save as a .wav file.\nThe p5.SoundRecorder records all sound output from your sketch,\nor can be assigned a specific source with setInput(). The record() method accepts a p5.SoundFile as a parameter.\nWhen playback is stopped (either after the given amount of time,\nor with the stop() method), the p5.SoundRecorder will send its\nrecording to that p5.SoundFile for playback. A Distortion effect created with a Waveshaper Node,\nwith an approach adapted from\nKevin Ennis This class extends p5.Effect.\nMethods amp(), chain(),\ndrywet(), connect(), and\ndisconnect() are available. A gain node is usefull to set the relative volume of sound.\nIt's typically used to build mixers. Base class for monophonic synthesizers. Any extensions of this class\nshould follow the API and implement the methods below in order to\nremain compatible with p5.PolySynth(); A MonoSynth is used as a single voice for sound synthesis.\nThis is a class to be used in conjunction with the PolySynth\nclass. Custom synthetisers should be built inheriting from\nthis class. Listen for onsets (a sharp increase in volume) within a given\nfrequency range. An AudioVoice is used as a single voice for sound synthesis.\nThe PolySynth class holds an array of AudioVoice, and deals\nwith voices allocations, with setting notes to be played, and\nparameters to be set. Creates a screen reader-accessible description of the canvas. The first parameter, The second parameter, Read\nWriting accessible canvas descriptions\nto learn more about making sketches accessible. Creates a screen reader-accessible description of elements in the canvas. Elements are shapes or groups of shapes that create meaning together. For\nexample, a few overlapping circles could make an \"eye\" element. The first parameter, The second parameter, The third parameter, Read\nWriting accessible canvas descriptions\nto learn more about making sketches accessible. Creates a screen reader-accessible description of shapes on the canvas. A list of shapes follows the general description. The list describes the\ncolor, location, and area of each shape. For example,\n The Read\nWriting accessible canvas descriptions\nto learn more about making sketches accessible. Creates a screen reader-accessible description of shapes on the canvas. A list of shapes follows the table. The list describes the color, type,\nlocation, and area of each shape. For example,\n The Read\nWriting accessible canvas descriptions\nto learn more about making sketches accessible. Conversions adapted from http://www.easyrgb.com/en/math.php. In these functions, hue is always in the range [0, 1], just like all other\ncomponents are in the range [0, 1]. 'Brightness' and 'value' are used\ninterchangeably. Convert an HSBA array to HSLA. Convert an HSBA array to RGBA. Convert an HSLA array to HSBA. Convert an HSLA array to RGBA. We need to change basis from HSLA to something that can be more easily be\nprojected onto RGBA. We will choose hue and brightness as our first two\ncomponents, and pick a convenient third one ('zest') so that we don't need\nto calculate formal HSBA saturation. Convert an RGBA array to HSBA. Convert an RGBA array to HSLA. Gets the alpha (transparency) value of a color. Gets the blue value of a color. By default, Gets the brightness value of a color. By default, Creates a p5.Color object. By default, the parameters are interpreted as RGB values. Calling\n The version of The version of The version of The version of Gets the green value of a color. By default, Gets the hue value of a color. Hue describes a color's position on the color wheel. By default, Blends two colors to find a third color between them. The The way that colors are interpolated depends on the current\ncolorMode(). Blends multiple colors to find a color between them. The The way that colors are interpolated depends on the current\ncolorMode(). Gets the lightness value of a color. By default, Gets the red value of a color. By default, Gets the saturation value of a color. Saturation is scaled differently in HSB and HSL. By default, CSS named colors. These regular expressions are used to build up the patterns for matching\nviable CSS color strings: fragmenting the regexes in this way increases the\nlegibility and comprehensibility of the code. Note that RGB values of .9 are not parsed by IE, but are supported here for\ncolor string consistency. Full color string patterns. The capture groups are necessary. Returns the color formatted as a Calling The parameter, Sets the red component of a color. The range depends on the colorMode(). In the\ndefault RGB mode it's between 0 and 255. Sets the green component of a color. The range depends on the colorMode(). In the\ndefault RGB mode it's between 0 and 255. Sets the blue component of a color. The range depends on the colorMode(). In the\ndefault RGB mode it's between 0 and 255. Sets the alpha (transparency) value of a color. The range depends on the\ncolorMode(). In the default RGB mode it's\nbetween 0 and 255. Hue is the same in HSB and HSL, but the maximum value may be different.\nThis function will return the HSB-normalized saturation when supplied with\nan HSB color object, but will default to the HSL-normalized saturation\notherwise. Saturation is scaled differently in HSB and HSL. This function will return\nthe HSB saturation when supplied with an HSB color object, but will default\nto the HSL saturation otherwise. For HSB and HSL, interpret the gray level as a brightness/lightness\nvalue (they are equivalent when chroma is zero). For RGB, normalize the\ngray level according to the blue maximum. Starts defining a shape that will mask any shapes drawn afterward. Any shapes drawn between The parameter, Masks can be contained between the\npush() and pop() functions.\nDoing so allows unmasked shapes to be drawn after masked shapes. Masks can also be defined in a callback function that's passed to\nclip(). Ends defining a mask that was started with\nbeginClip(). Defines a shape that will mask any shapes drawn afterward. The first parameter, The second parameter, Masks can be contained between the\npush() and pop() functions.\nDoing so allows unmasked shapes to be drawn after masked shapes. Masks can also be defined with beginClip()\nand endClip(). Sets the color used for the background of the canvas. By default, the background is transparent. The version of The version of The version of Clears the pixels on the canvas. In WebGL mode, this function can clear the screen to a specific color. It\ninterprets four numeric parameters as normalized RGBA color values. It also\nclears the depth buffer. If you are not using the WebGL renderer, these\nparameters will have no effect. Changes the way color values are interpreted. By default, the Calling Calling p5.Color objects remember the mode that they were\ncreated in. Changing modes doesn't affect their appearance. Sets the color used to fill shapes. Calling The version of The version of Disables setting the fill color for shapes. Calling Disables drawing points, lines, and the outlines of shapes. Calling Sets the color used to draw points, lines, and the outlines of shapes. Calling The version of The version of The version of The version of Starts using shapes to erase parts of the canvas. All drawing that follows The The second parameter sets the strength of erasing by the shape's edge. A\nvalue of 0 means that no erasing will occur. A value of 255 means that the\nshape's edge will fully erase the content underneath. The default value is\n255 (full strength). To cancel the erasing effect, use the noErase()\nfunction. Ends erasing that was started with erase(). The fill(), stroke(), and\nblendMode() settings will return to what they\nwere prior to calling erase(). Prints out all the colors in the color pallete with white text.\nFor color blindness testing. This function does 3 things: Bounds the desired start/stop angles for an arc (in radians) so that: This means that the arc rendering functions don't have to be concerned\nwith what happens if stop is smaller than start, or if the arc 'goes\nround more than once', etc.: they can just start at start and increase\nuntil stop and the correct arc will be drawn. Optionally adjusts the angles within each quadrant to counter the naive\nscaling of the underlying ellipse up from the unit circle. Without\nthis, the angles become arbitrary when width != height: 45 degrees\nmight be drawn at 5 degrees on a 'wide' ellipse, or at 85 degrees on\na 'tall' ellipse. Flags up when start and stop correspond to the same place on the\nunderlying ellipse. This is useful if you want to do something special\nthere (like rendering a whole ellipse instead). Draws an arc. An arc is a section of an ellipse defined by the The fifth and sixth parameters, The seventh parameter, The eighth parameter, Draws an ellipse (oval). An ellipse is a round shape defined by the If no height is set, the value of width is used for both the width and\nheight. If a negative height or width is specified, the absolute value is\ntaken. The fifth parameter, Draws a circle. A circle is a round shape defined by the Draws a straight line between two points. A line's default width is one pixel. The version of The version of Draws a single point in space. A point's default width is one pixel. To color a point, use the\nstroke() function. To change its width, use the\nstrokeWeight() function. A point\ncan't be filled, so the fill() function won't\naffect the point's color. The version of The version of The version of Draws a quadrilateral (four-sided shape). Quadrilaterals include rectangles, squares, rhombuses, and trapezoids. The\nfirst pair of parameters The version of The thirteenth and fourteenth parameters are optional. In WebGL mode, they\nset the number of segments used to draw the quadrilateral in the x- and\ny-directions. They're both 2 by default. Draws a rectangle. A rectangle is a four-sided shape defined by the The version of The version of Draws a square. A square is a four-sided shape defined by the The version of The version of Draws a triangle. A triangle is a three-sided shape defined by three points. The\nfirst two parameters specify the triangle's first point Changes where ellipses, circles, and arcs are drawn. By default, the first two parameters of\nellipse(), circle(),\nand arc()\nare the x- and y-coordinates of the shape's center. The next parameters set\nthe shape's width and height. This is the same as calling\n The argument passed to Draws certain features with jagged (aliased) edges. smooth() is active by default. In 2D mode,\n In WebGL mode, Changes where rectangles and squares are drawn. By default, the first two parameters of\nrect() and square(),\nare the x- and y-coordinates of the shape's upper left corner. The next parameters set\nthe shape's width and height. This is the same as calling\n The argument passed to Draws certain features with smooth (antialiased) edges. In WebGL mode, noSmooth() causes all shapes to\nbe drawn with jagged (aliased) edges. The functions don't affect images or\nfonts. Sets the style for rendering the ends of lines. The caps for line endings are either rounded ( The argument passed to Sets the style of the joints that connect line segments. Joints are either mitered ( The argument passed to Sets the width of the stroke used for points, lines, and the outlines of\nshapes. Note: Draws a Bézier curve. Bézier curves can form shapes and curves that slope gently. They're defined\nby two anchor points and two control points. Bézier curves provide more\ncontrol than the spline curves created with the\ncurve() function. The first two parameters, The next four parameters, The seventh and eighth parameters, Bézier curves can also be drawn in 3D using WebGL mode. The 3D version of\n Sets the number of segments used to draw Bézier curves in WebGL mode. In WebGL mode, smooth shapes are drawn using many flat segments. Adding\nmore flat segments makes shapes appear smoother. The parameter, Note: Calculates coordinates along a Bézier curve using interpolation. The first parameter, The second and third parameters, The fourth parameter, The fifth parameter, Calculates coordinates along a line that's tangent to a Bézier curve. Tangent lines skim the surface of a curve. A tangent line's slope equals\nthe curve's slope at the point where it intersects. The first parameter, The second and third parameters, The fourth parameter, The fifth parameter, Draws a curve using a Catmull-Rom spline. Spline curves can form shapes and curves that slope gently. They’re like\ncables that are attached to a set of points. Splines are defined by two\nanchor points and two control points. The first two parameters, The next four parameters, The seventh and eighth parameters, Spline curves can also be drawn in 3D using WebGL mode. The 3D version of\n Sets the number of segments used to draw spline curves in WebGL mode. In WebGL mode, smooth shapes are drawn using many flat segments. Adding\nmore flat segments makes shapes appear smoother. The parameter, Note: Adjusts the way curve() and\ncurveVertex() draw. Spline curves are like cables that are attached to a set of points.\n The parameter, Calculates coordinates along a spline curve using interpolation. The first parameter, The second and third parameters, The fourth parameter, The fifth parameter, Calculates coordinates along a line that's tangent to a spline curve. Tangent lines skim the surface of a curve. A tangent line's slope equals\nthe curve's slope at the point where it intersects. The first parameter, The second and third parameters, The fourth parameter, The fifth parameter, Begins creating a hole within a flat shape. The Transformations such as translate(),\nrotate(), and scale()\ndon't work between Note: The vertices that define a negative space must \"wind\" in the opposite\ndirection from the outer shape. First, draw vertices for the outer shape\nclockwise order. Then, draw vertices for the negative space in\ncounter-clockwise order. Begins adding vertices to a custom shape. The The parameter, After calling Transformations such as translate(),\nrotate(), and\nscale() don't work between Adds a Bézier curve segment to a custom shape. The first four parameters, The fifth and sixth parameters, Bézier curves can also be drawn in 3D using WebGL mode. The 3D version of\n Note: Adds a spline curve segment to a custom shape. Spline curves can form shapes and curves that slope gently. They’re like\ncables that are attached to a set of points. Splines are defined by two\nanchor points and two control points. The code snippet above would only draw the curve between the anchor points,\nsimilar to the curve() function. The segments\nbetween the control and anchor points can be drawn by calling\n The first two parameters, Spline curves can also be drawn in 3D using WebGL mode. The 3D version of\n Note: Stops creating a hole within a flat shape. The beginContour() and Transformations such as translate(),\nrotate(), and scale()\ndon't work between beginContour() and\n Note: The vertices that define a negative space must \"wind\" in the opposite\ndirection from the outer shape. First, draw vertices for the outer shape\nclockwise order. Then, draw vertices for the negative space in\ncounter-clockwise order. Begins adding vertices to a custom shape. The beginShape() and The first parameter, The second parameter, After calling beginShape(), shapes can be\nbuilt by calling vertex(),\nbezierVertex(),\nquadraticVertex(), and/or\ncurveVertex(). Calling\n Transformations such as translate(),\nrotate(), and\nscale() don't work between\nbeginShape() and Adds a quadratic Bézier curve segment to a custom shape. The first two parameters, The last two parameters, Bézier curves can also be drawn in 3D using WebGL mode. The 3D version of\n Note: Adds a vertex to a custom shape. The first two parameters, The third parameter, The fourth and fifth parameters, Sets the normal vector for vertices in a custom 3D shape. 3D shapes created with beginShape() and\nendShape() are made by connecting sets of\npoints called vertices. Each vertex added with\nvertex() has a normal vector that points away\nfrom it. The normal vector controls how light reflects off the shape. The first way to call The second way to call Version of this p5.js. The default, two-dimensional renderer. One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders. To learn more about WEBGL mode, check out all the interactive WEBGL tutorials in the \"Tutorials\" section of this website, or read the wiki article \"Getting started with WebGL in p5\". One of the two possible values of a WebGL canvas (either WEBGL or WEBGL2),\nwhich can be used to determine what capabilities the rendering environment\nhas. A Note: A Note: A Note: A Note: A Note: A By default, functions such as rotate() and\nsin() expect angles measured in units of radians.\nCalling Note: A By default, functions such as rotate() and\nsin() expect angles measured in units of radians.\nCalling Note: HSB (hue, saturation, brightness) is a type of color model.\nYou can learn more about it at\nHSB. AUTO allows us to automatically set the width or height of an element (but not both),\nbased on the current height and width of the element. Only one parameter can\nbe passed to the size function as AUTO, at a time. Displays text in the web browser's console. Note: Call A A A Note: The browser window can only receive input if it's focused. Changes the cursor's appearance. The first parameter, The parameters Sets the number of frames to draw per second. Calling Calling Returns the target frame rate. The value is either the system frame rate or the last value passed to\nframeRate(). Hides the cursor from view. A See setAttributes() for ways to set the\nWebGL version. A Note: The actual screen width can be computed as\n A Note: The actual screen height can be computed as\n A The layout viewport\nis the area within the browser that's available for drawing. A The layout viewport\nis the area within the browser that's available for drawing. A function that's called when the browser window is resized. Code placed in the body of The Called upon each p5 instantiation instead of module import due to the\npossibility of the window being resized when no sketch is active. A A Toggles full-screen mode or returns the current mode. Calling Calling Note: Due to browser restrictions, Sets the pixel density or returns the current density. Computer displays are grids of little lights called pixels. A\ndisplay's pixel density describes how many pixels it packs into an\narea. Displays with smaller pixels have a higher pixel density and create\nsharper images. Calling Returns the display's current pixel density. Returns the sketch's current\nURL\nas a Returns the current\nURL\npath as an For example, consider a sketch hosted at the URL\n Returns the current\nURL parameters\nin an For example, calling This is our i18next \"backend\" plugin. It tries to fetch languages\nfrom a CDN. Set up our translation function, with loaded languages Returns a list of languages we have translations loaded for Returns the current language selected for translation Sets the current language for translation\nReturns a promise that resolved when loading is finished,\nor rejects if it fails. A function that's called once to load assets before the sketch runs. Declaring the function Functions such as loadImage(),\nloadFont(),\nloadJSON(), and\nloadModel() are guaranteed to either\nfinish loading or raise an error if they're called within A function that's called once when the sketch begins running. Declaring the function Code placed in Note: A function that's called repeatedly while the sketch runs. Declaring the function This is often called the \"draw loop\" because p5.js calls the code in\n Code placed within Removes the sketch from the web page. Calling Turns off the parts of the Friendly Error System (FES) that impact performance. The FES\ncan cause sketches to draw slowly because it does extra work behind the\nscenes. For example, the FES checks the arguments passed to functions,\nwhich takes time to process. Disabling the FES can significantly improve\nperformance by turning off these checks. The element's underlying The\nHTMLElement\nobject's properties and methods can be used directly. A A Attaches the element to a parent element. For example, a The parameter Calling Sets the element's ID using a given string. Calling Adds a\nclass attribute\nto the element using a given string. Calling Calls a function when the mouse is pressed over the element. Calling Note: Some mobile browsers may also trigger this event when the element\nreceives a quick tap. Calls a function when the mouse is pressed twice over the element. Calling Calls a function when the mouse wheel scrolls over the element. The callback function, Calling Calls a function when the mouse is released over the element. Calling Note: Some mobile browsers may also trigger this event when the element\nreceives a quick tap. Calls a function when the mouse is pressed and released over the element. Calling Note: Some mobile browsers may also trigger this event when the element\nreceives a quick tap. Calls a function when the mouse moves over the element. Calling Calls a function when the mouse moves onto the element. Calling Calls a function when the mouse moves off the element. Calling Calls a function when the element is touched. Calling Note: Touch functions only work on mobile devices. Calls a function when the user touches the element and moves. Calling Note: Touch functions only work on mobile devices. Calls a function when the user stops touching the element. Calling Note: Touch functions only work on mobile devices. Calls a function when a file is dragged over the element. Calling Calls a function when a file is dragged off the element. Calling Helper fxn for sharing pixel methods Resets the graphics buffer's transformations and lighting. By default, the main canvas resets certain transformation and lighting\nvalues each time draw() executes. Removes the graphics buffer from the web page. Calling Note: All variables that reference the graphics buffer must be assigned\nthe value Creates a new p5.Framebuffer object with\nthe same WebGL context as the graphics buffer. p5.Framebuffer objects are separate drawing\nsurfaces that can be used as textures in WebGL mode. They're similar to\np5.Graphics objects and generally run much\nfaster when used as textures. Creating a\np5.Framebuffer object in the same context\nas the graphics buffer makes this speedup possible. The parameter, If the Resize our canvas element. Helper function to check font type (system or otf) Helper fxn to measure ascent and descent.\nAdapted from http://stackoverflow.com/a/25355178 p5.Renderer2D\nThe 2D graphics canvas renderer class.\nextends p5.Renderer Declares a new variable. A variable is a container for a value. For example, a variable might\ncontain a creature's x-coordinate as a Variables have block scope. When a variable is declared between curly\nbraces Variables declared outside of all curly braces A way to choose whether to run a block of code. The statement header begins with the keyword The mouseIsPressed system variable is\nalways An There are two possible paths, or branches, in this code snippet. The\nprogram must follow one branch or the other. An If the user is pressing a key AND that key is The If the user presses a key, or presses a mouse button, or both, then a\nmessage will display. The body of an See Boolean and Number\nto learn more about these data types and the operations they support. A named group of statements. Functions\nhelp with organizing and reusing code. For example, functions make it easy\nto express the idea \"Draw a flower.\": The function header begins with the keyword Functions can accept inputs by adding parameters to their headers.\nParameters are placeholders for values that will be provided when the\nfunction is called. For example, the Parameters are part of the function's declaration. Arguments are provided\nby the code that calls a function. When a function is called, arguments are\nassigned to parameters: Functions can have multiple parameters separated by commas. Parameters\ncan have any type. For example, the Functions can also produce outputs by adding a The expression following A value that's either The The Note: There's also a The mouseIsPressed system variable is\nalways The Starting from the left, the arithmetic expression Note: There's also a The If the user is pressing a key AND that key is The If the user presses a key, or presses a mouse button, or both, then a\nmessage will display. The following truth table summarizes a few common scenarios with The relational operators See if for more information about A sequence of text characters. The The most common way to create strings is to use some form of quotations as\nfollows: Single quotes Backticks Template literals are helpful when strings are created from variables like\nso: The Template literals can include several variables: Template literals are also helpful for creating multi-line text like so: A number that can be positive, negative, or zero. The Numbers support basic arithmetic and follow the standard order of\noperations: Parentheses, Exponents, Multiplication, Division, Addition,\nand Subtraction (PEMDAS). For example, it's common to use arithmetic\noperators with p5.js' system variables that are numbers: Here's a quick overview of the arithmetic operators: It's common to update a number variable using arithmetic. For example, an\nobject's location can be updated like so: The statement above adds 1 to a variable Here's a quick overview of the assignment operators: Numbers can be compared using the\nrelational operators\n An expression such as See Boolean for more information about comparisons and conditions. Note: There are also Expressions with numbers can also produce special values when something\ngoes wrong: The value A container for data that's stored as key-value pairs. Objects help to organize related data of any type, including other objects.\nA value stored in an object can be accessed by name, called its key. Each\nkey-value pair is called a \"property.\" Objects are similar to dictionaries\nin Python and maps in Java and Ruby. For example, an object could contain the location, size, and appearance of\na dog: The variable An object's data can be updated while a sketch runs. For example, the If needed, an object's values can be accessed using square brackets This syntax can be helpful when the key's name has spaces, as in\n A list that keeps several pieces of data in order. Arrays are helpful for storing related data. They can contain data of any\ntype. For example, an array could contain a list of someone's favorite\ncolors as strings. Arrays are created as follows: Each piece of data in an array is called an element. Each element has an\naddress, or index, within its array. The variable Elements can be added to the end of an array by calling the\npush()\nmethod as follows: See MDN\nfor more information about arrays. A template for creating objects of a particular type. Classes can make it easier to program with objects. For example, a The variable A simple Class declarations begin with the keyword Functions that belong to a class are called methods. A class definition is a template for instances. The keyword A way to repeat a block of code when the number of iterations is known. The loop's header begins with the keyword The code between the curly braces It's common to create infinite loops accidentally. When this happens,\nsketches may become unresponsive and the web browser may display a warning.\nFor example, the following loop never stops iterating because it doesn't\ncount up: The statement If the array's values aren't modified, the In the code snippets above, the variables In the first snippet, In the second code snippet, A way to repeat a block of code. The loop's header begins with the keyword It's common to create infinite loops accidentally. For example, the\nfollowing loop never stops iterating because it doesn't count up: The statement Prints a message to the web browser's console. The console\nobject is helpful for printing messages while debugging. For example, it's\ncommon to add a Creates a canvas element on the web page. The first two parameters, The third parameter is also optional. If either of the constants The fourth parameter is also optional. If an existing\nHTMLCanvasElement\nis passed, as in Note: In WebGL mode, the canvas will use a WebGL2 context if it's supported\nby the browser. Check the webglVersion\nsystem variable to check what version is being used, or call\n Resizes the canvas to a given width and height. The first two parameters, The third parameter, Removes the default canvas. By default, a 100×100 pixels canvas is created without needing to call\ncreateCanvas(). Creates a p5.Graphics object. The first two parameters, The third parameter is also optional. If either of the constants The fourth parameter is also optional. If an existing\nHTMLCanvasElement\nis passed, as in Note: In WebGL mode, the p5.Graphics object\nwill use a WebGL2 context if it's supported by the browser. Check the\nwebglVersion system variable to check what\nversion is being used, or call args[0] is expected to be renderer\nargs[1] is expected to be canvas Creates and a new p5.Framebuffer object. p5.Framebuffer objects are separate drawing\nsurfaces that can be used as textures in WebGL mode. They're similar to\np5.Graphics objects and generally run much\nfaster when used as textures. The parameter, If the Note: Clears the depth buffer in WebGL mode. The parameter, Note: Sets the way colors blend when added to the canvas. By default, drawing with a solid color paints over the current pixel values\non the canvas. Shapes, images, and text can be used as sources for drawing to the canvas.\nA source pixel changes the color of the canvas pixel where it's drawn. The\nfinal color results from blending the source pixel's color with the canvas\npixel's color. RGB color values from the source and canvas pixels are\ncompared, added, subtracted, multiplied, and divided to create different\neffects. Red values with red values, greens with greens, and blues with\nblues. The parameter, The following blend modes are only available in 2D mode: The following blend modes are only available in WebGL mode: A system variable that provides direct access to the sketch's\n The Stops the code in draw() from running repeatedly. By default, draw() tries to run 60 times per\nsecond. Calling The isLooping() function can be used to check\nwhether a sketch is looping, as in Resumes the draw loop after noLoop() has been\ncalled. By default, draw() tries to run 60 times per\nsecond. Calling noLoop() stops\ndraw() from repeating. The draw loop can be\nrestarted by calling The isLooping() function can be used to check\nwhether a sketch is looping, as in Returns By default, draw() tries to run 60 times per\nsecond. Calling noLoop() stops\ndraw() from repeating. The draw loop can be\nrestarted by calling loop(). The Begins a drawing group that contains its own styles and transformations. By default, styles such as fill() and\ntransformations such as rotate() are applied to\nall drawing that follows. The In the code snippet above, the bug's position isn't affected by\n Note: In this version, the code to draw each eye is contained between its own\n In WebGL mode, Ends a drawing group that contains its own styles and transformations. By default, styles such as fill() and\ntransformations such as rotate() are applied to\nall drawing that follows. The push() and In the code snippet above, the bug's position isn't affected by\n Note: push() and push() and In this version, the code to draw each eye is contained between its own\npush() and push() and In WebGL mode, push() and Runs the code in draw() once. By default, draw() tries to run 60 times per\nsecond. Calling noLoop() stops\ndraw() from repeating. Calling The parameter, Creates a new sketch in \"instance\" mode. All p5.js sketches are instances of the In global mode, a default instance of the It's often helpful to isolate the code within sketches from the rest of the\ncode on a web page. Two common use cases are web pages that use other\nJavaScript libraries and web pages with multiple sketches. \"Instance mode\"\nmakes it easy to support both of these scenarios. Instance mode sketches support the same API as global mode sketches. They\nuse a function to bundle, or encapsulate, an entire sketch. The function\ncontaining the sketch is then passed to the The first parameter, The second parameter, Applies a transformation matrix to the coordinate system. Transformations such as\ntranslate(),\nrotate(), and\nscale()\nuse matrix-vector multiplication behind the scenes. A table of numbers,\ncalled a matrix, encodes each transformation. The values in the matrix\nthen multiply each point on the canvas, which is represented by a vector. There are two ways to call In 2D mode, the parameters The numbers can be passed individually, as in\n In 3D mode, the parameters The numbers can be passed individually, as in\n By default, transformations accumulate. The\npush() and pop() functions\ncan be used to isolate transformations within distinct drawing groups. Note: Transformations are reset at the beginning of the draw loop. Calling\n Clears all transformations applied to the coordinate system. Rotates the coordinate system. By default, the positive x-axis points to the right and the positive y-axis\npoints downward. The The first parameter, The second parameter, By default, transformations accumulate. For example, calling Note: Transformations are reset at the beginning of the draw loop. Calling\n Rotates the coordinate system about the x-axis in WebGL mode. The parameter, By default, transformations accumulate. For example, calling Note: Transformations are reset at the beginning of the draw loop. Calling\n Rotates the coordinate system about the y-axis in WebGL mode. The parameter, By default, transformations accumulate. For example, calling Note: Transformations are reset at the beginning of the draw loop. Calling\n Rotates the coordinate system about the z-axis in WebGL mode. The parameter, By default, transformations accumulate. For example, calling Note: Transformations are reset at the beginning of the draw loop. Calling\n Scales the coordinate system. By default, shapes are drawn at their original scale. A rectangle that's 50\npixels wide appears to take up half the width of a 100 pixel-wide canvas.\nThe The first way to call The second way to call By default, transformations accumulate. For example, calling Note: Transformations are reset at the beginning of the draw loop. Calling\n Shears the x-axis so that shapes appear skewed. By default, the x- and y-axes are perpendicular. The The first parameter, By default, transformations accumulate. For example, calling\n Note: Transformations are reset at the beginning of the draw loop. Calling\n Shears the y-axis so that shapes appear skewed. By default, the x- and y-axes are perpendicular. The The first parameter, By default, transformations accumulate. For example, calling\n Note: Transformations are reset at the beginning of the draw loop. Calling\n Translates the coordinate system. By default, the origin The first way to call The second way to call By default, transformations accumulate. For example, calling\n Note: Transformations are reset at the beginning of the draw loop. Calling\n Stores a value in the web browser's local storage. Web browsers can save small amounts of data using the built-in\nlocalStorage object.\nData stored in The first parameter, The second parameter, Note: Sensitive data such as passwords or personal information shouldn't be\nstored in Returns a value in the web browser's local storage. Web browsers can save small amounts of data using the built-in\nlocalStorage object.\nData stored in storeItem() makes it easy to store values in\n The first parameter, The second parameter, Note: Sensitive data such as passwords or personal information shouldn't be\nstored in Removes all items in the web browser's local storage. Web browsers can save small amounts of data using the built-in\nlocalStorage object.\nData stored in Note: Sensitive data such as passwords or personal information shouldn't be\nstored in Removes an item from the web browser's local storage. Web browsers can save small amounts of data using the built-in\nlocalStorage object.\nData stored in storeItem() makes it easy to store values in\n The parameter, Note: Sensitive data such as passwords or personal information shouldn't be\nstored in Creates a new instance of p5.StringDict using the key-value pair\n or the object you provide. Creates a new instance of p5.NumberDict using the key-value pair\n or object you provide. Returns the number of key-value pairs currently stored in the Dictionary. Returns true if the given key exists in the Dictionary,\notherwise returns false. Returns the value stored at the given key. Updates the value associated with the given key in case it already exists\nin the Dictionary. Otherwise a new key-value pair is added. private helper function to handle the user passing in objects\nduring construction or calls to create() Creates a new key-value pair in the Dictionary. Removes all previously stored key-value pairs from the Dictionary. Removes the key-value pair stored at the given key from the Dictionary. Logs the set of items currently stored in the Dictionary to the console. Converts the Dictionary into a CSV file for local download. Converts the Dictionary into a JSON file for local download. private helper function to ensure that the user passed in valid\nvalues for the Dictionary type private helper function to ensure that the user passed in valid\nvalues for the Dictionary type Add the given number to the value currently stored at the given key.\nThe sum then replaces the value previously stored in the Dictionary. Subtract the given number from the value currently stored at the given key.\nThe difference then replaces the value previously stored in the Dictionary. Multiply the given number with the value currently stored at the given key.\nThe product then replaces the value previously stored in the Dictionary. Divide the given number with the value currently stored at the given key.\nThe quotient then replaces the value previously stored in the Dictionary. private helper function for finding lowest or highest value\nthe argument 'flip' is used to flip the comparison arrow\nfrom 'less than' to 'greater than' Return the lowest number currently stored in the Dictionary. Return the highest number currently stored in the Dictionary. private helper function for finding lowest or highest key\nthe argument 'flip' is used to flip the comparison arrow\nfrom 'less than' to 'greater than' Return the lowest key currently used in the Dictionary. Return the highest key currently used in the Dictionary. Searches the page for the first element that matches the given\nCSS selector string. The selector string can be an ID, class, tag name, or a combination.\n The second parameter, Searches the page for all elements that matches the given\nCSS selector string. The selector string can be an ID, class, tag name, or a combination.\n The second parameter, Helper function for select and selectAll Helper function for getElement and getElements. Removes all elements created by p5.js, including any event handlers. There are two exceptions:\ncanvas elements created by createCanvas()\nand p5.Render objects created by\ncreateGraphics(). Calls a function when the element changes. Calling Calls a function when the element receives input. Helpers for create methods. Creates a The parameter Creates a paragraph element. The parameter Creates a The parameter Creates an The first parameter, The second parameter, The third parameter, The fourth parameter, Creates an The first parmeter, The second parameter, The third parameter, Creates a slider Range sliders are useful for quickly selecting numbers from a given range. The first two parameters, The third parameter, The fourth parameter, Creates a The first parameter, The second parameter, Creates a checkbox Checkboxes extend the p5.Element class with a\n The first parameter, The second parameter, Creates a dropdown menu The parameter is optional. If Dropdowns extend the p5.Element class with a few\nhelpful methods for managing options: Creates a radio button element. The parameter is optional. If a string is passed, as in\n Radio buttons extend the p5.Element class with a few\nhelpful methods for managing options: Creates a color picker element. The parameter, Color pickers extend the p5.Element class with a\ncouple of helpful methods for managing colors: Creates a text Call The first parameter, The second parameter, Creates an The first parameter, The second parameter, Creates a The first parameter, The second parameter, Creates a hidden The first parameter, The second parameter, Creates a The first parameter, The 'flipped' property is an optional property which can be set to The second parameter, Note: Creates a new p5.Element object. The first parameter, The second parameter, Adds a class to the element. Removes a class from the element. Checks if a class is already applied to element. Toggles whether a class is applied to the element. Attaches the element as a child of another element. Centers the element either vertically, horizontally, or both. If no argument is passed, as in Sets the inner HTML of the element, replacing any existing HTML. The second parameter, If no arguments are passed, as in Sets the element's position. The first two parameters, The third parameter, If no arguments passed, as in Applies a style to the element by adding a\nCSS declaration. The first parameter, The second parameter, Adds an\nattribute\nto the element. This method is useful for advanced tasks. Most commonly-used attributes,\nsuch as The first parameter, The second parameter, Removes an attribute from the element. The parameter Returns or sets the element's value. Calling The parameter, Shows the current element. Hides the current element. Sets the element's width and height. Calling The first parameter, The second parameter, 'height The constant Note: In the case of elements that need to load data, such as images, wait\nto call Removes the element, stops all audio/video streams, and removes all\ncallback functions. Calls a function when the user drops a file on the element. The first parameter, The second parameter, Makes the element draggable. The parameter, Path to the media element's source as a string. Plays audio or video from a media element. Stops a media element and sets its current time to 0. Calling Pauses a media element. Calling Plays the audio/video repeatedly in a loop. Stops the audio/video from playing in a loop. The media will stop when it finishes playing. Sets the audio/video to play once it's loaded. The parameter, Sets the audio/video volume. Calling The parameter, Sets the audio/video playback speed. The parameter, Calling Note: Not all browsers support backward playback. Even if they do,\nplayback might not be smooth. Sets the media element's playback time. The parameter, Calling Note: Time resets to 0 when looping media restarts. Returns the audio/video's duration in seconds. Calls a function when the audio/video reaches the end of its playback. The element is passed as an argument to the callback function. Note: The function won't be called if the media is looping. Sends the element's audio to an output. The parameter, If no element is provided, as in Note: This method is meant to be used with the p5.sound.js addon library. Disconnect all Web Audio routing, including to the main output. This is useful if you want to re-route the output through audio effects,\nfor example. Show the default\nHTMLMediaElement\ncontrols. Note: The controls vary between web browsers. Hide the default\nHTMLMediaElement\ncontrols. Schedules a function to call when the audio/video reaches a specific time\nduring its playback. The first parameter, The second parameter, The third parameter, Calling Removes a callback based on its ID. Removes all functions scheduled with Underlying\nFile\nobject. All The file\nMIME type\nas a string. For example, The file subtype as a string. For example, a file with an The file name as a string. The number of bytes in the file. A string containing the file's data. Data can be either image data, text contents, or a parsed object in the\ncase of JSON and p5.XML objects. The system variable deviceOrientation always contains the orientation of\nthe device. The value of this variable will either be set 'landscape'\nor 'portrait'. If no data is available it will be set to 'undefined'.\neither LANDSCAPE or PORTRAIT. The system variable accelerationX always contains the acceleration of the\ndevice along the x axis. Value is represented as meters per second squared. The system variable accelerationY always contains the acceleration of the\ndevice along the y axis. Value is represented as meters per second squared. The system variable accelerationZ always contains the acceleration of the\ndevice along the z axis. Value is represented as meters per second squared. The system variable pAccelerationX always contains the acceleration of the\ndevice along the x axis in the frame previous to the current frame. Value\nis represented as meters per second squared. The system variable pAccelerationY always contains the acceleration of the\ndevice along the y axis in the frame previous to the current frame. Value\nis represented as meters per second squared. The system variable pAccelerationZ always contains the acceleration of the\ndevice along the z axis in the frame previous to the current frame. Value\nis represented as meters per second squared. The system variable rotationX always contains the rotation of the\ndevice along the x axis. If the sketch \nangleMode() is set to DEGREES, the value will be -180 to 180. If\nit is set to RADIANS, the value will be -PI to PI. Note: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour. The system variable rotationY always contains the rotation of the\ndevice along the y axis. If the sketch \nangleMode() is set to DEGREES, the value will be -90 to 90. If\nit is set to RADIANS, the value will be -PI/2 to PI/2. Note: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour. The system variable rotationZ always contains the rotation of the\ndevice along the z axis. If the sketch \nangleMode() is set to DEGREES, the value will be 0 to 360. If\nit is set to RADIANS, the value will be 0 to 2*PI. Unlike rotationX and rotationY, this variable is available for devices\nwith a built-in compass only. Note: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour. The system variable pRotationX always contains the rotation of the\ndevice along the x axis in the frame previous to the current frame.\nIf the sketch angleMode() is set to DEGREES,\nthe value will be -180 to 180. If it is set to RADIANS, the value will\nbe -PI to PI. pRotationX can also be used with rotationX to determine the rotate\ndirection of the device along the X-axis. The system variable pRotationY always contains the rotation of the\ndevice along the y axis in the frame previous to the current frame.\nIf the sketch angleMode() is set to DEGREES,\nthe value will be -90 to 90. If it is set to RADIANS, the value will\nbe -PI/2 to PI/2. pRotationY can also be used with rotationY to determine the rotate\ndirection of the device along the Y-axis. The system variable pRotationZ always contains the rotation of the\ndevice along the z axis in the frame previous to the current frame.\nIf the sketch angleMode() is set to DEGREES,\nthe value will be 0 to 360. If it is set to RADIANS, the value will\nbe 0 to 2*PI. pRotationZ can also be used with rotationZ to determine the rotate\ndirection of the device along the Z-axis. When a device is rotated, the axis that triggers the deviceTurned()\nmethod is stored in the turnAxis variable. The turnAxis variable is only defined within\nthe scope of deviceTurned(). The setMoveThreshold() function is used to set the movement threshold for\nthe deviceMoved() function. The default threshold is set to 0.5. The setShakeThreshold() function is used to set the movement threshold for\nthe deviceShaken() function. The default threshold is set to 30. The deviceMoved() function is called when the device is moved by more than\nthe threshold value along X, Y or Z axis. The default threshold is set to 0.5.\nThe threshold value can be changed using setMoveThreshold(). The deviceTurned() function is called when the device rotates by\nmore than 90 degrees continuously. The axis that triggers the deviceTurned() method is stored in the turnAxis\nvariable. The deviceTurned() method can be locked to trigger on any axis:\nX, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'. The deviceShaken() function is called when the device total acceleration\nchanges of accelerationX and accelerationY values is more than\nthe threshold value. The default threshold is set to 30.\nThe threshold value can be changed using setShakeThreshold(). A A The key variable is helpful for checking whether an\nASCII\nkey has been typed. For example, the expression A All keys have a The same code can be written more clearly using the system variable The system variables A function that's called once when any key is pressed. Declaring the function The key and keyCode\nvariables will be updated with the most recently typed value when\n The parameter, Browsers may have default behaviors attached to various key events. For\nexample, some browsers may jump to the bottom of a web page when the\n A function that's called once when any key is released. Declaring the function The key and keyCode\nvariables will be updated with the most recently released value when\n The parameter, Browsers may have default behaviors attached to various key events. To\nprevent any default behavior for this event, add A function that's called once when keys with printable characters are pressed. Declaring the function The key and keyCode\nvariables will be updated with the most recently released value when\n The parameter, Note: Use the keyPressed() function and\nkeyCode system variable to respond to modifier\nkeys such as Browsers may have default behaviors attached to various key events. To\nprevent any default behavior for this event, add The onblur function is called when the user is no longer focused\non the p5 element. Because the keyup events will not fire if the user is\nnot focused on the element we must assume all keys currently down have\nbeen released. Returns A Note: A Note: A In 2D mode, In WebGL mode, If touch is used instead of the mouse, then A In 2D mode, In WebGL mode, If touch is used instead of the mouse, then A In 2D mode, In WebGL mode, If touch is used instead of the mouse, then Note: A In 2D mode, In WebGL mode, If touch is used instead of the mouse, then Note: A On a touchscreen device, Note: Use mouseX to track the mouse’s\nx-coordinate within the canvas. A On a touchscreen device, Note: Use mouseY to track the mouse’s\ny-coordinate within the canvas. A On a touchscreen device, Note: Use pmouseX to track the mouse’s previous\nx-coordinate within the canvas. A On a touchscreen device, Note: Use pmouseY to track the mouse’s previous\ny-coordinate within the canvas. A String system variable that contains the value of the last mouse button\npressed. The Note: Different browsers may track A A function that's called when the mouse moves. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd A function that's called when the mouse moves while a button is pressed. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, On touchscreen devices, Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd A function that's called once when a mouse button is pressed. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, On touchscreen devices, Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd Note: A function that's called once when a mouse button is released. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, On touchscreen devices, Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd Note: mousePressed(), A function that's called once after a mouse button is pressed and released. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, On touchscreen devices, Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd Note: mousePressed(),\nmouseReleased(),\nand A function that's called once when a mouse button is clicked twice quickly. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, On touchscreen devices, code placed in Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd A function that's called once when the mouse wheel moves. Declaring the function The mouse system variables, such as mouseX and\nmouseY, will be updated with their most recent\nvalue when The parameter, The Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd Note: On Safari, Locks the mouse pointer to its current position and makes it invisible. Note: Most browsers require an input, such as a click, before calling\n Exits a pointer lock started with\nrequestPointerLock. Calling Note: Most browsers require an input, such as a click, before calling\n An The A function that's called once each time the user touches the screen. Declaring a function called The touches array will be updated with the most\nrecent touch points when The parameter, event, is optional. On touchscreen devices, mousePressed() will\nrun when a user’s touch starts if Note: A function that's called when the user touches the screen and moves. Declaring the function The touches array will be updated with the most\nrecent touch points when The parameter, event, is optional. On touchscreen devices, mouseDragged() will\nrun when the user’s touch points move if Note: touchStarted(),\ntouchEnded(), and\n A function that's called once each time a screen touch ends. Declaring the function The touches array will be updated with the most\nrecent touch points when The parameter, event, is optional. On touchscreen devices, mouseReleased() will\nrun when the user’s touch ends if Note: touchStarted(),\n This module defines the filters for use with image buffers. This module is basically a collection of functions stored in an object\nas opposed to modules. The functions are destructive, modifying\nthe passed in canvas rather than creating a copy. Generally speaking users of this module will use the Filters.apply method\non a canvas to create an effect. A number of functions are borrowed/adapted from\nhttp://www.html5rocks.com/en/tutorials/canvas/imagefilters/\nor the java processing implementation. This module defines the p5 methods for the p5.Image class\nfor drawing images to the main display canvas. Creates a new p5.Image object. Note: The new p5.Image object is transparent by\ndefault. Saves the current canvas as an image. By default, The first parameter, The second parameter, Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window. Captures a sequence of frames from the canvas that can be saved as images. The first parameter, The second parameter, The third parameter, The fourth parameter, The fifth parameter, Note: Frames are downloaded as individual image files by default. Loads an image to create a p5.Image object. The second parameter is optional. If a function is passed, it will be\ncalled once the image has loaded. The callback function can optionally use\nthe new p5.Image object. The third parameter is also optional. If a function is passed, it will be\ncalled if the image fails to load. The callback function can optionally use\nthe event error. Images can take time to load. Calling Generates a gif from a sketch and saves it to a file. The first parameter, The second parameter, The third parameter, Helper function for loading GIF-based images Draws an image to the canvas. The first parameter, The second and third parameters, Here's a diagram that explains how optional parameters work in The fourth and fifth parameters, The sixth and seventh parameters, The eighth and ninth parameters, The ninth parameter, The tenth and eleventh parameters, Tints images using a color. The version of The version of The version of Removes the current tint set by tint(). Changes the location from which images are drawn when\nimage() is called. By default, the first\ntwo parameters of image() are the x- and\ny-coordinates of the image's upper-left corner. The next parameters are\nits width and height. This is the same as calling This module defines the p5.Image class and P5 methods for\ndrawing images to the main display canvas. The image's width in pixels. The image's height in pixels. An array containing the color of each pixel in the image. Colors are stored as numbers representing red, green, blue, and alpha\n(RGBA) values. Each pixel occupies four elements in the pixels array, one for each\nRGBA value. For example, the pixel at coordinates (0, 0) stores its\nRGBA values at Accessing the RGBA values for a pixel in the image requires a little\nmath as shown in the examples below. The\nimg.loadPixels()\nmethod must be called before accessing the Gets or sets the pixel density for high pixel density displays. By default, the density will be set to 1. Call this method with no arguments to get the default density, or pass\nin a number to set the density. If a non-positive number is provided,\nit defaults to 1. Helper function for animating GIF-based images with time Helper fxn for sharing pixel methods Loads the current value of each pixel in the image into the Updates the canvas with the RGBA values in the\nimg.pixels array. The optional parameters If the image was loaded from a GIF, then calling Gets a pixel or a region of pixels from the image. The version of The version of The version of Use Sets the color of one or more pixels within an image. img.updatePixels() must be called\nafter using Resizes the image to a given width and height. The image's original aspect ratio can be kept by passing 0 for either\n Copies pixels from a source image to this image. The first parameter, The next four parameters, The next four parameters, Calling Masks part of the image with another. Applies an image filter to the image. The preset options are: Copies a region of pixels from another image into this one. The first parameter, The next four parameters, The next four parameters, The tenth parameter, Saves the image to a file. By default, The first parameter, The second parameter, Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window. The image will only be downloaded as an animated GIF if it was loaded\nfrom a GIF file. See saveGif() to create new\nGIFs. Restarts an animated GIF at its first frame. Gets the index of the current frame in an animated GIF. Sets the current frame in an animated GIF. Returns the number of frames in an animated GIF. Plays an animated GIF that was paused with\nimg.pause(). Pauses an animated GIF. The GIF can be resumed by calling\nimg.play(). Changes the delay between frames in an animated GIF. The first parameter, The second parameter, An array containing the color of each pixel on the canvas. Colors are stored as numbers representing red, green, blue, and alpha\n(RGBA) values. Each pixel occupies four elements in the Some displays use several smaller pixels to set the color at a single\npoint. The pixelDensity() function returns\nthe pixel density of the canvas. High density displays often have a\npixelDensity() of 2. On such a display, the\n Accessing the RGBA values for a point on the canvas requires a little math\nas shown below. The loadPixels() function\nmust be called before accessing the Copies a region of pixels from one image to another. The first parameter, The next four parameters, The next four parameters, The tenth parameter, Copies pixels from a source image to a region of the canvas. The first parameter, The next four parameters, The next four parameters, Applies an image filter to the canvas. The preset options are: In WebgL mode, Gets a pixel or a region of pixels from the canvas. The version of The version of The version of Use p5.Image.get() to work directly with\np5.Image objects. Loads the current value of each pixel on the canvas into the\npixels array. Sets the color of a pixel or draws an image to the canvas. updatePixels() must be called after using\n Updates the canvas with the RGBA values in the\npixels array. Loads a JSON file to create an JavaScript Object Notation\n(JSON)\nis a standard format for sending data between applications. The format is\nbased on JavaScript objects which have keys and values. JSON files store\ndata in an object with strings as keys. Values can be strings, numbers,\nBooleans, arrays, The first parameter, The second parameter, The third parameter, Note: Data can take time to load. Calling Loads a text file to create an The first parameter, The second parameter, The third parameter, Note: Data can take time to load. Calling Reads the contents of a file or URL and creates a p5.Table object with\nits values. If a file is specified, it must be located in the sketch's\n\"data\" folder. The filename parameter can also be a URL to a file found\nonline. By default, the file is assumed to be comma-separated (in CSV\nformat). Table only looks for a header row if the 'header' option is\nincluded. This method is asynchronous, meaning it may not finish before the next\nline in your sketch is executed. Calling loadTable() inside preload()\nguarantees to complete the operation before setup() and draw() are called.\nOutside of preload(), you may supply a callback function to handle the\nobject: All files loaded and saved use UTF-8 encoding. This method is suitable for fetching files up to size of 64MB. Loads an XML file to create a p5.XML object. Extensible Markup Language\n(XML)\nis a standard format for sending data between applications. Like HTML, the\nXML format is based on tags and attributes, as in\n The first parameter, The second parameter, The third parameter, Note: Data can take time to load. Calling This method is suitable for fetching files up to size of 64MB. Method for executing an HTTP GET request. If data type is not specified,\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\ncalling Method for executing an HTTP POST request. If data type is not specified,\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\ncalling Method for executing an HTTP request. If data type is not specified,\np5 will try to guess based on the URL, defaulting to text. Creates a new p5.PrintWriter object. p5.PrintWriter objects provide a way to\nsave a sequence of text data, called the print stream, to the user's\ncomputer. They're low-level objects that enable precise control of text\noutput. Functions such as\nsaveStrings() and\nsaveJSON() are easier to use for simple file\nsaving. The first parameter, The second parameter, Writes data to the print stream without adding new lines. The parameter, Writes data to the print stream with new lines added. The parameter, Clears all data from the print stream. Saves the file and closes the print stream. Saves a given element(image, text, json, csv, wav, or html) to the client's\ncomputer. The first parameter can be a pointer to element we want to save.\nThe element can be one of p5.Element,an Array of\nStrings, an Array of JSON, a JSON object, a p5.Table\n, a p5.Image, or a p5.SoundFile (requires\np5.sound). The second parameter is a filename (including extension).The\nthird parameter is for options specific to this type of object. This method\nwill save a file that fits the given parameters.\nIf it is called without specifying an element, by default it will save the\nwhole canvas as an image file. You can optionally specify a filename as\nthe first parameter in such a case.\nNote that it is not recommended to\ncall this method within draw, as it will open a new save dialog on every\nrender. Saves an JavaScript Object Notation\n(JSON)\nis a standard format for sending data between applications. The format is\nbased on JavaScript objects which have keys and values. JSON files store\ndata in an object with strings as keys. Values can be strings, numbers,\nBooleans, arrays, The first parameter, The second parameter, The third parameter, Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window. Saves an The first parameter, The second parameter, The third parameter, The fourth parameter, Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window. Writes the contents of a Table object to a file. Defaults to a\ntext file with comma-separated-values ('csv') but can also\nuse tab separation ('tsv'), or generate an HTML table ('html').\nThe file saving process and location of the saved file will\nvary between web browsers. Table Options\nGeneric class for handling tabular data, typically from a\nCSV, TSV, or other sort of spreadsheet file.\nCSV files are\n\ncomma separated values, often with the data in quotes. TSV\nfiles use tabs as separators, and usually don't bother with the\nquotes.\nFile names should end with .csv if they're comma separated.\nA rough \"spec\" for CSV can be found\nhere.\nTo load files, use the loadTable method.\nTo save tables to your computer, use the save method\n or the saveTable method. Possible options include: An array containing the names of the columns in the table, if the \"header\" the table is\nloaded with the \"header\" parameter. An array containing the p5.TableRow objects that make up the\nrows of the table. The same result as calling getRows() Use addRow() to add a new row of data to a p5.Table object. By default,\nan empty row is created. Typically, you would store a reference to\nthe new row in a TableRow object (see newRow in the example above),\nand then set individual values using set(). If a p5.TableRow object is included as a parameter, then that row is\nduplicated and added to the table. Removes a row from the table object. Returns a reference to the specified p5.TableRow. The reference\ncan then be used to get and set values of the selected row. Gets all rows from the table. Returns an array of p5.TableRows. Finds the first row in the Table that contains the value\nprovided, and returns a reference to that row. Even if\nmultiple rows are possible matches, only the first matching\nrow is returned. The column to search may be specified by\neither its ID or title. Finds the rows in the Table that contain the value\nprovided, and returns references to those rows. Returns an\nArray, so for must be used to iterate through all the rows,\nas shown in the example above. The column to search may be\nspecified by either its ID or title. Finds the first row in the Table that matches the regular\nexpression provided, and returns a reference to that row.\nEven if multiple rows are possible matches, only the first\nmatching row is returned. The column to search may be\nspecified by either its ID or title. Finds the rows in the Table that match the regular expression provided,\nand returns references to those rows. Returns an array, so for must be\nused to iterate through all the rows, as shown in the example. The\ncolumn to search may be specified by either its ID or title. Retrieves all values in the specified column, and returns them\nas an array. The column may be specified by either its ID or title. Removes all rows from a Table. While all rows are removed,\ncolumns and column titles are maintained. Use addColumn() to add a new column to a Table object.\nTypically, you will want to specify a title, so the column\nmay be easily referenced later by name. (If no title is\nspecified, the new column's title will be null.) Returns the total number of columns in a Table. Returns the total number of rows in a Table. Removes any of the specified characters (or \"tokens\"). If no column is specified, then the values in all columns and\nrows are processed. A specific column may be referenced by\neither its ID or title. Trims leading and trailing whitespace, such as spaces and tabs,\nfrom String table values. If no column is specified, then the\nvalues in all columns and rows are trimmed. A specific column\nmay be referenced by either its ID or title. Use removeColumn() to remove an existing column from a Table\nobject. The column to be removed may be identified by either\nits title (a String) or its index value (an int).\nremoveColumn(0) would remove the first column, removeColumn(1)\nwould remove the second column, and so on. Stores a value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title. Stores a Float value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title. Stores a String value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title. Retrieves a value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title. Retrieves a Float value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title. Retrieves a String value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title. Retrieves all table data and returns as an object. If a column name is\npassed in, each row object will be stored with that attribute as its\ntitle. Retrieves all table data and returns it as a multidimensional array. Stores a value in the TableRow's specified column.\nThe column may be specified by either its ID or title. Stores a Float value in the TableRow's specified column.\nThe column may be specified by either its ID or title. Stores a String value in the TableRow's specified column.\nThe column may be specified by either its ID or title. Retrieves a value from the TableRow's specified column.\nThe column may be specified by either its ID or title. Retrieves a Float value from the TableRow's specified\ncolumn. The column may be specified by either its ID or\ntitle. Retrieves an String value from the TableRow's specified\ncolumn. The column may be specified by either its ID or\ntitle. Returns the element's parent element as a new p5.XML\nobject. Returns the element's name as a An XML element's name is given by its tag. For example, the element\n Sets the element's tag name. An XML element's name is given by its tag. For example, the element\n The parameter, Returns Returns an array with the names of the element's child elements as\n Returns an array with the element's child elements as new\np5.XML objects. The parameter, Returns the first matching child element as a new\np5.XML object. The parameter, Adds a new child element and returns a reference to it. The parameter, Removes the first matching child element. The parameter, Returns the number of attributes the element has. Returns an Note: Use\nmyXML.getString() or\nmyXML.getNum() to return an attribute's value. Returns The parameter, Note: Use\nmyXML.getString() or\nmyXML.getNum() to return an attribute's value. Return an attribute's value as a The first parameter, The second parameter, Note: Use\nmyXML.getString() or\nmyXML.getNum() to return an attribute's value. Return an attribute's value as a string. The first parameter, The second parameter, Note: Use\nmyXML.getString() or\nmyXML.getNum() to return an attribute's value. Sets an attribute to a given value. The first parameter, The second parameter, Returns the element's content as a The parameter, Sets the element's content. An element's content is the text between its tags. For example, the element\n The parameter, Returns the element as a Calculates the absolute value of a number. A number's absolute value is its distance from zero on the number line.\n-5 and 5 are both five units away from zero, so calling Calculates the closest integer value that is greater than or equal to a\nnumber. For example, calling Constrains a number between a minimum and maximum value. Calculates the distance between two points. The version of The version of Use p5.Vector.dist() to calculate the\ndistance between two p5.Vector objects. Calculates the value of Euler's number e (2.71828...) raised to the power\nof a number. Calculates the closest integer value that is less than or equal to the\nvalue of a number. Calculates a number between two numbers at a specific increment. The If the value of Calculates the natural logarithm (the base-e logarithm) of a number. Calculates the magnitude, or length, of a vector. A vector can be thought of in different ways. In one view, a vector is a\npoint in space. The vector's components, A vector can also be thought of as an arrow pointing in space. This view is\nhelpful for programming motion. See p5.Vector for\nmore details. Use p5.Vector.mag() to calculate the\nmagnitude of a p5.Vector object. Re-maps a number from one range to another. For example, calling The sixth parameter, Returns the largest value in a sequence of numbers. The version of The version of Returns the smallest value in a sequence of numbers. The version of The version of Maps a number from one range to a value between 0 and 1. For example, Numbers outside of the original range are not constrained between 0 and 1.\nOut-of-range values are often intentional and useful. Calculates exponential expressions such as 23. For example, Calculates the integer closest to a number. For example, The second parameter, Calculates the square of a number. Squaring a number means multiplying the number by itself. For example,\n Calculates the square root of a number. A number's square root can be multiplied by itself to produce the original\nnumber. For example, Calculates the fractional part of a number. A number's fractional part includes its decimal values. For example,\n Creates a new p5.Vector object. A vector can be thought of in different ways. In one view, a vector is like\nan arrow pointing in space. Vectors have both magnitude (length) and\ndirection. This view is helpful for programming motion. A vector's components determine its magnitude and direction. For example,\ncalling p5.Vector objects are often used to program\nmotion because they simplify the math. For example, a moving ball has a\nposition and a velocity. Position describes where the ball is in space. The\nball's position vector extends from the origin to the ball's center.\nVelocity describes the ball's speed and the direction it's moving. If the\nball is moving straight up, its velocity vector points straight up. Adding\nthe ball's velocity vector to its position vector moves it, as in\n Returns random numbers that can be tuned to feel organic. Values returned by random() and\nrandomGaussian() can change by large\namounts between function calls. By contrast, values returned by The character of the noise can be adjusted in two ways. The first way is to\nscale the inputs. The version of The version of The version of Adjusts the character of the noise produced by the\nnoise() function. Perlin noise values are created by adding layers of noise together. The\nnoise layers, called octaves, are similar to harmonics in music. Lower\noctaves contribute more to the output signal. They define the overall\nintensity of the noise. Higher octaves create finer-grained details. By default, noise values are created by combining four octaves. Each higher\noctave contributes half as much (50% less) compared to its predecessor.\n Sets the seed value for the noise() function. By default, noise() produces different results\neach time a sketch is run. Calling The x component of the vector The y component of the vector The z component of the vector Returns a string representation of a vector. Calling Sets the vector's If a value isn't provided for a component, it will be set to 0. For\nexample, Returns a copy of the p5.Vector object. Adds to a vector's If a value isn't provided for a component, it won't change. For\nexample, The static version of Performs modulo (remainder) division with a vector's If only one value is provided, as in The static version of Subtracts from a vector's If a value isn't provided for a component, it won't change. For\nexample, The static version of Multiplies a vector's If only one value is provided, as in The static version of Divides a vector's If only one value is provided, as in The static version of Calculates the magnitude (length) of the vector. Use mag() to calculate the magnitude of a 2D vector\nusing components as in Calculates the magnitude (length) of the vector squared. Calculates the dot product of two vectors. The dot product is a number that describes the overlap between two vectors.\nVisually, the dot product can be thought of as the \"shadow\" one vector\ncasts on another. The dot product's magnitude is largest when two vectors\npoint in the same or opposite directions. Its magnitude is 0 when two\nvectors form a right angle. The version of The version of The static version of Calculates the cross product of two vectors. The cross product is a vector that points straight out of the plane created\nby two vectors. The cross product's magnitude is the area of the parallelogram\nformed by the original two vectors. The static version of Calculates the distance between two points represented by vectors. A point's coordinates can be represented by the components of a vector\nthat extends from the origin to the point. The static version of Use dist() to calculate the distance between points\nusing coordinates as in Scales the components of a p5.Vector object so\nthat its magnitude is 1. The static version of Limits a vector's magnitude to a maximum value. The static version of Sets a vector's magnitude to a given value. The static version of Calculates the angle a 2D vector makes with the positive x-axis. By convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction. If the vector was created with\ncreateVector(), The static version of Rotates a 2D vector to a specific angle without changing its magnitude. By convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction. If the vector was created with\ncreateVector(), Rotates a 2D vector by an angle without changing its magnitude. By convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction. If the vector was created with\ncreateVector(), The static version of Calculates the angle between two vectors. The angles returned are signed, which means that\n If the vector was created with\ncreateVector(), Calculates new The The static version of Calculates a new heading and magnitude that are between two vectors. The The static version of Reflects a vector about a line in 2D or a plane in 3D. The orientation of the line or plane is described by a normal vector that\npoints away from the shape. The static version of Returns the vector's components as an array of numbers. Checks whether all the vector's components are equal to another vector's. The version of The version of The static version of Creates a new 2D vector from an angle. Creates a new 3D vector from a pair of ISO spherical angles. Creates a new 2D unit vector with a random heading. Creates a new 3D unit vector with a random heading. Multiplies a vector by a scalar and returns a new vector. Rotates the vector (only 2D vectors) by the given angle; magnitude remains the same. Returns a new vector. Divides a vector by a scalar and returns a new vector. Calculates the dot product of two vectors. Calculates the cross product of two vectors. Calculates the Euclidean distance between two points (considering a\npoint as a vector object). Linear interpolate a vector to another vector and return the result as a\nnew vector. Performs spherical linear interpolation with the other vector\nand returns the resulting vector.\nThis works in both 3D and 2D. As for 2D, the result of slerping\nbetween 2D vectors is always a 2D vector. Calculates the magnitude (length) of the vector and returns the result as\na float (this is simply the equation Calculates the squared magnitude of the vector and returns the result\nas a float (this is simply the equation (x*x + y*y + z*z).)\nFaster if the real length is not required in the\ncase of comparing vectors, etc. Normalize the vector to length 1 (make it a unit vector). Limit the magnitude of the vector to the value used for the max\nparameter. Set the magnitude of the vector to the value used for the len\nparameter. Calculate the angle of rotation for this vector (only 2D vectors).\np5.Vectors created using createVector()\nwill take the current angleMode into\nconsideration, and give the angle in radians or degrees accordingly. Calculates and returns the angle between two vectors. This function will take\nthe angleMode on v1 into consideration, and\ngive the angle in radians or degrees accordingly. Reflect a vector about a normal to a line in 2D, or about a normal to a\nplane in 3D. Return a representation of this vector as a float array. This is only\nfor temporary use. If used in any other fashion, the contents should be\ncopied by using the p5.Vector.copy()\nmethod to copy into your own vector. Equality check against a p5.Vector Replaces the components of a p5.Vector that are very close to zero with zero. In computers, handling numbers with decimals can give slightly imprecise answers due to the way those numbers are represented.\nThis can make it hard to check if a number is zero, as it may be close but not exactly zero.\nThis method rounds very close numbers to zero to make those checks easier https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON Sets the seed value for the random() and\nrandomGaussian() functions. By default, random() and\nrandomGaussian() produce different\nresults each time a sketch is run. Calling Returns a random number or a random element from an array. By default, The version of The version of The version of Returns a random number fitting a Gaussian, or normal, distribution. Normal distributions look like bell curves when plotted. Values from a\nnormal distribution cluster around a central value called the mean. The\ncluster's standard deviation describes its spread. By default, There's no minimum or maximum value that The version of The version of The version of Calculates the arc cosine of a number. Calculates the arc sine of a number. Calculates the arc tangent of a number. Calculates the angle formed by a point, the origin, and the positive\nx-axis. By default, Calculates the cosine of an angle. Calculates the sine of an angle. Calculates the tangent of an angle. Converts an angle measured in radians to its value in degrees. Degrees and radians are both units for measuring angles. There are 360˚ in\none full rotation. A full rotation is 2 × π (about 6.28) radians. The same angle can be expressed in with either unit. For example, 90° is a\nquarter of a full rotation. The same angle is 2 × π ÷ 4\n(about 1.57) radians. Converts an angle measured in degrees to its value in radians. Degrees and radians are both units for measuring angles. There are 360˚ in\none full rotation. A full rotation is 2 × π (about 6.28) radians. The same angle can be expressed in with either unit. For example, 90° is a\nquarter of a full rotation. The same angle is 2 × π ÷ 4\n(about 1.57) radians. Changes the unit system used to measure angles. Degrees and radians are both units for measuring angles. There are 360˚ in\none full rotation. A full rotation is 2 × π (about 6.28) radians. Functions such as rotate() and\nsin() expect angles measured radians by default.\nCalling Calling Sets the way text is aligned when text() is called. By default, calling The first parameter, The second parameter, Sets the spacing between lines of text when\ntext() is called. Note: Spacing is measured in pixels. Calling Sets the font size when\ntext() is called. Note: Font size is measured in pixels. Calling Sets the style for system fonts when\ntext() is called. The parameter, Calculates the maximum width of a string of text drawn when\ntext() is called. Calculates the ascent of the current font at its current size. The ascent represents the distance, in pixels, of the tallest character\nabove the baseline. Calculates the descent of the current font at its current size. The descent represents the distance, in pixels, of the character with the\nlongest descender below the baseline. Helper function to measure ascent and descent. Sets the style for wrapping text when\ntext() is called. The parameter, Calling Loads a font and creates a p5.Font object.\n The first parameter, The second parameter, The third parameter, Fonts can take time to load. Calling Draws text to the canvas. The first parameter, The fourth and fifth parameters, Text can be styled a few ways. Call the fill()\nfunction to set the text's fill color. Call\nstroke() and\nstrokeWeight() to set the text's outline.\nCall textSize() and\ntextFont() to set the text's size and font,\nrespectively. Note: Sets the font used by the text() function. The first parameter, The second parameter, Note: The font's underlying\nopentype.js\nfont object. Returns the bounding box for a string of text written using the font. The bounding box is the smallest rectangle that can contain a string of\ntext. The first parameter, The fourth parameter, Returns an array of points outlining a string of text written using the\nfont. Each point object in the array has three properties that describe the\npoint's location and orientation, called its path angle. For example,\n The first parameter, The fourth parameter, The fifth parameter, Adds a value to the end of an array. Extends the length of\nthe array by one. Maps to Array.push(). Copies an array (or part of an array) to another array. The src array is\ncopied to the dst array, beginning at the position specified by\nsrcPosition and into the position specified by dstPosition. The number of\nelements to copy is determined by length. Note that copying values\noverwrites existing values in the destination array. To append values\ninstead of overwriting them, use concat(). The simplified version with only two arguments, arrayCopy(src, dst),\ncopies an entire array to another of the same size. It is equivalent to\narrayCopy(src, 0, dst, 0, src.length). Using this function is far more efficient for copying array data than\niterating through a for() loop and copying each element individually. Concatenates two arrays, maps to Array.concat(). Does not modify the\ninput arrays. Reverses the order of an array, maps to Array.reverse() Decreases an array by one element and returns the shortened array,\nmaps to Array.pop(). Shuffles the elements of an array. The first parameter, The second parameter, Sorts an array of numbers from smallest to largest, or puts an array of\nwords in alphabetical order. The original array is not modified; a\nre-ordered array is returned. The count parameter states the number of\nelements to sort. For example, if there are 12 elements in an array and\ncount is set to 5, only the first 5 elements in the array will be sorted. Inserts a value or an array of values into an existing array. The first\nparameter specifies the initial array to be modified, and the second\nparameter defines the data to be inserted. The third parameter is an index\nvalue which specifies the array position from which to insert data.\n(Remember that array index numbering starts at zero, so the first position\nis 0, the second position is 1, and so on.) Extracts an array of elements from an existing array. The list parameter\ndefines the array from which the elements will be copied, and the start\nand count parameters specify which elements to extract. If no count is\ngiven, elements will be extracted from the start to the end of the array.\nWhen specifying the start, remember that the first array element is 0.\nThis function does not change the source array. Converts a The parameter, Note: If a string can't be converted to a number, as in Converts a The parameter, Note: If a value can't be converted to a number, as in Converts a The parameter, Converts a The parameter, Converts a The parameter, Note: If a value can't be converted to a number, as in Converts a The parameter, See MDN\nfor more information about conversions. Converts a single-character The parameter, Converts a The first parameter, The second parameter, Converts a The first parameter, Combines an array of strings into one string. The first parameter, The second parameter, Applies a regular expression to a string and returns an array with the\nfirst match. The first parameter, The second parameter, Note: If no matches are found, Applies a regular expression to a string and returns an array of matches. The first parameter, The second parameter, Note: If no matches are found, an empty array Converts a The first parameter, The second parameter, The third parameter, When the number is negative, for example, calling Converts a The first parameter, The second parameter, Converts a The first parameter, The second parameter, The third parameter, Converts a positive The first parameter, The second parameter, The third parameter, Splits a The first parameter, The second parameter, Splits a The first parameter, The second parameter, Removes whitespace from the start and end of a The parameter, Returns the current day as a number from 1–31. Returns the current hour as a number from 0–23. Returns the current minute as a number from 0–59. Returns the number of milliseconds since a sketch started running. If a sketch has a\nsetup() function, then Returns the current month as a number from 1–12. Returns the current second as a number from 0–59. Returns the current year as a number such as 1999. Begins adding shapes to a new\np5.Geometry object. The See buildGeometry() for another way to\nbuild 3D shapes. Note: Stops adding shapes to a new\np5.Geometry object and returns the object. The See buildGeometry() for another way to\nbuild 3D shapes. Note: Creates a custom p5.Geometry object from\nsimpler 3D shapes. The parameter, See beginGeometry() and\nendGeometry() for another way to build 3D\nshapes. Note: Clears a p5.Geometry object from the graphics\nprocessing unit (GPU) memory. p5.Geometry objects can contain lots of data\nabout their vertices, surface normals, colors, and so on. Complex 3D shapes\ncan use lots of memory which is a limited resource in many GPUs. Calling\n The parameter, Note: A p5.Geometry object can still be drawn\nafter its resources are cleared from GPU memory. It may take longer to draw\nthe first time it’s redrawn. Note: Draws a plane. A plane is a four-sided, flat shape with every angle measuring 90˚. It’s\nsimilar to a rectangle and offers advanced drawing features in WebGL mode. The first parameter, The second parameter, The third parameter, The fourth parameter, Note: Draws a box (rectangular prism). A box is a 3D shape with six faces. Each face makes a 90˚ with four\nneighboring faces. The first parameter, The second parameter, The third parameter, The fourth parameter, The fifth parameter, Note: Draws a sphere. A sphere is a 3D shape with triangular faces that connect to form a round\nsurface. Spheres with few faces look like crystals. Spheres with many faces\nhave smooth surfaces and look like balls. The first parameter, The second parameter, The third parameter, Note: Draws a cylinder. A cylinder is a 3D shape with triangular faces that connect a flat bottom\nto a flat top. Cylinders with few faces look like boxes. Cylinders with\nmany faces have smooth surfaces. The first parameter, The second parameter, The third parameter, The fourth parameter, The fifth parameter, The sixth parameter, Note: Draws a cone. A cone is a 3D shape with triangular faces that connect a flat bottom to a\nsingle point. Cones with few faces look like pyramids. Cones with many\nfaces have smooth surfaces. The first parameter, The second parameter, The third parameter, The fourth parameter, The fifth parameter, Note: Draws an ellipsoid. An ellipsoid is a 3D shape with triangular faces that connect to form a\nround surface. Ellipsoids with few faces look like crystals. Ellipsoids\nwith many faces have smooth surfaces and look like eggs. The first parameter, The second parameter, The third parameter, The fourth parameter, The fifth parameter, Note: Draws a torus. A torus is a 3D shape with triangular faces that connect to form a ring.\nToruses with few faces look flattened. Toruses with many faces have smooth\nsurfaces. The first parameter, The second parameter, The third parameter, The fourth parameter, Note: Adds geometry from the renderer's immediate mode into the builder's\ncombined geometry. Adds geometry from the renderer's retained mode into the builder's\ncombined geometry. Cleans up the state of the renderer and returns the combined geometry that\nwas built. Keeps track of how many custom geometry objects have been made so that each\ncan be assigned a unique ID. Allows the user to orbit around a 3D sketch using a mouse, trackpad, or\ntouchscreen. 3D sketches are viewed through an imaginary camera. Calling\n Left-clicking and dragging or swipe motion will rotate the camera position\nabout the center of the sketch. Right-clicking and dragging or multi-swipe\nwill pan the camera position without rotation. Using the mouse wheel\n(scrolling) or pinch in/out will move the camera further or closer from the\ncenter of the sketch. The first three parameters, The fourth parameter, Adds a grid and an axes icon to clarify orientation in 3D sketches. There are four ways to call The first way to call The second way to call The third way to call The fourth way to call Turns off debugMode() in a 3D sketch. Creates a light that shines from all directions. Ambient light does not come from one direction. Instead, 3D shapes are\nlit evenly from all sides. Ambient lights are almost always used in\ncombination with other types of lights. There are three ways to call The first way to call The second way to call The third way to call Sets the specular color for lights. Note: There are three ways to call The first way to call The second way to call The third way to call Creates a light that shines in one direction. Directional lights don’t shine from a specific point. They’re like a sun\nthat shines from somewhere offscreen. The light’s direction is set using\nthree There are four ways to call The first way to call The second way to call The third way to call The fourth way to call Creates a light that shines from a point in all directions. Point lights are like light bulbs that shine in all directions. They can be\nplaced at different positions to achieve different lighting effects. A\nmaximum of 5 point lights can be active at once. There are four ways to call The first way to call The second way to call The third way to call The fourth way to call Creates an ambient light from an image. The parameter, Creates an immersive 3D background. Places an ambient and directional light in the scene.\nThe lights are set to ambientLight(128, 128, 128) and\ndirectionalLight(128, 128, 128, 0, 0, -1). Note: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop. Sets the falloff rate for pointLight()\nand spotLight(). A light’s falloff describes the intensity of its beam at a distance. For\nexample, a lantern has a slow falloff, a flashlight has a medium falloff,\nand a laser pointer has a sharp falloff. Note: Creates a light that shines from a point in one direction. Spot lights are like flashlights that shine in one direction creating a\ncone of light. The shape of the cone can be controlled using the angle and\nconcentration parameters. A maximum of 5 spot lights can be active at once. There are eight ways to call The The Removes all lights from the sketch. Calling Loads a 3D model to create a\np5.Geometry object. There are three ways to call The first parameter, Note: When loading a The first way to call The second way to call The third way to call Models can take time to load. Calling Note: There’s no support for colored STL files. STL files with color will\nbe rendered without color. Parse OBJ lines into model. For reference, this is what a simple model of a\nsquare might look like: v -0.5 -0.5 0.5\nv -0.5 -0.5 -0.5\nv -0.5 0.5 -0.5\nv -0.5 0.5 0.5 f 4 3 2 1 STL files can be of two types, ASCII and Binary, We need to convert the arrayBuffer to an array of strings,\nto parse it as an ASCII file. This function checks if the file is in ASCII format or in Binary format It is done by searching keyword An ASCII STL data must begin with Several encodings, such as UTF-8, precede the text with up to 5 bytes:\nhttps://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding\nSearch for This function matches the This function parses the Binary STL files.\nhttps://en.wikipedia.org/wiki/STL_%28file_format%29#Binary_STL Currently there is no support for the colors provided in STL files. ASCII STL file starts with Draws a p5.Geometry object to the canvas. The parameter, Note: Load a 3d model from an OBJ or STL string. OBJ and STL files lack a built-in sense of scale, causing models exported from different programs to vary in size.\nIf your model doesn't display correctly, consider using Also, the support for colored STL files is not present. STL files with color will be\nrendered without color properties. Loads vertex and fragment shaders to create a\np5.Shader object. Shaders are programs that run on the graphics processing unit (GPU). They\ncan process many pixels at the same time, making them fast for many\ngraphics tasks. They’re written in a language called\nGLSL\nand run along with the rest of the code in a sketch. Once the p5.Shader object is created, it can be\nused with the shader() function, as in\n The third parameter, The fourth parameter, Shaders can take time to load. Calling Note: Shaders can only be used in WebGL mode. Creates a new p5.Shader object. Shaders are programs that run on the graphics processing unit (GPU). They\ncan process many pixels at the same time, making them fast for many\ngraphics tasks. They’re written in a language called\nGLSL\nand run along with the rest of the code in a sketch. Once the p5.Shader object is created, it can be\nused with the shader() function, as in\n The first parameter, The second parameter, A shader can optionally describe hooks, which are functions in GLSL that\nusers may choose to provide to customize the behavior of the shader using the\n Then, in your vertex shader source, you can run a hook by calling a function\nwith the same name prefixed by Note: Only filter shaders can be used in 2D mode. All shaders can be used\nin WebGL mode. Creates a p5.Shader object to be used with the\nfilter() function. The parameter, The p5.Shader object that's created has some\nuniforms that can be set: The p5.Shader that's created also provides\n For more info about filters and shaders, see Adam Ferriss' repo of shader examples\nor the Introduction to Shaders tutorial. Sets the p5.Shader object to apply while drawing. Shaders are programs that run on the graphics processing unit (GPU). They\ncan process many pixels or vertices at the same time, making them fast for\nmany graphics tasks. They’re written in a language called\nGLSL\nand run along with the rest of the code in a sketch.\np5.Shader objects can be created using the\ncreateShader() and\nloadShader() functions. The parameter, The source code from a p5.Shader object's\nfragment and vertex shaders will be compiled the first time it's passed to\n Calling resetShader() restores a sketch’s\ndefault shaders. Note: Shaders can only be used in WebGL mode. Get the default shader used with lights, materials,\nand textures. You can call Called at the start of the vertex shader. Update the position of vertices before transforms are applied. It takes in Update the position of vertices after transforms are applied. It takes in Update the normal before transforms are applied. It takes in Update the normal after transforms are applied. It takes in Update the texture coordinates. It takes in Update the color of each vertex. It takes in a Called at the end of the vertex shader. Called at the start of the fragment shader. Update the per-pixel inputs of the material. It takes in an Take in a Update the final color after mixing. It takes in a Called at the end of the fragment shader. Most of the time, you will need to write your hooks in GLSL ES version 300. If you\nare using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead. Call Get the shader used by You can call Most of the time, you will need to write your hooks in GLSL ES version 300. If you\nare using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead. Call Get the shader used when no lights or materials are applied. You can call Most of the time, you will need to write your hooks in GLSL ES version 300. If you\nare using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead. Call Get the shader used when drawing the strokes of shapes. You can call Called at the start of the vertex shader. Update the position of vertices before transforms are applied. It takes in Update the position of vertices after transforms are applied. It takes in Update the stroke weight. It takes in Update the center of the line. It takes in Update the position of each vertex on the edge of the line. It takes in Update the color of each vertex. It takes in a Called at the end of the vertex shader. Called at the start of the fragment shader. Update the inputs to the shader. It takes in a struct Caps and joins are made by discarded pixels in the fragment shader to carve away unwanted areas. Use this to change this logic. It takes in a Update the final color after mixing. It takes in a Called at the end of the fragment shader. Most of the time, you will need to write your hooks in GLSL ES version 300. If you\nare using WebGL 1 instead of 2, write your hooks in GLSL ES 100 instead. Call Restores the default shaders. Note: Shaders can only be used in WebGL mode. Sets the texture that will be used on shapes. A texture is like a skin that wraps around a shape. The parameter, To texture a geometry created with beginShape(),\nyou will need to specify uv coordinates in vertex(). Note: Changes the coordinate system used for textures when they’re applied to\ncustom shapes. In order for texture() to work, a shape needs a\nway to map the points on its surface to the pixels in an image. Built-in\nshapes such as rect() and\nbox() already have these texture mappings based on\ntheir vertices. Custom shapes created with\nvertex() require texture mappings to be passed as\nuv coordinates. Each call to vertex() must include 5 arguments,\nas in // Draw the rectangle.\nrect(0, 0, 30, 50);\np5.Graphics object provides a dedicated drawing surface called a\ngraphics buffer. Graphics buffers are helpful when drawing should happen\noffscreen. For example, separate scenes can be drawn offscreen and\ndisplayed only when needed.p5.Graphics objects have nearly all the drawing features of the main\ncanvas. For example, calling the method myGraphics.circle(50, 50, 20)\ndraws to the graphics buffer. The resulting image can be displayed on the\nmain canvas by passing the p5.Graphics object to the\nimage() function, as in image(myGraphics, 0, 0).\n
p5.Color object stores the color mode\nand level maxes that were active during its construction. These values are\nused to interpret the arguments passed to the object's constructor. They\nalso determine output formatting such as when\nsaturation() is called.p5.Element class. They're created\nwith functions such as createCanvas() and\ncreateButton().p5.Graphics object provides a dedicated drawing surface called a\ngraphics buffer. Graphics buffers are helpful when drawing should happen\noffscreen. For example, separate scenes can be drawn offscreen and\ndisplayed only when needed.p5.Graphics objects have nearly all the drawing features of the main\ncanvas. For example, calling the method myGraphics.circle(50, 50, 20)\ndraws to the graphics buffer. The resulting image can be displayed on the\nmain canvas by passing the p5.Graphics object to the\nimage() function, as in image(myGraphics, 0, 0).p5.MediaElement extends p5.Element with\nmethods to handle audio and video. p5.MediaElement objects are created by\ncalling createVideo,\ncreateAudio, and\ncreateCapture.p5.File objects are used by\nmyElement.drop() and\ncreated by\ncreateFileInput.p5.Image objects\nhave methods for common tasks such as applying filters and modifying\npixel values.p5.PrintWriter object provides a way to save a sequence of text\ndata, called the print stream, to the user's computer. It's a low-level\nobject that enables precise control of text output. Functions such as\nsaveStrings() and\nsaveJSON() are easier to use for simple file\nsaving.p5.XML object provides an easy way to interact with XML data.\nExtensible Markup Language\n(XML)\nis a standard format for sending data between applications. Like HTML, the\nXML format is based on tags and attributes, as in\n<time units=\"s\">1234</time>.p5.Vector objects are often used to program motion because they simplify\nthe math. For example, a moving ball has a position and a velocity.\nPosition describes where the ball is in space. The ball's position vector\nextends from the origin to the ball's center. Velocity describes the ball's\nspeed and the direction it's moving. If the ball is moving straight up, its\nvelocity vector points straight up. Adding the ball's velocity vector to\nits position vector moves it, as in pos.add(vel). Vector math relies on\nmethods inside the p5.Vector class.p5.Camera object represents a camera that views a section of 3D\nspace. It stores information about the camera’s position, orientation, and\nprojection.p5.Camera object that can be\ncontrolled with the camera(),\nperspective(),\northo(), and\nfrustum() functions. Additional cameras can be\ncreated with createCamera() and activated\nwith setCamera().p5.Camera’s methods operate in two coordinate systems:\n
\n",
"is_constructor": 1,
@@ -2484,7 +2484,7 @@
"extension_for": [],
"module": "Rendering",
"namespace": "",
- "file": "src/webgl/p5.Framebuffer.js",
+ "file": "src\\webgl\\p5.Framebuffer.js",
"line": 76,
"description": "myCamera.setPosition() places the camera in 3D space using\n\"world\" coordinates.myCamera.move() moves the camera along its own axes.p5.Framebuffer object provides a dedicated drawing surface called\na framebuffer. They're similar to\np5.Graphics objects but can run much faster.\nPerformance is improved because the framebuffer shares the same WebGL\ncontext as the canvas used to create it.p5.Framebuffer objects have all the drawing features of the main\ncanvas. Drawing instructions meant for the framebuffer must be placed\nbetween calls to\nmyBuffer.begin() and\nmyBuffer.end(). The resulting image\ncan be applied as a texture by passing the p5.Framebuffer object to the\ntexture() function, as in texture(myBuffer).\nIt can also be displayed on the main canvas by passing it to the\nimage() function, as in image(myBuffer, 0, 0).p5.Geometry object represents a 3D shape as a set of connected\npoints called vertices. All 3D shapes are made by connecting vertices to\nform triangles that are stitched together. Each triangular patch on the\ngeometry's surface is called a face. The geometry stores information\nabout its vertices and faces for use with effects such as lighting and\ntexture mapping.detailX, is optional. If a number is passed, as in\nnew p5.Geometry(24), it sets the number of triangle subdivisions to use\nalong the geometry's x-axis. By default, detailX is 1.detailY, is also optional. If a number is passed,\nas in new p5.Geometry(24, 16), it sets the number of triangle\nsubdivisions to use along the geometry's y-axis. By default, detailX is\n1.callback, is also optional. If a function is passed,\nas in new p5.Geometry(24, 16, createShape), it will be called once to add\nvertices to the new 3D shape.p5.Shader object contains a shader program that runs on the graphics\nprocessing unit (GPU). Shaders can process many pixels or vertices at the\nsame time, making them fast for many graphics tasks. They’re written in a\nlanguage called\nGLSL\nand run along with the rest of the code in a sketch.p5.Shader object is\ncreated, it can be used with the shader()\nfunction, as in shader(myShader).
\n{\n vertex: {\n 'void beforeVertex': '() {}'\n }\n}\nHOOK_:
\nvoid main() {\n HOOK_beforeVertex();\n // Add the rest of your shader code here!\n}\n
• FFT.waveform() computes\namplitude values along the time domain. The array indices correspond\nto samples across a brief moment in time. Each value represents\namplitude of the waveform at that sample of time.
\n• FFT.analyze() computes amplitude values along the\nfrequency domain. The array indices correspond to frequencies (i.e.\npitches), from the lowest to the highest that humans can hear. Each\nvalue represents amplitude at that slice of the frequency spectrum.\nUse with getEnergy() to measure amplitude at specific\nfrequencies, or within a range of frequencies. bins. The array is 1024 bins long by default.\nYou can change the bin array length, but it must be a power of 2\nbetween 16 and 1024 in order for the FFT algorithm to function\ncorrectly. The actual size of the FFT buffer is twice the\nnumber of bins, so given a standard sample rate, the buffer is\n2048/44100 seconds long.new p5.SinOsc().\nThis creates a Sine Wave Oscillator and is\nequivalent to new p5.Oscillator('sine')\n or creating a p5.Oscillator and then calling\nits method setType('sine').\nSee p5.Oscillator for methods.new p5.TriOsc().\nThis creates a Triangle Wave Oscillator and is\nequivalent to new p5.Oscillator('triangle')\n or creating a p5.Oscillator and then calling\nits method setType('triangle').\nSee p5.Oscillator for methods.new p5.SawOsc().\nThis creates a SawTooth Wave Oscillator and is\nequivalent to new p5.Oscillator('sawtooth')\n or creating a p5.Oscillator and then calling\nits method setType('sawtooth').\nSee p5.Oscillator for methods.new p5.SqrOsc().\nThis creates a Square Wave Oscillator and is\nequivalent to new p5.Oscillator('square')\n or creating a p5.Oscillator and then calling\nits method setType('square').\nSee p5.Oscillator for methods.osc.freq(env).setRange to change the attack/release level.\nUse setADSR to change attackTime, decayTime, sustainPercent and releaseTime.play method to play the entire envelope,\nthe ramp method for a pingable trigger,\nor triggerAttack/\ntriggerRelease to trigger noteOn/noteOff.p5.Oscillator for a full list of methods.
\nThis module handles the nodes and methods that are\ncommon and useful for current and future effects.p5.LowPass:\nAllows frequencies below the cutoff frequency to pass through,\nand attenuates frequencies above the cutoff.
\np5.HighPass:\nThe opposite of a lowpass filter.
\np5.BandPass:\nAllows a range of frequencies to pass through and attenuates\nthe frequencies below and above this frequency range.
\n\n.res() method controls either width of the\nbandpass, or resonance of the low/highpass cutoff frequency.new p5.LowPass() Filter.\nThis is the same as creating a p5.Filter and then calling\nits method setType('lowpass').\nSee p5.Filter for methods.new p5.HighPass() Filter.\nThis is the same as creating a p5.Filter and then calling\nits method setType('highpass').\nSee p5.Filter for methods.new p5.BandPass() Filter.\nThis is the same as creating a p5.Filter and then calling\nits method setType('bandpass').\nSee p5.Filter for methods.p5.soundOut.audiocontext.listenercreateConvolution(path) to instantiate a\np5.Convolver with a path to your impulse response audio file.playNote(value){}. The array determines\nwhich value is passed into the callback at each step of the\nphrase. It can be numbers, an object with multiple numbers,\nor a zero (0) indicates a rest so the callback won't be called).new p5.Score(a, a, b, a, c)update in the draw loop\nand pass in a p5.FFT object.\nfreq1 and freq2.\nthreshold is the threshold for detecting a peak,\nscaled between 0 and 1. It is logarithmic, so 0.1 is half as loud\nas 1.0. framesPerPeak = 60 / (estimatedBPM / 60 );\ntext, is the description of the canvas.display, is optional. It determines how the\ndescription is displayed. If LABEL is passed, as in\ndescribe('A description.', LABEL), the description will be visible in\na div element next to the canvas. If FALLBACK is passed, as in\ndescribe('A description.', FALLBACK), the description will only be\nvisible to screen readers. This is the default mode.name, is the name of the element.text, is the description of the element.display, is optional. It determines how the\ndescription is displayed. If LABEL is passed, as in\ndescribe('A description.', LABEL), the description will be visible in\na div element next to the canvas. Using LABEL creates unhelpful\nduplicates for screen readers. Only use LABEL during development. If\nFALLBACK is passed, as in describe('A description.', FALLBACK), the\ndescription will only be visible to screen readers. This is the default\nmode.textOutput() adds a general description, list of shapes, and\ntable of shapes to the web page. The general description includes the\ncanvas size, canvas color, and number of shapes. For example,\nYour output is a, 100 by 100 pixels, gray canvas containing the following 2 shapes:.a red circle at middle covering 3% of the canvas. Each shape can be\nselected to get more details.textOutput() uses its table of shapes as a list. The table describes the\nshape, color, location, coordinates and area. For example,\nred circle location = middle area = 3%. This is different from\ngridOutput(), which uses its table as a grid.display parameter is optional. It determines how the description is\ndisplayed. If LABEL is passed, as in textOutput(LABEL), the description\nwill be visible in a div element next to the canvas. Using LABEL creates\nunhelpful duplicates for screen readers. Only use LABEL during\ndevelopment. If FALLBACK is passed, as in textOutput(FALLBACK), the\ndescription will only be visible to screen readers. This is the default\nmode.gridOutput() adds a general description, table of shapes, and list of\nshapes to the web page. The general description includes the canvas size,\ncanvas color, and number of shapes. For example,\ngray canvas, 100 by 100 pixels, contains 2 shapes: 1 circle 1 square.gridOutput() uses its table of shapes as a grid. Each shape in the grid\nis placed in a cell whose row and column correspond to the shape's location\non the canvas. The grid cells describe the color and type of shape at that\nlocation. For example, red circle. These descriptions can be selected\nindividually to get more details. This is different from\ntextOutput(), which uses its table as a list.red circle, location = middle, area = 3 %.display parameter is optional. It determines how the description is\ndisplayed. If LABEL is passed, as in gridOutput(LABEL), the description\nwill be visible in a div element next to the canvas. Using LABEL creates\nunhelpful duplicates for screen readers. Only use LABEL during\ndevelopment. If FALLBACK is passed, as in gridOutput(FALLBACK), the\ndescription will only be visible to screen readers. This is the default\nmode.alpha() extracts the alpha value from a\np5.Color object, an array of color components, or\na CSS color string.blue() extracts the blue value from a\np5.Color object, an array of color components, or\na CSS color string.blue() returns a color's blue value in the range 0\nto 255. If the colorMode() is set to RGB, it\nreturns the blue value in the given range.brightness() extracts the HSB brightness value from a\np5.Color object, an array of color components, or\na CSS color string.brightness() returns a color's HSB brightness in the range 0\nto 100. If the colorMode() is set to HSB, it\nreturns the brightness value in the given range.color(255, 204, 0) will return a bright yellow color. The way these\nparameters are interpreted may be changed with the\ncolorMode() function.color() with one parameter interprets the value one of two\nways. If the parameter is a number, it's interpreted as a grayscale value.\nIf the parameter is a string, it's interpreted as a CSS color string.color() with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.color() with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current colorMode().color() with four parameters interprets them as RGBA, HSBA,\nor HSLA colors, depending on the current colorMode(). The last parameter\nsets the alpha (transparency) value.green() extracts the green value from a\np5.Color object, an array of color components, or\na CSS color string.green() returns a color's green value in the range 0\nto 255. If the colorMode() is set to RGB, it\nreturns the green value in the given range.hue() extracts the hue value from a\np5.Color object, an array of color components, or\na CSS color string.hue()\nreturns a color's HSL hue in the range 0 to 360. If the\ncolorMode() is set to HSB or HSL, it returns the hue\nvalue in the given mode.amt parameter specifies the amount to interpolate between the two\nvalues. 0 is equal to the first color, 0.1 is very near the first color,\n0.5 is halfway between the two colors, and so on. Negative numbers are set\nto 0. Numbers greater than 1 are set to 1. This differs from the behavior of\nlerp. It's necessary because numbers outside of the\ninterval [0, 1] will produce strange and unexpected colors.amt parameter specifies the amount to interpolate between the color\nstops which are colors at each amt value \"location\" with amt values\nthat are between 2 color stops interpolating between them based on its relative\ndistance to both.lightness() extracts the HSL lightness value from a\np5.Color object, an array of color components, or\na CSS color string.lightness() returns a color's HSL lightness in the range 0\nto 100. If the colorMode() is set to HSL, it\nreturns the lightness value in the given range.red() extracts the red value from a\np5.Color object, an array of color components, or\na CSS color string.red() returns a color's red value in the range 0\nto 255. If the colorMode() is set to RGB, it\nreturns the red value in the given range.saturation() extracts the saturation value from a\np5.Color object, an array of color components, or\na CSS color string.saturation()\nreturns a color's HSL saturation in the range 0 to 100. If the\ncolorMode() is set to HSB or HSL, it returns the\nsaturation value in the given mode.String.myColor.toString() can be useful for debugging, as in\nprint(myColor.toString()). It's also helpful for using p5.js with other\nlibraries.format, is optional. If a format string is passed, as in\nmyColor.toString('#rrggbb'), it will determine how the color string is\nformatted. By default, color strings are formatted as 'rgba(r, g, b, a)'.beginClip() and\nendClip() will add to the mask shape. The mask\nwill apply to anything drawn after endClip().options, is optional. If an object with an invert\nproperty is passed, as in beginClip({ invert: true }), it will be used to\nset the masking mode. { invert: true } inverts the mask, creating holes\nin shapes that are masked. invert is false by default.callback, is a function that defines the mask.\nAny shapes drawn in callback will add to the mask shape. The mask\nwill apply to anything drawn after clip() is called.options, is optional. If an object with an invert\nproperty is passed, as in beginClip({ invert: true }), it will be used to\nset the masking mode. { invert: true } inverts the mask, creating holes\nin shapes that are masked. invert is false by default.background() is typically used\nwithin draw() to clear the display window at the\nbeginning of each frame. It can also be used inside\nsetup() to set the background on the first frame\nof animation.background() with one parameter interprets the value one\nof four ways. If the parameter is a Number, it's interpreted as a grayscale\nvalue. If the parameter is a String, it's interpreted as a CSS color string.\nRGB, RGBA, HSL, HSLA, hex, and named color strings are supported. If the\nparameter is a p5.Color object, it will be used as\nthe background color. If the parameter is a\np5.Image object, it will be used as the background\nimage.background() with two parameters interprets the first one\nas a grayscale value. The second parameter sets the alpha (transparency)\nvalue.background() with three parameters interprets them as RGB,\nHSB, or HSL colors, depending on the current\ncolorMode(). By default, colors are specified\nin RGB values. Calling background(255, 204, 0) sets the background a bright\nyellow color.clear() makes every pixel 100% transparent. Calling clear() doesn't\nclear objects created by createX() functions such as\ncreateGraphics(),\ncreateVideo(), and\ncreateImg(). These objects will remain\nunchanged after calling clear() and can be redrawn.Number parameters for fill(),\nstroke(),\nbackground(), and\ncolor() are defined by values between 0 and 255\nusing the RGB color model. This is equivalent to calling\ncolorMode(RGB, 255). Pure red is color(255, 0, 0) in this model.colorMode(RGB, 100) sets colors to use RGB color values\nbetween 0 and 100. Pure red is color(100, 0, 0) in this model.colorMode(HSB) or colorMode(HSL) changes to HSB or HSL system\ninstead of RGB. Pure red is color(0, 100, 100) in HSB and\ncolor(0, 100, 50) in HSL.fill(255, 165, 0) or fill('orange') means all shapes drawn\nafter the fill command will be filled with the color orange.fill() with one parameter interprets the value one of\nthree ways. If the parameter is a Number, it's interpreted as a grayscale\nvalue. If the parameter is a String, it's interpreted as a CSS color\nstring. A p5.Color object can also be provided to\nset the fill color.fill() with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current\ncolorMode(). The default color space is RGB,\nwith each value in the range from 0 to 255.noFill() is the same as making the fill completely transparent,\nas in fill(0, 0). If both noStroke() and\nnoFill() are called, nothing will be drawn to the screen.noStroke() is the same as making the stroke completely transparent,\nas in stroke(0, 0). If both noStroke() and\nnoFill() are called, nothing will be drawn to the\nscreen.stroke(255, 165, 0) or stroke('orange') means all shapes drawn\nafter calling stroke() will be filled with the color orange. The way\nthese parameters are interpreted may be changed with the\ncolorMode() function.stroke() with one parameter interprets the value one of\nthree ways. If the parameter is a Number, it's interpreted as a grayscale\nvalue. If the parameter is a String, it's interpreted as a CSS color\nstring. A p5.Color object can also be provided to\nset the stroke color.stroke() with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.stroke() with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current colorMode().stroke() with four parameters interprets them as RGBA, HSBA,\nor HSLA colors, depending on the current colorMode(). The last parameter\nsets the alpha (transparency) value.erase() will subtract from the canvas, revealing\nthe web page underneath. The erased areas will become transparent, allowing\nthe content behind the canvas to show through. The\nfill(), stroke(), and\nblendMode() have no effect once erase() is\ncalled.erase() function has two optional parameters. The first parameter\nsets the strength of erasing by the shape's interior. A value of 0 means\nthat no erasing will occur. A value of 255 means that the shape's interior\nwill fully erase the content underneath. The default value is 255\n(full strength).erase() has no effect on drawing done with the\nimage() and\nbackground() functions.\n
\n",
"class": "p5",
@@ -4879,7 +4879,7 @@
"submodule": "2D Primitives"
},
{
- "file": "src/core/shape/2d_primitives.js",
+ "file": "src\\core\\shape\\2d_primitives.js",
"line": 102,
"description": "
\n0 <= start < TWO_PI ; start <= stop < start + TWO_PI\nx, y, w, and\nh parameters. x and y set the location of the arc's center. w and\nh set the arc's width and height. See\nellipse() and\nellipseMode() for more details.start and stop, set the angles\nbetween which to draw the arc. Arcs are always drawn clockwise from\nstart to stop. The fifth and sixth parameters, start and stop, set the\nangles between which to draw the arc. Arcs are always drawn clockwise from\nstart to stop. By default, angles are given in radians, but if angleMode\n(DEGREES) is set, the function interprets the values in degrees.mode, is optional. It determines the arc's fill\nstyle. The fill modes are a semi-circle (OPEN), a closed semi-circle\n(CHORD), or a closed pie segment (PIE).detail, is also optional. It determines how many\nvertices are used to draw the arc in WebGL mode. The default value is 25.x, y, w, and\nh parameters. x and y set the location of its center. w and\nh set its width and height. See\nellipseMode() for other ways to set\nits position.detail, is also optional. It determines how many\nvertices are used to draw the ellipse in WebGL mode. The default value is\n25.x, y, and d parameters.\nx and y set the location of its center. d sets its width and height (diameter).\nEvery point on the circle's edge is the same distance, 0.5 * d, from its center.\n0.5 * d (half the diameter) is the circle's radius.\nSee ellipseMode() for other ways to set its position.line() with four\nparameters draws the line in 2D. To color a line, use the\nstroke() function. To change its width, use the\nstrokeWeight() function. A line\ncan't be filled, so the fill() function won't\naffect the line's color.line() with six parameters allows the line to be drawn in\n3D space. Doing so requires adding the WEBGL argument to\ncreateCanvas().point() with two parameters allows the point's location to\nbe set with its x- and y-coordinates, as in point(10, 20).point() with three parameters allows the point to be drawn\nin 3D space with x-, y-, and z-coordinates, as in point(10, 20, 30).\nDoing so requires adding the WEBGL argument to\ncreateCanvas().point() with one parameter allows the point's location to\nbe set with a p5.Vector object.(x1, y1) sets the quad's first point. The next\nthree pairs of parameters set the coordinates for its next three points\n(x2, y2), (x3, y3), and (x4, y4). Points should be added in either\nclockwise or counter-clockwise order.quad() with twelve parameters allows the quad to be drawn\nin 3D space. Doing so requires adding the WEBGL argument to\ncreateCanvas().x, y, w, and h\nparameters. x and y set the location of its top-left corner. w sets\nits width and h sets its height. Every angle in the rectangle measures\n90˚. See rectMode() for other ways to define\nrectangles.rect() with five parameters creates a rounded rectangle. The\nfifth parameter sets the radius for all four corners.rect() with eight parameters also creates a rounded\nrectangle. Each of the last four parameters set the radius of a corner. The\nradii start with the top-left corner and move clockwise around the\nrectangle. If any of these parameters are omitted, they are set to the\nvalue of the last radius that was set.x, y, and s\nparameters. x and y set the location of its top-left corner. s sets\nits width and height. Every angle in the square measures 90˚ and all its\nsides are the same length. See rectMode() for\nother ways to define squares.square() with four parameters creates a rounded square.\nThe fourth parameter sets the radius for all four corners.square() with seven parameters also creates a rounded\nsquare. Each of the last four parameters set the radius of a corner. The\nradii start with the top-left corner and move clockwise around the\nsquare. If any of these parameters are omitted, they are set to the\nvalue of the last radius that was set.(x1, y1). The\nmiddle two parameters specify its second point (x2, y2). And the last two\nparameters specify its third point (x3, y3).ellipseMode(CENTER).ellipseMode(RADIUS) also uses the first two parameters to set the x- and\ny-coordinates of the shape's center. The next parameters are half of the\nshapes's width and height. Calling ellipse(0, 0, 10, 15) draws a shape\nwith a width of 20 and height of 30.ellipseMode(CORNER) uses the first two parameters as the upper-left\ncorner of the shape. The next parameters are its width and height.ellipseMode(CORNERS) uses the first two parameters as the location of one\ncorner of the ellipse's bounding box. The next parameters are the location\nof the opposite corner.ellipseMode() must be written in ALL CAPS because\nthe constants CENTER, RADIUS, CORNER, and CORNERS are defined this\nway. JavaScript is a case-sensitive language.noSmooth() is helpful for scaling up images without blurring. The\nfunctions don't affect shapes or fonts.noSmooth() causes all shapes to be drawn with jagged\n(aliased) edges. The functions don't affect images or fonts.rectMode(CORNER).rectMode(CORNERS) also uses the first two parameters as the location of\none of the corners. The next parameters are the location of the opposite\ncorner. This mode only works for rect().rectMode(CENTER) uses the first two parameters as the x- and\ny-coordinates of the shape's center. The next parameters are its width and\nheight.rectMode(RADIUS) also uses the first two parameters as the x- and\ny-coordinates of the shape's center. The next parameters are\nhalf of the shape's width and height.rectMode() must be written in ALL CAPS because the\nconstants CENTER, RADIUS, CORNER, and CORNERS are defined this way.\nJavaScript is a case-sensitive language.smooth() is active by default. In 2D mode,\nnoSmooth() is helpful for scaling up images\nwithout blurring. The functions don't affect shapes or fonts.ROUND), squared\n(SQUARE), or extended (PROJECT). The default cap is ROUND.strokeCap() must be written in ALL CAPS because\nthe constants ROUND, SQUARE, and PROJECT are defined this way.\nJavaScript is a case-sensitive language.MITER), beveled (BEVEL), or rounded\n(ROUND). The default joint is MITER in 2D mode and ROUND in WebGL\nmode.strokeJoin() must be written in ALL CAPS because\nthe constants MITER, BEVEL, and ROUND are defined this way.\nJavaScript is a case-sensitive language.strokeWeight() is affected by transformations, especially calls to\nscale().x1 and y1, set the first anchor point. The\nfirst anchor point is where the curve starts.x2, y2, x3, and y3, set the two control\npoints. The control points \"pull\" the curve towards them.x4 and y4, set the last anchor\npoint. The last anchor point is where the curve ends.bezier() has twelve arguments because each point has x-, y-,\nand z-coordinates.detail, is the number of segments to use while drawing a\nBézier curve. For example, calling bezierDetail(5) will use 5 segments to\ndraw curves with the bezier() function. By\ndefault,detail is 20.bezierDetail() has no effect in 2D mode.bezierPoint() calculates coordinates along a Bézier curve using the\nanchor and control points. It expects points in the same order as the\nbezier() function. bezierPoint() works one axis\nat a time. Passing the anchor and control points' x-coordinates will\ncalculate the x-coordinate of a point on the curve. Passing the anchor and\ncontrol points' y-coordinates will calculate the y-coordinate of a point on\nthe curve.a, is the coordinate of the first anchor point.b and c, are the coordinates of the\ncontrol points.d, is the coordinate of the last anchor point.t, is the amount to interpolate along the curve. 0\nis the first anchor point, 1 is the second anchor point, and 0.5 is halfway\nbetween them.bezierTangent() calculates coordinates along a tangent line using the\nBézier curve's anchor and control points. It expects points in the same\norder as the bezier() function. bezierTangent()\nworks one axis at a time. Passing the anchor and control points'\nx-coordinates will calculate the x-coordinate of a point on the tangent\nline. Passing the anchor and control points' y-coordinates will calculate\nthe y-coordinate of a point on the tangent line.a, is the coordinate of the first anchor point.b and c, are the coordinates of the\ncontrol points.d, is the coordinate of the last anchor point.t, is the amount to interpolate along the curve. 0\nis the first anchor point, 1 is the second anchor point, and 0.5 is halfway\nbetween them.x1 and y1, set the first control point. This\npoint isn’t drawn and can be thought of as the curve’s starting point.x2, y2, x3, and y3, set the two anchor\npoints. The anchor points are the start and end points of the curve’s\nvisible segment.x4 and y4, set the last control\npoint. This point isn’t drawn and can be thought of as the curve’s ending\npoint.curve() has twelve arguments because each point has x-, y-, and\nz-coordinates.detail, is the number of segments to use while drawing a\nspline curve. For example, calling curveDetail(5) will use 5 segments to\ndraw curves with the curve() function. By\ndefault,detail is 20.curveDetail() has no effect in 2D mode.curveTightness() adjusts how tightly the cable is attached to the points.tightness, determines how the curve fits to the vertex\npoints. By default, tightness is set to 0. Setting tightness to 1,\nas in curveTightness(1), connects the curve's points using straight\nlines. Values in the range from –5 to 5 deform curves while leaving them\nrecognizable.curvePoint() calculates coordinates along a spline curve using the\nanchor and control points. It expects points in the same order as the\ncurve() function. curvePoint() works one axis\nat a time. Passing the anchor and control points' x-coordinates will\ncalculate the x-coordinate of a point on the curve. Passing the anchor and\ncontrol points' y-coordinates will calculate the y-coordinate of a point on\nthe curve.a, is the coordinate of the first control point.b and c, are the coordinates of the\nanchor points.d, is the coordinate of the last control point.t, is the amount to interpolate along the curve. 0\nis the first anchor point, 1 is the second anchor point, and 0.5 is halfway\nbetween them.curveTangent() calculates coordinates along a tangent line using the\nspline curve's anchor and control points. It expects points in the same\norder as the curve() function. curveTangent()\nworks one axis at a time. Passing the anchor and control points'\nx-coordinates will calculate the x-coordinate of a point on the tangent\nline. Passing the anchor and control points' y-coordinates will calculate\nthe y-coordinate of a point on the tangent line.a, is the coordinate of the first control point.b and c, are the coordinates of the\nanchor points.d, is the coordinate of the last control point.t, is the amount to interpolate along the curve. 0\nis the first anchor point, 1 is the second anchor point, and 0.5 is halfway\nbetween them.beginContour() and endContour()\nfunctions allow for creating negative space within custom shapes that are\nflat. beginContour() begins adding vertices to a negative space and\nendContour() stops adding them.\nbeginContour() and endContour() must be\ncalled between beginShape() and\nendShape().beginContour() and\nendContour(). It's also not possible to use\nother shapes, such as ellipse() or\nrect(), between beginContour() and\nendContour().beginShape() and endShape() functions\nallow for creating custom shapes in 2D or 3D. beginShape() begins adding\nvertices to a custom shape and endShape() stops\nadding them.kind, sets the kind of shape to make. By default, any\nirregular polygon can be drawn. The available modes for kind are:\n
\nPOINTS to draw a series of points.LINES to draw a series of unconnected line segments.TRIANGLES to draw a series of separate triangles.TRIANGLE_FAN to draw a series of connected triangles sharing the first vertex in a fan-like fashion.TRIANGLE_STRIP to draw a series of connected triangles in strip fashion.QUADS to draw a series of separate quadrilaterals (quads).QUAD_STRIP to draw quad strip using adjacent edges to form the next quad.TESS to create a filling curve by explicit tessellation (WebGL only).beginShape(), shapes can be built by calling\nvertex(),\nbezierVertex(),\nquadraticVertex(), and/or\ncurveVertex(). Calling\nendShape() will stop adding vertices to the\nshape. Each shape will be outlined with the current stroke color and filled\nwith the current fill color.beginShape() and\nendShape(). It's also not possible to use\nother shapes, such as ellipse() or\nrect(), between beginShape() and\nendShape().bezierVertex() adds a curved segment to custom shapes. The Bézier curves\nit creates are defined like those made by the\nbezier() function. bezierVertex() must be\ncalled between the\nbeginShape() and\nendShape() functions. The curved segment uses\nthe previous vertex as the first anchor point, so there must be at least\none call to vertex() before bezierVertex() can\nbe used.x2, y2, x3, and y3, set the curve’s two\ncontrol points. The control points \"pull\" the curve towards them.x4, and y4, set the last anchor point.\nThe last anchor point is where the curve ends.bezierVertex() has eight arguments because each point has x-, y-, and\nz-coordinates.bezierVertex() won’t work when an argument is passed to\nbeginShape().curveVertex() adds a curved segment to custom shapes. The spline curves\nit creates are defined like those made by the\ncurve() function. curveVertex() must be called\nbetween the beginShape() and\nendShape() functions.curveVertex() must be called at\nleast four times between\nbeginShape() and\nendShape() in order to draw a curve:
\nbeginShape();\n\n// Add the first control point.\ncurveVertex(84, 91);\n\n// Add the anchor points to draw between.\ncurveVertex(68, 19);\ncurveVertex(21, 17);\n\n// Add the second control point.\ncurveVertex(32, 91);\n\nendShape();\ncurveVertex() with the coordinates of the control points:
\nbeginShape();\n\n// Add the first control point and draw a segment to it.\ncurveVertex(84, 91);\ncurveVertex(84, 91);\n\n// Add the anchor points to draw between.\ncurveVertex(68, 19);\ncurveVertex(21, 17);\n\n// Add the second control point.\ncurveVertex(32, 91);\n\n// Uncomment the next line to draw the segment to the second control point.\n// curveVertex(32, 91);\n\nendShape();\nx and y, set the vertex’s location. For\nexample, calling curveVertex(10, 10) adds a point to the curve at\n(10, 10).curveVertex() has three arguments because each point has x-, y-, and\nz-coordinates. By default, the vertex’s z-coordinate is set to 0.curveVertex() won’t work when an argument is passed to\nbeginShape().endContour()\nfunctions allow for creating negative space within custom shapes that are\nflat. beginContour() begins adding vertices\nto a negative space and endContour() stops adding them.\nbeginContour() and endContour() must be\ncalled between beginShape() and\nendShape().endContour(). It's also not possible to use other shapes, such as\nellipse() or rect(),\nbetween beginContour() and endContour().endShape() functions\nallow for creating custom shapes in 2D or 3D.\nbeginShape() begins adding vertices to a\ncustom shape and endShape() stops adding them.mode, is optional. By default, the first and last\nvertices of a shape aren't connected. If the constant CLOSE is passed, as\nin endShape(CLOSE), then the first and last vertices will be connected.count, is also optional. In WebGL mode, it’s more\nefficient to draw many copies of the same shape using a technique called\ninstancing.\nThe count parameter tells WebGL mode how many copies to draw. For\nexample, calling endShape(CLOSE, 400) after drawing a custom shape will\nmake it efficient to draw 400 copies. This feature requires\nwriting a custom shader.endShape() will stop adding vertices to the\nshape. Each shape will be outlined with the current stroke color and filled\nwith the current fill color.endShape(). It's also not\npossible to use other shapes, such as ellipse() or\nrect(), between\nbeginShape() and endShape().quadraticVertex() adds a curved segment to custom shapes. The Bézier\ncurve segments it creates are similar to those made by the\nbezierVertex() function.\nquadraticVertex() must be called between the\nbeginShape() and\nendShape() functions. The curved segment uses\nthe previous vertex as the first anchor point, so there must be at least\none call to vertex() before quadraticVertex() can\nbe used.cx and cy, set the curve’s control point.\nThe control point \"pulls\" the curve towards its.x3, and y3, set the last anchor point. The\nlast anchor point is where the curve ends.bezierVertex() has eight arguments because each point has x-, y-, and\nz-coordinates.quadraticVertex() won’t work when an argument is passed to\nbeginShape().vertex() sets the coordinates of vertices drawn between the\nbeginShape() and\nendShape() functions.x and y, set the x- and y-coordinates of the\nvertex.z, is optional. It sets the z-coordinate of the\nvertex in WebGL mode. By default, z is 0.u and v, are also optional. They set\nthe u- and v-coordinates for the vertex’s texture when used with\nendShape(). By default, u and v are both 0.normal() can be called two ways with different parameters to define the\nnormal vector's components.normal() has three parameters, x, y, and z.\nIf Numbers are passed, as in normal(1, 2, 3), they set the x-, y-, and\nz-components of the normal vector.normal() has one parameter, vector. If a\np5.Vector object is passed, as in\nnormal(myVector), its components will be used to set the normal vector.normal() changes the normal vector of vertices added to a custom shape\nwith vertex(). normal() must be called between\nthe beginShape() and\nendShape() functions, just like\nvertex(). The normal vector set by calling\nnormal() will affect all following vertices until normal() is called\nagain:
\n",
"itemtype": "method",
@@ -6612,7 +6612,7 @@
]
},
{
- "file": "src/core/constants.js",
+ "file": "src\\core\\constants.js",
"line": 9,
"description": "beginShape();\n\n// Set the vertex normal.\nnormal(-0.4, -0.4, 0.8);\n\n// Add a vertex.\nvertex(-30, -30, 0);\n\n// Set the vertex normal.\nnormal(0, 0, 1);\n\n// Add vertices.\nvertex(30, -30, 0);\nvertex(30, 30, 0);\n\n// Set the vertex normal.\nnormal(0.4, -0.4, 0.8);\n\n// Add a vertex.\nvertex(-30, 30, 0);\n\nendShape();\nWEBGL differs from the default P2D renderer in the following ways:\n
\nWEBGL mode, the origin point (0,0,0) is located at the center of the screen, not the top-left corner. See the tutorial page about coordinates and transformations.WEBGL mode can be used to draw 3-dimensional shapes like box(), sphere(), cone(), and more. See the tutorial page about custom geometry to make more complex objects.WEBGL mode, you can specify how smooth curves should be drawn by using a detail parameter. See the wiki section about shapes for a more information and an example.WEBGL offers different types of lights like ambientLight() to place around a scene. Materials like specularMaterial() reflect the lighting to convey shape and depth. See the tutorial page for styling and appearance to experiment with different combinations.WEBGL sketch can be adjusted by changing camera attributes. See the tutorial page section about cameras for an explanation of camera controls.WEBGL requires opentype/truetype font files to be preloaded using loadFont(). See the wiki section about text for details, along with a workaround.WEBGL mode uses the graphics card instead of the CPU, so it may help boost the performance of your sketch (example: drawing more shapes on the screen at once).Number constant that's approximately 1.5708.HALF_PI is half the value of the mathematical constant π. It's useful for\nmany tasks that involve rotation and oscillation. For example, calling\nrotate(HALF_PI) rotates the coordinate system HALF_PI radians, which is\na quarter turn (90˚).TWO_PI radians equals 360˚, PI radians equals 180˚, HALF_PI\nradians equals 90˚, and QUARTER_PI radians equals 45˚.Number constant that's approximately 3.1416.PI is the mathematical constant π. It's useful for many tasks that\ninvolve rotation and oscillation. For example, calling rotate(PI) rotates\nthe coordinate system PI radians, which is a half turn (180˚).TWO_PI radians equals 360˚, PI radians equals 180˚, HALF_PI\nradians equals 90˚, and QUARTER_PI radians equals 45˚.Number constant that's approximately 0.7854.QUARTER_PI is one-fourth the value of the mathematical constant π. It's\nuseful for many tasks that involve rotation and oscillation. For example,\ncalling rotate(QUARTER_PI) rotates the coordinate system QUARTER_PI\nradians, which is an eighth of a turn (45˚).TWO_PI radians equals 360˚, PI radians equals 180˚, HALF_PI\nradians equals 90˚, and QUARTER_PI radians equals 45˚.Number constant that's approximately 6.2382.TAU is twice the value of the mathematical constant π. It's useful for\nmany tasks that involve rotation and oscillation. For example, calling\nrotate(TAU) rotates the coordinate system TAU radians, which is one\nfull turn (360˚). TAU and TWO_PI are equal.TAU radians equals 360˚, PI radians equals 180˚, HALF_PI\nradians equals 90˚, and QUARTER_PI radians equals 45˚.Number constant that's approximately 6.2382.TWO_PI is twice the value of the mathematical constant π. It's useful for\nmany tasks that involve rotation and oscillation. For example, calling\nrotate(TWO_PI) rotates the coordinate system TWO_PI radians, which is\none full turn (360˚). TWO_PI and TAU are equal.TWO_PI radians equals 360˚, PI radians equals 180˚, HALF_PI\nradians equals 90˚, and QUARTER_PI radians equals 45˚.String constant that's used to set the\nangleMode().angleMode(DEGREES) ensures that angles are measured in units of\ndegrees.TWO_PI radians equals 360˚.String constant that's used to set the\nangleMode().angleMode(RADIANS) ensures that angles are measured in units of\nradians. Doing so can be useful if the\nangleMode() has been set to\nDEGREES.TWO_PI radians equals 360˚.print() is helpful for printing values while debugging. Each call to\nprint() creates a new line of text.print('\\n') to print a blank line. Calling print() without\nan argument opens the browser's dialog for printing documents.Number variable that tracks the number of frames drawn since the sketch\nstarted.frameCount's value is 0 inside setup(). It\nincrements by 1 each time the code in draw()\nfinishes executing.Number variable that tracks the number of milliseconds it took to draw\nthe last frame.deltaTime contains the amount of time it took\ndraw() to execute during the previous frame. It's\nuseful for simulating physics.Boolean variable that's true if the browser is focused and false if\nnot.type, sets the type of cursor to display. The\nbuilt-in options are ARROW, CROSS, HAND, MOVE, TEXT, and WAIT.\ncursor() also recognizes standard CSS cursor properties passed as\nstrings: 'help', 'wait', 'crosshair', 'not-allowed', 'zoom-in',\nand 'grab'. If the path to an image is passed, as in\ncursor('assets/target.png'), then the image will be used as the cursor.\nImages must be in .cur, .gif, .jpg, .jpeg, or .png format and should be at most 32 by 32 pixels large.x and y are optional. If an image is used for the\ncursor, x and y set the location pointed to within the image. They are\nboth 0 by default, so the cursor points to the image's top-left corner. x\nand y must be less than the image's width and height, respectively.frameRate() with one numeric argument, as in frameRate(30),\nattempts to draw 30 frames per second (FPS). The target frame rate may not\nbe achieved depending on the sketch's processing needs. Most computers\ndefault to a frame rate of 60 FPS. Frame rates of 24 FPS and above are\nfast enough for smooth animations.frameRate() without an argument returns the current frame rate.\nThe value returned is an approximation.String variable with the WebGL version in use.webglVersion's value equals one of the following string constants:\n
\nWEBGL2 whose value is 'webgl2',WEBGL whose value is 'webgl', orP2D whose value is 'p2d'. This is the default for 2D sketches.Number variable that stores the width of the screen display.displayWidth is useful for running full-screen programs. Its value\ndepends on the current pixelDensity().displayWidth * pixelDensity().Number variable that stores the height of the screen display.displayHeight is useful for running full-screen programs. Its value\ndepends on the current pixelDensity().displayHeight * pixelDensity().Number variable that stores the width of the browser's viewport.Number variable that stores the height of the browser's viewport.windowResized() will run when the\nbrowser window's size changes. It's a good place to call\nresizeCanvas() or make other\nadjustments to accommodate the new window size.event parameter is optional. If added to the function declaration, it\ncan be used for debugging or other purposes.Number variable that stores the width of the canvas in pixels.width's default value is 100. Calling\ncreateCanvas() or\nresizeCanvas() changes the value of\nwidth. Calling noCanvas() sets its value to\n0.Number variable that stores the height of the canvas in pixels.height's default value is 100. Calling\ncreateCanvas() or\nresizeCanvas() changes the value of\nheight. Calling noCanvas() sets its value to\n0.fullscreen(true) makes the sketch full-screen. Calling\nfullscreen(false) makes the sketch its original size.fullscreen() without an argument returns true if the sketch\nis in full-screen mode and false if not.fullscreen() can only be called with\nuser input such as a mouse press.pixelDensity() sets the pixel scaling for high pixel density displays.\nBy default, the pixel density is set to match the display's density.\nCalling pixelDensity(1) turn this off.pixelDensity() without an argument returns the current pixel\ndensity.String.Array of Strings.https://example.com/sketchbook. Calling getURLPath() returns\n['sketchbook']. For a sketch hosted at the URL\nhttps://example.com/sketchbook/monday, getURLPath() returns\n['sketchbook', 'monday'].Object.getURLParams() in a sketch hosted at the URL\nhttps://p5js.org?year=2014&month=May&day=15 returns\n{ year: 2014, month: 'May', day: 15 }.preload() sets a code block to run once\nautomatically before setup() or\ndraw(). It's used to load assets including\nmultimedia files, fonts, data, and 3D models:
\nfunction preload() {\n // Code to run before the rest of the sketch.\n}\npreload().\nDoing so ensures that assets are available when the sketch begins\nrunning.setup() sets a code block to run once\nautomatically when the sketch starts running. It's used to perform\nsetup tasks such as creating the canvas and initializing variables:
\nfunction setup() {\n // Code to run once at the start of the sketch.\n}\nsetup() will run once before code placed in\ndraw() begins looping. If the\npreload() is declared, then setup() will\nrun immediately after preload() finishes\nloading assets.setup() doesn’t have to be declared, but it’s common practice to do so.draw() sets a code block to run repeatedly\nonce the sketch starts. It’s used to create animations and respond to\nuser inputs:
\nfunction draw() {\n // Code to run repeatedly.\n}\ndraw() in a loop behind the scenes. By default, draw() tries to run\n60 times per second. The actual rate depends on many factors. The\ndrawing rate, called the \"frame rate\", can be controlled by calling\nframeRate(). The number of times draw()\nhas run is stored in the system variable\nframeCount().draw() begins looping after\nsetup() runs. draw() will run until the user\ncloses the sketch. draw() can be stopped by calling the\nnoLoop() function. draw() can be resumed by\ncalling the loop() function.remove() stops the draw loop and removes any HTML elements\ncreated by the sketch, including the canvas. A new sketch can be\ncreated by using the p5() constructor, as in\nnew p5().HTMLElement object.Number property that stores the element's width.Number property that stores the element's height.<div></div> element may be used as a box to\nhold two pieces of text, a header and a paragraph. The\n<div></div> is the parent element of both the header and\nparagraph.parent can have one of three types. parent can be a\nstring with the parent element's ID, as in\nmyElement.parent('container'). It can also be another\np5.Element object, as in\nmyElement.parent(myDiv). Finally, parent can be an HTMLElement\nobject, as in myElement.parent(anotherElement).myElement.parent() without an argument returns the element's\nparent.myElement.id() without an argument returns its ID as a string.myElement.class() without an argument returns a string with its current classes.myElement.mousePressed(false) disables the function.myElement.doubleClicked(false) disables the function.fxn, is passed an event object. event has\ntwo numeric properties, deltaY and deltaX. event.deltaY is\nnegative if the mouse wheel rotates away from the user. It's positive if\nthe mouse wheel rotates toward the user. event.deltaX is positive if\nthe mouse wheel moves to the right. It's negative if the mouse wheel moves\nto the left.myElement.mouseWheel(false) disables the function.myElement.mouseReleased(false) disables the function.myElement.mouseReleased(false) disables the function.myElement.mouseMoved(false) disables the function.myElement.mouseOver(false) disables the function.myElement.mouseOut(false) disables the function.myElement.touchStarted(false) disables the function.myElement.touchMoved(false) disables the function.myElement.touchMoved(false) disables the function.myElement.dragOver(false) disables the function.myElement.dragLeave(false) disables the function.p5.Graphics\nobjects must reset these values manually by calling myGraphics.reset().myGraphics.remove() removes the graphics buffer's\n<canvas> element from the web page. The graphics buffer also uses\na bit of memory on the CPU that can be freed like so:
\n// Remove the graphics buffer from the web page.\nmyGraphics.remove();\n\n// Delete the graphics buffer from CPU memory.\nmyGraphics = undefined;\nundefined to delete the graphics buffer from CPU memory. If any\nvariable still refers to the graphics buffer, then it won't be garbage\ncollected.options, is optional. An object can be passed to configure\nthe p5.Framebuffer object. The available\nproperties are:\n
\nformat: data format of the texture, either UNSIGNED_BYTE, FLOAT, or HALF_FLOAT. Default is UNSIGNED_BYTE.channels: whether to store RGB or RGBA color channels. Default is to match the graphics buffer which is RGBA.depth: whether to include a depth buffer. Default is true.depthFormat: data format of depth information, either UNSIGNED_INT or FLOAT. Default is FLOAT.stencil: whether to include a stencil buffer for masking. depth must be true for this feature to work. Defaults to the value of depth which is true.antialias: whether to perform anti-aliasing. If set to true, as in { antialias: true }, 2 samples will be used by default. The number of samples can also be set, as in { antialias: 4 }. Default is to match setAttributes() which is false (true in Safari).width: width of the p5.Framebuffer object. Default is to always match the graphics buffer width.height: height of the p5.Framebuffer object. Default is to always match the graphics buffer height.density: pixel density of the p5.Framebuffer object. Default is to always match the graphics buffer pixel density.textureFiltering: how to read values from the p5.Framebuffer object. Either LINEAR (nearby pixels will be interpolated) or NEAREST (no interpolation). Generally, use LINEAR when using the texture as an image and NEAREST if reading the texture as data. Default is LINEAR.width, height, or density attributes are set, they won't\nautomatically match the graphics buffer and must be changed manually.Number or its name as a\nString. Variables can change value by reassigning them as follows:
\n// Declare the variable x and assign it the value 10.\nlet x = 10;\n\n// Reassign x to 50.\nx = 50;\n{}, it only exists within the block defined by those braces. For\nexample, the following code would throw a ReferenceError because x is\ndeclared within the setup() function's block:
\nfunction setup() {\n createCanvas(100, 100);\n\n let x = 50;\n}\n\nfunction draw() {\n background(200);\n\n // x was declared in setup(), so it can't be referenced here.\n circle(x, 50, 20);\n}\n{} are in the global\nscope. A variable that's in the global scope can be used and changed\nanywhere in a sketch:
\n",
"itemtype": "property",
@@ -9065,7 +9065,7 @@
"submodule": "Foundation"
},
{
- "file": "src/core/reference.js",
+ "file": "src\\core\\reference.js",
"line": 110,
"description": "let x = 50;\n\nfunction setup() {\n createCanvas(100, 100);\n}\n\nfunction draw() {\n background(200);\n\n // Change the value of x.\n x += 10;\n\n circle(x, 50, 20);\n}\nif statements are helpful for running a block of code based on a\ncondition. For example, an if statement makes it easy to express the\nidea \"Draw a circle if the mouse is pressed.\":
\nif (mouseIsPressed === true) {\n circle(mouseX, mouseY, 20);\n}\nif. The expression in\nparentheses mouseIsPressed === true is a Boolean expression that's\neither true or false. The code between the curly braces {} is the if\nstatement's body. The body only runs if the Boolean expression is true.true or false, so the code snippet above could also be written\nas follows:
\nif (mouseIsPressed) {\n circle(mouseX, mouseY, 20);\n}\nif-else statement adds a block of code that runs if the Boolean\nexpression is false. For example, here's an if-else statement that\nexpresses the idea \"Draw a circle if the mouse is pressed. Otherwise,\ndisplay a message.\":
\nif (mouseIsPressed === true) {\n // When true.\n circle(mouseX, mouseY, 20);\n} else {\n // When false.\n text('Click me!', 50, 50);\n}\nelse-if statement makes it possible to add more branches.\nelse-if statements run different blocks of code under different\nconditions. For example, an else-if statement makes it easy to express\nthe idea \"If the mouse is on the left, paint the canvas white. If the mouse\nis in the middle, paint the canvas gray. Otherwise, paint the canvas\nblack.\":
\nif (mouseX < 33) {\n background(255);\n} else if (mouseX < 67) {\n background(200);\n} else {\n background(0);\n}\nif statements can add as many else-if statements as needed. However,\nthere can only be one else statement and it must be last.if statements can also check for multiple conditions at once. For\nexample, the Boolean operator && (AND) checks whether two expressions\nare both true:
\nif (keyIsPressed === true && key === 'p') {\n text('You pressed the \"p\" key!', 50, 50);\n}\n'p', then a message will\ndisplay.Boolean operator || (OR) checks whether at least one of two\nexpressions is true:
\nif (keyIsPressed === true || mouseIsPressed === true) {\n text('You did something!', 50, 50);\n}\nif statement can contain another if statement. This is\ncalled a \"nested if statement.\" For example, nested if statements make\nit easy to express the idea \"If a key is pressed, then check if the key is\n'r'. If it is, then set the fill to red.\":
\nif (keyIsPressed === true) {\n if (key === 'r') {\n fill('red');\n }\n}\n
\nfunction drawFlower() {\n // Style the text.\n textAlign(CENTER, CENTER);\n textSize(20);\n\n // Draw a flower emoji.\n text('🌸', 50, 50);\n}\nfunction. The function's\nname, drawFlower, is followed by parentheses () and curly braces {}.\nThe code between the curly braces is called the function's body. The\nfunction's body runs when the function is called like so:
\ndrawFlower();\ndrawFlower() function could include\na parameter for the flower's size:
\nfunction drawFlower(size) {\n // Style the text.\n textAlign(CENTER, CENTER);\n\n // Use the size parameter.\n textSize(size);\n\n // Draw a flower emoji.\n text('🌸', 50, 50);\n}\n
\n// The argument 20 is assigned to the parameter size.\ndrawFlower(20);\ndrawFlower() function could accept\nNumber parameters for the flower's x- and y-coordinates along with its\nsize:
\nfunction drawFlower(x, y, size) {\n // Style the text.\n textAlign(CENTER, CENTER);\n\n // Use the size parameter.\n textSize(size);\n\n // Draw a flower emoji.\n // Use the x and y parameters.\n text('🌸', x, y);\n}\nreturn statement:
\nfunction double(x) {\n let answer = 2 * x;\n return answer;\n}\nreturn can produce an output that's used\nelsewhere. For example, the output of the double() function can be\nassigned to a variable:
\n",
"itemtype": "property",
@@ -9091,7 +9091,7 @@
"submodule": "Foundation"
},
{
- "file": "src/core/reference.js",
+ "file": "src\\core\\reference.js",
"line": 502,
"description": "let six = double(3);\ntext(`3 x 2 = ${six}`, 50, 50);\ntrue or false.Boolean values help to make decisions in code. They appear any time a\nlogical condition is checked. For example, the condition\n\"Is a mouse button being pressed?\" must be either true or\nfalse:
\n// If the user presses the mouse, draw a circle at\n// the mouse's location.\nif (mouseIsPressed === true) {\n circle(mouseX, mouseY, 20);\n}\nif statement checks whether\nmouseIsPressed is true and draws a\ncircle if it is. Boolean expressions such as mouseIsPressed === true\nevaluate to one of the two possible Boolean values: true or false.=== operator (EQUAL) checks whether two values are equal. If they\nare, the expression evaluates to true. Otherwise, it evaluates to\nfalse.== operator with two = instead of three. Don't use\nit.true or false, so the code snippet above could also be written\nas follows:
\nif (mouseIsPressed) {\n circle(mouseX, mouseY, 20);\n}\n!== operator (NOT EQUAL) checks whether two values are not equal, as\nin the following example:
\nif (2 + 2 !== 4) {\n text('War is peace.', 50, 50);\n}\n2 + 2 produces the\nvalue 4. The Boolean expression 4 !== 4 evaluates to false because\n4 is equal to itself. As a result, the if statement's body is skipped.!= operator with one = instead of two. Don't use\nit.Boolean operator && (AND) checks whether two expressions are both\ntrue:
\nif (keyIsPressed === true && key === 'p') {\n text('You pressed the \"p\" key!', 50, 50);\n}\n'p', then a message will\ndisplay.Boolean operator || (OR) checks whether at least one of two\nexpressions is true:
\nif (keyIsPressed === true || mouseIsPressed === true) {\n text('You did something!', 50, 50);\n}\n&& and\n||:
\ntrue && true // true\ntrue && false // false\nfalse && false // false\ntrue || true // true\ntrue || false // true\nfalse || false // false\n>, <, >=, and <= also produce Boolean\nvalues:
\n2 > 1 // true\n2 < 1 // false\n2 >= 2 // true\n2 <= 2 // true\nif statements and\nNumber for more information about Numbers.String data type is helpful for working with text. For example, a\nstring could contain a welcome message:
\n// Use a string literal.\ntext('Hello!', 10, 10);\n
\n// Create a string variable.\nlet message = 'Hello!';\n\n// Use the string variable.\ntext(message, 10, 10);\n
\ntext(\"hi\", 50, 50);\n
\ntext('hi', 50, 50);\n
\ntext(`hi`, 50, 50);\n\"hi\", 'hi', and hi are all string literals. A \"literal\" means a\nvalue was actually written, as in text('hi', 50, 50). By contrast,\ntext(message, 50, 50) uses the variable message, so it isn't a string\nliteral.'' and double quotes \"\" mean the same thing. It's nice to\nhave the option for cases when a string contains one type of quote:
\ntext(\"What's up?\", 50, 50);\n
\ntext('Air quotes make you look \"cool.\"', 50, 50);\n`` create template literals. Template literals have many uses.\nFor example, they can contain both single and double quotes as needed:
\ntext(`\"Don't you forget about me\"`, 10, 10);\n
\nlet size = random(10, 20);\ncircle(50, 50, size);\n\ntext(`The circle's diameter is ${size} pixels.`, 10, 10);\nsize variable's value will replace ${size} when the string is\ncreated. ${} is a placeholder for any value. That means an expression can\nbe used, as in ${round(PI, 3)}. All of the following are valid template\nliterals:
\ntext(`π is about ${round(PI, 2)} pixels.`, 10, 10);\ntext(`It's ${mouseX < width / 2} that I'm on the left half of the canvas.`, 10, 30);\n
\nlet x = random(0, 100);\nlet y = random(0, 100);\nlet size = random(10, 20);\ncircle(x, y, size);\n\ntext(`The circle at (${x}, ${y}) has a diameter of ${size} pixels.`, 10, 10);\n
\n",
"itemtype": "property",
@@ -9117,7 +9117,7 @@
"submodule": "Foundation"
},
{
- "file": "src/core/reference.js",
+ "file": "src\\core\\reference.js",
"line": 853,
"description": "let poem = `My sketch doesn't run;\nit waits for me patiently\nwhile bugs point the way.`;\n\ntext(poem, 10, 10);\nNumber data type is useful for describing values such as position,\nsize, and color. A number can be an integer such as 20 or a decimal number\nsuch as 12.34. For example, a circle's position and size can be described\nby three numbers:
\ncircle(50, 50, 20);\n
\ncircle(50, 50, 12.34);\n
\n// Draw a circle at the center.\ncircle(width / 2, height / 2, 20);\n
\n// Draw a circle that moves from left to right.\ncircle(frameCount * 0.01, 50, 20);\n
\n1 + 2 // Add\n1 - 2 // Subtract\n1 * 2 // Multiply\n1 / 2 // Divide\n1 % 2 // Remainder\n1 ** 2 // Exponentiate\n
\nx = x + 1;\nx using the + operator. The\naddition assignment operator += expresses the same idea:
\nx += 1;\n
\nx += 2 // Addition assignment\nx -= 2 // Subtraction assignment\nx *= 2 // Multiplication assignment\nx /= 2 // Division assignment\nx %= 2 // Remainder assignment\n>, <, >=, <=, ===, and !==. For example, a sketch's\nframeCount can be used as a timer:
\nif (frameCount > 1000) {\n text('Game over!', 50, 50);\n}\nframeCount > 1000 evaluates to a Boolean value\nthat's either true or false. The relational operators all produce\nBoolean values:
\n2 > 1 // true\n2 < 1 // false\n2 >= 2 // true\n2 <= 2 // true\n2 === 2 // true\n2 !== 2 // false\n== and != operators with one fewer =. Don't use them.
\nsqrt(-1) // NaN\n1 / 0 // Infinity\nNaN stands for\nNot-A-Number.\nNaN appears when calculations or conversions don't work. Infinity is a\nvalue that's larger than any number. It appears during certain\ncalculations.
\n// Declare the dog variable and assign it an object.\nlet dog = { x: 50, y: 50, size: 20, emoji: '🐶' };\n\n// Style the text.\ntextAlign(CENTER, CENTER);\ntextSize(dog.size);\n\n// Draw the dog.\ntext(dog.emoji, dog.x, dog.y);\ndog is assigned an object with four properties. Objects\nare declared with curly braces {}. Values can be accessed using the dot\noperator, as in dog.size. In the example above, the key size\ncorresponds to the value 20. Objects can also be empty to start:
\n// Declare a cat variable and assign it an empty object.\nlet cat = {};\n\n// Add properties to the object.\ncat.x = 50;\ncat.y = 50;\ncat.size = 20;\ncat.emoji = '🐱';\n\n// Style the text.\ntextAlign(CENTER, CENTER);\ntextSize(cat.size);\n\n// Draw the cat.\ntext(cat.emoji, cat.x, cat.y);\ncat\ncould run away from the dog by updating its location:
\n// Run to the right.\ncat.x += 5;\n[]\nand strings instead of dot notation:
\n// Run to the right.\ncat[\"x\"] += 5;\ncat['height (m)'].
\nlet myArray = ['deeppink', 'darkorchid', 'magenta'];\nmyArray refers to an\narray with three String elements, 'deeppink',\n'darkorchid', and 'magenta'. Arrays are zero-indexed, which means\nthat 'deeppink' is at index 0, 'darkorchid' is at index 1, and\n'magenta' is at index 2. Array elements can be accessed using their\nindices as follows:
\nlet zeroth = myArray[0]; // 'deeppink'\nlet first = myArray[1]; // 'darkorchid'\nlet second = myArray[2]; // 'magenta'\n
\nmyArray.push('lavender');\n\nlet third = myArray[3]; // 'lavender'\nFrog\nclass could create objects that behave like frogs. Each object created\nusing a class is called an instance of that class. All instances of a class\nare the same type. Here's an example of creating an instance of a Frog\nclass:
\nlet fifi = new Frog(50, 50, 20);\nfifi refers to an instance of the Frog class. The keyword\nnew is used to call the Frog class' constructor in the statement\nnew Frog(). Altogether, a new Frog object was created and assigned to\nthe variable fifi. Classes are templates, so they can be used to create\nmore than one instance:
\n// First Frog instance.\nlet frog1 = new Frog(25, 50, 10);\n\n// Second Frog instance.\nlet frog2 = new Frog(75, 50, 10);\nFrog class could be declared as follows:
\nclass Frog {\n constructor(x, y, size) {\n // This code runs once when an instance is created.\n this.x = x;\n this.y = y;\n this.size = size;\n }\n\n show() {\n // This code runs once when myFrog.show() is called.\n textAlign(CENTER, CENTER);\n textSize(this.size);\n text('🐸', this.x, this.y);\n }\n\n hop() {\n // This code runs once when myFrog.hop() is called.\n this.x += random(-10, 10);\n this.y += random(-10, 10);\n }\n}\nclass followed by the class\nname, such as Frog, and curly braces {}. Class names should use\nPascalCase and can't have spaces in their names. For example, naming a\nclass Kermit The Frog with spaces between each word would throw a\nSyntaxError. The code between the curly braces {} defines the class.constructor(),\nshow(), and hop() are methods in the Frog class. Methods define an\nobject's behavior. Methods can accept parameters and return values, just\nlike functions. Note that methods don't use the function keyword.constructor() is a special method that's called once when an instance of\nthe class is created. The statement new Frog() calls the Frog class'\nconstructor() method.this refers\nto an instance's data and methods. For example, each Frog instance has\nunique coordinates stored in this.x and this.y. The show() method\nuses those coordinates to draw the frog. The hop() method updates those\ncoordinates when called. Once a Frog instance is created, its data and\nmethods can be accessed using the dot operator . as follows:
\n",
"itemtype": "property",
@@ -9169,7 +9169,7 @@
"submodule": "Foundation"
},
{
- "file": "src/core/reference.js",
+ "file": "src\\core\\reference.js",
"line": 1648,
"description": "// Draw a lily pad.\nfill('green');\nstroke('green');\ncircle(fifi.x, fifi.y, 2 * fifi.size);\n\n// Show the Frog.\nfifi.show();\n\n// Hop.\nfifi.hop();\nfor loops are helpful for repeating statements a certain number of times.\nFor example, a for loop makes it easy to express the idea\n\"draw five lines\" like so:
\nfor (let x = 10; x < 100; x += 20) {\n line(x, 25, x, 75);\n}\nfor. Loops generally count up\nor count down as they repeat, or iterate. The statements in parentheses\nlet x = 10; x < 100; x += 20 tell the loop how it should repeat:\n
\nlet x = 10 tells the loop to start counting at 10 and keep track of iterations using the variable x.x < 100 tells the loop to count up to, but not including, 100.x += 20 tells the loop to count up by 20 at the end of each iteration.{} is the loop's body. Statements in the\nloop body are repeated during each iteration of the loop.
\nfor (let x = 10; x < 100; x = 20) {\n line(x, 25, x, 75);\n}\nx = 20 keeps the variable x stuck at 20, which is\nalways less than 100.for loops can also count down:
\nfor (let d = 100; d > 0; d -= 10) {\n circle(50, 50, d);\n}\nfor loops can also contain other loops. The following nested loop draws a\ngrid of points:
\n// Loop from left to right.\nfor (let x = 10; x < 100; x += 10) {\n\n // Loop from top to bottom.\n for (let y = 10; y < 100; y += 10) {\n point(x, y);\n }\n\n}\nfor loops are also helpful for iterating through the elements of an\narray. For example, it's common to iterate through an array that contains\ninformation about where or what to draw:
\n// Create an array of x-coordinates.\nlet xCoordinates = [20, 40, 60];\n\nfor (let i = 0; i < xCoordinates.length; i += 1) {\n // Update the element.\n xCoordinates[i] += random(-1, 1);\n\n // Draw a circle.\n circle(xCoordinates[i], 50, 20);\n}\nfor...of statement can\nsimplify the code. They're similar to for loops in Python and for-each\nloops in C++ and Java. The following loops have the same effect:
\n// Draw circles with a for loop.\nlet xCoordinates = [20, 40, 60];\n\nfor (let i = 0; i < xCoordinates.length; i += 1) {\n circle(xCoordinates[i], 50, 20);\n}\n
\n// Draw circles with a for...of statement.\nlet xCoordinates = [20, 40, 60];\n\nfor (let x of xCoordinates) {\n circle(x, 50, 20);\n}\ni and x have different roles.i counts from 0 up to 2, which is one less than\nxCoordinates.length. i is used to access the element in xCoordinates\nat index i.x isn't keeping track of the loop's progress\nor an index. During each iteration, x contains the next element of\nxCoordinates. x starts from the beginning of xCoordinates (20) and\nupdates its value to 40 and then 60 during the next iterations.while loops are helpful for repeating statements while a condition is\ntrue. They're like if statements that repeat. For example, a while\nloop makes it easy to express the idea \"draw several lines\" like so:
\n// Declare a variable to keep track of iteration.\nlet x = 10;\n\n// Repeat as long as x < 100\nwhile (x < 100) {\n line(x, 25, x, 75);\n\n // Increment by 20.\n x += 20;\n}\nwhile. Loops generally count up\nor count down as they repeat, or iterate. The statement in parentheses\nx < 100 is a condition the loop checks each time it iterates. If the\ncondition is true, the loop runs the code between the curly braces {},\nThe code between the curly braces is called the loop's body. If the\ncondition is false, the body is skipped and the loop is stopped.
\n// Declare a variable to keep track of iteration.\nlet x = 10;\n\n// Repeat as long as x < 100\nwhile (x < 100) {\n line(x, 25, x, 75);\n}\n\n// This should be in the loop's body!\nx += 20;\nx += 20 appears after the loop's body. That means the\nvariable x is stuck at 10, which is always less than 100.while loops are useful when the number of iterations isn't known in\nadvance. For example, concentric circles could be drawn at random\nincrements:
\n",
"itemtype": "property",
@@ -9195,7 +9195,7 @@
"submodule": "Foundation"
},
{
- "file": "src/core/reference.js",
+ "file": "src\\core\\reference.js",
"line": 1988,
"description": "let d = 100;\nlet minSize = 5;\n\nwhile (d > minSize) {\n circle(50, 50, d);\n d -= random(10);\n}\nconsole.log() statement while studying how a section of\ncode works:
\nif (isPlaying === true) {\n // Add a console.log() statement to make sure this block of code runs.\n console.log('Got here!');\n\n // Game logic.\n}\nconsole.error() is helpful for tracking errors because it prints\nformatted messages. For example, it's common to encounter errors when\nloading media assets:
\n",
"itemtype": "property",
@@ -9208,7 +9208,7 @@
"submodule": "Foundation"
},
{
- "file": "src/core/rendering.js",
+ "file": "src\\core\\rendering.js",
"line": 15,
"description": "// Logs an error message with special formatting.\nfunction handleFailure(error) {\n console.error('Oops!', error);\n}\n\n// Try to load an image and call handleError() if it fails.\nloadImage('https://example.com/cat.jpg', handleImage, handleError);\ncreateCanvas() creates the main drawing canvas for a sketch. It should\nonly be called once at the beginning of setup().\nCalling createCanvas() more than once causes unpredictable behavior.width and height, are optional. They set the\ndimensions of the canvas and the values of the\nwidth and height system\nvariables. For example, calling createCanvas(900, 500) creates a canvas\nthat's 900×500 pixels. By default, width and height are both 100.P2D or\nWEBGL is passed, as in createCanvas(900, 500, WEBGL), then it will set\nthe sketch's rendering mode. If an existing\nHTMLCanvasElement\nis passed, as in createCanvas(900, 500, myCanvas), then it will be used\nby the sketch.createCanvas(900, 500, WEBGL, myCanvas), then it will be\nused by the sketch.setAttributes({ version: 1 }) to create a WebGL1 context.resizeCanvas() immediately clears the canvas and calls\nredraw(). It's common to call resizeCanvas()\nwithin the body of windowResized() like\nso:
\nfunction windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}\nwidth and height, set the dimensions of the\ncanvas. They also the values of the width and\nheight system variables. For example, calling\nresizeCanvas(300, 500) resizes the canvas to 300×500 pixels, then sets\nwidth to 300 and\nheight 500.noRedraw, is optional. If true is passed, as in\nresizeCanvas(300, 500, true), then the canvas will be canvas to 300×500\npixels but the redraw() function won't be called\nimmediately. By default, redraw() is called\nimmediately when resizeCanvas() finishes executing.noCanvas() removes the\ndefault canvas for sketches that don't need it.createGraphics() creates an offscreen drawing canvas (graphics buffer)\nand returns it as a p5.Graphics object. Drawing\nto a separate graphics buffer can be helpful for performance and for\norganizing code.width and height, are optional. They set the\ndimensions of the p5.Graphics object. For\nexample, calling createGraphics(900, 500) creates a graphics buffer\nthat's 900×500 pixels.P2D or\nWEBGL is passed, as in createGraphics(900, 500, WEBGL), then it will set\nthe p5.Graphics object's rendering mode. If an\nexisting\nHTMLCanvasElement\nis passed, as in createGraphics(900, 500, myCanvas), then it will be used\nby the graphics buffer.createGraphics(900, 500, WEBGL, myCanvas), then it will be\nused by the graphics buffer.setAttributes({ version: 1 }) to create a\nWebGL1 context.options, is optional. An object can be passed to configure\nthe p5.Framebuffer object. The available\nproperties are:\n
\nformat: data format of the texture, either UNSIGNED_BYTE, FLOAT, or HALF_FLOAT. Default is UNSIGNED_BYTE.channels: whether to store RGB or RGBA color channels. Default is to match the main canvas which is RGBA.depth: whether to include a depth buffer. Default is true.depthFormat: data format of depth information, either UNSIGNED_INT or FLOAT. Default is FLOAT.stencil: whether to include a stencil buffer for masking. depth must be true for this feature to work. Defaults to the value of depth which is true.antialias: whether to perform anti-aliasing. If set to true, as in { antialias: true }, 2 samples will be used by default. The number of samples can also be set, as in { antialias: 4 }. Default is to match setAttributes() which is false (true in Safari).width: width of the p5.Framebuffer object. Default is to always match the main canvas width.height: height of the p5.Framebuffer object. Default is to always match the main canvas height.density: pixel density of the p5.Framebuffer object. Default is to always match the main canvas pixel density.textureFiltering: how to read values from the p5.Framebuffer object. Either LINEAR (nearby pixels will be interpolated) or NEAREST (no interpolation). Generally, use LINEAR when using the texture as an image and NEAREST if reading the texture as data. Default is LINEAR.width, height, or density attributes are set, they won't automatically match the main canvas and must be changed manually.createFramebuffer() can only be used in WebGL mode.clearDepth() clears information about how far objects are from the camera\nin 3D space. This information is stored in an object called the\ndepth buffer. Clearing the depth buffer ensures new objects aren't drawn\nbehind old ones. Doing so can be useful for feedback effects in which the\nprevious frame serves as the background for the current frame.depth, is optional. If a number is passed, as in\nclearDepth(0.5), it determines the range of objects to clear from the\ndepth buffer. 0 doesn't clear any depth information, 0.5 clears depth\ninformation halfway between the near and far clipping planes, and 1 clears\ndepth information all the way to the far clipping plane. By default,\ndepth is 1.clearDepth() can only be used in WebGL mode.blendMode() offers many options for blending colors.mode, sets the blend mode. For example, calling\nblendMode(ADD) sets the blend mode to ADD. The following blend modes\nare available in both 2D and WebGL mode:\n
\nBLEND: color values from the source overwrite the canvas. This is the default mode.ADD: color values from the source are added to values from the canvas.DARKEST: keeps the darkest color value.LIGHTEST: keeps the lightest color value.EXCLUSION: similar to DIFFERENCE but with less contrast.MULTIPLY: color values from the source are multiplied with values from the canvas. The result is always darker.SCREEN: all color values are inverted, then multiplied, then inverted again. The result is always lighter. (Opposite of MULTIPLY)REPLACE: the last source drawn completely replaces the rest of the canvas.REMOVE: overlapping pixels are removed by making them completely transparent.\n
\nDIFFERENCE: color values from the source are subtracted from the values from the canvas. If the difference is a negative number, it's made positive.OVERLAY: combines MULTIPLY and SCREEN. Dark values in the canvas get darker and light values get lighter.HARD_LIGHT: combines MULTIPLY and SCREEN. Dark values in the source get darker and light values get lighter.SOFT_LIGHT: a softer version of HARD_LIGHT.DODGE: lightens light tones and increases contrast. Divides the canvas color values by the inverted color values from the source.BURN: darkens dark tones and increases contrast. Divides the source color values by the inverted color values from the canvas, then inverts the result.\n
\n",
"itemtype": "method",
@@ -9480,7 +9480,7 @@
"submodule": "Rendering"
},
{
- "file": "src/core/rendering.js",
+ "file": "src\\core\\rendering.js",
"line": 1198,
"description": "SUBTRACT: RGB values from the source are subtracted from the values from the canvas. If the difference is a negative number, it's made positive. Alpha (transparency) values from the source and canvas are added.<canvas> element.<canvas> element provides many specialized features that aren't\nincluded in the p5.js library. The drawingContext system variable\nprovides access to these features by exposing the sketch's\nCanvasRenderingContext2D\nobject.noLoop() stops draw() from\nrepeating. The draw loop can be restarted by calling\nloop(). draw() can be run\nonce by calling redraw().isLooping() === true.loop().isLooping() === true.true if the draw loop is running and false if not.isLooping() function can be used to check whether a sketch is\nlooping, as in isLooping() === true.push() and pop()\nfunctions can limit the effect of styles and transformations to a specific\ngroup of shapes, images, and text. For example, a group of shapes could be\ntranslated to follow the mouse without affecting the rest of the sketch:
\n// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw the face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\nellipse(-20, -20, 30, 20);\n\n// Draw the right eye.\nellipse(20, -20, 30, 20);\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);\ntranslate(mouseX, mouseY) because that transformation is contained\nbetween push() and pop(). The bug moves around\nthe entire canvas as expected.push() and pop() are always called as a\npair. Both functions are required to begin and end a drawing group.push() and pop() can also be nested to create\nsubgroups. For example, the code snippet above could be changed to give\nmore detail to the frog’s eyes:
\n// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw a face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\npush();\ntranslate(-20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// Draw the right eye.\npush();\ntranslate(20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);\npush() and pop() functions. Doing so makes it\neasier to add details in the correct part of a drawing.push() and pop() contain the effects of the\nfollowing functions:\n
\npush() and pop() contain the\neffects of a few additional styles:\n
\n",
"itemtype": "method",
@@ -9549,7 +9549,7 @@
"submodule": "Structure"
},
{
- "file": "src/core/structure.js",
+ "file": "src\\core\\structure.js",
"line": 553,
"description": "pop()\nfunctions can limit the effect of styles and transformations to a specific\ngroup of shapes, images, and text. For example, a group of shapes could be\ntranslated to follow the mouse without affecting the rest of the sketch:
\n// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw the face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\nellipse(-20, -20, 30, 20);\n\n// Draw the right eye.\nellipse(20, -20, 30, 20);\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);\ntranslate(mouseX, mouseY) because that transformation is contained\nbetween push() and pop(). The bug moves around\nthe entire canvas as expected.pop() are always called as a\npair. Both functions are required to begin and end a drawing group.pop() can also be nested to create\nsubgroups. For example, the code snippet above could be changed to give\nmore detail to the frog’s eyes:
\n// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw a face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\npush();\ntranslate(-20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// Draw the right eye.\npush();\ntranslate(20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);\npop() functions. Doing so makes it\neasier to add details in the correct part of a drawing.pop() contain the effects of the\nfollowing functions:\n
\npop() contain the\neffects of a few additional styles:\n
\n",
"itemtype": "method",
@@ -9562,7 +9562,7 @@
"submodule": "Structure"
},
{
- "file": "src/core/structure.js",
+ "file": "src\\core\\structure.js",
"line": 838,
"description": "redraw() will\nexecute the code in the draw() function a set\nnumber of times.n, is optional. If a number is passed, as in redraw(5),\nthen the draw loop will run the given number of times. By default, n is\n1.p5 class. Put another way, all\np5.js sketches are objects with methods including pInst.setup(),\npInst.draw(), pInst.circle(), and pInst.fill(). By default, sketches\nrun in \"global mode\" to hide some of this complexity.p5 class is created\nautomatically. The default p5 instance searches the web page's source\ncode for declarations of system functions such as setup(), draw(),\nand mousePressed(), then attaches those functions to itself as methods.\nCalling a function such as circle() in global mode actually calls the\ndefault p5 object's pInst.circle() method.p5() constructor.sketch, is a function that contains the sketch. For\nexample, the statement new p5(mySketch) would create a new instance mode\nsketch from a function named mySketch. The function should have one\nparameter, p, that's a p5 object.node, is optional. If a string is passed, as in\nnew p5(mySketch, 'sketch-one') the new instance mode sketch will become a\nchild of the HTML element with the id sketch-one. If an HTML element is\npassed, as in new p5(mySketch, myElement), then the new instance mode\nsketch will become a child of the Element object called myElement.applyMatrix() allows for many transformations to be applied at once. See\nWikipedia\nand MDN\nfor more details about transformations.applyMatrix() in two and three dimensions.a, b, c, d, e, and f, correspond to\nelements in the following transformation matrix:\n
\n
applyMatrix(2, 0, 0, 0, 2, 0). They can also be passed in an array, as in\napplyMatrix([2, 0, 0, 0, 2, 0]).a, b, c, d, e, f, g, h, i,\nj, k, l, m, n, o, and p correspond to elements in the\nfollowing transformation matrix:
applyMatrix(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1). They can\nalso be passed in an array, as in\napplyMatrix([2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1]).applyMatrix() inside the draw() function won't\ncause shapes to transform continuously.rotate() function changes this orientation by\nrotating the coordinate system about the origin. Everything drawn after\nrotate() is called will appear to be rotated.angle, is the amount to rotate. For example, calling\nrotate(1) rotates the coordinate system clockwise 1 radian which is\nnearly 57˚. rotate() interprets angle values using the current\nangleMode().axis, is optional. It's used to orient 3D rotations\nin WebGL mode. If a p5.Vector is passed, as in\nrotate(QUARTER_PI, myVector), then the coordinate system will rotate\nQUARTER_PI radians about myVector. If an array of vector components is\npassed, as in rotate(QUARTER_PI, [1, 0, 0]), then the coordinate system\nwill rotate QUARTER_PI radians about a vector with the components\n[1, 0, 0].rotate(1)\ntwice has the same effect as calling rotate(2) once. The\npush() and pop() functions\ncan be used to isolate transformations within distinct drawing groups.rotate(1) inside the draw() function won't cause\nshapes to spin.angle, is the amount to rotate. For example, calling\nrotateX(1) rotates the coordinate system about the x-axis by 1 radian.\nrotateX() interprets angle values using the current\nangleMode().rotateX(1)\ntwice has the same effect as calling rotateX(2) once. The\npush() and pop() functions\ncan be used to isolate transformations within distinct drawing groups.rotateX(1) inside the draw() function won't cause\nshapes to spin.angle, is the amount to rotate. For example, calling\nrotateY(1) rotates the coordinate system about the y-axis by 1 radian.\nrotateY() interprets angle values using the current\nangleMode().rotateY(1)\ntwice has the same effect as calling rotateY(2) once. The\npush() and pop() functions\ncan be used to isolate transformations within distinct drawing groups.rotateY(1) inside the draw() function won't cause\nshapes to spin.angle, is the amount to rotate. For example, calling\nrotateZ(1) rotates the coordinate system about the z-axis by 1 radian.\nrotateZ() interprets angle values using the current\nangleMode().rotateZ(1)\ntwice has the same effect as calling rotateZ(2) once. The\npush() and pop() functions\ncan be used to isolate transformations within distinct drawing groups.rotateZ(1) inside the draw() function won't cause\nshapes to spin.scale() function can shrink or stretch the coordinate system so that\nshapes appear at different sizes. There are two ways to call scale() with\nparameters that set the scale factor(s).scale() uses numbers to set the amount of scaling.\nThe first parameter, s, sets the amount to scale each axis. For example,\ncalling scale(2) stretches the x-, y-, and z-axes by a factor of 2. The\nnext two parameters, y and z, are optional. They set the amount to\nscale the y- and z-axes. For example, calling scale(2, 0.5, 1) stretches\nthe x-axis by a factor of 2, shrinks the y-axis by a factor of 0.5, and\nleaves the z-axis unchanged.scale() uses a p5.Vector\nobject to set the scale factors. For example, calling scale(myVector)\nuses the x-, y-, and z-components of myVector to set the amount of\nscaling along the x-, y-, and z-axes. Doing so is the same as calling\nscale(myVector.x, myVector.y, myVector.z).scale(1)\ntwice has the same effect as calling scale(2) once. The\npush() and pop() functions\ncan be used to isolate transformations within distinct drawing groups.scale(2) inside the draw() function won't cause\nshapes to grow continuously.shearX() function\ntransforms the coordinate system so that x-coordinates are translated while\ny-coordinates are fixed.angle, is the amount to shear. For example, calling\nshearX(1) transforms all x-coordinates using the formula\nx = x + y * tan(angle). shearX() interprets angle values using the\ncurrent angleMode().shearX(1) twice has the same effect as calling shearX(2) once. The\npush() and\npop() functions can be used to isolate\ntransformations within distinct drawing groups.shearX(1) inside the draw() function won't\ncause shapes to shear continuously.shearY() function\ntransforms the coordinate system so that y-coordinates are translated while\nx-coordinates are fixed.angle, is the amount to shear. For example, calling\nshearY(1) transforms all y-coordinates using the formula\ny = y + x * tan(angle). shearY() interprets angle values using the\ncurrent angleMode().shearY(1) twice has the same effect as calling shearY(2) once. The\npush() and\npop() functions can be used to isolate\ntransformations within distinct drawing groups.shearY(1) inside the draw() function won't\ncause shapes to shear continuously.(0, 0) is at the sketch's top-left corner in 2D\nmode and center in WebGL mode. The translate() function shifts the origin\nto a different position. Everything drawn after translate() is called\nwill appear to be shifted. There are two ways to call translate() with\nparameters that set the origin's position.translate() uses numbers to set the amount of\ntranslation. The first two parameters, x and y, set the amount to\ntranslate along the positive x- and y-axes. For example, calling\ntranslate(20, 30) translates the origin 20 pixels along the x-axis and 30\npixels along the y-axis. The third parameter, z, is optional. It sets the\namount to translate along the positive z-axis. For example, calling\ntranslate(20, 30, 40) translates the origin 20 pixels along the x-axis,\n30 pixels along the y-axis, and 40 pixels along the z-axis.translate() uses a\np5.Vector object to set the amount of\ntranslation. For example, calling translate(myVector) uses the x-, y-,\nand z-components of myVector to set the amount to translate along the x-,\ny-, and z-axes. Doing so is the same as calling\ntranslate(myVector.x, myVector.y, myVector.z).translate(10, 0) twice has the same effect as calling\ntranslate(20, 0) once. The push() and\npop() functions can be used to isolate\ntransformations within distinct drawing groups.translate(10, 0) inside the draw() function won't\ncause shapes to move continuously.localStorage can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs.storeItem() makes it easy to store values in localStorage and\ngetItem() makes it easy to retrieve them.key, is the name of the value to be stored as a\nstring.value, is the value to be stored. Values can have\nany type.localStorage.localStorage can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs.localStorage and getItem() makes it easy to retrieve them.key, is the name of the value to be stored as a\nstring.value, is the value to be retrieved a string. For\nexample, calling getItem('size') retrieves the value with the key size.localStorage.localStorage can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs. Calling clearStorage() removes all data from localStorage.localStorage.localStorage can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs.localStorage and removeItem() makes it easy to delete them.key, is the name of the value to remove as a string. For\nexample, calling removeItem('size') removes the item with the key size.localStorage.select() returns a p5.Element object if it\nfinds a match and null if not.container, is optional. It specifies a container to\nsearch within. container can be CSS selector string, a\np5.Element object, or an\nHTMLElement object.selectAll() returns an array of p5.Element\nobjects if it finds any matches and an empty array if none are found.container, is optional. It specifies a container to\nsearch within. container can be CSS selector string, a\np5.Element object, or an\nHTMLElement object.myElement.changed(false) disables the function.myElement.input() is often used to with text inputs and sliders. Calling\nmyElement.input(false) disables the function.<div></div> element.<div></div> elements are commonly used as containers for\nother elements.html is optional. It accepts a string that sets the\ninner HTML of the new <div></div>.<p></p> elements are commonly used for paragraph-length text.html is optional. It accepts a string that sets the\ninner HTML of the new <p></p>.<span></span> element.<span></span> elements are commonly used as containers\nfor inline elements. For example, a <span></span>\ncan hold part of a sentence that's a\ndifferent style.html is optional. It accepts a string that sets the\ninner HTML of the new <span></span>.<img> element that can appear outside of the canvas.src, is a string with the path to the image file.\nsrc should be a relative path, as in 'assets/image.png', or a URL, as\nin 'https://example.com/image.png'.alt, is a string with the\nalternate text\nfor the image. An empty string '' can be used for images that aren't displayed.crossOrigin, is optional. It's a string that sets the\ncrossOrigin property\nof the image. Use 'anonymous' or 'use-credentials' to fetch the image\nwith cross-origin access.callback, is also optional. It sets a function to\ncall after the image loads. The new image is passed to the callback\nfunction as a p5.Element object.<a></a> element that links to another web page.href, is a string that sets the URL of the linked\npage.html, is a string that sets the inner HTML of the\nlink. It's common to use text, images, or buttons as links.target, is optional. It's a string that tells the\nweb browser where to open the link. By default, links open in the current\nbrowser tab. Passing '_blank' will cause the link to open in a new\nbrowser tab. MDN describes a few\nother options.<input></input> element.min and max, are numbers that set the\nslider's minimum and maximum.value, is optional. It's a number that sets the\nslider's default value.step, is also optional. It's a number that sets the\nspacing between each value in the slider's range. Setting step to 0\nallows the slider to move smoothly from min to max.<button></button> element.label, is a string that sets the label displayed on\nthe button.value, is optional. It's a string that sets the\nbutton's value. See\nMDN\nfor more details.<input></input> element.checked() method. Calling myBox.checked() returns true if it the box\nis checked and false if not.label, is optional. It's a string that sets the label\nto display next to the checkbox.value, is also optional. It's a boolean that sets the\ncheckbox's value.<select></select> element.true is passed, as in\nlet mySelect = createSelect(true), then the dropdown will support\nmultiple selections. If an existing <select></select> element\nis passed, as in let mySelect = createSelect(otherSelect), the existing\nelement will be wrapped in a new p5.Element\nobject.\n
\n",
"itemtype": "method",
@@ -11073,7 +11073,7 @@
]
},
{
- "file": "src/dom/dom.js",
+ "file": "src\\dom\\dom.js",
"line": 1440,
"description": "mySelect.option(name, [value]) adds an option to the menu. The first paremeter, name, is a string that sets the option's name and value. The second parameter, value, is optional. If provided, it sets the value that corresponds to the key name. If an option with name already exists, its value is changed to value.mySelect.value() returns the currently-selected option's value.mySelect.selected() returns the currently-selected option.mySelect.selected(option) selects the given option by default.mySelect.disable() marks the whole dropdown element as disabled.mySelect.disable(option) marks a given option as disabled.mySelect.enable() marks the whole dropdown element as enabled.mySelect.enable(option) marks a given option as enabled.let myRadio = createSelect('food'), then each radio option will\nhave \"food\" as its name parameter: <input name=\"food\">.\nIf an existing <div></div> or <span></span>\nelement is passed, as in let myRadio = createSelect(container), it will\nbecome the radio button's parent element.\n
\n",
"itemtype": "method",
@@ -11130,7 +11130,7 @@
]
},
{
- "file": "src/dom/dom.js",
+ "file": "src\\dom\\dom.js",
"line": 1759,
"description": "myRadio.option(value, [label]) adds an option to the menu. The first parameter, value, is a string that sets the option's value and label. The second parameter, label, is optional. If provided, it sets the label displayed for the value. If an option with value already exists, its label is changed and its value is returned.myRadio.value() returns the currently-selected option's value.myRadio.selected() returns the currently-selected option.myRadio.selected(value) selects the given option and returns it as an HTMLInputElement.myRadio.disable(shouldDisable) Disables the radio button if true is passed, and enables it if false is passed.value, is optional. If a color string or\np5.Color object is passed, it will set the default\ncolor.\n
\n",
"itemtype": "method",
@@ -11155,7 +11155,7 @@
"submodule": "DOM"
},
{
- "file": "src/dom/dom.js",
+ "file": "src\\dom\\dom.js",
"line": 1859,
"description": "myPicker.value() returns the current color as a hex string in the format '#rrggbb'.myPicker.color() returns the current color as a p5.Color object.<input></input> element.myInput.size() to set the length of the text box.value, is optional. It's a string that sets the\ninput's default value. The input is blank by default.type, is also optional. It's a string that\nspecifies the type of text being input. See MDN for a full\nlist of options.\nThe default is 'text'.<input></input> element of type 'file'.createFileInput() allows users to select local files for use in a sketch.\nIt returns a p5.File object.callback, is a function that's called when the file\nloads. The callback function should have one parameter, file, that's a\np5.File object.multiple, is optional. It's a boolean value that\nallows loading multiple files if set to true. If true, callback\nwill be called once per file.<video> element for simple audio/video playback.createVideo() returns a new\np5.MediaElement object. Videos are shown by\ndefault. They can be hidden by calling video.hide() and drawn to the\ncanvas using image().src, is the path the video. If a single string is\npassed, as in 'assets/topsecret.mp4', a single video is loaded. An array\nof strings can be used to load the same video in different formats. For\nexample, ['assets/topsecret.mp4', 'assets/topsecret.ogv', 'assets/topsecret.webm'].\nThis is useful for ensuring that the video can play across different browsers with\ndifferent capabilities. See\nMDN\nfor more information about supported formats.callback, is optional. It's a function to call once\nthe video is ready to play.<audio> element for simple audio playback.createAudio() returns a new\np5.MediaElement object.src, is the path the video. If a single string is\npassed, as in 'assets/video.mp4', a single video is loaded. An array\nof strings can be used to load the same video in different formats. For\nexample, ['assets/video.mp4', 'assets/video.ogv', 'assets/video.webm'].\nThis is useful for ensuring that the video can play across different\nbrowsers with different capabilities. See\nMDN\nfor more information about supported formats.callback, is optional. It's a function to call once\nthe audio is ready to play.<video> element that \"captures\" the audio/video stream from\nthe webcam and microphone.createCapture() returns a new\np5.MediaElement object. Videos are shown by\ndefault. They can be hidden by calling capture.hide() and drawn to the\ncanvas using image().type, is optional. It sets the type of capture to\nuse. By default, createCapture() captures both audio and video. If VIDEO\nis passed, as in createCapture(VIDEO), only video will be captured.\nIf AUDIO is passed, as in createCapture(AUDIO), only audio will be\ncaptured. A constraints object can also be passed to customize the stream.\nSee the \nW3C documentation for possible properties. Different browsers support different\nproperties.{flipped:true}\nto mirror the video output.If it is true then it means that video will be mirrored\nor flipped and if nothing is mentioned then by default it will be false.callback, is optional. It's a function to call once\nthe capture is ready for use. The callback function should have one\nparameter, stream, that's a\nMediaStream object.createCapture() only works when running a sketch locally or using HTTPS. Learn more\nhere\nand here.tag, is a string an HTML tag such as 'h5'.content, is optional. It's a string that sets the\nHTML content to insert into the new element. New elements have no content\nby default.myElement.child() accepts either a string ID, DOM node, or\np5.Element. For example,\nmyElement.child(otherElement). If no argument is provided, an array of\nchildren DOM nodes is returned.center() will center the element relative to its parent or according to\nthe page's body if the element has no parent.myElement.center() the element is aligned\nboth vertically and horizontally.append, is optional. If true is passed, as in\nmyElement.html('hi', true), the HTML is appended instead of replacing\nexisting HTML.myElement.html(), the element's inner\nHTML is returned.x and y, set the element's position relative\nto the top-left corner of the web page.positionType, is optional. It sets the element's\npositioning scheme.\npositionType is a string that can be either 'static', 'fixed',\n'relative', 'sticky', 'initial', or 'inherit'.myElement.position(), the method returns\nthe element's position in an object, as in { x: 0, y: 0 }.property, is a string. If the name of a style\nproperty is passed, as in myElement.style('color'), the method returns\nthe current value as a string or null if it hasn't been set. If a\nproperty:style string is passed, as in\nmyElement.style('color:deeppink'), the method sets the style property\nto value.value, is optional. It sets the property's value.\nvalue can be a string, as in\nmyElement.style('color', 'deeppink'), or a\np5.Color object, as in\nmyElement.style('color', myColor).id, can be set with their dedicated methods. For example,\nnextButton.id('next') sets an element's id attribute. Calling\nnextButton.attribute('id', 'next') has the same effect.attr, is the attribute's name as a string. Calling\nmyElement.attribute('align') returns the attribute's current value as a\nstring or null if it hasn't been set.value, is optional. It's a string used to set the\nattribute's value. For example, calling\nmyElement.attribute('align', 'center') sets the element's horizontal\nalignment to center.attr is the attribute's name as a string. For example,\ncalling myElement.removeAttribute('align') removes its align\nattribute if it's been set.myElement.value() returns the element's current value.value, is an optional number or string. If provided,\nas in myElement.value(123), it's used to set the element's value.myElement.size() without an argument returns the element's size\nas an object with the properties width and height. For example,\n { width: 20, height: 10 }.width, is optional. It's a number used to set the\nelement's width. Calling myElement.size(10), is also optional. It's a number used to set the element's height. For example, calling myElement.size(20, 10)` sets the element's width to 20 pixels and height\nto 10 pixels.AUTO can be used to adjust one dimension at a time while\nmaintaining the aspect ratio, which is width / height. For example,\nconsider an element that's 200 pixels wide and 100 pixels tall. Calling\nmyElement.size(20, AUTO) sets the width to 20 pixels and height to 10\npixels.myElement.size() until after the data loads.callback, is a function to call once the file loads.\nThe callback function should have one parameter, file, that's a\np5.File object. If the user drops multiple files on\nthe element, callback, is called once for each file.fxn, is a function to call when the browser detects\none or more dropped files. The callback function should have one\nparameter, event, that's a\nDragEvent.elmnt, is optional. If another\np5.Element object is passed, as in\nmyElement.draggable(otherElement), the other element will become draggable.media.play() will restart playing audio/video from the beginning.media.play() will resume playing audio/video from the moment it paused.shouldAutoplay, is optional. Calling\nmedia.autoplay() without an argument causes the media to play\nautomatically. If true is passed, as in media.autoplay(true), the\nmedia will automatically play. If false is passed, as in\nmedia.autoPlay(false), it won't play automatically.media.volume() without an argument returns the current volume\nas a number in the range 0 (off) to 1 (maximum).val, is optional. It's a number that sets the volume\nfrom 0 (off) to 1 (maximum). For example, calling media.volume(0.5)\nsets the volume to half of its maximum.val, is optional. It's a number that sets the playback\nspeed. 1 plays the media at normal speed, 0.5 plays it at half speed, 2\nplays it at double speed, and so on. -1 plays the media at normal speed\nin reverse.media.speed() returns the current speed as a number.time, is optional. It's a number that specifies the\ntime, in seconds, to jump to when playback begins.media.time() without an argument returns the number of seconds\nthe audio/video has played.audioNode, can be an AudioNode or an object from the\np5.sound library.myElement.connect(), the element\nconnects to the main output. All connections are removed by the\n.disconnect() method.time, is the time, in seconds, when the function\nshould run. This value is passed to callback as its first argument.callback, is the function to call at the specified\ncue time.value, is optional and can be any type of value.\nvalue is passed to callback.media.addCue() returns an ID as a string. This is useful for\nremoving the cue later.media.addCue().File properties and methods are accessible.'image' and 'text' are both MIME types.'image'\nMIME type\nmay have a subtype such as png or jpeg.Boolean system variable that's true if any key is currently pressed\nand false if not.String system variable that contains the value of the last key typed.key === \"a\" evaluates to\ntrue if the a key was typed and false if not. key doesn’t update\nfor special keys such as LEFT_ARROW and ENTER. Use keyCode instead for\nspecial keys. The keyIsDown() function should\nbe used to check for multiple different key presses at the same time.Number system variable that contains the code of the last key typed.keyCode. For example, the a key has the keyCode 65.\nThe keyCode variable is helpful for checking whether a special key has\nbeen typed. For example, the following conditional checks whether the enter\nkey has been typed:
\nif (keyCode === 13) {\n // Code to run if the enter key was pressed.\n}\nENTER\nwhich has a value of 13:
\nif (keyCode === ENTER) {\n // Code to run if the enter key was pressed.\n}\nBACKSPACE, DELETE, ENTER, RETURN, TAB,\nESCAPE, SHIFT, CONTROL, OPTION, ALT, UP_ARROW, DOWN_ARROW,\nLEFT_ARROW, and RIGHT_ARROW are all helpful shorthands the key codes of\nspecial keys. Key codes can be found on websites such as\nkeycode.info.keyPressed() sets a code block to run once\nautomatically when the user presses any key:
\nfunction keyPressed() {\n // Code to run.\n}\nkeyPressed() is called by p5.js:
\nfunction keyPressed() {\n if (key === 'c') {\n // Code to run.\n }\n\n if (keyCode === ENTER) {\n // Code to run.\n }\n}\nevent, is optional. keyPressed() is always passed a\nKeyboardEvent\nobject with properties that describe the key press event:
\nfunction keyPressed(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nSPACE key is pressed. To prevent any default behavior for this event, add\nreturn false; to the end of the function.keyReleased() sets a code block to run once\nautomatically when the user releases any key:
\nfunction keyReleased() {\n // Code to run.\n}\nkeyReleased() is called by p5.js:
\nfunction keyReleased() {\n if (key === 'c') {\n // Code to run.\n }\n\n if (keyCode === ENTER) {\n // Code to run.\n }\n}\nevent, is optional. keyReleased() is always passed a\nKeyboardEvent\nobject with properties that describe the key press event:
\nfunction keyReleased(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nreturn false; to the end\nof the function.keyTyped() sets a code block to run once\nautomatically when the user presses any key with a printable character such\nas a or 1. Modifier keys such as SHIFT, CONTROL, and the arrow keys\nwill be ignored:
\nfunction keyTyped() {\n // Code to run.\n}\nkeyTyped() is called by p5.js:
\nfunction keyTyped() {\n // Check for the \"c\" character using key.\n if (key === 'c') {\n // Code to run.\n }\n\n // Check for \"c\" using keyCode.\n if (keyCode === 67) {\n // Code to run.\n }\n}\nevent, is optional. keyTyped() is always passed a\nKeyboardEvent\nobject with properties that describe the key press event:
\nfunction keyReleased(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nALT.return false; to the end\nof the function.true if the key it’s checking is pressed and false if not.keyIsDown() is helpful when checking for multiple different key presses.\nFor example, keyIsDown() can be used to check if both LEFT_ARROW and\nUP_ARROW are pressed:
\nif (keyIsDown(LEFT_ARROW) && keyIsDown(UP_ARROW)) {\n // Move diagonally.\n}\nkeyIsDown() can check for key presses using\nkeyCode values, as in keyIsDown(37) or\nkeyIsDown(LEFT_ARROW). Key codes can be found on websites such as\nkeycode.info.Number system variable that tracks the mouse's horizontal movement.movedX tracks how many pixels the mouse moves left or right between\nframes. movedX will have a negative value if the mouse moves left between\nframes and a positive value if it moves right. movedX can be calculated\nas mouseX - pmouseX.movedX continues updating even when\nrequestPointerLock() is active.Number system variable that tracks the mouse's vertical movement.movedY tracks how many pixels the mouse moves up or down between\nframes. movedY will have a negative value if the mouse moves up between\nframes and a positive value if it moves down. movedY can be calculated\nas mouseY - pmouseY.movedY continues updating even when\nrequestPointerLock() is active.Number system variable that tracks the mouse's horizontal position.mouseX keeps track of the mouse's position relative to the\ntop-left corner of the canvas. For example, if the mouse is 50 pixels from\nthe left edge of the canvas, then mouseX will be 50.mouseX keeps track of the mouse's position relative to the\ncenter of the canvas. For example, if the mouse is 50 pixels to the right\nof the canvas' center, then mouseX will be 50.mouseX will hold the\nx-coordinate of the most recent touch point.Number system variable that tracks the mouse's vertical position.mouseY keeps track of the mouse's position relative to the\ntop-left corner of the canvas. For example, if the mouse is 50 pixels from\nthe top edge of the canvas, then mouseY will be 50.mouseY keeps track of the mouse's position relative to the\ncenter of the canvas. For example, if the mouse is 50 pixels below the\ncanvas' center, then mouseY will be 50.mouseY will hold the\ny-coordinate of the most recent touch point.Number system variable that tracks the mouse's previous horizontal\nposition.pmouseX keeps track of the mouse's position relative to the\ntop-left corner of the canvas. Its value is\nmouseX from the previous frame. For example, if\nthe mouse was 50 pixels from the left edge of the canvas during the last\nframe, then pmouseX will be 50.pmouseX keeps track of the mouse's position relative to the\ncenter of the canvas. For example, if the mouse was 50 pixels to the right\nof the canvas' center during the last frame, then pmouseX will be 50.pmouseX will hold the\nx-coordinate of the last touch point.pmouseX is reset to the current mouseX\nvalue at the start of each touch event.Number system variable that tracks the mouse's previous vertical\nposition.pmouseY keeps track of the mouse's position relative to the\ntop-left corner of the canvas. Its value is\nmouseY from the previous frame. For example, if\nthe mouse was 50 pixels from the top edge of the canvas during the last\nframe, then pmouseY will be 50.pmouseY keeps track of the mouse's position relative to the\ncenter of the canvas. For example, if the mouse was 50 pixels below the\ncanvas' center during the last frame, then pmouseY will be 50.pmouseY will hold the\ny-coordinate of the last touch point.pmouseY is reset to the current mouseY\nvalue at the start of each touch event.Number variable that tracks the mouse's horizontal position within the\nbrowser.winMouseX keeps track of the mouse's position relative to the top-left\ncorner of the browser window. For example, if the mouse is 50 pixels from\nthe left edge of the browser, then winMouseX will be 50.winMouseX will hold the x-coordinate of the most\nrecent touch point.Number variable that tracks the mouse's vertical position within the\nbrowser.winMouseY keeps track of the mouse's position relative to the top-left\ncorner of the browser window. For example, if the mouse is 50 pixels from\nthe top edge of the browser, then winMouseY will be 50.winMouseY will hold the y-coordinate of the most\nrecent touch point.Number variable that tracks the mouse's previous horizontal position\nwithin the browser.pwinMouseX keeps track of the mouse's position relative to the top-left\ncorner of the browser window. Its value is\nwinMouseX from the previous frame. For\nexample, if the mouse was 50 pixels from\nthe left edge of the browser during the last frame, then pwinMouseX will\nbe 50.pwinMouseX will hold the x-coordinate of the most\nrecent touch point. pwinMouseX is reset to the current\nwinMouseX value at the start of each touch\nevent.Number variable that tracks the mouse's previous vertical position\nwithin the browser.pwinMouseY keeps track of the mouse's position relative to the top-left\ncorner of the browser window. Its value is\nwinMouseY from the previous frame. For\nexample, if the mouse was 50 pixels from\nthe top edge of the browser during the last frame, then pwinMouseY will\nbe 50.pwinMouseY will hold the y-coordinate of the most\nrecent touch point. pwinMouseY is reset to the current\nwinMouseY value at the start of each touch\nevent.mouseButton variable is either LEFT, RIGHT, or CENTER,\ndepending on which button was pressed last.mouseButton differently. See\nMDN\nfor more information.Boolean system variable that's true if the mouse is pressed and\nfalse if not.mouseMoved() sets a code block to run\nautomatically when the user moves the mouse without clicking any mouse\nbuttons:
\nfunction mouseMoved() {\n // Code to run.\n}\nmouseMoved() is called by p5.js:
\nfunction mouseMoved() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. mouseMoved() is always passed a\nMouseEvent\nobject with properties that describe the mouse move event:
\nfunction mouseMoved(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nreturn false; to the end of the function.mouseDragged() sets a code block to run\nautomatically when the user clicks and drags the mouse:
\nfunction mouseDragged() {\n // Code to run.\n}\nmouseDragged() is called by p5.js:
\nfunction mouseDragged() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. mouseDragged() is always passed a\nMouseEvent\nobject with properties that describe the mouse drag event:
\nfunction mouseDragged(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nmouseDragged() will run when a user moves a touch\npoint if touchMoved() isn’t declared. If\ntouchMoved() is declared, then\ntouchMoved() will run when a user moves a\ntouch point and mouseDragged() won’t.return false; to the end of the function.mousePressed() sets a code block to run\nautomatically when the user presses a mouse button:
\nfunction mousePressed() {\n // Code to run.\n}\nmousePressed() is called by p5.js:
\nfunction mousePressed() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. mousePressed() is always passed a\nMouseEvent\nobject with properties that describe the mouse press event:
\nfunction mousePressed(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nmousePressed() will run when a user’s touch\nbegins if touchStarted() isn’t declared. If\ntouchStarted() is declared, then\ntouchStarted() will run when a user’s touch\nbegins and mousePressed() won’t.return false; to the end of the function.mousePressed(), mouseReleased(),\nand mouseClicked() are all related.\nmousePressed() runs as soon as the user clicks the mouse.\nmouseReleased() runs as soon as the user\nreleases the mouse click. mouseClicked()\nruns immediately after mouseReleased().mouseReleased() sets a code block to run\nautomatically when the user releases a mouse button after having pressed\nit:
\nfunction mouseReleased() {\n // Code to run.\n}\nmouseReleased() is called by p5.js:
\nfunction mouseReleased() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. mouseReleased() is always passed a\nMouseEvent\nobject with properties that describe the mouse release event:
\nfunction mouseReleased(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nmouseReleased() will run when a user’s touch\nends if touchEnded() isn’t declared. If\ntouchEnded() is declared, then\ntouchEnded() will run when a user’s touch\nends and mouseReleased() won’t.return false; to the end of the function.mouseReleased(),\nand mouseClicked() are all related.\nmousePressed() runs as soon as the user\nclicks the mouse. mouseReleased() runs as soon as the user releases the\nmouse click. mouseClicked() runs\nimmediately after mouseReleased().mouseClicked() sets a code block to run\nautomatically when the user releases a mouse button after having pressed\nit:
\nfunction mouseClicked() {\n // Code to run.\n}\nmouseClicked() is called by p5.js:
\nfunction mouseClicked() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. mouseClicked() is always passed a\nMouseEvent\nobject with properties that describe the mouse click event:
\nfunction mouseClicked(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nmouseClicked() will run when a user’s touch\nends if touchEnded() isn’t declared. If\ntouchEnded() is declared, then\ntouchEnded() will run when a user’s touch\nends and mouseClicked() won’t.return false; to the end of the function.mouseClicked() are all related.\nmousePressed() runs as soon as the user\nclicks the mouse. mouseReleased() runs as\nsoon as the user releases the mouse click. mouseClicked() runs\nimmediately after mouseReleased().doubleClicked() sets a code block to run\nautomatically when the user presses and releases the mouse button twice\nquickly:
\nfunction doubleClicked() {\n // Code to run.\n}\ndoubleClicked() is called by p5.js:
\nfunction doubleClicked() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. doubleClicked() is always passed a\nMouseEvent\nobject with properties that describe the double-click event:
\nfunction doubleClicked(event) {\n // Code to run that uses the event.\n console.log(event);\n}\ndoubleClicked() will run after two\ntouches that occur within a short time.return false; to the end of the function.mouseWheel() sets a code block to run\nautomatically when the user scrolls with the mouse wheel:
\nfunction mouseWheel() {\n // Code to run.\n}\nmouseWheel() is called by p5.js:
\nfunction mouseWheel() {\n if (mouseX < 50) {\n // Code to run if the mouse is on the left.\n }\n\n if (mouseY > 50) {\n // Code to run if the mouse is near the bottom.\n }\n}\nevent, is optional. mouseWheel() is always passed a\nMouseEvent\nobject with properties that describe the mouse scroll event:
\nfunction mouseWheel(event) {\n // Code to run that uses the event.\n console.log(event);\n}\nevent object has many properties including delta, a Number\ncontaining the distance that the user scrolled. For example, event.delta\nmight have the value 5 when the user scrolls up. event.delta is positive\nif the user scrolls up and negative if they scroll down. The signs are\nopposite on macOS with \"natural\" scrolling enabled.return false; to the end of the function.mouseWheel() may only work as expected if\nreturn false; is added at the end of the function.requestPointerLock() allows the mouse to move forever without leaving the\nscreen. Calling requestPointerLock() locks the values of\nmouseX, mouseY,\npmouseX, and pmouseY.\nmovedX and movedY\ncontinue updating and can be used to get the distance the mouse moved since\nthe last frame was drawn. Calling\nexitPointerLock() resumes updating the\nmouse system variables.requestPointerLock(). It’s recommended to call requestPointerLock() in\nan event function such as doubleClicked().requestPointerLock() locks the values of\nmouseX, mouseY,\npmouseX, and pmouseY.\nCalling exitPointerLock() resumes updating the mouse system variables.requestPointerLock(). It’s recommended to call requestPointerLock() in\nan event function such as doubleClicked().Array of all the current touch points on a touchscreen device.touches array is empty by default. When the user touches their\nscreen, a new touch point is tracked and added to the array. Touch points\nare Objects with the following properties:
\n",
"itemtype": "property",
@@ -13189,7 +13189,7 @@
"submodule": "Touch"
},
{
- "file": "src/events/touch.js",
+ "file": "src\\events\\touch.js",
"line": 125,
"description": "// Iterate over the touches array.\nfor (let touch of touches) {\n // x-coordinate relative to the top-left\n // corner of the canvas.\n console.log(touch.x);\n\n // y-coordinate relative to the top-left\n // corner of the canvas.\n console.log(touch.y);\n\n // x-coordinate relative to the top-left\n // corner of the browser.\n console.log(touch.winX);\n\n // y-coordinate relative to the top-left\n // corner of the browser.\n console.log(touch.winY);\n\n // ID number\n console.log(touch.id);\n}\ntouchStarted() sets a code block to run\nautomatically each time the user begins touching a touchscreen device:
\nfunction touchStarted() {\n // Code to run.\n}\ntouchStarted() is called by p5.js:
\nfunction touchStarted() {\n // Paint over the background.\n background(200);\n\n // Mark each touch point once with a circle.\n for (let touch of touches) {\n circle(touch.x, touch.y, 40);\n }\n}\ntouchStarted() will be passed a\nTouchEvent\nobject with properties that describe the touch event:
\nfunction touchStarted(event) {\n // Code to run that uses the event.\n console.log(event);\n}\ntouchStarted() isn’t declared. If\ntouchStarted() is declared, then touchStarted() will run when a user’s\ntouch starts and mousePressed() won’t.touchStarted(), touchEnded(), and\ntouchMoved() are all related.\ntouchStarted() runs as soon as the user touches a touchscreen device.\ntouchEnded() runs as soon as the user ends a\ntouch. touchMoved() runs repeatedly as the\nuser moves any touch points.touchMoved() sets a code block to run\nautomatically when the user touches a touchscreen device and moves:
\nfunction touchMoved() {\n // Code to run.\n}\ntouchMoved() is called by p5.js:
\nfunction touchMoved() {\n // Paint over the background.\n background(200);\n\n // Mark each touch point while the user moves.\n for (let touch of touches) {\n circle(touch.x, touch.y, 40);\n }\n}\ntouchMoved() will be passed a\nTouchEvent\nobject with properties that describe the touch event:
\nfunction touchMoved(event) {\n // Code to run that uses the event.\n console.log(event);\n}\ntouchMoved() isn’t declared. If\ntouchMoved() is declared, then touchMoved() will run when a user’s\ntouch points move and mouseDragged() won’t.touchMoved() are all related.\ntouchStarted() runs as soon as the user\ntouches a touchscreen device. touchEnded()\nruns as soon as the user ends a touch. touchMoved() runs repeatedly as\nthe user moves any touch points.touchEnded() sets a code block to run\nautomatically when the user stops touching a touchscreen device:
\nfunction touchEnded() {\n // Code to run.\n}\ntouchEnded() is called by p5.js:
\nfunction touchEnded() {\n // Paint over the background.\n background(200);\n\n // Mark each remaining touch point when the user stops\n // a touch.\n for (let touch of touches) {\n circle(touch.x, touch.y, 40);\n }\n}\ntouchEnded() will be passed a\nTouchEvent\nobject with properties that describe the touch event:
\nfunction touchEnded(event) {\n // Code to run that uses the event.\n console.log(event);\n}\ntouchEnded() isn’t declared. If\ntouchEnded() is declared, then touchEnded() will run when a user’s\ntouch ends and mouseReleased() won’t.touchEnded(), and touchMoved() are all\nrelated. touchStarted() runs as soon as the\nuser touches a touchscreen device. touchEnded() runs as soon as the user\nends a touch. touchMoved() runs repeatedly as\nthe user moves any touch points.createImage() uses the width and height parameters to set the new\np5.Image object's dimensions in pixels. The new\np5.Image can be modified by updating its\npixels array or by calling its\nget() and\nset() methods. The\nloadPixels() method must be called\nbefore reading or modifying pixel values. The\nupdatePixels() method must be called\nfor updates to take effect.saveCanvas() saves the canvas as a PNG image called\nuntitled.png.filename, is optional. It's a string that sets the\nfile's name. If a file extension is included, as in\nsaveCanvas('drawing.png'), then the image will be saved using that\nformat.extension, is also optional. It sets the files format.\nEither 'png', 'webp', or 'jpg' can be used. For example, saveCanvas('drawing', 'jpg')\nsaves the canvas to a file called drawing.jpg.saveFrames() creates an array of frame objects. Each frame is stored as\nan object with its file type, file name, and image data as a string. For\nexample, the first saved frame might have the following properties:{ ext: 'png', filename: 'frame0', imageData: 'data:image/octet-stream;base64, abc123' }.filename, sets the prefix for the file names. For\nexample, setting the prefix to 'frame' would generate the image files\nframe0.png, frame1.png, and so on.extension, sets the file type to either 'png' or\n'jpg'.duration, sets the duration to record in seconds.\nThe maximum duration is 15 seconds.framerate, sets the number of frames to record per\nsecond. The maximum frame rate value is 22. Limits are placed on duration\nand framerate to avoid using too much memory. Recording large canvases\ncan easily crash sketches or even web browsers.callback, is optional. If a function is passed,\nimage files won't be saved by default. The callback function can be used\nto process an array containing the data for each captured frame. The array\nof image data contains a sequence of objects with three properties for each\nframe: imageData, filename, and extension.loadImage() interprets the first parameter one of three ways. If the path\nto an image file is provided, loadImage() will load it. Paths to local\nfiles should be relative, such as 'assets/thundercat.jpg'. URLs such as\n'https://example.com/thundercat.jpg' may be blocked due to browser\nsecurity. Raw image data can also be passed as a base64 encoded image in\nthe form 'data:image/png;base64,arandomsequenceofcharacters'.loadImage() in\npreload() ensures images load before they're\nused in setup() or draw().saveGif() may be called in setup() or at any\npoint while a sketch is running.fileName, sets the gif's file name.duration, sets the gif's duration in seconds.options, is optional. If an object is passed,\nsaveGif() will use its properties to customize the gif. saveGif()\nrecognizes the properties delay, units, silent,\nnotificationDuration, and notificationID.img, is the source image to be drawn. img can be\nany of the following objects:dx and dy, set the coordinates of the\ndestination image's top left corner. See\nimageMode() for other ways to position images.image():
dw and dh, are optional. They set the\nthe width and height to draw the destination image. By default, image()\ndraws the full source image at its original size.sx and sy, are also optional.\nThese coordinates define the top left corner of a subsection to draw from\nthe source image.sw and sh, are also optional.\nThey define the width and height of a subsection to draw from the source\nimage. By default, image() draws the full subsection that begins at\n(sx, sy) and extends to the edges of the source image.fit, is also optional. It enables a subsection of\nthe source image to be drawn without affecting its aspect ratio. If\nCONTAIN is passed, the full subsection will appear within the destination\nrectangle. If COVER is passed, the subsection will completely cover the\ndestination rectangle. This may have the effect of zooming into the\nsubsection.xAlign and yAlign, are also\noptional. They determine how to align the fitted subsection. xAlign can\nbe set to either LEFT, RIGHT, or CENTER. yAlign can be set to\neither TOP, BOTTOM, or CENTER. By default, both xAlign and yAlign\nare set to CENTER.tint() with one parameter interprets it one of four ways.\nIf the parameter is a number, it's interpreted as a grayscale value. If the\nparameter is a string, it's interpreted as a CSS color string. An array of\n[R, G, B, A] values or a p5.Color object can\nalso be used to set the tint color.tint() with two parameters uses the first one as a\ngrayscale value and the second as an alpha value. For example, calling\ntint(255, 128) will make an image 50% transparent.tint() with three parameters interprets them as RGB or\nHSB values, depending on the current\ncolorMode(). The optional fourth parameter\nsets the alpha value. For example, tint(255, 0, 0, 100) will give images\na red tint and make them transparent.noTint() restores images to their original colors.imageMode(CORNER).imageMode(CORNERS) also uses the first two parameters of\nimage() as the x- and y-coordinates of the image's\ntop-left corner. The third and fourth parameters are the coordinates of its\nbottom-right corner.imageMode(CENTER) uses the first two parameters of\nimage() as the x- and y-coordinates of the image's\ncenter. The next parameters are its width and height.img.pixels is a one-dimensional array for performance\nreasons.img.pixels[0], img.pixels[1], img.pixels[2],\nand img.pixels[3], respectively. The next pixel at coordinates (1, 0)\nstores its RGBA values at img.pixels[4], img.pixels[5],\nimg.pixels[6], and img.pixels[7]. And so on. The img.pixels array\nfor a 100×100 p5.Image object has\n100 × 100 × 4 = 40,000 elements.img.pixels array. The\nimg.updatePixels() method must be\ncalled after any changes are made.img.pixels\narray.img.loadPixels() must be called before reading or modifying pixel\nvalues.img.updatePixels() only needs to be called after changing values in\nthe img.pixels array. Such changes can be\nmade directly after calling\nimg.loadPixels() or by calling\nimg.set().x, y, width, and height define a\nsubsection of the image to update. Doing so can improve performance in\nsome cases.img.updatePixels()\nwill update the pixels in current frame.img.get() is easy to use but it's not as fast as\nimg.pixels. Use\nimg.pixels to read many pixel values.img.get() with no parameters returns the entire image.img.get() with two parameters, as in img.get(10, 20),\ninterprets them as coordinates. It returns an array with the\n[R, G, B, A] values of the pixel at the given point.img.get() with four parameters, as in\nimg,get(10, 20, 50, 90), interprets them as\ncoordinates and dimensions. The first two parameters are the coordinates\nof the upper-left corner of the subsection. The last two parameters are\nthe width and height of the subsection. It returns a subsection of the\ncanvas in a new p5.Image object.img.get() instead of get() to work directly\nwith images.img.set() is easy to use but it's not as fast as\nimg.pixels. Use\nimg.pixels to set many pixel values.img.set() interprets the first two parameters as x- and y-coordinates. It\ninterprets the last parameter as a grayscale value, a [R, G, B, A] pixel\narray, a p5.Color object, or another\np5.Image object.img.set() for changes to appear.width or height. For example, calling img.resize(50, 0) on an image\nthat was 500 × 300 pixels will resize it to 50 × 30 pixels.srcImage, is an optional\np5.Image object to copy. If a source image isn't\npassed, then img.copy() can copy a region of this image to another\nregion.sx, sy, sw, and sh determine the region\nto copy from the source image. (sx, sy) is the top-left corner of the\nregion. sw and sh are the region's width and height.dx, dy, dw, and dh determine the region\nof this image to copy into. (dx, dy) is the top-left corner of the\nregion. dw and dh are the region's width and height.img.copy() will scale pixels from the source region if it isn't\nthe same size as the destination region.img.mask() uses another p5.Image object's\nalpha channel as the alpha channel for this image. Masks are cumulative\nand can't be removed once applied. If the mask has a different\npixel density from this image, the mask will be scaled.INVERT\nInverts the colors in the image. No parameter is used.GRAY\nConverts the image to grayscale. No parameter is used.THRESHOLD\nConverts the image to black and white. Pixels with a grayscale value\nabove a given threshold are converted to white. The rest are converted to\nblack. The threshold must be between 0.0 (black) and 1.0 (white). If no\nvalue is specified, 0.5 is used.OPAQUE\nSets the alpha channel to be entirely opaque. No parameter is used.POSTERIZE\nLimits the number of colors in the image. Each color channel is limited to\nthe number of colors specified. Values between 2 and 255 are valid, but\nresults are most noticeable with lower values. The default value is 4.BLUR\nBlurs the image. The level of blurring is specified by a blur radius. Larger\nvalues increase the blur. The default value is 4. A gaussian blur is used\nin P2D mode. A box blur is used in WEBGL mode.ERODE\nReduces the light areas. No parameter is used.DILATE\nIncreases the light areas. No parameter is used.srcImage, is the\np5.Image object to blend.sx, sy, sw, and sh determine the region\nto blend from the source image. (sx, sy) is the top-left corner of the\nregion. sw and sh are the regions width and height.dx, dy, dw, and dh determine the region\nof the canvas to blend into. (dx, dy) is the top-left corner of the\nregion. dw and dh are the regions width and height.blendMode, sets the effect used to blend the images'\ncolors. The options are BLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD, or NORMAL.img.save() saves the image as a PNG image called\nuntitled.png.filename, is optional. It's a string that sets the\nfile's name. If a file extension is included, as in\nimg.save('drawing.png'), then the image will be saved using that\nformat.extension, is also optional. It sets the files format.\nEither 'png' or 'jpg' can be used. For example, img.save('drawing', 'jpg')\nsaves the canvas to a file called drawing.jpg.delay, is the length of the delay in milliseconds.index, is optional. If provided, only the frame\nat index will have its delay modified. All other frames will keep\ntheir default delay.pixels is a one-dimensional array for performance reasons.pixels array, one for each RGBA\nvalue. For example, the pixel at coordinates (0, 0) stores its RGBA values\nat pixels[0], pixels[1], pixels[2], and pixels[3], respectively.\nThe next pixel at coordinates (1, 0) stores its RGBA values at pixels[4],\npixels[5], pixels[6], and pixels[7]. And so on. The pixels array\nfor a 100×100 canvas has 100 × 100 × 4 = 40,000 elements.pixels array for a 100×100 canvas has 200 × 200 × 4 =\n160,000 elements.pixels array. The\nupdatePixels() function must be called\nafter any changes are made.srcImage, is the\np5.Image object to blend.sx, sy, sw, and sh determine the region\nto blend from the source image. (sx, sy) is the top-left corner of the\nregion. sw and sh are the regions width and height.dx, dy, dw, and dh determine the region\nof the canvas to blend into. (dx, dy) is the top-left corner of the\nregion. dw and dh are the regions width and height.blendMode, sets the effect used to blend the images'\ncolors. The options are BLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD, or NORMALsrcImage, is the\np5.Image object to blend. The source image can be\nthe canvas itself or a\np5.Image object. copy() will scale pixels from\nthe source region if it isn't the same size as the destination region.sx, sy, sw, and sh determine the region\nto copy from the source image. (sx, sy) is the top-left corner of the\nregion. sw and sh are the region's width and height.dx, dy, dw, and dh determine the region\nof the canvas to copy into. (dx, dy) is the top-left corner of the\nregion. dw and dh are the region's width and height.INVERT\nInverts the colors in the image. No parameter is used.GRAY\nConverts the image to grayscale. No parameter is used.THRESHOLD\nConverts the image to black and white. Pixels with a grayscale value\nabove a given threshold are converted to white. The rest are converted to\nblack. The threshold must be between 0.0 (black) and 1.0 (white). If no\nvalue is specified, 0.5 is used.OPAQUE\nSets the alpha channel to entirely opaque. No parameter is used.POSTERIZE\nLimits the number of colors in the image. Each color channel is limited to\nthe number of colors specified. Values between 2 and 255 are valid, but\nresults are most noticeable with lower values. The default value is 4.BLUR\nBlurs the image. The level of blurring is specified by a blur radius. Larger\nvalues increase the blur. The default value is 4. A gaussian blur is used\nin P2D mode. A box blur is used in WEBGL mode.ERODE\nReduces the light areas. No parameter is used.DILATE\nIncreases the light areas. No parameter is used.filter() uses WebGL in the background by default because it's faster.\nThis can be disabled in P2D mode by adding a false argument, as in\nfilter(BLUR, false). This may be useful to keep computation off the GPU\nor to work around a lack of WebGL support.filter() can also use custom shaders. See\ncreateFilterShader() for more\ninformation.get() is easy to use but it's not as fast as\npixels. Use pixels\nto read many pixel values.get() with no parameters returns the entire canvas.get() with two parameters interprets them as\ncoordinates. It returns an array with the [R, G, B, A] values of the\npixel at the given point.get() with four parameters interprets them as coordinates\nand dimensions. It returns a subsection of the canvas as a\np5.Image object. The first two parameters are the\ncoordinates for the upper-left corner of the subsection. The last two\nparameters are the width and height of the subsection.loadPixels() must be called before reading from or writing to\npixels.set() is easy to use but it's not as fast as\npixels. Use pixels\nto set many pixel values.set() interprets the first two parameters as x- and y-coordinates. It\ninterprets the last parameter as a grayscale value, a [R, G, B, A] pixel\narray, a p5.Color object, or a\np5.Image object. If an image is passed, the first\ntwo parameters set the coordinates for the image's upper-left corner,\nregardless of the current imageMode().set() for changes to appear.updatePixels() only needs to be called after changing values in the\npixels array. Such changes can be made directly\nafter calling loadPixels() or by calling\nset().Object.null, or other objects.path, is always a string with the path to the file.\nPaths to local files should be relative, as in\nloadJSON('assets/data.json'). URLs such as\n'https://example.com/data.json' may be blocked due to browser security.successCallback, is optional. If a function is\npassed, as in loadJSON('assets/data.json', handleData), then the\nhandleData() function will be called once the data loads. The object\ncreated from the JSON data will be passed to handleData() as its only argument.failureCallback, is also optional. If a function is\npassed, as in loadJSON('assets/data.json', handleData, handleFailure),\nthen the handleFailure() function will be called if an error occurs while\nloading. The Error object will be passed to handleFailure() as its only\nargument.loadJSON() within\npreload() ensures data loads before it's used in\nsetup() or draw().Array.path, is always a string with the path to the file.\nPaths to local files should be relative, as in\nloadStrings('assets/data.txt'). URLs such as\n'https://example.com/data.txt' may be blocked due to browser security.successCallback, is optional. If a function is\npassed, as in loadStrings('assets/data.txt', handleData), then the\nhandleData() function will be called once the data loads. The array\ncreated from the text data will be passed to handleData() as its only\nargument.failureCallback, is also optional. If a function is\npassed, as in loadStrings('assets/data.txt', handleData, handleFailure),\nthen the handleFailure() function will be called if an error occurs while\nloading. The Error object will be passed to handleFailure() as its only\nargument.loadStrings() within\npreload() ensures data loads before it's used in\nsetup() or draw().<time units=\"s\">1234</time>.path, is always a string with the path to the file.\nPaths to local files should be relative, as in\nloadXML('assets/data.xml'). URLs such as 'https://example.com/data.xml'\nmay be blocked due to browser security.successCallback, is optional. If a function is\npassed, as in loadXML('assets/data.xml', handleData), then the\nhandleData() function will be called once the data loads. The\np5.XML object created from the data will be passed\nto handleData() as its only argument.failureCallback, is also optional. If a function is\npassed, as in loadXML('assets/data.xml', handleData, handleFailure), then\nthe handleFailure() function will be called if an error occurs while\nloading. The Error object will be passed to handleFailure() as its only\nargument.loadXML() within\npreload() ensures data loads before it's used in\nsetup() or draw().httpDo(path, 'GET'). The 'binary' datatype will return\na Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer\nwhich can be used to initialize typed arrays (such as Uint8Array).httpDo(path, 'POST').
\nFor more advanced use, you may also pass in the path as the first argument\nand a object as the second argument, the signature follows the one specified\nin the Fetch API specification.\nThis method is suitable for fetching files up to size of 64MB when \"GET\" is used.filename, is the name of the file to be written. If\na string is passed, as in createWriter('words.txt'), a new\np5.PrintWriter object will be created that\nwrites to a file named words.txt.extension, is optional. If a string is passed, as\nin createWriter('words', 'csv'), the first parameter will be interpreted\nas the file name and the second parameter as the extension.data, is the data to write. data can be a number or\nstring, as in myWriter.write('hi'), or an array of numbers and strings,\nas in myWriter.write([1, 2, 3]). A comma will be inserted between array\narray elements when they're added to the print stream.data, is the data to write. data can be a number or\nstring, as in myWriter.print('hi'), or an array of numbers and strings,\nas in myWriter.print([1, 2, 3]). A comma will be inserted between array\narray elements when they're added to the print stream.Object or Array to a JSON file.null, or other objects.json, is the data to save. The data can be an array,\nas in [1, 2, 3], or an object, as in\n{ x: 50, y: 50, color: 'deeppink' }.filename, is a string that sets the file's name.\nFor example, calling saveJSON([1, 2, 3], 'data.json') saves the array\n[1, 2, 3] to a file called data.json on the user's computer.optimize, is optional. If true is passed, as in\nsaveJSON([1, 2, 3], 'data.json', true), then all unneeded whitespace will\nbe removed to reduce the file size.Array of Strings to a file, one per line.list, is an array with the strings to save.filename, is a string that sets the file's name.\nFor example, calling saveStrings(['0', '01', '011'], 'data.txt') saves\nthe array ['0', '01', '011'] to a file called data.txt on the user's\ncomputer.extension, is optional. If a string is passed, as in\nsaveStrings(['0', '01', '01'], 'data', 'txt')`, the second parameter will\nbe interpreted as the file name and the third parameter as the extension.isCRLF, is also optional, If true is passed, as\nin saveStrings(['0', '01', '011'], 'data', 'txt', true), then two\ncharacters, \\r\\n , will be added to the end of each string to create new\nlines in the saved file. \\r is a carriage return (CR) and \\n is a line\nfeed (LF). By default, only \\n (line feed) is added to each string in\norder to create new lines.\n
",
"class": "p5.Table",
@@ -15613,7 +15613,7 @@
"submodule": "Table"
},
{
- "file": "src/io/p5.Table.js",
+ "file": "src\\io\\p5.Table.js",
"line": 43,
"description": "String.<language>JavaScript</language> has the name language.<language>JavaScript</language> has the name language.name, is the element's new name as a string. For example,\ncalling myXML.setName('planet') will make the element's new tag name\n<planet></planet>.true if the element has child elements and false if not.Strings.name, is optional. If a string is passed, as in\nmyXML.getChildren('cat'), then the method will only return child elements\nwith the tag <cat>.name, is optional. If a string is passed, as in\nmyXML.getChild('cat'), then the first child element with the tag\n<cat> will be returned. If a number is passed, as in\nmyXML.getChild(1), then the child element at that index will be returned.child, is the p5.XML object to add\nas a child element. For example, calling myXML.addChild(otherXML) inserts\notherXML as a child element of myXML.name, is the child element to remove. If a string is\npassed, as in myXML.removeChild('cat'), then the first child element\nwith the tag <cat> will be removed. If a number is passed, as in\nmyXML.removeChild(1), then the child element at that index will be\nremoved.Array with the names of the element's attributes.true if the element has a given attribute and false if not.name, is a string with the name of the attribute being\nchecked.Number.name, is a string with the name of the attribute\nbeing checked. For example, calling myXML.getNum('id') returns the\nelement's id attribute as a number.defaultValue, is optional. If a number is passed,\nas in myXML.getNum('id', -1), it will be returned if the attribute\ndoesn't exist or can't be converted to a number.name, is a string with the name of the attribute\nbeing checked. For example, calling myXML.getString('color') returns the\nelement's id attribute as a string.defaultValue, is optional. If a string is passed,\nas in myXML.getString('color', 'deeppink'), it will be returned if the\nattribute doesn't exist.name, is a string with the name of the attribute\nbeing set.value, is the attribute's new value. For example,\ncalling myXML.setAttribute('id', 123) sets the id attribute to the\nvalue 123.String.defaultValue, is optional. If a string is passed, as in\nmyXML.getContent('???'), it will be returned if the element has no\ncontent.<language>JavaScript</language> has the content JavaScript.content, is a string with the element's new content.String.myXML.serialize() is useful for sending the element over the network or\nsaving it to a file.abs(-5) and\nabs(5) both return 5. The absolute value of a number is always positive.ceil(9.03) and ceil(9.97) both return the value\n10.dist() with four parameters calculates distance in two\ndimensions.dist() with six parameters calculates distance in three\ndimensions.amt parameter is the amount to interpolate between the two numbers.\n0.0 is equal to the first number, 0.1 is very near the first number, 0.5 is\nhalf-way in between, and 1.0 is equal to the second number. The lerp()\nfunction is convenient for creating motion along a straight path and for\ndrawing dotted lines.amt is less than 0 or more than 1, lerp() will return a\nnumber outside of the original interval. For example, calling\nlerp(0, 10, 1.5) will return 15.log() expects the n parameter to be a value greater than 0 because\nthe natural logarithm is defined that way.x and y, are the point's\ncoordinates (x, y). A vector's magnitude is the distance from the origin\n(0, 0) to (x, y). mag(x, y) is a shortcut for calling\ndist(0, 0, x, y).map(2, 0, 10, 0, 100) returns 20. The first three\narguments set the original value to 2 and the original range from 0 to 10.\nThe last two arguments set the target range from 0 to 100. 20's position\nin the target range [0, 100] is proportional to 2's position in the\noriginal range [0, 10].withinBounds, is optional. By default, map() can\nreturn values outside of the target range. For example,\nmap(11, 0, 10, 0, 100) returns 110. Passing true as the sixth parameter\nconstrains the remapped value to the target range. For example,\nmap(11, 0, 10, 0, 100, true) returns 100.max() with one parameter interprets it as an array of\nnumbers and returns the largest number.max() with two or more parameters interprets them as\nindividual numbers and returns the largest number.min() with one parameter interprets it as an array of\nnumbers and returns the smallest number.min() with two or more parameters interprets them as\nindividual numbers and returns the smallest number.norm(2, 0, 10) returns 0.2. 2's position in the original\nrange [0, 10] is proportional to 0.2's position in the range [0, 1]. This\nis the same as calling map(2, 0, 10, 0, 1).pow(2, 3) evaluates the expression\n2 × 2 × 2. pow(2, -3) evaluates 1 ÷\n(2 × 2 × 2).round(133.8) returns the value 134.decimals, is optional. It sets the number of\ndecimal places to use when rounding. For example, round(12.34, 1) returns\n12.3. decimals is 0 by default.sq(3) evaluates 3 × 3 which is 9. sq(-3) evaluates -3 × -3\nwhich is also 9. Multiplying two negative numbers produces a positive\nnumber. The value returned by sq() is always positive.sqrt(9) returns 3 because 3 × 3 = 9. sqrt()\nalways returns a positive value. sqrt() doesn't work with negative arguments\nsuch as sqrt(-9).fract(12.34) returns 0.34.createVector(3, 4) creates a new\np5.Vector object with an x-component of 3 and a\ny-component of 4. From the origin, this vector's tip is 3 units to the\nright and 4 units down.pos.add(vel). Vector math relies on methods inside the\np5.Vector class.noise()\ncan be made \"smooth\". Calls to noise() with similar inputs will produce\nsimilar outputs. noise() is used to create textures, motion, shapes,\nterrains, and so on. Ken Perlin invented noise() while animating the\noriginal Tron film in the 1980s.noise() always returns values between 0 and 1. It returns the same value\nfor a given input while a sketch is running. noise() produces different\nresults each time a sketch runs. The\nnoiseSeed() function can be used to generate\nthe same sequence of Perlin noise values each time a sketch runs.noise() interprets inputs as coordinates. The sequence\nof noise values will be smoother when the input coordinates are closer. The\nsecond way is to use the noiseDetail()\nfunction.noise() with one parameter computes noise values in one\ndimension. This dimension can be thought of as space, as in noise(x), or\ntime, as in noise(t).noise() with two parameters computes noise values in two\ndimensions. These dimensions can be thought of as space, as in\nnoise(x, y), or space and time, as in noise(x, t).noise() with three parameters computes noise values in\nthree dimensions. These dimensions can be thought of as space, as in\nnoise(x, y, z), or space and time, as in noise(x, y, t).noiseDetail() changes the number of octaves and the falloff amount. For\nexample, calling noiseDetail(6, 0.25) ensures that\nnoise() will use six octaves. Each higher octave\nwill contribute 25% as much (75% less) compared to its predecessor. Falloff\nvalues between 0 and 1 are valid. However, falloff values greater than 0.5\nmight result in noise values greater than 1.noiseSeed() with a constant argument,\nsuch as noiseSeed(99), makes noise() produce the\nsame results each time a sketch is run.toString() is useful for printing vectors to the console while\ndebugging.x, y, and z components.set() can use separate numbers, as in v.set(1, 2, 3), a\np5.Vector object, as in v.set(v2), or an\narray of numbers, as in v.set([1, 2, 3]).v.set(4, 5) sets v.x to 4, v.y to 5, and v.z to 0.\nCalling set() with no arguments, as in v.set(), sets all the vector's\ncomponents to 0.x, y, and z components.add() can use separate numbers, as in v.add(1, 2, 3),\nanother p5.Vector object, as in v.add(v2), or\nan array of numbers, as in v.add([1, 2, 3]).v.add(4, 5) adds 4 to v.x, 5 to v.y, and 0 to v.z.\nCalling add() with no arguments, as in v.add(), has no effect.add(), as in p5.Vector.add(v2, v1), returns a new\np5.Vector object and doesn't change the\noriginals.x, y, and z\ncomponents.rem() can use separate numbers, as in v.rem(1, 2, 3),\nanother p5.Vector object, as in v.rem(v2), or\nan array of numbers, as in v.rem([1, 2, 3]).v.rem(2), then all the components\nwill be set to their values modulo 2. If two values are provided, as in\nv.rem(2, 3), then v.z won't change. Calling rem() with no\narguments, as in v.rem(), has no effect.rem(), as in p5.Vector.rem(v2, v1), returns a\nnew p5.Vector object and doesn't change the\noriginals.x, y, and z components.sub() can use separate numbers, as in v.sub(1, 2, 3), another\np5.Vector object, as in v.sub(v2), or an array\nof numbers, as in v.sub([1, 2, 3]).v.sub(4, 5) subtracts 4 from v.x, 5 from v.y, and 0 from v.z.\nCalling sub() with no arguments, as in v.sub(), has no effect.sub(), as in p5.Vector.sub(v2, v1), returns a new\np5.Vector object and doesn't change the\noriginals.x, y, and z components.mult() can use separate numbers, as in v.mult(1, 2, 3), another\np5.Vector object, as in v.mult(v2), or an array\nof numbers, as in v.mult([1, 2, 3]).v.mult(2), then all the components\nwill be multiplied by 2. If a value isn't provided for a component, it\nwon't change. For example, v.mult(4, 5) multiplies v.x by 4, v.y by 5,\nand v.z by 1. Calling mult() with no arguments, as in v.mult(), has\nno effect.mult(), as in p5.Vector.mult(v, 2), returns a new\np5.Vector object and doesn't change the\noriginals.x, y, and z components.div() can use separate numbers, as in v.div(1, 2, 3), another\np5.Vector object, as in v.div(v2), or an array\nof numbers, as in v.div([1, 2, 3]).v.div(2), then all the components\nwill be divided by 2. If a value isn't provided for a component, it\nwon't change. For example, v.div(4, 5) divides v.x by, v.y by 5,\nand v.z by 1. Calling div() with no arguments, as in v.div(), has\nno effect.div(), as in p5.Vector.div(v, 2), returns a new\np5.Vector object and doesn't change the\noriginals.mag(x, y).dot() with one parameter interprets it as another\np5.Vector object.dot() with multiple parameters interprets them as the\nx, y, and z components of another vector.dot(), as in p5.Vector.dot(v1, v2), is the same\nas calling v1.dot(v2).cross(), as in p5.Vector.cross(v1, v2), is the same\nas calling v1.cross(v2).dist(), as in p5.Vector.dist(v1, v2), is the same\nas calling v1.dist(v2).dist(x1, y1, x2, y2).normalize(), as in p5.Vector.normalize(v),\nreturns a new p5.Vector object and doesn't change\nthe original.limit(), as in p5.Vector.limit(v, 5), returns a\nnew p5.Vector object and doesn't change the\noriginal.setMag(), as in p5.Vector.setMag(v, 10), returns\na new p5.Vector object and doesn't change the\noriginal.heading() returns angles\nin the units of the current angleMode().heading(), as in p5.Vector.heading(v), works the\nsame way.setHeading() uses\nthe units of the current angleMode().rotate() uses\nthe units of the current angleMode().rotate(), as in p5.Vector.rotate(v, PI),\nreturns a new p5.Vector object and doesn't change\nthe original.v1.angleBetween(v2) === -v2.angleBetween(v1).angleBetween() returns\nangles in the units of the current\nangleMode().x, y, and z components that are proportionally the\nsame distance between two vectors.amt parameter is the amount to interpolate between the old vector and\nthe new vector. 0.0 keeps all components equal to the old vector's, 0.5 is\nhalfway between, and 1.0 sets all components equal to the new vector's.lerp(), as in p5.Vector.lerp(v0, v1, 0.5),\nreturns a new p5.Vector object and doesn't change\nthe original.amt parameter is the amount to interpolate between the old vector and\nthe new vector. 0.0 keeps the heading and magnitude equal to the old\nvector's, 0.5 sets them halfway between, and 1.0 sets the heading and\nmagnitude equal to the new vector's.slerp() differs from lerp() because\nit interpolates magnitude. Calling v0.slerp(v1, 0.5) sets v0's\nmagnitude to a value halfway between its original magnitude and v1's.\nCalling v0.lerp(v1, 0.5) makes no such guarantee.slerp(), as in p5.Vector.slerp(v0, v1, 0.5),\nreturns a new p5.Vector object and doesn't change\nthe original.reflect(), as in p5.Vector.reflect(v, n),\nreturns a new p5.Vector object and doesn't change\nthe original.equals() returns true if the vector's components are all the same as another\nvector's and false if not.equals() with one parameter interprets it as another\np5.Vector object.equals() with multiple parameters interprets them as the\ncomponents of another vector. Any missing parameters are assigned the value\n0.equals(), as in p5.Vector.equals(v0, v1),\ninterprets both parameters as p5.Vector objects.sqrt(x*x + y*y + z*z).)randomSeed() with a constant\nargument, such as randomSeed(99), makes these functions produce the same\nresults each time a sketch is run.random() follows uniform distribution, which means that all outcomes are\nequally likely. When random() is used to generate numbers, all\nnumbers in the output range are equally likely to be returned. When\nrandom() is used to select elements from an array, all elements are\nequally likely to be chosen.random() produces different results each time a sketch runs.\nThe randomSeed() function can be used to\ngenerate the same sequence of numbers or choices each time a sketch runs.random() with no parameters returns a random number from 0\nup to but not including 1.random() with one parameter works one of two ways. If the\nargument passed is a number, random() returns a random number from 0 up\nto but not including the number. For example, calling random(5) returns\nvalues between 0 and 5. If the argument passed is an array, random()\nreturns a random element from that array. For example, calling\nrandom(['🦁', '🐯', '🐻']) returns either a lion, tiger, or bear emoji.random() with two parameters returns a random number from\na given range. The arguments passed set the range's lower and upper bounds.\nFor example, calling random(-5, 10.2) returns values from -5 up to but\nnot including 10.2.randomGaussian() produces different results each time a\nsketch runs. The randomSeed() function can be\nused to generate the same sequence of numbers each time a sketch runs.randomGaussian() might return.\nValues far from the mean are very unlikely and values near the mean are\nvery likely.randomGaussian() with no parameters returns values with a\nmean of 0 and standard deviation of 1.randomGaussian() with one parameter interprets the\nargument passed as the mean. The standard deviation is 1.randomGaussian() with two parameters interprets the first\nargument passed as the mean and the second as the standard deviation.acos() is the inverse of cos(). It expects\narguments in the range -1 to 1. By default, acos() returns values in the\nrange 0 to π (about 3.14). If the\nangleMode() is DEGREES, then values are\nreturned in the range 0 to 180.asin() is the inverse of sin(). It expects input\nvalues in the range of -1 to 1. By default, asin() returns values in the\nrange -π ÷ 2 (about -1.57) to π ÷ 2 (about 1.57). If\nthe angleMode() is DEGREES then values are\nreturned in the range -90 to 90.atan() is the inverse of tan(). It expects input\nvalues in the range of -Infinity to Infinity. By default, atan() returns\nvalues in the range -π ÷ 2 (about -1.57) to π ÷ 2\n(about 1.57). If the angleMode() is DEGREES\nthen values are returned in the range -90 to 90.atan2() is most often used for orienting geometry to the mouse's\nposition, as in atan2(mouseY, mouseX). The first parameter is the point's\ny-coordinate and the second parameter is its x-coordinate.atan2() returns values in the range\n-π (about -3.14) to π (3.14). If the\nangleMode() is DEGREES, then values are\nreturned in the range -180 to 180.cos() is useful for many geometric tasks in creative coding. The values\nreturned oscillate between -1 and 1 as the input angle increases. cos()\ncalculates the cosine of an angle, using radians by default, or according to\nif angleMode() setting (RADIANS or DEGREES).sin() is useful for many geometric tasks in creative coding. The values\nreturned oscillate between -1 and 1 as the input angle increases. sin()\ncalculates the sine of an angle, using radians by default, or according to\nif angleMode() setting (RADIANS or DEGREES).tan() is useful for many geometric tasks in creative coding. The values\nreturned range from -Infinity to Infinity and repeat periodically as the\ninput angle increases. tan() calculates the tan of an angle, using radians\nby default, or according to\nif angleMode() setting (RADIANS or DEGREES).angleMode(DEGREES) switches to degrees. Calling\nangleMode(RADIANS) switches back to radians.angleMode() with no arguments returns current angle mode, which\nis either RADIANS or DEGREES.text('hi', 10, 20) places the bottom-left corner of\nthe text's bounding box at (10, 20).horizAlign, changes the way\ntext() interprets x-coordinates. By default, the\nx-coordinate sets the left edge of the bounding box. textAlign() accepts\nthe following values for horizAlign: LEFT, CENTER, or RIGHT.vertAlign, is optional. It changes the way\ntext() interprets y-coordinates. By default, the\ny-coordinate sets the bottom edge of the bounding box. textAlign()\naccepts the following values for vertAlign: TOP, BOTTOM, CENTER,\nor BASELINE.textLeading() without an argument returns the current spacing.textSize() without an argument returns the current size.style, can be either NORMAL, ITALIC, BOLD, or\nBOLDITALIC.textStyle() may be overridden by CSS styling. This function doesn't\naffect fonts loaded with loadFont().style, can be one of the following values:WORD starts new lines of text at spaces. If a string of text doesn't\nhave spaces, it may overflow the text box and the canvas. This is the\ndefault style.CHAR starts new lines as needed to stay within the text box.textWrap() only works when the maximum width is set for a text box. For\nexample, calling text('Have a wonderful day', 0, 10, 100) sets the\nmaximum width to 100 pixels.textWrap() without an argument returns the current style.loadFont() can load fonts in either .otf or .ttf format. Loaded fonts can\nbe used to style text on the canvas and in HTML elements.path, is the path to a font file.\nPaths to local files should be relative. For example,\n'assets/inconsolata.otf'. The Inconsolata font used in the following\nexamples can be downloaded for free\nhere.\nPaths to remote files should be URLs. For example,\n'https://example.com/inconsolata.otf'. URLs may be blocked due to browser\nsecurity.successCallback, is optional. If a function is\npassed, it will be called once the font has loaded. The callback function\nmay use the new p5.Font object if needed.failureCallback, is also optional. If a function is\npassed, it will be called if the font fails to load. The callback function\nmay use the error\nEvent\nobject if needed.loadFont() in\npreload() ensures fonts load before they're\nused in setup() or\ndraw().str, is the text to be drawn. The second and third\nparameters, x and y, set the coordinates of the text's bottom-left\ncorner. See textAlign() for other ways to\nalign text.maxWidth and maxHeight, are optional.\nThey set the dimensions of the invisible rectangle containing the text. By\ndefault, they set its maximum width and height. See\nrectMode() for other ways to define the\nrectangular text box. Text will wrap to fit within the text box. Text\noutside of the box won't be drawn.WEBGL mode only supports fonts loaded with\nloadFont(). Calling\nstroke() has no effect in WEBGL mode.font, sets the font. textFont() recognizes either\na p5.Font object or a string with the name of a\nsystem font. For example, 'Courier New'.size, is optional. It sets the font size in pixels.\nThis has the same effect as calling textSize().WEBGL mode only supports fonts loaded with\nloadFont().font.textBounds() returns an object with the bounding box's\nlocation and size. For example, calling font.textBounds('p5*js', 5, 20)\nreturns an object in the format\n{ x: 5.7, y: 12.1 , w: 9.9, h: 28.6 }. The x and y properties are\nalways the coordinates of the bounding box's top-left corner.str, is a string of text. The second and third\nparameters, x and y, are the text's position. By default, they set the\ncoordinates of the bounding box's bottom-left corner. See\ntextAlign() for more ways to align text.fontSize, is optional. It sets the font size used to\ndetermine the bounding box. By default, font.textBounds() will use the\ncurrent textSize().{ x: 10, y: 20, alpha: 450 }.str, is a string of text. The second and third\nparameters, x and y, are the text's position. By default, they set the\ncoordinates of the bounding box's bottom-left corner. See\ntextAlign() for more ways to align text.fontSize, is optional. It sets the text's font\nsize. By default, font.textToPoints() will use the current\ntextSize().options, is also optional. font.textToPoints()\nexpects an object with the following properties:sampleFactor is the ratio of the text's path length to the number of\nsamples. It defaults to 0.1. Higher values produce more points along the\npath and are more precise.simplifyThreshold removes collinear points if it's set to a number other\nthan 0. The value represents the threshold angle to use when determining\nwhether two edges are collinear.array, is the array to be shuffled. For example,\ncalling shuffle(myArray) will shuffle the elements of myArray. By\ndefault, the original array won’t be modified. Instead, a copy will be\ncreated, shuffled, and returned.modify, is optional. If true is passed, as in\nshuffle(myArray, true), then the array will be shuffled in place without\nmaking a copy.String to a floating point (decimal) Number.float() converts strings that resemble numbers, such as '12.34', into\nnumbers.str, is the string value to convert. For example, calling\nfloat('12.34') returns the number 12.34. If an array of strings is\npassed, as in float(['12.34', '56.78']), then an array of numbers will be\nreturned.float('giraffe'),\nthen the value NaN (not a number) will be returned.Boolean, String, or decimal Number to an integer.int() converts values to integers. Integers are positive or negative\nnumbers without decimals. If the original value has decimals, as in -34.56,\nthey're removed to produce an integer such as -34.n, is the value to convert. If n is a Boolean, as in\nint(false) or int(true), then the number 0 (false) or 1 (true) will\nbe returned. If n is a string or number, as in int('45') or\nint(67.89), then an integer will be returned. If an array is passed, as\nin int([12.34, 56.78]), then an array of integers will be returned.int('giraffe'),\nthen the value NaN (not a number) will be returned.Boolean or Number to String.str() converts values to strings. See the\nString reference page for guidance on using\ntemplate literals instead.n, is the value to convert. If n is a Boolean, as in\nstr(false) or str(true), then the value will be returned as a string,\nas in 'false' or 'true'. If n is a number, as in str(123), then its\nvalue will be returned as a string, as in '123'. If an array is passed,\nas in str([12.34, 56.78]), then an array of strings will be returned.String or Number to a Boolean.boolean() converts values to true or false.n, is the value to convert. If n is a string, then\nboolean('true') will return true and every other string value will\nreturn false. If n is a number, then boolean(0) will return false\nand every other numeric value will return true. If an array is passed, as\nin boolean([0, 1, 'true', 'blue']), then an array of Boolean values will\nbe returned.Boolean, String, or Number to its byte value.byte() converts a value to an integer (whole number) between -128 and\n127. Values greater than 127 wrap around while negative values are\nunchanged. For example, 128 becomes -128 and -129 remains the same.n, is the value to convert. If n is a Boolean, as in\nbyte(false) or byte(true), the number 0 (false) or 1 (true) will be\nreturned. If n is a string or number, as in byte('256') or byte(256),\nthen the byte value will be returned. Decimal values are ignored. If an\narray is passed, as in byte([true, 123, '456']), then an array of byte\nvalues will be returned.byte('giraffe'),\nthen the value NaN (not a number) will be returned.Number or String to a single-character String.char() converts numbers to their single-character string representations.n, is the value to convert. If a number is passed, as in\nchar(65), the corresponding single-character string is returned. If a\nstring is passed, as in char('65'), the string is converted to an integer\n(whole number) and the corresponding single-character string is returned.\nIf an array is passed, as in char([65, 66, 67]), an array of\nsingle-character strings is returned.String to a Number.unchar() converts single-character strings to their corresponding\ninteger (whole number).n, is the character to convert. For example,\nunchar('A'), returns the number 65. If an array is passed, as in\nunchar(['A', 'B', 'C']), an array of integers is returned.Number to a String with its hexadecimal value.hex() converts a number to a string with its hexadecimal number value.\nHexadecimal (hex) numbers are base-16, which means there are 16 unique\ndigits. Hex extends the numbers 0–9 with the letters A–F. For example, the\nnumber 11 (eleven) in base-10 is written as the letter B in hex.n, is the number to convert. For example, hex(20),\nreturns the string '00000014'. If an array is passed, as in\nhex([1, 10, 100]), an array of hexadecimal strings is returned.digits, is optional. If a number is passed, as in\nhex(20, 2), it sets the number of hexadecimal digits to display. For\nexample, calling hex(20, 2) returns the string '14'.String with a hexadecimal value to a Number.unhex() converts a string with its hexadecimal number value to a number.\nHexadecimal (hex) numbers are base-16, which means there are 16 unique\ndigits. Hex extends the numbers 0–9 with the letters A–F. For example, the\nnumber 11 (eleven) in base-10 is written as the letter B in hex.n, is the hex string to convert. For example,\nunhex('FF'), returns the number 255. If an array is passed, as in\nunhex(['00', '80', 'FF']), an array of numbers is returned.list, is the array of strings to join.separator, is the character(s) that should be used\nto separate the combined strings. For example, calling\njoin(myWords, ' : ') would return a string of words each separated by a\ncolon and spaces.match() uses regular expressions (regex) to match patterns in text. For\nexample, the regex abc can be used to search a string for the exact\nsequence of characters abc. See\nMDN.\nfor more information about regexes.str, is the string to search.regex, is a string with the regular expression to\napply. For example, calling match('Hello, p5*js!', '[a-z][0-9]') would\nreturn the array ['p5'].null is returned.match() uses regular expressions (regex) to match patterns in text. For\nexample, the regex abc can be used to search a string for the exact\nsequence of characters abc. See\nMDN.\nfor more information about regexes. matchAll() is different from\nmatch() because it returns every match, not just\nthe first.str, is the string to search.regex, is a string with the regular expression to\napply. For example, calling\nmatchAll('p5*js is easier than abc123', '[a-z][0-9]') would return the\n2D array [['p5'], ['c1']].[] is returned.Number into a String with a given number of digits.nf() converts numbers such as 123.45 into strings formatted with a set\nnumber of digits, as in '123.4500'.num, is the number to convert to a string. For\nexample, calling nf(123.45) returns the string '123.45'. If an array of\nnumbers is passed, as in nf([123.45, 67.89]), an array of formatted\nstrings will be returned.left, is optional. If a number is passed, as in\nnf(123.45, 4), it sets the minimum number of digits to include to the\nleft of the decimal place. If left is larger than the number of digits in\nnum, then unused digits will be set to 0. For example, calling\nnf(123.45, 4) returns the string '0123.45'.right, is also optional. If a number is passed, as\nin nf(123.45, 4, 1), it sets the minimum number of digits to include to\nthe right of the decimal place. If right is smaller than the number of\ndecimal places in num, then num will be rounded to the given number of\ndecimal places. For example, calling nf(123.45, 4, 1) returns the string\n'0123.5'. If right is larger than the number of decimal places in num,\nthen unused decimal places will be set to 0. For example, calling\nnf(123.45, 4, 3) returns the string '0123.450'.nf(-123.45, 5, 2)\nreturns the string '-00123.45'.Number into a String with commas to mark units of 1,000.nfc() converts numbers such as 12345 into strings formatted with commas\nto mark the thousands place, as in '12,345'.num, is the number to convert to a string. For\nexample, calling nfc(12345) returns the string '12,345'.right, is optional. If a number is passed, as in\nnfc(12345, 1), it sets the minimum number of digits to include to the\nright of the decimal place. If right is smaller than the number of\ndecimal places in num, then num will be rounded to the given number of\ndecimal places. For example, calling nfc(12345.67, 1) returns the string\n'12,345.7'. If right is larger than the number of decimal places in\nnum, then unused decimal places will be set to 0. For example, calling\nnfc(12345.67, 3) returns the string '12,345.670'.Number into a String with a plus or minus sign.nfp() converts numbers such as 123 into strings formatted with a + or\n- symbol to mark whether they're positive or negative, as in '+123'.num, is the number to convert to a string. For\nexample, calling nfp(123.45) returns the string '+123.45'. If an array\nof numbers is passed, as in nfp([123.45, -6.78]), an array of formatted\nstrings will be returned.left, is optional. If a number is passed, as in\nnfp(123.45, 4), it sets the minimum number of digits to include to the\nleft of the decimal place. If left is larger than the number of digits in\nnum, then unused digits will be set to 0. For example, calling\nnfp(123.45, 4) returns the string '+0123.45'.right, is also optional. If a number is passed, as\nin nfp(123.45, 4, 1), it sets the minimum number of digits to include to\nthe right of the decimal place. If right is smaller than the number of\ndecimal places in num, then num will be rounded to the given number of\ndecimal places. For example, calling nfp(123.45, 4, 1) returns the\nstring '+0123.5'. If right is larger than the number of decimal places\nin num, then unused decimal places will be set to 0. For example,\ncalling nfp(123.45, 4, 3) returns the string '+0123.450'.Number into a String with an extra space in front.nfs() converts positive numbers such as 123.45 into strings formatted\nwith an extra space in front, as in ' 123.45'. Doing so can be helpful for\naligning positive and negative numbers.num, is the number to convert to a string. For\nexample, calling nfs(123.45) returns the string ' 123.45'.left, is optional. If a number is passed, as in\nnfs(123.45, 4), it sets the minimum number of digits to include to the\nleft of the decimal place. If left is larger than the number of digits in\nnum, then unused digits will be set to 0. For example, calling\nnfs(123.45, 4) returns the string ' 0123.45'.right, is also optional. If a number is passed, as\nin nfs(123.45, 4, 1), it sets the minimum number of digits to include to\nthe right of the decimal place. If right is smaller than the number of\ndecimal places in num, then num will be rounded to the given number of\ndecimal places. For example, calling nfs(123.45, 4, 1) returns the\nstring ' 0123.5'. If right is larger than the number of decimal places\nin num, then unused decimal places will be set to 0. For example,\ncalling nfs(123.45, 4, 3) returns the string ' 0123.450'.String into pieces and returns an array containing the pieces.value, is the string to split.delim, is the character(s) that should be used to\nsplit the string. For example, calling\nsplit('rock...paper...scissors', '...') would return the array\n['rock', 'paper', 'scissors'] because there are three periods ...\nbetween each word.String into pieces and returns an array containing the pieces.splitTokens() is an enhanced version of\nsplit(). It can split a string when any characters\nfrom a list are detected.value, is the string to split.delim, is optional. It sets the character(s) that\nshould be used to split the string. delim can be a single string, as in\nsplitTokens('rock...paper...scissors...shoot', '...'), or an array of\nstrings, as in\nsplitTokens('rock;paper,scissors...shoot, [';', ',', '...']). By default,\nif no delim characters are specified, then any whitespace character is\nused to split. Whitespace characters include tab (\\t), line feed (\\n),\ncarriage return (\\r), form feed (\\f), and space.String without changing the middle.trim() trims\nwhitespace characters\nsuch as spaces, carriage returns, tabs, Unicode \"nbsp\" character.str, is the string to trim. If a single string is passed,\nas in trim(' pad '), a single string is returned. If an array of\nstrings is passed, as in trim([' pad ', '\\n space \\n']), an array of\nstrings is returned.millis() keeps track of how long a sketch has been running in\nmilliseconds (thousandths of a second). This information is often\nhelpful for timing events and animations.millis() begins tracking\ntime before the code in setup() runs. If a\nsketch includes a preload() function, then\nmillis() begins tracking time as soon as the code in\npreload() starts running.beginGeometry() and endGeometry()\nfunctions help with creating complex 3D shapes from simpler ones such as\nsphere(). beginGeometry() begins adding shapes\nto a custom p5.Geometry object and\nendGeometry() stops adding them.beginGeometry() and endGeometry() can help\nto make sketches more performant. For example, if a complex 3D shape\ndoesn’t change while a sketch runs, then it can be created with\nbeginGeometry() and endGeometry().\nCreating a p5.Geometry object once and then\ndrawing it will run faster than repeatedly drawing the individual pieces.beginGeometry() can only be used in WebGL mode.beginGeometry() and endGeometry()\nfunctions help with creating complex 3D shapes from simpler ones such as\nsphere(). beginGeometry() begins adding shapes\nto a custom p5.Geometry object and\nendGeometry() stops adding them.beginGeometry() and endGeometry() can help\nto make sketches more performant. For example, if a complex 3D shape\ndoesn’t change while a sketch runs, then it can be created with\nbeginGeometry() and endGeometry().\nCreating a p5.Geometry object once and then\ndrawing it will run faster than repeatedly drawing the individual pieces.endGeometry() can only be used in WebGL mode.buildGeometry() helps with creating complex 3D shapes from simpler ones\nsuch as sphere(). It can help to make sketches\nmore performant. For example, if a complex 3D shape doesn’t change while a\nsketch runs, then it can be created with buildGeometry(). Creating a\np5.Geometry object once and then drawing it\nwill run faster than repeatedly drawing the individual pieces.callback, is a function with the drawing instructions for\nthe new p5.Geometry object. It will be called\nonce to create the new 3D shape.buildGeometry() can only be used in WebGL mode.freeGeometry() can improve performance by freeing a\np5.Geometry object’s resources from GPU memory.\nfreeGeometry() works with p5.Geometry objects\ncreated with beginGeometry() and\nendGeometry(),\nbuildGeometry(), and\nloadModel().geometry, is the p5.Geometry\nobject to be freed.freeGeometry() can only be used in WebGL mode.width, is optional. If a Number is passed, as in\nplane(20), it sets the plane’s width and height. By default, width is\n50.height, is also optional. If a Number is passed,\nas in plane(20, 30), it sets the plane’s height. By default, height is\nset to the plane’s width.detailX, is also optional. If a Number is passed,\nas in plane(20, 30, 5) it sets the number of triangle subdivisions to use\nalong the x-axis. All 3D shapes are made by connecting triangles to form\ntheir surfaces. By default, detailX is 1.detailY, is also optional. If a Number is passed,\nas in plane(20, 30, 5, 7) it sets the number of triangle subdivisions to\nuse along the y-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, detailY is 1.plane() can only be used in WebGL mode.width, is optional. If a Number is passed, as in\nbox(20), it sets the box’s width and height. By default, width is 50.height, is also optional. If a Number is passed,\nas in box(20, 30), it sets the box’s height. By default, height is set\nto the box’s width.depth, is also optional. If a Number is passed, as\nin box(20, 30, 40), it sets the box’s depth. By default, depth is set\nto the box’s height.detailX, is also optional. If a Number is passed,\nas in box(20, 30, 40, 5), it sets the number of triangle subdivisions to\nuse along the x-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, detailX is 1.detailY, is also optional. If a number is passed, as\nin box(20, 30, 40, 5, 7), it sets the number of triangle subdivisions to\nuse along the y-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, detailY is 1.box() can only be used in WebGL mode.radius, is optional. If a Number is passed, as in\nsphere(20), it sets the radius of the sphere. By default, radius is 50.detailX, is also optional. If a Number is passed,\nas in sphere(20, 5), it sets the number of triangle subdivisions to use\nalong the x-axis. All 3D shapes are made by connecting triangles to form\ntheir surfaces. By default, detailX is 24.detailY, is also optional. If a Number is passed,\nas in sphere(20, 5, 2), it sets the number of triangle subdivisions to\nuse along the y-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, detailY is 16.sphere() can only be used in WebGL mode.radius, is optional. If a Number is passed, as in\ncylinder(20), it sets the radius of the cylinder’s base. By default,\nradius is 50.height, is also optional. If a Number is passed,\nas in cylinder(20, 30), it sets the cylinder’s height. By default,\nheight is set to the cylinder’s radius.detailX, is also optional. If a Number is passed,\nas in cylinder(20, 30, 5), it sets the number of edges used to form the\ncylinder's top and bottom. Using more edges makes the top and bottom look\nmore like circles. By default, detailX is 24.detailY, is also optional. If a Number is passed,\nas in cylinder(20, 30, 5, 2), it sets the number of triangle subdivisions\nto use along the y-axis, between cylinder's the top and bottom. All 3D\nshapes are made by connecting triangles to form their surfaces. By default,\ndetailY is 1.bottomCap, is also optional. If a false is passed,\nas in cylinder(20, 30, 5, 2, false) the cylinder’s bottom won’t be drawn.\nBy default, bottomCap is true.topCap, is also optional. If a false is passed, as\nin cylinder(20, 30, 5, 2, false, false) the cylinder’s top won’t be\ndrawn. By default, topCap is true.cylinder() can only be used in WebGL mode.radius, is optional. If a Number is passed, as in\ncone(20), it sets the radius of the cone’s base. By default, radius is\n50.height, is also optional. If a Number is passed,\nas in cone(20, 30), it sets the cone’s height. By default, height is\nset to the cone’s radius.detailX, is also optional. If a Number is passed,\nas in cone(20, 30, 5), it sets the number of edges used to form the\ncone's base. Using more edges makes the base look more like a circle. By\ndefault, detailX is 24.detailY, is also optional. If a Number is passed,\nas in cone(20, 30, 5, 7), it sets the number of triangle subdivisions to\nuse along the y-axis connecting the base to the tip. All 3D shapes are made\nby connecting triangles to form their surfaces. By default, detailY is 1.cap, is also optional. If a false is passed, as\nin cone(20, 30, 5, 7, false) the cone’s base won’t be drawn. By default,\ncap is true.cone() can only be used in WebGL mode.ellipsoid()\ndefines a shape by its radii. This is different from\nellipse() which uses diameters\n(width and height).radiusX, is optional. If a Number is passed, as in\nellipsoid(20), it sets the radius of the ellipsoid along the x-axis. By\ndefault, radiusX is 50.radiusY, is also optional. If a Number is passed,\nas in ellipsoid(20, 30), it sets the ellipsoid’s radius along the y-axis.\nBy default, radiusY is set to the ellipsoid’s radiusX.radiusZ, is also optional. If a Number is passed,\nas in ellipsoid(20, 30, 40), it sets the ellipsoid’s radius along the\nz-axis. By default, radiusZ is set to the ellipsoid’s radiusY.detailX, is also optional. If a Number is passed,\nas in ellipsoid(20, 30, 40, 5), it sets the number of triangle\nsubdivisions to use along the x-axis. All 3D shapes are made by connecting\ntriangles to form their surfaces. By default, detailX is 24.detailY, is also optional. If a Number is passed,\nas in ellipsoid(20, 30, 40, 5, 7), it sets the number of triangle\nsubdivisions to use along the y-axis. All 3D shapes are made by connecting\ntriangles to form their surfaces. By default, detailY is 16.ellipsoid() can only be used in WebGL mode.radius, is optional. If a Number is passed, as in\ntorus(30), it sets the radius of the ring. By default, radius is 50.tubeRadius, is also optional. If a Number is\npassed, as in torus(30, 15), it sets the radius of the tube. By default,\ntubeRadius is 10.detailX, is also optional. If a Number is passed,\nas in torus(30, 15, 5), it sets the number of edges used to draw the hole\nof the torus. Using more edges makes the hole look more like a circle. By\ndefault, detailX is 24.detailY, is also optional. If a Number is passed,\nas in torus(30, 15, 5, 7), it sets the number of triangle subdivisions to\nuse while filling in the torus’ height. By default, detailY is 16.torus() can only be used in WebGL mode.orbitControl() within the draw() function allows\nthe user to change the camera’s position:
\nfunction draw() {\n background(200);\n\n // Enable orbiting with the mouse.\n orbitControl();\n\n // Rest of sketch.\n}\nsensitivityX, sensitivityY, and\nsensitivityZ, are optional. They’re numbers that set the sketch’s\nsensitivity to movement along each axis. For example, calling\norbitControl(1, 2, -1) keeps movement along the x-axis at its default\nvalue, makes the sketch twice as sensitive to movement along the y-axis,\nand reverses motion along the z-axis. By default, all sensitivity values\nare 1.options, is also optional. It’s an object that\nchanges the behavior of orbiting. For example, calling\norbitControl(1, 1, 1, options) keeps the default sensitivity values while\nchanging the behaviors set with options. The object can have the\nfollowing properties:
\n",
"itemtype": "method",
@@ -21985,7 +21985,7 @@
"submodule": "Interaction"
},
{
- "file": "src/webgl/interaction.js",
+ "file": "src\\webgl\\interaction.js",
"line": 471,
"description": "let options = {\n // Setting this to false makes mobile interactions smoother by\n // preventing accidental interactions with the page while orbiting.\n // By default, it's true.\n disableTouchActions: true,\n\n // Setting this to true makes the camera always rotate in the\n // direction the mouse/touch is moving.\n // By default, it's false.\n freeRotation: false\n};\n\norbitControl(1, 1, 1, options);\ndebugMode() adds a grid that shows where the “ground” is in a sketch. By\ndefault, the grid will run through the origin (0, 0, 0) of the sketch\nalong the XZ plane. debugMode() also adds an axes icon that points along\nthe positive x-, y-, and z-axes. Calling debugMode() displays the grid\nand axes icon with their default size and position.debugMode() with optional parameters to\ncustomize the debugging environment.debugMode() has one parameter, mode. If the\nsystem constant GRID is passed, as in debugMode(GRID), then the grid\nwill be displayed and the axes icon will be hidden. If the constant AXES\nis passed, as in debugMode(AXES), then the axes icon will be displayed\nand the grid will be hidden.debugMode() has six parameters. The first\nparameter, mode, selects either GRID or AXES to be displayed. The\nnext five parameters, gridSize, gridDivisions, xOff, yOff, and\nzOff are optional. They’re numbers that set the appearance of the grid\n(gridSize and gridDivisions) and the placement of the axes icon\n(xOff, yOff, and zOff). For example, calling\ndebugMode(20, 5, 10, 10, 10) sets the gridSize to 20 pixels, the number\nof gridDivisions to 5, and offsets the axes icon by 10 pixels along the\nx-, y-, and z-axes.debugMode() has five parameters. The first\nparameter, mode, selects either GRID or AXES to be displayed. The\nnext four parameters, axesSize, xOff, yOff, and zOff are optional.\nThey’re numbers that set the appearance of the size of the axes icon\n(axesSize) and its placement (xOff, yOff, and zOff).debugMode() has nine optional parameters. The\nfirst five parameters, gridSize, gridDivisions, gridXOff, gridYOff,\nand gridZOff are numbers that set the appearance of the grid. For\nexample, calling debugMode(100, 5, 0, 0, 0) sets the gridSize to 100,\nthe number of gridDivisions to 5, and sets all the offsets to 0 so that\nthe grid is centered at the origin. The next four parameters, axesSize,\nxOff, yOff, and zOff are numbers that set the appearance of the size\nof the axes icon (axesSize) and its placement (axesXOff, axesYOff,\nand axesZOff). For example, calling\ndebugMode(100, 5, 0, 0, 0, 50, 10, 10, 10) sets the gridSize to 100,\nthe number of gridDivisions to 5, and sets all the offsets to 0 so that\nthe grid is centered at the origin. It then sets the axesSize to 50 and\noffsets the icon 10 pixels along each axis.ambientLight() with optional parameters to\nset the light’s color.ambientLight() has two parameters, gray and\nalpha. alpha is optional. Grayscale and alpha values between 0 and 255\ncan be passed to set the ambient light’s color, as in ambientLight(50) or\nambientLight(50, 30).ambientLight() has one parameter, color. A\np5.Color object, an array of color values, or a\nCSS color string, as in ambientLight('magenta'), can be passed to set the\nambient light’s color.ambientLight() has four parameters, v1, v2,\nv3, and alpha. alpha is optional. RGBA, HSBA, or HSLA values can be\npassed to set the ambient light’s colors, as in ambientLight(255, 0, 0)\nor ambientLight(255, 0, 0, 30). Color values will be interpreted using\nthe current colorMode().specularColor() affects lights that bounce off a surface in a preferred\ndirection. These lights include\ndirectionalLight(),\npointLight(), and\nspotLight(). The function helps to create\nhighlights on p5.Geometry objects that are\nstyled with specularMaterial(). If a\ngeometry does not use\nspecularMaterial(), then\nspecularColor() will have no effect.specularColor() doesn’t affect lights that bounce in all\ndirections, including ambientLight() and\nimageLight().specularColor() with optional parameters to\nset the specular highlight color.specularColor() has two optional parameters, gray\nand alpha. Grayscale and alpha values between 0 and 255, as in\nspecularColor(50) or specularColor(50, 80), can be passed to set the\nspecular highlight color.specularColor() has one optional parameter,\ncolor. A p5.Color object, an array of color\nvalues, or a CSS color string can be passed to set the specular highlight\ncolor.specularColor() has four optional parameters, v1,\nv2, v3, and alpha. RGBA, HSBA, or HSLA values, as in\nspecularColor(255, 0, 0, 80), can be passed to set the specular highlight\ncolor. Color values will be interpreted using the current\ncolorMode().(x, y, z) values between -1 and 1. For example, setting a light’s\ndirection as (1, 0, 0) will light p5.Geometry\nobjects from the left since the light faces directly to the right. A\nmaximum of 5 directional lights can be active at once.directionalLight() with parameters to set the\nlight’s color and direction.directionalLight() has six parameters. The first\nthree parameters, v1, v2, and v3, set the light’s color using the\ncurrent colorMode(). The last three\nparameters, x, y, and z, set the light’s direction. For example,\ndirectionalLight(255, 0, 0, 1, 0, 0) creates a red (255, 0, 0) light\nthat shines to the right (1, 0, 0).directionalLight() has four parameters. The first\nthree parameters, v1, v2, and v3, set the light’s color using the\ncurrent colorMode(). The last parameter,\ndirection sets the light’s direction using a\n p5.Vector object. For example,\ndirectionalLight(255, 0, 0, lightDir) creates a red (255, 0, 0) light\nthat shines in the direction the lightDir vector points.directionalLight() has four parameters. The first\nparameter, color, sets the light’s color using a\np5.Color object or an array of color values. The\nlast three parameters, x, y, and z, set the light’s direction. For\nexample, directionalLight(myColor, 1, 0, 0) creates a light that shines\nto the right (1, 0, 0) with the color value of myColor.directionalLight() has two parameters. The first\nparameter, color, sets the light’s color using a\np5.Color object or an array of color values. The\nsecond parameter, direction, sets the light’s direction using a\np5.Color object. For example,\ndirectionalLight(myColor, lightDir) creates a light that shines in the\ndirection the lightDir vector points with the color value of myColor.pointLight() with parameters to set the\nlight’s color and position.pointLight() has six parameters. The first three\nparameters, v1, v2, and v3, set the light’s color using the current\ncolorMode(). The last three parameters, x,\ny, and z, set the light’s position. For example,\npointLight(255, 0, 0, 50, 0, 0) creates a red (255, 0, 0) light that\nshines from the coordinates (50, 0, 0).pointLight() has four parameters. The first three\nparameters, v1, v2, and v3, set the light’s color using the current\ncolorMode(). The last parameter, position sets\nthe light’s position using a p5.Vector object.\nFor example, pointLight(255, 0, 0, lightPos) creates a red (255, 0, 0)\nlight that shines from the position set by the lightPos vector.pointLight() has four parameters. The first\nparameter, color, sets the light’s color using a\np5.Color object or an array of color values. The\nlast three parameters, x, y, and z, set the light’s position. For\nexample, directionalLight(myColor, 50, 0, 0) creates a light that shines\nfrom the coordinates (50, 0, 0) with the color value of myColor.pointLight() has two parameters. The first\nparameter, color, sets the light’s color using a\np5.Color object or an array of color values. The\nsecond parameter, position, sets the light’s position using a\np5.Vector object. For example,\ndirectionalLight(myColor, lightPos) creates a light that shines from the\nposition set by the lightPos vector with the color value of myColor.imageLight() simulates a light shining from all directions. The effect is\nlike placing the sketch at the center of a giant sphere that uses the image\nas its texture. The image's diffuse light will be affected by\nfill() and the specular reflections will be\naffected by specularMaterial() and\nshininess().img, is the p5.Image object to\nuse as the light source.panorama() transforms images containing 360˚ content, such as maps or\nHDRIs, into immersive 3D backgrounds that surround a sketch. Exploring the\nspace requires changing the camera's perspective with functions such as\norbitControl() or\ncamera().lightFalloff() has three parameters, constant, linear, and\nquadratic. They’re numbers used to calculate falloff at a distance, d,\nas follows:falloff = 1 / (constant + d * linear + (d * d) * quadratic)constant, linear, and quadratic should always be set to values\ngreater than 0.spotLight() with parameters to set the\nlight’s color, position, direction. For example,\nspotLight(255, 0, 0, 0, 0, 0, 1, 0, 0) creates a red (255, 0, 0) light\nat the origin (0, 0, 0) that points to the right (1, 0, 0).angle parameter is optional. It sets the radius of the light cone.\nFor example, spotLight(255, 0, 0, 0, 0, 0, 1, 0, 0, PI / 16) creates a\nred (255, 0, 0) light at the origin (0, 0, 0) that points to the right\n(1, 0, 0) with an angle of PI / 16 radians. By default, angle is\nPI / 3 radians.concentration parameter is also optional. It focuses the light\ntowards the center of the light cone. For example,\nspotLight(255, 0, 0, 0, 0, 0, 1, 0, 0, PI / 16, 50) creates a red\n(255, 0, 0) light at the origin (0, 0, 0) that points to the right\n(1, 0, 0) with an angle of PI / 16 radians at concentration of 50. By\ndefault, concentration is 100.noLights() removes any lights created with\nlights(),\nambientLight(),\ndirectionalLight(),\npointLight(), or\nspotLight(). These functions may be called\nafter noLights() to create a new lighting scheme.loadModel() can load 3D models from OBJ and STL files. Once the model is\nloaded, it can be displayed with the\nmodel() function, as in model(shape).loadModel() with optional parameters to help\nprocess the model.path, is always a String with the path to the\nfile. Paths to local files should be relative, as in\nloadModel('assets/model.obj'). URLs such as\n'https://example.com/model.obj' may be blocked due to browser security..obj file that references materials stored in\n.mtl files, p5.js will attempt to load and apply those materials.\nTo ensure that the .obj file reads the .mtl file correctly include the\n.mtl file alongside it.loadModel() has three optional parameters after the\nfile path. The first optional parameter, successCallback, is a function\nto call once the model loads. For example,\nloadModel('assets/model.obj', handleModel) will call the handleModel()\nfunction once the model loads. The second optional parameter,\nfailureCallback, is a function to call if the model fails to load. For\nexample, loadModel('assets/model.obj', handleModel, handleFailure) will\ncall the handleFailure() function if an error occurs while loading. The\nthird optional parameter, fileType, is the model’s file extension as a\nstring. For example,\nloadModel('assets/model', handleModel, handleFailure, '.obj') will try to\nload the file model as a .obj file.loadModel() has four optional parameters after the\nfile path. The first optional parameter is a Boolean value. If true is\npassed, as in loadModel('assets/model.obj', true), then the model will be\nresized to ensure it fits the canvas. The next three parameters are\nsuccessCallback, failureCallback, and fileType as described above.loadModel() has one optional parameter after the\nfile path. The optional parameter, options, is an Object with options,\nas in loadModel('assets/model.obj', options). The options object can\nhave the following properties:
\nlet options = {\n // Enables standardized size scaling during loading if set to true.\n normalize: true,\n\n // Function to call once the model loads.\n successCallback: handleModel,\n\n // Function to call if an error occurs while loading.\n failureCallback: handleError,\n\n // Model's file extension.\n fileType: '.stl',\n\n // Flips the U texture coordinates of the model.\n flipU: false,\n\n // Flips the V texture coordinates of the model.\n flipV: false\n};\n\n// Pass the options object to loadModel().\nloadModel('assets/model.obj', options);\nloadModel() in\npreload() ensures models load before they're\nused in setup() or draw().solid at the start of the file.solid as the first six bytes.\nHowever, ASCII STLs lacking the SPACE after the d are known to be\nplentiful. So, check the first 5 bytes for solid.solid to start anywhere after those prefixes.query at the provided offsetsolid 'nameOfFile'\nThen contain the normal of the face, starting with facet normal\nNext contain a keyword indicating the start of face vertex, outer loop\nNext comes the three vertex, starting with vertex x y z\nVertices ends with endloop\nFace ends with endfacet\nNext face starts with facet normal\nThe end of the file is indicated by endsolidmodel, is the\np5.Geometry object to draw.\np5.Geometry objects can be built with\nbuildGeometry(), or\nbeginGeometry() and\nendGeometry(). They can also be loaded from\na file with loadGeometry().model() can only be used in WebGL mode.loadModel() with normalize set to true to standardize its size.\nFurther adjustments can be made using the scale() function.\n
\n\n
\n",
"itemtype": "method",
@@ -23426,7 +23426,7 @@
]
},
{
- "file": "src/webgl/material.js",
+ "file": "src\\webgl\\material.js",
"line": 12,
"description": "modelString: Specifies the plain text string of either an stl or obj file to be loaded.fileType: Defines the file extension of the model.normalize: Enables standardized size scaling during loading if set to true.successCallback: Callback for post-loading actions with the 3D model object.failureCallback: Handles errors if model loading fails, receiving an event error.flipU: Flips the U texture coordinates of the model.flipV: Flips the V texture coordinates of the model.shader(myShader). A shader program consists of two files, a vertex shader\nand a fragment shader. The vertex shader affects where 3D geometry is drawn\non the screen and the fragment shader affects color.loadShader() loads the vertex and fragment shaders from their .vert and\n.frag files. For example, calling\nloadShader('assets/shader.vert', 'assets/shader.frag') loads both\nrequired shaders and returns a p5.Shader object.successCallback, is optional. If a function is\npassed, it will be called once the shader has loaded. The callback function\ncan use the new p5.Shader object as its\nparameter.failureCallback, is also optional. If a function is\npassed, it will be called if the shader fails to load. The callback\nfunction can use the event error as its parameter.loadShader() in\npreload() ensures shaders load before they're\nused in setup() or draw().shader(myShader). A shader program consists of two parts, a vertex shader\nand a fragment shader. The vertex shader affects where 3D geometry is drawn\non the screen and the fragment shader affects color.vertSrc, sets the vertex shader. It’s a string that\ncontains the vertex shader program written in GLSL.fragSrc, sets the fragment shader. It’s a string\nthat contains the fragment shader program written in GLSL.modify() method of p5.Shader. These are added by\ndescribing the hooks in a third parameter, options, and referencing the hooks in\nyour vertSrc or fragSrc. Hooks for the vertex or fragment shader are described under\nthe vertex and fragment keys of options. Each one is an object. where each key is\nthe type and name of a hook function, and each value is a string with the\nparameter list and default implementation of the hook. For example, to let users\noptionally run code at the start of the vertex shader, the options object could\ninclude:
\n{\n vertex: {\n 'void beforeVertex': '() {}'\n }\n}\nHOOK_. If you want to check if the default\nhook has been replaced, maybe to avoid extra overhead, you can check if the\nsame name prefixed by AUGMENTED_HOOK_ has been defined:
\nvoid main() {\n // In most cases, just calling the hook is fine:\n HOOK_beforeVertex();\n\n // Alternatively, for more efficiency:\n #ifdef AUGMENTED_HOOK_beforeVertex\n HOOK_beforeVertex();\n #endif\n\n // Add the rest of your shader code here!\n}\ncreateFilterShader() works like\ncreateShader() but has a default vertex\nshader included. createFilterShader() is intended to be used along with\nfilter() for filtering the contents of a canvas.\nA filter shader will be applied to the whole canvas instead of just\np5.Geometry objects.fragSrc, sets the fragment shader. It’s a string that\ncontains the fragment shader program written in\nGLSL.\n
\nsampler2D tex0, which contains the canvas contents as a texture.vec2 canvasSize, which is the width and height of the canvas, not including pixel density.vec2 texelSize, which is the size of a physical pixel including pixel density. This is calculated as 1.0 / (width * density) for the pixel width and 1.0 / (height * density) for the pixel height.varying vec2 vTexCoord, a coordinate with values between 0 and 1.\nvTexCoord describes where on the canvas the pixel will be drawn.s, is the p5.Shader object to\napply. For example, calling shader(myShader) applies myShader to\nprocess each pixel on the canvas. The shader will be used for:\n
\nsampler2D.aNormal, or if it has any of the following uniforms: uUseLighting, uAmbientLightCount, uDirectionalLightCount, uPointLightCount, uAmbientColor, uDirectionalDiffuseColors, uDirectionalSpecularColors, uPointLightLocation, uPointLightDiffuseColors, uPointLightSpecularColors, uLightingDirection, or uSpecular.uStrokeWeight.shader(). See\nMDN\nfor more information about compiling shaders.baseMaterialShader().modify()\nand change any of the following hooks:\n
\n\n \nHook Description \n\n\n void beforeVertex\n\n \n\n\n vec3 getLocalPosition\n\n vec3 position and must return a modified version. \n\n\n vec3 getWorldPosition\n\n vec3 position and pust return a modified version. \n\n\n vec3 getLocalNormal\n\n vec3 normal and must return a modified version. \n\n\n vec3 getWorldNormal\n\n vec3 normal and must return a modified version. \n\n\n vec2 getUV\n\n vec2 uv and must return a modified version. \n\n\n vec4 getVertexColor\n\n vec4 color and must return a modified version. \n\n\n void afterVertex\n\n \n\n\n void beforeFragment\n\n \n\n\n Inputs getPixelInputs\n\n Inputs struct, which includes:\n
vec3 normal, the direction pointing out of the surfacevec2 texCoord, a vector where x and y are between 0 and 1 describing the spot on a texture the pixel is mapped to, as a fraction of the texture sizevec3 ambientLight, the ambient light color on the vertexvec4 color, the base material color of the pixelvec3 ambientMaterial, the color of the pixel when affected by ambient lightvec3 specularMaterial, the color of the pixel when reflecting specular highlightsvec3 emissiveMaterial, the light color emitted by the pixelfloat shininess, a number representing how sharp specular reflections should be, from 1 to infinityfloat metalness, a number representing how mirrorlike the material should be, between 0 and 1\nThe struct can be modified and returned. \n\n\n vec4 combineColors\n\n ColorComponents struct containing all the different components of light, and combining them into\na single final color. The struct contains:\n
\nvec3 baseColor, the base color of the pixelfloat opacity, the opacity between 0 and 1 that it should be drawn atvec3 ambientColor, the color of the pixel when affected by ambient lightvec3 specularColor, the color of the pixel when affected by specular reflectionsvec3 diffuse, the amount of diffused light hitting the pixelvec3 ambient, the amount of ambient light hitting the pixelvec3 specular, the amount of specular reflection hitting the pixelvec3 emissive, the amount of light emitted by the pixel \n\n\n vec4 getFinalColor\n\n vec4 color and must return a modified version. \n\n\n void afterFragment\n\n baseMaterialShader().inspectHooks() to see all the possible hooks and\ntheir default implementations.normalMaterial().baseNormalShader().modify()\nand change any of the following hooks:\n\n
\n\n \n\nHook \nDescription \n\n \n \nvoid beforeVertexCalled at the start of the vertex shader. \n\n \n \nvec3 getLocalPositionUpdate the position of vertices before transforms are applied. It takes in \nvec3 position and must return a modified version.\n \n \nvec3 getWorldPositionUpdate the position of vertices after transforms are applied. It takes in \nvec3 position and pust return a modified version.\n \n \nvec3 getLocalNormalUpdate the normal before transforms are applied. It takes in \nvec3 normal and must return a modified version.\n \n \nvec3 getWorldNormalUpdate the normal after transforms are applied. It takes in \nvec3 normal and must return a modified version.\n \n \nvec2 getUVUpdate the texture coordinates. It takes in \nvec2 uv and must return a modified version.\n \n \nvec4 getVertexColorUpdate the color of each vertex. It takes in a \nvec4 color and must return a modified version.\n \n \nvoid afterVertexCalled at the end of the vertex shader. \n\n \n \nvoid beforeFragmentCalled at the start of the fragment shader. \n\n \n \nvec4 getFinalColorUpdate the final color after mixing. It takes in a \nvec4 color and must return a modified version.\n \n \nvoid afterFragmentCalled at the end of the fragment shader. \nbaseNormalShader().inspectHooks() to see all the possible hooks and\ntheir default implementations.baseColorShader().modify()\nand change any of the following hooks:\n\n
\n\n \n\nHook \nDescription \n\n \n \nvoid beforeVertexCalled at the start of the vertex shader. \n\n \n \nvec3 getLocalPositionUpdate the position of vertices before transforms are applied. It takes in \nvec3 position and must return a modified version.\n \n \nvec3 getWorldPositionUpdate the position of vertices after transforms are applied. It takes in \nvec3 position and pust return a modified version.\n \n \nvec3 getLocalNormalUpdate the normal before transforms are applied. It takes in \nvec3 normal and must return a modified version.\n \n \nvec3 getWorldNormalUpdate the normal after transforms are applied. It takes in \nvec3 normal and must return a modified version.\n \n \nvec2 getUVUpdate the texture coordinates. It takes in \nvec2 uv and must return a modified version.\n \n \nvec4 getVertexColorUpdate the color of each vertex. It takes in a \nvec4 color and must return a modified version.\n \n \nvoid afterVertexCalled at the end of the vertex shader. \n\n \n \nvoid beforeFragmentCalled at the start of the fragment shader. \n\n \n \nvec4 getFinalColorUpdate the final color after mixing. It takes in a \nvec4 color and must return a modified version.\n \n \nvoid afterFragmentCalled at the end of the fragment shader. \nbaseColorShader().inspectHooks() to see all the possible hooks and\ntheir default implementations.baseStrokeShader().modify()\nand change any of the following hooks:\n
\n\n \nHook Description \n\n\n void beforeVertex\n\n \n\n\n vec3 getLocalPosition\n\n vec3 position and must return a modified version. \n\n\n vec3 getWorldPosition\n\n vec3 position and pust return a modified version. \n\n\n float getStrokeWeight\n\n float weight and pust return a modified version. \n\n\n vec2 getLineCenter\n\n vec2 center and must return a modified version. \n\n\n vec2 getLinePosition\n\n vec2 position and must return a modified version. \n\n\n vec4 getVertexColor\n\n vec4 color and must return a modified version. \n\n\n void afterVertex\n\n \n\n\n void beforeFragment\n\n \n\n\n Inputs getPixelInputs\n\n Inputs inputs, which includes:\n
\nvec4 color, the color of the strokevec2 tangent, the direction of the stroke in screen spacevec2 center, the coordinate of the center of the stroke in screen space p5.js pixelsvec2 position, the coordinate of the current pixel in screen space p5.js pixelsfloat strokeWeight, the thickness of the stroke in p5.js pixels \n\n\n bool shouldDiscard\n\n bool willDiscard and must return a modified version. \n\n\n vec4 getFinalColor\n\n vec4 color and must return a modified version. \n\n\n void afterFragment\n\n baseStrokeShader().inspectHooks() to see all the possible hooks and\ntheir default implementations.resetShader() deactivates any shaders previously applied by\nshader().texture() works with\nbuilt-in shapes, such as square() and\nsphere(), and custom shapes created with\nfunctions such as buildGeometry(). To\ntexture a geometry created with beginShape(),\nuv coordinates must be passed to each\nvertex() call.tex, is the texture to apply. texture() can use a range\nof sources including images, videos, and offscreen renderers such as\np5.Graphics and\np5.Framebuffer objects.texture() can only be used in WebGL mode.vertex(x, y, z, u, v), to map the vertex at coordinates (x, y, z)\nto the pixel at coordinates (u, v) within an image. For example, the\ncorners of a rectangular image are mapped to the corners of a rectangle by default:\n// Apply the image as a texture.\ntexture(img);\n\n
If the image in the code snippet above has dimensions of 300 x 500 pixels,\nthe same result could be achieved as follows:
\n\n// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();
\n// Top-left.\n// u: 0, v: 0\nvertex(0, 0, 0, 0, 0);
\n// Top-right.\n// u: 300, v: 0\nvertex(30, 0, 0, 300, 0);
\n// Bottom-right.\n// u: 300, v: 500\nvertex(30, 50, 0, 300, 500);
\n// Bottom-left.\n// u: 0, v: 500\nvertex(0, 50, 0, 0, 500);
\nendShape();\n
\ntextureMode() changes the coordinate system for uv coordinates.
The parameter, mode, accepts two possible constants. If NORMAL is\npassed, as in textureMode(NORMAL), then the texture’s uv coordinates can\nbe provided in the range 0 to 1 instead of the image’s dimensions. This can\nbe helpful for using the same code for multiple images of different sizes.\nFor example, the code snippet above could be rewritten as follows:
\n// Set the texture mode to use normalized coordinates.\ntextureMode(NORMAL);\n\n// Apply the image as a texture.\ntexture(img);
\n// Draw the rectangle.\nbeginShape();
\n// Top-left.\n// u: 0, v: 0\nvertex(0, 0, 0, 0, 0);
\n// Top-right.\n// u: 1, v: 0\nvertex(30, 0, 0, 1, 0);
\n// Bottom-right.\n// u: 1, v: 1\nvertex(30, 50, 0, 1, 1);
\n// Bottom-left.\n// u: 0, v: 1\nvertex(0, 50, 0, 0, 1);
\nendShape();\n
\nBy default, mode is IMAGE, which scales uv coordinates to the\ndimensions of the image. Calling textureMode(IMAGE) applies the default.
Note: textureMode() can only be used in WebGL mode.
Changes the way textures behave when a shape’s uv coordinates go beyond the\ntexture.
\nIn order for texture() to work, a shape needs a\nway to map the points on its surface to the pixels in an image. Built-in\nshapes such as rect() and\nbox() already have these texture mappings based on\ntheir vertices. Custom shapes created with\nvertex() require texture mappings to be passed as\nuv coordinates.
\nEach call to vertex() must include 5 arguments,\nas in vertex(x, y, z, u, v), to map the vertex at coordinates (x, y, z)\nto the pixel at coordinates (u, v) within an image. For example, the\ncorners of a rectangular image are mapped to the corners of a rectangle by default:
// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nrect(0, 0, 30, 50);\n\nIf the image in the code snippet above has dimensions of 300 x 500 pixels,\nthe same result could be achieved as follows:
\n// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();\n\n// Top-left.\n// u: 0, v: 0\nvertex(0, 0, 0, 0, 0);\n\n// Top-right.\n// u: 300, v: 0\nvertex(30, 0, 0, 300, 0);\n\n// Bottom-right.\n// u: 300, v: 500\nvertex(30, 50, 0, 300, 500);\n\n// Bottom-left.\n// u: 0, v: 500\nvertex(0, 50, 0, 0, 500);\n\nendShape();\n\ntextureWrap() controls how textures behave when their uv's go beyond the\ntexture. Doing so can produce interesting visual effects such as tiling.\nFor example, the custom shape above could have u-coordinates are greater\nthan the image’s width:
// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();\nvertex(0, 0, 0, 0, 0);\n\n// Top-right.\n// u: 600\nvertex(30, 0, 0, 600, 0);\n\n// Bottom-right.\n// u: 600\nvertex(30, 50, 0, 600, 500);\n\nvertex(0, 50, 0, 0, 500);\nendShape();\n\nThe u-coordinates of 600 are greater than the texture image’s width of 300.\nThis creates interesting possibilities.
\nThe first parameter, wrapX, accepts three possible constants. If CLAMP\nis passed, as in textureWrap(CLAMP), the pixels at the edge of the\ntexture will extend to the shape’s edges. If REPEAT is passed, as in\ntextureWrap(REPEAT), the texture will tile repeatedly until reaching the\nshape’s edges. If MIRROR is passed, as in textureWrap(MIRROR), the\ntexture will tile repeatedly until reaching the shape’s edges, flipping\nits orientation between tiles. By default, textures CLAMP.
The second parameter, wrapY, is optional. It accepts the same three\nconstants, CLAMP, REPEAT, and MIRROR. If one of these constants is\npassed, as in textureWRAP(MIRROR, REPEAT), then the texture will MIRROR\nhorizontally and REPEAT vertically. By default, wrapY will be set to\nthe same value as wrapX.
Note: textureWrap() can only be used in WebGL mode.
Sets the current material as a normal material.
\nA normal material sets surfaces facing the x-axis to red, those facing the\ny-axis to green, and those facing the z-axis to blue. Normal material isn't\naffected by light. It’s often used as a placeholder material when debugging.
\nNote: normalMaterial() can only be used in WebGL mode.
Sets the ambient color of shapes’ surface material.
\nThe ambientMaterial() color sets the components of the\nambientLight() color that shapes will\nreflect. For example, calling ambientMaterial(255, 255, 0) would cause a\nshape to reflect red and green light, but not blue light.
ambientMaterial() can be called three ways with different parameters to\nset the material’s color.
The first way to call ambientMaterial() has one parameter, gray.\nGrayscale values between 0 and 255, as in ambientMaterial(50), can be\npassed to set the material’s color. Higher grayscale values make shapes\nappear brighter.
The second way to call ambientMaterial() has one parameter, color. A\np5.Color object, an array of color values, or a\nCSS color string, as in ambientMaterial('magenta'), can be passed to set\nthe material’s color.
The third way to call ambientMaterial() has three parameters, v1, v2,\nand v3. RGB, HSB, or HSL values, as in ambientMaterial(255, 0, 0), can\nbe passed to set the material’s colors. Color values will be interpreted\nusing the current colorMode().
Note: ambientMaterial() can only be used in WebGL mode.
Sets the emissive color of shapes’ surface material.
\nThe emissiveMaterial() color sets a color shapes display at full\nstrength, regardless of lighting. This can give the appearance that a shape\nis glowing. However, emissive materials don’t actually emit light that\ncan affect surrounding objects.
emissiveMaterial() can be called three ways with different parameters to\nset the material’s color.
The first way to call emissiveMaterial() has one parameter, gray.\nGrayscale values between 0 and 255, as in emissiveMaterial(50), can be\npassed to set the material’s color. Higher grayscale values make shapes\nappear brighter.
The second way to call emissiveMaterial() has one parameter, color. A\np5.Color object, an array of color values, or a\nCSS color string, as in emissiveMaterial('magenta'), can be passed to set\nthe material’s color.
The third way to call emissiveMaterial() has four parameters, v1, v2,\nv3, and alpha. alpha is optional. RGBA, HSBA, or HSLA values can be\npassed to set the material’s colors, as in emissiveMaterial(255, 0, 0) or\nemissiveMaterial(255, 0, 0, 30). Color values will be interpreted using\nthe current colorMode().
Note: emissiveMaterial() can only be used in WebGL mode.
Sets the specular color of shapes’ surface material.
\nThe specularMaterial() color sets the components of light color that\nglossy coats on shapes will reflect. For example, calling\nspecularMaterial(255, 255, 0) would cause a shape to reflect red and\ngreen light, but not blue light.
Unlike ambientMaterial(),\nspecularMaterial() will reflect the full color of light sources including\ndirectionalLight(),\npointLight(),\nand spotLight(). This is what gives it shapes\ntheir \"shiny\" appearance. The material’s shininess can be controlled by the\nshininess() function.
specularMaterial() can be called three ways with different parameters to\nset the material’s color.
The first way to call specularMaterial() has one parameter, gray.\nGrayscale values between 0 and 255, as in specularMaterial(50), can be\npassed to set the material’s color. Higher grayscale values make shapes\nappear brighter.
The second way to call specularMaterial() has one parameter, color. A\np5.Color> object, an array of color values, or a CSS\ncolor string, as in specularMaterial('magenta'), can be passed to set the\nmaterial’s color.
The third way to call specularMaterial() has four parameters, v1, v2,\nv3, and alpha. alpha is optional. RGBA, HSBA, or HSLA values can be\npassed to set the material’s colors, as in specularMaterial(255, 0, 0) or\nspecularMaterial(255, 0, 0, 30). Color values will be interpreted using\nthe current colorMode().
Sets the amount of gloss (\"shininess\") of a\nspecularMaterial().
\nShiny materials focus reflected light more than dull materials.\nshininess() affects the way materials reflect light sources including\ndirectionalLight(),\npointLight(),\nand spotLight().
The parameter, shine, is a number that sets the amount of shininess.\nshine must be greater than 1, which is its default value.
Sets the amount of \"metalness\" of a\nspecularMaterial().
\nmetalness() can make materials appear more metallic. It affects the way\nmaterials reflect light sources including\naffects the way materials reflect light sources including\ndirectionalLight(),\npointLight(),\nspotLight(), and\nimageLight().
The parameter, metallic, is a number that sets the amount of metalness.\nmetallic must be greater than 1, which is its default value. Higher\nvalues, such as metalness(100), make specular materials appear more\nmetallic.
Sets the position and orientation of the current camera in a 3D sketch.
\ncamera() allows objects to be viewed from different angles. It has nine\nparameters that are all optional.
The first three parameters, x, y, and z, are the coordinates of the\ncamera’s position. For example, calling camera(0, 0, 0) places the camera\nat the origin (0, 0, 0). By default, the camera is placed at\n(0, 0, 800).
The next three parameters, centerX, centerY, and centerZ are the\ncoordinates of the point where the camera faces. For example, calling\ncamera(0, 0, 0, 10, 20, 30) places the camera at the origin (0, 0, 0)\nand points it at (10, 20, 30). By default, the camera points at the\norigin (0, 0, 0).
The last three parameters, upX, upY, and upZ are the components of\nthe \"up\" vector. The \"up\" vector orients the camera’s y-axis. For example,\ncalling camera(0, 0, 0, 10, 20, 30, 0, -1, 0) places the camera at the\norigin (0, 0, 0), points it at (10, 20, 30), and sets the \"up\" vector\nto (0, -1, 0) which is like holding it upside-down. By default, the \"up\"\nvector is (0, 1, 0).
Note: camera() can only be used in WebGL mode.
Sets a perspective projection for the current camera in a 3D sketch.
\nIn a perspective projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes. It’s applied by default in\nWebGL mode.
\nperspective() changes the camera’s perspective by changing its viewing\nfrustum. The frustum is the volume of space that’s visible to the camera.\nIts shape is a pyramid with its top cut off. The camera is placed where\nthe top of the pyramid should be and views everything between the frustum’s\ntop (near) plane and its bottom (far) plane.
The first parameter, fovy, is the camera’s vertical field of view. It’s\nan angle that describes how tall or narrow a view the camera has. For\nexample, calling perspective(0.5) sets the camera’s vertical field of\nview to 0.5 radians. By default, fovy is calculated based on the sketch’s\nheight and the camera’s default z-coordinate, which is 800. The formula for\nthe default fovy is 2 * atan(height / 2 / 800).
The second parameter, aspect, is the camera’s aspect ratio. It’s a number\nthat describes the ratio of the top plane’s width to its height. For\nexample, calling perspective(0.5, 1.5) sets the camera’s field of view to\n0.5 radians and aspect ratio to 1.5, which would make shapes appear thinner\non a square canvas. By default, aspect is set to width / height.
The third parameter, near, is the distance from the camera to the near\nplane. For example, calling perspective(0.5, 1.5, 100) sets the camera’s\nfield of view to 0.5 radians, its aspect ratio to 1.5, and places the near\nplane 100 pixels from the camera. Any shapes drawn less than 100 pixels\nfrom the camera won’t be visible. By default, near is set to 0.1 * 800,\nwhich is 1/10th the default distance between the camera and the origin.
The fourth parameter, far, is the distance from the camera to the far\nplane. For example, calling perspective(0.5, 1.5, 100, 10000) sets the\ncamera’s field of view to 0.5 radians, its aspect ratio to 1.5, places the\nnear plane 100 pixels from the camera, and places the far plane 10,000\npixels from the camera. Any shapes drawn more than 10,000 pixels from the\ncamera won’t be visible. By default, far is set to 10 * 800, which is 10\ntimes the default distance between the camera and the origin.
Note: perspective() can only be used in WebGL mode.
Enables or disables perspective for lines in 3D sketches.
\nIn WebGL mode, lines can be drawn with a thinner stroke when they’re\nfurther from the camera. Doing so gives them a more realistic appearance.
\nBy default, lines are drawn differently based on the type of perspective\nbeing used:
\nperspective() and frustum() simulate a realistic perspective. In\nthese modes, stroke weight is affected by the line’s distance from the\ncamera. Doing so results in a more natural appearance. perspective() is\nthe default mode for 3D sketches.ortho() doesn’t simulate a realistic perspective. In this mode, stroke\nweights are consistent regardless of the line’s distance from the camera.\nDoing so results in a more predictable and consistent appearance.linePerspective() can override the default line drawing mode.
The parameter, enable, is optional. It’s a Boolean value that sets the\nway lines are drawn. If true is passed, as in linePerspective(true),\nthen lines will appear thinner when they are further from the camera. If\nfalse is passed, as in linePerspective(false), then lines will have\nconsistent stroke weights regardless of their distance from the camera. By\ndefault, linePerspective() is enabled.
Calling linePerspective() without passing an argument returns true if\nit's enabled and false if not.
Note: linePerspective() can only be used in WebGL mode.
Sets an orthographic projection for the current camera in a 3D sketch.
\nIn an orthographic projection, shapes with the same size always appear the\nsame size, regardless of whether they are near or far from the camera.
\northo() changes the camera’s perspective by changing its viewing frustum\nfrom a truncated pyramid to a rectangular prism. The camera is placed in\nfront of the frustum and views everything between the frustum’s near plane\nand its far plane. ortho() has six optional parameters to define the\nfrustum.
The first four parameters, left, right, bottom, and top, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\northo(-100, 100, 200, -200) creates a frustum that’s 200 pixels wide and\n400 pixels tall. By default, these coordinates are set based on the\nsketch’s width and height, as in\northo(-width / 2, width / 2, -height / 2, height / 2).
The last two parameters, near and far, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\northo(-100, 100, 200, 200, 50, 1000) creates a frustum that’s 200 pixels\nwide, 400 pixels tall, starts 50 pixels from the camera, and ends 1,000\npixels from the camera. By default, near and far are set to 0 and\nmax(width, height) + 800, respectively.
Note: ortho() can only be used in WebGL mode.
Sets the frustum of the current camera in a 3D sketch.
\nIn a frustum projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes.
\nfrustum() changes the default camera’s perspective by changing its\nviewing frustum. The frustum is the volume of space that’s visible to the\ncamera. The frustum’s shape is a pyramid with its top cut off. The camera\nis placed where the top of the pyramid should be and points towards the\nbase of the pyramid. It views everything within the frustum.
The first four parameters, left, right, bottom, and top, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\nfrustum(-100, 100, 200, -200) creates a frustum that’s 200 pixels wide\nand 400 pixels tall. By default, these coordinates are set based on the\nsketch’s width and height, as in\northo(-width / 20, width / 20, height / 20, -height / 20).
The last two parameters, near and far, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\northo(-100, 100, 200, -200, 50, 1000) creates a frustum that’s 200 pixels\nwide, 400 pixels tall, starts 50 pixels from the camera, and ends 1,000\npixels from the camera. By default, near is set to 0.1 * 800, which is\n1/10th the default distance between the camera and the origin. far is set\nto 10 * 800, which is 10 times the default distance between the camera\nand the origin.
Note: frustum() can only be used in WebGL mode.
Creates a new p5.Camera object and sets it\nas the current (active) camera.
\nThe new camera is initialized with a default position (0, 0, 800) and a\ndefault perspective projection. Its properties can be controlled with\np5.Camera methods such as\nmyCamera.lookAt(0, 0, 0).
Note: Every 3D sketch starts with a default camera initialized.\nThis camera can be controlled with the functions\ncamera(),\nperspective(),\northo(), and\nfrustum() if it's the only camera in the scene.
\nNote: createCamera() can only be used in WebGL mode.
The camera’s x-coordinate.
\nBy default, the camera’s x-coordinate is set to 0 in \"world\" space.
\n", "itemtype": "property", @@ -24236,7 +24236,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 963, "description": "The camera’s y-coordinate.
\nBy default, the camera’s y-coordinate is set to 0 in \"world\" space.
\n", "itemtype": "property", @@ -24251,7 +24251,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 1075, "description": "The camera’s z-coordinate.
\nBy default, the camera’s z-coordinate is set to 800 in \"world\" space.
\n", "itemtype": "property", @@ -24266,7 +24266,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 1187, "description": "The x-coordinate of the place where the camera looks.
\nBy default, the camera looks at the origin (0, 0, 0) in \"world\" space, so\nmyCamera.centerX is 0.
The y-coordinate of the place where the camera looks.
\nBy default, the camera looks at the origin (0, 0, 0) in \"world\" space, so\nmyCamera.centerY is 0.
The y-coordinate of the place where the camera looks.
\nBy default, the camera looks at the origin (0, 0, 0) in \"world\" space, so\nmyCamera.centerZ is 0.
The x-component of the camera's \"up\" vector.
\nThe camera's \"up\" vector orients its y-axis. By default, the \"up\" vector is\n(0, 1, 0), so its x-component is 0 in \"local\" space.
The y-component of the camera's \"up\" vector.
\nThe camera's \"up\" vector orients its y-axis. By default, the \"up\" vector is\n(0, 1, 0), so its y-component is 1 in \"local\" space.
The z-component of the camera's \"up\" vector.
\nThe camera's \"up\" vector orients its y-axis. By default, the \"up\" vector is\n(0, 1, 0), so its z-component is 0 in \"local\" space.
Sets a perspective projection for the camera.
\nIn a perspective projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes. It’s applied by default in new\np5.Camera objects.
myCamera.perspective() changes the camera’s perspective by changing its\nviewing frustum. The frustum is the volume of space that’s visible to the\ncamera. The frustum’s shape is a pyramid with its top cut off. The camera\nis placed where the top of the pyramid should be and points towards the\nbase of the pyramid. It views everything within the frustum.
The first parameter, fovy, is the camera’s vertical field of view. It’s\nan angle that describes how tall or narrow a view the camera has. For\nexample, calling myCamera.perspective(0.5) sets the camera’s vertical\nfield of view to 0.5 radians. By default, fovy is calculated based on the\nsketch’s height and the camera’s default z-coordinate, which is 800. The\nformula for the default fovy is 2 * atan(height / 2 / 800).
The second parameter, aspect, is the camera’s aspect ratio. It’s a number\nthat describes the ratio of the top plane’s width to its height. For\nexample, calling myCamera.perspective(0.5, 1.5) sets the camera’s field\nof view to 0.5 radians and aspect ratio to 1.5, which would make shapes\nappear thinner on a square canvas. By default, aspect is set to\nwidth / height.
The third parameter, near, is the distance from the camera to the near\nplane. For example, calling myCamera.perspective(0.5, 1.5, 100) sets the\ncamera’s field of view to 0.5 radians, its aspect ratio to 1.5, and places\nthe near plane 100 pixels from the camera. Any shapes drawn less than 100\npixels from the camera won’t be visible. By default, near is set to\n0.1 * 800, which is 1/10th the default distance between the camera and\nthe origin.
The fourth parameter, far, is the distance from the camera to the far\nplane. For example, calling myCamera.perspective(0.5, 1.5, 100, 10000)\nsets the camera’s field of view to 0.5 radians, its aspect ratio to 1.5,\nplaces the near plane 100 pixels from the camera, and places the far plane\n10,000 pixels from the camera. Any shapes drawn more than 10,000 pixels\nfrom the camera won’t be visible. By default, far is set to 10 * 800,\nwhich is 10 times the default distance between the camera and the origin.
Sets an orthographic projection for the camera.
\nIn an orthographic projection, shapes with the same size always appear the\nsame size, regardless of whether they are near or far from the camera.
\nmyCamera.ortho() changes the camera’s perspective by changing its viewing\nfrustum from a truncated pyramid to a rectangular prism. The frustum is the\nvolume of space that’s visible to the camera. The camera is placed in front\nof the frustum and views everything within the frustum. myCamera.ortho()\nhas six optional parameters to define the viewing frustum.
The first four parameters, left, right, bottom, and top, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\nmyCamera.ortho(-100, 100, 200, -200) creates a frustum that’s 200 pixels\nwide and 400 pixels tall. By default, these dimensions are set based on\nthe sketch’s width and height, as in\nmyCamera.ortho(-width / 2, width / 2, -height / 2, height / 2).
The last two parameters, near and far, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\nmyCamera.ortho(-100, 100, 200, -200, 50, 1000) creates a frustum that’s\n200 pixels wide, 400 pixels tall, starts 50 pixels from the camera, and\nends 1,000 pixels from the camera. By default, near and far are set to\n0 and max(width, height) + 800, respectively.
Sets the camera's frustum.
\nIn a frustum projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes.
\nmyCamera.frustum() changes the camera’s perspective by changing its\nviewing frustum. The frustum is the volume of space that’s visible to the\ncamera. The frustum’s shape is a pyramid with its top cut off. The camera\nis placed where the top of the pyramid should be and points towards the\nbase of the pyramid. It views everything within the frustum.
The first four parameters, left, right, bottom, and top, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\nmyCamera.frustum(-100, 100, 200, -200) creates a frustum that’s 200\npixels wide and 400 pixels tall. By default, these coordinates are set\nbased on the sketch’s width and height, as in\nmyCamera.frustum(-width / 20, width / 20, height / 20, -height / 20).
The last two parameters, near and far, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\nmyCamera.frustum(-100, 100, 200, -200, 50, 1000) creates a frustum that’s\n200 pixels wide, 400 pixels tall, starts 50 pixels from the camera, and ends\n1,000 pixels from the camera. By default, near is set to 0.1 * 800, which\nis 1/10th the default distance between the camera and the origin. far is\nset to 10 * 800, which is 10 times the default distance between the\ncamera and the origin.
Rotates the camera in a clockwise/counter-clockwise direction.
\nRolling rotates the camera without changing its orientation. The rotation\nhappens in the camera’s \"local\" space.
\nThe parameter, angle, is the angle the camera should rotate. Passing a\npositive angle, as in myCamera.roll(0.001), rotates the camera in counter-clockwise direction.\nPassing a negative angle, as in myCamera.roll(-0.001), rotates the\ncamera in clockwise direction.
Note: Angles are interpreted based on the current\nangleMode().
\n", "itemtype": "method", @@ -24518,7 +24518,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 2550, "description": "Rotates the camera left and right.
\nPanning rotates the camera without changing its position. The rotation\nhappens in the camera’s \"local\" space.
\nThe parameter, angle, is the angle the camera should rotate. Passing a\npositive angle, as in myCamera.pan(0.001), rotates the camera to the\nright. Passing a negative angle, as in myCamera.pan(-0.001), rotates the\ncamera to the left.
Note: Angles are interpreted based on the current\nangleMode().
\n", "itemtype": "method", @@ -24538,7 +24538,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 2613, "description": "Rotates the camera up and down.
\nTilting rotates the camera without changing its position. The rotation\nhappens in the camera’s \"local\" space.
\nThe parameter, angle, is the angle the camera should rotate. Passing a\npositive angle, as in myCamera.tilt(0.001), rotates the camera down.\nPassing a negative angle, as in myCamera.tilt(-0.001), rotates the camera\nup.
Note: Angles are interpreted based on the current\nangleMode().
\n", "itemtype": "method", @@ -24558,7 +24558,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 2676, "description": "Points the camera at a location.
\nmyCamera.lookAt() changes the camera’s orientation without changing its\nposition.
The parameters, x, y, and z, are the coordinates in \"world\" space\nwhere the camera should point. For example, calling\nmyCamera.lookAt(10, 20, 30) points the camera at the coordinates\n(10, 20, 30).
Sets the position and orientation of the camera.
\nmyCamera.camera() allows objects to be viewed from different angles. It\nhas nine parameters that are all optional.
The first three parameters, x, y, and z, are the coordinates of the\ncamera’s position in \"world\" space. For example, calling\nmyCamera.camera(0, 0, 0) places the camera at the origin (0, 0, 0). By\ndefault, the camera is placed at (0, 0, 800).
The next three parameters, centerX, centerY, and centerZ are the\ncoordinates of the point where the camera faces in \"world\" space. For\nexample, calling myCamera.camera(0, 0, 0, 10, 20, 30) places the camera\nat the origin (0, 0, 0) and points it at (10, 20, 30). By default, the\ncamera points at the origin (0, 0, 0).
The last three parameters, upX, upY, and upZ are the components of\nthe \"up\" vector in \"local\" space. The \"up\" vector orients the camera’s\ny-axis. For example, calling\nmyCamera.camera(0, 0, 0, 10, 20, 30, 0, -1, 0) places the camera at the\norigin (0, 0, 0), points it at (10, 20, 30), and sets the \"up\" vector\nto (0, -1, 0) which is like holding it upside-down. By default, the \"up\"\nvector is (0, 1, 0).
Moves the camera along its \"local\" axes without changing its orientation.
\nThe parameters, x, y, and z, are the distances the camera should\nmove. For example, calling myCamera.move(10, 20, 30) moves the camera 10\npixels to the right, 20 pixels down, and 30 pixels backward in its \"local\"\nspace.
Sets the camera’s position in \"world\" space without changing its\norientation.
\nThe parameters, x, y, and z, are the coordinates where the camera\nshould be placed. For example, calling myCamera.setPosition(10, 20, 30)\nplaces the camera at coordinates (10, 20, 30) in \"world\" space.
Sets the camera’s position, orientation, and projection by copying another\ncamera.
\nThe parameter, cam, is the p5.Camera object to copy. For example, calling\ncam2.set(cam1) will set cam2 using cam1’s configuration.
Sets the camera’s position and orientation to values that are in-between\nthose of two other cameras.
\nmyCamera.slerp() uses spherical linear interpolation to calculate a\nposition and orientation that’s in-between two other cameras. Doing so is\nhelpful for transitioning smoothly between two perspectives.
The first two parameters, cam0 and cam1, are the p5.Camera objects\nthat should be used to set the current camera.
The third parameter, amt, is the amount to interpolate between cam0 and\ncam1. 0.0 keeps the camera’s position and orientation equal to cam0’s,\n0.5 sets them halfway between cam0’s and cam1’s , and 1.0 sets the\nposition and orientation equal to cam1’s.
For example, calling myCamera.slerp(cam0, cam1, 0.1) sets cam’s position\nand orientation very close to cam0’s. Calling\nmyCamera.slerp(cam0, cam1, 0.9) sets cam’s position and orientation very\nclose to cam1’s.
Note: All of the cameras must use the same projection.
\n", "itemtype": "method", @@ -24767,7 +24767,7 @@ "submodule": "Camera" }, { - "file": "src/webgl/p5.Camera.js", + "file": "src\\webgl\\p5.Camera.js", "line": 3897, "description": "Sets the current (active) camera of a 3D sketch.
\nsetCamera() allows for switching between multiple cameras created with\ncreateCamera().
Note: setCamera() can only be used in WebGL mode.
An array containing the color of each pixel in the framebuffer.
\nmyBuffer.loadPixels() must be\ncalled before accessing the myBuffer.pixels array.\nmyBuffer.updatePixels()\nmust be called after any changes are made.
Note: Updating pixels via this property is slower than drawing to the\nframebuffer directly. Consider using a\np5.Shader object instead of looping over\nmyBuffer.pixels.
Resizes the framebuffer to a given width and height.
\nThe parameters, width and height, set the dimensions of the\nframebuffer. For example, calling myBuffer.resize(300, 500) resizes\nthe framebuffer to 300×500 pixels, then sets myBuffer.width to 300\nand myBuffer.height 500.
Sets the framebuffer's pixel density or returns its current density.
\nComputer displays are grids of little lights called pixels. A display's\npixel density describes how many pixels it packs into an area. Displays\nwith smaller pixels have a higher pixel density and create sharper\nimages.
\nThe parameter, density, is optional. If a number is passed, as in\nmyBuffer.pixelDensity(1), it sets the framebuffer's pixel density. By\ndefault, the framebuffer's pixel density will match that of the canvas\nwhere it was created. All canvases default to match the display's pixel\ndensity.
Calling myBuffer.pixelDensity() without an argument returns its current\npixel density.
Toggles the framebuffer's autosizing mode or returns the current mode.
\nBy default, the framebuffer automatically resizes to match the canvas\nthat created it. Calling myBuffer.autoSized(false) disables this\nbehavior and calling myBuffer.autoSized(true) re-enables it.
Calling myBuffer.autoSized() without an argument returns true if\nthe framebuffer automatically resizes and false if not.
Creates a new\np5.Camera object to use with the framebuffer.
\nThe new camera is initialized with a default position (0, 0, 800) and a\ndefault perspective projection. Its properties can be controlled with\np5.Camera methods such as myCamera.lookAt(0, 0, 0).
Framebuffer cameras should be created between calls to\nmyBuffer.begin() and\nmyBuffer.end() like so:
\nlet myCamera;\n\nmyBuffer.begin();\n\n// Create the camera for the framebuffer.\nmyCamera = myBuffer.createCamera();\n\nmyBuffer.end();\n\nCalling setCamera() updates the\nframebuffer's projection using the camera.\nresetMatrix() must also be called for the\nview to change properly:
\nmyBuffer.begin();\n\n// Set the camera for the framebuffer.\nsetCamera(myCamera);\n\n// Reset all transformations.\nresetMatrix();\n\n// Draw stuff...\n\nmyBuffer.end();\n\n",
"itemtype": "method",
@@ -24888,7 +24888,7 @@
"module": "Rendering"
},
{
- "file": "src/webgl/p5.Framebuffer.js",
+ "file": "src\\webgl\\p5.Framebuffer.js",
"line": 1031,
"description": "Deletes the framebuffer from GPU memory.
\nCalling myBuffer.remove() frees the GPU memory used by the framebuffer.\nThe framebuffer also uses a bit of memory on the CPU which can be freed\nlike so:
// Delete the framebuffer from GPU memory.\nmyBuffer.remove();\n\n// Delete the framebuffer from CPU memory.\nmyBuffer = undefined;\n\nNote: All variables that reference the framebuffer must be assigned\nthe value undefined to delete the framebuffer from CPU memory. If any\nvariable still refers to the framebuffer, then it won't be garbage\ncollected.
Begins drawing shapes to the framebuffer.
\nmyBuffer.begin() and myBuffer.end()\nallow shapes to be drawn to the framebuffer. myBuffer.begin() begins\ndrawing to the framebuffer and\nmyBuffer.end() stops drawing to the\nframebuffer. Changes won't be visible until the framebuffer is displayed\nas an image or texture.
Stops drawing shapes to the framebuffer.
\nmyBuffer.begin() and myBuffer.end()\nallow shapes to be drawn to the framebuffer.\nmyBuffer.begin() begins drawing to\nthe framebuffer and myBuffer.end() stops drawing to the framebuffer.\nChanges won't be visible until the framebuffer is displayed as an image\nor texture.
Draws to the framebuffer by calling a function that contains drawing\ninstructions.
\nThe parameter, callback, is a function with the drawing instructions\nfor the framebuffer. For example, calling myBuffer.draw(myFunction)\nwill call a function named myFunction() to draw to the framebuffer.\nDoing so has the same effect as the following:
myBuffer.begin();\nmyFunction();\nmyBuffer.end();\n\n",
"itemtype": "method",
@@ -24943,7 +24943,7 @@
"module": "Rendering"
},
{
- "file": "src/webgl/p5.Framebuffer.js",
+ "file": "src\\webgl\\p5.Framebuffer.js",
"line": 1386,
"description": "Loads the current value of each pixel in the framebuffer into its\npixels array.
\nmyBuffer.loadPixels() must be called before reading from or writing to\nmyBuffer.pixels.
Gets a pixel or a region of pixels from the framebuffer.
\nmyBuffer.get() is easy to use but it's not as fast as\nmyBuffer.pixels. Use\nmyBuffer.pixels to read many pixel\nvalues.
The version of myBuffer.get() with no parameters returns the entire\nframebuffer as a a p5.Image object.
The version of myBuffer.get() with two parameters interprets them as\ncoordinates. It returns an array with the [R, G, B, A] values of the\npixel at the given point.
The version of myBuffer.get() with four parameters interprets them as\ncoordinates and dimensions. It returns a subsection of the framebuffer as\na p5.Image object. The first two parameters are\nthe coordinates for the upper-left corner of the subsection. The last two\nparameters are the width and height of the subsection.
Updates the framebuffer with the RGBA values in the\npixels array.
\nmyBuffer.updatePixels() only needs to be called after changing values\nin the myBuffer.pixels array. Such\nchanges can be made directly after calling\nmyBuffer.loadPixels().
An object that stores the framebuffer's color data.
\nEach framebuffer uses a\nWebGLTexture\nobject internally to store its color data. The myBuffer.color property\nmakes it possible to pass this data directly to other functions. For\nexample, calling texture(myBuffer.color) or\nmyShader.setUniform('colorTexture', myBuffer.color) may be helpful for\nadvanced use cases.
Note: By default, a framebuffer's y-coordinates are flipped compared to\nimages and videos. It's easy to flip a framebuffer's y-coordinates as\nneeded when applying it as a texture. For example, calling\nplane(myBuffer.width, -myBuffer.height) will flip the framebuffer.
An object that stores the framebuffer's depth data.
\nEach framebuffer uses a\nWebGLTexture\nobject internally to store its depth data. The myBuffer.depth property\nmakes it possible to pass this data directly to other functions. For\nexample, calling texture(myBuffer.depth) or\nmyShader.setUniform('depthTexture', myBuffer.depth) may be helpful for\nadvanced use cases.
Note: By default, a framebuffer's y-coordinates are flipped compared to\nimages and videos. It's easy to flip a framebuffer's y-coordinates as\nneeded when applying it as a texture. For example, calling\nplane(myBuffer.width, -myBuffer.height) will flip the framebuffer.
An array with the geometry's vertices.
\nThe geometry's vertices are stored as\np5.Vector objects in the myGeometry.vertices\narray. The geometry's first vertex is the\np5.Vector object at myGeometry.vertices[0],\nits second vertex is myGeometry.vertices[1], its third vertex is\nmyGeometry.vertices[2], and so on.
An array with the vectors that are normal to the geometry's vertices.
\nA face's orientation is defined by its normal vector which points out\nof the face and is normal (perpendicular) to the surface. Calling\nmyGeometry.computeNormals() first calculates each face's normal\nvector. Then it calculates the normal vector for each vertex by\naveraging the normal vectors of the faces surrounding the vertex. The\nvertex normals are stored as p5.Vector\nobjects in the myGeometry.vertexNormals array.
An array that lists which of the geometry's vertices form each of its\nfaces.
\nAll 3D shapes are made by connecting sets of points called vertices. A\ngeometry's surface is formed by connecting vertices to form triangles\nthat are stitched together. Each triangular patch on the geometry's\nsurface is called a face.
\nThe geometry's vertices are stored as\np5.Vector objects in the\nmyGeometry.vertices array. The\ngeometry's first vertex is the p5.Vector\nobject at myGeometry.vertices[0], its second vertex is\nmyGeometry.vertices[1], its third vertex is myGeometry.vertices[2],\nand so on.
For example, a geometry made from a rectangle has two faces because a\nrectangle is made by joining two triangles. myGeometry.faces for a\nrectangle would be the two-dimensional array [[0, 1, 2], [2, 1, 3]].\nThe first face, myGeometry.faces[0], is the array [0, 1, 2] because\nit's formed by connecting myGeometry.vertices[0],\nmyGeometry.vertices[1],and myGeometry.vertices[2]. The second face,\nmyGeometry.faces[1], is the array [2, 1, 3] because it's formed by\nconnecting myGeometry.vertices[2], myGeometry.vertices[1],and\nmyGeometry.vertices[3].
An array that lists the texture coordinates for each of the geometry's\nvertices.
\nIn order for texture() to work, the geometry\nneeds a way to map the points on its surface to the pixels in a\nrectangular image that's used as a texture. The geometry's vertex at\ncoordinates (x, y, z) maps to the texture image's pixel at coordinates\n(u, v).
The myGeometry.uvs array stores the (u, v) coordinates for each\nvertex in the order it was added to the geometry. For example, the\nfirst vertex, myGeometry.vertices[0], has its (u, v) coordinates\nstored at myGeometry.uvs[0] and myGeometry.uvs[1].
Calculates the position and size of the smallest box that contains the geometry.
\nA bounding box is the smallest rectangular prism that contains the entire\ngeometry. It's defined by the box's minimum and maximum coordinates along\neach axis, as well as the size (length) and offset (center).
\nCalling myGeometry.calculateBoundingBox() returns an object with four\nproperties that describe the bounding box:
// Get myGeometry's bounding box.\nlet bbox = myGeometry.calculateBoundingBox();\n\n// Print the bounding box to the console.\nconsole.log(bbox);\n\n// {\n// // The minimum coordinate along each axis.\n// min: { x: -1, y: -2, z: -3 },\n//\n// // The maximum coordinate along each axis.\n// max: { x: 1, y: 2, z: 3},\n//\n// // The size (length) along each axis.\n// size: { x: 2, y: 4, z: 6},\n//\n// // The offset (center) along each axis.\n// offset: { x: 0, y: 0, z: 0}\n// }\n\n",
"itemtype": "method",
@@ -25133,7 +25133,7 @@
"submodule": "3D Primitives"
},
{
- "file": "src/webgl/p5.Geometry.js",
+ "file": "src\\webgl\\p5.Geometry.js",
"line": 863,
"description": "Removes the geometry’s internal colors.
\np5.Geometry objects can be created with \"internal colors\" assigned to\nvertices or the entire shape. When a geometry has internal colors,\nfill() has no effect. Calling\nmyGeometry.clearColors() allows the\nfill() function to apply color to the geometry.
The saveObj() function exports p5.Geometry objects as\n3D models in the Wavefront .obj file format.\nThis way, you can use the 3D shapes you create in p5.js in other software\nfor rendering, animation, 3D printing, or more.
The exported .obj file will include the faces and vertices of the p5.Geometry,\nas well as its texture coordinates and normals, if it has them.
The saveStl() function exports p5.Geometry objects as\n3D models in the STL stereolithography file format.\nThis way, you can use the 3D shapes you create in p5.js in other software\nfor rendering, animation, 3D printing, or more.
The exported .stl file will include the faces, vertices, and normals of the p5.Geometry.
By default, this method saves a text-based .stl file. Alternatively, you can save a more compact\nbut less human-readable binary .stl file by passing { binary: true } as a second parameter.
Flips the geometry’s texture u-coordinates.
\nIn order for texture() to work, the geometry\nneeds a way to map the points on its surface to the pixels in a rectangular\nimage that's used as a texture. The geometry's vertex at coordinates\n(x, y, z) maps to the texture image's pixel at coordinates (u, v).
The myGeometry.uvs array stores the\n(u, v) coordinates for each vertex in the order it was added to the\ngeometry. Calling myGeometry.flipU() flips a geometry's u-coordinates\nso that the texture appears mirrored horizontally.
For example, a plane's four vertices are added clockwise starting from the\ntop-left corner. Here's how calling myGeometry.flipU() would change a\nplane's texture coordinates:
// Print the original texture coordinates.\n// Output: [0, 0, 1, 0, 0, 1, 1, 1]\nconsole.log(myGeometry.uvs);\n\n// Flip the u-coordinates.\nmyGeometry.flipU();\n\n// Print the flipped texture coordinates.\n// Output: [1, 0, 0, 0, 1, 1, 0, 1]\nconsole.log(myGeometry.uvs);\n\n// Notice the swaps:\n// Top vertices: [0, 0, 1, 0] --> [1, 0, 0, 0]\n// Bottom vertices: [0, 1, 1, 1] --> [1, 1, 0, 1]\n\n",
"itemtype": "method",
@@ -25209,7 +25209,7 @@
"submodule": "3D Primitives"
},
{
- "file": "src/webgl/p5.Geometry.js",
+ "file": "src\\webgl\\p5.Geometry.js",
"line": 1245,
"description": "Flips the geometry’s texture v-coordinates.
\nIn order for texture() to work, the geometry\nneeds a way to map the points on its surface to the pixels in a rectangular\nimage that's used as a texture. The geometry's vertex at coordinates\n(x, y, z) maps to the texture image's pixel at coordinates (u, v).
The myGeometry.uvs array stores the\n(u, v) coordinates for each vertex in the order it was added to the\ngeometry. Calling myGeometry.flipV() flips a geometry's v-coordinates\nso that the texture appears mirrored vertically.
For example, a plane's four vertices are added clockwise starting from the\ntop-left corner. Here's how calling myGeometry.flipV() would change a\nplane's texture coordinates:
// Print the original texture coordinates.\n// Output: [0, 0, 1, 0, 0, 1, 1, 1]\nconsole.log(myGeometry.uvs);\n\n// Flip the v-coordinates.\nmyGeometry.flipV();\n\n// Print the flipped texture coordinates.\n// Output: [0, 1, 1, 1, 0, 0, 1, 0]\nconsole.log(myGeometry.uvs);\n\n// Notice the swaps:\n// Left vertices: [0, 0] <--> [1, 0]\n// Right vertices: [1, 0] <--> [1, 1]\n\n",
"itemtype": "method",
@@ -25222,7 +25222,7 @@
"submodule": "3D Primitives"
},
{
- "file": "src/webgl/p5.Geometry.js",
+ "file": "src\\webgl\\p5.Geometry.js",
"line": 1340,
"description": "Computes the geometry's faces using its vertices.
\nAll 3D shapes are made by connecting sets of points called vertices. A\ngeometry's surface is formed by connecting vertices to form triangles that\nare stitched together. Each triangular patch on the geometry's surface is\ncalled a face. myGeometry.computeFaces() performs the math needed to\ndefine each face based on the distances between vertices.
The geometry's vertices are stored as p5.Vector\nobjects in the myGeometry.vertices\narray. The geometry's first vertex is the\np5.Vector object at myGeometry.vertices[0],\nits second vertex is myGeometry.vertices[1], its third vertex is\nmyGeometry.vertices[2], and so on.
Calling myGeometry.computeFaces() fills the\nmyGeometry.faces array with three-element\narrays that list the vertices that form each face. For example, a geometry\nmade from a rectangle has two faces because a rectangle is made by joining\ntwo triangles. myGeometry.faces for a\nrectangle would be the two-dimensional array\n[[0, 1, 2], [2, 1, 3]]. The first face, myGeometry.faces[0], is the\narray [0, 1, 2] because it's formed by connecting\nmyGeometry.vertices[0], myGeometry.vertices[1],and\nmyGeometry.vertices[2]. The second face, myGeometry.faces[1], is the\narray [2, 1, 3] because it's formed by connecting\nmyGeometry.vertices[2], myGeometry.vertices[1], and\nmyGeometry.vertices[3].
Note: myGeometry.computeFaces() only works when geometries have four or more vertices.
Calculates the normal vector for each vertex on the geometry.
\nAll 3D shapes are made by connecting sets of points called vertices. A\ngeometry's surface is formed by connecting vertices to create triangles\nthat are stitched together. Each triangular patch on the geometry's\nsurface is called a face. myGeometry.computeNormals() performs the\nmath needed to orient each face. Orientation is important for lighting\nand other effects.
A face's orientation is defined by its normal vector which points out\nof the face and is normal (perpendicular) to the surface. Calling\nmyGeometry.computeNormals() first calculates each face's normal vector.\nThen it calculates the normal vector for each vertex by averaging the\nnormal vectors of the faces surrounding the vertex. The vertex normals\nare stored as p5.Vector objects in the\nmyGeometry.vertexNormals array.
The first parameter, shadingType, is optional. Passing the constant\nFLAT, as in myGeometry.computeNormals(FLAT), provides neighboring\nfaces with their own copies of the vertices they share. Surfaces appear\ntiled with flat shading. Passing the constant SMOOTH, as in\nmyGeometry.computeNormals(SMOOTH), makes neighboring faces reuse their\nshared vertices. Surfaces appear smoother with smooth shading. By\ndefault, shadingType is FLAT.
The second parameter, options, is also optional. If an object with a\nroundToPrecision property is passed, as in\nmyGeometry.computeNormals(SMOOTH, { roundToPrecision: 5 }), it sets the\nnumber of decimal places to use for calculations. By default,\nroundToPrecision uses 3 decimal places.
Transforms the geometry's vertices to fit snugly within a 100×100×100 box\ncentered at the origin.
\nCalling myGeometry.normalize() translates the geometry's vertices so that\nthey're centered at the origin (0, 0, 0). Then it scales the vertices so\nthat they fill a 100×100×100 box. As a result, small geometries will grow\nand large geometries will shrink.
Note: myGeometry.normalize() only works when called in the\nsetup() function.
Welcome to RendererGL Immediate Mode.\nImmediate mode is used for drawing custom shapes\nfrom a set of vertices. Immediate Mode is activated\nwhen you call beginShape() & de-activated when you call endShape().\nImmediate mode is a style of programming borrowed\nfrom OpenGL's (now-deprecated) immediate mode.\nIt differs from p5.js' default, Retained Mode, which caches\ngeometries and buffers on the CPU to reduce the number of webgl\ndraw calls. Retained mode is more efficient & performative,\nhowever, Immediate Mode is useful for sketching quick\ngeometric ideas.
\n", "class": "p5", "module": "Math" }, { - "file": "src/webgl/p5.RendererGL.Immediate.js", + "file": "src\\webgl\\p5.RendererGL.Immediate.js", "line": 191, "description": "End shape drawing and render vertices to screen.
\n", "chainable": 1, @@ -25293,7 +25293,7 @@ "module": "Math" }, { - "file": "src/webgl/p5.RendererGL.Retained.js", + "file": "src\\webgl\\p5.RendererGL.Retained.js", "line": 8, "params": [ { @@ -25306,7 +25306,7 @@ "module": "Math" }, { - "file": "src/webgl/p5.RendererGL.js", + "file": "src\\webgl\\p5.RendererGL.js", "line": 118, "description": "Set attributes for the WebGL Drawing context.\nThis is a way of adjusting how the WebGL\nrenderer works to fine-tune the display and performance.
\nNote that this will reinitialize the drawing context\nif called after the WebGL canvas is made.
\nIf an object is passed as the parameter, all attributes\nnot declared in the object will be set to defaults.
\nThe available attributes are:\n
\nalpha - indicates if the canvas contains an alpha buffer\ndefault is true
depth - indicates whether the drawing buffer has a depth buffer\nof at least 16 bits - default is true
\nstencil - indicates whether the drawing buffer has a stencil buffer\nof at least 8 bits
\nantialias - indicates whether or not to perform anti-aliasing\ndefault is false (true in Safari)
\npremultipliedAlpha - indicates that the page compositor will assume\nthe drawing buffer contains colors with pre-multiplied alpha\ndefault is true
\npreserveDrawingBuffer - if true the buffers will not be cleared and\nand will preserve their values until cleared or overwritten by author\n(note that p5 clears automatically on draw loop)\ndefault is true
\nperPixelLighting - if true, per-pixel lighting will be used in the\nlighting shader otherwise per-vertex lighting is used.\ndefault is true.
\nversion - either 1 or 2, to specify which WebGL version to ask for. By\ndefault, WebGL 2 will be requested. If WebGL2 is not available, it will\nfall back to WebGL 1. You can check what version is used with by looking at\nthe global webglVersion property.
Shaders are written in GLSL, but\nthere are different versions of GLSL that it might be written in.
\nCalling this method on a p5.Shader will return the GLSL version it uses, either 100 es or 300 es.\nWebGL 1 shaders will only use 100 es, and WebGL 2 shaders may use either.
Logs the hooks available in this shader, and their current implementation.
\nEach shader may let you override bits of its behavior. Each bit is called\na hook. A hook is either for the vertex shader, if it affects the\nposition of vertices, or in the fragment shader, if it affects the pixel\ncolor. This method logs those values to the console, letting you know what\nyou are able to use in a call to\nmodify().
For example, this shader will produce the following output:
\nmyShader = baseMaterialShader().modify({\n declarations: 'uniform float time;',\n 'vec3 getWorldPosition': `(vec3 pos) {\n pos.y += 20. * sin(time * 0.001 + pos.x * 0.05);\n return pos;\n }`\n});\nmyShader.inspectHooks();\n\n==== Vertex shader hooks: ====\nvoid beforeVertex() {}\nvec3 getLocalPosition(vec3 position) { return position; }\n[MODIFIED] vec3 getWorldPosition(vec3 pos) {\n pos.y += 20. * sin(time * 0.001 + pos.x * 0.05);\n return pos;\n }\nvec3 getLocalNormal(vec3 normal) { return normal; }\nvec3 getWorldNormal(vec3 normal) { return normal; }\nvec2 getUV(vec2 uv) { return uv; }\nvec4 getVertexColor(vec4 color) { return color; }\nvoid afterVertex() {}\n\n==== Fragment shader hooks: ====\nvoid beforeFragment() {}\nInputs getPixelInputs(Inputs inputs) { return inputs; }\nvec4 combineColors(ColorComponents components) {\n vec4 color = vec4(0.);\n color.rgb += components.diffuse * components.baseColor;\n color.rgb += components.ambient * components.ambientColor;\n color.rgb += components.specular * components.specularColor;\n color.rgb += components.emissive;\n color.a = components.opacity;\n return color;\n }\nvec4 getFinalColor(vec4 color) { return color; }\nvoid afterFragment() {}\n\n",
"itemtype": "method",
@@ -25370,7 +25370,7 @@
"submodule": "Material"
},
{
- "file": "src/webgl/p5.Shader.js",
+ "file": "src\\webgl\\p5.Shader.js",
"line": 340,
"description": "Returns a new shader, based on the original, but with custom snippets\nof shader code replacing default behaviour.
\nEach shader may let you override bits of its behavior. Each bit is called\na hook. A hook is either for the vertex shader, if it affects the\nposition of vertices, or in the fragment shader, if it affects the pixel\ncolor. You can inspect the different hooks available by calling\nyourShader.inspectHooks(). You can\nalso read the reference for the default material, normal material, color, line, and point shaders to\nsee what hooks they have available.
modify() takes one parameter, hooks, an object with the hooks you want\nto override. Each key of the hooks object is the name\nof a hook, and the value is a string with the GLSL code for your hook.
If you supply functions that aren't existing hooks, they will get added at the start of\nthe shader as helper functions so that you can use them in your hooks.
\nTo add new uniforms to your shader, you can pass in a uniforms object containing\nthe type and name of the uniform as the key, and a default value or function returning\na default value as its value. These will be automatically set when the shader is set\nwith shader(yourShader).
You can also add a declarations key, where the value is a GLSL string declaring\ncustom uniform variables, globals, and functions shared\nbetween hooks. To add declarations just in a vertex or fragment shader, add\nvertexDeclarations and fragmentDeclarations keys.
Copies the shader from one drawing context to another.
\nEach p5.Shader object must be compiled by calling\nshader() before it can run. Compilation happens\nin a drawing context which is usually the main canvas or an instance of\np5.Graphics. A shader can only be used in the\ncontext where it was compiled. The copyToContext() method compiles the\nshader again and copies it to another drawing context where it can be\nreused.
The parameter, context, is the drawing context where the shader will be\nused. The shader can be copied to an instance of\np5.Graphics, as in\nmyShader.copyToContext(pg). The shader can also be copied from a\np5.Graphics object to the main canvas using\nthe window variable, as in myShader.copyToContext(window).
Note: A p5.Shader object created with\ncreateShader(),\ncreateFilterShader(), or\nloadShader()\ncan be used directly with a p5.Framebuffer\nobject created with\ncreateFramebuffer(). Both objects\nhave the same context as the main canvas.
\n", "itemtype": "method", @@ -25421,7 +25421,7 @@ "submodule": "Material" }, { - "file": "src/webgl/p5.Shader.js", + "file": "src\\webgl\\p5.Shader.js", "line": 990, "description": "Sets the shader’s uniform (global) variables.
\nShader programs run on the computer’s graphics processing unit (GPU).\nThey live in part of the computer’s memory that’s completely separate\nfrom the sketch that runs them. Uniforms are global variables within a\nshader program. They provide a way to pass values from a sketch running\non the CPU to a shader program running on the GPU.
\nThe first parameter, uniformName, is a string with the uniform’s name.\nFor the shader above, uniformName would be 'r'.
The second parameter, data, is the value that should be used to set the\nuniform. For example, calling myShader.setUniform('r', 0.5) would set\nthe r uniform in the shader above to 0.5. data should match the\nuniform’s type. Numbers, strings, booleans, arrays, and many types of\nimages can all be passed to a shader with setUniform().
p5.sound \nhttps://p5js.org/reference/#/libraries/p5.sound
\nFrom the Processing Foundation and contributors\nhttps://github.com/processing/p5.js-sound/graphs/contributors
\nMIT License (MIT)\nhttps://github.com/processing/p5.js-sound/blob/master/LICENSE
\nSome of the many audio libraries & resources that inspire p5.sound:
\nWeb Audio API: http://w3.org/TR/webaudio/
\n", "class": "p5.sound", @@ -25461,7 +25461,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 159, "description": "Returns the Audio Context for this sketch. Useful for users\nwho would like to dig deeper into the Web Audio API\n.
\n\nSome browsers require users to startAudioContext\nwith a user gesture, such as touchStarted in the example below.
", "itemtype": "method", @@ -25478,7 +25478,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 198, "description": "It is not only a good practice to give users control over starting\naudio. This policy is enforced by many web browsers, including iOS and\nGoogle Chrome, which create the Web Audio API's\nAudio Context\nin a suspended state.
\n\nIn these browser-specific policies, sound will not play until a user\ninteraction event (i.e. mousePressed()) explicitly resumes\nthe AudioContext, or starts an audio node. This can be accomplished by\ncalling start() on a p5.Oscillator,\n play() on a p5.SoundFile, or simply\nuserStartAudio().
userStartAudio() starts the AudioContext on a user\ngesture. The default behavior will enable audio on any\nmouseUp or touchEnd event. It can also be placed in a specific\ninteraction function, such as mousePressed() as in the\nexample below. This method utilizes\nStartAudioContext\n, a library by Yotam Mann (MIT Licence, 2016).
This module has shims
\n", "class": "p5", @@ -25517,7 +25517,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 536, "description": "Determine which filetypes are supported (inspired by buzz.js)\nThe audio element (el) will only be used to test browser support for various audio formats
\n", "class": "p5", @@ -25525,7 +25525,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 726, "description": "Returns a number representing the output volume for sound\nin this sketch.
\n", "itemtype": "method", @@ -25539,7 +25539,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 738, "description": "Scale the output of all sound in this sketch
\nScaled between 0.0 (silence) and 1.0 (full volume).\n1.0 is the maximum amplitude of a digital sound, so multiplying\nby greater than 1.0 may cause digital distortion. To\nfade, provide arampTime parameter. For more\ncomplex fades, see the Envelope class.\n\nAlternately, you can pass in a signal source such as an\noscillator to modulate the amplitude with an audio signal.
\nHow This Works: When you load the p5.sound module, it\ncreates a single instance of p5sound. All sound objects in this\nmodule output to p5sound before reaching your computer's output.\nSo if you change the amplitude of p5sound, it impacts all of the\nsound in this module.
\n\nIf no value is provided, returns a Web Audio API Gain Node
", "itemtype": "method", @@ -25568,7 +25568,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 782, "description": "p5.soundOut is the p5.sound final output bus. It sends output to\nthe destination of this window's web audio context. It contains\nWeb Audio API nodes including a dyanmicsCompressor (.limiter),\nand Gain Nodes for .input and .output.
Returns a number representing the sample rate, in samples per second,\nof all sound objects in this audio context. It is determined by the\nsampling rate of your operating system's sound card, and it is not\ncurrently possile to change.\nIt is often 44100, or twice the range of human hearing.
\n", "itemtype": "method", @@ -25600,7 +25600,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 825, "description": "Returns the closest MIDI note value for\na given frequency.
\n", "itemtype": "method", @@ -25621,7 +25621,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 841, "description": "Returns the frequency value of a MIDI note value.\nGeneral MIDI treats notes as integers where middle C\nis 60, C# is 61, D is 62 etc. Useful for generating\nmusical frequencies with oscillators.
\n", "itemtype": "method", @@ -25645,7 +25645,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 925, "description": "List the SoundFile formats that you will include. LoadSound\nwill search your directory for these extensions, and will pick\na format that is compatable with the client's web browser.\nHere is a free online file\nconverter.
\n", "itemtype": "method", @@ -25667,7 +25667,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1040, "description": "Used by Osc and Envelope to chain signal math
\n", "class": "p5", @@ -25675,7 +25675,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1145, "description": "Save a p5.SoundFile as a .wav file. The browser will prompt the user\nto download the file to their device.\nFor uploading audio to a server, use\np5.SoundFile.saveBlob.
Returns true if the sound file finished loading successfully.
\n", "itemtype": "method", @@ -25711,7 +25711,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1679, "description": "Play the p5.SoundFile
\n", "itemtype": "method", @@ -25753,7 +25753,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1787, "description": "p5.SoundFile has two play modes: restart and\nsustain. Play Mode determines what happens to a\np5.SoundFile if it is triggered while in the middle of playback.\nIn sustain mode, playback will continue simultaneous to the\nnew playback. In restart mode, play() will stop playback\nand start over. With untilDone, a sound will play only if it's\nnot already playing. Sustain is the default mode.
Pauses a file that is currently playing. If the file is not\nplaying, then nothing will happen.
\nAfter pausing, .play() will resume from the paused\nposition.\nIf p5.SoundFile had been set to loop before it was paused,\nit will continue to loop after it is unpaused with .play().
\n", "itemtype": "method", @@ -25794,7 +25794,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1905, "description": "Loop the p5.SoundFile. Accepts optional parameters to set the\nplayback rate, playback volume, loopStart, loopEnd.
\n", "itemtype": "method", @@ -25839,7 +25839,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1950, "description": "Set a p5.SoundFile's looping flag to true or false. If the sound\nis currently playing, this change will take effect when it\nreaches the end of the current playback.
\n", "itemtype": "method", @@ -25856,7 +25856,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1976, "description": "Returns 'true' if a p5.SoundFile is currently looping and playing, 'false' if not.
\n", "itemtype": "method", @@ -25870,7 +25870,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 1997, "description": "Returns true if a p5.SoundFile is playing, false if not (i.e.\npaused or stopped).
\n", "itemtype": "method", @@ -25884,7 +25884,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2011, "description": "Returns true if a p5.SoundFile is paused, false if not (i.e.\nplaying or stopped).
\n", "itemtype": "method", @@ -25898,7 +25898,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2025, "description": "Stop soundfile playback.
\n", "itemtype": "method", @@ -25916,7 +25916,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2087, "description": "Set the stereo panning of a p5.sound object to\na floating point number between -1.0 (left) and 1.0 (right).\nDefault is 0.0 (center).
\n", "itemtype": "method", @@ -25943,7 +25943,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2131, "description": "Returns the current stereo pan position (-1.0 to 1.0)
\n", "itemtype": "method", @@ -25957,7 +25957,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2146, "description": "Set the playback rate of a sound file. Will change the speed and the pitch.\nValues less than zero will reverse the audio buffer.
\n", "itemtype": "method", @@ -25978,7 +25978,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2239, "description": "Multiply the output volume (amplitude) of a sound file\nbetween 0.0 (silence) and 1.0 (full volume).\n1.0 is the maximum amplitude of a digital sound, so multiplying\nby greater than 1.0 may cause digital distortion. To\nfade, provide a rampTime parameter. For more\ncomplex fades, see the Envelope class.
Alternately, you can pass in a signal source such as an\noscillator to modulate the amplitude with an audio signal.
\n", "itemtype": "method", @@ -26007,7 +26007,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2276, "description": "Returns the duration of a sound file in seconds.
\n", "itemtype": "method", @@ -26021,7 +26021,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2293, "description": "Return the current position of the p5.SoundFile playhead, in seconds.\nTime is relative to the normal buffer direction, so if reverseBuffer\nhas been called, currentTime will count backwards.
Move the playhead of a soundfile that is currently playing to a\nnew position and a new duration, in seconds.\nIf none are given, will reset the file to play entire duration\nfrom start to finish. To set the position of a soundfile that is\nnot currently playing, use the play or loop methods.
Return the number of channels in a sound file.\nFor example, Mono = 1, Stereo = 2.
\n", "itemtype": "method", @@ -26071,7 +26071,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2354, "description": "Return the sample rate of the sound file.
\n", "itemtype": "method", @@ -26085,7 +26085,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2367, "description": "Return the number of samples in a sound file.\nEqual to sampleRate * duration.
\n", "itemtype": "method", @@ -26099,7 +26099,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2381, "description": "Returns an array of amplitude peaks in a p5.SoundFile that can be\nused to draw a static waveform. Scans through the p5.SoundFile's\naudio buffer to find the greatest amplitudes. Accepts one\nparameter, 'length', which determines size of the array.\nLarger arrays result in more precise waveform visualizations.
\nInspired by Wavesurfer.js.
\n", "itemtype": "method", @@ -26121,7 +26121,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2443, "description": "Reverses the p5.SoundFile's buffer source.\nPlayback must be handled separately (see example).
\n", "itemtype": "method", @@ -26134,7 +26134,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2497, "description": "Schedule an event to be called when the soundfile\nreaches the end of a buffer. If the soundfile is\nplaying through once, this will be called when it\nends. If it is looping, it will be called when\nstop is called.
\n", "itemtype": "method", @@ -26151,7 +26151,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2565, "description": "Connects the output of a p5sound object to input of another\np5.sound object. For example, you may connect a p5.SoundFile to an\nFFT or an Effect. If no parameter is given, it will connect to\nthe main output. Most p5sound objects connect to the master\noutput when they are created.
\n", "itemtype": "method", @@ -26169,7 +26169,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2590, "description": "Disconnects the output of this p5sound object.
\n", "itemtype": "method", @@ -26179,14 +26179,14 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2604, "class": "p5.SoundFile", "module": "p5.sound", "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2612, "description": "Reset the source for this SoundFile to a\nnew path (URL).
\n", "itemtype": "method", @@ -26208,7 +26208,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2630, "description": "Replace the current Audio Buffer with a new Buffer.
\n", "itemtype": "method", @@ -26225,7 +26225,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2719, "description": "Schedule events to trigger every time a MediaElement\n(audio/video) reaches a playback cue point.
\nAccepts a callback function, a time (in seconds) at which to trigger\nthe callback, and an optional parameter for the callback.
\nTime will be passed as the first parameter to the callback function,\nand param will be the second parameter.
\n", "itemtype": "method", @@ -26260,7 +26260,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2790, "description": "Remove a callback based on its ID. The ID is returned by the\naddCue method.
\n", "itemtype": "method", @@ -26277,7 +26277,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2817, "description": "Remove all of the callbacks that had originally been scheduled\nvia the addCue method.
\n", "itemtype": "method", @@ -26287,7 +26287,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2850, "description": "Save a p5.SoundFile as a .wav file. The browser will prompt the user\nto download the file to their device. To upload a file to a server, see\ngetBlob
\n", "itemtype": "method", @@ -26308,7 +26308,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 2882, "description": "This method is useful for sending a SoundFile to a server. It returns the\n.wav-encoded audio data as a \"Blob\".\nA Blob is a file-like data object that can be uploaded to a server\nwith an http request. We'll\nuse the httpDo options object to send a POST request with some\nspecific options: we encode the request as multipart/form-data,\nand attach the blob as one of the form values using FormData.
loadSound() returns a new p5.SoundFile from a specified\npath. If called during preload(), the p5.SoundFile will be ready\nto play in time for setup() and draw(). If called outside of\npreload, the p5.SoundFile will not be ready immediately, so\nloadSound accepts a callback as the second parameter. Using a\n\nlocal server is recommended when loading external files.
\n", "itemtype": "method", @@ -26367,7 +26367,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3117, "description": "Connects to the p5sound instance (main output) by default.\nOptionally, you can pass in a specific source (i.e. a soundfile).
\n", "itemtype": "method", @@ -26394,7 +26394,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3209, "description": "Returns a single Amplitude reading at the moment it is called.\nFor continuous readings, run in the draw loop.
\n", "itemtype": "method", @@ -26419,7 +26419,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3264, "description": "Determines whether the results of Amplitude.process() will be\nNormalized. To normalize, Amplitude finds the difference the\nloudest reading it has processed and the maximum amplitude of\n1.0. Amplitude adds this difference to all values to produce\nresults that will reliably map between 0.0 and 1.0. However,\nif a louder moment occurs, the amount that Normalize adds to\nall the values will change. Accepts an optional boolean parameter\n(true or false). Normalizing is off by default.
\n", "itemtype": "method", @@ -26437,7 +26437,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3293, "description": "Smooth Amplitude analysis by averaging with the last analysis\nframe. Off by default.
\n", "itemtype": "method", @@ -26454,7 +26454,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3476, "description": "Set the input source for the FFT analysis. If no source is\nprovided, FFT will analyze all sound in the sketch.
\n", "itemtype": "method", @@ -26472,7 +26472,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3501, "description": "Returns an array of amplitude values (between -1.0 and +1.0) that represent\na snapshot of amplitude readings in a single buffer. Length will be\nequal to bins (defaults to 1024). Can be used to draw the waveform\nof a sound.
\n", "itemtype": "method", @@ -26500,7 +26500,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3553, "description": "Returns an array of amplitude values (between 0 and 255)\nacross the frequency spectrum. Length is equal to FFT bins\n(1024 by default). The array indices correspond to frequencies\n(i.e. pitches), from the lowest to the highest that humans can\nhear. Each value represents amplitude at that slice of the\nfrequency spectrum. Must be called prior to using\ngetEnergy().
Returns the amount of energy (volume) at a specific\n\nfrequency, or the average amount of energy between two\nfrequencies. Accepts Number(s) corresponding\nto frequency (in Hz), or a \"string\" corresponding to predefined\nfrequency ranges (\"bass\", \"lowMid\", \"mid\", \"highMid\", \"treble\").\nReturns a range between 0 (no energy/volume at that frequency) and\n255 (maximum energy).\nNOTE: analyze() must be called prior to getEnergy(). analyze()\ntells the FFT to analyze frequency data, and getEnergy() uses\nthe results to determine the value at a specific frequency or\nrange of frequencies.
\n", "itemtype": "method", @@ -26558,7 +26558,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3739, "description": "Returns the\n\nspectral centroid of the input signal.\nNOTE: analyze() must be called prior to getCentroid(). Analyze()\ntells the FFT to analyze frequency data, and getCentroid() uses\nthe results determine the spectral centroid.
\n", "itemtype": "method", @@ -26575,7 +26575,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3826, "description": "Smooth FFT analysis by averaging with the last analysis frame.
\n", "itemtype": "method", @@ -26592,7 +26592,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3854, "description": "Returns an array of average amplitude values for a given number\nof frequency bands split equally. N defaults to 16.\nNOTE: analyze() must be called prior to linAverages(). Analyze()\ntells the FFT to analyze frequency data, and linAverages() uses\nthe results to group them into a smaller set of averages.
\n", "itemtype": "method", @@ -26613,7 +26613,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3889, "description": "Returns an array of average amplitude values of the spectrum, for a given\nset of \nOctave Bands\nNOTE: analyze() must be called prior to logAverages(). Analyze()\ntells the FFT to analyze frequency data, and logAverages() uses\nthe results to group them into a smaller set of averages.
\n", "itemtype": "method", @@ -26634,7 +26634,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 3925, "description": "Calculates and Returns the 1/N\nOctave Bands\nN defaults to 3 and minimum central frequency to 15.625Hz.\n(1/3 Octave Bands ~= 31 Frequency Bands)\nSetting fCtr0 to a central value of a higher octave will ignore the lower bands\nand produce less frequency groups.
\n", "itemtype": "method", @@ -26660,7 +26660,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4168, "description": "Start an oscillator.
\nStarting an oscillator on a user gesture will enable audio in browsers\nthat have a strict autoplay policy, including Chrome and most mobile\ndevices. See also: userStartAudio().
Stop an oscillator. Accepts an optional parameter\nto determine how long (in seconds from now) until the\noscillator stops.
\n", "itemtype": "method", @@ -26701,7 +26701,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4238, "description": "Set the amplitude between 0 and 1.0. Or, pass in an object\nsuch as an oscillator to modulate amplitude with an audio signal.
\n", "itemtype": "method", @@ -26734,7 +26734,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4271, "description": "Returns the value of output gain
\n", "itemtype": "method", @@ -26748,7 +26748,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4285, "description": "Set frequency of an oscillator to a value. Or, pass in an object\nsuch as an oscillator to modulate the frequency with an audio signal.
\n", "itemtype": "method", @@ -26784,7 +26784,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4360, "description": "Returns the value of frequency of oscillator
\n", "itemtype": "method", @@ -26798,7 +26798,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4373, "description": "Set type to 'sine', 'triangle', 'sawtooth' or 'square'.
\n", "itemtype": "method", @@ -26815,7 +26815,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4386, "description": "Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' or 'square'.
\n", "itemtype": "method", @@ -26829,7 +26829,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4399, "description": "Connect to a p5.sound / Web Audio object.
\n", "itemtype": "method", @@ -26846,7 +26846,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4420, "description": "Disconnect all outputs
\n", "itemtype": "method", @@ -26856,7 +26856,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4444, "description": "Pan between Left (-1) and Right (1)
\n", "itemtype": "method", @@ -26878,7 +26878,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4460, "description": "Returns the current value of panPosition , between Left (-1) and Right (1)
\n", "itemtype": "method", @@ -26892,7 +26892,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4494, "description": "Set the phase of an oscillator between 0.0 and 1.0.\nIn this implementation, phase is a delay time\nbased on the oscillator's current frequency.
\n", "itemtype": "method", @@ -26909,7 +26909,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4522, "description": "Add a value to the p5.Oscillator's output amplitude,\nand return the oscillator. Calling this method again\nwill override the initial add() with a new value.
\n", "itemtype": "method", @@ -26930,7 +26930,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4543, "description": "Multiply the p5.Oscillator's output amplitude\nby a fixed value (i.e. turn it up!). Calling this method\nagain will override the initial mult() with a new value.
\n", "itemtype": "method", @@ -26951,7 +26951,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4563, "description": "Scale this oscillator's amplitude values to a given\nrange, and return the oscillator. Calling this method\nagain will override the initial scale() with new values.
\n", "itemtype": "method", @@ -26987,7 +26987,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4767, "description": "Time until envelope reaches attackLevel
\n", "itemtype": "property", @@ -26997,7 +26997,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4772, "description": "Level once attack is complete.
\n", "itemtype": "property", @@ -27007,7 +27007,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4778, "description": "Time until envelope reaches decayLevel.
\n", "itemtype": "property", @@ -27017,7 +27017,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4784, "description": "Level after decay. The envelope will sustain here until it is released.
\n", "itemtype": "property", @@ -27027,7 +27027,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4790, "description": "Duration of the release portion of the envelope.
\n", "itemtype": "property", @@ -27037,7 +27037,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4796, "description": "Level at the end of the release.
\n", "itemtype": "property", @@ -27047,7 +27047,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4833, "description": "Reset the envelope with a series of time/value pairs.
\n", "itemtype": "method", @@ -27092,7 +27092,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4895, "description": "Set values like a traditional\n\nADSR envelope\n.
\n", "itemtype": "method", @@ -27130,7 +27130,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 4964, "description": "Set max (attackLevel) and min (releaseLevel) of envelope.
\n", "itemtype": "method", @@ -27155,7 +27155,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5037, "description": "Assign a parameter to be controlled by this envelope.\nIf a p5.Sound object is given, then the p5.Envelope will control its\noutput gain. If multiple inputs are provided, the env will\ncontrol all of them.
\n", "itemtype": "method", @@ -27174,7 +27174,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5055, "description": "Set whether the envelope ramp is linear (default) or exponential.\nExponential ramps can be useful because we perceive amplitude\nand frequency logarithmically.
\n", "itemtype": "method", @@ -27191,7 +27191,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5078, "description": "Play tells the envelope to start acting on a given input.\nIf the input is a p5.sound object (i.e. AudioIn, Oscillator,\nSoundFile), then Envelope will control its output volume.\nEnvelopes can also be used to control any \nWeb Audio Audio Param.
", "itemtype": "method", @@ -27223,7 +27223,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5148, "description": "Trigger the Attack, and Decay portion of the Envelope.\nSimilar to holding down a key on a piano, but it will\nhold the sustain level until you let go. Input can be\nany p5.sound object, or a \nWeb Audio Param.
\n", "itemtype": "method", @@ -27248,7 +27248,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5256, "description": "Trigger the Release of the Envelope. This is similar to releasing\nthe key on a piano and letting the sound fade according to the\nrelease level and release time.
\n", "itemtype": "method", @@ -27273,7 +27273,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5350, "description": "Exponentially ramp to a value using the first two\nvalues from setADSR(attackTime, decayTime)\nas \ntime constants for simple exponential ramps.\nIf the value is higher than current value, it uses attackTime,\nwhile a decrease uses decayTime.
Add a value to the p5.Oscillator's output amplitude,\nand return the oscillator. Calling this method\nagain will override the initial add() with new values.
\n", "itemtype": "method", @@ -27330,7 +27330,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5479, "description": "Multiply the p5.Envelope's output amplitude\nby a fixed value. Calling this method\nagain will override the initial mult() with new values.
\n", "itemtype": "method", @@ -27351,7 +27351,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5498, "description": "Scale this envelope's amplitude values to a given\nrange, and return the envelope. Calling this method\nagain will override the initial scale() with new values.
\n", "itemtype": "method", @@ -27387,7 +27387,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5657, "description": "Set type of noise to 'white', 'pink' or 'brown'.\nWhite is the default.
\n", "itemtype": "method", @@ -27405,7 +27405,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 5871, "description": "Set the width of a Pulse object (an oscillator that implements\nPulse Width Modulation).
\n", "itemtype": "method", @@ -27423,7 +27423,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6066, "itemtype": "property", "name": "input", @@ -27433,7 +27433,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6070, "itemtype": "property", "name": "output", @@ -27443,7 +27443,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6075, "itemtype": "property", "name": "stream", @@ -27453,7 +27453,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6080, "itemtype": "property", "name": "mediaStream", @@ -27463,7 +27463,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6085, "itemtype": "property", "name": "currentSource", @@ -27473,7 +27473,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6090, "description": "Client must allow browser to access their microphone / audioin source.\nDefault: false. Will become true when the client enables access.
\n", "itemtype": "property", @@ -27484,7 +27484,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6098, "description": "Input amplitude, connect to it by default but not to master out
\n", "itemtype": "property", @@ -27495,7 +27495,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6114, "description": "Start processing audio input. This enables the use of other\nAudioIn methods like getLevel(). Note that by default, AudioIn\nis not connected to p5.sound's output. So you won't hear\nanything unless you use the connect() method.
Certain browsers limit access to the user's microphone. For example,\nChrome only allows access from localhost and over https. For this reason,\nyou may want to include an errorCallback—a function that is called in case\nthe browser won't provide mic access.
\n", "itemtype": "method", @@ -27519,7 +27519,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6171, "description": "Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel().\nIf re-starting, the user may be prompted for permission access.
\n", "itemtype": "method", @@ -27529,7 +27529,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6191, "description": "Connect to an audio unit. If no parameter is provided, will\nconnect to the main output (i.e. your speakers).
Disconnect the AudioIn from all audio units. For example, if\nconnect() had been called, disconnect() will stop sending\nsignal to your speakers.
Read the Amplitude (volume level) of an AudioIn. The AudioIn\nclass contains its own instance of the Amplitude class to help\nmake it easy to get a microphone's volume level. Accepts an\noptional smoothing value (0.0 < 1.0). NOTE: AudioIn must\n.start() before using .getLevel().
Set amplitude (volume) of a mic input between 0 and 1.0.
Returns a list of available input sources. This is a wrapper\nfor \nMediaDevices.enumerateDevices() - Web APIs | MDN\nand it returns a Promise.
\n", "itemtype": "method", @@ -27633,7 +27633,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6340, "description": "Set the input source. Accepts a number representing a\nposition in the array returned by getSources().\nThis is only available in browsers that support\n \n navigator.mediaDevices.enumerateDevices()
\n", "itemtype": "method", @@ -27653,7 +27653,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6462, "description": "In classes that extend\np5.Effect, connect effect nodes\nto the wet parameter
\n", "class": "p5.Effect", @@ -27661,7 +27661,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6478, "description": "Set the output volume of the filter.
\n", "itemtype": "method", @@ -27691,7 +27691,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6502, "description": "Link effects together in a chain\nExample usage: filter.chain(reverb, delay, panner);\nMay be used with an open-ended number of arguments
\n", "itemtype": "method", @@ -27709,7 +27709,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6525, "description": "Adjust the dry/wet value.
\n", "itemtype": "method", @@ -27727,7 +27727,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6542, "description": "Send output to a p5.js-sound, Web Audio Node, or use signal to\ncontrol an AudioParam
\n", "itemtype": "method", @@ -27744,7 +27744,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6557, "description": "Disconnect all output.
\n", "itemtype": "method", @@ -27754,7 +27754,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6719, "description": "The p5.Filter is built with a\n\nWeb Audio BiquadFilter Node.
\n", "itemtype": "property", @@ -27765,7 +27765,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6742, "description": "Filter an audio signal according to a set\nof filter parameters.
\n", "itemtype": "method", @@ -27794,7 +27794,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6760, "description": "Set the frequency and the resonance of the filter.
\n", "itemtype": "method", @@ -27824,7 +27824,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6781, "description": "Set the filter frequency, in Hz, from 10 to 22050 (the range of\nhuman hearing, although in reality most people hear in a narrower\nrange).
\n", "itemtype": "method", @@ -27851,7 +27851,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6811, "description": "Controls either width of a bandpass frequency,\nor the resonance of a low/highpass cutoff frequency.
\n", "itemtype": "method", @@ -27878,7 +27878,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6838, "description": "Controls the gain attribute of a Biquad Filter.\nThis is distinctly different from .amp() which is inherited from p5.Effect\n.amp() controls the volume via the output gain node\np5.Filter.gain() controls the gain parameter of a Biquad Filter node.
\n", "itemtype": "method", @@ -27899,7 +27899,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6864, "description": "Toggle function. Switches between the specified type and allpass
\n", "itemtype": "method", @@ -27913,7 +27913,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 6884, "description": "Set the type of a p5.Filter. Possible types include:\n\"lowpass\" (default), \"highpass\", \"bandpass\",\n\"lowshelf\", \"highshelf\", \"peaking\", \"notch\",\n\"allpass\".
\n", "itemtype": "method", @@ -27930,7 +27930,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7198, "description": "The p5.EQ is built with abstracted p5.Filter objects.\nTo modify any bands, use methods of the \np5.Filter API, especially gain and freq.\nBands are stored in an array, with indices 0 - 3, or 0 - 7
Process an input by connecting it to the EQ
\n", "itemtype": "method", @@ -27958,7 +27958,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7629, "description": "\nWeb Audio Spatial Panner Node
\nProperties include
\n Panning Model\n : \"equal power\" or \"HRTF\"
\n DistanceModel\n: \"linear\", \"inverse\", or \"exponential\"
Connect an audio sorce
\n", "itemtype": "method", @@ -27986,7 +27986,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7668, "description": "Set the X,Y,Z position of the Panner
\n", "itemtype": "method", @@ -28022,7 +28022,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7687, "description": "Getter and setter methods for position coordinates
\n", "itemtype": "method", @@ -28036,7 +28036,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7694, "description": "Getter and setter methods for position coordinates
\n", "itemtype": "method", @@ -28050,7 +28050,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7701, "description": "Getter and setter methods for position coordinates
\n", "itemtype": "method", @@ -28064,7 +28064,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7753, "description": "Set the X,Y,Z position of the Panner
\n", "itemtype": "method", @@ -28100,7 +28100,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7772, "description": "Getter and setter methods for orient coordinates
\n", "itemtype": "method", @@ -28114,7 +28114,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7779, "description": "Getter and setter methods for orient coordinates
\n", "itemtype": "method", @@ -28128,7 +28128,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7786, "description": "Getter and setter methods for orient coordinates
\n", "itemtype": "method", @@ -28142,7 +28142,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7838, "description": "Set the rolloff factor and max distance
\n", "itemtype": "method", @@ -28166,7 +28166,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7852, "description": "Maxium distance between the source and the listener
\n", "itemtype": "method", @@ -28187,7 +28187,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7869, "description": "How quickly the volume is reduced as the source moves away from the listener
\n", "itemtype": "method", @@ -28208,7 +28208,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7989, "description": "The p5.Delay is built with two\n\nWeb Audio Delay Nodes, one for each stereo channel.
\n", "itemtype": "property", @@ -28219,7 +28219,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 7999, "description": "The p5.Delay is built with two\n\nWeb Audio Delay Nodes, one for each stereo channel.
\n", "itemtype": "property", @@ -28230,7 +28230,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8049, "description": "Add delay to an audio signal according to a set\nof delay parameters.
\n", "itemtype": "method", @@ -28265,7 +28265,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8094, "description": "Set the delay (echo) time, in seconds. Usually this value will be\na floating point number between 0.0 and 1.0.
\n", "itemtype": "method", @@ -28282,7 +28282,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8116, "description": "Feedback occurs when Delay sends its signal back through its input\nin a loop. The feedback amount determines how much signal to send each\ntime through the loop. A feedback greater than 1.0 is not desirable because\nit will increase the overall output each time through the loop,\ncreating an infinite feedback loop. The default value is 0.5
\n", "itemtype": "method", @@ -28303,7 +28303,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8148, "description": "Set a lowpass filter frequency for the delay. A lowpass filter\nwill cut off any frequencies higher than the filter frequency.
\n", "itemtype": "method", @@ -28325,7 +28325,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8170, "description": "Choose a preset type of delay. 'pingPong' bounces the signal\nfrom the left to the right channel to produce a stereo effect.\nAny other parameter will revert to the default delay setting.
\n", "itemtype": "method", @@ -28342,7 +28342,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8223, "description": "Set the output level of the delay effect.
\n", "itemtype": "method", @@ -28371,7 +28371,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8234, "description": "Send output to a p5.sound or web audio object
\n", "itemtype": "method", @@ -28388,7 +28388,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8242, "description": "Disconnect all output.
\n", "itemtype": "method", @@ -28398,7 +28398,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8409, "description": "Connect a source to the reverb, and assign reverb parameters.
\n", "itemtype": "method", @@ -28433,7 +28433,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8446, "description": "Set the reverb settings. Similar to .process(), but without\nassigning a new input.
\n", "itemtype": "method", @@ -28463,7 +28463,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8482, "description": "Set the output level of the reverb effect.
\n", "itemtype": "method", @@ -28492,7 +28492,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8493, "description": "Send output to a p5.sound or web audio object
\n", "itemtype": "method", @@ -28509,7 +28509,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8501, "description": "Disconnect all output.
\n", "itemtype": "method", @@ -28519,7 +28519,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8621, "description": "Internally, the p5.Convolver uses the a\n\nWeb Audio Convolver Node.
\n", "itemtype": "property", @@ -28530,7 +28530,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8645, "description": "If you load multiple impulse files using the .addImpulse method,\nthey will be stored as Objects in this Array. Toggle between them\nwith the toggleImpulse(id) method.
Connect a source to the convolver.
\n", "itemtype": "method", @@ -28561,7 +28561,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 8786, "description": "Load and assign a new Impulse Response to the p5.Convolver.\nThe impulse is added to the .impulses array. Previous\nimpulses can be accessed with the .toggleImpulse(id)\nmethod.
Similar to .addImpulse, except that the .impulses\nArray is reset to save memory. A new .impulses\narray is created with this impulse as the only item.
If you have used .addImpulse() to add multiple impulses\nto a p5.Convolver, then you can use this method to toggle between\nthe items in the .impulses Array. Accepts a parameter\nto identify which impulse you wish to use, identified either by its\noriginal filename (String) or by its position in the .impulses\n Array (Number).
\nYou can access the objects in the .impulses Array directly. Each\nObject has two attributes: an .audioBuffer (type:\nWeb Audio \nAudioBuffer) and a .name, a String that corresponds\nwith the original filename.
Create a p5.Convolver. Accepts a path to a soundfile\nthat will be used to generate an impulse response.
\n", "itemtype": "method", @@ -28668,7 +28668,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9084, "description": "Set the global tempo, in beats per minute, for all\np5.Parts. This method will impact all active p5.Parts.
\n", "itemtype": "method", @@ -28690,7 +28690,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9173, "description": "Array of values to pass into the callback\nat each step of the phrase. Depending on the callback\nfunction's requirements, these values may be numbers,\nstrings, or an object with multiple parameters.\nZero (0) indicates a rest.
\n", "itemtype": "property", @@ -28701,7 +28701,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9263, "description": "Set the tempo of this part, in Beats Per Minute.
\n", "itemtype": "method", @@ -28724,7 +28724,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9278, "description": "Returns the tempo, in Beats Per Minute, of this part.
\n", "itemtype": "method", @@ -28738,7 +28738,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9291, "description": "Start playback of this part. It will play\nthrough all of its phrases at a speed\ndetermined by setBPM.
\n", "itemtype": "method", @@ -28756,7 +28756,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9311, "description": "Loop playback of this part. It will begin\nlooping through all of its phrases at a speed\ndetermined by setBPM.
\n", "itemtype": "method", @@ -28774,7 +28774,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9333, "description": "Tell the part to stop looping.
\n", "itemtype": "method", @@ -28784,7 +28784,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9349, "description": "Stop the part and cue it to step 0. Playback will resume from the begining of the Part when it is played again.
\n", "itemtype": "method", @@ -28802,7 +28802,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9363, "description": "Pause the part. Playback will resume\nfrom the current step.
\n", "itemtype": "method", @@ -28819,7 +28819,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9379, "description": "Add a p5.Phrase to this Part.
\n", "itemtype": "method", @@ -28836,7 +28836,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9406, "description": "Remove a phrase from this part, based on the name it was\ngiven when it was created.
\n", "itemtype": "method", @@ -28853,7 +28853,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9424, "description": "Get a phrase from this part, based on the name it was\ngiven when it was created. Now you can modify its array.
\n", "itemtype": "method", @@ -28870,7 +28870,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9442, "description": "Find all sequences with the specified name, and replace their patterns with the specified array.
\n", "itemtype": "method", @@ -28892,7 +28892,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9473, "description": "Set the function that will be called at every step. This will clear the previous function.
\n", "itemtype": "method", @@ -28909,7 +28909,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9542, "description": "Start playback of the score.
\n", "itemtype": "method", @@ -28919,7 +28919,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9555, "description": "Stop playback of the score.
\n", "itemtype": "method", @@ -28929,7 +28929,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9569, "description": "Pause playback of the score.
\n", "itemtype": "method", @@ -28939,7 +28939,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9581, "description": "Loop playback of the score.
\n", "itemtype": "method", @@ -28949,7 +28949,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9594, "description": "Stop looping playback of the score. If it\nis currently playing, this will go into effect\nafter the current round of playback completes.
\n", "itemtype": "method", @@ -28959,7 +28959,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9628, "description": "Set the tempo for all parts in the score
\n", "itemtype": "method", @@ -28981,7 +28981,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9729, "description": "Getters and Setters, setting any parameter will result in a change in the clock's\nfrequency, that will be reflected after the next callback\nbeats per minute (defaults to 60)
\n", "itemtype": "property", @@ -28992,7 +28992,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9750, "description": "number of quarter notes in a measure (defaults to 4)
\n", "itemtype": "property", @@ -29003,7 +29003,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9770, "description": "length of the loops interval
\n", "itemtype": "property", @@ -29014,7 +29014,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9787, "description": "how many times the callback has been called so far
\n", "itemtype": "property", @@ -29026,7 +29026,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9800, "description": "musicalTimeMode uses Tone.Time convention\ntrue if string, false if number
\n", "itemtype": "property", @@ -29037,7 +29037,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9808, "description": "musicalTimeMode variables\nmodify these only when the interval is specified in musicalTime format as a string
\n", "class": "p5.SoundLoop", @@ -29045,7 +29045,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9816, "description": "Set a limit to the number of loops to play. defaults to Infinity
\n", "itemtype": "property", @@ -29056,7 +29056,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9826, "description": "Do not initiate the callback if timeFromNow is < 0\nThis ususually occurs for a few milliseconds when the page\nis not fully loaded
\nThe callback should only be called until maxIterations is reached
\n", "class": "p5.SoundLoop", @@ -29064,7 +29064,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9841, "description": "Start the loop
\n", "itemtype": "method", @@ -29082,7 +29082,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9860, "description": "Stop the loop
\n", "itemtype": "method", @@ -29100,7 +29100,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9878, "description": "Pause the loop
\n", "itemtype": "method", @@ -29118,7 +29118,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 9896, "description": "Synchronize loops. Use this method to start two or more loops in synchronization\nor to start a loop in synchronization with a loop that is already playing\nThis method will schedule the implicit loop in sync with the explicit master loop\ni.e. loopToStart.syncedStart(loopToSyncWith)
\n", "itemtype": "method", @@ -29141,7 +29141,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10068, "description": "The p5.Compressor is built with a Web Audio Dynamics Compressor Node\n
\n", "itemtype": "property", @@ -29152,7 +29152,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10084, "description": "Performs the same function as .connect, but also accepts\noptional parameters to set compressor's audioParams
\n", "itemtype": "method", @@ -29199,7 +29199,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10112, "description": "Set the parameters of a compressor.
\n", "itemtype": "method", @@ -29236,7 +29236,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10152, "description": "Get current attack or set value w/ time ramp
\n", "itemtype": "method", @@ -29260,7 +29260,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10178, "description": "Get current knee or set value w/ time ramp
\n", "itemtype": "method", @@ -29284,7 +29284,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10204, "description": "Get current ratio or set value w/ time ramp
\n", "itemtype": "method", @@ -29308,7 +29308,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10228, "description": "Get current threshold or set value w/ time ramp
\n", "itemtype": "method", @@ -29331,7 +29331,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10252, "description": "Get current release or set value w/ time ramp
\n", "itemtype": "method", @@ -29354,7 +29354,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10277, "description": "Return the current reduction value
\n", "itemtype": "method", @@ -29368,7 +29368,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10419, "description": "isDetected is set to true when a peak is detected.
\n", "itemtype": "attribute", @@ -29380,7 +29380,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10432, "description": "The update method is run in the draw loop.
\nAccepts an FFT object. You must call .analyze()\non the FFT object prior to updating the peakDetect\nbecause it relies on a completed FFT analysis.
\n", "itemtype": "method", @@ -29397,7 +29397,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10470, "description": "onPeak accepts two arguments: a function to call when\na peak is detected. The value of the peak,\nbetween 0.0 and 1.0, is passed to the callback.
\n", "itemtype": "method", @@ -29423,7 +29423,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10676, "description": "Connect a specific device to the p5.SoundRecorder.\nIf no parameter is given, p5.SoundRecorer will record\nall audible p5.sound from your sketch.
\n", "itemtype": "method", @@ -29441,7 +29441,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10703, "description": "Start recording. To access the recording, provide\na p5.SoundFile as the first parameter. The p5.SoundRecorder\nwill send its recording to that p5.SoundFile for playback once\nrecording is complete. Optional parameters include duration\n(in seconds) of the recording, and a callback function that\nwill be called once the complete recording has been\ntransfered to the p5.SoundFile.
\n", "itemtype": "method", @@ -29470,7 +29470,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10739, "description": "Stop the recording. Once the recording is stopped,\nthe results will be sent to the p5.SoundFile that\nwas given on .record(), and if a callback function\nwas provided on record, that function will be called.
\n", "itemtype": "method", @@ -29480,7 +29480,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10864, "description": "The p5.Distortion is built with a\n\nWeb Audio WaveShaper Node.
\n", "itemtype": "property", @@ -29491,7 +29491,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10883, "description": "Process a sound source, optionally specify amount and oversample values.
\n", "itemtype": "method", @@ -29517,7 +29517,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10900, "description": "Set the amount and oversample of the waveshaper distortion.
\n", "itemtype": "method", @@ -29543,7 +29543,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10923, "description": "Return the distortion amount, typically between 0-1.
\n", "itemtype": "method", @@ -29557,7 +29557,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 10937, "description": "Return the oversampling.
\n", "itemtype": "method", @@ -29571,7 +29571,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11055, "description": "Connect a source to the gain node.
\n", "itemtype": "method", @@ -29588,7 +29588,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11070, "description": "Send output to a p5.sound or web audio object
\n", "itemtype": "method", @@ -29605,7 +29605,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11084, "description": "Disconnect all output.
\n", "itemtype": "method", @@ -29615,7 +29615,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11098, "description": "Set the output level of the gain node.
\n", "itemtype": "method", @@ -29644,7 +29644,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11181, "description": "Connect to p5 objects or Web Audio Nodes
\n", "itemtype": "method", @@ -29661,7 +29661,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11194, "description": "Disconnect from soundOut
\n", "itemtype": "method", @@ -29671,7 +29671,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11322, "description": "Getters and Setters
\n", "itemtype": "property", @@ -29682,7 +29682,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11328, "itemtype": "property", "name": "decay", @@ -29692,7 +29692,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11333, "itemtype": "property", "name": "sustain", @@ -29702,7 +29702,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11338, "itemtype": "property", "name": "release", @@ -29712,7 +29712,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11379, "description": "Play tells the MonoSynth to start playing a note. This method schedules\nthe calling of .triggerAttack and .triggerRelease.
\n", "itemtype": "method", @@ -29750,7 +29750,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11431, "description": "Trigger the Attack, and Decay portion of the Envelope.\nSimilar to holding down a key on a piano, but it will\nhold the sustain level until you let go.
\n", "params": [ @@ -29782,7 +29782,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11478, "description": "Trigger the release of the Envelope. This is similar to releasing\nthe key on a piano and letting the sound fade according to the\nrelease level and release time.
\n", "params": [ @@ -29802,7 +29802,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11516, "description": "Set values like a traditional\n\nADSR envelope\n.
\n", "itemtype": "method", @@ -29837,7 +29837,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11544, "description": "MonoSynth amp
\n", "itemtype": "method", @@ -29864,7 +29864,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11564, "description": "Connect to a p5.sound / Web Audio object.
\n", "itemtype": "method", @@ -29881,7 +29881,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11578, "description": "Disconnect all outputs
\n", "itemtype": "method", @@ -29891,7 +29891,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11592, "description": "Get rid of the MonoSynth and free up its resources / memory.
\n", "itemtype": "method", @@ -29901,7 +29901,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11742, "description": "An object that holds information about which notes have been played and\nwhich notes are currently being played. New notes are added as keys\non the fly. While a note has been attacked, but not released, the value of the\nkey is the audiovoice which is generating that note. When notes are released,\nthe value of the key becomes undefined.
\n", "itemtype": "property", @@ -29911,7 +29911,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11755, "description": "A PolySynth must have at least 1 voice, defaults to 8
\n", "itemtype": "property", @@ -29921,7 +29921,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11761, "description": "Monosynth that generates the sound for each note that is triggered. The\np5.PolySynth defaults to using the p5.MonoSynth as its voice.
\n", "itemtype": "property", @@ -29931,7 +29931,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11800, "description": "Play a note by triggering noteAttack and noteRelease with sustain time
\n", "itemtype": "method", @@ -29970,7 +29970,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11849, "description": "noteADSR sets the envelope for a specific note that has just been triggered.\nUsing this method modifies the envelope of whichever audiovoice is being used\nto play the desired note. The envelope should be reset before noteRelease is called\nin order to prevent the modified envelope from being used on other notes.
\n", "itemtype": "method", @@ -30012,7 +30012,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11881, "description": "Set the PolySynths global envelope. This method modifies the envelopes of each\nmonosynth so that all notes are played with this envelope.
\n", "itemtype": "method", @@ -30048,7 +30048,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 11909, "description": "Trigger the Attack, and Decay portion of a MonoSynth.\nSimilar to holding down a key on a piano, but it will\nhold the sustain level until you let go.
\n", "itemtype": "method", @@ -30081,7 +30081,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 12021, "description": "Trigger the Release of an AudioVoice note. This is similar to releasing\nthe key on a piano and letting the sound fade according to the\nrelease level and release time.
\n", "itemtype": "method", @@ -30108,7 +30108,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 12105, "description": "Connect to a p5.sound / Web Audio object.
\n", "itemtype": "method", @@ -30125,7 +30125,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 12119, "description": "Disconnect all outputs
\n", "itemtype": "method", @@ -30135,7 +30135,7 @@ "submodule": "p5.sound" }, { - "file": "lib/addons/p5.sound.js", + "file": "lib\\addons\\p5.sound.js", "line": 12133, "description": "Get rid of the MonoSynth and free up its resources / memory.
\n", "itemtype": "method", @@ -30148,1271 +30148,1271 @@ "warnings": [ { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/fes_core.js:123" + "line": " src\\core\\friendly_errors\\fes_core.js:123" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/fes_core.js:223" + "line": " src\\core\\friendly_errors\\fes_core.js:223" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/fes_core.js:323" + "line": " src\\core\\friendly_errors\\fes_core.js:323" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/fes_core.js:464" + "line": " src\\core\\friendly_errors\\fes_core.js:464" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/fes_core.js:1018" + "line": " src\\core\\friendly_errors\\fes_core.js:1018" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/sketch_reader.js:243" + "line": " src\\core\\friendly_errors\\sketch_reader.js:243" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/sketch_reader.js:268" + "line": " src\\core\\friendly_errors\\sketch_reader.js:268" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/friendly_errors/validate_params.js:336" + "line": " src\\core\\friendly_errors\\validate_params.js:336" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:590" + "line": " src\\core\\environment.js:590" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:621" + "line": " src\\core\\environment.js:621" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:652" + "line": " src\\core\\environment.js:652" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:680" + "line": " src\\core\\environment.js:680" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:708" + "line": " src\\core\\environment.js:708" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:708" + "line": " src\\core\\environment.js:708" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/environment.js:1059" + "line": " src\\core\\environment.js:1059" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/environment.js:1078" + "line": " src\\core\\environment.js:1078" }, { "message": "unknown tag: alt", - "line": " src/core/environment.js:1208" + "line": " src\\core\\environment.js:1208" }, { "message": "replacing incorrect tag: function with method", - "line": " src/core/internationalization.js:105" + "line": " src\\core\\internationalization.js:105" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/internationalization.js:105" + "line": " src\\core\\internationalization.js:105" }, { "message": "unknown tag: name", - "line": " src/core/p5.Element.js:56" + "line": " src\\core\\p5.Element.js:56" }, { "message": "unknown tag: name", - "line": " src/core/p5.Element.js:87" + "line": " src\\core\\p5.Element.js:87" }, { "message": "unknown tag: name", - "line": " src/core/p5.Element.js:94" + "line": " src\\core\\p5.Element.js:94" }, { "message": "unknown tag: name", - "line": " src/core/p5.Element.js:102" + "line": " src\\core\\p5.Element.js:102" }, { "message": "unknown tag: alt", - "line": " src/core/p5.Element.js:966" + "line": " src\\core\\p5.Element.js:966" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/core/structure.js:224" + "line": " src\\core\\structure.js:224" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/dom/dom.js:2636" + "line": " src\\dom\\dom.js:2636" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/dom/dom.js:2722" + "line": " src\\dom\\dom.js:2722" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/dom/dom.js:2893" + "line": " src\\dom\\dom.js:2893" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/dom/dom.js:2980" + "line": " src\\dom\\dom.js:2980" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/dom/dom.js:3118" + "line": " src\\dom\\dom.js:3118" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/image/loading_displaying.js:761" + "line": " src\\image\\loading_displaying.js:761" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/image/loading_displaying.js:794" + "line": " src\\image\\loading_displaying.js:794" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/image/loading_displaying.js:828" + "line": " src\\image\\loading_displaying.js:828" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/image/loading_displaying.js:871" + "line": " src\\image\\loading_displaying.js:871" }, { "message": "unknown tag: name", - "line": " src/image/p5.Image.js:114" + "line": " src\\image\\p5.Image.js:114" }, { "message": "unknown tag: name", - "line": " src/image/p5.Image.js:151" + "line": " src\\image\\p5.Image.js:151" }, { "message": "unknown tag: name", - "line": " src/image/p5.Image.js:198" + "line": " src\\image\\p5.Image.js:198" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/image/p5.Image.js:299" + "line": " src\\image\\p5.Image.js:299" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/image/pixels.js:706" + "line": " src\\image\\pixels.js:706" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/io/files.js:986" + "line": " src\\io\\files.js:986" }, { "message": "unknown tag: name", - "line": " src/io/p5.Table.js:43" + "line": " src\\io\\p5.Table.js:43" }, { "message": "unknown tag: name", - "line": " src/io/p5.Table.js:80" + "line": " src\\io\\p5.Table.js:80" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/math/calculation.js:1048" + "line": " src\\math\\calculation.js:1048" }, { "message": "unknown tag: name", - "line": " src/math/p5.Vector.js:113" + "line": " src\\math\\p5.Vector.js:113" }, { "message": "unknown tag: name", - "line": " src/math/p5.Vector.js:120" + "line": " src\\math\\p5.Vector.js:120" }, { "message": "unknown tag: name", - "line": " src/math/p5.Vector.js:127" + "line": " src\\math\\p5.Vector.js:127" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/math/trigonometry.js:775" + "line": " src\\math\\trigonometry.js:775" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/math/trigonometry.js:790" + "line": " src\\math\\trigonometry.js:790" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/math/trigonometry.js:805" + "line": " src\\math\\trigonometry.js:805" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/math/trigonometry.js:820" + "line": " src\\math\\trigonometry.js:820" }, { "message": "unknown tag: name", - "line": " src/typography/p5.Font.js:51" + "line": " src\\typography\\p5.Font.js:51" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/3d_primitives.js:266" + "line": " src\\webgl\\3d_primitives.js:266" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/3d_primitives.js:520" + "line": " src\\webgl\\3d_primitives.js:520" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/GeometryBuilder.js:122" + "line": " src\\webgl\\GeometryBuilder.js:122" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/material.js:173" + "line": " src\\webgl\\material.js:173" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/material.js:540" + "line": " src\\webgl\\material.js:540" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/material.js:886" + "line": " src\\webgl\\material.js:886" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/material.js:1197" + "line": " src\\webgl\\material.js:1197" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/material.js:1292" + "line": " src\\webgl\\material.js:1292" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/material.js:1355" + "line": " src\\webgl\\material.js:1355" }, { "message": "unknown tag: alt", - "line": " src/webgl/p5.Camera.js:2472" + "line": " src\\webgl\\p5.Camera.js:2472" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Framebuffer.js:297" + "line": " src\\webgl\\p5.Framebuffer.js:297" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Framebuffer.js:402" + "line": " src\\webgl\\p5.Framebuffer.js:402" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Framebuffer.js:892" + "line": " src\\webgl\\p5.Framebuffer.js:892" }, { "message": "unknown tag: name", - "line": " src/webgl/p5.Geometry.js:252" + "line": " src\\webgl\\p5.Geometry.js:252" }, { "message": "unknown tag: name", - "line": " src/webgl/p5.Geometry.js:375" + "line": " src\\webgl\\p5.Geometry.js:375" }, { "message": "unknown tag: name", - "line": " src/webgl/p5.Geometry.js:505" + "line": " src\\webgl\\p5.Geometry.js:505" }, { "message": "unknown tag: name", - "line": " src/webgl/p5.Geometry.js:591" + "line": " src\\webgl\\p5.Geometry.js:591" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Geometry.js:682" + "line": " src\\webgl\\p5.Geometry.js:682" }, { "message": "param name missing: {Number}", - "line": " src/webgl/p5.Matrix.js:754" + "line": " src\\webgl\\p5.Matrix.js:754" }, { "message": "param name missing: {p5.Vector}", - "line": " src/webgl/p5.Matrix.js:773" + "line": " src\\webgl\\p5.Matrix.js:773" }, { "message": "param name missing: {p5.Vector}", - "line": " src/webgl/p5.Matrix.js:788" + "line": " src\\webgl\\p5.Matrix.js:788" }, { "message": "param name missing: {p5.Vector}", - "line": " src/webgl/p5.Matrix.js:806" + "line": " src\\webgl\\p5.Matrix.js:806" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.Immediate.js:320" + "line": " src\\webgl\\p5.RendererGL.Immediate.js:320" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.Retained.js:19" + "line": " src\\webgl\\p5.RendererGL.Retained.js:19" }, { "message": "unknown tag: alt", - "line": " src/webgl/p5.RendererGL.js:118" + "line": " src\\webgl\\p5.RendererGL.js:118" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:318" + "line": " src\\webgl\\p5.RendererGL.js:318" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:389" + "line": " src\\webgl\\p5.RendererGL.js:389" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:702" + "line": " src\\webgl\\p5.RendererGL.js:702" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:720" + "line": " src\\webgl\\p5.RendererGL.js:720" }, { "message": "unknown tag: alt", - "line": " src/webgl/p5.RendererGL.js:948" + "line": " src\\webgl\\p5.RendererGL.js:948" }, { "message": "unknown tag: alt", - "line": " src/webgl/p5.RendererGL.js:989" + "line": " src\\webgl\\p5.RendererGL.js:989" }, { "message": "unknown tag: alt", - "line": " src/webgl/p5.RendererGL.js:1304" + "line": " src\\webgl\\p5.RendererGL.js:1304" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:1418" + "line": " src\\webgl\\p5.RendererGL.js:1418" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:1947" + "line": " src\\webgl\\p5.RendererGL.js:1947" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.RendererGL.js:2197" + "line": " src\\webgl\\p5.RendererGL.js:2197" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Shader.js:233" + "line": " src\\webgl\\p5.Shader.js:233" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Shader.js:340" + "line": " src\\webgl\\p5.Shader.js:340" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/p5.Shader.js:574" + "line": " src\\webgl\\p5.Shader.js:574" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:118" + "line": " src\\webgl\\text.js:118" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/text.js:162" + "line": " src\\webgl\\text.js:162" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:194" + "line": " src\\webgl\\text.js:194" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:206" + "line": " src\\webgl\\text.js:206" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:255" + "line": " src\\webgl\\text.js:255" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:269" + "line": " src\\webgl\\text.js:269" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:408" + "line": " src\\webgl\\text.js:408" }, { "message": "replacing incorrect tag: returns with return", - "line": " src/webgl/text.js:408" + "line": " src\\webgl\\text.js:408" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:476" + "line": " src\\webgl\\text.js:476" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:491" + "line": " src\\webgl\\text.js:491" }, { "message": "replacing incorrect tag: function with method", - "line": " src/webgl/text.js:576" + "line": " src\\webgl\\text.js:576" }, { "message": "replacing incorrect tag: params with param", - "line": " lib/addons/p5.sound.js:2381" + "line": " lib\\addons\\p5.sound.js:2381" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:2381" + "line": " lib\\addons\\p5.sound.js:2381" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:2882" + "line": " lib\\addons\\p5.sound.js:2882" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:4271" + "line": " lib\\addons\\p5.sound.js:4271" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:4360" + "line": " lib\\addons\\p5.sound.js:4360" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:4386" + "line": " lib\\addons\\p5.sound.js:4386" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:4460" + "line": " lib\\addons\\p5.sound.js:4460" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:6280" + "line": " lib\\addons\\p5.sound.js:6280" }, { "message": "replacing incorrect tag: returns with return", - "line": " lib/addons/p5.sound.js:8116" + "line": " lib\\addons\\p5.sound.js:8116" }, { "message": "Missing item type\nConversions adapted fromReturns a single Amplitude reading at the moment it is called. For continuous readings, run in the draw loop.
diff --git a/src/content/reference/en/p5.Amplitude/setInput.mdx b/src/content/reference/en/p5.Amplitude/setInput.mdx index 0b23ef10a6..8e6bd1d54f 100644 --- a/src/content/reference/en/p5.Amplitude/setInput.mdx +++ b/src/content/reference/en/p5.Amplitude/setInput.mdx @@ -2,7 +2,7 @@ title: setInput module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Connects to the p5sound instance (main output) by default. Optionally, you can pass in a specific source (i.e. a soundfile).
diff --git a/src/content/reference/en/p5.Amplitude/smooth.mdx b/src/content/reference/en/p5.Amplitude/smooth.mdx index a6b3a1be4a..5126561432 100644 --- a/src/content/reference/en/p5.Amplitude/smooth.mdx +++ b/src/content/reference/en/p5.Amplitude/smooth.mdx @@ -2,7 +2,7 @@ title: smooth module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Smooth Amplitude analysis by averaging with the last analysis frame. Off by default.
diff --git a/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx b/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx index 755a9572dc..97bc53a66a 100644 --- a/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx +++ b/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx @@ -2,7 +2,7 @@ title: toggleNormalize module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Determines whether the results of Amplitude.process() will be Normalized. To normalize, Amplitude finds the difference the diff --git a/src/content/reference/en/p5.AudioIn/amp.mdx b/src/content/reference/en/p5.AudioIn/amp.mdx index e37ee8c799..d3e601bacb 100644 --- a/src/content/reference/en/p5.AudioIn/amp.mdx +++ b/src/content/reference/en/p5.AudioIn/amp.mdx @@ -2,7 +2,7 @@ title: amp module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Set amplitude (volume) of a mic input between 0 and 1.0.
Input amplitude, connect to it by default but not to master out
line: 6098 diff --git a/src/content/reference/en/p5.AudioIn/connect.mdx b/src/content/reference/en/p5.AudioIn/connect.mdx index 86b246ad8a..edb43c2c81 100644 --- a/src/content/reference/en/p5.AudioIn/connect.mdx +++ b/src/content/reference/en/p5.AudioIn/connect.mdx @@ -2,7 +2,7 @@ title: connect module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Connect to an audio unit. If no parameter is provided, will
connect to the main output (i.e. your speakers).
Disconnect the AudioIn from all audio units. For example, if connect() had been called, disconnect() will stop sending diff --git a/src/content/reference/en/p5.AudioIn/enabled.mdx b/src/content/reference/en/p5.AudioIn/enabled.mdx index c8160bcdfd..f786ec505c 100644 --- a/src/content/reference/en/p5.AudioIn/enabled.mdx +++ b/src/content/reference/en/p5.AudioIn/enabled.mdx @@ -2,7 +2,7 @@ title: enabled module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Client must allow browser to access their microphone / audioin source. Default: false. Will become true when the client enables access.
diff --git a/src/content/reference/en/p5.AudioIn/getLevel.mdx b/src/content/reference/en/p5.AudioIn/getLevel.mdx index 226380bce3..b560283fd2 100644 --- a/src/content/reference/en/p5.AudioIn/getLevel.mdx +++ b/src/content/reference/en/p5.AudioIn/getLevel.mdx @@ -2,7 +2,7 @@ title: getLevel module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Read the Amplitude (volume level) of an AudioIn. The AudioIn class contains its own instance of the Amplitude class to help diff --git a/src/content/reference/en/p5.AudioIn/getSources.mdx b/src/content/reference/en/p5.AudioIn/getSources.mdx index df9ab93f1b..48b148f89c 100644 --- a/src/content/reference/en/p5.AudioIn/getSources.mdx +++ b/src/content/reference/en/p5.AudioIn/getSources.mdx @@ -2,11 +2,11 @@ title: getSources module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Returns a list of available input sources. This is a wrapper for + en-US/docs/Web/API/MediaDevices/enumerateDevices" target="_blank"> MediaDevices.enumerateDevices() - Web APIs | MDN and it returns a Promise.
line: 6280 diff --git a/src/content/reference/en/p5.AudioIn/input.mdx b/src/content/reference/en/p5.AudioIn/input.mdx index fd9f45cf8f..2edafee8eb 100644 --- a/src/content/reference/en/p5.AudioIn/input.mdx +++ b/src/content/reference/en/p5.AudioIn/input.mdx @@ -2,7 +2,7 @@ title: input module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: '' line: 6066 isConstructor: false diff --git a/src/content/reference/en/p5.AudioIn/mediaStream.mdx b/src/content/reference/en/p5.AudioIn/mediaStream.mdx index 73c62a2288..437125200a 100644 --- a/src/content/reference/en/p5.AudioIn/mediaStream.mdx +++ b/src/content/reference/en/p5.AudioIn/mediaStream.mdx @@ -2,7 +2,7 @@ title: mediaStream module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: '' line: 6080 isConstructor: false diff --git a/src/content/reference/en/p5.AudioIn/output.mdx b/src/content/reference/en/p5.AudioIn/output.mdx index 7fa86373ad..3d14de3fbe 100644 --- a/src/content/reference/en/p5.AudioIn/output.mdx +++ b/src/content/reference/en/p5.AudioIn/output.mdx @@ -2,7 +2,7 @@ title: output module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: '' line: 6070 isConstructor: false diff --git a/src/content/reference/en/p5.AudioIn/setSource.mdx b/src/content/reference/en/p5.AudioIn/setSource.mdx index bfd12b7f3a..75c782348f 100644 --- a/src/content/reference/en/p5.AudioIn/setSource.mdx +++ b/src/content/reference/en/p5.AudioIn/setSource.mdx @@ -2,13 +2,13 @@ title: setSource module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Set the input source. Accepts a number representing a position in the array returned by getSources(). This is only available in browsers that support + en-US/docs/Web/API/MediaDevices/enumerateDevices" target="_blank"> navigator.mediaDevices.enumerateDevices()
line: 6340 isConstructor: false diff --git a/src/content/reference/en/p5.AudioIn/start.mdx b/src/content/reference/en/p5.AudioIn/start.mdx index a52ef9fd12..1049ed4f92 100644 --- a/src/content/reference/en/p5.AudioIn/start.mdx +++ b/src/content/reference/en/p5.AudioIn/start.mdx @@ -2,7 +2,7 @@ title: start module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Start processing audio input. This enables the use of other AudioIn methods like getLevel(). Note that by default, AudioIn diff --git a/src/content/reference/en/p5.AudioIn/stop.mdx b/src/content/reference/en/p5.AudioIn/stop.mdx index 6cdc868de6..4e500ea8ee 100644 --- a/src/content/reference/en/p5.AudioIn/stop.mdx +++ b/src/content/reference/en/p5.AudioIn/stop.mdx @@ -2,7 +2,7 @@ title: stop module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel(). If re-starting, the user may be prompted for permission access.
diff --git a/src/content/reference/en/p5.AudioIn/stream.mdx b/src/content/reference/en/p5.AudioIn/stream.mdx index c5ff967c99..23fe992a0a 100644 --- a/src/content/reference/en/p5.AudioIn/stream.mdx +++ b/src/content/reference/en/p5.AudioIn/stream.mdx @@ -2,7 +2,7 @@ title: stream module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: '' line: 6075 isConstructor: false diff --git a/src/content/reference/en/p5.AudioVoice/connect.mdx b/src/content/reference/en/p5.AudioVoice/connect.mdx index 3c91ef365c..f4bde2c81c 100644 --- a/src/content/reference/en/p5.AudioVoice/connect.mdx +++ b/src/content/reference/en/p5.AudioVoice/connect.mdx @@ -2,7 +2,7 @@ title: connect module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Connect to p5 objects or Web Audio Nodes
line: 11181 diff --git a/src/content/reference/en/p5.AudioVoice/disconnect.mdx b/src/content/reference/en/p5.AudioVoice/disconnect.mdx index 6c492b2096..207139bf8a 100644 --- a/src/content/reference/en/p5.AudioVoice/disconnect.mdx +++ b/src/content/reference/en/p5.AudioVoice/disconnect.mdx @@ -2,7 +2,7 @@ title: disconnect module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Disconnect from soundOut
line: 11194 diff --git a/src/content/reference/en/p5.Camera/camera.mdx b/src/content/reference/en/p5.Camera/camera.mdx index 299293548c..d95ae9c720 100644 --- a/src/content/reference/en/p5.Camera/camera.mdx +++ b/src/content/reference/en/p5.Camera/camera.mdx @@ -2,7 +2,7 @@ title: camera module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets the position and orientation of the camera.
diff --git a/src/content/reference/en/p5.Camera/centerX.mdx b/src/content/reference/en/p5.Camera/centerX.mdx index 9f519b15dc..d0a2fe6ba4 100644 --- a/src/content/reference/en/p5.Camera/centerX.mdx +++ b/src/content/reference/en/p5.Camera/centerX.mdx @@ -2,7 +2,7 @@ title: centerX module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >The x-coordinate of the place where the camera looks.
diff --git a/src/content/reference/en/p5.Camera/centerY.mdx b/src/content/reference/en/p5.Camera/centerY.mdx index 3dbe3aec5f..4ec6dfb42a 100644 --- a/src/content/reference/en/p5.Camera/centerY.mdx +++ b/src/content/reference/en/p5.Camera/centerY.mdx @@ -2,7 +2,7 @@ title: centerY module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >The y-coordinate of the place where the camera looks.
diff --git a/src/content/reference/en/p5.Camera/centerZ.mdx b/src/content/reference/en/p5.Camera/centerZ.mdx index 4695abd3c9..3b14423aa8 100644 --- a/src/content/reference/en/p5.Camera/centerZ.mdx +++ b/src/content/reference/en/p5.Camera/centerZ.mdx @@ -2,7 +2,7 @@ title: centerZ module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >The y-coordinate of the place where the camera looks.
diff --git a/src/content/reference/en/p5.Camera/eyeX.mdx b/src/content/reference/en/p5.Camera/eyeX.mdx index 6216fb34f1..0cac56df8b 100644 --- a/src/content/reference/en/p5.Camera/eyeX.mdx +++ b/src/content/reference/en/p5.Camera/eyeX.mdx @@ -2,7 +2,7 @@ title: eyeX module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: |The camera’s x-coordinate.
By default, the camera’s x-coordinate is set to 0 in "world" space.
diff --git a/src/content/reference/en/p5.Camera/eyeY.mdx b/src/content/reference/en/p5.Camera/eyeY.mdx index d00f4dff88..75dd8400b8 100644 --- a/src/content/reference/en/p5.Camera/eyeY.mdx +++ b/src/content/reference/en/p5.Camera/eyeY.mdx @@ -2,7 +2,7 @@ title: eyeY module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: |The camera’s y-coordinate.
By default, the camera’s y-coordinate is set to 0 in "world" space.
diff --git a/src/content/reference/en/p5.Camera/eyeZ.mdx b/src/content/reference/en/p5.Camera/eyeZ.mdx index 1a18868aed..7cf9767b66 100644 --- a/src/content/reference/en/p5.Camera/eyeZ.mdx +++ b/src/content/reference/en/p5.Camera/eyeZ.mdx @@ -2,7 +2,7 @@ title: eyeZ module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: |The camera’s z-coordinate.
By default, the camera’s z-coordinate is set to 800 in "world" space.
diff --git a/src/content/reference/en/p5.Camera/frustum.mdx b/src/content/reference/en/p5.Camera/frustum.mdx index 928f3791f6..7dc113bfaf 100644 --- a/src/content/reference/en/p5.Camera/frustum.mdx +++ b/src/content/reference/en/p5.Camera/frustum.mdx @@ -2,7 +2,7 @@ title: frustum module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets the camera's frustum.
diff --git a/src/content/reference/en/p5.Camera/lookAt.mdx b/src/content/reference/en/p5.Camera/lookAt.mdx index 5ca544376b..f854f5c5c9 100644 --- a/src/content/reference/en/p5.Camera/lookAt.mdx +++ b/src/content/reference/en/p5.Camera/lookAt.mdx @@ -2,7 +2,7 @@ title: lookAt module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Points the camera at a location.
diff --git a/src/content/reference/en/p5.Camera/move.mdx b/src/content/reference/en/p5.Camera/move.mdx index 90242aa794..48234690cc 100644 --- a/src/content/reference/en/p5.Camera/move.mdx +++ b/src/content/reference/en/p5.Camera/move.mdx @@ -2,7 +2,7 @@ title: move module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Moves the camera along its "local" axes without changing its orientation.
diff --git a/src/content/reference/en/p5.Camera/ortho.mdx b/src/content/reference/en/p5.Camera/ortho.mdx index 18c4a7f902..7518cd40ca 100644 --- a/src/content/reference/en/p5.Camera/ortho.mdx +++ b/src/content/reference/en/p5.Camera/ortho.mdx @@ -2,7 +2,7 @@ title: ortho module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets an orthographic projection for the camera.
diff --git a/src/content/reference/en/p5.Camera/pan.mdx b/src/content/reference/en/p5.Camera/pan.mdx index 0dcf21cb1c..5684a9daf9 100644 --- a/src/content/reference/en/p5.Camera/pan.mdx +++ b/src/content/reference/en/p5.Camera/pan.mdx @@ -2,7 +2,7 @@ title: pan module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Rotates the camera left and right.
diff --git a/src/content/reference/en/p5.Camera/perspective.mdx b/src/content/reference/en/p5.Camera/perspective.mdx index 68023446a3..682bfed86e 100644 --- a/src/content/reference/en/p5.Camera/perspective.mdx +++ b/src/content/reference/en/p5.Camera/perspective.mdx @@ -2,7 +2,7 @@ title: perspective module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets a perspective projection for the camera.
diff --git a/src/content/reference/en/p5.Camera/roll.mdx b/src/content/reference/en/p5.Camera/roll.mdx index 5c6d061367..2c247eab0b 100644 --- a/src/content/reference/en/p5.Camera/roll.mdx +++ b/src/content/reference/en/p5.Camera/roll.mdx @@ -2,7 +2,7 @@ title: roll module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Rotates the camera in a clockwise/counter-clockwise direction.
diff --git a/src/content/reference/en/p5.Camera/set.mdx b/src/content/reference/en/p5.Camera/set.mdx index 932ffc8cc7..6c30933efc 100644 --- a/src/content/reference/en/p5.Camera/set.mdx +++ b/src/content/reference/en/p5.Camera/set.mdx @@ -2,7 +2,7 @@ title: set module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets the camera’s position, orientation, and projection by copying another diff --git a/src/content/reference/en/p5.Camera/setPosition.mdx b/src/content/reference/en/p5.Camera/setPosition.mdx index b1fd82cd1b..5b862610d7 100644 --- a/src/content/reference/en/p5.Camera/setPosition.mdx +++ b/src/content/reference/en/p5.Camera/setPosition.mdx @@ -2,7 +2,7 @@ title: setPosition module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >
Sets the camera’s position in "world" space without changing its diff --git a/src/content/reference/en/p5.Camera/slerp.mdx b/src/content/reference/en/p5.Camera/slerp.mdx index 1fb39889ab..514331fdbe 100644 --- a/src/content/reference/en/p5.Camera/slerp.mdx +++ b/src/content/reference/en/p5.Camera/slerp.mdx @@ -2,7 +2,7 @@ title: slerp module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >
Sets the camera’s position and orientation to values that are in-between diff --git a/src/content/reference/en/p5.Camera/tilt.mdx b/src/content/reference/en/p5.Camera/tilt.mdx index ac6eb65788..11f1ce80bc 100644 --- a/src/content/reference/en/p5.Camera/tilt.mdx +++ b/src/content/reference/en/p5.Camera/tilt.mdx @@ -2,7 +2,7 @@ title: tilt module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >
Rotates the camera up and down.
diff --git a/src/content/reference/en/p5.Camera/upX.mdx b/src/content/reference/en/p5.Camera/upX.mdx index a1832a4b12..b49c9e7de2 100644 --- a/src/content/reference/en/p5.Camera/upX.mdx +++ b/src/content/reference/en/p5.Camera/upX.mdx @@ -2,7 +2,7 @@ title: upX module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: |The x-component of the camera's "up" vector.
The camera's "up" vector orients its y-axis. By default, the "up" vector is diff --git a/src/content/reference/en/p5.Camera/upY.mdx b/src/content/reference/en/p5.Camera/upY.mdx index ad3daabe50..b92f8921fe 100644 --- a/src/content/reference/en/p5.Camera/upY.mdx +++ b/src/content/reference/en/p5.Camera/upY.mdx @@ -2,7 +2,7 @@ title: upY module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: |
The y-component of the camera's "up" vector.
The camera's "up" vector orients its y-axis. By default, the "up" vector is diff --git a/src/content/reference/en/p5.Camera/upZ.mdx b/src/content/reference/en/p5.Camera/upZ.mdx index 23a663ea4e..eef74cae51 100644 --- a/src/content/reference/en/p5.Camera/upZ.mdx +++ b/src/content/reference/en/p5.Camera/upZ.mdx @@ -2,7 +2,7 @@ title: upZ module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: |
The z-component of the camera's "up" vector.
The camera's "up" vector orients its y-axis. By default, the "up" vector is diff --git a/src/content/reference/en/p5.Color/setAlpha.mdx b/src/content/reference/en/p5.Color/setAlpha.mdx index 0d5576b3d9..aa76941921 100644 --- a/src/content/reference/en/p5.Color/setAlpha.mdx +++ b/src/content/reference/en/p5.Color/setAlpha.mdx @@ -2,7 +2,7 @@ title: setAlpha module: Color submodule: Creating & Reading -file: src/color/p5.Color.js +file: src\color\p5.Color.js description: >
Sets the alpha (transparency) value of a color.
diff --git a/src/content/reference/en/p5.Color/setBlue.mdx b/src/content/reference/en/p5.Color/setBlue.mdx index dce334c749..c09d00aa5b 100644 --- a/src/content/reference/en/p5.Color/setBlue.mdx +++ b/src/content/reference/en/p5.Color/setBlue.mdx @@ -2,7 +2,7 @@ title: setBlue module: Color submodule: Creating & Reading -file: src/color/p5.Color.js +file: src\color\p5.Color.js description: >Sets the blue component of a color.
diff --git a/src/content/reference/en/p5.Color/setGreen.mdx b/src/content/reference/en/p5.Color/setGreen.mdx index 83ba822864..3bb561359a 100644 --- a/src/content/reference/en/p5.Color/setGreen.mdx +++ b/src/content/reference/en/p5.Color/setGreen.mdx @@ -2,7 +2,7 @@ title: setGreen module: Color submodule: Creating & Reading -file: src/color/p5.Color.js +file: src\color\p5.Color.js description: >Sets the green component of a color.
diff --git a/src/content/reference/en/p5.Color/setRed.mdx b/src/content/reference/en/p5.Color/setRed.mdx index 4c95ffd0f0..4ac30ab59b 100644 --- a/src/content/reference/en/p5.Color/setRed.mdx +++ b/src/content/reference/en/p5.Color/setRed.mdx @@ -2,7 +2,7 @@ title: setRed module: Color submodule: Creating & Reading -file: src/color/p5.Color.js +file: src\color\p5.Color.js description: >Sets the red component of a color.
diff --git a/src/content/reference/en/p5.Color/toString.mdx b/src/content/reference/en/p5.Color/toString.mdx index 9d896e811d..cbe06bdcf5 100644 --- a/src/content/reference/en/p5.Color/toString.mdx +++ b/src/content/reference/en/p5.Color/toString.mdx @@ -2,7 +2,7 @@ title: toString module: Color submodule: Creating & Reading -file: src/color/p5.Color.js +file: src\color\p5.Color.js description: >Returns the color formatted as a String.
Get current attack or set value w/ time ramp
line: 10152 diff --git a/src/content/reference/en/p5.Compressor/compressor.mdx b/src/content/reference/en/p5.Compressor/compressor.mdx index de6d10670d..c10b64b7cd 100644 --- a/src/content/reference/en/p5.Compressor/compressor.mdx +++ b/src/content/reference/en/p5.Compressor/compressor.mdx @@ -2,7 +2,7 @@ title: compressor module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >The p5.Compressor is built with a Get current knee or set value w/ time ramp
line: 10178 diff --git a/src/content/reference/en/p5.Compressor/process.mdx b/src/content/reference/en/p5.Compressor/process.mdx index c7735ac3e1..f5fd680203 100644 --- a/src/content/reference/en/p5.Compressor/process.mdx +++ b/src/content/reference/en/p5.Compressor/process.mdx @@ -2,7 +2,7 @@ title: process module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Performs the same function as .connect, but also accepts optional parameters to set compressor's audioParams
diff --git a/src/content/reference/en/p5.Compressor/ratio.mdx b/src/content/reference/en/p5.Compressor/ratio.mdx index b690698a40..1570fe7894 100644 --- a/src/content/reference/en/p5.Compressor/ratio.mdx +++ b/src/content/reference/en/p5.Compressor/ratio.mdx @@ -2,7 +2,7 @@ title: ratio module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Get current ratio or set value w/ time ramp
line: 10204 diff --git a/src/content/reference/en/p5.Compressor/reduction.mdx b/src/content/reference/en/p5.Compressor/reduction.mdx index 3ba0efc37c..396998c12f 100644 --- a/src/content/reference/en/p5.Compressor/reduction.mdx +++ b/src/content/reference/en/p5.Compressor/reduction.mdx @@ -2,7 +2,7 @@ title: reduction module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Return the current reduction value
line: 10277 diff --git a/src/content/reference/en/p5.Compressor/release.mdx b/src/content/reference/en/p5.Compressor/release.mdx index b7afeade9d..907ccb77f2 100644 --- a/src/content/reference/en/p5.Compressor/release.mdx +++ b/src/content/reference/en/p5.Compressor/release.mdx @@ -2,7 +2,7 @@ title: release module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Get current release or set value w/ time ramp
line: 10252 diff --git a/src/content/reference/en/p5.Compressor/set.mdx b/src/content/reference/en/p5.Compressor/set.mdx index 2d437db769..8b46292255 100644 --- a/src/content/reference/en/p5.Compressor/set.mdx +++ b/src/content/reference/en/p5.Compressor/set.mdx @@ -2,7 +2,7 @@ title: set module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Set the parameters of a compressor.
line: 10112 diff --git a/src/content/reference/en/p5.Compressor/threshold.mdx b/src/content/reference/en/p5.Compressor/threshold.mdx index be246ca2b1..20bf7ebf46 100644 --- a/src/content/reference/en/p5.Compressor/threshold.mdx +++ b/src/content/reference/en/p5.Compressor/threshold.mdx @@ -2,7 +2,7 @@ title: threshold module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Get current threshold or set value w/ time ramp
line: 10228 diff --git a/src/content/reference/en/p5.Convolver/addImpulse.mdx b/src/content/reference/en/p5.Convolver/addImpulse.mdx index f64800500d..7f003efcab 100644 --- a/src/content/reference/en/p5.Convolver/addImpulse.mdx +++ b/src/content/reference/en/p5.Convolver/addImpulse.mdx @@ -2,7 +2,7 @@ title: addImpulse module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Load and assign a new Impulse Response to the p5.Convolver.
The impulse is added to the .impulses array. Previous
diff --git a/src/content/reference/en/p5.Convolver/convolverNode.mdx b/src/content/reference/en/p5.Convolver/convolverNode.mdx
index e95d1a9498..2b2f45c548 100644
--- a/src/content/reference/en/p5.Convolver/convolverNode.mdx
+++ b/src/content/reference/en/p5.Convolver/convolverNode.mdx
@@ -2,7 +2,7 @@
title: convolverNode
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Internally, the p5.Convolver uses the a
diff --git a/src/content/reference/en/p5.Convolver/impulses.mdx b/src/content/reference/en/p5.Convolver/impulses.mdx
index 131075b1fa..a5e150d736 100644
--- a/src/content/reference/en/p5.Convolver/impulses.mdx
+++ b/src/content/reference/en/p5.Convolver/impulses.mdx
@@ -2,7 +2,7 @@
title: impulses
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
If you load multiple impulse files using the .addImpulse method,
they will be stored as Objects in this Array. Toggle between them
diff --git a/src/content/reference/en/p5.Convolver/process.mdx b/src/content/reference/en/p5.Convolver/process.mdx
index 183fcfe681..8f96a03c51 100644
--- a/src/content/reference/en/p5.Convolver/process.mdx
+++ b/src/content/reference/en/p5.Convolver/process.mdx
@@ -2,7 +2,7 @@
title: process
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Connect a source to the convolver. Similar to .addImpulse, except that the If you have used Set the output level of the delay effect. Send output to a p5.sound or web audio object Set the delay (echo) time, in seconds. Usually this value will be
a floating point number between 0.0 and 1.0. Disconnect all output. Feedback occurs when Delay sends its signal back through its input
in a loop. The feedback amount determines how much signal to send each
diff --git a/src/content/reference/en/p5.Delay/filter.mdx b/src/content/reference/en/p5.Delay/filter.mdx
index a57c1a2f90..b4eda9dbbf 100644
--- a/src/content/reference/en/p5.Delay/filter.mdx
+++ b/src/content/reference/en/p5.Delay/filter.mdx
@@ -2,7 +2,7 @@
title: filter
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set a lowpass filter frequency for the delay. A lowpass filter
will cut off any frequencies higher than the filter frequency. The p5.Delay is built with two
diff --git a/src/content/reference/en/p5.Delay/process.mdx b/src/content/reference/en/p5.Delay/process.mdx
index c7d0dcefaf..7c087134e7 100644
--- a/src/content/reference/en/p5.Delay/process.mdx
+++ b/src/content/reference/en/p5.Delay/process.mdx
@@ -2,7 +2,7 @@
title: process
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Add delay to an audio signal according to a set
of delay parameters. The p5.Delay is built with two
diff --git a/src/content/reference/en/p5.Delay/setType.mdx b/src/content/reference/en/p5.Delay/setType.mdx
index 311bf4d864..aa933dd9a2 100644
--- a/src/content/reference/en/p5.Delay/setType.mdx
+++ b/src/content/reference/en/p5.Delay/setType.mdx
@@ -2,7 +2,7 @@
title: setType
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Choose a preset type of delay. 'pingPong' bounces the signal
from the left to the right channel to produce a stereo effect.
diff --git a/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx b/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx
index 15bbc05e95..c16b19eb9b 100644
--- a/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx
+++ b/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx
@@ -2,7 +2,7 @@
title: WaveShaperNode
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
The p5.Distortion is built with a
diff --git a/src/content/reference/en/p5.Distortion/getAmount.mdx b/src/content/reference/en/p5.Distortion/getAmount.mdx
index 1ce6a44f6c..8d3e0ce34a 100644
--- a/src/content/reference/en/p5.Distortion/getAmount.mdx
+++ b/src/content/reference/en/p5.Distortion/getAmount.mdx
@@ -2,7 +2,7 @@
title: getAmount
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Return the distortion amount, typically between 0-1. Return the oversampling. Process a sound source, optionally specify amount and oversample
values. Set the amount and oversample of the waveshaper distortion. The p5.EQ is built with abstracted p5.Filter objects.
diff --git a/src/content/reference/en/p5.EQ/process.mdx b/src/content/reference/en/p5.EQ/process.mdx
index 9763873eab..b0cca3bbec 100644
--- a/src/content/reference/en/p5.EQ/process.mdx
+++ b/src/content/reference/en/p5.EQ/process.mdx
@@ -2,7 +2,7 @@
title: process
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Process an input by connecting it to the EQ Set the output volume of the filter. Link effects together in a chain
Example usage: filter.chain(reverb, delay, panner);
diff --git a/src/content/reference/en/p5.Effect/connect.mdx b/src/content/reference/en/p5.Effect/connect.mdx
index 9a37c3929e..dcbde80ff0 100644
--- a/src/content/reference/en/p5.Effect/connect.mdx
+++ b/src/content/reference/en/p5.Effect/connect.mdx
@@ -2,7 +2,7 @@
title: connect
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Send output to a p5.js-sound, Web Audio Node, or use signal to
control an AudioParam Disconnect all output. Adjust the dry/wet value. Adds a class to the element. Adds an
diff --git a/src/content/reference/en/p5.Element/center.mdx b/src/content/reference/en/p5.Element/center.mdx
index 9e0b292000..87d09d6121 100644
--- a/src/content/reference/en/p5.Element/center.mdx
+++ b/src/content/reference/en/p5.Element/center.mdx
@@ -2,7 +2,7 @@
title: center
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: >
Centers the element either vertically, horizontally, or both. Attaches the element as a child of another element. Adds a
class attribute
to the element using a given string. Calls a function when the mouse is pressed twice over the element. Calls a function when a file is dragged off the element. Calling Calls a function when a file is dragged over the element. Calling Makes the element draggable. Calls a function when the user drops a file on the element. The element's underlying The
- HTMLElement
object's properties and methods can be used directly. Checks if a class is already applied to element. A Hides the current element. Sets the inner HTML of the element, replacing any existing HTML. Sets the element's ID using a given string. Calls a function when the mouse is pressed and released over the
element. Calls a function when the mouse moves over the element. Calling Calls a function when the mouse moves off the element. Calling Calls a function when the mouse moves onto the element. Calling Calls a function when the mouse is pressed over the element. Calls a function when the mouse is released over the element. Calls a function when the mouse wheel scrolls over the element. Attaches the element to a parent element. Sets the element's position. Removes the element, stops all audio/video streams, and removes all
callback functions. Removes an attribute from the element. Removes a class from the element. Shows the current element. Sets the element's width and height. Applies a style to the element by adding a
- CSS declaration. The first parameter, Toggles whether a class is applied to the element. Calls a function when the user stops touching the element. Calling Calls a function when the user touches the element and moves. Calling Calls a function when the element is touched. Returns or sets the element's value. A Add a value to the p5.Oscillator's output amplitude,
and return the oscillator. Calling this method
diff --git a/src/content/reference/en/p5.Envelope/attackLevel.mdx b/src/content/reference/en/p5.Envelope/attackLevel.mdx
index 37bd168257..b1d5d704e1 100644
--- a/src/content/reference/en/p5.Envelope/attackLevel.mdx
+++ b/src/content/reference/en/p5.Envelope/attackLevel.mdx
@@ -2,7 +2,7 @@
title: attackLevel
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Level once attack is complete. Time until envelope reaches attackLevel Level after decay. The envelope will sustain here until it is released. Time until envelope reaches decayLevel. Multiply the p5.Envelope's output amplitude
by a fixed value. Calling this method
diff --git a/src/content/reference/en/p5.Envelope/play.mdx b/src/content/reference/en/p5.Envelope/play.mdx
index 2508ca3595..7c0a5c5974 100644
--- a/src/content/reference/en/p5.Envelope/play.mdx
+++ b/src/content/reference/en/p5.Envelope/play.mdx
@@ -2,7 +2,7 @@
title: play
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |-
Play tells the envelope to start acting on a given input.
If the input is a p5.sound object (i.e. AudioIn, Oscillator,
diff --git a/src/content/reference/en/p5.Envelope/ramp.mdx b/src/content/reference/en/p5.Envelope/ramp.mdx
index 2cd9d84f0a..800bf7032c 100644
--- a/src/content/reference/en/p5.Envelope/ramp.mdx
+++ b/src/content/reference/en/p5.Envelope/ramp.mdx
@@ -2,7 +2,7 @@
title: ramp
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Exponentially ramp to a value using the first two
@@ -10,7 +10,7 @@ description: >
href="/reference/p5.Envelope/setADSR/">setADSR(attackTime,
decayTime).impulses
Array is reset to save memory. A new .impulses
diff --git a/src/content/reference/en/p5.Convolver/toggleImpulse.mdx b/src/content/reference/en/p5.Convolver/toggleImpulse.mdx
index 2b04cddcf1..9f0060600e 100644
--- a/src/content/reference/en/p5.Convolver/toggleImpulse.mdx
+++ b/src/content/reference/en/p5.Convolver/toggleImpulse.mdx
@@ -2,7 +2,7 @@
title: toggleImpulse
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
.addImpulse() to add multiple impulses
to a p5.Convolver, then you can use this method to toggle between
diff --git a/src/content/reference/en/p5.Delay/amp.mdx b/src/content/reference/en/p5.Delay/amp.mdx
index d3b8d8d760..b6a532f756 100644
--- a/src/content/reference/en/p5.Delay/amp.mdx
+++ b/src/content/reference/en/p5.Delay/amp.mdx
@@ -2,7 +2,7 @@
title: amp
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
myElement.dragLeave(false) disables the function.myElement.dragOver(false) disables the function.event, that's a
DragEvent.HTMLElement object.Number property that stores the element's height.myElement.mouseMoved(false) disables the function.myElement.mouseOut(false) disables the function.myElement.mouseOver(false) disables the function.positionType is a string that can be either
diff --git a/src/content/reference/en/p5.Element/remove.mdx b/src/content/reference/en/p5.Element/remove.mdx
index fae43a25be..538a9d8d9a 100644
--- a/src/content/reference/en/p5.Element/remove.mdx
+++ b/src/content/reference/en/p5.Element/remove.mdx
@@ -2,7 +2,7 @@
title: remove
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: |
property, is a string. If the name of a
diff --git a/src/content/reference/en/p5.Element/toggleClass.mdx b/src/content/reference/en/p5.Element/toggleClass.mdx
index 4b77f5f1c6..2cf252e7d3 100644
--- a/src/content/reference/en/p5.Element/toggleClass.mdx
+++ b/src/content/reference/en/p5.Element/toggleClass.mdx
@@ -2,7 +2,7 @@
title: toggleClass
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: |
myElement.touchMoved(false) disables the function.myElement.touchMoved(false) disables the function.Number property that stores the element's width.
Level at the end of the release.
line: 4796 diff --git a/src/content/reference/en/p5.Envelope/releaseTime.mdx b/src/content/reference/en/p5.Envelope/releaseTime.mdx index 6d044242af..8e61a8fe75 100644 --- a/src/content/reference/en/p5.Envelope/releaseTime.mdx +++ b/src/content/reference/en/p5.Envelope/releaseTime.mdx @@ -2,7 +2,7 @@ title: releaseTime module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Duration of the release portion of the envelope.
line: 4790 diff --git a/src/content/reference/en/p5.Envelope/scale.mdx b/src/content/reference/en/p5.Envelope/scale.mdx index 4a32ec5fe4..b72cc7ab3a 100644 --- a/src/content/reference/en/p5.Envelope/scale.mdx +++ b/src/content/reference/en/p5.Envelope/scale.mdx @@ -2,7 +2,7 @@ title: scale module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Scale this envelope's amplitude values to a given range, and return the envelope. Calling this method diff --git a/src/content/reference/en/p5.Envelope/set.mdx b/src/content/reference/en/p5.Envelope/set.mdx index 2129898428..77ad1b3f48 100644 --- a/src/content/reference/en/p5.Envelope/set.mdx +++ b/src/content/reference/en/p5.Envelope/set.mdx @@ -2,7 +2,7 @@ title: set module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Reset the envelope with a series of time/value pairs.
line: 4833 diff --git a/src/content/reference/en/p5.Envelope/setADSR.mdx b/src/content/reference/en/p5.Envelope/setADSR.mdx index a3501f1210..dafeec3c7e 100644 --- a/src/content/reference/en/p5.Envelope/setADSR.mdx +++ b/src/content/reference/en/p5.Envelope/setADSR.mdx @@ -2,7 +2,7 @@ title: setADSR module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >Set values like a traditional diff --git a/src/content/reference/en/p5.Envelope/setExp.mdx b/src/content/reference/en/p5.Envelope/setExp.mdx index f50244b3a7..e5969d7ceb 100644 --- a/src/content/reference/en/p5.Envelope/setExp.mdx +++ b/src/content/reference/en/p5.Envelope/setExp.mdx @@ -2,7 +2,7 @@ title: setExp module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Set whether the envelope ramp is linear (default) or exponential. Exponential ramps can be useful because we perceive amplitude diff --git a/src/content/reference/en/p5.Envelope/setInput.mdx b/src/content/reference/en/p5.Envelope/setInput.mdx index 4e6cb069ef..8de63f22cf 100644 --- a/src/content/reference/en/p5.Envelope/setInput.mdx +++ b/src/content/reference/en/p5.Envelope/setInput.mdx @@ -2,7 +2,7 @@ title: setInput module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Assign a parameter to be controlled by this envelope. If a p5.Sound object is given, then the p5.Envelope will control its diff --git a/src/content/reference/en/p5.Envelope/setRange.mdx b/src/content/reference/en/p5.Envelope/setRange.mdx index 92f2e5063a..6991f2f4da 100644 --- a/src/content/reference/en/p5.Envelope/setRange.mdx +++ b/src/content/reference/en/p5.Envelope/setRange.mdx @@ -2,7 +2,7 @@ title: setRange module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Set max (attackLevel) and min (releaseLevel) of envelope.
line: 4964 diff --git a/src/content/reference/en/p5.Envelope/triggerAttack.mdx b/src/content/reference/en/p5.Envelope/triggerAttack.mdx index e57eeaef9a..8f8cda944b 100644 --- a/src/content/reference/en/p5.Envelope/triggerAttack.mdx +++ b/src/content/reference/en/p5.Envelope/triggerAttack.mdx @@ -2,7 +2,7 @@ title: triggerAttack module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Trigger the Attack, and Decay portion of the Envelope. Similar to holding down a key on a piano, but it will diff --git a/src/content/reference/en/p5.Envelope/triggerRelease.mdx b/src/content/reference/en/p5.Envelope/triggerRelease.mdx index fec7153918..87fd89fe2d 100644 --- a/src/content/reference/en/p5.Envelope/triggerRelease.mdx +++ b/src/content/reference/en/p5.Envelope/triggerRelease.mdx @@ -2,7 +2,7 @@ title: triggerRelease module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Trigger the Release of the Envelope. This is similar to releasing the key on a piano and letting the sound fade according to the diff --git a/src/content/reference/en/p5.FFT/analyze.mdx b/src/content/reference/en/p5.FFT/analyze.mdx index b9aa276730..407006f934 100644 --- a/src/content/reference/en/p5.FFT/analyze.mdx +++ b/src/content/reference/en/p5.FFT/analyze.mdx @@ -2,7 +2,7 @@ title: analyze module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Returns an array of amplitude values (between 0 and 255) across the frequency spectrum. Length is equal to FFT bins diff --git a/src/content/reference/en/p5.FFT/getCentroid.mdx b/src/content/reference/en/p5.FFT/getCentroid.mdx index 81a4e80260..ce9e7f9ccb 100644 --- a/src/content/reference/en/p5.FFT/getCentroid.mdx +++ b/src/content/reference/en/p5.FFT/getCentroid.mdx @@ -2,10 +2,10 @@ title: getCentroid module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Returns the
-
+
spectral centroid of the input signal.
NOTE: analyze() must be called prior to getCentroid(). Analyze()
tells the FFT to analyze frequency data, and getCentroid() uses
diff --git a/src/content/reference/en/p5.FFT/getEnergy.mdx b/src/content/reference/en/p5.FFT/getEnergy.mdx
index b168d17f54..7368c9f93a 100644
--- a/src/content/reference/en/p5.FFT/getEnergy.mdx
+++ b/src/content/reference/en/p5.FFT/getEnergy.mdx
@@ -2,10 +2,10 @@
title: getEnergy
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Returns the amount of energy (volume) at a specific
-
+
frequency, or the average amount of energy between two
frequencies. Accepts Number(s) corresponding
to frequency (in Hz), or a "string" corresponding to predefined
diff --git a/src/content/reference/en/p5.FFT/getOctaveBands.mdx b/src/content/reference/en/p5.FFT/getOctaveBands.mdx
index 7da5d09924..5bde48ba2d 100644
--- a/src/content/reference/en/p5.FFT/getOctaveBands.mdx
+++ b/src/content/reference/en/p5.FFT/getOctaveBands.mdx
@@ -2,11 +2,11 @@
title: getOctaveBands
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Calculates and Returns the 1/N
- Octave
+ Octave
Bands
N defaults to 3 and minimum central frequency to 15.625Hz.
diff --git a/src/content/reference/en/p5.FFT/linAverages.mdx b/src/content/reference/en/p5.FFT/linAverages.mdx
index bc8cefa018..0a073b9433 100644
--- a/src/content/reference/en/p5.FFT/linAverages.mdx
+++ b/src/content/reference/en/p5.FFT/linAverages.mdx
@@ -2,7 +2,7 @@
title: linAverages
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Returns an array of average amplitude values for a given number
of frequency bands split equally. N defaults to 16.
diff --git a/src/content/reference/en/p5.FFT/logAverages.mdx b/src/content/reference/en/p5.FFT/logAverages.mdx
index 3e3a5afc17..28f4fb407c 100644
--- a/src/content/reference/en/p5.FFT/logAverages.mdx
+++ b/src/content/reference/en/p5.FFT/logAverages.mdx
@@ -2,10 +2,10 @@
title: logAverages
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Returns an array of average amplitude values of the spectrum, for a given
- set of
+ set of
Octave Bands
NOTE: analyze() must be called prior to logAverages(). Analyze()
tells the FFT to analyze frequency data, and logAverages() uses
diff --git a/src/content/reference/en/p5.FFT/setInput.mdx b/src/content/reference/en/p5.FFT/setInput.mdx
index f32249dc47..433cf00c98 100644
--- a/src/content/reference/en/p5.FFT/setInput.mdx
+++ b/src/content/reference/en/p5.FFT/setInput.mdx
@@ -2,7 +2,7 @@
title: setInput
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set the input source for the FFT analysis. If no source is
provided, FFT will analyze all sound in the sketch. Smooth FFT analysis by averaging with the last analysis frame. Returns an array of amplitude values (between -1.0 and +1.0) that represent
a snapshot of amplitude readings in a single buffer. Length will be
diff --git a/src/content/reference/en/p5.File/data.mdx b/src/content/reference/en/p5.File/data.mdx
index 6ca81e4bc3..da2db4a5e0 100644
--- a/src/content/reference/en/p5.File/data.mdx
+++ b/src/content/reference/en/p5.File/data.mdx
@@ -2,7 +2,7 @@
title: data
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: |
A string containing the file's data. Data can be either image data, text contents, or a parsed object in the
diff --git a/src/content/reference/en/p5.File/file.mdx b/src/content/reference/en/p5.File/file.mdx
index bd75e85276..6c8e138f66 100644
--- a/src/content/reference/en/p5.File/file.mdx
+++ b/src/content/reference/en/p5.File/file.mdx
@@ -2,11 +2,11 @@
title: file
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: >
Underlying
- File
object. All The file name as a string. The number of bytes in the file. The file subtype as a string. For example, a file with an The file
MIME type
as a string. The p5.Filter is built with a
diff --git a/src/content/reference/en/p5.Filter/freq.mdx b/src/content/reference/en/p5.Filter/freq.mdx
index bba672d1cc..a8d0fee33c 100644
--- a/src/content/reference/en/p5.Filter/freq.mdx
+++ b/src/content/reference/en/p5.Filter/freq.mdx
@@ -2,7 +2,7 @@
title: freq
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set the filter frequency, in Hz, from 10 to 22050 (the range of
human hearing, although in reality most people hear in a narrower
diff --git a/src/content/reference/en/p5.Filter/gain.mdx b/src/content/reference/en/p5.Filter/gain.mdx
index 459e511992..e41d5d1d09 100644
--- a/src/content/reference/en/p5.Filter/gain.mdx
+++ b/src/content/reference/en/p5.Filter/gain.mdx
@@ -2,7 +2,7 @@
title: gain
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Controls the gain attribute of a Biquad Filter.
This is distinctly different from .amp() which is inherited from p5.Effect
diff --git a/src/content/reference/en/p5.Filter/process.mdx b/src/content/reference/en/p5.Filter/process.mdx
index e75781351a..b9d62f0378 100644
--- a/src/content/reference/en/p5.Filter/process.mdx
+++ b/src/content/reference/en/p5.Filter/process.mdx
@@ -2,7 +2,7 @@
title: process
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Filter an audio signal according to a set
of filter parameters. Controls either width of a bandpass frequency,
or the resonance of a low/highpass cutoff frequency. Set the frequency and the resonance of the filter. Set the type of a p5.Filter. Possible types include:
"lowpass" (default), "highpass", "bandpass",
diff --git a/src/content/reference/en/p5.Filter/toggle.mdx b/src/content/reference/en/p5.Filter/toggle.mdx
index aaf6f80430..3d98828956 100644
--- a/src/content/reference/en/p5.Filter/toggle.mdx
+++ b/src/content/reference/en/p5.Filter/toggle.mdx
@@ -2,7 +2,7 @@
title: toggle
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Toggle function. Switches between the specified type and allpass The font's underlying
opentype.js
diff --git a/src/content/reference/en/p5.Font/textBounds.mdx b/src/content/reference/en/p5.Font/textBounds.mdx
index 5a4f7916e7..ae74631b7b 100644
--- a/src/content/reference/en/p5.Font/textBounds.mdx
+++ b/src/content/reference/en/p5.Font/textBounds.mdx
@@ -2,7 +2,7 @@
title: textBounds
module: Typography
submodule: Loading & Displaying
-file: src/typography/p5.Font.js
+file: src\typography\p5.Font.js
description: >
Returns the bounding box for a string of text written using the font. Returns an array of points outlining a string of text written using the
diff --git a/src/content/reference/en/p5.Framebuffer/autoSized.mdx b/src/content/reference/en/p5.Framebuffer/autoSized.mdx
index ccd867039f..4f65a649c7 100644
--- a/src/content/reference/en/p5.Framebuffer/autoSized.mdx
+++ b/src/content/reference/en/p5.Framebuffer/autoSized.mdx
@@ -2,7 +2,7 @@
title: autoSized
module: Rendering
submodule: ''
-file: src/webgl/p5.Framebuffer.js
+file: src\webgl\p5.Framebuffer.js
description: >
Toggles the framebuffer's autosizing mode or returns the current mode. Begins drawing shapes to the framebuffer. An object that stores the framebuffer's color data. Each framebuffer uses a
- WebGLTexture
object internally to store its color data. The Creates a new
diff --git a/src/content/reference/en/p5.Framebuffer/depth.mdx b/src/content/reference/en/p5.Framebuffer/depth.mdx
index b21195d5d4..a83c48e3b6 100644
--- a/src/content/reference/en/p5.Framebuffer/depth.mdx
+++ b/src/content/reference/en/p5.Framebuffer/depth.mdx
@@ -2,13 +2,13 @@
title: depth
module: Rendering
submodule: ''
-file: src/webgl/p5.Framebuffer.js
+file: src\webgl\p5.Framebuffer.js
description: >
An object that stores the framebuffer's depth data. Each framebuffer uses a
- WebGLTexture
object internally to store its depth data. The Draws to the framebuffer by calling a function that contains drawing
diff --git a/src/content/reference/en/p5.Framebuffer/end.mdx b/src/content/reference/en/p5.Framebuffer/end.mdx
index d1d41ed2ab..1f05f1079a 100644
--- a/src/content/reference/en/p5.Framebuffer/end.mdx
+++ b/src/content/reference/en/p5.Framebuffer/end.mdx
@@ -2,7 +2,7 @@
title: end
module: Rendering
submodule: ''
-file: src/webgl/p5.Framebuffer.js
+file: src\webgl\p5.Framebuffer.js
description: >
Stops drawing shapes to the framebuffer. Gets a pixel or a region of pixels from the framebuffer. Loads the current value of each pixel in the framebuffer into its
diff --git a/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx b/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx
index ba7e157d6a..ea226e854f 100644
--- a/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx
+++ b/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx
@@ -2,7 +2,7 @@
title: pixelDensity
module: Rendering
submodule: ''
-file: src/webgl/p5.Framebuffer.js
+file: src\webgl\p5.Framebuffer.js
description: >
Sets the framebuffer's pixel density or returns its current density. An array containing the color of each pixel in the framebuffer. Deletes the framebuffer from GPU memory. Resizes the framebuffer to a given width and height. Updates the framebuffer with the RGBA values in the
diff --git a/src/content/reference/en/p5.Gain/amp.mdx b/src/content/reference/en/p5.Gain/amp.mdx
index d12a40eaf6..70177fd89a 100644
--- a/src/content/reference/en/p5.Gain/amp.mdx
+++ b/src/content/reference/en/p5.Gain/amp.mdx
@@ -2,7 +2,7 @@
title: amp
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set the output level of the gain node. Send output to a p5.sound or web audio object Disconnect all output. Connect a source to the gain node. Calculates the position and size of the smallest box that contains the
geometry. Removes the geometry’s internal colors. Computes the geometry's faces using its vertices. Calculates the normal vector for each vertex on the geometry. An array that lists which of the geometry's vertices form each of its
diff --git a/src/content/reference/en/p5.Geometry/flipU.mdx b/src/content/reference/en/p5.Geometry/flipU.mdx
index 6e50573681..208b70c17c 100644
--- a/src/content/reference/en/p5.Geometry/flipU.mdx
+++ b/src/content/reference/en/p5.Geometry/flipU.mdx
@@ -2,7 +2,7 @@
title: flipU
module: Shape
submodule: 3D Primitives
-file: src/webgl/p5.Geometry.js
+file: src\webgl\p5.Geometry.js
description: >
Flips the geometry’s texture u-coordinates. Flips the geometry’s texture v-coordinates. Transforms the geometry's vertices to fit snugly within a 100×100×100 box
diff --git a/src/content/reference/en/p5.Geometry/saveObj.mdx b/src/content/reference/en/p5.Geometry/saveObj.mdx
index fbb1b4185c..94123f3675 100644
--- a/src/content/reference/en/p5.Geometry/saveObj.mdx
+++ b/src/content/reference/en/p5.Geometry/saveObj.mdx
@@ -2,7 +2,7 @@
title: saveObj
module: Shape
submodule: 3D Primitives
-file: src/webgl/p5.Geometry.js
+file: src\webgl\p5.Geometry.js
description: >
The The An array that lists the texture coordinates for each of the geometry's
diff --git a/src/content/reference/en/p5.Geometry/vertexNormals.mdx b/src/content/reference/en/p5.Geometry/vertexNormals.mdx
index 827b65ef37..de897b22fe 100644
--- a/src/content/reference/en/p5.Geometry/vertexNormals.mdx
+++ b/src/content/reference/en/p5.Geometry/vertexNormals.mdx
@@ -2,7 +2,7 @@
title: vertexNormals
module: Shape
submodule: 3D Primitives
-file: src/webgl/p5.Geometry.js
+file: src\webgl\p5.Geometry.js
description: >
An array with the vectors that are normal to the geometry's vertices. An array with the geometry's vertices. Creates a new p5.Framebuffer
object with
diff --git a/src/content/reference/en/p5.Graphics/remove.mdx b/src/content/reference/en/p5.Graphics/remove.mdx
index 4b4f7d5be4..3568aca810 100644
--- a/src/content/reference/en/p5.Graphics/remove.mdx
+++ b/src/content/reference/en/p5.Graphics/remove.mdx
@@ -2,7 +2,7 @@
title: remove
module: Rendering
submodule: Rendering
-file: src/core/p5.Graphics.js
+file: src\core\p5.Graphics.js
description: >
Removes the graphics buffer from the web page. Resets the graphics buffer's transformations and lighting. Copies a region of pixels from another image into this one. Copies pixels from a source image to this image. Changes the delay between frames in an animated GIF. Applies an image filter to the image. The preset options are: Gets a pixel or a region of pixels from the image. Gets the index of the current frame in an animated GIF. The image's height in pixels. Loads the current value of each pixel in the image into the
Masks part of the image with another. Returns the number of frames in an animated GIF. Pauses an animated GIF. The GIF can be resumed by calling
diff --git a/src/content/reference/en/p5.Image/pixelDensity.mdx b/src/content/reference/en/p5.Image/pixelDensity.mdx
index 4d4dec5025..31d7592e7b 100644
--- a/src/content/reference/en/p5.Image/pixelDensity.mdx
+++ b/src/content/reference/en/p5.Image/pixelDensity.mdx
@@ -2,7 +2,7 @@
title: pixelDensity
module: Image
submodule: Image
-file: src/image/p5.Image.js
+file: src\image\p5.Image.js
description: |
Gets or sets the pixel density for high pixel density displays. By default, the density will be set to 1. An array containing the color of each pixel in the image. Plays an animated GIF that was paused with
img.pause(). Restarts an animated GIF at its first frame. Resizes the image to a given width and height. Saves the image to a file. Sets the color of one or more pixels within an image. Sets the current frame in an animated GIF. Updates the canvas with the RGBA values in the
diff --git a/src/content/reference/en/p5.Image/width.mdx b/src/content/reference/en/p5.Image/width.mdx
index 7c193d9a1e..599fa7dfe2 100644
--- a/src/content/reference/en/p5.Image/width.mdx
+++ b/src/content/reference/en/p5.Image/width.mdx
@@ -2,7 +2,7 @@
title: width
module: Image
submodule: Image
-file: src/image/p5.Image.js
+file: src\image\p5.Image.js
description: |
The image's width in pixels. Schedules a function to call when the audio/video reaches a specific time
diff --git a/src/content/reference/en/p5.MediaElement/autoplay.mdx b/src/content/reference/en/p5.MediaElement/autoplay.mdx
index 39aec8d0b3..e5943643e5 100644
--- a/src/content/reference/en/p5.MediaElement/autoplay.mdx
+++ b/src/content/reference/en/p5.MediaElement/autoplay.mdx
@@ -2,7 +2,7 @@
title: autoplay
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: >
Sets the audio/video to play once it's loaded. Removes all functions scheduled with Sends the element's audio to an output. Disconnect all Web Audio routing, including to the main output. This is useful if you want to re-route the output through audio effects,
diff --git a/src/content/reference/en/p5.MediaElement/duration.mdx b/src/content/reference/en/p5.MediaElement/duration.mdx
index 8321bf3f45..844981737f 100644
--- a/src/content/reference/en/p5.MediaElement/duration.mdx
+++ b/src/content/reference/en/p5.MediaElement/duration.mdx
@@ -2,7 +2,7 @@
title: duration
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: |
Returns the audio/video's duration in seconds. Hide the default
- HTMLMediaElement
controls. Plays the audio/video repeatedly in a loop. Stops the audio/video from playing in a loop. The media will stop when it finishes playing. Calls a function when the audio/video reaches the end of its playback. The element is passed as an argument to the callback function. Pauses a media element. Plays audio or video from a media element. Removes a callback based on its ID. Show the default
- HTMLMediaElement
controls. Sets the audio/video playback speed. Path to the media element's source as a string. Stops a media element and sets its current time to 0. Sets the media element's playback time. Sets the audio/video volume. MonoSynth amp Getters and Setters Connect to a p5.sound / Web Audio object. Disconnect all outputs Get rid of the MonoSynth and free up its resources / memory. Play tells the MonoSynth to start playing a note. This method schedules
the calling of .triggerAttack and .triggerRelease. Set values like a traditional
diff --git a/src/content/reference/en/p5.MonoSynth/sustain.mdx b/src/content/reference/en/p5.MonoSynth/sustain.mdx
index 33f641aa6a..58dae407d9 100644
--- a/src/content/reference/en/p5.MonoSynth/sustain.mdx
+++ b/src/content/reference/en/p5.MonoSynth/sustain.mdx
@@ -2,7 +2,7 @@
title: sustain
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: ''
line: 11333
isConstructor: false
diff --git a/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx b/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx
index 15e1de3148..b02705b75a 100644
--- a/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx
+++ b/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx
@@ -2,7 +2,7 @@
title: triggerAttack
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Trigger the Attack, and Decay portion of the Envelope.
Similar to holding down a key on a piano, but it will
diff --git a/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx b/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx
index 0ebf6b2afb..e1fb7d7492 100644
--- a/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx
+++ b/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx
@@ -2,7 +2,7 @@
title: triggerRelease
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Trigger the release of the Envelope. This is similar to releasing
the key on a piano and letting the sound fade according to the
diff --git a/src/content/reference/en/p5.Noise/setType.mdx b/src/content/reference/en/p5.Noise/setType.mdx
index d7e92a0843..0f986ea72a 100644
--- a/src/content/reference/en/p5.Noise/setType.mdx
+++ b/src/content/reference/en/p5.Noise/setType.mdx
@@ -2,7 +2,7 @@
title: setType
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set type of noise to 'white', 'pink' or 'brown'.
White is the default. Add the given number to the value currently stored at the given key.
The sum then replaces the value previously stored in the Dictionary. Divide the given number with the value currently stored at the given key.
The quotient then replaces the value previously stored in the Dictionary. Return the highest key currently used in the Dictionary. Return the highest number currently stored in the Dictionary. Return the lowest key currently used in the Dictionary. Return the lowest number currently stored in the Dictionary. Multiply the given number with the value currently stored at the given key.
The product then replaces the value previously stored in the Dictionary. Subtract the given number from the value currently stored at the given key.
diff --git a/src/content/reference/en/p5.Oscillator/add.mdx b/src/content/reference/en/p5.Oscillator/add.mdx
index 113a96816c..db921d627c 100644
--- a/src/content/reference/en/p5.Oscillator/add.mdx
+++ b/src/content/reference/en/p5.Oscillator/add.mdx
@@ -2,7 +2,7 @@
title: add
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Add a value to the p5.Oscillator's output amplitude,
and return the oscillator. Calling this method again
diff --git a/src/content/reference/en/p5.Oscillator/amp.mdx b/src/content/reference/en/p5.Oscillator/amp.mdx
index 5bbfb45878..f8b6d1dd99 100644
--- a/src/content/reference/en/p5.Oscillator/amp.mdx
+++ b/src/content/reference/en/p5.Oscillator/amp.mdx
@@ -2,7 +2,7 @@
title: amp
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set the amplitude between 0 and 1.0. Or, pass in an object
such as an oscillator to modulate amplitude with an audio signal. Connect to a p5.sound / Web Audio object. Disconnect all outputs Set frequency of an oscillator to a value. Or, pass in an object
such as an oscillator to modulate the frequency with an audio signal. Returns the value of output gain Returns the value of frequency of oscillator Returns the current value of panPosition , between Left (-1) and Right
(1) Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' or
'square'. Multiply the p5.Oscillator's output amplitude
by a fixed value (i.e. turn it up!). Calling this method
diff --git a/src/content/reference/en/p5.Oscillator/pan.mdx b/src/content/reference/en/p5.Oscillator/pan.mdx
index 87d7d09d41..347ac33170 100644
--- a/src/content/reference/en/p5.Oscillator/pan.mdx
+++ b/src/content/reference/en/p5.Oscillator/pan.mdx
@@ -2,7 +2,7 @@
title: pan
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Pan between Left (-1) and Right (1) Set the phase of an oscillator between 0.0 and 1.0.
In this implementation, phase is a delay time
diff --git a/src/content/reference/en/p5.Oscillator/scale.mdx b/src/content/reference/en/p5.Oscillator/scale.mdx
index 9817841043..f6b79dba2c 100644
--- a/src/content/reference/en/p5.Oscillator/scale.mdx
+++ b/src/content/reference/en/p5.Oscillator/scale.mdx
@@ -2,7 +2,7 @@
title: scale
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Scale this oscillator's amplitude values to a given
range, and return the oscillator. Calling this method
diff --git a/src/content/reference/en/p5.Oscillator/setType.mdx b/src/content/reference/en/p5.Oscillator/setType.mdx
index 32766a2eb5..9c6ac98c11 100644
--- a/src/content/reference/en/p5.Oscillator/setType.mdx
+++ b/src/content/reference/en/p5.Oscillator/setType.mdx
@@ -2,7 +2,7 @@
title: setType
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set type to 'sine', 'triangle', 'sawtooth' or 'square'. Start an oscillator. Starting an oscillator on a user gesture will enable audio in browsers
diff --git a/src/content/reference/en/p5.Oscillator/stop.mdx b/src/content/reference/en/p5.Oscillator/stop.mdx
index 9b9d0631ba..748fb17687 100644
--- a/src/content/reference/en/p5.Oscillator/stop.mdx
+++ b/src/content/reference/en/p5.Oscillator/stop.mdx
@@ -2,7 +2,7 @@
title: stop
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Stop an oscillator. Accepts an optional parameter
to determine how long (in seconds from now) until the
diff --git a/src/content/reference/en/p5.Panner3D/maxDist.mdx b/src/content/reference/en/p5.Panner3D/maxDist.mdx
index bab86d00eb..8805da28cc 100644
--- a/src/content/reference/en/p5.Panner3D/maxDist.mdx
+++ b/src/content/reference/en/p5.Panner3D/maxDist.mdx
@@ -2,7 +2,7 @@
title: maxDist
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Maxium distance between the source and the listener Set the X,Y,Z position of the Panner Getter and setter methods for orient coordinates Getter and setter methods for orient coordinates Getter and setter methods for orient coordinates
+ href="https://developer.mozilla.org/en-US/docs/Web/API/PannerNode">
Web Audio Spatial Panner Node Getter and setter methods for position coordinates Getter and setter methods for position coordinates Getter and setter methods for position coordinates Connect an audio sorce How quickly the volume is reduced as the source moves away from the
listener Set the X,Y,Z position of the Panner Set the rolloff factor and max distance Add a p5.Phrase to this Part. Returns the tempo, in Beats Per Minute, of this part. Get a phrase from this part, based on the name it was
given when it was created. Now you can modify its array. Loop playback of this part. It will begin
looping through all of its phrases at a speed
diff --git a/src/content/reference/en/p5.Part/noLoop.mdx b/src/content/reference/en/p5.Part/noLoop.mdx
index 9ffeb7fe63..ac031fd51d 100644
--- a/src/content/reference/en/p5.Part/noLoop.mdx
+++ b/src/content/reference/en/p5.Part/noLoop.mdx
@@ -2,7 +2,7 @@
title: noLoop
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Tell the part to stop looping. Set the function that will be called at every step. This will clear the
previous function. Pause the part. Playback will resume
from the current step. Remove a phrase from this part, based on the name it was
given when it was created. Find all sequences with the specified name, and replace their patterns with
the specified array. Set the tempo of this part, in Beats Per Minute. Start playback of this part. It will play
through all of its phrases at a speed
diff --git a/src/content/reference/en/p5.Part/stop.mdx b/src/content/reference/en/p5.Part/stop.mdx
index 04f9503c17..f89bcc287f 100644
--- a/src/content/reference/en/p5.Part/stop.mdx
+++ b/src/content/reference/en/p5.Part/stop.mdx
@@ -2,7 +2,7 @@
title: stop
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Stop the part and cue it to step 0. Playback will resume from the begining
of the Part when it is played again. isDetected is set to true when a peak is detected. onPeak accepts two arguments: a function to call when
a peak is detected. The value of the peak,
diff --git a/src/content/reference/en/p5.PeakDetect/update.mdx b/src/content/reference/en/p5.PeakDetect/update.mdx
index 67a223a87e..65becd5e68 100644
--- a/src/content/reference/en/p5.PeakDetect/update.mdx
+++ b/src/content/reference/en/p5.PeakDetect/update.mdx
@@ -2,7 +2,7 @@
title: update
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
The update method is run in the draw loop. Accepts an FFT object. You must call .analyze()
diff --git a/src/content/reference/en/p5.Phrase/sequence.mdx b/src/content/reference/en/p5.Phrase/sequence.mdx
index 392280b61b..8f6fb83428 100644
--- a/src/content/reference/en/p5.Phrase/sequence.mdx
+++ b/src/content/reference/en/p5.Phrase/sequence.mdx
@@ -2,7 +2,7 @@
title: sequence
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Array of values to pass into the callback
at each step of the phrase. Depending on the callback
diff --git a/src/content/reference/en/p5.PolySynth/AudioVoice.mdx b/src/content/reference/en/p5.PolySynth/AudioVoice.mdx
index 654db15319..575c15eb75 100644
--- a/src/content/reference/en/p5.PolySynth/AudioVoice.mdx
+++ b/src/content/reference/en/p5.PolySynth/AudioVoice.mdx
@@ -2,7 +2,7 @@
title: AudioVoice
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Monosynth that generates the sound for each note that is triggered. The
p5.PolySynth defaults to using the p5.MonoSynth as its voice. Connect to a p5.sound / Web Audio object. Disconnect all outputs Get rid of the MonoSynth and free up its resources / memory. noteADSR sets the envelope for a specific note that has just been
triggered.
diff --git a/src/content/reference/en/p5.PolySynth/noteAttack.mdx b/src/content/reference/en/p5.PolySynth/noteAttack.mdx
index 36bc00bb4b..0007a8fa61 100644
--- a/src/content/reference/en/p5.PolySynth/noteAttack.mdx
+++ b/src/content/reference/en/p5.PolySynth/noteAttack.mdx
@@ -2,7 +2,7 @@
title: noteAttack
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Trigger the Attack, and Decay portion of a MonoSynth.
Similar to holding down a key on a piano, but it will
diff --git a/src/content/reference/en/p5.PolySynth/noteRelease.mdx b/src/content/reference/en/p5.PolySynth/noteRelease.mdx
index f57fbcd8d5..0212e55d0a 100644
--- a/src/content/reference/en/p5.PolySynth/noteRelease.mdx
+++ b/src/content/reference/en/p5.PolySynth/noteRelease.mdx
@@ -2,7 +2,7 @@
title: noteRelease
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Trigger the Release of an AudioVoice note. This is similar to releasing
the key on a piano and letting the sound fade according to the
diff --git a/src/content/reference/en/p5.PolySynth/notes.mdx b/src/content/reference/en/p5.PolySynth/notes.mdx
index e7caea9fe7..3a7658ae43 100644
--- a/src/content/reference/en/p5.PolySynth/notes.mdx
+++ b/src/content/reference/en/p5.PolySynth/notes.mdx
@@ -2,7 +2,7 @@
title: notes
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
An object that holds information about which notes have been played and
which notes are currently being played. New notes are added as keys
diff --git a/src/content/reference/en/p5.PolySynth/play.mdx b/src/content/reference/en/p5.PolySynth/play.mdx
index 5de9536788..2afc9d6638 100644
--- a/src/content/reference/en/p5.PolySynth/play.mdx
+++ b/src/content/reference/en/p5.PolySynth/play.mdx
@@ -2,7 +2,7 @@
title: play
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Play a note by triggering noteAttack and noteRelease with sustain time A PolySynth must have at least 1 voice, defaults to 8 Set the PolySynths global envelope. This method modifies the envelopes of
each
diff --git a/src/content/reference/en/p5.PrintWriter/clear.mdx b/src/content/reference/en/p5.PrintWriter/clear.mdx
index 7f5904b4d9..d7783b7aab 100644
--- a/src/content/reference/en/p5.PrintWriter/clear.mdx
+++ b/src/content/reference/en/p5.PrintWriter/clear.mdx
@@ -2,7 +2,7 @@
title: clear
module: IO
submodule: Output
-file: src/io/files.js
+file: src\io\files.js
description: |
Clears all data from the print stream. Saves the file and closes the print stream. Writes data to the print stream with new lines added. Writes data to the print stream without adding new lines. Set the width of a Pulse object (an oscillator that implements
Pulse Width Modulation). Set the output level of the reverb effect. Send output to a p5.sound or web audio object Disconnect all output. Connect a source to the reverb, and assign reverb parameters. Set the reverb settings. Similar to .process(), but without
assigning a new input. Loop playback of the score. Stop looping playback of the score. If it
is currently playing, this will go into effect
diff --git a/src/content/reference/en/p5.Score/pause.mdx b/src/content/reference/en/p5.Score/pause.mdx
index f5e26c836a..9425e41692 100644
--- a/src/content/reference/en/p5.Score/pause.mdx
+++ b/src/content/reference/en/p5.Score/pause.mdx
@@ -2,7 +2,7 @@
title: pause
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Pause playback of the score. Set the tempo for all parts in the score Start playback of the score. Stop playback of the score. Copies the shader from one drawing context to another. Logs the hooks available in this shader, and their current
implementation. Returns a new shader, based on the original, but with custom snippets
diff --git a/src/content/reference/en/p5.Shader/setUniform.mdx b/src/content/reference/en/p5.Shader/setUniform.mdx
index b0dd26032e..b6e2b35634 100644
--- a/src/content/reference/en/p5.Shader/setUniform.mdx
+++ b/src/content/reference/en/p5.Shader/setUniform.mdx
@@ -2,7 +2,7 @@
title: setUniform
module: 3D
submodule: Material
-file: src/webgl/p5.Shader.js
+file: src\webgl\p5.Shader.js
description: >
Sets the shader’s uniform (global) variables. Schedule events to trigger every time a MediaElement
(audio/video) reaches a playback cue point. Return the number of channels in a sound file.
For example, Mono = 1, Stereo = 2. Remove all of the callbacks that had originally been scheduled
via the addCue method. Connects the output of a p5sound object to input of another
p5.sound object. For example, you may connect a p5.SoundFile to an
diff --git a/src/content/reference/en/p5.SoundFile/currentTime.mdx b/src/content/reference/en/p5.SoundFile/currentTime.mdx
index 422cd52ba3..98eb3e199c 100644
--- a/src/content/reference/en/p5.SoundFile/currentTime.mdx
+++ b/src/content/reference/en/p5.SoundFile/currentTime.mdx
@@ -2,7 +2,7 @@
title: currentTime
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Return the current position of the p5.SoundFile playhead, in seconds.
diff --git a/src/content/reference/en/p5.SoundFile/disconnect.mdx b/src/content/reference/en/p5.SoundFile/disconnect.mdx
index 4cdecb2ed3..d9b0269d04 100644
--- a/src/content/reference/en/p5.SoundFile/disconnect.mdx
+++ b/src/content/reference/en/p5.SoundFile/disconnect.mdx
@@ -2,7 +2,7 @@
title: disconnect
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Disconnects the output of this p5sound object. Returns the duration of a sound file in seconds. Return the number of samples in a sound file.
Equal to sampleRate * duration. This method is useful for sending a SoundFile to a server. It returns the
.wav-encoded audio data as a "Blob".
+ MDN" href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">Blob Returns the current stereo pan position (-1.0 to 1.0) Returns an array of amplitude peaks in a p5.SoundFile that can be
used to draw a static waveform. Scans through the p5.SoundFile's
diff --git a/src/content/reference/en/p5.SoundFile/isLoaded.mdx b/src/content/reference/en/p5.SoundFile/isLoaded.mdx
index 3199e284c5..3ac3b4f566 100644
--- a/src/content/reference/en/p5.SoundFile/isLoaded.mdx
+++ b/src/content/reference/en/p5.SoundFile/isLoaded.mdx
@@ -2,7 +2,7 @@
title: isLoaded
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Returns true if the sound file finished loading successfully. Returns 'true' if a p5.SoundFile is currently looping and playing, 'false'
if not. Returns true if a p5.SoundFile is paused, false if not (i.e.
playing or stopped). Returns true if a p5.SoundFile is playing, false if not (i.e.
paused or stopped). Move the playhead of a soundfile that is currently playing to a
diff --git a/src/content/reference/en/p5.SoundFile/loop.mdx b/src/content/reference/en/p5.SoundFile/loop.mdx
index 5874de795c..c0f9e015c7 100644
--- a/src/content/reference/en/p5.SoundFile/loop.mdx
+++ b/src/content/reference/en/p5.SoundFile/loop.mdx
@@ -2,7 +2,7 @@
title: loop
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Loop the p5.SoundFile. Accepts optional parameters to set the
playback rate, playback volume, loopStart, loopEnd. Schedule an event to be called when the soundfile
reaches the end of a buffer. If the soundfile is
diff --git a/src/content/reference/en/p5.SoundFile/pan.mdx b/src/content/reference/en/p5.SoundFile/pan.mdx
index ec7978f08c..36cd244b24 100644
--- a/src/content/reference/en/p5.SoundFile/pan.mdx
+++ b/src/content/reference/en/p5.SoundFile/pan.mdx
@@ -2,7 +2,7 @@
title: pan
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set the stereo panning of a p5.sound object to
a floating point number between -1.0 (left) and 1.0 (right).
diff --git a/src/content/reference/en/p5.SoundFile/pause.mdx b/src/content/reference/en/p5.SoundFile/pause.mdx
index ab9fa5f577..38fcf202c4 100644
--- a/src/content/reference/en/p5.SoundFile/pause.mdx
+++ b/src/content/reference/en/p5.SoundFile/pause.mdx
@@ -2,7 +2,7 @@
title: pause
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Pauses a file that is currently playing. If the file is not
playing, then nothing will happen. Play the p5.SoundFile p5.SoundFile has two play modes: Set the playback rate of a sound file. Will change the speed and the pitch.
Values less than zero will reverse the audio buffer. Remove a callback based on its ID. The ID is returned by the
addCue method. Reverses the p5.SoundFile's buffer source.
Playback must be handled separately (see example). Return the sample rate of the sound file. Save a p5.SoundFile as a .wav file. The browser will prompt the user
to download the file to their device. To upload a file to a server, see
diff --git a/src/content/reference/en/p5.SoundFile/setBuffer.mdx b/src/content/reference/en/p5.SoundFile/setBuffer.mdx
index 4feaa4e0fa..607596594e 100644
--- a/src/content/reference/en/p5.SoundFile/setBuffer.mdx
+++ b/src/content/reference/en/p5.SoundFile/setBuffer.mdx
@@ -2,7 +2,7 @@
title: setBuffer
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Replace the current Audio Buffer with a new Buffer. Set a p5.SoundFile's looping flag to true or false. If the sound
is currently playing, this change will take effect when it
diff --git a/src/content/reference/en/p5.SoundFile/setPath.mdx b/src/content/reference/en/p5.SoundFile/setPath.mdx
index 77449f49bb..9d9b25c48d 100644
--- a/src/content/reference/en/p5.SoundFile/setPath.mdx
+++ b/src/content/reference/en/p5.SoundFile/setPath.mdx
@@ -2,7 +2,7 @@
title: setPath
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Reset the source for this SoundFile to a
new path (URL). Multiply the output volume (amplitude) of a sound file
between 0.0 (silence) and 1.0 (full volume).
diff --git a/src/content/reference/en/p5.SoundFile/stop.mdx b/src/content/reference/en/p5.SoundFile/stop.mdx
index e7cd522978..4e62d73829 100644
--- a/src/content/reference/en/p5.SoundFile/stop.mdx
+++ b/src/content/reference/en/p5.SoundFile/stop.mdx
@@ -2,7 +2,7 @@
title: stop
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Stop soundfile playback. Getters and Setters, setting any parameter will result in a change in the
clock's
diff --git a/src/content/reference/en/p5.SoundLoop/interval.mdx b/src/content/reference/en/p5.SoundLoop/interval.mdx
index 8050d46206..9f77ea960b 100644
--- a/src/content/reference/en/p5.SoundLoop/interval.mdx
+++ b/src/content/reference/en/p5.SoundLoop/interval.mdx
@@ -2,7 +2,7 @@
title: interval
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
length of the loops interval how many times the callback has been called so far Set a limit to the number of loops to play. defaults to Infinity musicalTimeMode uses Tone.Time convention
+ href="https://github.com/Tonejs/Tone.js/wiki/Time">Tone.Time convention
true if string, false if number Pause the loop Start the loop Stop the loop Synchronize loops. Use this method to start two or more loops in
synchronization
diff --git a/src/content/reference/en/p5.SoundLoop/timeSignature.mdx b/src/content/reference/en/p5.SoundLoop/timeSignature.mdx
index 1c5b2283d3..e4ddfb9860 100644
--- a/src/content/reference/en/p5.SoundLoop/timeSignature.mdx
+++ b/src/content/reference/en/p5.SoundLoop/timeSignature.mdx
@@ -2,7 +2,7 @@
title: timeSignature
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
number of quarter notes in a measure (defaults to 4) Start recording. To access the recording, provide
a p5.SoundFile as the first parameter. The p5.SoundRecorder
diff --git a/src/content/reference/en/p5.SoundRecorder/setInput.mdx b/src/content/reference/en/p5.SoundRecorder/setInput.mdx
index f8c54a3d63..ee584bf20f 100644
--- a/src/content/reference/en/p5.SoundRecorder/setInput.mdx
+++ b/src/content/reference/en/p5.SoundRecorder/setInput.mdx
@@ -2,7 +2,7 @@
title: setInput
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Connect a specific device to the p5.SoundRecorder.
If no parameter is given, p5.SoundRecorer will record
diff --git a/src/content/reference/en/p5.SoundRecorder/stop.mdx b/src/content/reference/en/p5.SoundRecorder/stop.mdx
index 3e7f8e25b1..4dc1b28e73 100644
--- a/src/content/reference/en/p5.SoundRecorder/stop.mdx
+++ b/src/content/reference/en/p5.SoundRecorder/stop.mdx
@@ -2,7 +2,7 @@
title: stop
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Stop the recording. Once the recording is stopped,
the results will be sent to the p5.SoundFile that
diff --git a/src/content/reference/en/p5.Table/addColumn.mdx b/src/content/reference/en/p5.Table/addColumn.mdx
index b296ccb6af..ffde8e3389 100644
--- a/src/content/reference/en/p5.Table/addColumn.mdx
+++ b/src/content/reference/en/p5.Table/addColumn.mdx
@@ -2,7 +2,7 @@
title: addColumn
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: >
Use addColumn() to add a new column
to a Table object.
diff --git a/src/content/reference/en/p5.Table/addRow.mdx b/src/content/reference/en/p5.Table/addRow.mdx
index b04b28dd5a..2436b6a7ff 100644
--- a/src/content/reference/en/p5.Table/addRow.mdx
+++ b/src/content/reference/en/p5.Table/addRow.mdx
@@ -2,7 +2,7 @@
title: addRow
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: >
Use addRow() to add a new row of data
to a p5.Table object. By default,
diff --git a/src/content/reference/en/p5.Table/clearRows.mdx b/src/content/reference/en/p5.Table/clearRows.mdx
index 7e1fd8f5a3..0674f39cd1 100644
--- a/src/content/reference/en/p5.Table/clearRows.mdx
+++ b/src/content/reference/en/p5.Table/clearRows.mdx
@@ -2,7 +2,7 @@
title: clearRows
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Removes all rows from a Table. While all rows are removed,
columns and column titles are maintained. An array containing the names of the columns in the table, if the "header"
the table is
diff --git a/src/content/reference/en/p5.Table/findRow.mdx b/src/content/reference/en/p5.Table/findRow.mdx
index 83bd28757c..6fdf31052c 100644
--- a/src/content/reference/en/p5.Table/findRow.mdx
+++ b/src/content/reference/en/p5.Table/findRow.mdx
@@ -2,7 +2,7 @@
title: findRow
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Finds the first row in the Table that contains the value
provided, and returns a reference to that row. Even if
diff --git a/src/content/reference/en/p5.Table/findRows.mdx b/src/content/reference/en/p5.Table/findRows.mdx
index c62f250adb..59750173bf 100644
--- a/src/content/reference/en/p5.Table/findRows.mdx
+++ b/src/content/reference/en/p5.Table/findRows.mdx
@@ -2,7 +2,7 @@
title: findRows
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Finds the rows in the Table that contain the value
provided, and returns references to those rows. Returns an
diff --git a/src/content/reference/en/p5.Table/get.mdx b/src/content/reference/en/p5.Table/get.mdx
index 6995529f73..127f369bbf 100644
--- a/src/content/reference/en/p5.Table/get.mdx
+++ b/src/content/reference/en/p5.Table/get.mdx
@@ -2,7 +2,7 @@
title: get
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Retrieves a value from the Table's specified row and column.
The row is specified by its ID, while the column may be specified by
diff --git a/src/content/reference/en/p5.Table/getArray.mdx b/src/content/reference/en/p5.Table/getArray.mdx
index 2ed4cdd323..b03a3a78a2 100644
--- a/src/content/reference/en/p5.Table/getArray.mdx
+++ b/src/content/reference/en/p5.Table/getArray.mdx
@@ -2,7 +2,7 @@
title: getArray
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Retrieves all table data and returns it as a multidimensional array. Retrieves all values in the specified column, and returns them
as an array. The column may be specified by either its ID or title. Returns the total number of columns in a Table. Retrieves a Float value from the Table's specified row and column.
The row is specified by its ID, while the column may be specified by
diff --git a/src/content/reference/en/p5.Table/getObject.mdx b/src/content/reference/en/p5.Table/getObject.mdx
index 6e73d5e2ae..8931eb268b 100644
--- a/src/content/reference/en/p5.Table/getObject.mdx
+++ b/src/content/reference/en/p5.Table/getObject.mdx
@@ -2,7 +2,7 @@
title: getObject
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Retrieves all table data and returns as an object. If a column name is
passed in, each row object will be stored with that attribute as its
diff --git a/src/content/reference/en/p5.Table/getRow.mdx b/src/content/reference/en/p5.Table/getRow.mdx
index 18ea56fb00..07083eb9e9 100644
--- a/src/content/reference/en/p5.Table/getRow.mdx
+++ b/src/content/reference/en/p5.Table/getRow.mdx
@@ -2,7 +2,7 @@
title: getRow
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: >
Returns a reference to the specified p5.TableRow. The reference
diff --git a/src/content/reference/en/p5.Table/getRowCount.mdx b/src/content/reference/en/p5.Table/getRowCount.mdx
index 81bd3955a0..780b6694a5 100644
--- a/src/content/reference/en/p5.Table/getRowCount.mdx
+++ b/src/content/reference/en/p5.Table/getRowCount.mdx
@@ -2,7 +2,7 @@
title: getRowCount
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Returns the total number of rows in a Table. Gets all rows from the table. Returns an array of p5.TableRows. Retrieves a String value from the Table's specified row and column.
The row is specified by its ID, while the column may be specified by
diff --git a/src/content/reference/en/p5.Table/matchRow.mdx b/src/content/reference/en/p5.Table/matchRow.mdx
index c1477fd649..07a1a22924 100644
--- a/src/content/reference/en/p5.Table/matchRow.mdx
+++ b/src/content/reference/en/p5.Table/matchRow.mdx
@@ -2,7 +2,7 @@
title: matchRow
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Finds the first row in the Table that matches the regular
expression provided, and returns a reference to that row.
diff --git a/src/content/reference/en/p5.Table/matchRows.mdx b/src/content/reference/en/p5.Table/matchRows.mdx
index fae3c2372c..5f06db6cf1 100644
--- a/src/content/reference/en/p5.Table/matchRows.mdx
+++ b/src/content/reference/en/p5.Table/matchRows.mdx
@@ -2,7 +2,7 @@
title: matchRows
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Finds the rows in the Table that match the regular expression provided,
and returns references to those rows. Returns an array, so for must be
diff --git a/src/content/reference/en/p5.Table/removeColumn.mdx b/src/content/reference/en/p5.Table/removeColumn.mdx
index 591a6f546a..8a73dc7e9e 100644
--- a/src/content/reference/en/p5.Table/removeColumn.mdx
+++ b/src/content/reference/en/p5.Table/removeColumn.mdx
@@ -2,7 +2,7 @@
title: removeColumn
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: >
Use removeColumn() to remove an
existing column from a Table
diff --git a/src/content/reference/en/p5.Table/removeRow.mdx b/src/content/reference/en/p5.Table/removeRow.mdx
index 2e19e8d3bc..ebeb84915a 100644
--- a/src/content/reference/en/p5.Table/removeRow.mdx
+++ b/src/content/reference/en/p5.Table/removeRow.mdx
@@ -2,7 +2,7 @@
title: removeRow
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Removes a row from the table object. Removes any of the specified characters (or "tokens"). If no column is specified, then the values in all columns and
diff --git a/src/content/reference/en/p5.Table/rows.mdx b/src/content/reference/en/p5.Table/rows.mdx
index 127ed88cfa..5453d304b5 100644
--- a/src/content/reference/en/p5.Table/rows.mdx
+++ b/src/content/reference/en/p5.Table/rows.mdx
@@ -2,7 +2,7 @@
title: rows
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: >
An array containing the p5.TableRow
objects that make up the
diff --git a/src/content/reference/en/p5.Table/set.mdx b/src/content/reference/en/p5.Table/set.mdx
index bcc01a5657..7ccab568fb 100644
--- a/src/content/reference/en/p5.Table/set.mdx
+++ b/src/content/reference/en/p5.Table/set.mdx
@@ -2,7 +2,7 @@
title: set
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Stores a value in the Table's specified row and column.
The row is specified by its ID, while the column may be specified
diff --git a/src/content/reference/en/p5.Table/setNum.mdx b/src/content/reference/en/p5.Table/setNum.mdx
index a553973ca2..51e6fd914f 100644
--- a/src/content/reference/en/p5.Table/setNum.mdx
+++ b/src/content/reference/en/p5.Table/setNum.mdx
@@ -2,7 +2,7 @@
title: setNum
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Stores a Float value in the Table's specified row and column.
The row is specified by its ID, while the column may be specified
diff --git a/src/content/reference/en/p5.Table/setString.mdx b/src/content/reference/en/p5.Table/setString.mdx
index 92b93cb4c1..474c796b4e 100644
--- a/src/content/reference/en/p5.Table/setString.mdx
+++ b/src/content/reference/en/p5.Table/setString.mdx
@@ -2,7 +2,7 @@
title: setString
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Stores a String value in the Table's specified row and column.
The row is specified by its ID, while the column may be specified
diff --git a/src/content/reference/en/p5.Table/trim.mdx b/src/content/reference/en/p5.Table/trim.mdx
index a7d3a77f3d..8a912491dc 100644
--- a/src/content/reference/en/p5.Table/trim.mdx
+++ b/src/content/reference/en/p5.Table/trim.mdx
@@ -2,7 +2,7 @@
title: trim
module: IO
submodule: Table
-file: src/io/p5.Table.js
+file: src\io\p5.Table.js
description: |
Trims leading and trailing whitespace, such as spaces and tabs,
from String table values. If no column is specified, then the
diff --git a/src/content/reference/en/p5.TableRow/get.mdx b/src/content/reference/en/p5.TableRow/get.mdx
index 5966abe2ec..f22d74b096 100644
--- a/src/content/reference/en/p5.TableRow/get.mdx
+++ b/src/content/reference/en/p5.TableRow/get.mdx
@@ -2,7 +2,7 @@
title: get
module: IO
submodule: Table
-file: src/io/p5.TableRow.js
+file: src\io\p5.TableRow.js
description: |
Retrieves a value from the TableRow's specified column.
The column may be specified by either its ID or title. Retrieves a Float value from the TableRow's specified
column. The column may be specified by either its ID or
diff --git a/src/content/reference/en/p5.TableRow/getString.mdx b/src/content/reference/en/p5.TableRow/getString.mdx
index 8dd7db7b39..9d7a3b1c18 100644
--- a/src/content/reference/en/p5.TableRow/getString.mdx
+++ b/src/content/reference/en/p5.TableRow/getString.mdx
@@ -2,7 +2,7 @@
title: getString
module: IO
submodule: Table
-file: src/io/p5.TableRow.js
+file: src\io\p5.TableRow.js
description: |
Retrieves an String value from the TableRow's specified
column. The column may be specified by either its ID or
diff --git a/src/content/reference/en/p5.TableRow/set.mdx b/src/content/reference/en/p5.TableRow/set.mdx
index 02a7c29440..3d54f2589e 100644
--- a/src/content/reference/en/p5.TableRow/set.mdx
+++ b/src/content/reference/en/p5.TableRow/set.mdx
@@ -2,7 +2,7 @@
title: set
module: IO
submodule: Table
-file: src/io/p5.TableRow.js
+file: src\io\p5.TableRow.js
description: |
Stores a value in the TableRow's specified column.
The column may be specified by either its ID or title. Stores a Float value in the TableRow's specified column.
The column may be specified by either its ID or title. Stores a String value in the TableRow's specified column.
The column may be specified by either its ID or title. Removes all previously stored key-value pairs from the Dictionary. Creates a new key-value pair in the Dictionary. Returns the value stored at the given key. Returns true if the given key exists in the Dictionary,
otherwise returns false. Logs the set of items currently stored in the Dictionary to the
console. Removes the key-value pair stored at the given key from the Dictionary. Converts the Dictionary into a JSON file for local download. Converts the Dictionary into a CSV file for local download. Updates the value associated with the given key in case it already exists
in the Dictionary. Otherwise a new key-value pair is added. Returns the number of key-value pairs currently stored in the
Dictionary. Adds to a vector's Calculates the angle between two vectors. Returns the vector's components as an array of numbers. Replaces the components of a p5.Vector that are very close to zero with
@@ -17,7 +17,7 @@ description: >
This method rounds very close numbers to zero to make those checks easier https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON Returns a copy of the p5.Vector
object. Calculates the cross product of two vectors. Calculates the distance between two points represented by vectors. Divides a vector's Calculates the dot product of two vectors. Checks whether all the vector's components are equal to another
vector's. Creates a new 2D vector from an angle. Creates a new 3D vector from a pair of ISO spherical angles. Calculates the angle a 2D vector makes with the positive x-axis. Calculates new Limits a vector's magnitude to a maximum value. Calculates the magnitude (length) of the vector. Calculates the magnitude (length) of the vector squared. Multiplies a vector's Scales the components of a p5.Vector
object so
diff --git a/src/content/reference/en/p5.Vector/random2D.mdx b/src/content/reference/en/p5.Vector/random2D.mdx
index 53705402ae..ef8f45a545 100644
--- a/src/content/reference/en/p5.Vector/random2D.mdx
+++ b/src/content/reference/en/p5.Vector/random2D.mdx
@@ -2,7 +2,7 @@
title: random2D
module: Math
submodule: Vector
-file: src/math/p5.Vector.js
+file: src\math\p5.Vector.js
description: |
Creates a new 2D unit vector with a random heading. Creates a new 3D unit vector with a random heading. Reflects a vector about a line in 2D or a plane in 3D. Performs modulo (remainder) division with a vector's Rotates a 2D vector by an angle without changing its magnitude. Sets the vector's Rotates a 2D vector to a specific angle without changing its magnitude. Sets a vector's magnitude to a given value. Calculates a new heading and magnitude that are between two vectors. Subtracts from a vector's Returns a string representation of a vector. The x component of the vector The y component of the vector The z component of the vector Adds a new child element and returns a reference to it. Returns the number of attributes the element has. Returns the first matching child element as a new
diff --git a/src/content/reference/en/p5.XML/getChildren.mdx b/src/content/reference/en/p5.XML/getChildren.mdx
index 65ea80b85b..2eb3a4de14 100644
--- a/src/content/reference/en/p5.XML/getChildren.mdx
+++ b/src/content/reference/en/p5.XML/getChildren.mdx
@@ -2,7 +2,7 @@
title: getChildren
module: IO
submodule: Input
-file: src/io/p5.XML.js
+file: src\io\p5.XML.js
description: >
Returns an array with the element's child elements as new
diff --git a/src/content/reference/en/p5.XML/getContent.mdx b/src/content/reference/en/p5.XML/getContent.mdx
index a759224ed0..97074b985c 100644
--- a/src/content/reference/en/p5.XML/getContent.mdx
+++ b/src/content/reference/en/p5.XML/getContent.mdx
@@ -2,7 +2,7 @@
title: getContent
module: IO
submodule: Input
-file: src/io/p5.XML.js
+file: src\io\p5.XML.js
description: >
Returns the element's content as a Returns the element's name as a Return an attribute's value as a Returns the element's parent element as a new p5.XML
diff --git a/src/content/reference/en/p5.XML/getString.mdx b/src/content/reference/en/p5.XML/getString.mdx
index 7cd2251f7a..af8eecfead 100644
--- a/src/content/reference/en/p5.XML/getString.mdx
+++ b/src/content/reference/en/p5.XML/getString.mdx
@@ -2,7 +2,7 @@
title: getString
module: IO
submodule: Input
-file: src/io/p5.XML.js
+file: src\io\p5.XML.js
description: >
Return an attribute's value as a string. Returns Returns Returns an Returns an array with the names of the element's child elements as
Removes the first matching child element. Returns the element as a Sets an attribute to a given value. Sets the element's content. Sets the element's tag name. Amplitude measures volume between 0.0 and 1.0.
Listens to all p5sound by default, or use setInput()
@@ -24,12 +24,12 @@ methods:
description: |
Connects to the p5sound instance (main output) by default.
Optionally, you can pass in a specific source (i.e. a soundfile). Returns a single Amplitude reading at the moment it is called.
For continuous readings, run in the draw loop. Determines whether the results of Amplitude.process() will be
@@ -40,12 +40,12 @@ methods:
if a louder moment occurs, the amount that Normalize adds to
all the values will change. Accepts an optional boolean parameter
(true or false). Normalizing is off by default. Smooth Amplitude analysis by averaging with the last analysis
frame. Off by default. Get audio from an input, i.e. your computer's microphone.File properties and methods are accessible.'image'
MIME type
may have a subtype such as png or jpeg.myBuffer.color
diff --git a/src/content/reference/en/p5.Framebuffer/createCamera.mdx b/src/content/reference/en/p5.Framebuffer/createCamera.mdx
index 2b88fc7a22..9d870ae641 100644
--- a/src/content/reference/en/p5.Framebuffer/createCamera.mdx
+++ b/src/content/reference/en/p5.Framebuffer/createCamera.mdx
@@ -2,7 +2,7 @@
title: createCamera
module: Rendering
submodule: ''
-file: src/webgl/p5.Framebuffer.js
+file: src\webgl\p5.Framebuffer.js
description: >
myBuffer.depth
diff --git a/src/content/reference/en/p5.Framebuffer/draw.mdx b/src/content/reference/en/p5.Framebuffer/draw.mdx
index 4213a696fc..17b55854d1 100644
--- a/src/content/reference/en/p5.Framebuffer/draw.mdx
+++ b/src/content/reference/en/p5.Framebuffer/draw.mdx
@@ -2,7 +2,7 @@
title: draw
module: Rendering
submodule: ''
-file: src/webgl/p5.Framebuffer.js
+file: src\webgl\p5.Framebuffer.js
description: >
saveObj() function exports p5.Geometry
objects as
diff --git a/src/content/reference/en/p5.Geometry/saveStl.mdx b/src/content/reference/en/p5.Geometry/saveStl.mdx
index d337eb7b09..bb8046100c 100644
--- a/src/content/reference/en/p5.Geometry/saveStl.mdx
+++ b/src/content/reference/en/p5.Geometry/saveStl.mdx
@@ -2,7 +2,7 @@
title: saveStl
module: Shape
submodule: 3D Primitives
-file: src/webgl/p5.Geometry.js
+file: src\webgl\p5.Geometry.js
description: >
saveStl() function exports p5.Geometry
objects as
diff --git a/src/content/reference/en/p5.Geometry/uvs.mdx b/src/content/reference/en/p5.Geometry/uvs.mdx
index 54c991993d..b45923e4c0 100644
--- a/src/content/reference/en/p5.Geometry/uvs.mdx
+++ b/src/content/reference/en/p5.Geometry/uvs.mdx
@@ -2,7 +2,7 @@
title: uvs
module: Shape
submodule: 3D Primitives
-file: src/webgl/p5.Geometry.js
+file: src\webgl\p5.Geometry.js
description: >
img.pixels
diff --git a/src/content/reference/en/p5.Image/mask.mdx b/src/content/reference/en/p5.Image/mask.mdx
index 79f1a51d17..50785c6583 100644
--- a/src/content/reference/en/p5.Image/mask.mdx
+++ b/src/content/reference/en/p5.Image/mask.mdx
@@ -2,7 +2,7 @@
title: mask
module: Image
submodule: Image
-file: src/image/p5.Image.js
+file: src\image\p5.Image.js
description: >
media.addCue().httpDo options object to send a POST request with some
diff --git a/src/content/reference/en/p5.SoundFile/getPan.mdx b/src/content/reference/en/p5.SoundFile/getPan.mdx
index e6f2b25294..88e9bca69c 100644
--- a/src/content/reference/en/p5.SoundFile/getPan.mdx
+++ b/src/content/reference/en/p5.SoundFile/getPan.mdx
@@ -2,7 +2,7 @@
title: getPan
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
restart and
sustain. Play Mode determines what happens to a
diff --git a/src/content/reference/en/p5.SoundFile/rate.mdx b/src/content/reference/en/p5.SoundFile/rate.mdx
index 86c5553a44..2a297c4432 100644
--- a/src/content/reference/en/p5.SoundFile/rate.mdx
+++ b/src/content/reference/en/p5.SoundFile/rate.mdx
@@ -2,7 +2,7 @@
title: rate
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
x, y, and z
components.x, y, and z
components.x, y, and z
components that are proportionally the
diff --git a/src/content/reference/en/p5.Vector/limit.mdx b/src/content/reference/en/p5.Vector/limit.mdx
index f729548984..3e6b323e86 100644
--- a/src/content/reference/en/p5.Vector/limit.mdx
+++ b/src/content/reference/en/p5.Vector/limit.mdx
@@ -2,7 +2,7 @@
title: limit
module: Math
submodule: Vector
-file: src/math/p5.Vector.js
+file: src\math\p5.Vector.js
description: >
x, y, and z
components.x,
y, and z
diff --git a/src/content/reference/en/p5.Vector/rotate.mdx b/src/content/reference/en/p5.Vector/rotate.mdx
index 931b207b8e..0b0f481b89 100644
--- a/src/content/reference/en/p5.Vector/rotate.mdx
+++ b/src/content/reference/en/p5.Vector/rotate.mdx
@@ -2,7 +2,7 @@
title: rotate
module: Math
submodule: Vector
-file: src/math/p5.Vector.js
+file: src\math\p5.Vector.js
description: >
x, y, and z
components.x, y, and
z components.String.String.Number.true if the element has a given attribute and
false if not.true if the element has child elements and
false if not.Array with the names of the element's
attributes.Strings.String.
Note: This uses the getUserMedia/
+ Note: This uses the getUserMedia/
Stream API, which is not supported by certain browsers. Access in Chrome
browser
@@ -74,23 +74,23 @@ methods:
Chrome only allows access from localhost and over https. For this reason,
you may want to include an errorCallback—a function that is called in case
the browser won't provide mic access. Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel().
If re-starting, the user may be prompted for permission access. Connect to an audio unit. If no parameter is provided, will
connect to the main output (i.e. your speakers). Disconnect the AudioIn from all audio units. For example, if
connect() had been called, disconnect() will stop sending
signal to your speakers. Read the Amplitude (volume level) of an AudioIn. The AudioIn
@@ -98,53 +98,53 @@ methods:
make it easy to get a microphone's volume level. Accepts an
optional smoothing value (0.0 < 1.0). NOTE: AudioIn must
.start() before using .getLevel(). Set amplitude (volume) of a mic input between 0 and 1.0. Returns a list of available input sources. This is a wrapper
for
+ en-US/docs/Web/API/MediaDevices/enumerateDevices" target="_blank">
MediaDevices.enumerateDevices() - Web APIs | MDN
and it returns a Promise. Set the input source. Accepts a number representing a
position in the array returned by getSources().
This is only available in browsers that support
+ en-US/docs/Web/API/MediaDevices/enumerateDevices" target="_blank">
navigator.mediaDevices.enumerateDevices() Client must allow browser to access their microphone / audioin source.
Default: false. Will become true when the client enables access. Input amplitude, connect to it by default but not to master out Base class for monophonic synthesizers. Any extensions of this class
should follow the API and implement the methods below in order to
@@ -13,11 +13,11 @@ methods:
connect:
description: |
Connect to p5 objects or Web Audio Nodes Disconnect from soundOut Constructor: Compressor is an audio effect class that performs dynamics compression
@@ -37,35 +37,35 @@ methods:
description: |
Performs the same function as .connect, but also accepts
optional parameters to set compressor's audioParams Set the parameters of a compressor. Get current attack or set value w/ time ramp Get current knee or set value w/ time ramp Get current ratio or set value w/ time ramp Get current threshold or set value w/ time ramp Get current release or set value w/ time ramp Return the current reduction valuenew p5.BandPass() Filter.
This is the same as creating a p5.Filter and then calling
diff --git a/src/content/reference/en/p5.sound/p5.Compressor.mdx b/src/content/reference/en/p5.sound/p5.Compressor.mdx
index a3565d768a..b58faaa101 100644
--- a/src/content/reference/en/p5.sound/p5.Compressor.mdx
+++ b/src/content/reference/en/p5.sound/p5.Compressor.mdx
@@ -2,7 +2,7 @@
title: p5.Compressor
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
p5.Convolver extends p5.Reverb. It can emulate the sound of real
physical spaces through a process called
AudioBuffer) and a .name, a String that corresponds
with the original filename.
Internally, the p5.Convolver uses the a Web Audio Convolver Node.
- path: p5.Convolver/convolverNode + path: src\content\reference\en\p5.Convolver/convolverNode impulses: description: |If you load multiple impulse files using the .addImpulse method,
they will be stored as Objects in this Array. Toggle between them
with the toggleImpulse(id) method.
Delay is an echo effect. It processes an existing sound source, @@ -68,12 +68,12 @@ methods: description: |
Add delay to an audio signal according to a set of delay parameters.
- path: p5.Delay/process + path: src\content\reference\en\p5.Delay/process delayTime: description: |Set the delay (echo) time, in seconds. Usually this value will be a floating point number between 0.0 and 1.0.
- path: p5.Delay/delayTime + path: src\content\reference\en\p5.Delay/delayTime feedback: description: >Feedback occurs when Delay sends its signal back through its input @@ -86,43 +86,43 @@ methods: it will increase the overall output each time through the loop, creating an infinite feedback loop. The default value is 0.5
- path: p5.Delay/feedback + path: src\content\reference\en\p5.Delay/feedback filter: description: |Set a lowpass filter frequency for the delay. A lowpass filter will cut off any frequencies higher than the filter frequency.
- path: p5.Delay/filter + path: src\content\reference\en\p5.Delay/filter setType: description: |Choose a preset type of delay. 'pingPong' bounces the signal from the left to the right channel to produce a stereo effect. Any other parameter will revert to the default delay setting.
- path: p5.Delay/setType + path: src\content\reference\en\p5.Delay/setType amp: description: |Set the output level of the delay effect.
- path: p5.Delay/amp + path: src\content\reference\en\p5.Delay/amp connect: description: |Send output to a p5.sound or web audio object
- path: p5.Delay/connect + path: src\content\reference\en\p5.Delay/connect disconnect: description: |Disconnect all output.
- path: p5.Delay/disconnect + path: src\content\reference\en\p5.Delay/disconnect properties: leftDelay: description: |The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.
- path: p5.Delay/leftDelay + path: src\content\reference\en\p5.Delay/leftDelay rightDelay: description: |The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.
- path: p5.Delay/rightDelay + path: src\content\reference\en\p5.Delay/rightDelay chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Distortion.mdx b/src/content/reference/en/p5.sound/p5.Distortion.mdx index c6c96b9368..661d11431b 100644 --- a/src/content/reference/en/p5.sound/p5.Distortion.mdx +++ b/src/content/reference/en/p5.sound/p5.Distortion.mdx @@ -2,14 +2,14 @@ title: p5.Distortion module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >A Distortion effect created with a Waveshaper Node, with an approach adapted from Kevin + href="http://stackoverflow.com/questions/22312841/waveshaper-node-in-webaudio-how-to-emulate-distortion">Kevin Ennis
This class extends p5.Effect. @@ -43,26 +43,26 @@ methods: description: >
Process a sound source, optionally specify amount and oversample values.
- path: p5.Distortion/process + path: src\content\reference\en\p5.Distortion/process set: description: |Set the amount and oversample of the waveshaper distortion.
- path: p5.Distortion/set + path: src\content\reference\en\p5.Distortion/set getAmount: description: |Return the distortion amount, typically between 0-1.
- path: p5.Distortion/getAmount + path: src\content\reference\en\p5.Distortion/getAmount getOversample: description: |Return the oversampling.
- path: p5.Distortion/getOversample + path: src\content\reference\en\p5.Distortion/getOversample properties: WaveShaperNode: description: |The p5.Distortion is built with a Web Audio WaveShaper Node.
- path: p5.Distortion/WaveShaperNode + path: src\content\reference\en\p5.Distortion/WaveShaperNode chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.EQ.mdx b/src/content/reference/en/p5.sound/p5.EQ.mdx index 54573d2c4b..885503aa13 100644 --- a/src/content/reference/en/p5.sound/p5.EQ.mdx +++ b/src/content/reference/en/p5.sound/p5.EQ.mdx @@ -2,7 +2,7 @@ title: p5.EQ module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >p5.EQ is an audio effect that performs the function of a multiband @@ -101,7 +101,7 @@ methods: process: description: |
Process an input by connecting it to the EQ
- path: p5.EQ/process + path: src\content\reference\en\p5.EQ/process properties: bands: description: > @@ -113,7 +113,7 @@ properties: p5.Filter API, especiallygain and freq.
Bands are stored in an array, with indices 0 - 3, or 0 - 7
- path: p5.EQ/bands
+ path: src\content\reference\en\p5.EQ/bands
chainable: false
---
diff --git a/src/content/reference/en/p5.sound/p5.Effect.mdx b/src/content/reference/en/p5.sound/p5.Effect.mdx
index 986c82e148..1c47363ba6 100644
--- a/src/content/reference/en/p5.sound/p5.Effect.mdx
+++ b/src/content/reference/en/p5.sound/p5.Effect.mdx
@@ -2,7 +2,7 @@
title: p5.Effect
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Effect is a base class for audio effects in p5.
@@ -54,26 +54,26 @@ methods:
amp:
description: |
Set the output volume of the filter.
- path: p5.Effect/amp + path: src\content\reference\en\p5.Effect/amp chain: description: |Link effects together in a chain Example usage: filter.chain(reverb, delay, panner); May be used with an open-ended number of arguments
- path: p5.Effect/chain + path: src\content\reference\en\p5.Effect/chain drywet: description: |Adjust the dry/wet value.
- path: p5.Effect/drywet + path: src\content\reference\en\p5.Effect/drywet connect: description: |Send output to a p5.js-sound, Web Audio Node, or use signal to control an AudioParam
- path: p5.Effect/connect + path: src\content\reference\en\p5.Effect/connect disconnect: description: |Disconnect all output.
- path: p5.Effect/disconnect + path: src\content\reference\en\p5.Effect/disconnect chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Envelope.mdx b/src/content/reference/en/p5.sound/p5.Envelope.mdx index 12146b9ead..2187c5d326 100644 --- a/src/content/reference/en/p5.sound/p5.Envelope.mdx +++ b/src/content/reference/en/p5.sound/p5.Envelope.mdx @@ -2,7 +2,7 @@ title: p5.Envelope module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >-Envelopes are pre-defined amplitude distribution over time. @@ -72,7 +72,7 @@ methods: set: description: |
Reset the envelope with a series of time/value pairs.
- path: p5.Envelope/set + path: src\content\reference\en\p5.Envelope/set setADSR: description: >Set values like a traditional @@ -83,24 +83,24 @@ methods: ADSR envelope .
- path: p5.Envelope/setADSR + path: src\content\reference\en\p5.Envelope/setADSR setRange: description: |Set max (attackLevel) and min (releaseLevel) of envelope.
- path: p5.Envelope/setRange + path: src\content\reference\en\p5.Envelope/setRange setInput: description: |Assign a parameter to be controlled by this envelope. If a p5.Sound object is given, then the p5.Envelope will control its output gain. If multiple inputs are provided, the env will control all of them.
- path: p5.Envelope/setInput + path: src\content\reference\en\p5.Envelope/setInput setExp: description: |Set whether the envelope ramp is linear (default) or exponential. Exponential ramps can be useful because we perceive amplitude and frequency logarithmically.
- path: p5.Envelope/setExp + path: src\content\reference\en\p5.Envelope/setExp play: description: |-Play tells the envelope to start acting on a given input. @@ -109,7 +109,7 @@ methods: Envelopes can also be used to control any Web Audio Audio Param.
- path: p5.Envelope/play + path: src\content\reference\en\p5.Envelope/play triggerAttack: description: |Trigger the Attack, and Decay portion of the Envelope. @@ -118,13 +118,13 @@ methods: any p5.sound object, or a Web Audio Param.
- path: p5.Envelope/triggerAttack + path: src\content\reference\en\p5.Envelope/triggerAttack triggerRelease: description: |Trigger the Release of the Envelope. This is similar to releasing the key on a piano and letting the sound fade according to the release level and release time.
- path: p5.Envelope/triggerRelease + path: src\content\reference\en\p5.Envelope/triggerRelease ramp: description: >Exponentially ramp to a value using the first two @@ -133,58 +133,58 @@ methods: href="/reference/p5.Envelope/setADSR/">setADSR(attackTime, decayTime) - as + as time constants for simple exponential ramps. If the value is higher than current value, it uses attackTime, while a decrease uses decayTime.
- path: p5.Envelope/ramp + path: src\content\reference\en\p5.Envelope/ramp add: description: |Add a value to the p5.Oscillator's output amplitude, and return the oscillator. Calling this method again will override the initial add() with new values.
- path: p5.Envelope/add + path: src\content\reference\en\p5.Envelope/add mult: description: |Multiply the p5.Envelope's output amplitude by a fixed value. Calling this method again will override the initial mult() with new values.
- path: p5.Envelope/mult + path: src\content\reference\en\p5.Envelope/mult scale: description: |Scale this envelope's amplitude values to a given range, and return the envelope. Calling this method again will override the initial scale() with new values.
- path: p5.Envelope/scale + path: src\content\reference\en\p5.Envelope/scale properties: attackTime: description: |Time until envelope reaches attackLevel
- path: p5.Envelope/attackTime + path: src\content\reference\en\p5.Envelope/attackTime attackLevel: description: |Level once attack is complete.
- path: p5.Envelope/attackLevel + path: src\content\reference\en\p5.Envelope/attackLevel decayTime: description: |Time until envelope reaches decayLevel.
- path: p5.Envelope/decayTime + path: src\content\reference\en\p5.Envelope/decayTime decayLevel: description: >Level after decay. The envelope will sustain here until it is released.
- path: p5.Envelope/decayLevel + path: src\content\reference\en\p5.Envelope/decayLevel releaseTime: description: |Duration of the release portion of the envelope.
- path: p5.Envelope/releaseTime + path: src\content\reference\en\p5.Envelope/releaseTime releaseLevel: description: |Level at the end of the release.
- path: p5.Envelope/releaseLevel + path: src\content\reference\en\p5.Envelope/releaseLevel chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.FFT.mdx b/src/content/reference/en/p5.sound/p5.FFT.mdx index 900c8d7022..3884b82352 100644 --- a/src/content/reference/en/p5.sound/p5.FFT.mdx +++ b/src/content/reference/en/p5.sound/p5.FFT.mdx @@ -2,11 +2,11 @@ title: p5.FFT module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |-FFT (Fast Fourier Transform) is an analysis algorithm that isolates individual - + audio frequencies within a waveform.
Once instantiated, a p5.FFT object can return an array based on @@ -100,7 +100,7 @@ methods: description: |
Set the input source for the FFT analysis. If no source is provided, FFT will analyze all sound in the sketch.
- path: p5.FFT/setInput + path: src\content\reference\en\p5.FFT/setInput waveform: description: >Returns an array of amplitude values (between -1.0 and +1.0) that @@ -111,7 +111,7 @@ methods: equal to bins (defaults to 1024). Can be used to draw the waveform of a sound.
- path: p5.FFT/waveform + path: src\content\reference\en\p5.FFT/waveform analyze: description: |Returns an array of amplitude values (between 0 and 255)
@@ -121,11 +121,11 @@ methods:
hear. Each value represents amplitude at that slice of the
frequency spectrum. Must be called prior to using
getEnergy().
Returns the amount of energy (volume) at a specific - + frequency, or the average amount of energy between two frequencies. Accepts Number(s) corresponding to frequency (in Hz), or a "string" corresponding to predefined @@ -136,20 +136,20 @@ methods: tells the FFT to analyze frequency data, and getEnergy() uses the results to determine the value at a specific frequency or range of frequencies.
- path: p5.FFT/getEnergy + path: src\content\reference\en\p5.FFT/getEnergy getCentroid: description: |Returns the - + spectral centroid of the input signal. NOTE: analyze() must be called prior to getCentroid(). Analyze() tells the FFT to analyze frequency data, and getCentroid() uses the results determine the spectral centroid.
- path: p5.FFT/getCentroid + path: src\content\reference\en\p5.FFT/getCentroid smooth: description: |Smooth FFT analysis by averaging with the last analysis frame.
- path: p5.FFT/smooth + path: src\content\reference\en\p5.FFT/smooth linAverages: description: |Returns an array of average amplitude values for a given number @@ -157,13 +157,13 @@ methods: NOTE: analyze() must be called prior to linAverages(). Analyze() tells the FFT to analyze frequency data, and linAverages() uses the results to group them into a smaller set of averages.
- path: p5.FFT/linAverages + path: src\content\reference\en\p5.FFT/linAverages logAverages: description: >Returns an array of average amplitude values of the spectrum, for a given - set of Octave Bands @@ -173,13 +173,13 @@ methods: tells the FFT to analyze frequency data, and logAverages() uses the results to group them into a smaller set of averages.
- path: p5.FFT/logAverages + path: src\content\reference\en\p5.FFT/logAverages getOctaveBands: description: >Calculates and Returns the 1/N - Octave Bands + Octave + Bands N defaults to 3 and minimum central frequency to 15.625Hz. @@ -189,7 +189,7 @@ methods: bands and produce less frequency groups.
- path: p5.FFT/getOctaveBands + path: src\content\reference\en\p5.FFT/getOctaveBands chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Filter.mdx b/src/content/reference/en/p5.sound/p5.Filter.mdx index 90439817ad..da9458a775 100644 --- a/src/content/reference/en/p5.sound/p5.Filter.mdx +++ b/src/content/reference/en/p5.sound/p5.Filter.mdx @@ -2,7 +2,7 @@ title: p5.Filter module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >A p5.Filter uses a Web Audio Biquad Filter to filter @@ -109,47 +109,47 @@ methods: description: |
Filter an audio signal according to a set of filter parameters.
- path: p5.Filter/process + path: src\content\reference\en\p5.Filter/process set: description: |Set the frequency and the resonance of the filter.
- path: p5.Filter/set + path: src\content\reference\en\p5.Filter/set freq: description: |Set the filter frequency, in Hz, from 10 to 22050 (the range of human hearing, although in reality most people hear in a narrower range).
- path: p5.Filter/freq + path: src\content\reference\en\p5.Filter/freq res: description: |Controls either width of a bandpass frequency, or the resonance of a low/highpass cutoff frequency.
- path: p5.Filter/res + path: src\content\reference\en\p5.Filter/res gain: description: |Controls the gain attribute of a Biquad Filter. This is distinctly different from .amp() which is inherited from p5.Effect .amp() controls the volume via the output gain node p5.Filter.gain() controls the gain parameter of a Biquad Filter node.
- path: p5.Filter/gain + path: src\content\reference\en\p5.Filter/gain toggle: description: |Toggle function. Switches between the specified type and allpass
- path: p5.Filter/toggle + path: src\content\reference\en\p5.Filter/toggle setType: description: |Set the type of a p5.Filter. Possible types include: "lowpass" (default), "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass".
- path: p5.Filter/setType + path: src\content\reference\en\p5.Filter/setType properties: biquadFilter: description: |The p5.Filter is built with a Web Audio BiquadFilter Node.
- path: p5.Filter/biquadFilter + path: src\content\reference\en\p5.Filter/biquadFilter chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Gain.mdx b/src/content/reference/en/p5.sound/p5.Gain.mdx index f441abc389..da9e71e501 100644 --- a/src/content/reference/en/p5.sound/p5.Gain.mdx +++ b/src/content/reference/en/p5.sound/p5.Gain.mdx @@ -2,7 +2,7 @@ title: p5.Gain module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |A gain node is usefull to set the relative volume of sound. It's typically used to build mixers.
@@ -74,19 +74,19 @@ methods: setInput: description: |Connect a source to the gain node.
- path: p5.Gain/setInput + path: src\content\reference\en\p5.Gain/setInput connect: description: |Send output to a p5.sound or web audio object
- path: p5.Gain/connect + path: src\content\reference\en\p5.Gain/connect disconnect: description: |Disconnect all output.
- path: p5.Gain/disconnect + path: src\content\reference\en\p5.Gain/disconnect amp: description: |Set the output level of the gain node.
- path: p5.Gain/amp + path: src\content\reference\en\p5.Gain/amp chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.HighPass.mdx b/src/content/reference/en/p5.sound/p5.HighPass.mdx index 3aa854c235..56380e62c1 100644 --- a/src/content/reference/en/p5.sound/p5.HighPass.mdx +++ b/src/content/reference/en/p5.sound/p5.HighPass.mdx @@ -2,7 +2,7 @@ title: p5.HighPass module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Constructor: new p5.HighPass() Filter.
This is the same as creating a p5.Filter and then calling
diff --git a/src/content/reference/en/p5.sound/p5.LowPass.mdx b/src/content/reference/en/p5.sound/p5.LowPass.mdx
index 6ec84a3429..5dfe57b0dd 100644
--- a/src/content/reference/en/p5.sound/p5.LowPass.mdx
+++ b/src/content/reference/en/p5.sound/p5.LowPass.mdx
@@ -2,7 +2,7 @@
title: p5.LowPass
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Constructor: new p5.LowPass() Filter.
This is the same as creating a p5.Filter and then calling
diff --git a/src/content/reference/en/p5.sound/p5.MonoSynth.mdx b/src/content/reference/en/p5.sound/p5.MonoSynth.mdx
index 9e91f575b5..0212d8ce1a 100644
--- a/src/content/reference/en/p5.sound/p5.MonoSynth.mdx
+++ b/src/content/reference/en/p5.sound/p5.MonoSynth.mdx
@@ -2,7 +2,7 @@
title: p5.MonoSynth
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
A MonoSynth is used as a single voice for sound synthesis. This is a class to be used in conjunction with the PolySynth @@ -45,19 +45,19 @@ methods: description: |
Play tells the MonoSynth to start playing a note. This method schedules the calling of .triggerAttack and .triggerRelease.
- path: p5.MonoSynth/play + path: src\content\reference\en\p5.MonoSynth/play triggerAttack: description: |Trigger the Attack, and Decay portion of the Envelope. Similar to holding down a key on a piano, but it will hold the sustain level until you let go.
- path: p5.MonoSynth/triggerAttack + path: src\content\reference\en\p5.MonoSynth/triggerAttack triggerRelease: description: |Trigger the release of the Envelope. This is similar to releasing the key on a piano and letting the sound fade according to the release level and release time.
- path: p5.MonoSynth/triggerRelease + path: src\content\reference\en\p5.MonoSynth/triggerRelease setADSR: description: >Set values like a traditional @@ -68,37 +68,37 @@ methods: ADSR envelope .
- path: p5.MonoSynth/setADSR + path: src\content\reference\en\p5.MonoSynth/setADSR amp: description: |MonoSynth amp
- path: p5.MonoSynth/amp + path: src\content\reference\en\p5.MonoSynth/amp connect: description: |Connect to a p5.sound / Web Audio object.
- path: p5.MonoSynth/connect + path: src\content\reference\en\p5.MonoSynth/connect disconnect: description: |Disconnect all outputs
- path: p5.MonoSynth/disconnect + path: src\content\reference\en\p5.MonoSynth/disconnect dispose: description: |Get rid of the MonoSynth and free up its resources / memory.
- path: p5.MonoSynth/dispose + path: src\content\reference\en\p5.MonoSynth/dispose properties: attack: description: |Getters and Setters
- path: p5.MonoSynth/attack + path: src\content\reference\en\p5.MonoSynth/attack decay: description: '' - path: p5.MonoSynth/decay + path: src\content\reference\en\p5.MonoSynth/decay sustain: description: '' - path: p5.MonoSynth/sustain + path: src\content\reference\en\p5.MonoSynth/sustain release: description: '' - path: p5.MonoSynth/release + path: src\content\reference\en\p5.MonoSynth/release chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Noise.mdx b/src/content/reference/en/p5.sound/p5.Noise.mdx index 843ed2ce1e..9ffd286e05 100644 --- a/src/content/reference/en/p5.sound/p5.Noise.mdx +++ b/src/content/reference/en/p5.sound/p5.Noise.mdx @@ -2,7 +2,7 @@ title: p5.Noise module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >Noise is a type of oscillator that generates a buffer with random values.
@@ -19,7 +19,7 @@ methods: description: |Set type of noise to 'white', 'pink' or 'brown'. White is the default.
- path: p5.Noise/setType + path: src\content\reference\en\p5.Noise/setType chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.OnsetDetect.mdx b/src/content/reference/en/p5.sound/p5.OnsetDetect.mdx index 9e335ae74f..210a03611f 100644 --- a/src/content/reference/en/p5.sound/p5.OnsetDetect.mdx +++ b/src/content/reference/en/p5.sound/p5.OnsetDetect.mdx @@ -2,7 +2,7 @@ title: p5.OnsetDetect module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Listen for onsets (a sharp increase in volume) within a given frequency range.
diff --git a/src/content/reference/en/p5.sound/p5.Oscillator.mdx b/src/content/reference/en/p5.sound/p5.Oscillator.mdx index d3c47fd23b..a9b44bfbdd 100644 --- a/src/content/reference/en/p5.sound/p5.Oscillator.mdx +++ b/src/content/reference/en/p5.sound/p5.Oscillator.mdx @@ -2,7 +2,7 @@ title: p5.Oscillator module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >-Creates a signal that oscillates between -1.0 and 1.0. @@ -89,81 +89,81 @@ methods:
Starting an oscillator on a user gesture will enable audio in browsers
that have a strict autoplay policy, including Chrome and most mobile
devices. See also: userStartAudio().
Stop an oscillator. Accepts an optional parameter to determine how long (in seconds from now) until the oscillator stops.
- path: p5.Oscillator/stop + path: src\content\reference\en\p5.Oscillator/stop amp: description: |Set the amplitude between 0 and 1.0. Or, pass in an object such as an oscillator to modulate amplitude with an audio signal.
- path: p5.Oscillator/amp + path: src\content\reference\en\p5.Oscillator/amp getAmp: description: |Returns the value of output gain
- path: p5.Oscillator/getAmp + path: src\content\reference\en\p5.Oscillator/getAmp freq: description: |Set frequency of an oscillator to a value. Or, pass in an object such as an oscillator to modulate the frequency with an audio signal.
- path: p5.Oscillator/freq + path: src\content\reference\en\p5.Oscillator/freq getFreq: description: |Returns the value of frequency of oscillator
- path: p5.Oscillator/getFreq + path: src\content\reference\en\p5.Oscillator/getFreq setType: description: |Set type to 'sine', 'triangle', 'sawtooth' or 'square'.
- path: p5.Oscillator/setType + path: src\content\reference\en\p5.Oscillator/setType getType: description: >Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' or 'square'.
- path: p5.Oscillator/getType + path: src\content\reference\en\p5.Oscillator/getType connect: description: |Connect to a p5.sound / Web Audio object.
- path: p5.Oscillator/connect + path: src\content\reference\en\p5.Oscillator/connect disconnect: description: |Disconnect all outputs
- path: p5.Oscillator/disconnect + path: src\content\reference\en\p5.Oscillator/disconnect pan: description: |Pan between Left (-1) and Right (1)
- path: p5.Oscillator/pan + path: src\content\reference\en\p5.Oscillator/pan getPan: description: >Returns the current value of panPosition , between Left (-1) and Right (1)
- path: p5.Oscillator/getPan + path: src\content\reference\en\p5.Oscillator/getPan phase: description: |Set the phase of an oscillator between 0.0 and 1.0. In this implementation, phase is a delay time based on the oscillator's current frequency.
- path: p5.Oscillator/phase + path: src\content\reference\en\p5.Oscillator/phase add: description: |Add a value to the p5.Oscillator's output amplitude, and return the oscillator. Calling this method again will override the initial add() with a new value.
- path: p5.Oscillator/add + path: src\content\reference\en\p5.Oscillator/add mult: description: |Multiply the p5.Oscillator's output amplitude by a fixed value (i.e. turn it up!). Calling this method again will override the initial mult() with a new value.
- path: p5.Oscillator/mult + path: src\content\reference\en\p5.Oscillator/mult scale: description: |Scale this oscillator's amplitude values to a given range, and return the oscillator. Calling this method again will override the initial scale() with new values.
- path: p5.Oscillator/scale + path: src\content\reference\en\p5.Oscillator/scale chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Panner3D.mdx b/src/content/reference/en/p5.sound/p5.Panner3D.mdx index a0401efff1..eb7977fb86 100644 --- a/src/content/reference/en/p5.sound/p5.Panner3D.mdx +++ b/src/content/reference/en/p5.sound/p5.Panner3D.mdx @@ -2,10 +2,10 @@ title: p5.Panner3D module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >Panner3D is based on the + href="https://developer.mozilla.org/en-US/docs/Web/API/PannerNode"> Web Audio Spatial Panner Node. @@ -14,7 +14,7 @@ description: > and oriented in 3D space.
The position is relative to an + href="https://developer.mozilla.org/en-US/docs/Web/API/AudioListener"> Audio Context Listener, which can be accessed @@ -25,57 +25,57 @@ methods: process: description: |
Connect an audio sorce
- path: p5.Panner3D/process + path: src\content\reference\en\p5.Panner3D/process set: description: |Set the X,Y,Z position of the Panner
- path: p5.Panner3D/set + path: src\content\reference\en\p5.Panner3D/set positionX: description: |Getter and setter methods for position coordinates
- path: p5.Panner3D/positionX + path: src\content\reference\en\p5.Panner3D/positionX positionY: description: |Getter and setter methods for position coordinates
- path: p5.Panner3D/positionY + path: src\content\reference\en\p5.Panner3D/positionY positionZ: description: |Getter and setter methods for position coordinates
- path: p5.Panner3D/positionZ + path: src\content\reference\en\p5.Panner3D/positionZ orient: description: |Set the X,Y,Z position of the Panner
- path: p5.Panner3D/orient + path: src\content\reference\en\p5.Panner3D/orient orientX: description: |Getter and setter methods for orient coordinates
- path: p5.Panner3D/orientX + path: src\content\reference\en\p5.Panner3D/orientX orientY: description: |Getter and setter methods for orient coordinates
- path: p5.Panner3D/orientY + path: src\content\reference\en\p5.Panner3D/orientY orientZ: description: |Getter and setter methods for orient coordinates
- path: p5.Panner3D/orientZ + path: src\content\reference\en\p5.Panner3D/orientZ setFalloff: description: |Set the rolloff factor and max distance
- path: p5.Panner3D/setFalloff + path: src\content\reference\en\p5.Panner3D/setFalloff maxDist: description: |Maxium distance between the source and the listener
- path: p5.Panner3D/maxDist + path: src\content\reference\en\p5.Panner3D/maxDist rollof: description: >How quickly the volume is reduced as the source moves away from the listener
- path: p5.Panner3D/rollof + path: src\content\reference\en\p5.Panner3D/rollof properties: panner: description: >+ href="https://developer.mozilla.org/en-US/docs/Web/API/PannerNode"> Web Audio Spatial Panner Node
@@ -84,7 +84,7 @@ properties: : "equal power" or "HRTF"A p5.Part plays back one or more p5.Phrases. Instantiate a part with steps and tatums. By default, each step represents a 1/16th note.
@@ -70,61 +70,61 @@ methods: setBPM: description: |Set the tempo of this part, in Beats Per Minute.
- path: p5.Part/setBPM + path: src\content\reference\en\p5.Part/setBPM getBPM: description: |Returns the tempo, in Beats Per Minute, of this part.
- path: p5.Part/getBPM + path: src\content\reference\en\p5.Part/getBPM start: description: |Start playback of this part. It will play through all of its phrases at a speed determined by setBPM.
- path: p5.Part/start + path: src\content\reference\en\p5.Part/start loop: description: |Loop playback of this part. It will begin looping through all of its phrases at a speed determined by setBPM.
- path: p5.Part/loop + path: src\content\reference\en\p5.Part/loop noLoop: description: |Tell the part to stop looping.
- path: p5.Part/noLoop + path: src\content\reference\en\p5.Part/noLoop stop: description: >Stop the part and cue it to step 0. Playback will resume from the begining of the Part when it is played again.
- path: p5.Part/stop + path: src\content\reference\en\p5.Part/stop pause: description: |Pause the part. Playback will resume from the current step.
- path: p5.Part/pause + path: src\content\reference\en\p5.Part/pause addPhrase: description: |Add a p5.Phrase to this Part.
- path: p5.Part/addPhrase + path: src\content\reference\en\p5.Part/addPhrase removePhrase: description: |Remove a phrase from this part, based on the name it was given when it was created.
- path: p5.Part/removePhrase + path: src\content\reference\en\p5.Part/removePhrase getPhrase: description: |Get a phrase from this part, based on the name it was given when it was created. Now you can modify its array.
- path: p5.Part/getPhrase + path: src\content\reference\en\p5.Part/getPhrase replaceSequence: description: >Find all sequences with the specified name, and replace their patterns with the specified array.
- path: p5.Part/replaceSequence + path: src\content\reference\en\p5.Part/replaceSequence onStep: description: >Set the function that will be called at every step. This will clear the previous function.
- path: p5.Part/onStep + path: src\content\reference\en\p5.Part/onStep chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.PeakDetect.mdx b/src/content/reference/en/p5.sound/p5.PeakDetect.mdx index c76561a532..3ec31a56ae 100644 --- a/src/content/reference/en/p5.sound/p5.PeakDetect.mdx +++ b/src/content/reference/en/p5.sound/p5.PeakDetect.mdx @@ -2,7 +2,7 @@ title: p5.PeakDetect module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >-PeakDetect works in conjunction with p5.FFT to @@ -143,13 +143,13 @@ methods:
Accepts an FFT object. You must call .analyze() on the FFT object prior to updating the peakDetect because it relies on a completed FFT analysis.
- path: p5.PeakDetect/update + path: src\content\reference\en\p5.PeakDetect/update onPeak: description: |onPeak accepts two arguments: a function to call when a peak is detected. The value of the peak, between 0.0 and 1.0, is passed to the callback.
- path: p5.PeakDetect/onPeak + path: src\content\reference\en\p5.PeakDetect/onPeak chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Phrase.mdx b/src/content/reference/en/p5.sound/p5.Phrase.mdx index e51b87a903..6367d6c4fd 100644 --- a/src/content/reference/en/p5.sound/p5.Phrase.mdx +++ b/src/content/reference/en/p5.sound/p5.Phrase.mdx @@ -2,7 +2,7 @@ title: p5.Phrase module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |-A phrase is a pattern of musical events over time, i.e. a series of notes and rests.
@@ -83,7 +83,7 @@ properties: function's requirements, these values may be numbers, strings, or an object with multiple parameters. Zero (0) indicates a rest. - path: p5.Phrase/sequence + path: src\content\reference\en\p5.Phrase/sequence chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.PolySynth.mdx b/src/content/reference/en/p5.sound/p5.PolySynth.mdx index eb121e2690..f38c0c2745 100644 --- a/src/content/reference/en/p5.sound/p5.PolySynth.mdx +++ b/src/content/reference/en/p5.sound/p5.PolySynth.mdx @@ -2,7 +2,7 @@ title: p5.PolySynth module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |An AudioVoice is used as a single voice for sound synthesis. The PolySynth class holds an array of AudioVoice, and deals @@ -60,7 +60,7 @@ methods: description: >
Play a note by triggering noteAttack and noteRelease with sustain time
- path: p5.PolySynth/play + path: src\content\reference\en\p5.PolySynth/play noteADSR: description: >noteADSR sets the envelope for a specific note that has just been @@ -74,38 +74,38 @@ methods: in order to prevent the modified envelope from being used on other notes.
- path: p5.PolySynth/noteADSR + path: src\content\reference\en\p5.PolySynth/noteADSR setADSR: description: >Set the PolySynths global envelope. This method modifies the envelopes of each monosynth so that all notes are played with this envelope.
- path: p5.PolySynth/setADSR + path: src\content\reference\en\p5.PolySynth/setADSR noteAttack: description: |Trigger the Attack, and Decay portion of a MonoSynth. Similar to holding down a key on a piano, but it will hold the sustain level until you let go.
- path: p5.PolySynth/noteAttack + path: src\content\reference\en\p5.PolySynth/noteAttack noteRelease: description: |Trigger the Release of an AudioVoice note. This is similar to releasing the key on a piano and letting the sound fade according to the release level and release time.
- path: p5.PolySynth/noteRelease + path: src\content\reference\en\p5.PolySynth/noteRelease connect: description: |Connect to a p5.sound / Web Audio object.
- path: p5.PolySynth/connect + path: src\content\reference\en\p5.PolySynth/connect disconnect: description: |Disconnect all outputs
- path: p5.PolySynth/disconnect + path: src\content\reference\en\p5.PolySynth/disconnect dispose: description: |Get rid of the MonoSynth and free up its resources / memory.
- path: p5.PolySynth/dispose + path: src\content\reference\en\p5.PolySynth/dispose properties: notes: description: > @@ -120,16 +120,16 @@ properties: released, the value of the key becomes undefined. - path: p5.PolySynth/notes + path: src\content\reference\en\p5.PolySynth/notes polyvalue: description: |A PolySynth must have at least 1 voice, defaults to 8
- path: p5.PolySynth/polyvalue + path: src\content\reference\en\p5.PolySynth/polyvalue AudioVoice: description: |Monosynth that generates the sound for each note that is triggered. The p5.PolySynth defaults to using the p5.MonoSynth as its voice.
- path: p5.PolySynth/AudioVoice + path: src\content\reference\en\p5.PolySynth/AudioVoice chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Pulse.mdx b/src/content/reference/en/p5.sound/p5.Pulse.mdx index 8f27d0c899..04a8aaf4cf 100644 --- a/src/content/reference/en/p5.sound/p5.Pulse.mdx +++ b/src/content/reference/en/p5.sound/p5.Pulse.mdx @@ -2,7 +2,7 @@ title: p5.Pulse module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Creates a Pulse object, an oscillator that implements Pulse Width Modulation. @@ -60,7 +60,7 @@ methods: description: |
Set the width of a Pulse object (an oscillator that implements Pulse Width Modulation).
- path: p5.Pulse/width + path: src\content\reference\en\p5.Pulse/width chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Reverb.mdx b/src/content/reference/en/p5.sound/p5.Reverb.mdx index 2894566d27..8f3dfd14fa 100644 --- a/src/content/reference/en/p5.sound/p5.Reverb.mdx +++ b/src/content/reference/en/p5.sound/p5.Reverb.mdx @@ -2,7 +2,7 @@ title: p5.Reverb module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >Reverb adds depth to a sound through a large number of decaying @@ -69,24 +69,24 @@ methods: process: description: |
Connect a source to the reverb, and assign reverb parameters.
- path: p5.Reverb/process + path: src\content\reference\en\p5.Reverb/process set: description: |Set the reverb settings. Similar to .process(), but without assigning a new input.
- path: p5.Reverb/set + path: src\content\reference\en\p5.Reverb/set amp: description: |Set the output level of the reverb effect.
- path: p5.Reverb/amp + path: src\content\reference\en\p5.Reverb/amp connect: description: |Send output to a p5.sound or web audio object
- path: p5.Reverb/connect + path: src\content\reference\en\p5.Reverb/connect disconnect: description: |Disconnect all output.
- path: p5.Reverb/disconnect + path: src\content\reference\en\p5.Reverb/disconnect chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.SawOsc.mdx b/src/content/reference/en/p5.sound/p5.SawOsc.mdx index 0ba76fe10d..df87775b24 100644 --- a/src/content/reference/en/p5.sound/p5.SawOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.SawOsc.mdx @@ -2,7 +2,7 @@ title: p5.SawOsc module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Constructor: new p5.SawOsc().
This creates a SawTooth Wave Oscillator and is
diff --git a/src/content/reference/en/p5.sound/p5.Score.mdx b/src/content/reference/en/p5.sound/p5.Score.mdx
index d4f2d867d7..e216fe0a27 100644
--- a/src/content/reference/en/p5.sound/p5.Score.mdx
+++ b/src/content/reference/en/p5.sound/p5.Score.mdx
@@ -2,7 +2,7 @@
title: p5.Score
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
A Score consists of a series of Parts. The parts will be played back in order. For example, you could have an @@ -21,29 +21,29 @@ methods: start: description: |
Start playback of the score.
- path: p5.Score/start + path: src\content\reference\en\p5.Score/start stop: description: |Stop playback of the score.
- path: p5.Score/stop + path: src\content\reference\en\p5.Score/stop pause: description: |Pause playback of the score.
- path: p5.Score/pause + path: src\content\reference\en\p5.Score/pause loop: description: |Loop playback of the score.
- path: p5.Score/loop + path: src\content\reference\en\p5.Score/loop noLoop: description: |Stop looping playback of the score. If it is currently playing, this will go into effect after the current round of playback completes.
- path: p5.Score/noLoop + path: src\content\reference\en\p5.Score/noLoop setBPM: description: |Set the tempo for all parts in the score
- path: p5.Score/setBPM + path: src\content\reference\en\p5.Score/setBPM chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.SinOsc.mdx b/src/content/reference/en/p5.sound/p5.SinOsc.mdx index b103bf3b89..29ba23643c 100644 --- a/src/content/reference/en/p5.sound/p5.SinOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.SinOsc.mdx @@ -2,7 +2,7 @@ title: p5.SinOsc module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Constructor: new p5.SinOsc().
This creates a Sine Wave Oscillator and is
diff --git a/src/content/reference/en/p5.sound/p5.SoundFile.mdx b/src/content/reference/en/p5.sound/p5.SoundFile.mdx
index a5bb335e51..a6210f7476 100644
--- a/src/content/reference/en/p5.sound/p5.SoundFile.mdx
+++ b/src/content/reference/en/p5.sound/p5.SoundFile.mdx
@@ -2,7 +2,7 @@
title: p5.SoundFile
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |-
SoundFile object with a path to a file.
@@ -79,11 +79,11 @@ methods: isLoaded: description: |Returns true if the sound file finished loading successfully.
- path: p5.SoundFile/isLoaded + path: src\content\reference\en\p5.SoundFile/isLoaded play: description: |Play the p5.SoundFile
- path: p5.SoundFile/play + path: src\content\reference\en\p5.SoundFile/play playMode: description: |p5.SoundFile has two play modes: restart and
@@ -93,7 +93,7 @@ methods:
new playback. In restart mode, play() will stop playback
and start over. With untilDone, a sound will play only if it's
not already playing. Sustain is the default mode.
Pauses a file that is currently playing. If the file is not @@ -102,54 +102,54 @@ methods: position. If p5.SoundFile had been set to loop before it was paused, it will continue to loop after it is unpaused with .play().
- path: p5.SoundFile/pause + path: src\content\reference\en\p5.SoundFile/pause loop: description: |Loop the p5.SoundFile. Accepts optional parameters to set the playback rate, playback volume, loopStart, loopEnd.
- path: p5.SoundFile/loop + path: src\content\reference\en\p5.SoundFile/loop setLoop: description: |Set a p5.SoundFile's looping flag to true or false. If the sound is currently playing, this change will take effect when it reaches the end of the current playback.
- path: p5.SoundFile/setLoop + path: src\content\reference\en\p5.SoundFile/setLoop isLooping: description: >Returns 'true' if a p5.SoundFile is currently looping and playing, 'false' if not.
- path: p5.SoundFile/isLooping + path: src\content\reference\en\p5.SoundFile/isLooping isPlaying: description: |Returns true if a p5.SoundFile is playing, false if not (i.e. paused or stopped).
- path: p5.SoundFile/isPlaying + path: src\content\reference\en\p5.SoundFile/isPlaying isPaused: description: |Returns true if a p5.SoundFile is paused, false if not (i.e. playing or stopped).
- path: p5.SoundFile/isPaused + path: src\content\reference\en\p5.SoundFile/isPaused stop: description: |Stop soundfile playback.
- path: p5.SoundFile/stop + path: src\content\reference\en\p5.SoundFile/stop pan: description: |Set the stereo panning of a p5.sound object to a floating point number between -1.0 (left) and 1.0 (right). Default is 0.0 (center).
- path: p5.SoundFile/pan + path: src\content\reference\en\p5.SoundFile/pan getPan: description: |Returns the current stereo pan position (-1.0 to 1.0)
- path: p5.SoundFile/getPan + path: src\content\reference\en\p5.SoundFile/getPan rate: description: >Set the playback rate of a sound file. Will change the speed and the pitch. Values less than zero will reverse the audio buffer.
- path: p5.SoundFile/rate + path: src\content\reference\en\p5.SoundFile/rate setVolume: description: |Multiply the output volume (amplitude) of a sound file @@ -160,11 +160,11 @@ methods: complex fades, see the Envelope class.
Alternately, you can pass in a signal source such as an oscillator to modulate the amplitude with an audio signal.
- path: p5.SoundFile/setVolume + path: src\content\reference\en\p5.SoundFile/setVolume duration: description: |Returns the duration of a sound file in seconds.
- path: p5.SoundFile/duration + path: src\content\reference\en\p5.SoundFile/duration currentTime: description: >Return the current position of the p5.SoundFile playhead, in seconds.
@@ -173,7 +173,7 @@ methods:
reverseBuffer
has been called, currentTime will count backwards.
Move the playhead of a soundfile that is currently playing to a
@@ -186,21 +186,21 @@ methods:
not currently playing, use the play or loop
methods.
Return the number of channels in a sound file. For example, Mono = 1, Stereo = 2.
- path: p5.SoundFile/channels + path: src\content\reference\en\p5.SoundFile/channels sampleRate: description: |Return the sample rate of the sound file.
- path: p5.SoundFile/sampleRate + path: src\content\reference\en\p5.SoundFile/sampleRate frames: description: |Return the number of samples in a sound file. Equal to sampleRate * duration.
- path: p5.SoundFile/frames + path: src\content\reference\en\p5.SoundFile/frames getPeaks: description: |Returns an array of amplitude peaks in a p5.SoundFile that can be @@ -209,12 +209,12 @@ methods: parameter, 'length', which determines size of the array. Larger arrays result in more precise waveform visualizations.
Inspired by Wavesurfer.js.
- path: p5.SoundFile/getPeaks + path: src\content\reference\en\p5.SoundFile/getPeaks reverseBuffer: description: |Reverses the p5.SoundFile's buffer source. Playback must be handled separately (see example).
- path: p5.SoundFile/reverseBuffer + path: src\content\reference\en\p5.SoundFile/reverseBuffer onended: description: |Schedule an event to be called when the soundfile @@ -222,7 +222,7 @@ methods: playing through once, this will be called when it ends. If it is looping, it will be called when stop is called.
- path: p5.SoundFile/onended + path: src\content\reference\en\p5.SoundFile/onended connect: description: |Connects the output of a p5sound object to input of another @@ -230,20 +230,20 @@ methods: FFT or an Effect. If no parameter is given, it will connect to the main output. Most p5sound objects connect to the master output when they are created.
- path: p5.SoundFile/connect + path: src\content\reference\en\p5.SoundFile/connect disconnect: description: |Disconnects the output of this p5sound object.
- path: p5.SoundFile/disconnect + path: src\content\reference\en\p5.SoundFile/disconnect setPath: description: |Reset the source for this SoundFile to a new path (URL).
- path: p5.SoundFile/setPath + path: src\content\reference\en\p5.SoundFile/setPath setBuffer: description: |Replace the current Audio Buffer with a new Buffer.
- path: p5.SoundFile/setBuffer + path: src\content\reference\en\p5.SoundFile/setBuffer addCue: description: |Schedule events to trigger every time a MediaElement @@ -252,23 +252,23 @@ methods: the callback, and an optional parameter for the callback.
Time will be passed as the first parameter to the callback function, and param will be the second parameter.
- path: p5.SoundFile/addCue + path: src\content\reference\en\p5.SoundFile/addCue removeCue: description: |Remove a callback based on its ID. The ID is returned by the addCue method.
- path: p5.SoundFile/removeCue + path: src\content\reference\en\p5.SoundFile/removeCue clearCues: description: |Remove all of the callbacks that had originally been scheduled via the addCue method.
- path: p5.SoundFile/clearCues + path: src\content\reference\en\p5.SoundFile/clearCues save: description: |Save a p5.SoundFile as a .wav file. The browser will prompt the user to download the file to their device. To upload a file to a server, see getBlob
- path: p5.SoundFile/save + path: src\content\reference\en\p5.SoundFile/save getBlob: description: >This method is useful for sending a SoundFile to a server. It returns
@@ -277,7 +277,7 @@ methods:
.wav-encoded audio data as a "Blob".
+ href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">Blob".
A Blob is a file-like data object that can be uploaded to a server
@@ -291,7 +291,7 @@ methods:
and attach the blob as one of the form values using
FormData.
SoundLoop
line: 9673 @@ -65,15 +65,15 @@ methods: start: description: |Start the loop
- path: p5.SoundLoop/start + path: src\content\reference\en\p5.SoundLoop/start stop: description: |Stop the loop
- path: p5.SoundLoop/stop + path: src\content\reference\en\p5.SoundLoop/stop pause: description: |Pause the loop
- path: p5.SoundLoop/pause + path: src\content\reference\en\p5.SoundLoop/pause syncedStart: description: >Synchronize loops. Use this method to start two or more loops in @@ -85,7 +85,7 @@ methods: master loop i.e. loopToStart.syncedStart(loopToSyncWith)
- path: p5.SoundLoop/syncedStart + path: src\content\reference\en\p5.SoundLoop/syncedStart properties: bpm: description: > @@ -95,31 +95,31 @@ properties: frequency, that will be reflected after the next callback beats per minute (defaults to 60) - path: p5.SoundLoop/bpm + path: src\content\reference\en\p5.SoundLoop/bpm timeSignature: description: |number of quarter notes in a measure (defaults to 4)
- path: p5.SoundLoop/timeSignature + path: src\content\reference\en\p5.SoundLoop/timeSignature interval: description: |length of the loops interval
- path: p5.SoundLoop/interval + path: src\content\reference\en\p5.SoundLoop/interval iterations: description: |how many times the callback has been called so far
- path: p5.SoundLoop/iterations + path: src\content\reference\en\p5.SoundLoop/iterations musicalTimeMode: description: >musicalTimeMode uses Tone.Time + href="https://github.com/Tonejs/Tone.js/wiki/Time">Tone.Time convention true if string, false if number
- path: p5.SoundLoop/musicalTimeMode + path: src\content\reference\en\p5.SoundLoop/musicalTimeMode maxIterations: description: |Set a limit to the number of loops to play. defaults to Infinity
- path: p5.SoundLoop/maxIterations + path: src\content\reference\en\p5.SoundLoop/maxIterations chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.SoundRecorder.mdx b/src/content/reference/en/p5.sound/p5.SoundRecorder.mdx index ae53f7fa5f..fda317a166 100644 --- a/src/content/reference/en/p5.sound/p5.SoundRecorder.mdx +++ b/src/content/reference/en/p5.sound/p5.SoundRecorder.mdx @@ -2,7 +2,7 @@ title: p5.SoundRecorder module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |-Record sounds for playback and/or to save as a .wav file. The p5.SoundRecorder records all sound output from your sketch, @@ -83,7 +83,7 @@ methods:
Connect a specific device to the p5.SoundRecorder. If no parameter is given, p5.SoundRecorer will record all audible p5.sound from your sketch.
- path: p5.SoundRecorder/setInput + path: src\content\reference\en\p5.SoundRecorder/setInput record: description: |Start recording. To access the recording, provide @@ -93,14 +93,14 @@ methods: (in seconds) of the recording, and a callback function that will be called once the complete recording has been transfered to the p5.SoundFile.
- path: p5.SoundRecorder/record + path: src\content\reference\en\p5.SoundRecorder/record stop: description: |Stop the recording. Once the recording is stopped, the results will be sent to the p5.SoundFile that was given on .record(), and if a callback function was provided on record, that function will be called.
- path: p5.SoundRecorder/stop + path: src\content\reference\en\p5.SoundRecorder/stop chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.SqrOsc.mdx b/src/content/reference/en/p5.sound/p5.SqrOsc.mdx index 11e9769ff1..9606640f8f 100644 --- a/src/content/reference/en/p5.sound/p5.SqrOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.SqrOsc.mdx @@ -2,7 +2,7 @@ title: p5.SqrOsc module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Constructor: new p5.SqrOsc().
This creates a Square Wave Oscillator and is
diff --git a/src/content/reference/en/p5.sound/p5.TriOsc.mdx b/src/content/reference/en/p5.sound/p5.TriOsc.mdx
index 96e24afbc0..66ba259a97 100644
--- a/src/content/reference/en/p5.sound/p5.TriOsc.mdx
+++ b/src/content/reference/en/p5.sound/p5.TriOsc.mdx
@@ -2,7 +2,7 @@
title: p5.TriOsc
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Constructor: new p5.TriOsc().
This creates a Triangle Wave Oscillator and is
diff --git a/src/content/reference/en/p5/abs.mdx b/src/content/reference/en/p5/abs.mdx
index 64974a6548..ea9d4474ed 100644
--- a/src/content/reference/en/p5/abs.mdx
+++ b/src/content/reference/en/p5/abs.mdx
@@ -2,7 +2,7 @@
title: abs
module: Math
submodule: Calculation
-file: src/math/calculation.js
+file: src\math\calculation.js
description: >
Calculates the absolute value of a number.
diff --git a/src/content/reference/en/p5/accelerationX.mdx b/src/content/reference/en/p5/accelerationX.mdx index 14edb024b5..f06a7ce902 100644 --- a/src/content/reference/en/p5/accelerationX.mdx +++ b/src/content/reference/en/p5/accelerationX.mdx @@ -2,7 +2,7 @@ title: accelerationX module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >The system variable accelerationX always contains the acceleration of the diff --git a/src/content/reference/en/p5/accelerationY.mdx b/src/content/reference/en/p5/accelerationY.mdx index 4e9deb8f0d..cd66dbfcf6 100644 --- a/src/content/reference/en/p5/accelerationY.mdx +++ b/src/content/reference/en/p5/accelerationY.mdx @@ -2,7 +2,7 @@ title: accelerationY module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The system variable accelerationY always contains the acceleration of the diff --git a/src/content/reference/en/p5/accelerationZ.mdx b/src/content/reference/en/p5/accelerationZ.mdx index ac646333b0..ee9d25616b 100644 --- a/src/content/reference/en/p5/accelerationZ.mdx +++ b/src/content/reference/en/p5/accelerationZ.mdx @@ -2,7 +2,7 @@ title: accelerationZ module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The system variable accelerationZ always contains the acceleration of the diff --git a/src/content/reference/en/p5/acos.mdx b/src/content/reference/en/p5/acos.mdx index fdf96c404c..62c4a4b47a 100644 --- a/src/content/reference/en/p5/acos.mdx +++ b/src/content/reference/en/p5/acos.mdx @@ -2,7 +2,7 @@ title: acos module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: >
Calculates the arc cosine of a number.
diff --git a/src/content/reference/en/p5/alpha.mdx b/src/content/reference/en/p5/alpha.mdx index 9c389580de..eba9e82890 100644 --- a/src/content/reference/en/p5/alpha.mdx +++ b/src/content/reference/en/p5/alpha.mdx @@ -2,7 +2,7 @@ title: alpha module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >Gets the alpha (transparency) value of a color.
diff --git a/src/content/reference/en/p5/ambientLight.mdx b/src/content/reference/en/p5/ambientLight.mdx index b241dd85c2..4f254c6764 100644 --- a/src/content/reference/en/p5/ambientLight.mdx +++ b/src/content/reference/en/p5/ambientLight.mdx @@ -2,7 +2,7 @@ title: ambientLight module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >Creates a light that shines from all directions.
diff --git a/src/content/reference/en/p5/ambientMaterial.mdx b/src/content/reference/en/p5/ambientMaterial.mdx index 2e891ceb1b..d79b4af121 100644 --- a/src/content/reference/en/p5/ambientMaterial.mdx +++ b/src/content/reference/en/p5/ambientMaterial.mdx @@ -2,7 +2,7 @@ title: ambientMaterial module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Sets the ambient color of shapes’ surface material.
diff --git a/src/content/reference/en/p5/angleMode.mdx b/src/content/reference/en/p5/angleMode.mdx index 3196b9ed9d..d8dbbcdc64 100644 --- a/src/content/reference/en/p5/angleMode.mdx +++ b/src/content/reference/en/p5/angleMode.mdx @@ -2,7 +2,7 @@ title: angleMode module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: >Changes the unit system used to measure angles.
diff --git a/src/content/reference/en/p5/append.mdx b/src/content/reference/en/p5/append.mdx index 280dcb1660..e5ef295e27 100644 --- a/src/content/reference/en/p5/append.mdx +++ b/src/content/reference/en/p5/append.mdx @@ -2,7 +2,7 @@ title: append module: Data submodule: Array Functions -file: src/utilities/array_functions.js +file: src\utilities\array_functions.js description: |Adds a value to the end of an array. Extends the length of the array by one. Maps to Array.push().
diff --git a/src/content/reference/en/p5/applyMatrix.mdx b/src/content/reference/en/p5/applyMatrix.mdx index 5a43b9f169..e412d7b2a4 100644 --- a/src/content/reference/en/p5/applyMatrix.mdx +++ b/src/content/reference/en/p5/applyMatrix.mdx @@ -2,7 +2,7 @@ title: applyMatrix module: Transform submodule: Transform -file: src/core/transform.js +file: src\core\transform.js description: >Applies a transformation matrix to the coordinate system.
@@ -23,11 +23,11 @@ description: >applyMatrix() allows for many transformations to be applied at
once. See
- Wikipedia
and MDN
for more details about transformations.
Draws an arc.
diff --git a/src/content/reference/en/p5/arrayCopy.mdx b/src/content/reference/en/p5/arrayCopy.mdx index 63f0254777..bae56b21f7 100644 --- a/src/content/reference/en/p5/arrayCopy.mdx +++ b/src/content/reference/en/p5/arrayCopy.mdx @@ -2,7 +2,7 @@ title: arrayCopy module: Data submodule: Array Functions -file: src/utilities/array_functions.js +file: src\utilities\array_functions.js description: >Copies an array (or part of an array) to another array. The src array is diff --git a/src/content/reference/en/p5/asin.mdx b/src/content/reference/en/p5/asin.mdx index 3a9a2e3e31..1658c7dbf8 100644 --- a/src/content/reference/en/p5/asin.mdx +++ b/src/content/reference/en/p5/asin.mdx @@ -2,7 +2,7 @@ title: asin module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: >
Calculates the arc sine of a number.
diff --git a/src/content/reference/en/p5/atan.mdx b/src/content/reference/en/p5/atan.mdx index d79b9dd5f8..66a8b0ebaf 100644 --- a/src/content/reference/en/p5/atan.mdx +++ b/src/content/reference/en/p5/atan.mdx @@ -2,7 +2,7 @@ title: atan module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: >Calculates the arc tangent of a number.
diff --git a/src/content/reference/en/p5/atan2.mdx b/src/content/reference/en/p5/atan2.mdx index 1dd114da96..933c81294b 100644 --- a/src/content/reference/en/p5/atan2.mdx +++ b/src/content/reference/en/p5/atan2.mdx @@ -2,7 +2,7 @@ title: atan2 module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: >Calculates the angle formed by a point, the origin, and the positive diff --git a/src/content/reference/en/p5/background.mdx b/src/content/reference/en/p5/background.mdx index 6e83c4b14c..e3331f312a 100644 --- a/src/content/reference/en/p5/background.mdx +++ b/src/content/reference/en/p5/background.mdx @@ -2,7 +2,7 @@ title: background module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >
Sets the color used for the background of the canvas.
diff --git a/src/content/reference/en/p5/baseColorShader.mdx b/src/content/reference/en/p5/baseColorShader.mdx index bd66263c0b..28233e29ab 100644 --- a/src/content/reference/en/p5/baseColorShader.mdx +++ b/src/content/reference/en/p5/baseColorShader.mdx @@ -2,7 +2,7 @@ title: baseColorShader module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Get the shader used when no lights or materials are applied.
diff --git a/src/content/reference/en/p5/baseMaterialShader.mdx b/src/content/reference/en/p5/baseMaterialShader.mdx index 81a2788982..b832ef8045 100644 --- a/src/content/reference/en/p5/baseMaterialShader.mdx +++ b/src/content/reference/en/p5/baseMaterialShader.mdx @@ -2,7 +2,7 @@ title: baseMaterialShader module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Get the default shader used with lights, materials, diff --git a/src/content/reference/en/p5/baseNormalShader.mdx b/src/content/reference/en/p5/baseNormalShader.mdx index 9b70aafb2e..d5dfa0df76 100644 --- a/src/content/reference/en/p5/baseNormalShader.mdx +++ b/src/content/reference/en/p5/baseNormalShader.mdx @@ -2,7 +2,7 @@ title: baseNormalShader module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >
Get the shader used by normalMaterial().
Get the shader used when drawing the strokes of shapes.
diff --git a/src/content/reference/en/p5/beginClip.mdx b/src/content/reference/en/p5/beginClip.mdx index 101fa6f8f2..0773923d7d 100644 --- a/src/content/reference/en/p5/beginClip.mdx +++ b/src/content/reference/en/p5/beginClip.mdx @@ -2,7 +2,7 @@ title: beginClip module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Starts defining a shape that will mask any shapes drawn afterward.
diff --git a/src/content/reference/en/p5/beginContour.mdx b/src/content/reference/en/p5/beginContour.mdx index 9803da0cd7..f481e1b2c7 100644 --- a/src/content/reference/en/p5/beginContour.mdx +++ b/src/content/reference/en/p5/beginContour.mdx @@ -2,7 +2,7 @@ title: beginContour module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >Begins creating a hole within a flat shape.
diff --git a/src/content/reference/en/p5/beginGeometry.mdx b/src/content/reference/en/p5/beginGeometry.mdx index 43d9036d5b..49f08116c2 100644 --- a/src/content/reference/en/p5/beginGeometry.mdx +++ b/src/content/reference/en/p5/beginGeometry.mdx @@ -2,7 +2,7 @@ title: beginGeometry module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Begins adding shapes to a new diff --git a/src/content/reference/en/p5/beginShape.mdx b/src/content/reference/en/p5/beginShape.mdx index f8a3ac24a2..8eb3d2c3d5 100644 --- a/src/content/reference/en/p5/beginShape.mdx +++ b/src/content/reference/en/p5/beginShape.mdx @@ -2,7 +2,7 @@ title: beginShape module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >
Begins adding vertices to a custom shape.
diff --git a/src/content/reference/en/p5/bezier.mdx b/src/content/reference/en/p5/bezier.mdx index 8b2db69e7a..07c8115bc4 100644 --- a/src/content/reference/en/p5/bezier.mdx +++ b/src/content/reference/en/p5/bezier.mdx @@ -2,7 +2,7 @@ title: bezier module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Draws a Bézier curve.
diff --git a/src/content/reference/en/p5/bezierDetail.mdx b/src/content/reference/en/p5/bezierDetail.mdx index 285674a1c9..15738bd26e 100644 --- a/src/content/reference/en/p5/bezierDetail.mdx +++ b/src/content/reference/en/p5/bezierDetail.mdx @@ -2,7 +2,7 @@ title: bezierDetail module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Sets the number of segments used to draw Bézier curves in WebGL mode.
diff --git a/src/content/reference/en/p5/bezierPoint.mdx b/src/content/reference/en/p5/bezierPoint.mdx index 32090ef835..e56c37b162 100644 --- a/src/content/reference/en/p5/bezierPoint.mdx +++ b/src/content/reference/en/p5/bezierPoint.mdx @@ -2,7 +2,7 @@ title: bezierPoint module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Calculates coordinates along a Bézier curve using interpolation.
diff --git a/src/content/reference/en/p5/bezierTangent.mdx b/src/content/reference/en/p5/bezierTangent.mdx index d9c761e443..5027e20640 100644 --- a/src/content/reference/en/p5/bezierTangent.mdx +++ b/src/content/reference/en/p5/bezierTangent.mdx @@ -2,7 +2,7 @@ title: bezierTangent module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Calculates coordinates along a line that's tangent to a Bézier curve.
diff --git a/src/content/reference/en/p5/bezierVertex.mdx b/src/content/reference/en/p5/bezierVertex.mdx index bcdfde55c9..e0f3650246 100644 --- a/src/content/reference/en/p5/bezierVertex.mdx +++ b/src/content/reference/en/p5/bezierVertex.mdx @@ -2,7 +2,7 @@ title: bezierVertex module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >Adds a Bézier curve segment to a custom shape.
diff --git a/src/content/reference/en/p5/blend.mdx b/src/content/reference/en/p5/blend.mdx index 27d397991c..9327292dec 100644 --- a/src/content/reference/en/p5/blend.mdx +++ b/src/content/reference/en/p5/blend.mdx @@ -2,7 +2,7 @@ title: blend module: Image submodule: Pixels -file: src/image/pixels.js +file: src\image\pixels.js description: >Copies a region of pixels from one image to another.
diff --git a/src/content/reference/en/p5/blendMode.mdx b/src/content/reference/en/p5/blendMode.mdx index 8ffe625fbd..e5741312ea 100644 --- a/src/content/reference/en/p5/blendMode.mdx +++ b/src/content/reference/en/p5/blendMode.mdx @@ -2,7 +2,7 @@ title: blendMode module: Rendering submodule: Rendering -file: src/core/rendering.js +file: src\core\rendering.js description: >Sets the way colors blend when added to the canvas.
diff --git a/src/content/reference/en/p5/blue.mdx b/src/content/reference/en/p5/blue.mdx index b6ba1b8848..10523a4c9e 100644 --- a/src/content/reference/en/p5/blue.mdx +++ b/src/content/reference/en/p5/blue.mdx @@ -2,7 +2,7 @@ title: blue module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >Gets the blue value of a color.
diff --git a/src/content/reference/en/p5/boolean.mdx b/src/content/reference/en/p5/boolean.mdx index 1fbc9e9237..f737d8ed22 100644 --- a/src/content/reference/en/p5/boolean.mdx +++ b/src/content/reference/en/p5/boolean.mdx @@ -2,7 +2,7 @@ title: boolean module: Data submodule: Conversion -file: src/utilities/conversion.js +file: src\utilities\conversion.js description: >Converts a String or Number to a
Boolean.
Draws a box (rectangular prism).
diff --git a/src/content/reference/en/p5/brightness.mdx b/src/content/reference/en/p5/brightness.mdx index 5631384233..ca82d6f191 100644 --- a/src/content/reference/en/p5/brightness.mdx +++ b/src/content/reference/en/p5/brightness.mdx @@ -2,7 +2,7 @@ title: brightness module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >Gets the brightness value of a color.
diff --git a/src/content/reference/en/p5/buildGeometry.mdx b/src/content/reference/en/p5/buildGeometry.mdx index 86a65983e3..469fff6478 100644 --- a/src/content/reference/en/p5/buildGeometry.mdx +++ b/src/content/reference/en/p5/buildGeometry.mdx @@ -2,7 +2,7 @@ title: buildGeometry module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Creates a custom p5.Geometry object from diff --git a/src/content/reference/en/p5/byte.mdx b/src/content/reference/en/p5/byte.mdx index db846c64c2..a92f42163a 100644 --- a/src/content/reference/en/p5/byte.mdx +++ b/src/content/reference/en/p5/byte.mdx @@ -2,7 +2,7 @@ title: byte module: Data submodule: Conversion -file: src/utilities/conversion.js +file: src\utilities\conversion.js description: >
Converts a Boolean, String, or
Number to its byte value.
Sets the position and orientation of the current camera in a 3D sketch.
diff --git a/src/content/reference/en/p5/ceil.mdx b/src/content/reference/en/p5/ceil.mdx index 459b773fda..c7273ce99b 100644 --- a/src/content/reference/en/p5/ceil.mdx +++ b/src/content/reference/en/p5/ceil.mdx @@ -2,7 +2,7 @@ title: ceil module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >Calculates the closest integer value that is greater than or equal to a diff --git a/src/content/reference/en/p5/changed.mdx b/src/content/reference/en/p5/changed.mdx index 216729f824..52a6b3ecf8 100644 --- a/src/content/reference/en/p5/changed.mdx +++ b/src/content/reference/en/p5/changed.mdx @@ -2,7 +2,7 @@ title: changed module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: |
Calls a function when the element changes.
Calling myElement.changed(false) disables the function.
Converts a Number or String to a single-character
String.
See MDN for more information about conversions.
diff --git a/src/content/reference/en/p5/circle.mdx b/src/content/reference/en/p5/circle.mdx index 5d60fbb3cc..104c7d3839 100644 --- a/src/content/reference/en/p5/circle.mdx +++ b/src/content/reference/en/p5/circle.mdx @@ -2,7 +2,7 @@ title: circle module: Shape submodule: 2D Primitives -file: src/core/shape/2d_primitives.js +file: src\core\shape\2d_primitives.js description: >Draws a circle.
diff --git a/src/content/reference/en/p5/class.mdx b/src/content/reference/en/p5/class.mdx index 400957b6cb..6db17d3682 100644 --- a/src/content/reference/en/p5/class.mdx +++ b/src/content/reference/en/p5/class.mdx @@ -2,7 +2,7 @@ title: class module: Foundation submodule: Foundation -file: src/core/reference.js +file: src\core\reference.js description: "A template for creating objects of a particular type.
\nClasses can make it easier to program with objects. For example, a Frog\nclass could create objects that behave like frogs. Each object created\nusing a class is called an instance of that class. All instances of a class\nare the same type. Here's an example of creating an instance of a Frog\nclass:
let fifi = new Frog(50, 50, 20);\n\nThe variable fifi refers to an instance of the Frog class. The keyword\nnew is used to call the Frog class' constructor in the statement\nnew Frog(). Altogether, a new Frog object was created and assigned to\nthe variable fifi. Classes are templates, so they can be used to create\nmore than one instance:
// First Frog instance.\nlet frog1 = new Frog(25, 50, 10);\n\n// Second Frog instance.\nlet frog2 = new Frog(75, 50, 10);\n\nA simple Frog class could be declared as follows:
class Frog {\n constructor(x, y, size) {\n // This code runs once when an instance is created.\n this.x = x;\n this.y = y;\n this.size = size;\n }\n\n show() {\n // This code runs once when myFrog.show() is called.\n textAlign(CENTER, CENTER);\n textSize(this.size);\n text('\U0001F438', this.x, this.y);\n }\n\n hop() {\n // This code runs once when myFrog.hop() is called.\n this.x += random(-10, 10);\n this.y += random(-10, 10);\n }\n}\n\nClass declarations begin with the keyword class followed by the class\nname, such as Frog, and curly braces {}. Class names should use\nPascalCase and can't have spaces in their names. For example, naming a\nclass Kermit The Frog with spaces between each word would throw a\nSyntaxError. The code between the curly braces {} defines the class.
Functions that belong to a class are called methods. constructor(),\nshow(), and hop() are methods in the Frog class. Methods define an\nobject's behavior. Methods can accept parameters and return values, just\nlike functions. Note that methods don't use the function keyword.
constructor() is a special method that's called once when an instance of\nthe class is created. The statement new Frog() calls the Frog class'\nconstructor() method.
A class definition is a template for instances. The keyword this refers\nto an instance's data and methods. For example, each Frog instance has\nunique coordinates stored in this.x and this.y. The show() method\nuses those coordinates to draw the frog. The hop() method updates those\ncoordinates when called. Once a Frog instance is created, its data and\nmethods can be accessed using the dot operator . as follows:
// Draw a lily pad.\nfill('green');\nstroke('green');\ncircle(fifi.x, fifi.y, 2 * fifi.size);\n\n// Show the Frog.\nfifi.show();\n\n// Hop.\nfifi.hop();\n\n"
line: 1329
isConstructor: false
diff --git a/src/content/reference/en/p5/clear.mdx b/src/content/reference/en/p5/clear.mdx
index ce6b900922..1072a5ac46 100644
--- a/src/content/reference/en/p5/clear.mdx
+++ b/src/content/reference/en/p5/clear.mdx
@@ -2,7 +2,7 @@
title: clear
module: Color
submodule: Setting
-file: src/color/setting.js
+file: src\color\setting.js
description: >
Clears the pixels on the canvas.
diff --git a/src/content/reference/en/p5/clearDepth.mdx b/src/content/reference/en/p5/clearDepth.mdx index 83ef1f2113..f2e59f3415 100644 --- a/src/content/reference/en/p5/clearDepth.mdx +++ b/src/content/reference/en/p5/clearDepth.mdx @@ -2,7 +2,7 @@ title: clearDepth module: Rendering submodule: Rendering -file: src/core/rendering.js +file: src\core\rendering.js description: >Clears the depth buffer in WebGL mode.
diff --git a/src/content/reference/en/p5/clearStorage.mdx b/src/content/reference/en/p5/clearStorage.mdx index 5698e16eee..81da92bf6f 100644 --- a/src/content/reference/en/p5/clearStorage.mdx +++ b/src/content/reference/en/p5/clearStorage.mdx @@ -2,14 +2,13 @@ title: clearStorage module: Data submodule: LocalStorage -file: src/data/local_storage.js +file: src\data\local_storage.js description: >Removes all items in the web browser's local storage.
Web browsers can save small amounts of data using the built-in
- localStorage object.
Data stored in localStorage can be retrieved at any point, even
diff --git a/src/content/reference/en/p5/clip.mdx b/src/content/reference/en/p5/clip.mdx
index 2f85b585af..47aa90a196 100644
--- a/src/content/reference/en/p5/clip.mdx
+++ b/src/content/reference/en/p5/clip.mdx
@@ -2,7 +2,7 @@
title: clip
module: Color
submodule: Setting
-file: src/color/setting.js
+file: src\color\setting.js
description: >
Defines a shape that will mask any shapes drawn afterward.
diff --git a/src/content/reference/en/p5/color.mdx b/src/content/reference/en/p5/color.mdx index 35b4b0a5f5..48b7c651f2 100644 --- a/src/content/reference/en/p5/color.mdx +++ b/src/content/reference/en/p5/color.mdx @@ -2,7 +2,7 @@ title: color module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >Creates a p5.Color object.
diff --git a/src/content/reference/en/p5/colorMode.mdx b/src/content/reference/en/p5/colorMode.mdx index 769f0c379a..2a3b8ba21c 100644 --- a/src/content/reference/en/p5/colorMode.mdx +++ b/src/content/reference/en/p5/colorMode.mdx @@ -2,7 +2,7 @@ title: colorMode module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Changes the way color values are interpreted.
diff --git a/src/content/reference/en/p5/concat.mdx b/src/content/reference/en/p5/concat.mdx index 481f788ea7..61b5caacdf 100644 --- a/src/content/reference/en/p5/concat.mdx +++ b/src/content/reference/en/p5/concat.mdx @@ -2,7 +2,7 @@ title: concat module: Data submodule: Array Functions -file: src/utilities/array_functions.js +file: src\utilities\array_functions.js description: |Concatenates two arrays, maps to Array.concat(). Does not modify the input arrays.
diff --git a/src/content/reference/en/p5/cone.mdx b/src/content/reference/en/p5/cone.mdx index c423e18519..39de821f73 100644 --- a/src/content/reference/en/p5/cone.mdx +++ b/src/content/reference/en/p5/cone.mdx @@ -2,7 +2,7 @@ title: cone module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Draws a cone.
diff --git a/src/content/reference/en/p5/console.mdx b/src/content/reference/en/p5/console.mdx index 1695dd7373..0a99a5a806 100644 --- a/src/content/reference/en/p5/console.mdx +++ b/src/content/reference/en/p5/console.mdx @@ -2,11 +2,11 @@ title: console module: Foundation submodule: Foundation -file: src/core/reference.js +file: src\core\reference.js description: >Prints a message to the web browser's console.
-The The console object is helpful for printing messages while debugging. For example, it's diff --git a/src/content/reference/en/p5/constants/ADD.mdx b/src/content/reference/en/p5/constants/ADD.mdx index 4491ab7288..13faa48bbb 100644 --- a/src/content/reference/en/p5/constants/ADD.mdx +++ b/src/content/reference/en/p5/constants/ADD.mdx @@ -2,7 +2,7 @@ title: ADD module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 905 isConstructor: false diff --git a/src/content/reference/en/p5/constants/ALT.mdx b/src/content/reference/en/p5/constants/ALT.mdx index f28fbb2f33..7529bd2351 100644 --- a/src/content/reference/en/p5/constants/ALT.mdx +++ b/src/content/reference/en/p5/constants/ALT.mdx @@ -2,7 +2,7 @@ title: ALT module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 820 isConstructor: false diff --git a/src/content/reference/en/p5/constants/ARROW.mdx b/src/content/reference/en/p5/constants/ARROW.mdx index 26226f0bb8..0de5c99d07 100644 --- a/src/content/reference/en/p5/constants/ARROW.mdx +++ b/src/content/reference/en/p5/constants/ARROW.mdx @@ -2,7 +2,7 @@ title: ARROW module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 55 isConstructor: false diff --git a/src/content/reference/en/p5/constants/AUTO.mdx b/src/content/reference/en/p5/constants/AUTO.mdx index 4793e579e2..3da544bdf8 100644 --- a/src/content/reference/en/p5/constants/AUTO.mdx +++ b/src/content/reference/en/p5/constants/AUTO.mdx @@ -2,7 +2,7 @@ title: AUTO module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: >
AUTO allows us to automatically set the width or height of an element (but not both), diff --git a/src/content/reference/en/p5/constants/AXES.mdx b/src/content/reference/en/p5/constants/AXES.mdx index cda2063675..48c7a966a7 100644 --- a/src/content/reference/en/p5/constants/AXES.mdx +++ b/src/content/reference/en/p5/constants/AXES.mdx @@ -2,7 +2,7 @@ title: AXES module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1171 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BACKSPACE.mdx b/src/content/reference/en/p5/constants/BACKSPACE.mdx index 9d669879fd..f4f8078fa5 100644 --- a/src/content/reference/en/p5/constants/BACKSPACE.mdx +++ b/src/content/reference/en/p5/constants/BACKSPACE.mdx @@ -2,7 +2,7 @@ title: BACKSPACE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 826 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BASELINE.mdx b/src/content/reference/en/p5/constants/BASELINE.mdx index b97bb36ad3..cb620ed272 100644 --- a/src/content/reference/en/p5/constants/BASELINE.mdx +++ b/src/content/reference/en/p5/constants/BASELINE.mdx @@ -2,7 +2,7 @@ title: BASELINE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 675 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BEVEL.mdx b/src/content/reference/en/p5/constants/BEVEL.mdx index 07e5210938..cf95ecd8a8 100644 --- a/src/content/reference/en/p5/constants/BEVEL.mdx +++ b/src/content/reference/en/p5/constants/BEVEL.mdx @@ -2,7 +2,7 @@ title: BEVEL module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 777 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BEZIER.mdx b/src/content/reference/en/p5/constants/BEZIER.mdx index 400607edfe..07f2576032 100644 --- a/src/content/reference/en/p5/constants/BEZIER.mdx +++ b/src/content/reference/en/p5/constants/BEZIER.mdx @@ -2,7 +2,7 @@ title: BEZIER module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1073 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BLEND.mdx b/src/content/reference/en/p5/constants/BLEND.mdx index e9fed7efe0..28686ef536 100644 --- a/src/content/reference/en/p5/constants/BLEND.mdx +++ b/src/content/reference/en/p5/constants/BLEND.mdx @@ -2,7 +2,7 @@ title: BLEND module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 893 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BLUR.mdx b/src/content/reference/en/p5/constants/BLUR.mdx index 6f4fe1fc75..7f78450744 100644 --- a/src/content/reference/en/p5/constants/BLUR.mdx +++ b/src/content/reference/en/p5/constants/BLUR.mdx @@ -2,7 +2,7 @@ title: BLUR module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1019 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BOLD.mdx b/src/content/reference/en/p5/constants/BOLD.mdx index 2a19faaab7..4c2dbcef30 100644 --- a/src/content/reference/en/p5/constants/BOLD.mdx +++ b/src/content/reference/en/p5/constants/BOLD.mdx @@ -2,7 +2,7 @@ title: BOLD module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1036 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BOLDITALIC.mdx b/src/content/reference/en/p5/constants/BOLDITALIC.mdx index cd6237a5e0..5e155e23b8 100644 --- a/src/content/reference/en/p5/constants/BOLDITALIC.mdx +++ b/src/content/reference/en/p5/constants/BOLDITALIC.mdx @@ -2,7 +2,7 @@ title: BOLDITALIC module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1041 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BOTTOM.mdx b/src/content/reference/en/p5/constants/BOTTOM.mdx index 6c98d200f2..ed1b847cde 100644 --- a/src/content/reference/en/p5/constants/BOTTOM.mdx +++ b/src/content/reference/en/p5/constants/BOTTOM.mdx @@ -2,7 +2,7 @@ title: BOTTOM module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 670 isConstructor: false diff --git a/src/content/reference/en/p5/constants/BURN.mdx b/src/content/reference/en/p5/constants/BURN.mdx index 209900a322..ae46e73b2b 100644 --- a/src/content/reference/en/p5/constants/BURN.mdx +++ b/src/content/reference/en/p5/constants/BURN.mdx @@ -2,7 +2,7 @@ title: BURN module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 976 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CENTER.mdx b/src/content/reference/en/p5/constants/CENTER.mdx index 3ff0fbdc68..06bd142214 100644 --- a/src/content/reference/en/p5/constants/CENTER.mdx +++ b/src/content/reference/en/p5/constants/CENTER.mdx @@ -2,7 +2,7 @@ title: CENTER module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 660 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CHAR.mdx b/src/content/reference/en/p5/constants/CHAR.mdx index b97311bfc0..47e7a565b0 100644 --- a/src/content/reference/en/p5/constants/CHAR.mdx +++ b/src/content/reference/en/p5/constants/CHAR.mdx @@ -2,7 +2,7 @@ title: CHAR module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1046 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CHORD.mdx b/src/content/reference/en/p5/constants/CHORD.mdx index 9854ab6d6e..e53020541c 100644 --- a/src/content/reference/en/p5/constants/CHORD.mdx +++ b/src/content/reference/en/p5/constants/CHORD.mdx @@ -2,7 +2,7 @@ title: CHORD module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 750 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CLAMP.mdx b/src/content/reference/en/p5/constants/CLAMP.mdx index 3feb6ead54..a82974d70d 100644 --- a/src/content/reference/en/p5/constants/CLAMP.mdx +++ b/src/content/reference/en/p5/constants/CLAMP.mdx @@ -2,7 +2,7 @@ title: CLAMP module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1126 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CLOSE.mdx b/src/content/reference/en/p5/constants/CLOSE.mdx index b1d891f631..00d441eaed 100644 --- a/src/content/reference/en/p5/constants/CLOSE.mdx +++ b/src/content/reference/en/p5/constants/CLOSE.mdx @@ -2,7 +2,7 @@ title: CLOSE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 740 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CONTAIN.mdx b/src/content/reference/en/p5/constants/CONTAIN.mdx index ff23139368..b7ea260941 100644 --- a/src/content/reference/en/p5/constants/CONTAIN.mdx +++ b/src/content/reference/en/p5/constants/CONTAIN.mdx @@ -2,7 +2,7 @@ title: CONTAIN module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1188 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CONTROL.mdx b/src/content/reference/en/p5/constants/CONTROL.mdx index d8d5f85c9c..c02c9349ac 100644 --- a/src/content/reference/en/p5/constants/CONTROL.mdx +++ b/src/content/reference/en/p5/constants/CONTROL.mdx @@ -2,7 +2,7 @@ title: CONTROL module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 831 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CORNER.mdx b/src/content/reference/en/p5/constants/CORNER.mdx index 35b881949d..005d6724e8 100644 --- a/src/content/reference/en/p5/constants/CORNER.mdx +++ b/src/content/reference/en/p5/constants/CORNER.mdx @@ -2,7 +2,7 @@ title: CORNER module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 635 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CORNERS.mdx b/src/content/reference/en/p5/constants/CORNERS.mdx index 43d7dd4e4f..9faf6ba981 100644 --- a/src/content/reference/en/p5/constants/CORNERS.mdx +++ b/src/content/reference/en/p5/constants/CORNERS.mdx @@ -2,7 +2,7 @@ title: CORNERS module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 640 isConstructor: false diff --git a/src/content/reference/en/p5/constants/COVER.mdx b/src/content/reference/en/p5/constants/COVER.mdx index 0f4f4f12cb..c006f98348 100644 --- a/src/content/reference/en/p5/constants/COVER.mdx +++ b/src/content/reference/en/p5/constants/COVER.mdx @@ -2,7 +2,7 @@ title: COVER module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1194 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CROSS.mdx b/src/content/reference/en/p5/constants/CROSS.mdx index 5e799de3ab..4cf43c8d95 100644 --- a/src/content/reference/en/p5/constants/CROSS.mdx +++ b/src/content/reference/en/p5/constants/CROSS.mdx @@ -2,7 +2,7 @@ title: CROSS module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 60 isConstructor: false diff --git a/src/content/reference/en/p5/constants/CURVE.mdx b/src/content/reference/en/p5/constants/CURVE.mdx index c8787abd0d..6382a3eba4 100644 --- a/src/content/reference/en/p5/constants/CURVE.mdx +++ b/src/content/reference/en/p5/constants/CURVE.mdx @@ -2,7 +2,7 @@ title: CURVE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1078 isConstructor: false diff --git a/src/content/reference/en/p5/constants/DARKEST.mdx b/src/content/reference/en/p5/constants/DARKEST.mdx index e84a526aa1..b30819d029 100644 --- a/src/content/reference/en/p5/constants/DARKEST.mdx +++ b/src/content/reference/en/p5/constants/DARKEST.mdx @@ -2,7 +2,7 @@ title: DARKEST module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 913 isConstructor: false diff --git a/src/content/reference/en/p5/constants/DEGREES.mdx b/src/content/reference/en/p5/constants/DEGREES.mdx index 94026da6c1..9d506e4043 100644 --- a/src/content/reference/en/p5/constants/DEGREES.mdx +++ b/src/content/reference/en/p5/constants/DEGREES.mdx @@ -2,7 +2,7 @@ title: DEGREES module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: >
A String constant that's used to set the
diff --git a/src/content/reference/en/p5/constants/DELETE.mdx b/src/content/reference/en/p5/constants/DELETE.mdx
index 0c9d411d66..919c41a30f 100644
--- a/src/content/reference/en/p5/constants/DELETE.mdx
+++ b/src/content/reference/en/p5/constants/DELETE.mdx
@@ -2,7 +2,7 @@
title: DELETE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 836
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/DIFFERENCE.mdx b/src/content/reference/en/p5/constants/DIFFERENCE.mdx
index 302f4f0f9b..a889c282af 100644
--- a/src/content/reference/en/p5/constants/DIFFERENCE.mdx
+++ b/src/content/reference/en/p5/constants/DIFFERENCE.mdx
@@ -2,7 +2,7 @@
title: DIFFERENCE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 924
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/DILATE.mdx b/src/content/reference/en/p5/constants/DILATE.mdx
index 9fc3c21521..91c452a745 100644
--- a/src/content/reference/en/p5/constants/DILATE.mdx
+++ b/src/content/reference/en/p5/constants/DILATE.mdx
@@ -2,7 +2,7 @@
title: DILATE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1009
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/DODGE.mdx b/src/content/reference/en/p5/constants/DODGE.mdx
index bf83d377da..5b495e23b2 100644
--- a/src/content/reference/en/p5/constants/DODGE.mdx
+++ b/src/content/reference/en/p5/constants/DODGE.mdx
@@ -2,7 +2,7 @@
title: DODGE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 970
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/DOWN_ARROW.mdx b/src/content/reference/en/p5/constants/DOWN_ARROW.mdx
index 9a4d3b6b35..ace2959626 100644
--- a/src/content/reference/en/p5/constants/DOWN_ARROW.mdx
+++ b/src/content/reference/en/p5/constants/DOWN_ARROW.mdx
@@ -2,7 +2,7 @@
title: DOWN_ARROW
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 841
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/ENTER.mdx b/src/content/reference/en/p5/constants/ENTER.mdx
index f0cbd4fe34..d5b069227c 100644
--- a/src/content/reference/en/p5/constants/ENTER.mdx
+++ b/src/content/reference/en/p5/constants/ENTER.mdx
@@ -2,7 +2,7 @@
title: ENTER
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 846
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/ERODE.mdx b/src/content/reference/en/p5/constants/ERODE.mdx
index 634a3daf3f..b311559216 100644
--- a/src/content/reference/en/p5/constants/ERODE.mdx
+++ b/src/content/reference/en/p5/constants/ERODE.mdx
@@ -2,7 +2,7 @@
title: ERODE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1014
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/ESCAPE.mdx b/src/content/reference/en/p5/constants/ESCAPE.mdx
index 0651423f84..9b0bca5a28 100644
--- a/src/content/reference/en/p5/constants/ESCAPE.mdx
+++ b/src/content/reference/en/p5/constants/ESCAPE.mdx
@@ -2,7 +2,7 @@
title: ESCAPE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 851
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/EXCLUSION.mdx b/src/content/reference/en/p5/constants/EXCLUSION.mdx
index 8d1180ee7a..7fc2cba9a1 100644
--- a/src/content/reference/en/p5/constants/EXCLUSION.mdx
+++ b/src/content/reference/en/p5/constants/EXCLUSION.mdx
@@ -2,7 +2,7 @@
title: EXCLUSION
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 934
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/FALLBACK.mdx b/src/content/reference/en/p5/constants/FALLBACK.mdx
index 56dd49c9ec..beb06be488 100644
--- a/src/content/reference/en/p5/constants/FALLBACK.mdx
+++ b/src/content/reference/en/p5/constants/FALLBACK.mdx
@@ -2,7 +2,7 @@
title: FALLBACK
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1182
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/FILL.mdx b/src/content/reference/en/p5/constants/FILL.mdx
index b7b55e67ff..ca1ee61d04 100644
--- a/src/content/reference/en/p5/constants/FILL.mdx
+++ b/src/content/reference/en/p5/constants/FILL.mdx
@@ -2,7 +2,7 @@
title: FILL
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1090
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/FLAT.mdx b/src/content/reference/en/p5/constants/FLAT.mdx
index 731b69382d..6aa2340f86 100644
--- a/src/content/reference/en/p5/constants/FLAT.mdx
+++ b/src/content/reference/en/p5/constants/FLAT.mdx
@@ -2,7 +2,7 @@
title: FLAT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1138
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/FLOAT.mdx b/src/content/reference/en/p5/constants/FLOAT.mdx
index b8a02df282..446e223a54 100644
--- a/src/content/reference/en/p5/constants/FLOAT.mdx
+++ b/src/content/reference/en/p5/constants/FLOAT.mdx
@@ -2,7 +2,7 @@
title: FLOAT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1212
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/GRAY.mdx b/src/content/reference/en/p5/constants/GRAY.mdx
index c60cccc9b6..ab2357ec8e 100644
--- a/src/content/reference/en/p5/constants/GRAY.mdx
+++ b/src/content/reference/en/p5/constants/GRAY.mdx
@@ -2,7 +2,7 @@
title: GRAY
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 989
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/GRID.mdx b/src/content/reference/en/p5/constants/GRID.mdx
index ba26a9a04a..1e9d0e24b4 100644
--- a/src/content/reference/en/p5/constants/GRID.mdx
+++ b/src/content/reference/en/p5/constants/GRID.mdx
@@ -2,7 +2,7 @@
title: GRID
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1165
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/HALF_FLOAT.mdx b/src/content/reference/en/p5/constants/HALF_FLOAT.mdx
index 78928436d0..6bb1b986ba 100644
--- a/src/content/reference/en/p5/constants/HALF_FLOAT.mdx
+++ b/src/content/reference/en/p5/constants/HALF_FLOAT.mdx
@@ -2,7 +2,7 @@
title: HALF_FLOAT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1218
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/HALF_PI.mdx b/src/content/reference/en/p5/constants/HALF_PI.mdx
index ed453bea45..97404784f3 100644
--- a/src/content/reference/en/p5/constants/HALF_PI.mdx
+++ b/src/content/reference/en/p5/constants/HALF_PI.mdx
@@ -2,7 +2,7 @@
title: HALF_PI
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: >
A Number constant that's approximately 1.5708.
HSB (hue, saturation, brightness) is a type of color model. diff --git a/src/content/reference/en/p5/constants/HSL.mdx b/src/content/reference/en/p5/constants/HSL.mdx index 0f7392143d..ada83e88cf 100644 --- a/src/content/reference/en/p5/constants/HSL.mdx +++ b/src/content/reference/en/p5/constants/HSL.mdx @@ -2,7 +2,7 @@ title: HSL module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 803 isConstructor: false diff --git a/src/content/reference/en/p5/constants/IMAGE.mdx b/src/content/reference/en/p5/constants/IMAGE.mdx index f45690d772..fab81c9a42 100644 --- a/src/content/reference/en/p5/constants/IMAGE.mdx +++ b/src/content/reference/en/p5/constants/IMAGE.mdx @@ -2,7 +2,7 @@ title: IMAGE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1108 isConstructor: false diff --git a/src/content/reference/en/p5/constants/IMMEDIATE.mdx b/src/content/reference/en/p5/constants/IMMEDIATE.mdx index 1c5aa611be..e35f366c38 100644 --- a/src/content/reference/en/p5/constants/IMMEDIATE.mdx +++ b/src/content/reference/en/p5/constants/IMMEDIATE.mdx @@ -2,7 +2,7 @@ title: IMMEDIATE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1100 isConstructor: false diff --git a/src/content/reference/en/p5/constants/INVERT.mdx b/src/content/reference/en/p5/constants/INVERT.mdx index 9e90a912b9..e7fc5cae56 100644 --- a/src/content/reference/en/p5/constants/INVERT.mdx +++ b/src/content/reference/en/p5/constants/INVERT.mdx @@ -2,7 +2,7 @@ title: INVERT module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 999 isConstructor: false diff --git a/src/content/reference/en/p5/constants/ITALIC.mdx b/src/content/reference/en/p5/constants/ITALIC.mdx index ae2c30b407..bab933b1f6 100644 --- a/src/content/reference/en/p5/constants/ITALIC.mdx +++ b/src/content/reference/en/p5/constants/ITALIC.mdx @@ -2,7 +2,7 @@ title: ITALIC module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1031 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LABEL.mdx b/src/content/reference/en/p5/constants/LABEL.mdx index e9318f7506..a721aeadfc 100644 --- a/src/content/reference/en/p5/constants/LABEL.mdx +++ b/src/content/reference/en/p5/constants/LABEL.mdx @@ -2,7 +2,7 @@ title: LABEL module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1177 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LANDSCAPE.mdx b/src/content/reference/en/p5/constants/LANDSCAPE.mdx index 957015183a..c95a424f2e 100644 --- a/src/content/reference/en/p5/constants/LANDSCAPE.mdx +++ b/src/content/reference/en/p5/constants/LANDSCAPE.mdx @@ -2,7 +2,7 @@ title: LANDSCAPE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1150 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LEFT.mdx b/src/content/reference/en/p5/constants/LEFT.mdx index f98d30c4d5..f7ede3a7e1 100644 --- a/src/content/reference/en/p5/constants/LEFT.mdx +++ b/src/content/reference/en/p5/constants/LEFT.mdx @@ -2,7 +2,7 @@ title: LEFT module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 655 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LEFT_ARROW.mdx b/src/content/reference/en/p5/constants/LEFT_ARROW.mdx index e8fe2192d6..1334d8f141 100644 --- a/src/content/reference/en/p5/constants/LEFT_ARROW.mdx +++ b/src/content/reference/en/p5/constants/LEFT_ARROW.mdx @@ -2,7 +2,7 @@ title: LEFT_ARROW module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 856 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LIGHTEST.mdx b/src/content/reference/en/p5/constants/LIGHTEST.mdx index a62153dc47..3ef7c03996 100644 --- a/src/content/reference/en/p5/constants/LIGHTEST.mdx +++ b/src/content/reference/en/p5/constants/LIGHTEST.mdx @@ -2,7 +2,7 @@ title: LIGHTEST module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 918 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LINEAR.mdx b/src/content/reference/en/p5/constants/LINEAR.mdx index 8a8debd45e..26b474277e 100644 --- a/src/content/reference/en/p5/constants/LINEAR.mdx +++ b/src/content/reference/en/p5/constants/LINEAR.mdx @@ -2,7 +2,7 @@ title: LINEAR module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1063 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LINES.mdx b/src/content/reference/en/p5/constants/LINES.mdx index 7d5855d342..a6804b8078 100644 --- a/src/content/reference/en/p5/constants/LINES.mdx +++ b/src/content/reference/en/p5/constants/LINES.mdx @@ -2,7 +2,7 @@ title: LINES module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 687 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LINE_LOOP.mdx b/src/content/reference/en/p5/constants/LINE_LOOP.mdx index 30f455df69..87c4d3997a 100644 --- a/src/content/reference/en/p5/constants/LINE_LOOP.mdx +++ b/src/content/reference/en/p5/constants/LINE_LOOP.mdx @@ -2,7 +2,7 @@ title: LINE_LOOP module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 699 isConstructor: false diff --git a/src/content/reference/en/p5/constants/LINE_STRIP.mdx b/src/content/reference/en/p5/constants/LINE_STRIP.mdx index d5fbcece9b..b0499c1edc 100644 --- a/src/content/reference/en/p5/constants/LINE_STRIP.mdx +++ b/src/content/reference/en/p5/constants/LINE_STRIP.mdx @@ -2,7 +2,7 @@ title: LINE_STRIP module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 693 isConstructor: false diff --git a/src/content/reference/en/p5/constants/MIRROR.mdx b/src/content/reference/en/p5/constants/MIRROR.mdx index 2077acd834..9579e2e93d 100644 --- a/src/content/reference/en/p5/constants/MIRROR.mdx +++ b/src/content/reference/en/p5/constants/MIRROR.mdx @@ -2,7 +2,7 @@ title: MIRROR module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1131 isConstructor: false diff --git a/src/content/reference/en/p5/constants/MITER.mdx b/src/content/reference/en/p5/constants/MITER.mdx index e2d9da35c9..a5324ad2c9 100644 --- a/src/content/reference/en/p5/constants/MITER.mdx +++ b/src/content/reference/en/p5/constants/MITER.mdx @@ -2,7 +2,7 @@ title: MITER module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 782 isConstructor: false diff --git a/src/content/reference/en/p5/constants/MOVE.mdx b/src/content/reference/en/p5/constants/MOVE.mdx index 3e9880acae..b9dc962e0b 100644 --- a/src/content/reference/en/p5/constants/MOVE.mdx +++ b/src/content/reference/en/p5/constants/MOVE.mdx @@ -2,7 +2,7 @@ title: MOVE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 70 isConstructor: false diff --git a/src/content/reference/en/p5/constants/MULTIPLY.mdx b/src/content/reference/en/p5/constants/MULTIPLY.mdx index d4b8b1ce98..02518203f9 100644 --- a/src/content/reference/en/p5/constants/MULTIPLY.mdx +++ b/src/content/reference/en/p5/constants/MULTIPLY.mdx @@ -2,7 +2,7 @@ title: MULTIPLY module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 939 isConstructor: false diff --git a/src/content/reference/en/p5/constants/NEAREST.mdx b/src/content/reference/en/p5/constants/NEAREST.mdx index a8cfe5eadb..1ceb0c9f28 100644 --- a/src/content/reference/en/p5/constants/NEAREST.mdx +++ b/src/content/reference/en/p5/constants/NEAREST.mdx @@ -2,7 +2,7 @@ title: NEAREST module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1116 isConstructor: false diff --git a/src/content/reference/en/p5/constants/NORMAL.mdx b/src/content/reference/en/p5/constants/NORMAL.mdx index 116234df4f..cf79109feb 100644 --- a/src/content/reference/en/p5/constants/NORMAL.mdx +++ b/src/content/reference/en/p5/constants/NORMAL.mdx @@ -2,7 +2,7 @@ title: NORMAL module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1026 isConstructor: false diff --git a/src/content/reference/en/p5/constants/OPAQUE.mdx b/src/content/reference/en/p5/constants/OPAQUE.mdx index f3afc216f9..b41b8bb3d6 100644 --- a/src/content/reference/en/p5/constants/OPAQUE.mdx +++ b/src/content/reference/en/p5/constants/OPAQUE.mdx @@ -2,7 +2,7 @@ title: OPAQUE module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 994 isConstructor: false diff --git a/src/content/reference/en/p5/constants/OPEN.mdx b/src/content/reference/en/p5/constants/OPEN.mdx index 135e570bad..e53506da3b 100644 --- a/src/content/reference/en/p5/constants/OPEN.mdx +++ b/src/content/reference/en/p5/constants/OPEN.mdx @@ -2,7 +2,7 @@ title: OPEN module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 745 isConstructor: false diff --git a/src/content/reference/en/p5/constants/OPTION.mdx b/src/content/reference/en/p5/constants/OPTION.mdx index 17eb46f268..411f6d3a6d 100644 --- a/src/content/reference/en/p5/constants/OPTION.mdx +++ b/src/content/reference/en/p5/constants/OPTION.mdx @@ -2,7 +2,7 @@ title: OPTION module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 861 isConstructor: false diff --git a/src/content/reference/en/p5/constants/OVERLAY.mdx b/src/content/reference/en/p5/constants/OVERLAY.mdx index 999d6f2772..04034b4007 100644 --- a/src/content/reference/en/p5/constants/OVERLAY.mdx +++ b/src/content/reference/en/p5/constants/OVERLAY.mdx @@ -2,7 +2,7 @@ title: OVERLAY module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 955 isConstructor: false diff --git a/src/content/reference/en/p5/constants/P2D.mdx b/src/content/reference/en/p5/constants/P2D.mdx index 317cc89f07..5f6cece23d 100644 --- a/src/content/reference/en/p5/constants/P2D.mdx +++ b/src/content/reference/en/p5/constants/P2D.mdx @@ -2,7 +2,7 @@ title: P2D module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: |
The default, two-dimensional renderer.
line: 18 diff --git a/src/content/reference/en/p5/constants/PI.mdx b/src/content/reference/en/p5/constants/PI.mdx index ec403cc391..516d87e1ba 100644 --- a/src/content/reference/en/p5/constants/PI.mdx +++ b/src/content/reference/en/p5/constants/PI.mdx @@ -2,7 +2,7 @@ title: PI module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: >A Number constant that's approximately 3.1416.
A Number constant that's approximately 0.7854.
A String constant that's used to set the
diff --git a/src/content/reference/en/p5/constants/RADIUS.mdx b/src/content/reference/en/p5/constants/RADIUS.mdx
index 047aaae889..25961a5f66 100644
--- a/src/content/reference/en/p5/constants/RADIUS.mdx
+++ b/src/content/reference/en/p5/constants/RADIUS.mdx
@@ -2,7 +2,7 @@
title: RADIUS
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 645
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/REMOVE.mdx b/src/content/reference/en/p5/constants/REMOVE.mdx
index a42d93ca33..0ad65fc22e 100644
--- a/src/content/reference/en/p5/constants/REMOVE.mdx
+++ b/src/content/reference/en/p5/constants/REMOVE.mdx
@@ -2,7 +2,7 @@
title: REMOVE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 899
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/REPEAT.mdx b/src/content/reference/en/p5/constants/REPEAT.mdx
index 3837236e10..d744d487a6 100644
--- a/src/content/reference/en/p5/constants/REPEAT.mdx
+++ b/src/content/reference/en/p5/constants/REPEAT.mdx
@@ -2,7 +2,7 @@
title: REPEAT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1121
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/REPLACE.mdx b/src/content/reference/en/p5/constants/REPLACE.mdx
index 872757da13..3d9eae3dc6 100644
--- a/src/content/reference/en/p5/constants/REPLACE.mdx
+++ b/src/content/reference/en/p5/constants/REPLACE.mdx
@@ -2,7 +2,7 @@
title: REPLACE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 949
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/RETURN.mdx b/src/content/reference/en/p5/constants/RETURN.mdx
index 49403fae56..857e19561f 100644
--- a/src/content/reference/en/p5/constants/RETURN.mdx
+++ b/src/content/reference/en/p5/constants/RETURN.mdx
@@ -2,7 +2,7 @@
title: RETURN
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 866
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/RGB.mdx b/src/content/reference/en/p5/constants/RGB.mdx
index a0897e412f..a29f5b7393 100644
--- a/src/content/reference/en/p5/constants/RGB.mdx
+++ b/src/content/reference/en/p5/constants/RGB.mdx
@@ -2,7 +2,7 @@
title: RGB
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 789
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/RGBA.mdx b/src/content/reference/en/p5/constants/RGBA.mdx
index b7a6b6bae2..ad5ca4b684 100644
--- a/src/content/reference/en/p5/constants/RGBA.mdx
+++ b/src/content/reference/en/p5/constants/RGBA.mdx
@@ -2,7 +2,7 @@
title: RGBA
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1224
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/RIGHT.mdx b/src/content/reference/en/p5/constants/RIGHT.mdx
index aec0d43de2..0dba1c169d 100644
--- a/src/content/reference/en/p5/constants/RIGHT.mdx
+++ b/src/content/reference/en/p5/constants/RIGHT.mdx
@@ -2,7 +2,7 @@
title: RIGHT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 650
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/RIGHT_ARROW.mdx b/src/content/reference/en/p5/constants/RIGHT_ARROW.mdx
index ef8e5c931a..6fd8b5c7c1 100644
--- a/src/content/reference/en/p5/constants/RIGHT_ARROW.mdx
+++ b/src/content/reference/en/p5/constants/RIGHT_ARROW.mdx
@@ -2,7 +2,7 @@
title: RIGHT_ARROW
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 871
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/ROUND.mdx b/src/content/reference/en/p5/constants/ROUND.mdx
index a00ec5e772..7d75b21e2d 100644
--- a/src/content/reference/en/p5/constants/ROUND.mdx
+++ b/src/content/reference/en/p5/constants/ROUND.mdx
@@ -2,7 +2,7 @@
title: ROUND
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 772
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/SCREEN.mdx b/src/content/reference/en/p5/constants/SCREEN.mdx
index 90dab63276..a840d31048 100644
--- a/src/content/reference/en/p5/constants/SCREEN.mdx
+++ b/src/content/reference/en/p5/constants/SCREEN.mdx
@@ -2,7 +2,7 @@
title: SCREEN
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 944
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/SHIFT.mdx b/src/content/reference/en/p5/constants/SHIFT.mdx
index 7f6f1fe0f8..f59461f20a 100644
--- a/src/content/reference/en/p5/constants/SHIFT.mdx
+++ b/src/content/reference/en/p5/constants/SHIFT.mdx
@@ -2,7 +2,7 @@
title: SHIFT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 876
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/SMOOTH.mdx b/src/content/reference/en/p5/constants/SMOOTH.mdx
index 79747bcfd2..f16870d2d1 100644
--- a/src/content/reference/en/p5/constants/SMOOTH.mdx
+++ b/src/content/reference/en/p5/constants/SMOOTH.mdx
@@ -2,7 +2,7 @@
title: SMOOTH
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1143
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/SOFT_LIGHT.mdx b/src/content/reference/en/p5/constants/SOFT_LIGHT.mdx
index 3d6ba329d9..1efa794834 100644
--- a/src/content/reference/en/p5/constants/SOFT_LIGHT.mdx
+++ b/src/content/reference/en/p5/constants/SOFT_LIGHT.mdx
@@ -2,7 +2,7 @@
title: SOFT_LIGHT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 965
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/SQUARE.mdx b/src/content/reference/en/p5/constants/SQUARE.mdx
index a77e648b2e..cbfa1ac21e 100644
--- a/src/content/reference/en/p5/constants/SQUARE.mdx
+++ b/src/content/reference/en/p5/constants/SQUARE.mdx
@@ -2,7 +2,7 @@
title: SQUARE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 766
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/STROKE.mdx b/src/content/reference/en/p5/constants/STROKE.mdx
index ae2c35b45c..fb1464f87a 100644
--- a/src/content/reference/en/p5/constants/STROKE.mdx
+++ b/src/content/reference/en/p5/constants/STROKE.mdx
@@ -2,7 +2,7 @@
title: STROKE
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 1085
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/SUBTRACT.mdx b/src/content/reference/en/p5/constants/SUBTRACT.mdx
index 452bbe2a1b..96bd1e1c6b 100644
--- a/src/content/reference/en/p5/constants/SUBTRACT.mdx
+++ b/src/content/reference/en/p5/constants/SUBTRACT.mdx
@@ -2,7 +2,7 @@
title: SUBTRACT
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 929
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/TAB.mdx b/src/content/reference/en/p5/constants/TAB.mdx
index 5feec3d3d6..dab1b0af8c 100644
--- a/src/content/reference/en/p5/constants/TAB.mdx
+++ b/src/content/reference/en/p5/constants/TAB.mdx
@@ -2,7 +2,7 @@
title: TAB
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: ''
line: 881
isConstructor: false
diff --git a/src/content/reference/en/p5/constants/TAU.mdx b/src/content/reference/en/p5/constants/TAU.mdx
index e82d45abf0..1742d69bf8 100644
--- a/src/content/reference/en/p5/constants/TAU.mdx
+++ b/src/content/reference/en/p5/constants/TAU.mdx
@@ -2,7 +2,7 @@
title: TAU
module: Constants
submodule: Constants
-file: src/core/constants.js
+file: src\core\constants.js
description: >
A Number constant that's approximately 6.2382.
A Number constant that's approximately 6.2382.
Version of this p5.js.
line: 9 diff --git a/src/content/reference/en/p5/constants/WAIT.mdx b/src/content/reference/en/p5/constants/WAIT.mdx index 4bb546dbcc..26448fbaa6 100644 --- a/src/content/reference/en/p5/constants/WAIT.mdx +++ b/src/content/reference/en/p5/constants/WAIT.mdx @@ -2,7 +2,7 @@ title: WAIT module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 80 isConstructor: false diff --git a/src/content/reference/en/p5/constants/WEBGL.mdx b/src/content/reference/en/p5/constants/WEBGL.mdx index fa29351fbc..acc91eb402 100644 --- a/src/content/reference/en/p5/constants/WEBGL.mdx +++ b/src/content/reference/en/p5/constants/WEBGL.mdx @@ -2,7 +2,7 @@ title: WEBGL module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: >One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders.
@@ -23,7 +23,7 @@ description: > 3-dimensional shapes like box(), sphere(), cone(), and more. See more. See the tutorial page about custom geometry to make more complex objects. @@ -75,7 +75,7 @@ description: > href="https://p5js.org/tutorials/#webgl">all the interactive WEBGL tutorials in the "Tutorials" section of this website, or read the wiki article "Getting + href="https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5">"Getting started with WebGL in p5". line: 24 isConstructor: false diff --git a/src/content/reference/en/p5/constants/WEBGL2.mdx b/src/content/reference/en/p5/constants/WEBGL2.mdx index 935dd7ad51..965c58f655 100644 --- a/src/content/reference/en/p5/constants/WEBGL2.mdx +++ b/src/content/reference/en/p5/constants/WEBGL2.mdx @@ -2,7 +2,7 @@ title: WEBGL2 module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: |One of the two possible values of a WebGL canvas (either WEBGL or WEBGL2), which can be used to determine what capabilities the rendering environment diff --git a/src/content/reference/en/p5/constants/WORD.mdx b/src/content/reference/en/p5/constants/WORD.mdx index 234de17a17..83dac0fd65 100644 --- a/src/content/reference/en/p5/constants/WORD.mdx +++ b/src/content/reference/en/p5/constants/WORD.mdx @@ -2,7 +2,7 @@ title: WORD module: Constants submodule: Constants -file: src/core/constants.js +file: src\core\constants.js description: '' line: 1051 isConstructor: false diff --git a/src/content/reference/en/p5/constrain.mdx b/src/content/reference/en/p5/constrain.mdx index 5cd3464a58..17f1947c9b 100644 --- a/src/content/reference/en/p5/constrain.mdx +++ b/src/content/reference/en/p5/constrain.mdx @@ -2,7 +2,7 @@ title: constrain module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: |
Constrains a number between a minimum and maximum value.
line: 91 diff --git a/src/content/reference/en/p5/copy.mdx b/src/content/reference/en/p5/copy.mdx index 76146bba8e..2c1ffe9db4 100644 --- a/src/content/reference/en/p5/copy.mdx +++ b/src/content/reference/en/p5/copy.mdx @@ -2,7 +2,7 @@ title: copy module: Image submodule: Pixels -file: src/image/pixels.js +file: src\image\pixels.js description: >Copies pixels from a source image to a region of the canvas.
diff --git a/src/content/reference/en/p5/cos.mdx b/src/content/reference/en/p5/cos.mdx index ec17d10470..9cbedddbfc 100644 --- a/src/content/reference/en/p5/cos.mdx +++ b/src/content/reference/en/p5/cos.mdx @@ -2,7 +2,7 @@ title: cos module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: >Calculates the cosine of an angle.
diff --git a/src/content/reference/en/p5/createA.mdx b/src/content/reference/en/p5/createA.mdx index f9809d38e7..8e1ded0efc 100644 --- a/src/content/reference/en/p5/createA.mdx +++ b/src/content/reference/en/p5/createA.mdx @@ -2,7 +2,7 @@ title: createA module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates an element that links to another web page.
Creates a hidden element for simple audio
playback.
Creates a element.
Creates a new p5.Camera object and sets it diff --git a/src/content/reference/en/p5/createCanvas.mdx b/src/content/reference/en/p5/createCanvas.mdx index f5e66579d6..8fe86b6f66 100644 --- a/src/content/reference/en/p5/createCanvas.mdx +++ b/src/content/reference/en/p5/createCanvas.mdx @@ -2,7 +2,7 @@ title: createCanvas module: Rendering submodule: Rendering -file: src/core/rendering.js +file: src\core\rendering.js description: >
Creates a canvas element on the web page.
@@ -37,7 +37,7 @@ description: > the sketch's rendering mode. If an existing - HTMLCanvasElement is passed, as increateCanvas(900, 500, myCanvas), then it will
@@ -47,7 +47,7 @@ description: >
The fourth parameter is also optional. If an existing
- HTMLCanvasElement
is passed, as in createCanvas(900, 500, WEBGL, myCanvas), then it
diff --git a/src/content/reference/en/p5/createCapture.mdx b/src/content/reference/en/p5/createCapture.mdx
index ec1049ffe1..7a95d3f923 100644
--- a/src/content/reference/en/p5/createCapture.mdx
+++ b/src/content/reference/en/p5/createCapture.mdx
@@ -2,7 +2,7 @@
title: createCapture
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: >
Creates a element that "captures" the audio/video
stream from
@@ -58,18 +58,18 @@ description: >
parameter, stream, that's a
- MediaStream object.
Note: createCapture() only works when running a sketch locally
or using HTTPS. Learn more
here
and here.
Creates a checkbox element.
Creates a color picker element.
diff --git a/src/content/reference/en/p5/createConvolver.mdx b/src/content/reference/en/p5/createConvolver.mdx index d851c7dd39..ed357182e5 100644 --- a/src/content/reference/en/p5/createConvolver.mdx +++ b/src/content/reference/en/p5/createConvolver.mdx @@ -2,7 +2,7 @@ title: createConvolver module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |Create a p5.Convolver. Accepts a path to a soundfile that will be used to generate an impulse response.
diff --git a/src/content/reference/en/p5/createDiv.mdx b/src/content/reference/en/p5/createDiv.mdx index 1f6123d6b2..cfccc5ad56 100644 --- a/src/content/reference/en/p5/createDiv.mdx +++ b/src/content/reference/en/p5/createDiv.mdx @@ -2,7 +2,7 @@ title: createDiv module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates a element.
Creates a new p5.Element object.
diff --git a/src/content/reference/en/p5/createFileInput.mdx b/src/content/reference/en/p5/createFileInput.mdx index 742f868a0b..e5c7f514b1 100644 --- a/src/content/reference/en/p5/createFileInput.mdx +++ b/src/content/reference/en/p5/createFileInput.mdx @@ -2,7 +2,7 @@ title: createFileInput module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates an element of type
'file'.
Creates a p5.Shader object to be used with the @@ -30,7 +30,7 @@ description: > contains the fragment shader program written in GLSL.
The p5.Shader object that's created @@ -62,7 +62,7 @@ description: > drawn.
For more info about filters and shaders, see Adam Ferriss' repo of shader
+ href="https://github.com/aferriss/p5jsShaderExamples">repo of shader
examples
or the Introduction to
diff --git a/src/content/reference/en/p5/createFramebuffer.mdx b/src/content/reference/en/p5/createFramebuffer.mdx
index d145fc77ea..311ba7f9e2 100644
--- a/src/content/reference/en/p5/createFramebuffer.mdx
+++ b/src/content/reference/en/p5/createFramebuffer.mdx
@@ -2,7 +2,7 @@
title: createFramebuffer
module: Rendering
submodule: Rendering
-file: src/core/rendering.js
+file: src\core\rendering.js
description: >
Creates and a new p5.Framebuffer
object. Creates a p5.Graphics object.createGraphics(900, 500, myCanvas), then it will
@@ -48,7 +48,7 @@ description: >
The fourth parameter is also optional. If an existing
- HTMLCanvasElement
is passed, as in createGraphics(900, 500, WEBGL, myCanvas), then
diff --git a/src/content/reference/en/p5/createImage.mdx b/src/content/reference/en/p5/createImage.mdx
index 405935d864..0edd59fd2f 100644
--- a/src/content/reference/en/p5/createImage.mdx
+++ b/src/content/reference/en/p5/createImage.mdx
@@ -2,7 +2,7 @@
title: createImage
module: Image
submodule: Image
-file: src/image/image.js
+file: src\image\image.js
description: >
Creates a new p5.Image object.
diff --git a/src/content/reference/en/p5/createImg.mdx b/src/content/reference/en/p5/createImg.mdx index 953f060c67..38b2e1ecc0 100644 --- a/src/content/reference/en/p5/createImg.mdx +++ b/src/content/reference/en/p5/createImg.mdx @@ -2,7 +2,7 @@ title: createImg module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates an element that can appear outside of the
canvas.
'anonymous' or 'use-credentials'
diff --git a/src/content/reference/en/p5/createInput.mdx b/src/content/reference/en/p5/createInput.mdx
index c216fce18f..05425ef55e 100644
--- a/src/content/reference/en/p5/createInput.mdx
+++ b/src/content/reference/en/p5/createInput.mdx
@@ -2,7 +2,7 @@
title: createInput
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: >
Creates a text element.
'text'.
diff --git a/src/content/reference/en/p5/createModel.mdx b/src/content/reference/en/p5/createModel.mdx
index 6ba33e4a9d..148c68c4ea 100644
--- a/src/content/reference/en/p5/createModel.mdx
+++ b/src/content/reference/en/p5/createModel.mdx
@@ -2,7 +2,7 @@
title: createModel
module: Shape
submodule: 3D Models
-file: src/webgl/loading.js
+file: src\webgl\loading.js
description: >
Load a 3d model from an OBJ or STL string.
diff --git a/src/content/reference/en/p5/createNumberDict.mdx b/src/content/reference/en/p5/createNumberDict.mdx index d4a27f2abe..9749866449 100644 --- a/src/content/reference/en/p5/createNumberDict.mdx +++ b/src/content/reference/en/p5/createNumberDict.mdx @@ -2,7 +2,7 @@ title: createNumberDict module: Data submodule: Dictionary -file: src/data/p5.TypedDict.js +file: src\data\p5.TypedDict.js description: >Creates a new instance of p5.NumberDict using the key-value pair diff --git a/src/content/reference/en/p5/createP.mdx b/src/content/reference/en/p5/createP.mdx index 851e7ded92..63318a0055 100644 --- a/src/content/reference/en/p5/createP.mdx +++ b/src/content/reference/en/p5/createP.mdx @@ -2,7 +2,7 @@ title: createP module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >
Creates a paragraph element.
diff --git a/src/content/reference/en/p5/createRadio.mdx b/src/content/reference/en/p5/createRadio.mdx index 317c70497e..732244e549 100644 --- a/src/content/reference/en/p5/createRadio.mdx +++ b/src/content/reference/en/p5/createRadio.mdx @@ -2,7 +2,7 @@ title: createRadio module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates a radio button element.
@@ -42,7 +42,7 @@ description: >myRadio.selected(value) selects the given option and returns
it as an HTMLInputElement.myRadio.disable(shouldDisable) Disables the radio button if
diff --git a/src/content/reference/en/p5/createSelect.mdx b/src/content/reference/en/p5/createSelect.mdx
index ebe2047ebb..fdc0e91340 100644
--- a/src/content/reference/en/p5/createSelect.mdx
+++ b/src/content/reference/en/p5/createSelect.mdx
@@ -2,7 +2,7 @@
title: createSelect
module: DOM
submodule: DOM
-file: src/dom/dom.js
+file: src\dom\dom.js
description: >
Creates a dropdown menu element.
Creates a new p5.Shader object.
@@ -13,7 +13,7 @@ description: > graphics tasks. They’re written in a language called GLSL and run along with the rest of the code in a sketch. diff --git a/src/content/reference/en/p5/createSlider.mdx b/src/content/reference/en/p5/createSlider.mdx index a38232f3b5..a518b48561 100644 --- a/src/content/reference/en/p5/createSlider.mdx +++ b/src/content/reference/en/p5/createSlider.mdx @@ -2,7 +2,7 @@ title: createSlider module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates a slider element.
Creates a element.
Creates a new instance of p5.StringDict using the key-value pair or the object you provide.
diff --git a/src/content/reference/en/p5/createVector.mdx b/src/content/reference/en/p5/createVector.mdx index 2d6e301b71..4470a2a826 100644 --- a/src/content/reference/en/p5/createVector.mdx +++ b/src/content/reference/en/p5/createVector.mdx @@ -2,7 +2,7 @@ title: createVector module: Math submodule: Vector -file: src/math/math.js +file: src\math\math.js description: >Creates a new p5.Vector object.
diff --git a/src/content/reference/en/p5/createVideo.mdx b/src/content/reference/en/p5/createVideo.mdx index 820866af2e..852e356e59 100644 --- a/src/content/reference/en/p5/createVideo.mdx +++ b/src/content/reference/en/p5/createVideo.mdx @@ -2,7 +2,7 @@ title: createVideo module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Creates a element for simple audio/video playback.
Creates a new p5.PrintWriter object.
diff --git a/src/content/reference/en/p5/cursor.mdx b/src/content/reference/en/p5/cursor.mdx index d2ec7cc68d..50367c0e9f 100644 --- a/src/content/reference/en/p5/cursor.mdx +++ b/src/content/reference/en/p5/cursor.mdx @@ -2,7 +2,7 @@ title: cursor module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >Changes the cursor's appearance.
diff --git a/src/content/reference/en/p5/curve.mdx b/src/content/reference/en/p5/curve.mdx index 2f99993a19..c519f2c952 100644 --- a/src/content/reference/en/p5/curve.mdx +++ b/src/content/reference/en/p5/curve.mdx @@ -2,7 +2,7 @@ title: curve module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Draws a curve using a Catmull-Rom spline.
diff --git a/src/content/reference/en/p5/curveDetail.mdx b/src/content/reference/en/p5/curveDetail.mdx index ae3f11767f..a97e5ae79f 100644 --- a/src/content/reference/en/p5/curveDetail.mdx +++ b/src/content/reference/en/p5/curveDetail.mdx @@ -2,7 +2,7 @@ title: curveDetail module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Sets the number of segments used to draw spline curves in WebGL mode.
diff --git a/src/content/reference/en/p5/curvePoint.mdx b/src/content/reference/en/p5/curvePoint.mdx index 4b41583941..6904b79efe 100644 --- a/src/content/reference/en/p5/curvePoint.mdx +++ b/src/content/reference/en/p5/curvePoint.mdx @@ -2,7 +2,7 @@ title: curvePoint module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Calculates coordinates along a spline curve using interpolation.
diff --git a/src/content/reference/en/p5/curveTangent.mdx b/src/content/reference/en/p5/curveTangent.mdx index 39bb44e7ef..e11ea74da5 100644 --- a/src/content/reference/en/p5/curveTangent.mdx +++ b/src/content/reference/en/p5/curveTangent.mdx @@ -2,7 +2,7 @@ title: curveTangent module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Calculates coordinates along a line that's tangent to a spline curve.
diff --git a/src/content/reference/en/p5/curveTightness.mdx b/src/content/reference/en/p5/curveTightness.mdx index bcdbd3fa20..5b71b94845 100644 --- a/src/content/reference/en/p5/curveTightness.mdx +++ b/src/content/reference/en/p5/curveTightness.mdx @@ -2,7 +2,7 @@ title: curveTightness module: Shape submodule: Curves -file: src/core/shape/curves.js +file: src\core\shape\curves.js description: >Adjusts the way curve() and diff --git a/src/content/reference/en/p5/curveVertex.mdx b/src/content/reference/en/p5/curveVertex.mdx index c424655ac4..5fadd5b0a4 100644 --- a/src/content/reference/en/p5/curveVertex.mdx +++ b/src/content/reference/en/p5/curveVertex.mdx @@ -2,7 +2,7 @@ title: curveVertex module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >
Adds a spline curve segment to a custom shape.
diff --git a/src/content/reference/en/p5/cylinder.mdx b/src/content/reference/en/p5/cylinder.mdx index 8e8b78376e..cf7cab8314 100644 --- a/src/content/reference/en/p5/cylinder.mdx +++ b/src/content/reference/en/p5/cylinder.mdx @@ -2,7 +2,7 @@ title: cylinder module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Draws a cylinder.
diff --git a/src/content/reference/en/p5/day.mdx b/src/content/reference/en/p5/day.mdx index c463fc9657..1409028b8e 100644 --- a/src/content/reference/en/p5/day.mdx +++ b/src/content/reference/en/p5/day.mdx @@ -2,7 +2,7 @@ title: day module: IO submodule: Time & Date -file: src/utilities/time_date.js +file: src\utilities\time_date.js description: |Returns the current day as a number from 1–31.
line: 10 diff --git a/src/content/reference/en/p5/debugMode.mdx b/src/content/reference/en/p5/debugMode.mdx index ecc1bd80b2..d66dff56f7 100644 --- a/src/content/reference/en/p5/debugMode.mdx +++ b/src/content/reference/en/p5/debugMode.mdx @@ -2,7 +2,7 @@ title: debugMode module: 3D submodule: Interaction -file: src/webgl/interaction.js +file: src\webgl\interaction.js description: >Adds a grid and an axes icon to clarify orientation in 3D sketches.
diff --git a/src/content/reference/en/p5/degrees.mdx b/src/content/reference/en/p5/degrees.mdx index a1e3e930ae..054b6b9cd9 100644 --- a/src/content/reference/en/p5/degrees.mdx +++ b/src/content/reference/en/p5/degrees.mdx @@ -2,7 +2,7 @@ title: degrees module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: |Converts an angle measured in radians to its value in degrees.
Degrees and radians are both units for measuring angles. There are 360˚ in diff --git a/src/content/reference/en/p5/deltaTime.mdx b/src/content/reference/en/p5/deltaTime.mdx index 363ac8c872..6d41e44fa4 100644 --- a/src/content/reference/en/p5/deltaTime.mdx +++ b/src/content/reference/en/p5/deltaTime.mdx @@ -2,7 +2,7 @@ title: deltaTime module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >
A Number variable that tracks the number of milliseconds it
took to draw
diff --git a/src/content/reference/en/p5/describe.mdx b/src/content/reference/en/p5/describe.mdx
index 248a628bb5..9dae74b7a8 100644
--- a/src/content/reference/en/p5/describe.mdx
+++ b/src/content/reference/en/p5/describe.mdx
@@ -2,7 +2,7 @@
title: describe
module: Environment
submodule: Environment
-file: src/accessibility/describe.js
+file: src\accessibility\describe.js
description: >
Creates a screen reader-accessible description of the canvas.
diff --git a/src/content/reference/en/p5/describeElement.mdx b/src/content/reference/en/p5/describeElement.mdx index 59cdbcc069..a4e1d55377 100644 --- a/src/content/reference/en/p5/describeElement.mdx +++ b/src/content/reference/en/p5/describeElement.mdx @@ -2,7 +2,7 @@ title: describeElement module: Environment submodule: Environment -file: src/accessibility/describe.js +file: src\accessibility\describe.js description: >Creates a screen reader-accessible description of elements in the canvas.
diff --git a/src/content/reference/en/p5/deviceMoved.mdx b/src/content/reference/en/p5/deviceMoved.mdx index f14052e071..a8741107f9 100644 --- a/src/content/reference/en/p5/deviceMoved.mdx +++ b/src/content/reference/en/p5/deviceMoved.mdx @@ -2,7 +2,7 @@ title: deviceMoved module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >The deviceMoved() function is called when the device is moved by more than diff --git a/src/content/reference/en/p5/deviceOrientation.mdx b/src/content/reference/en/p5/deviceOrientation.mdx index 9c7c475354..a8aa327696 100644 --- a/src/content/reference/en/p5/deviceOrientation.mdx +++ b/src/content/reference/en/p5/deviceOrientation.mdx @@ -2,7 +2,7 @@ title: deviceOrientation module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: |
The system variable deviceOrientation always contains the orientation of the device. The value of this variable will either be set 'landscape' diff --git a/src/content/reference/en/p5/deviceShaken.mdx b/src/content/reference/en/p5/deviceShaken.mdx index a1e6f57c73..f30c9f531b 100644 --- a/src/content/reference/en/p5/deviceShaken.mdx +++ b/src/content/reference/en/p5/deviceShaken.mdx @@ -2,7 +2,7 @@ title: deviceShaken module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The deviceShaken() function is called when the device total acceleration diff --git a/src/content/reference/en/p5/deviceTurned.mdx b/src/content/reference/en/p5/deviceTurned.mdx index 356bf740a5..8ba9cdd402 100644 --- a/src/content/reference/en/p5/deviceTurned.mdx +++ b/src/content/reference/en/p5/deviceTurned.mdx @@ -2,7 +2,7 @@ title: deviceTurned module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The deviceTurned() function is called when the device rotates by diff --git a/src/content/reference/en/p5/directionalLight.mdx b/src/content/reference/en/p5/directionalLight.mdx index 0ccf5ec2f2..964c12430c 100644 --- a/src/content/reference/en/p5/directionalLight.mdx +++ b/src/content/reference/en/p5/directionalLight.mdx @@ -2,7 +2,7 @@ title: directionalLight module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >
Creates a light that shines in one direction.
diff --git a/src/content/reference/en/p5/disableFriendlyErrors.mdx b/src/content/reference/en/p5/disableFriendlyErrors.mdx index 0863c54482..fe27795390 100644 --- a/src/content/reference/en/p5/disableFriendlyErrors.mdx +++ b/src/content/reference/en/p5/disableFriendlyErrors.mdx @@ -2,7 +2,7 @@ title: disableFriendlyErrors module: Structure submodule: Structure -file: src/core/main.js +file: src\core\main.js description: >Turns off the parts of the Friendly Error System (FES) that impact performance.
diff --git a/src/content/reference/en/p5/displayDensity.mdx b/src/content/reference/en/p5/displayDensity.mdx index cb00f50e08..f55ecc21f1 100644 --- a/src/content/reference/en/p5/displayDensity.mdx +++ b/src/content/reference/en/p5/displayDensity.mdx @@ -2,7 +2,7 @@ title: displayDensity module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: |Returns the display's current pixel density.
line: 1078 diff --git a/src/content/reference/en/p5/displayHeight.mdx b/src/content/reference/en/p5/displayHeight.mdx index 2f353f6763..0990aec5ee 100644 --- a/src/content/reference/en/p5/displayHeight.mdx +++ b/src/content/reference/en/p5/displayHeight.mdx @@ -2,7 +2,7 @@ title: displayHeight module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >A Number variable that stores the height of the screen
display.
A Number variable that stores the width of the screen
display.
Calculates the distance between two points.
diff --git a/src/content/reference/en/p5/doubleClicked.mdx b/src/content/reference/en/p5/doubleClicked.mdx index 24bd678429..e59d3a4057 100644 --- a/src/content/reference/en/p5/doubleClicked.mdx +++ b/src/content/reference/en/p5/doubleClicked.mdx @@ -2,7 +2,7 @@ title: doubleClicked module: Events submodule: Mouse -file: src/events/mouse.js +file: src\events\mouse.js description: >A function that's called once when a mouse button is clicked twice quickly.
@@ -43,7 +43,7 @@ description: >The parameter, event, is optional.
doubleClicked() is always passed a
- MouseEvent
object with properties that describe the double-click event:
A function that's called repeatedly while the sketch runs.
diff --git a/src/content/reference/en/p5/drawingContext.mdx b/src/content/reference/en/p5/drawingContext.mdx index 6438861809..4df8c6bc0a 100644 --- a/src/content/reference/en/p5/drawingContext.mdx +++ b/src/content/reference/en/p5/drawingContext.mdx @@ -2,7 +2,7 @@ title: drawingContext module: Rendering submodule: Rendering -file: src/core/rendering.js +file: src\core\rendering.js description: >A system variable that provides direct access to the sketch's @@ -16,7 +16,7 @@ description: > provides access to these features by exposing the sketch's CanvasRenderingContext2D + href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D">CanvasRenderingContext2D object.
line: 1198 diff --git a/src/content/reference/en/p5/ellipse.mdx b/src/content/reference/en/p5/ellipse.mdx index c3a4484c03..5472348a86 100644 --- a/src/content/reference/en/p5/ellipse.mdx +++ b/src/content/reference/en/p5/ellipse.mdx @@ -2,7 +2,7 @@ title: ellipse module: Shape submodule: 2D Primitives -file: src/core/shape/2d_primitives.js +file: src\core\shape\2d_primitives.js description: >Draws an ellipse (oval).
diff --git a/src/content/reference/en/p5/ellipseMode.mdx b/src/content/reference/en/p5/ellipseMode.mdx index 2b08a1fdb7..b7da079c9d 100644 --- a/src/content/reference/en/p5/ellipseMode.mdx +++ b/src/content/reference/en/p5/ellipseMode.mdx @@ -2,7 +2,7 @@ title: ellipseMode module: Shape submodule: Attributes -file: src/core/shape/attributes.js +file: src\core\shape\attributes.js description: >Changes where ellipses, circles, and arcs are drawn.
diff --git a/src/content/reference/en/p5/ellipsoid.mdx b/src/content/reference/en/p5/ellipsoid.mdx index 1d59230c71..f7ff902cc6 100644 --- a/src/content/reference/en/p5/ellipsoid.mdx +++ b/src/content/reference/en/p5/ellipsoid.mdx @@ -2,7 +2,7 @@ title: ellipsoid module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Draws an ellipsoid.
diff --git a/src/content/reference/en/p5/emissiveMaterial.mdx b/src/content/reference/en/p5/emissiveMaterial.mdx index ed60736948..adde371952 100644 --- a/src/content/reference/en/p5/emissiveMaterial.mdx +++ b/src/content/reference/en/p5/emissiveMaterial.mdx @@ -2,7 +2,7 @@ title: emissiveMaterial module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Sets the emissive color of shapes’ surface material.
diff --git a/src/content/reference/en/p5/endClip.mdx b/src/content/reference/en/p5/endClip.mdx index 0e5d7b732d..9303548eca 100644 --- a/src/content/reference/en/p5/endClip.mdx +++ b/src/content/reference/en/p5/endClip.mdx @@ -2,7 +2,7 @@ title: endClip module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: |Ends defining a mask that was started with beginClip().
diff --git a/src/content/reference/en/p5/endContour.mdx b/src/content/reference/en/p5/endContour.mdx index cc90bfb85d..ee410659ef 100644 --- a/src/content/reference/en/p5/endContour.mdx +++ b/src/content/reference/en/p5/endContour.mdx @@ -2,7 +2,7 @@ title: endContour module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >Stops creating a hole within a flat shape.
diff --git a/src/content/reference/en/p5/endGeometry.mdx b/src/content/reference/en/p5/endGeometry.mdx index ce060d9e23..181ef496ad 100644 --- a/src/content/reference/en/p5/endGeometry.mdx +++ b/src/content/reference/en/p5/endGeometry.mdx @@ -2,7 +2,7 @@ title: endGeometry module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Stops adding shapes to a new diff --git a/src/content/reference/en/p5/endShape.mdx b/src/content/reference/en/p5/endShape.mdx index b36801d297..502828c413 100644 --- a/src/content/reference/en/p5/endShape.mdx +++ b/src/content/reference/en/p5/endShape.mdx @@ -2,7 +2,7 @@ title: endShape module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >
Begins adding vertices to a custom shape.
diff --git a/src/content/reference/en/p5/erase.mdx b/src/content/reference/en/p5/erase.mdx index 53f8d63985..fc02259181 100644 --- a/src/content/reference/en/p5/erase.mdx +++ b/src/content/reference/en/p5/erase.mdx @@ -2,7 +2,7 @@ title: erase module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Starts using shapes to erase parts of the canvas.
diff --git a/src/content/reference/en/p5/exitPointerLock.mdx b/src/content/reference/en/p5/exitPointerLock.mdx index c48a85ea95..81854d4433 100644 --- a/src/content/reference/en/p5/exitPointerLock.mdx +++ b/src/content/reference/en/p5/exitPointerLock.mdx @@ -2,7 +2,7 @@ title: exitPointerLock module: Events submodule: Mouse -file: src/events/mouse.js +file: src\events\mouse.js description: >Exits a pointer lock started with diff --git a/src/content/reference/en/p5/exp.mdx b/src/content/reference/en/p5/exp.mdx index 796a639071..55099f1b20 100644 --- a/src/content/reference/en/p5/exp.mdx +++ b/src/content/reference/en/p5/exp.mdx @@ -2,7 +2,7 @@ title: exp module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: |
Calculates the value of Euler's number e (2.71828...) raised to the power of a number.
diff --git a/src/content/reference/en/p5/fill.mdx b/src/content/reference/en/p5/fill.mdx index a06bd2f294..a70a9f5ad3 100644 --- a/src/content/reference/en/p5/fill.mdx +++ b/src/content/reference/en/p5/fill.mdx @@ -2,7 +2,7 @@ title: fill module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Sets the color used to fill shapes.
diff --git a/src/content/reference/en/p5/filter.mdx b/src/content/reference/en/p5/filter.mdx index 9a58dabb73..e00ec55d5b 100644 --- a/src/content/reference/en/p5/filter.mdx +++ b/src/content/reference/en/p5/filter.mdx @@ -2,7 +2,7 @@ title: filter module: Image submodule: Pixels -file: src/image/pixels.js +file: src\image\pixels.js description: >Applies an image filter to the canvas.
diff --git a/src/content/reference/en/p5/float.mdx b/src/content/reference/en/p5/float.mdx index 053a3475ea..48b016f006 100644 --- a/src/content/reference/en/p5/float.mdx +++ b/src/content/reference/en/p5/float.mdx @@ -2,7 +2,7 @@ title: float module: Data submodule: Conversion -file: src/utilities/conversion.js +file: src\utilities\conversion.js description: >Converts a String to a floating point (decimal)
Number.
Calculates the closest integer value that is less than or equal to the value of a number.
diff --git a/src/content/reference/en/p5/focused.mdx b/src/content/reference/en/p5/focused.mdx index eb35842004..907b22094e 100644 --- a/src/content/reference/en/p5/focused.mdx +++ b/src/content/reference/en/p5/focused.mdx @@ -2,7 +2,7 @@ title: focused module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >A Boolean variable that's true if the browser is
focused and false if
diff --git a/src/content/reference/en/p5/for.mdx b/src/content/reference/en/p5/for.mdx
index 65ced3c14c..7600d7519f 100644
--- a/src/content/reference/en/p5/for.mdx
+++ b/src/content/reference/en/p5/for.mdx
@@ -2,7 +2,7 @@
title: for
module: Foundation
submodule: Foundation
-file: src/core/reference.js
+file: src\core\reference.js
description: >
A way to repeat a block of code when the number of iterations is known.
diff --git a/src/content/reference/en/p5/fract.mdx b/src/content/reference/en/p5/fract.mdx index 61da23fcc5..ec4a25b88a 100644 --- a/src/content/reference/en/p5/fract.mdx +++ b/src/content/reference/en/p5/fract.mdx @@ -2,7 +2,7 @@ title: fract module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: |Calculates the fractional part of a number.
A number's fractional part includes its decimal values. For example, diff --git a/src/content/reference/en/p5/frameCount.mdx b/src/content/reference/en/p5/frameCount.mdx index 3ec8ab1bdd..58c3020d70 100644 --- a/src/content/reference/en/p5/frameCount.mdx +++ b/src/content/reference/en/p5/frameCount.mdx @@ -2,7 +2,7 @@ title: frameCount module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >
A Number variable that tracks the number of frames drawn since
the sketch
diff --git a/src/content/reference/en/p5/frameRate.mdx b/src/content/reference/en/p5/frameRate.mdx
index 63cef18ac0..fae8349af8 100644
--- a/src/content/reference/en/p5/frameRate.mdx
+++ b/src/content/reference/en/p5/frameRate.mdx
@@ -2,7 +2,7 @@
title: frameRate
module: Environment
submodule: Environment
-file: src/core/environment.js
+file: src\core\environment.js
description: >
Sets the number of frames to draw per second.
diff --git a/src/content/reference/en/p5/freeGeometry.mdx b/src/content/reference/en/p5/freeGeometry.mdx index a106d12357..49f73729fc 100644 --- a/src/content/reference/en/p5/freeGeometry.mdx +++ b/src/content/reference/en/p5/freeGeometry.mdx @@ -2,7 +2,7 @@ title: freeGeometry module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Clears a p5.Geometry object from the graphics diff --git a/src/content/reference/en/p5/freqToMidi.mdx b/src/content/reference/en/p5/freqToMidi.mdx index f4a0186c17..9436e6bb19 100644 --- a/src/content/reference/en/p5/freqToMidi.mdx +++ b/src/content/reference/en/p5/freqToMidi.mdx @@ -2,7 +2,7 @@ title: freqToMidi module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Returns the closest MIDI note value for a given frequency.
diff --git a/src/content/reference/en/p5/frustum.mdx b/src/content/reference/en/p5/frustum.mdx index fb8968787d..c2461041c6 100644 --- a/src/content/reference/en/p5/frustum.mdx +++ b/src/content/reference/en/p5/frustum.mdx @@ -2,7 +2,7 @@ title: frustum module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets the frustum of the current camera in a 3D sketch.
diff --git a/src/content/reference/en/p5/fullscreen.mdx b/src/content/reference/en/p5/fullscreen.mdx index fd29211a86..b3702de288 100644 --- a/src/content/reference/en/p5/fullscreen.mdx +++ b/src/content/reference/en/p5/fullscreen.mdx @@ -2,7 +2,7 @@ title: fullscreen module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >Toggles full-screen mode or returns the current mode.
diff --git a/src/content/reference/en/p5/function.mdx b/src/content/reference/en/p5/function.mdx index 76f6a9d676..2577f3a60d 100644 --- a/src/content/reference/en/p5/function.mdx +++ b/src/content/reference/en/p5/function.mdx @@ -2,8 +2,8 @@ title: function module: Foundation submodule: Foundation -file: src/core/reference.js -description: "A named group of statements.
\nFunctions\nhelp with organizing and reusing code. For example, functions make it easy\nto express the idea \"Draw a flower.\":
\nfunction drawFlower() {\n // Style the text.\n textAlign(CENTER, CENTER);\n textSize(20);\n\n // Draw a flower emoji.\n text('\U0001F338', 50, 50);\n}\n\nThe function header begins with the keyword function. The function's\nname, drawFlower, is followed by parentheses () and curly braces {}.\nThe code between the curly braces is called the function's body. The\nfunction's body runs when the function is called like so:
drawFlower();\n\nFunctions can accept inputs by adding parameters to their headers.\nParameters are placeholders for values that will be provided when the\nfunction is called. For example, the drawFlower() function could include\na parameter for the flower's size:
function drawFlower(size) {\n // Style the text.\n textAlign(CENTER, CENTER);\n\n // Use the size parameter.\n textSize(size);\n\n // Draw a flower emoji.\n text('\U0001F338', 50, 50);\n}\n\nParameters are part of the function's declaration. Arguments are provided\nby the code that calls a function. When a function is called, arguments are\nassigned to parameters:
\n// The argument 20 is assigned to the parameter size.\ndrawFlower(20);\n\nFunctions can have multiple parameters separated by commas. Parameters\ncan have any type. For example, the drawFlower() function could accept\nNumber parameters for the flower's x- and y-coordinates along with its\nsize:
function drawFlower(x, y, size) {\n // Style the text.\n textAlign(CENTER, CENTER);\n\n // Use the size parameter.\n textSize(size);\n\n // Draw a flower emoji.\n // Use the x and y parameters.\n text('\U0001F338', x, y);\n}\n\nFunctions can also produce outputs by adding a return statement:
function double(x) {\n let answer = 2 * x;\n return answer;\n}\n\nThe expression following return can produce an output that's used\nelsewhere. For example, the output of the double() function can be\nassigned to a variable:
let six = double(3);\ntext(`3 x 2 = ${six}`, 50, 50);\n\n"
+file: src\core\reference.js
+description: "A named group of statements.
\nFunctions\nhelp with organizing and reusing code. For example, functions make it easy\nto express the idea \"Draw a flower.\":
\nfunction drawFlower() {\n // Style the text.\n textAlign(CENTER, CENTER);\n textSize(20);\n\n // Draw a flower emoji.\n text('\U0001F338', 50, 50);\n}\n\nThe function header begins with the keyword function. The function's\nname, drawFlower, is followed by parentheses () and curly braces {}.\nThe code between the curly braces is called the function's body. The\nfunction's body runs when the function is called like so:
drawFlower();\n\nFunctions can accept inputs by adding parameters to their headers.\nParameters are placeholders for values that will be provided when the\nfunction is called. For example, the drawFlower() function could include\na parameter for the flower's size:
function drawFlower(size) {\n // Style the text.\n textAlign(CENTER, CENTER);\n\n // Use the size parameter.\n textSize(size);\n\n // Draw a flower emoji.\n text('\U0001F338', 50, 50);\n}\n\nParameters are part of the function's declaration. Arguments are provided\nby the code that calls a function. When a function is called, arguments are\nassigned to parameters:
\n// The argument 20 is assigned to the parameter size.\ndrawFlower(20);\n\nFunctions can have multiple parameters separated by commas. Parameters\ncan have any type. For example, the drawFlower() function could accept\nNumber parameters for the flower's x- and y-coordinates along with its\nsize:
function drawFlower(x, y, size) {\n // Style the text.\n textAlign(CENTER, CENTER);\n\n // Use the size parameter.\n textSize(size);\n\n // Draw a flower emoji.\n // Use the x and y parameters.\n text('\U0001F338', x, y);\n}\n\nFunctions can also produce outputs by adding a return statement:
function double(x) {\n let answer = 2 * x;\n return answer;\n}\n\nThe expression following return can produce an output that's used\nelsewhere. For example, the output of the double() function can be\nassigned to a variable:
let six = double(3);\ntext(`3 x 2 = ${six}`, 50, 50);\n\n"
line: 317
isConstructor: false
itemtype: property
diff --git a/src/content/reference/en/p5/get.mdx b/src/content/reference/en/p5/get.mdx
index acd34d03aa..680172a1cf 100644
--- a/src/content/reference/en/p5/get.mdx
+++ b/src/content/reference/en/p5/get.mdx
@@ -2,7 +2,7 @@
title: get
module: Image
submodule: Pixels
-file: src/image/pixels.js
+file: src\image\pixels.js
description: >
Gets a pixel or a region of pixels from the canvas.
diff --git a/src/content/reference/en/p5/getAudioContext.mdx b/src/content/reference/en/p5/getAudioContext.mdx index 51e56ffb2c..a27bee2b18 100644 --- a/src/content/reference/en/p5/getAudioContext.mdx +++ b/src/content/reference/en/p5/getAudioContext.mdx @@ -2,7 +2,7 @@ title: getAudioContext module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: >-Returns the Audio Context for this sketch. Useful for users diff --git a/src/content/reference/en/p5/getItem.mdx b/src/content/reference/en/p5/getItem.mdx index aecd5fee77..930e5868a9 100644 --- a/src/content/reference/en/p5/getItem.mdx +++ b/src/content/reference/en/p5/getItem.mdx @@ -2,14 +2,13 @@ title: getItem module: Data submodule: LocalStorage -file: src/data/local_storage.js +file: src\data\local_storage.js description: >
Returns a value in the web browser's local storage.
Web browsers can save small amounts of data using the built-in
- localStorage object.
Data stored in localStorage can be retrieved at any point, even
diff --git a/src/content/reference/en/p5/getOutputVolume.mdx b/src/content/reference/en/p5/getOutputVolume.mdx
index 4b74a2d1f7..919354ed76 100644
--- a/src/content/reference/en/p5/getOutputVolume.mdx
+++ b/src/content/reference/en/p5/getOutputVolume.mdx
@@ -2,7 +2,7 @@
title: getOutputVolume
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Returns a number representing the output volume for sound in this sketch.
diff --git a/src/content/reference/en/p5/getTargetFrameRate.mdx b/src/content/reference/en/p5/getTargetFrameRate.mdx index 9333dec8b0..e289f5f9ec 100644 --- a/src/content/reference/en/p5/getTargetFrameRate.mdx +++ b/src/content/reference/en/p5/getTargetFrameRate.mdx @@ -2,7 +2,7 @@ title: getTargetFrameRate module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: |Returns the target frame rate.
The value is either the system frame rate or the last value passed to diff --git a/src/content/reference/en/p5/getURL.mdx b/src/content/reference/en/p5/getURL.mdx index 10186e38f2..217123f849 100644 --- a/src/content/reference/en/p5/getURL.mdx +++ b/src/content/reference/en/p5/getURL.mdx @@ -2,12 +2,12 @@ title: getURL module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >
Returns the sketch's current
URL
as a String.
Returns the current diff --git a/src/content/reference/en/p5/getURLPath.mdx b/src/content/reference/en/p5/getURLPath.mdx index bf8b52ccae..f1d111c9ba 100644 --- a/src/content/reference/en/p5/getURLPath.mdx +++ b/src/content/reference/en/p5/getURLPath.mdx @@ -2,7 +2,7 @@ title: getURLPath module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >
Returns the current diff --git a/src/content/reference/en/p5/green.mdx b/src/content/reference/en/p5/green.mdx index 5aee8b7de1..8cf198d00b 100644 --- a/src/content/reference/en/p5/green.mdx +++ b/src/content/reference/en/p5/green.mdx @@ -2,7 +2,7 @@ title: green module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >
Gets the green value of a color.
diff --git a/src/content/reference/en/p5/gridOutput.mdx b/src/content/reference/en/p5/gridOutput.mdx index ad28c60a0f..347761a62e 100644 --- a/src/content/reference/en/p5/gridOutput.mdx +++ b/src/content/reference/en/p5/gridOutput.mdx @@ -2,7 +2,7 @@ title: gridOutput module: Environment submodule: Environment -file: src/accessibility/outputs.js +file: src\accessibility\outputs.js description: >Creates a screen reader-accessible description of shapes on the canvas.
diff --git a/src/content/reference/en/p5/height.mdx b/src/content/reference/en/p5/height.mdx index ef09c30ec9..9661bc9218 100644 --- a/src/content/reference/en/p5/height.mdx +++ b/src/content/reference/en/p5/height.mdx @@ -2,7 +2,7 @@ title: height module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >A Number variable that stores the height of the canvas in
pixels.
Converts a Number to a String with its
hexadecimal value.
Returns the current hour as a number from 0–23.
line: 44 diff --git a/src/content/reference/en/p5/httpDo.mdx b/src/content/reference/en/p5/httpDo.mdx index f9eff51f73..1e635de878 100644 --- a/src/content/reference/en/p5/httpDo.mdx +++ b/src/content/reference/en/p5/httpDo.mdx @@ -2,7 +2,7 @@ title: httpDo module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: >Method for executing an HTTP request. If data type is not specified, diff --git a/src/content/reference/en/p5/httpGet.mdx b/src/content/reference/en/p5/httpGet.mdx index 6bdfcc1f9e..149e34787f 100644 --- a/src/content/reference/en/p5/httpGet.mdx +++ b/src/content/reference/en/p5/httpGet.mdx @@ -2,7 +2,7 @@ title: httpGet module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: >
Method for executing an HTTP GET request. If data type is not specified, diff --git a/src/content/reference/en/p5/httpPost.mdx b/src/content/reference/en/p5/httpPost.mdx index 723f789f21..5a142e01d7 100644 --- a/src/content/reference/en/p5/httpPost.mdx +++ b/src/content/reference/en/p5/httpPost.mdx @@ -2,7 +2,7 @@ title: httpPost module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: >
Method for executing an HTTP POST request. If data type is not specified, diff --git a/src/content/reference/en/p5/hue.mdx b/src/content/reference/en/p5/hue.mdx index af5861e635..c2c90824f3 100644 --- a/src/content/reference/en/p5/hue.mdx +++ b/src/content/reference/en/p5/hue.mdx @@ -2,7 +2,7 @@ title: hue module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >
Gets the hue value of a color.
diff --git a/src/content/reference/en/p5/if.mdx b/src/content/reference/en/p5/if.mdx index b2767a585a..896e105bfa 100644 --- a/src/content/reference/en/p5/if.mdx +++ b/src/content/reference/en/p5/if.mdx @@ -2,7 +2,7 @@ title: if module: Foundation submodule: Foundation -file: src/core/reference.js +file: src\core\reference.js description: >A way to choose whether to run a block of code.
diff --git a/src/content/reference/en/p5/image.mdx b/src/content/reference/en/p5/image.mdx index f59fec88d3..aa8c731501 100644 --- a/src/content/reference/en/p5/image.mdx +++ b/src/content/reference/en/p5/image.mdx @@ -2,7 +2,7 @@ title: image module: Image submodule: Loading & Displaying -file: src/image/loading_displaying.js +file: src\image\loading_displaying.js description: >Draws an image to the canvas.
diff --git a/src/content/reference/en/p5/imageLight.mdx b/src/content/reference/en/p5/imageLight.mdx index d13c6bdab7..86fd6dbbec 100644 --- a/src/content/reference/en/p5/imageLight.mdx +++ b/src/content/reference/en/p5/imageLight.mdx @@ -2,7 +2,7 @@ title: imageLight module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >Creates an ambient light from an image.
diff --git a/src/content/reference/en/p5/imageMode.mdx b/src/content/reference/en/p5/imageMode.mdx index f8242c93de..4723efee3a 100644 --- a/src/content/reference/en/p5/imageMode.mdx +++ b/src/content/reference/en/p5/imageMode.mdx @@ -2,7 +2,7 @@ title: imageMode module: Image submodule: Loading & Displaying -file: src/image/loading_displaying.js +file: src\image\loading_displaying.js description: >Changes the location from which images are drawn when diff --git a/src/content/reference/en/p5/input.mdx b/src/content/reference/en/p5/input.mdx index 5bf822cac0..9cb6b3e16c 100644 --- a/src/content/reference/en/p5/input.mdx +++ b/src/content/reference/en/p5/input.mdx @@ -2,7 +2,7 @@ title: input module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >
Calls a function when the element receives input.
diff --git a/src/content/reference/en/p5/int.mdx b/src/content/reference/en/p5/int.mdx index 91fe84fd3d..9c6f397cf4 100644 --- a/src/content/reference/en/p5/int.mdx +++ b/src/content/reference/en/p5/int.mdx @@ -2,7 +2,7 @@ title: int module: Data submodule: Conversion -file: src/utilities/conversion.js +file: src\utilities\conversion.js description: >Converts a Boolean, String, or decimal
Number to an integer.
Returns true if the draw loop is running and
false if not.
Combines an array of strings into one string.
diff --git a/src/content/reference/en/p5/key.mdx b/src/content/reference/en/p5/key.mdx index 505310313d..48d4d0f447 100644 --- a/src/content/reference/en/p5/key.mdx +++ b/src/content/reference/en/p5/key.mdx @@ -2,7 +2,7 @@ title: key module: Events submodule: Keyboard -file: src/events/keyboard.js +file: src\events\keyboard.js description: >A String system variable that contains the value of the last
key typed.
A Number system variable that contains the code of the last
key typed.
Returns true if the key it’s checking is pressed and
false if not.
A Boolean system variable that's true if any key
is currently pressed
diff --git a/src/content/reference/en/p5/keyPressed.mdx b/src/content/reference/en/p5/keyPressed.mdx
index 3f70d8f1fd..7fe1dc22bb 100644
--- a/src/content/reference/en/p5/keyPressed.mdx
+++ b/src/content/reference/en/p5/keyPressed.mdx
@@ -2,7 +2,7 @@
title: keyPressed
module: Events
submodule: Keyboard
-file: src/events/keyboard.js
+file: src\events\keyboard.js
description: >
A function that's called once when any key is pressed.
@@ -39,7 +39,7 @@ description: >The parameter, event, is optional. keyPressed()
is always passed a
- KeyboardEvent
object with properties that describe the key press event:
A function that's called once when any key is released.
@@ -39,7 +39,7 @@ description: >The parameter, event, is optional. keyReleased()
is always passed a
- KeyboardEvent
object with properties that describe the key press event:
A function that's called once when keys with printable characters are pressed.
@@ -47,7 +47,7 @@ description: >The parameter, event, is optional. keyTyped() is
always passed a
- KeyboardEvent
object with properties that describe the key press event:
Calculates a number between two numbers at a specific increment.
diff --git a/src/content/reference/en/p5/lerpColor.mdx b/src/content/reference/en/p5/lerpColor.mdx index 65ff7cb9cc..9a195e760c 100644 --- a/src/content/reference/en/p5/lerpColor.mdx +++ b/src/content/reference/en/p5/lerpColor.mdx @@ -2,7 +2,7 @@ title: lerpColor module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >Blends two colors to find a third color between them.
diff --git a/src/content/reference/en/p5/let.mdx b/src/content/reference/en/p5/let.mdx index 6c6736f5f3..df787eabb6 100644 --- a/src/content/reference/en/p5/let.mdx +++ b/src/content/reference/en/p5/let.mdx @@ -2,7 +2,7 @@ title: let module: Foundation submodule: Foundation -file: src/core/reference.js +file: src\core\reference.js description: >Declares a new variable.
diff --git a/src/content/reference/en/p5/lightFalloff.mdx b/src/content/reference/en/p5/lightFalloff.mdx index f91d96da6d..33a2503f23 100644 --- a/src/content/reference/en/p5/lightFalloff.mdx +++ b/src/content/reference/en/p5/lightFalloff.mdx @@ -2,7 +2,7 @@ title: lightFalloff module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >Sets the falloff rate for pointLight() diff --git a/src/content/reference/en/p5/lightness.mdx b/src/content/reference/en/p5/lightness.mdx index de4dbf41bc..99cac2fb4f 100644 --- a/src/content/reference/en/p5/lightness.mdx +++ b/src/content/reference/en/p5/lightness.mdx @@ -2,7 +2,7 @@ title: lightness module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >
Gets the lightness value of a color.
diff --git a/src/content/reference/en/p5/lights.mdx b/src/content/reference/en/p5/lights.mdx index be7cd5138a..b565fcea78 100644 --- a/src/content/reference/en/p5/lights.mdx +++ b/src/content/reference/en/p5/lights.mdx @@ -2,7 +2,7 @@ title: lights module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: |Places an ambient and directional light in the scene. The lights are set to ambientLight(128, 128, 128) and diff --git a/src/content/reference/en/p5/line.mdx b/src/content/reference/en/p5/line.mdx index e88a292297..aa0eaa81f3 100644 --- a/src/content/reference/en/p5/line.mdx +++ b/src/content/reference/en/p5/line.mdx @@ -2,7 +2,7 @@ title: line module: Shape submodule: 2D Primitives -file: src/core/shape/2d_primitives.js +file: src\core\shape\2d_primitives.js description: >
Draws a straight line between two points.
diff --git a/src/content/reference/en/p5/linePerspective.mdx b/src/content/reference/en/p5/linePerspective.mdx index bd63eedbba..281c4f03e3 100644 --- a/src/content/reference/en/p5/linePerspective.mdx +++ b/src/content/reference/en/p5/linePerspective.mdx @@ -2,7 +2,7 @@ title: linePerspective module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Enables or disables perspective for lines in 3D sketches.
diff --git a/src/content/reference/en/p5/loadBytes.mdx b/src/content/reference/en/p5/loadBytes.mdx index a7e9fe79ab..8425419cc7 100644 --- a/src/content/reference/en/p5/loadBytes.mdx +++ b/src/content/reference/en/p5/loadBytes.mdx @@ -2,7 +2,7 @@ title: loadBytes module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: |This method is suitable for fetching files up to size of 64MB.
line: 986 diff --git a/src/content/reference/en/p5/loadFont.mdx b/src/content/reference/en/p5/loadFont.mdx index 70bb37ce71..923e2f419c 100644 --- a/src/content/reference/en/p5/loadFont.mdx +++ b/src/content/reference/en/p5/loadFont.mdx @@ -2,7 +2,7 @@ title: loadFont module: Typography submodule: Loading & Displaying -file: src/typography/loading_displaying.js +file: src\typography\loading_displaying.js description: >Loads a font and creates a p5.Font object. @@ -21,7 +21,7 @@ description: > examples can be downloaded for free - here. Paths to remote files should be URLs. For example, @@ -46,7 +46,7 @@ description: > may use the error - Event object if needed.
diff --git a/src/content/reference/en/p5/loadImage.mdx b/src/content/reference/en/p5/loadImage.mdx index 0c55e7590b..f8a91c049e 100644 --- a/src/content/reference/en/p5/loadImage.mdx +++ b/src/content/reference/en/p5/loadImage.mdx @@ -2,7 +2,7 @@ title: loadImage module: Image submodule: Loading & Displaying -file: src/image/loading_displaying.js +file: src\image\loading_displaying.js description: >Loads an image to create a p5.Image object.
diff --git a/src/content/reference/en/p5/loadJSON.mdx b/src/content/reference/en/p5/loadJSON.mdx index aa2851befb..865d41fe24 100644 --- a/src/content/reference/en/p5/loadJSON.mdx +++ b/src/content/reference/en/p5/loadJSON.mdx @@ -2,13 +2,13 @@ title: loadJSON module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: >Loads a JSON file to create an Object.
JavaScript Object Notation - (JSON) is a standard format for sending data between applications. The format is diff --git a/src/content/reference/en/p5/loadModel.mdx b/src/content/reference/en/p5/loadModel.mdx index 9c34c265db..817208a0c0 100644 --- a/src/content/reference/en/p5/loadModel.mdx +++ b/src/content/reference/en/p5/loadModel.mdx @@ -2,7 +2,7 @@ title: loadModel module: Shape submodule: 3D Models -file: src/webgl/loading.js +file: src\webgl\loading.js description: >
Loads a 3D model to create a diff --git a/src/content/reference/en/p5/loadPixels.mdx b/src/content/reference/en/p5/loadPixels.mdx index 896e9e0b05..59612fa1a1 100644 --- a/src/content/reference/en/p5/loadPixels.mdx +++ b/src/content/reference/en/p5/loadPixels.mdx @@ -2,7 +2,7 @@ title: loadPixels module: Image submodule: Pixels -file: src/image/pixels.js +file: src\image\pixels.js description: |
Loads the current value of each pixel on the canvas into the pixels array.
diff --git a/src/content/reference/en/p5/loadShader.mdx b/src/content/reference/en/p5/loadShader.mdx index fee3d6af1c..f92e75fc0c 100644 --- a/src/content/reference/en/p5/loadShader.mdx +++ b/src/content/reference/en/p5/loadShader.mdx @@ -2,7 +2,7 @@ title: loadShader module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Loads vertex and fragment shaders to create a @@ -15,7 +15,7 @@ description: > graphics tasks. They’re written in a language called GLSL and run along with the rest of the code in a sketch.
diff --git a/src/content/reference/en/p5/loadSound.mdx b/src/content/reference/en/p5/loadSound.mdx index 65c460de2f..d4f26f9a12 100644 --- a/src/content/reference/en/p5/loadSound.mdx +++ b/src/content/reference/en/p5/loadSound.mdx @@ -2,14 +2,14 @@ title: loadSound module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |loadSound() returns a new p5.SoundFile from a specified path. If called during preload(), the p5.SoundFile will be ready to play in time for setup() and draw(). If called outside of preload, the p5.SoundFile will not be ready immediately, so loadSound accepts a callback as the second parameter. Using a - + local server is recommended when loading external files.
line: 2946 isConstructor: false diff --git a/src/content/reference/en/p5/loadStrings.mdx b/src/content/reference/en/p5/loadStrings.mdx index 8bca43268b..2306bf7398 100644 --- a/src/content/reference/en/p5/loadStrings.mdx +++ b/src/content/reference/en/p5/loadStrings.mdx @@ -2,7 +2,7 @@ title: loadStrings module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: >Loads a text file to create an Array.
Reads the contents of a file or URL and creates a p5.Table object with diff --git a/src/content/reference/en/p5/loadXML.mdx b/src/content/reference/en/p5/loadXML.mdx index a7de68ede9..15655861a5 100644 --- a/src/content/reference/en/p5/loadXML.mdx +++ b/src/content/reference/en/p5/loadXML.mdx @@ -2,14 +2,14 @@ title: loadXML module: IO submodule: Input -file: src/io/files.js +file: src\io\files.js description: >
Loads an XML file to create a p5.XML object.
Extensible Markup Language - (XML) is a standard format for sending data between applications. Like HTML, the diff --git a/src/content/reference/en/p5/log.mdx b/src/content/reference/en/p5/log.mdx index 8d4bcb380e..41343d119b 100644 --- a/src/content/reference/en/p5/log.mdx +++ b/src/content/reference/en/p5/log.mdx @@ -2,7 +2,7 @@ title: log module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >
Calculates the natural logarithm (the base-e logarithm) of a number.
diff --git a/src/content/reference/en/p5/loop.mdx b/src/content/reference/en/p5/loop.mdx index 9c5bafe847..5176ddc63c 100644 --- a/src/content/reference/en/p5/loop.mdx +++ b/src/content/reference/en/p5/loop.mdx @@ -2,7 +2,7 @@ title: loop module: Structure submodule: Structure -file: src/core/structure.js +file: src\core\structure.js description: >Resumes the draw loop after noLoop() has been diff --git a/src/content/reference/en/p5/mag.mdx b/src/content/reference/en/p5/mag.mdx index 0a4d83d563..77b81fb1ea 100644 --- a/src/content/reference/en/p5/mag.mdx +++ b/src/content/reference/en/p5/mag.mdx @@ -2,7 +2,7 @@ title: mag module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >
Calculates the magnitude, or length, of a vector.
diff --git a/src/content/reference/en/p5/map.mdx b/src/content/reference/en/p5/map.mdx index 8d2c1fd028..324d4599b4 100644 --- a/src/content/reference/en/p5/map.mdx +++ b/src/content/reference/en/p5/map.mdx @@ -2,7 +2,7 @@ title: map module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >Re-maps a number from one range to another.
diff --git a/src/content/reference/en/p5/match.mdx b/src/content/reference/en/p5/match.mdx index 4181e13e82..f329eff427 100644 --- a/src/content/reference/en/p5/match.mdx +++ b/src/content/reference/en/p5/match.mdx @@ -2,7 +2,7 @@ title: match module: Data submodule: String Functions -file: src/utilities/string_functions.js +file: src\utilities\string_functions.js description: >Applies a regular expression to a string and returns an array with the diff --git a/src/content/reference/en/p5/matchAll.mdx b/src/content/reference/en/p5/matchAll.mdx index a2428327e7..20c5fe1de4 100644 --- a/src/content/reference/en/p5/matchAll.mdx +++ b/src/content/reference/en/p5/matchAll.mdx @@ -2,7 +2,7 @@ title: matchAll module: Data submodule: String Functions -file: src/utilities/string_functions.js +file: src\utilities\string_functions.js description: >
Applies a regular expression to a string and returns an array of matches.
diff --git a/src/content/reference/en/p5/max.mdx b/src/content/reference/en/p5/max.mdx index ce5e03248a..ffe65de98e 100644 --- a/src/content/reference/en/p5/max.mdx +++ b/src/content/reference/en/p5/max.mdx @@ -2,7 +2,7 @@ title: max module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >Returns the largest value in a sequence of numbers.
diff --git a/src/content/reference/en/p5/metalness.mdx b/src/content/reference/en/p5/metalness.mdx index 32459bdf91..835dc63595 100644 --- a/src/content/reference/en/p5/metalness.mdx +++ b/src/content/reference/en/p5/metalness.mdx @@ -2,7 +2,7 @@ title: metalness module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Sets the amount of "metalness" of a diff --git a/src/content/reference/en/p5/midiToFreq.mdx b/src/content/reference/en/p5/midiToFreq.mdx index 6c4201419d..507c23985e 100644 --- a/src/content/reference/en/p5/midiToFreq.mdx +++ b/src/content/reference/en/p5/midiToFreq.mdx @@ -2,7 +2,7 @@ title: midiToFreq module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |
Returns the frequency value of a MIDI note value. General MIDI treats notes as integers where middle C diff --git a/src/content/reference/en/p5/millis.mdx b/src/content/reference/en/p5/millis.mdx index f8f547ec50..3a5c118158 100644 --- a/src/content/reference/en/p5/millis.mdx +++ b/src/content/reference/en/p5/millis.mdx @@ -2,7 +2,7 @@ title: millis module: IO submodule: Time & Date -file: src/utilities/time_date.js +file: src\utilities\time_date.js description: >
Returns the number of milliseconds since a sketch started running.
diff --git a/src/content/reference/en/p5/min.mdx b/src/content/reference/en/p5/min.mdx index 8620796010..1a39dfc1ab 100644 --- a/src/content/reference/en/p5/min.mdx +++ b/src/content/reference/en/p5/min.mdx @@ -2,7 +2,7 @@ title: min module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >Returns the smallest value in a sequence of numbers.
diff --git a/src/content/reference/en/p5/minute.mdx b/src/content/reference/en/p5/minute.mdx index 5236556a76..003ccc92ec 100644 --- a/src/content/reference/en/p5/minute.mdx +++ b/src/content/reference/en/p5/minute.mdx @@ -2,7 +2,7 @@ title: minute module: IO submodule: Time & Date -file: src/utilities/time_date.js +file: src\utilities\time_date.js description: |Returns the current minute as a number from 0–59.
line: 78 diff --git a/src/content/reference/en/p5/model.mdx b/src/content/reference/en/p5/model.mdx index 981de3bf09..d1767e64e9 100644 --- a/src/content/reference/en/p5/model.mdx +++ b/src/content/reference/en/p5/model.mdx @@ -2,7 +2,7 @@ title: model module: Shape submodule: 3D Models -file: src/webgl/loading.js +file: src\webgl\loading.js description: >Draws a p5.Geometry object to the canvas.
diff --git a/src/content/reference/en/p5/month.mdx b/src/content/reference/en/p5/month.mdx index a6de123171..a6e56c3fac 100644 --- a/src/content/reference/en/p5/month.mdx +++ b/src/content/reference/en/p5/month.mdx @@ -2,7 +2,7 @@ title: month module: IO submodule: Time & Date -file: src/utilities/time_date.js +file: src\utilities\time_date.js description: |Returns the current month as a number from 1–12.
line: 242 diff --git a/src/content/reference/en/p5/mouseButton.mdx b/src/content/reference/en/p5/mouseButton.mdx index e3dd328316..7d6ef00597 100644 --- a/src/content/reference/en/p5/mouseButton.mdx +++ b/src/content/reference/en/p5/mouseButton.mdx @@ -2,7 +2,7 @@ title: mouseButton module: Events submodule: Mouse -file: src/events/mouse.js +file: src\events\mouse.js description: >A String system variable that contains the value of the last mouse button @@ -16,7 +16,7 @@ description: >
Note: Different browsers may track mouseButton differently.
See
- MDN
for more information.
A function that's called once after a mouse button is pressed and released.
@@ -42,7 +42,7 @@ description: >The parameter, event, is optional. mouseClicked()
is always passed a
- MouseEvent
object with properties that describe the mouse click event:
A function that's called when the mouse moves while a button is pressed.
@@ -40,7 +40,7 @@ description: >The parameter, event, is optional. mouseDragged()
is always passed a
- MouseEvent
object with properties that describe the mouse drag event:
A Boolean system variable that's true if the
mouse is pressed and
diff --git a/src/content/reference/en/p5/mouseMoved.mdx b/src/content/reference/en/p5/mouseMoved.mdx
index 20ee3323da..63912d278b 100644
--- a/src/content/reference/en/p5/mouseMoved.mdx
+++ b/src/content/reference/en/p5/mouseMoved.mdx
@@ -2,7 +2,7 @@
title: mouseMoved
module: Events
submodule: Mouse
-file: src/events/mouse.js
+file: src\events\mouse.js
description: >
A function that's called when the mouse moves.
@@ -41,7 +41,7 @@ description: >The parameter, event, is optional. mouseMoved()
is always passed a
- MouseEvent
object with properties that describe the mouse move event:
A function that's called once when a mouse button is pressed.
@@ -39,7 +39,7 @@ description: >The parameter, event, is optional. mousePressed()
is always passed a
- MouseEvent
object with properties that describe the mouse press event:
A function that's called once when a mouse button is released.
@@ -42,7 +42,7 @@ description: >The parameter, event, is optional.
mouseReleased() is always passed a
- MouseEvent
object with properties that describe the mouse release event:
A function that's called once when the mouse wheel moves.
@@ -39,7 +39,7 @@ description: >The parameter, event, is optional. mouseWheel()
is always passed a
- MouseEvent
object with properties that describe the mouse scroll event:
A Number system variable that tracks the mouse's horizontal
position.
A Number system variable that tracks the mouse's vertical
position.
A Number system variable that tracks the mouse's horizontal
movement.
A Number system variable that tracks the mouse's vertical
movement.
Converts a Number into a String with a given
number of digits.
Converts a Number into a String with commas to
mark units of 1,000.
Converts a Number into a String with a plus or
minus sign.
Converts a positive Number into a String with an
extra space in front.
Removes the default canvas.
diff --git a/src/content/reference/en/p5/noCursor.mdx b/src/content/reference/en/p5/noCursor.mdx index 5b744c9aca..6c05e890f2 100644 --- a/src/content/reference/en/p5/noCursor.mdx +++ b/src/content/reference/en/p5/noCursor.mdx @@ -2,7 +2,7 @@ title: noCursor module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: |Hides the cursor from view.
line: 482 diff --git a/src/content/reference/en/p5/noDebugMode.mdx b/src/content/reference/en/p5/noDebugMode.mdx index 2fbe28b5b6..e1ea3c7621 100644 --- a/src/content/reference/en/p5/noDebugMode.mdx +++ b/src/content/reference/en/p5/noDebugMode.mdx @@ -2,7 +2,7 @@ title: noDebugMode module: 3D submodule: Interaction -file: src/webgl/interaction.js +file: src\webgl\interaction.js description: >Turns off debugMode() in a 3D sketch.
diff --git a/src/content/reference/en/p5/noErase.mdx b/src/content/reference/en/p5/noErase.mdx index 6971b2da66..ccef07eab3 100644 --- a/src/content/reference/en/p5/noErase.mdx +++ b/src/content/reference/en/p5/noErase.mdx @@ -2,7 +2,7 @@ title: noErase module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Ends erasing that was started with erase().
diff --git a/src/content/reference/en/p5/noFill.mdx b/src/content/reference/en/p5/noFill.mdx index ee74aeb3d0..cd8750061f 100644 --- a/src/content/reference/en/p5/noFill.mdx +++ b/src/content/reference/en/p5/noFill.mdx @@ -2,7 +2,7 @@ title: noFill module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Disables setting the fill color for shapes.
diff --git a/src/content/reference/en/p5/noLights.mdx b/src/content/reference/en/p5/noLights.mdx index 3453774298..6edda88dde 100644 --- a/src/content/reference/en/p5/noLights.mdx +++ b/src/content/reference/en/p5/noLights.mdx @@ -2,7 +2,7 @@ title: noLights module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >Removes all lights from the sketch.
diff --git a/src/content/reference/en/p5/noLoop.mdx b/src/content/reference/en/p5/noLoop.mdx index aecb3667f5..da19275978 100644 --- a/src/content/reference/en/p5/noLoop.mdx +++ b/src/content/reference/en/p5/noLoop.mdx @@ -2,7 +2,7 @@ title: noLoop module: Structure submodule: Structure -file: src/core/structure.js +file: src\core\structure.js description: >Stops the code in draw() from running repeatedly.
diff --git a/src/content/reference/en/p5/noSmooth.mdx b/src/content/reference/en/p5/noSmooth.mdx index 9e585a5351..590ccd13b0 100644 --- a/src/content/reference/en/p5/noSmooth.mdx +++ b/src/content/reference/en/p5/noSmooth.mdx @@ -2,7 +2,7 @@ title: noSmooth module: Shape submodule: Attributes -file: src/core/shape/attributes.js +file: src\core\shape\attributes.js description: >Draws certain features with jagged (aliased) edges.
diff --git a/src/content/reference/en/p5/noStroke.mdx b/src/content/reference/en/p5/noStroke.mdx index 535e1c93e2..208ffd8ce3 100644 --- a/src/content/reference/en/p5/noStroke.mdx +++ b/src/content/reference/en/p5/noStroke.mdx @@ -2,7 +2,7 @@ title: noStroke module: Color submodule: Setting -file: src/color/setting.js +file: src\color\setting.js description: >Disables drawing points, lines, and the outlines of shapes.
diff --git a/src/content/reference/en/p5/noTint.mdx b/src/content/reference/en/p5/noTint.mdx index 03d4a4d250..4c83538f5b 100644 --- a/src/content/reference/en/p5/noTint.mdx +++ b/src/content/reference/en/p5/noTint.mdx @@ -2,7 +2,7 @@ title: noTint module: Image submodule: Loading & Displaying -file: src/image/loading_displaying.js +file: src\image\loading_displaying.js description: >Removes the current tint set by tint().
diff --git a/src/content/reference/en/p5/noise.mdx b/src/content/reference/en/p5/noise.mdx index 2d40fe144e..220d1c0605 100644 --- a/src/content/reference/en/p5/noise.mdx +++ b/src/content/reference/en/p5/noise.mdx @@ -2,7 +2,7 @@ title: noise module: Math submodule: Noise -file: src/math/noise.js +file: src\math\noise.js description: >Returns random numbers that can be tuned to feel organic.
diff --git a/src/content/reference/en/p5/noiseDetail.mdx b/src/content/reference/en/p5/noiseDetail.mdx index 74c3432f8d..9cdf75dd1d 100644 --- a/src/content/reference/en/p5/noiseDetail.mdx +++ b/src/content/reference/en/p5/noiseDetail.mdx @@ -2,7 +2,7 @@ title: noiseDetail module: Math submodule: Noise -file: src/math/noise.js +file: src\math\noise.js description: >Adjusts the character of the noise produced by the diff --git a/src/content/reference/en/p5/noiseSeed.mdx b/src/content/reference/en/p5/noiseSeed.mdx index 88e7f3429e..2d96a272ec 100644 --- a/src/content/reference/en/p5/noiseSeed.mdx +++ b/src/content/reference/en/p5/noiseSeed.mdx @@ -2,7 +2,7 @@ title: noiseSeed module: Math submodule: Noise -file: src/math/noise.js +file: src\math\noise.js description: >
Sets the seed value for the noise() function.
diff --git a/src/content/reference/en/p5/norm.mdx b/src/content/reference/en/p5/norm.mdx index 6df960fbc2..e8c936a718 100644 --- a/src/content/reference/en/p5/norm.mdx +++ b/src/content/reference/en/p5/norm.mdx @@ -2,7 +2,7 @@ title: norm module: Math submodule: Calculation -file: src/math/calculation.js +file: src\math\calculation.js description: >Maps a number from one range to a value between 0 and 1.
diff --git a/src/content/reference/en/p5/normal.mdx b/src/content/reference/en/p5/normal.mdx index d57cea43bc..1e51e183be 100644 --- a/src/content/reference/en/p5/normal.mdx +++ b/src/content/reference/en/p5/normal.mdx @@ -2,7 +2,7 @@ title: normal module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >Sets the normal vector for vertices in a custom 3D shape.
diff --git a/src/content/reference/en/p5/normalMaterial.mdx b/src/content/reference/en/p5/normalMaterial.mdx index 4acf2fa9ec..3095b173d6 100644 --- a/src/content/reference/en/p5/normalMaterial.mdx +++ b/src/content/reference/en/p5/normalMaterial.mdx @@ -2,7 +2,7 @@ title: normalMaterial module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: >Sets the current material as a normal material.
diff --git a/src/content/reference/en/p5/orbitControl.mdx b/src/content/reference/en/p5/orbitControl.mdx index 7493a568c4..a7ae1de847 100644 --- a/src/content/reference/en/p5/orbitControl.mdx +++ b/src/content/reference/en/p5/orbitControl.mdx @@ -2,7 +2,7 @@ title: orbitControl module: 3D submodule: Interaction -file: src/webgl/interaction.js +file: src\webgl\interaction.js description: >Allows the user to orbit around a 3D sketch using a mouse, trackpad, or diff --git a/src/content/reference/en/p5/ortho.mdx b/src/content/reference/en/p5/ortho.mdx index e7d1cfe30c..cd10a63198 100644 --- a/src/content/reference/en/p5/ortho.mdx +++ b/src/content/reference/en/p5/ortho.mdx @@ -2,7 +2,7 @@ title: ortho module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >
Sets an orthographic projection for the current camera in a 3D sketch.
diff --git a/src/content/reference/en/p5/outputVolume.mdx b/src/content/reference/en/p5/outputVolume.mdx index 9b0d16e8a4..da85f037f7 100644 --- a/src/content/reference/en/p5/outputVolume.mdx +++ b/src/content/reference/en/p5/outputVolume.mdx @@ -2,7 +2,7 @@ title: outputVolume module: p5.sound submodule: p5.sound -file: lib/addons/p5.sound.js +file: lib\addons\p5.sound.js description: |-Scale the output of all sound in this sketch
Scaled between 0.0 (silence) and 1.0 (full volume). diff --git a/src/content/reference/en/p5/p5.Camera.mdx b/src/content/reference/en/p5/p5.Camera.mdx index 97841cc22b..3c4453d3e0 100644 --- a/src/content/reference/en/p5/p5.Camera.mdx +++ b/src/content/reference/en/p5/p5.Camera.mdx @@ -2,7 +2,7 @@ title: p5.Camera module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >A class to describe a camera for viewing a 3D sketch.
@@ -241,7 +241,7 @@ methods: which is 10 times the default distance between the camera and the origin. - path: p5.Camera/perspective + path: src\content\reference\en\p5.Camera/perspective ortho: description: >Sets an orthographic projection for the camera.
@@ -294,7 +294,7 @@ methods:far are set to
0 and max(width, height) + 800, respectively.
- path: p5.Camera/ortho
+ path: src\content\reference\en\p5.Camera/ortho
frustum:
description: >
Sets the camera's frustum.
@@ -352,7 +352,7 @@ methods: between the camera and the origin. - path: p5.Camera/frustum + path: src\content\reference\en\p5.Camera/frustum roll: description: >Rotates the camera in a clockwise/counter-clockwise direction.
@@ -376,7 +376,7 @@ methods:Note: Angles are interpreted based on the current angleMode().
- path: p5.Camera/roll + path: src\content\reference\en\p5.Camera/roll pan: description: >Rotates the camera left and right.
@@ -399,7 +399,7 @@ methods:Note: Angles are interpreted based on the current angleMode().
- path: p5.Camera/pan + path: src\content\reference\en\p5.Camera/pan tilt: description: >Rotates the camera up and down.
@@ -422,7 +422,7 @@ methods:Note: Angles are interpreted based on the current angleMode().
- path: p5.Camera/tilt + path: src\content\reference\en\p5.Camera/tilt lookAt: description: >Points the camera at a location.
@@ -441,7 +441,7 @@ methods: coordinates(10, 20, 30).
- path: p5.Camera/lookAt
+ path: src\content\reference\en\p5.Camera/lookAt
camera:
description: >
Sets the position and orientation of the camera.
@@ -491,7 +491,7 @@ methods: default, the "up" vector is(0, 1, 0).
- path: p5.Camera/camera
+ path: src\content\reference\en\p5.Camera/camera
move:
description: >
Moves the camera along its "local" axes without changing its @@ -506,7 +506,7 @@ methods: pixels to the right, 20 pixels down, and 30 pixels backward in its "local" space.
- path: p5.Camera/move + path: src\content\reference\en\p5.Camera/move setPosition: description: >Sets the camera’s position in "world" space without changing its
@@ -521,7 +521,7 @@ methods:
places the camera at coordinates (10, 20, 30) in "world"
space.
Sets the camera’s position, orientation, and projection by copying
@@ -534,7 +534,7 @@ methods:
cam2.set(cam1) will set cam2 using
cam1’s configuration.
Sets the camera’s position and orientation to values that are
@@ -576,25 +576,25 @@ methods:
close to cam1’s.
Note: All of the cameras must use the same projection.
- path: p5.Camera/slerp + path: src\content\reference\en\p5.Camera/slerp properties: eyeX: description: |The camera’s x-coordinate.
By default, the camera’s x-coordinate is set to 0 in "world" space.
- path: p5.Camera/eyeX + path: src\content\reference\en\p5.Camera/eyeX eyeY: description: |The camera’s y-coordinate.
By default, the camera’s y-coordinate is set to 0 in "world" space.
- path: p5.Camera/eyeY + path: src\content\reference\en\p5.Camera/eyeY eyeZ: description: >The camera’s z-coordinate.
By default, the camera’s z-coordinate is set to 800 in "world" space.
- path: p5.Camera/eyeZ + path: src\content\reference\en\p5.Camera/eyeZ centerX: description: >The x-coordinate of the place where the camera looks.
@@ -603,7 +603,7 @@ properties: "world" space, somyCamera.centerX is 0.
- path: p5.Camera/centerX
+ path: src\content\reference\en\p5.Camera/centerX
centerY:
description: >
The y-coordinate of the place where the camera looks.
@@ -612,7 +612,7 @@ properties: "world" space, somyCamera.centerY is 0.
- path: p5.Camera/centerY
+ path: src\content\reference\en\p5.Camera/centerY
centerZ:
description: >
The y-coordinate of the place where the camera looks.
@@ -621,7 +621,7 @@ properties: "world" space, somyCamera.centerZ is 0.
- path: p5.Camera/centerZ
+ path: src\content\reference\en\p5.Camera/centerZ
upX:
description: >
The x-component of the camera's "up" vector.
@@ -630,7 +630,7 @@ properties: vector is(0, 1, 0), so its x-component is 0 in "local" space.
- path: p5.Camera/upX
+ path: src\content\reference\en\p5.Camera/upX
upY:
description: >
The y-component of the camera's "up" vector.
@@ -639,7 +639,7 @@ properties: vector is(0, 1, 0), so its y-component is 1 in "local" space.
- path: p5.Camera/upY
+ path: src\content\reference\en\p5.Camera/upY
upZ:
description: >
The z-component of the camera's "up" vector.
@@ -648,7 +648,7 @@ properties: vector is(0, 1, 0), so its z-component is 0 in "local" space.
- path: p5.Camera/upZ
+ path: src\content\reference\en\p5.Camera/upZ
chainable: false
---
diff --git a/src/content/reference/en/p5/p5.Color.mdx b/src/content/reference/en/p5/p5.Color.mdx
index 909e7ed038..ecf515aa13 100644
--- a/src/content/reference/en/p5/p5.Color.mdx
+++ b/src/content/reference/en/p5/p5.Color.mdx
@@ -2,7 +2,7 @@
title: p5.Color
module: Color
submodule: Creating & Reading
-file: src/color/p5.Color.js
+file: src\color\p5.Color.js
description: >
A class to describe a color.
@@ -67,7 +67,7 @@ methods: formatted. By default, color strings are formatted as'rgba(r, g, b,
a)'.
- path: p5.Color/toString
+ path: src\content\reference\en\p5.Color/toString
setRed:
description: >
Sets the red component of a color.
@@ -76,7 +76,7 @@ methods: href="/reference/p5/colorMode/">colorMode(). In the default RGB mode it's between 0 and 255. - path: p5.Color/setRed + path: src\content\reference\en\p5.Color/setRed setGreen: description: >Sets the green component of a color.
@@ -85,7 +85,7 @@ methods: href="/reference/p5/colorMode/">colorMode(). In the default RGB mode it's between 0 and 255. - path: p5.Color/setGreen + path: src\content\reference\en\p5.Color/setGreen setBlue: description: >Sets the blue component of a color.
@@ -94,7 +94,7 @@ methods: href="/reference/p5/colorMode/">colorMode(). In the default RGB mode it's between 0 and 255. - path: p5.Color/setBlue + path: src\content\reference\en\p5.Color/setBlue setAlpha: description: >Sets the alpha (transparency) value of a color.
@@ -105,7 +105,7 @@ methods: mode it's between 0 and 255. - path: p5.Color/setAlpha + path: src\content\reference\en\p5.Color/setAlpha chainable: false --- diff --git a/src/content/reference/en/p5/p5.Element.mdx b/src/content/reference/en/p5/p5.Element.mdx index cf6506500d..c5eb624282 100644 --- a/src/content/reference/en/p5/p5.Element.mdx +++ b/src/content/reference/en/p5/p5.Element.mdx @@ -2,12 +2,12 @@ title: p5.Element module: DOM submodule: DOM -file: src/core/p5.Element.js +file: src\core\p5.Element.js description: >A class to describe an HTML element.
Sketches can use many elements. Common elements include the drawing canvas, @@ -94,27 +94,27 @@ methods: element's parent.
- path: p5.Element/parent + path: src\content\reference\en\p5.Element/parent id: description: >Sets the element's ID using a given string.
Calling myElement.id() without an argument returns its ID
as a string.
Adds a class attribute to the element using a given string.
Calling myElement.class() without an argument returns a
string with its current classes.
Calls a function when the mouse is pressed over the element.
@@ -125,14 +125,14 @@ methods:Note: Some mobile browsers may also trigger this event when the element receives a quick tap.
- path: p5.Element/mousePressed + path: src\content\reference\en\p5.Element/mousePressed doubleClicked: description: >Calls a function when the mouse is pressed twice over the element.
Calling myElement.doubleClicked(false) disables the
function.
Calls a function when the mouse wheel scrolls over the element.
@@ -154,7 +154,7 @@ methods:Calling myElement.mouseWheel(false) disables the
function.
Calls a function when the mouse is released over the element.
@@ -165,7 +165,7 @@ methods:Note: Some mobile browsers may also trigger this event when the element receives a quick tap.
- path: p5.Element/mouseReleased + path: src\content\reference\en\p5.Element/mouseReleased mouseClicked: description: >Calls a function when the mouse is pressed and released over the @@ -177,28 +177,28 @@ methods:
Note: Some mobile browsers may also trigger this event when the element receives a quick tap.
- path: p5.Element/mouseClicked + path: src\content\reference\en\p5.Element/mouseClicked mouseMoved: description: >Calls a function when the mouse moves over the element.
Calling myElement.mouseMoved(false) disables the
function.
Calls a function when the mouse moves onto the element.
Calling myElement.mouseOver(false) disables the
function.
Calls a function when the mouse moves off the element.
Calling myElement.mouseOut(false) disables the
function.
Calls a function when the element is touched.
@@ -207,7 +207,7 @@ methods: function.Note: Touch functions only work on mobile devices.
- path: p5.Element/touchStarted + path: src\content\reference\en\p5.Element/touchStarted touchMoved: description: >Calls a function when the user touches the element and moves.
@@ -216,7 +216,7 @@ methods: function.Note: Touch functions only work on mobile devices.
- path: p5.Element/touchMoved + path: src\content\reference\en\p5.Element/touchMoved touchEnded: description: >Calls a function when the user stops touching the element.
@@ -225,37 +225,37 @@ methods: function.Note: Touch functions only work on mobile devices.
- path: p5.Element/touchEnded + path: src\content\reference\en\p5.Element/touchEnded dragOver: description: >Calls a function when a file is dragged over the element.
Calling myElement.dragOver(false) disables the
function.
Calls a function when a file is dragged off the element.
Calling myElement.dragLeave(false) disables the
function.
Adds a class to the element.
- path: p5.Element/addClass + path: src\content\reference\en\p5.Element/addClass removeClass: description: |Removes a class from the element.
- path: p5.Element/removeClass + path: src\content\reference\en\p5.Element/removeClass hasClass: description: |Checks if a class is already applied to element.
- path: p5.Element/hasClass + path: src\content\reference\en\p5.Element/hasClass toggleClass: description: |Toggles whether a class is applied to the element.
- path: p5.Element/toggleClass + path: src\content\reference\en\p5.Element/toggleClass child: description: >Attaches the element as a child of another element.
@@ -268,7 +268,7 @@ methods: array of children DOM nodes is returned. - path: p5.Element/child + path: src\content\reference\en\p5.Element/child center: description: >Centers the element either vertically, horizontally, or both.
@@ -282,7 +282,7 @@ methods: element is aligned both vertically and horizontally. - path: p5.Element/center + path: src\content\reference\en\p5.Element/center html: description: >Sets the inner HTML of the element, replacing any existing HTML.
@@ -299,7 +299,7 @@ methods: element's inner HTML is returned. - path: p5.Element/html + path: src\content\reference\en\p5.Element/html position: description: >Sets the element's position.
@@ -313,7 +313,7 @@ methods: the element's positioning + href="https://developer.mozilla.org/en-US/docs/Web/CSS/position">positioning scheme.positionType is a string that can be either
@@ -327,12 +327,12 @@ methods:
the element's position in an object, as in { x: 0, y: 0
}.
- path: p5.Element/position
+ path: src\content\reference\en\p5.Element/position
style:
description: >
Applies a style to the element by adding a - CSS declaration.
The first parameter, property, is a string. If the name of
@@ -361,7 +361,7 @@ methods:
p5.Color object, as in
myElement.style('color', myColor).
Adds an
@@ -400,7 +400,7 @@ methods:
horizontal
alignment to center.
Removes an attribute from the element.
@@ -412,7 +412,7 @@ methods:align
attribute if it's been set.
- path: p5.Element/removeAttribute
+ path: src\content\reference\en\p5.Element/removeAttribute
value:
description: >
Returns or sets the element's value.
@@ -425,15 +425,15 @@ methods: as inmyElement.value(123), it's used to set the element's
value.
- path: p5.Element/value
+ path: src\content\reference\en\p5.Element/value
show:
description: |
Shows the current element.
- path: p5.Element/show + path: src\content\reference\en\p5.Element/show hide: description: |Hides the current element.
- path: p5.Element/hide + path: src\content\reference\en\p5.Element/hide size: description: >Sets the element's width and height.
@@ -473,12 +473,12 @@ methods: wait to callmyElement.size() until after the data loads.
- path: p5.Element/size
+ path: src\content\reference\en\p5.Element/size
remove:
description: |
Removes the element, stops all audio/video streams, and removes all callback functions.
- path: p5.Element/remove + path: src\content\reference\en\p5.Element/remove drop: description: >Calls a function when the user drops a file on the element.
@@ -502,8 +502,8 @@ methods: parameter,event, that's a
DragEvent.
- path: p5.Element/drop
+ href="https://developer.mozilla.org/en-US/docs/Web/API/DragEvent">DragEvent.
+ path: src\content\reference\en\p5.Element/drop
draggable:
description: >
Makes the element draggable.
@@ -514,7 +514,7 @@ methods:myElement.draggable(otherElement), the other element will
become draggable.
- path: p5.Element/draggable
+ path: src\content\reference\en\p5.Element/draggable
properties:
elt:
description: >
@@ -522,19 +522,19 @@ properties:
The - HTMLElement object's properties and methods can be used directly.
- path: p5.Element/elt + path: src\content\reference\en\p5.Element/elt width: description: |A Number property that stores the element's width.
A Number property that stores the element's height.
A class to describe a file.
p5.File objects are used by
@@ -99,24 +99,24 @@ properties:
description: >
Underlying
- File
object. All File properties and methods are accessible.
The file MIME type as a string.
For example, 'image' and 'text' are both MIME
types.
The file subtype as a string.
@@ -124,25 +124,25 @@ properties:For example, a file with an 'image'
MIME type
may have a subtype such as png or jpeg.
The file name as a string.
- path: p5.File/name + path: src\content\reference\en\p5.File/name size: description: |The number of bytes in the file.
- path: p5.File/size + path: src\content\reference\en\p5.File/size data: description: |A string containing the file's data.
Data can be either image data, text contents, or a parsed object in the case of JSON and p5.XML objects.
- path: p5.File/data + path: src\content\reference\en\p5.File/data chainable: false --- diff --git a/src/content/reference/en/p5/p5.Font.mdx b/src/content/reference/en/p5/p5.Font.mdx index 13374a8802..14f575cbcb 100644 --- a/src/content/reference/en/p5/p5.Font.mdx +++ b/src/content/reference/en/p5/p5.Font.mdx @@ -2,7 +2,7 @@ title: p5.Font module: Typography submodule: Loading & Displaying -file: src/typography/p5.Font.js +file: src\typography\p5.Font.js description: |A class to describe fonts.
line: 13 @@ -79,7 +79,7 @@ methods: will use the current textSize(). - path: p5.Font/textBounds + path: src\content\reference\en\p5.Font/textBounds textToPoints: description: >Returns an array of points outlining a string of text written using the @@ -128,14 +128,14 @@ methods: than 0. The value represents the threshold angle to use when determining whether two edges are collinear.
- path: p5.Font/textToPoints + path: src\content\reference\en\p5.Font/textToPoints properties: font: description: |The font's underlying opentype.js font object.
- path: p5.Font/font + path: src\content\reference\en\p5.Font/font chainable: false --- diff --git a/src/content/reference/en/p5/p5.Framebuffer.mdx b/src/content/reference/en/p5/p5.Framebuffer.mdx index 05f78f9dc3..f3696b812e 100644 --- a/src/content/reference/en/p5/p5.Framebuffer.mdx +++ b/src/content/reference/en/p5/p5.Framebuffer.mdx @@ -1,7 +1,7 @@ --- title: p5.Framebuffer module: Rendering -file: src/webgl/p5.Framebuffer.js +file: src\webgl\p5.Framebuffer.js description: >A class to describe a high-performance drawing surface for textures.
@@ -73,7 +73,7 @@ methods: to 300 andmyBuffer.height 500.
- path: p5.Framebuffer/resize
+ path: src\content\reference\en\p5.Framebuffer/resize
pixelDensity:
description: >
Sets the framebuffer's pixel density or returns its current @@ -103,7 +103,7 @@ methods: returns its current pixel density.
- path: p5.Framebuffer/pixelDensity + path: src\content\reference\en\p5.Framebuffer/pixelDensity autoSized: description: >Toggles the framebuffer's autosizing mode or returns the current
@@ -121,7 +121,7 @@ methods:
true if
the framebuffer automatically resizes and false if not.
Creates a new @@ -186,7 +186,7 @@ methods: myBuffer.end(); - path: p5.Framebuffer/createCamera + path: src\content\reference\en\p5.Framebuffer/createCamera remove: description: >
Deletes the framebuffer from GPU memory.
@@ -217,7 +217,7 @@ methods: variable still refers to the framebuffer, then it won't be garbage collected. - path: p5.Framebuffer/remove + path: src\content\reference\en\p5.Framebuffer/remove begin: description: >Begins drawing shapes to the framebuffer.
@@ -236,7 +236,7 @@ methods: framebuffer. Changes won't be visible until the framebuffer is displayed as an image or texture. - path: p5.Framebuffer/begin + path: src\content\reference\en\p5.Framebuffer/begin end: description: >Stops drawing shapes to the framebuffer.
@@ -255,7 +255,7 @@ methods: Changes won't be visible until the framebuffer is displayed as an image or texture. - path: p5.Framebuffer/end + path: src\content\reference\en\p5.Framebuffer/end draw: description: >Draws to the framebuffer by calling a function that contains drawing @@ -280,7 +280,7 @@ methods: myBuffer.end(); - path: p5.Framebuffer/draw + path: src\content\reference\en\p5.Framebuffer/draw loadPixels: description: >
Loads the current value of each pixel in the framebuffer into its @@ -291,7 +291,7 @@ methods: or writing to myBuffer.pixels.
- path: p5.Framebuffer/loadPixels + path: src\content\reference\en\p5.Framebuffer/loadPixels get: description: >Gets a pixel or a region of pixels from the framebuffer.
@@ -330,7 +330,7 @@ methods: the coordinates for the upper-left corner of the subsection. The last two parameters are the width and height of the subsection. - path: p5.Framebuffer/get + path: src\content\reference\en\p5.Framebuffer/get updatePixels: description: >Updates the framebuffer with the RGBA values in the @@ -347,7 +347,7 @@ methods: myBuffer.loadPixels().
- path: p5.Framebuffer/updatePixels + path: src\content\reference\en\p5.Framebuffer/updatePixels properties: pixels: description: > @@ -372,14 +372,14 @@ properties: overmyBuffer.pixels.
- path: p5.Framebuffer/pixels
+ path: src\content\reference\en\p5.Framebuffer/pixels
color:
description: >
An object that stores the framebuffer's color data.
Each framebuffer uses a
- WebGLTexture
object internally to store its color data. The myBuffer.color
@@ -402,14 +402,14 @@ properties:
plane(myBuffer.width, -myBuffer.height) will flip the
framebuffer.
An object that stores the framebuffer's depth data.
Each framebuffer uses a
- WebGLTexture
object internally to store its depth data. The myBuffer.depth
@@ -432,7 +432,7 @@ properties:
plane(myBuffer.width, -myBuffer.height) will flip the
framebuffer.
A class to describe a 3D shape.
@@ -327,7 +327,7 @@ methods: // } - path: p5.Geometry/calculateBoundingBox + path: src\content\reference\en\p5.Geometry/calculateBoundingBox clearColors: description: >Removes the geometry’s internal colors.
@@ -343,7 +343,7 @@ methods: fill() function to apply color to the geometry. - path: p5.Geometry/clearColors + path: src\content\reference\en\p5.Geometry/clearColors saveObj: description: >The saveObj() function exports p5.Geometry
@@ -359,7 +359,7 @@ methods:
p5.Geometry,
as well as its texture coordinates and normals, if it has them.
The saveStl() function exports p5.Geometry
@@ -379,7 +379,7 @@ methods:
but less human-readable binary .stl file by passing { binary: true
} as a second parameter.
Flips the geometry’s texture u-coordinates.
@@ -440,7 +440,7 @@ methods: // Bottom vertices: [0, 1, 1, 1] --> [1, 1, 0, 1] - path: p5.Geometry/flipU + path: src\content\reference\en\p5.Geometry/flipU flipV: description: >Flips the geometry’s texture v-coordinates.
@@ -501,7 +501,7 @@ methods: // Right vertices: [1, 0] <--> [1, 1] - path: p5.Geometry/flipV + path: src\content\reference\en\p5.Geometry/flipV computeFaces: description: >Computes the geometry's faces using its vertices.
@@ -568,7 +568,7 @@ methods:Note: myGeometry.computeFaces() only works when geometries
have four or more vertices.
Calculates the normal vector for each vertex on the geometry.
@@ -634,7 +634,7 @@ methods: number of decimal places to use for calculations. By default,roundToPrecision uses 3 decimal places.
- path: p5.Geometry/computeNormals
+ path: src\content\reference\en\p5.Geometry/computeNormals
normalize:
description: >
Transforms the geometry's vertices to fit snugly within a 100×100×100 @@ -655,7 +655,7 @@ methods:
Note: myGeometry.normalize() only works when called in the
setup() function.
myGeometry.vertices[2], and so on.
- path: p5.Geometry/vertices
+ path: src\content\reference\en\p5.Geometry/vertices
vertexNormals:
description: >
An array with the vectors that are normal to the geometry's
@@ -697,7 +697,7 @@ properties:
href="/reference/p5/p5.Vector">p5.Vector
objects in the myGeometry.vertexNormals array.
An array that lists which of the geometry's vertices form each of its
@@ -753,7 +753,7 @@ properties:
myGeometry.vertices[1],and
myGeometry.vertices[3].
An array that lists the texture coordinates for each of the geometry's
@@ -782,7 +782,7 @@ properties:
stored at myGeometry.uvs[0] and
myGeometry.uvs[1].
A class to describe a drawing surface that's separate from the main canvas.
@@ -132,7 +132,7 @@ methods: objects must reset these values manually by callingmyGraphics.reset().
- path: p5.Graphics/reset
+ path: src\content\reference\en\p5.Graphics/reset
remove:
description: >
Removes the graphics buffer from the web page.
@@ -164,7 +164,7 @@ methods: variable still refers to the graphics buffer, then it won't be garbage collected. - path: p5.Graphics/remove + path: src\content\reference\en\p5.Graphics/remove createFramebuffer: description: >Creates a new p5.Framebuffer @@ -250,7 +250,7 @@ methods: attributes are set, they won't automatically match the graphics buffer and must be changed manually.
- path: p5.Graphics/createFramebuffer + path: src\content\reference\en\p5.Graphics/createFramebuffer chainable: false --- diff --git a/src/content/reference/en/p5/p5.Image.mdx b/src/content/reference/en/p5/p5.Image.mdx index 73dd06ad4b..3479331e8c 100644 --- a/src/content/reference/en/p5/p5.Image.mdx +++ b/src/content/reference/en/p5/p5.Image.mdx @@ -2,7 +2,7 @@ title: p5.Image module: Image submodule: Image -file: src/image/p5.Image.js +file: src\image\p5.Image.js description: >A class to describe an image.
@@ -113,7 +113,7 @@ methods:Call this method with no arguments to get the default density, or pass in a number to set the density. If a non-positive number is provided, it defaults to 1.
- path: p5.Image/pixelDensity + path: src\content\reference\en\p5.Image/pixelDensity loadPixels: description: >Loads the current value of each pixel in the image into the @@ -125,7 +125,7 @@ methods: modifying pixel values.
- path: p5.Image/loadPixels + path: src\content\reference\en\p5.Image/loadPixels updatePixels: description: >Updates the canvas with the RGBA values in the
@@ -156,7 +156,7 @@ methods:
img.updatePixels()
will update the pixels in current frame.
Gets a pixel or a region of pixels from the image.
@@ -194,7 +194,7 @@ methods: href="/reference/p5/get/">get() to work directly with images. - path: p5.Image/get + path: src\content\reference\en\p5.Image/get set: description: >Sets the color of one or more pixels within an image.
@@ -220,7 +220,7 @@ methods: be called after usingimg.set() for changes to appear.
- path: p5.Image/set
+ path: src\content\reference\en\p5.Image/set
resize:
description: >
Resizes the image to a given width and height.
@@ -231,7 +231,7 @@ methods:img.resize(50, 0) on an image
that was 500 × 300 pixels will resize it to 50 × 30 pixels.
- path: p5.Image/resize
+ path: src\content\reference\en\p5.Image/resize
copy:
description: >
Copies pixels from a source image to this image.
@@ -268,7 +268,7 @@ methods: region if it isn't the same size as the destination region. - path: p5.Image/copy + path: src\content\reference\en\p5.Image/copy mask: description: >Masks part of the image with another.
@@ -281,7 +281,7 @@ methods: and can't be removed once applied. If the mask has a different pixel density from this image, the mask will be scaled. - path: p5.Image/mask + path: src\content\reference\en\p5.Image/mask filter: description: >Applies an image filter to the image.
@@ -335,7 +335,7 @@ methods:DILATE
Increases the light areas. No parameter is used.
Copies a region of pixels from another image into this one.
@@ -373,7 +373,7 @@ methods:SOFT_LIGHT, DODGE, BURN,
ADD, or NORMAL.
- path: p5.Image/blend
+ path: src\content\reference\en\p5.Image/blend
save:
description: >
Saves the image to a file.
@@ -412,34 +412,34 @@ methods: create new GIFs. - path: p5.Image/save + path: src\content\reference\en\p5.Image/save reset: description: |Restarts an animated GIF at its first frame.
- path: p5.Image/reset + path: src\content\reference\en\p5.Image/reset getCurrentFrame: description: |Gets the index of the current frame in an animated GIF.
- path: p5.Image/getCurrentFrame + path: src\content\reference\en\p5.Image/getCurrentFrame setFrame: description: |Sets the current frame in an animated GIF.
- path: p5.Image/setFrame + path: src\content\reference\en\p5.Image/setFrame numFrames: description: |Returns the number of frames in an animated GIF.
- path: p5.Image/numFrames + path: src\content\reference\en\p5.Image/numFrames play: description: |Plays an animated GIF that was paused with img.pause().
- path: p5.Image/play + path: src\content\reference\en\p5.Image/play pause: description: |Pauses an animated GIF.
The GIF can be resumed by calling img.play().
- path: p5.Image/pause + path: src\content\reference\en\p5.Image/pause delay: description: >Changes the delay between frames in an animated GIF.
@@ -454,16 +454,16 @@ methods: keep their default delay. - path: p5.Image/delay + path: src\content\reference\en\p5.Image/delay properties: width: description: |The image's width in pixels.
- path: p5.Image/width + path: src\content\reference\en\p5.Image/width height: description: |The image's height in pixels.
- path: p5.Image/height + path: src\content\reference\en\p5.Image/height pixels: description: >An array containing the color of each pixel in the image.
@@ -508,7 +508,7 @@ properties: must be called after any changes are made. - path: p5.Image/pixels + path: src\content\reference\en\p5.Image/pixels chainable: false --- diff --git a/src/content/reference/en/p5/p5.MediaElement.mdx b/src/content/reference/en/p5/p5.MediaElement.mdx index c8ebbc101a..8c099ab513 100644 --- a/src/content/reference/en/p5/p5.MediaElement.mdx +++ b/src/content/reference/en/p5/p5.MediaElement.mdx @@ -2,7 +2,7 @@ title: p5.MediaElement module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >A class to handle audio and video.
@@ -52,30 +52,30 @@ methods: play: description: |Plays audio or video from a media element.
- path: p5.MediaElement/play + path: src\content\reference\en\p5.MediaElement/play stop: description: >Stops a media element and sets its current time to 0.
Calling media.play() will restart playing audio/video from
the beginning.
Pauses a media element.
Calling media.play() will resume playing audio/video from
the moment it paused.
Plays the audio/video repeatedly in a loop.
- path: p5.MediaElement/loop + path: src\content\reference\en\p5.MediaElement/loop noLoop: description: |Stops the audio/video from playing in a loop.
The media will stop when it finishes playing.
- path: p5.MediaElement/noLoop + path: src\content\reference\en\p5.MediaElement/noLoop autoplay: description: >Sets the audio/video to play once it's loaded.
@@ -90,7 +90,7 @@ methods: media will automatically play. Iffalse is passed, as in
media.autoPlay(false), it won't play automatically.
- path: p5.MediaElement/autoplay
+ path: src\content\reference\en\p5.MediaElement/autoplay
volume:
description: >
Sets the audio/video volume.
@@ -107,7 +107,7 @@ methods:media.volume(0.5)
sets the volume to half of its maximum.
- path: p5.MediaElement/volume
+ path: src\content\reference\en\p5.MediaElement/volume
speed:
description: >
Sets the audio/video playback speed.
@@ -127,7 +127,7 @@ methods:Note: Not all browsers support backward playback. Even if they do, playback might not be smooth.
- path: p5.MediaElement/speed + path: src\content\reference\en\p5.MediaElement/speed time: description: >Sets the media element's playback time.
@@ -143,11 +143,11 @@ methods: the audio/video has played.Note: Time resets to 0 when looping media restarts.
- path: p5.MediaElement/time + path: src\content\reference\en\p5.MediaElement/time duration: description: |Returns the audio/video's duration in seconds.
- path: p5.MediaElement/duration + path: src\content\reference\en\p5.MediaElement/duration onended: description: >Calls a function when the audio/video reaches the end of its @@ -156,7 +156,7 @@ methods:
The element is passed as an argument to the callback function.
Note: The function won't be called if the media is looping.
- path: p5.MediaElement/onended + path: src\content\reference\en\p5.MediaElement/onended connect: description: >Sends the element's audio to an output.
@@ -175,7 +175,7 @@ methods:Note: This method is meant to be used with the p5.sound.js addon library.
- path: p5.MediaElement/connect + path: src\content\reference\en\p5.MediaElement/connect disconnect: description: >Disconnect all Web Audio routing, including to the main output.
@@ -184,29 +184,29 @@ methods: effects, for example. - path: p5.MediaElement/disconnect + path: src\content\reference\en\p5.MediaElement/disconnect showControls: description: >Show the default HTMLMediaElement controls.
Note: The controls vary between web browsers.
- path: p5.MediaElement/showControls + path: src\content\reference\en\p5.MediaElement/showControls hideControls: description: >Hide the default HTMLMediaElement controls.
- path: p5.MediaElement/hideControls + path: src\content\reference\en\p5.MediaElement/hideControls addCue: description: >Schedules a function to call when the audio/video reaches a specific @@ -234,20 +234,20 @@ methods: useful for removing the cue later.
- path: p5.MediaElement/addCue + path: src\content\reference\en\p5.MediaElement/addCue removeCue: description: |Removes a callback based on its ID.
- path: p5.MediaElement/removeCue + path: src\content\reference\en\p5.MediaElement/removeCue clearCues: description: |Removes all functions scheduled with media.addCue().
Path to the media element's source as a string.
- path: p5.MediaElement/src + path: src\content\reference\en\p5.MediaElement/src chainable: false --- diff --git a/src/content/reference/en/p5/p5.NumberDict.mdx b/src/content/reference/en/p5/p5.NumberDict.mdx index 6295396e18..764b3f4b92 100644 --- a/src/content/reference/en/p5/p5.NumberDict.mdx +++ b/src/content/reference/en/p5/p5.NumberDict.mdx @@ -2,7 +2,7 @@ title: p5.NumberDict module: Data submodule: Dictionary -file: src/data/p5.TypedDict.js +file: src\data\p5.TypedDict.js description: |A simple Dictionary class for Numbers.
line: 415 @@ -12,7 +12,7 @@ methods: description: |Add the given number to the value currently stored at the given key. The sum then replaces the value previously stored in the Dictionary.
- path: p5.NumberDict/add + path: src\content\reference\en\p5.NumberDict/add sub: description: >Subtract the given number from the value currently stored at the given @@ -20,7 +20,7 @@ methods: The difference then replaces the value previously stored in the Dictionary.
- path: p5.NumberDict/sub + path: src\content\reference\en\p5.NumberDict/sub mult: description: >Multiply the given number with the value currently stored at the given @@ -28,7 +28,7 @@ methods: The product then replaces the value previously stored in the Dictionary.
- path: p5.NumberDict/mult + path: src\content\reference\en\p5.NumberDict/mult div: description: >Divide the given number with the value currently stored at the given @@ -36,23 +36,23 @@ methods: The quotient then replaces the value previously stored in the Dictionary.
- path: p5.NumberDict/div + path: src\content\reference\en\p5.NumberDict/div minValue: description: |Return the lowest number currently stored in the Dictionary.
- path: p5.NumberDict/minValue + path: src\content\reference\en\p5.NumberDict/minValue maxValue: description: |Return the highest number currently stored in the Dictionary.
- path: p5.NumberDict/maxValue + path: src\content\reference\en\p5.NumberDict/maxValue minKey: description: |Return the lowest key currently used in the Dictionary.
- path: p5.NumberDict/minKey + path: src\content\reference\en\p5.NumberDict/minKey maxKey: description: |Return the highest key currently used in the Dictionary.
- path: p5.NumberDict/maxKey + path: src\content\reference\en\p5.NumberDict/maxKey chainable: false --- diff --git a/src/content/reference/en/p5/p5.PrintWriter.mdx b/src/content/reference/en/p5/p5.PrintWriter.mdx index 8f9a959340..8bce959c3f 100644 --- a/src/content/reference/en/p5/p5.PrintWriter.mdx +++ b/src/content/reference/en/p5/p5.PrintWriter.mdx @@ -2,7 +2,7 @@ title: p5.PrintWriter module: IO submodule: Output -file: src/io/files.js +file: src\io\files.js description: >A class to describe a print stream.
diff --git a/src/content/reference/en/p5/p5.Renderer.mdx b/src/content/reference/en/p5/p5.Renderer.mdx index 7c7a096619..5745a7fe7b 100644 --- a/src/content/reference/en/p5/p5.Renderer.mdx +++ b/src/content/reference/en/p5/p5.Renderer.mdx @@ -2,7 +2,7 @@ title: p5.Renderer module: Rendering submodule: Rendering -file: src/core/p5.Renderer.js +file: src\core\p5.Renderer.js description: |Main graphics and rendering context, as well as the base API implementation for p5.js "core". To be used as the superclass for diff --git a/src/content/reference/en/p5/p5.Shader.mdx b/src/content/reference/en/p5/p5.Shader.mdx index df30922ab4..f86de9439d 100644 --- a/src/content/reference/en/p5/p5.Shader.mdx +++ b/src/content/reference/en/p5/p5.Shader.mdx @@ -2,7 +2,7 @@ title: p5.Shader module: 3D submodule: Material -file: src/webgl/p5.Shader.js +file: src\webgl\p5.Shader.js description: >
A class to describe a shader program.
@@ -16,7 +16,7 @@ description: > language called GLSL and run along with the rest of the code in a sketch. @@ -273,7 +273,7 @@ methods: void afterFragment() {} - path: p5.Shader/inspectHooks + path: src\content\reference\en\p5.Shader/inspectHooks modify: description: >Returns a new shader, based on the original, but with custom snippets
@@ -333,7 +333,7 @@ methods:
vertexDeclarations and fragmentDeclarations
keys.
Copies the shader from one drawing context to another.
@@ -389,7 +389,7 @@ methods: objects have the same context as the main canvas. - path: p5.Shader/copyToContext + path: src\content\reference\en\p5.Shader/copyToContext setUniform: description: >Sets the shader’s uniform (global) variables.
@@ -422,7 +422,7 @@ methods: uniform’s type. Numbers, strings, booleans, arrays, and many types of images can all be passed to a shader withsetUniform().
- path: p5.Shader/setUniform
+ path: src\content\reference\en\p5.Shader/setUniform
chainable: false
---
diff --git a/src/content/reference/en/p5/p5.StringDict.mdx b/src/content/reference/en/p5/p5.StringDict.mdx
index d12a6c87b1..0233b00a2a 100644
--- a/src/content/reference/en/p5/p5.StringDict.mdx
+++ b/src/content/reference/en/p5/p5.StringDict.mdx
@@ -2,7 +2,7 @@
title: p5.StringDict
module: Data
submodule: Dictionary
-file: src/data/p5.TypedDict.js
+file: src\data\p5.TypedDict.js
description: |
A simple Dictionary class for Strings.
line: 397 diff --git a/src/content/reference/en/p5/p5.Table.mdx b/src/content/reference/en/p5/p5.Table.mdx index de3249441e..9a4286e5a1 100644 --- a/src/content/reference/en/p5/p5.Table.mdx +++ b/src/content/reference/en/p5/p5.Table.mdx @@ -2,7 +2,7 @@ title: p5.Table module: IO submodule: Table -file: src/io/p5.Table.js +file: src\io\p5.Table.js description: >Table objects store data with multiple rows and columns, much @@ -36,23 +36,23 @@ methods: included as a parameter, then that row is duplicated and added to the table.
- path: p5.Table/addRow + path: src\content\reference\en\p5.Table/addRow removeRow: description: |Removes a row from the table object.
- path: p5.Table/removeRow + path: src\content\reference\en\p5.Table/removeRow getRow: description: >Returns a reference to the specified p5.TableRow. The reference can then be used to get and set values of the selected row.
- path: p5.Table/getRow + path: src\content\reference\en\p5.Table/getRow getRows: description: >Gets all rows from the table. Returns an array of p5.TableRows.
- path: p5.Table/getRows + path: src\content\reference\en\p5.Table/getRows findRow: description: |Finds the first row in the Table that contains the value @@ -60,7 +60,7 @@ methods: multiple rows are possible matches, only the first matching row is returned. The column to search may be specified by either its ID or title.
- path: p5.Table/findRow + path: src\content\reference\en\p5.Table/findRow findRows: description: |Finds the rows in the Table that contain the value @@ -68,7 +68,7 @@ methods: Array, so for must be used to iterate through all the rows, as shown in the example above. The column to search may be specified by either its ID or title.
- path: p5.Table/findRows + path: src\content\reference\en\p5.Table/findRows matchRow: description: |Finds the first row in the Table that matches the regular @@ -76,24 +76,24 @@ methods: Even if multiple rows are possible matches, only the first matching row is returned. The column to search may be specified by either its ID or title.
- path: p5.Table/matchRow + path: src\content\reference\en\p5.Table/matchRow matchRows: description: |Finds the rows in the Table that match the regular expression provided, and returns references to those rows. Returns an array, so for must be used to iterate through all the rows, as shown in the example. The column to search may be specified by either its ID or title.
- path: p5.Table/matchRows + path: src\content\reference\en\p5.Table/matchRows getColumn: description: |Retrieves all values in the specified column, and returns them as an array. The column may be specified by either its ID or title.
- path: p5.Table/getColumn + path: src\content\reference\en\p5.Table/getColumn clearRows: description: |Removes all rows from a Table. While all rows are removed, columns and column titles are maintained.
- path: p5.Table/clearRows + path: src\content\reference\en\p5.Table/clearRows addColumn: description: >Use addColumn() to add a new @@ -104,29 +104,29 @@ methods: may be easily referenced later by name. (If no title is specified, the new column's title will be null.)
- path: p5.Table/addColumn + path: src\content\reference\en\p5.Table/addColumn getColumnCount: description: |Returns the total number of columns in a Table.
- path: p5.Table/getColumnCount + path: src\content\reference\en\p5.Table/getColumnCount getRowCount: description: |Returns the total number of rows in a Table.
- path: p5.Table/getRowCount + path: src\content\reference\en\p5.Table/getRowCount removeTokens: description: |Removes any of the specified characters (or "tokens").
If no column is specified, then the values in all columns and rows are processed. A specific column may be referenced by either its ID or title.
- path: p5.Table/removeTokens + path: src\content\reference\en\p5.Table/removeTokens trim: description: |Trims leading and trailing whitespace, such as spaces and tabs, from String table values. If no column is specified, then the values in all columns and rows are trimmed. A specific column may be referenced by either its ID or title.
- path: p5.Table/trim + path: src\content\reference\en\p5.Table/trim removeColumn: description: >Use removeColumn() to remove @@ -139,54 +139,54 @@ methods: removeColumn(0) would remove the first column, removeColumn(1) would remove the second column, and so on.
- path: p5.Table/removeColumn + path: src\content\reference\en\p5.Table/removeColumn set: description: |Stores a value in the Table's specified row and column. The row is specified by its ID, while the column may be specified by either its ID or title.
- path: p5.Table/set + path: src\content\reference\en\p5.Table/set setNum: description: |Stores a Float value in the Table's specified row and column. The row is specified by its ID, while the column may be specified by either its ID or title.
- path: p5.Table/setNum + path: src\content\reference\en\p5.Table/setNum setString: description: |Stores a String value in the Table's specified row and column. The row is specified by its ID, while the column may be specified by either its ID or title.
- path: p5.Table/setString + path: src\content\reference\en\p5.Table/setString get: description: |Retrieves a value from the Table's specified row and column. The row is specified by its ID, while the column may be specified by either its ID or title.
- path: p5.Table/get + path: src\content\reference\en\p5.Table/get getNum: description: |Retrieves a Float value from the Table's specified row and column. The row is specified by its ID, while the column may be specified by either its ID or title.
- path: p5.Table/getNum + path: src\content\reference\en\p5.Table/getNum getString: description: |Retrieves a String value from the Table's specified row and column. The row is specified by its ID, while the column may be specified by either its ID or title.
- path: p5.Table/getString + path: src\content\reference\en\p5.Table/getString getObject: description: |Retrieves all table data and returns as an object. If a column name is passed in, each row object will be stored with that attribute as its title.
- path: p5.Table/getObject + path: src\content\reference\en\p5.Table/getObject getArray: description: >Retrieves all table data and returns it as a multidimensional array.
- path: p5.Table/getArray + path: src\content\reference\en\p5.Table/getArray properties: columns: description: > @@ -194,7 +194,7 @@ properties: "header" the table is loaded with the "header" parameter. - path: p5.Table/columns + path: src\content\reference\en\p5.Table/columns rows: description: >An array containing the getRows()
- path: p5.Table/rows + path: src\content\reference\en\p5.Table/rows chainable: false --- diff --git a/src/content/reference/en/p5/p5.TableRow.mdx b/src/content/reference/en/p5/p5.TableRow.mdx index 0ca3ee6ffa..0e951b0f80 100644 --- a/src/content/reference/en/p5/p5.TableRow.mdx +++ b/src/content/reference/en/p5/p5.TableRow.mdx @@ -2,7 +2,7 @@ title: p5.TableRow module: IO submodule: Table -file: src/io/p5.TableRow.js +file: src\io\p5.TableRow.js description: |A TableRow object represents a single row of data values, stored in columns, from a table.
@@ -28,34 +28,34 @@ methods: description: |Stores a value in the TableRow's specified column. The column may be specified by either its ID or title.
- path: p5.TableRow/set + path: src\content\reference\en\p5.TableRow/set setNum: description: |Stores a Float value in the TableRow's specified column. The column may be specified by either its ID or title.
- path: p5.TableRow/setNum + path: src\content\reference\en\p5.TableRow/setNum setString: description: |Stores a String value in the TableRow's specified column. The column may be specified by either its ID or title.
- path: p5.TableRow/setString + path: src\content\reference\en\p5.TableRow/setString get: description: |Retrieves a value from the TableRow's specified column. The column may be specified by either its ID or title.
- path: p5.TableRow/get + path: src\content\reference\en\p5.TableRow/get getNum: description: |Retrieves a Float value from the TableRow's specified column. The column may be specified by either its ID or title.
- path: p5.TableRow/getNum + path: src\content\reference\en\p5.TableRow/getNum getString: description: |Retrieves an String value from the TableRow's specified column. The column may be specified by either its ID or title.
- path: p5.TableRow/getString + path: src\content\reference\en\p5.TableRow/getString chainable: false --- diff --git a/src/content/reference/en/p5/p5.TypedDict.mdx b/src/content/reference/en/p5/p5.TypedDict.mdx index b68af92b04..6e7118584b 100644 --- a/src/content/reference/en/p5/p5.TypedDict.mdx +++ b/src/content/reference/en/p5/p5.TypedDict.mdx @@ -2,7 +2,7 @@ title: p5.TypedDict module: Data submodule: Dictionary -file: src/data/p5.TypedDict.js +file: src\data\p5.TypedDict.js description: |Base class for all p5.Dictionary types. Specifically typed Dictionary classes inherit from this class.
@@ -13,49 +13,49 @@ methods: description: >Returns the number of key-value pairs currently stored in the Dictionary.
- path: p5.TypedDict/size + path: src\content\reference\en\p5.TypedDict/size hasKey: description: |Returns true if the given key exists in the Dictionary, otherwise returns false.
- path: p5.TypedDict/hasKey + path: src\content\reference\en\p5.TypedDict/hasKey get: description: |Returns the value stored at the given key.
- path: p5.TypedDict/get + path: src\content\reference\en\p5.TypedDict/get set: description: >Updates the value associated with the given key in case it already exists in the Dictionary. Otherwise a new key-value pair is added.
- path: p5.TypedDict/set + path: src\content\reference\en\p5.TypedDict/set create: description: |Creates a new key-value pair in the Dictionary.
- path: p5.TypedDict/create + path: src\content\reference\en\p5.TypedDict/create clear: description: |Removes all previously stored key-value pairs from the Dictionary.
- path: p5.TypedDict/clear + path: src\content\reference\en\p5.TypedDict/clear remove: description: >Removes the key-value pair stored at the given key from the Dictionary.
- path: p5.TypedDict/remove + path: src\content\reference\en\p5.TypedDict/remove print: description: >Logs the set of items currently stored in the Dictionary to the console.
- path: p5.TypedDict/print + path: src\content\reference\en\p5.TypedDict/print saveTable: description: |Converts the Dictionary into a CSV file for local download.
- path: p5.TypedDict/saveTable + path: src\content\reference\en\p5.TypedDict/saveTable saveJSON: description: |Converts the Dictionary into a JSON file for local download.
- path: p5.TypedDict/saveJSON + path: src\content\reference\en\p5.TypedDict/saveJSON chainable: false --- diff --git a/src/content/reference/en/p5/p5.Vector.mdx b/src/content/reference/en/p5/p5.Vector.mdx index 39daa8aed1..f3731e5b48 100644 --- a/src/content/reference/en/p5/p5.Vector.mdx +++ b/src/content/reference/en/p5/p5.Vector.mdx @@ -2,7 +2,7 @@ title: p5.Vector module: Math submodule: Vector -file: src/math/p5.Vector.js +file: src\math\p5.Vector.js description: >A class to describe a two or three-dimensional vector.
@@ -122,7 +122,7 @@ methods: console while debugging. - path: p5.Vector/toString + path: src\content\reference\en\p5.Vector/toString set: description: >Sets the vector's x, y, and z
@@ -145,12 +145,12 @@ methods:
sets all the vector's
components to 0.
Returns a copy of the p5.Vector object.
- path: p5.Vector/copy + path: src\content\reference\en\p5.Vector/copy add: description: >Adds to a vector's x, y, and z
@@ -179,7 +179,7 @@ methods:
the
originals.
Performs modulo (remainder) division with a vector's x,
@@ -212,7 +212,7 @@ methods:
change the
originals.
Subtracts from a vector's x, y, and
@@ -241,7 +241,7 @@ methods:
the
originals.
Multiplies a vector's x, y, and
@@ -275,7 +275,7 @@ methods:
the
originals.
Divides a vector's x, y, and z
@@ -309,7 +309,7 @@ methods:
the
originals.
Calculates the magnitude (length) of the vector.
@@ -318,11 +318,11 @@ methods: of a 2D vector using components as inmag(x, y).
- path: p5.Vector/mag
+ path: src\content\reference\en\p5.Vector/mag
magSq:
description: |
Calculates the magnitude (length) of the vector squared.
- path: p5.Vector/magSq + path: src\content\reference\en\p5.Vector/magSq dot: description: >Calculates the dot product of two vectors.
@@ -353,7 +353,7 @@ methods: v2), is the same as callingv1.dot(v2).
- path: p5.Vector/dot
+ path: src\content\reference\en\p5.Vector/dot
cross:
description: >
Calculates the cross product of two vectors.
@@ -370,7 +370,7 @@ methods:p5.Vector.cross(v1, v2), is the same
as calling v1.cross(v2).
- path: p5.Vector/cross
+ path: src\content\reference\en\p5.Vector/cross
dist:
description: >
Calculates the distance between two points represented by vectors.
@@ -388,7 +388,7 @@ methods: between points using coordinates as indist(x1, y1, x2, y2).
- path: p5.Vector/dist
+ path: src\content\reference\en\p5.Vector/dist
normalize:
description: >
Scales the components of a
- path: p5.Vector/normalize
+ path: src\content\reference\en\p5.Vector/normalize
limit:
description: >
Limits a vector's magnitude to a maximum value.
Sets a vector's magnitude to a given value.
@@ -427,7 +427,7 @@ methods: change the original. - path: p5.Vector/setMag + path: src\content\reference\en\p5.Vector/setMag heading: description: >Calculates the angle a 2D vector makes with the positive x-axis.
@@ -449,7 +449,7 @@ methods:p5.Vector.heading(v), works the
same way.
- path: p5.Vector/heading
+ path: src\content\reference\en\p5.Vector/heading
setHeading:
description: >
Rotates a 2D vector to a specific angle without changing its @@ -467,7 +467,7 @@ methods: the units of the current angleMode().
- path: p5.Vector/setHeading + path: src\content\reference\en\p5.Vector/setHeading rotate: description: >Rotates a 2D vector by an angle without changing its magnitude.
@@ -492,7 +492,7 @@ methods: doesn't change the original. - path: p5.Vector/rotate + path: src\content\reference\en\p5.Vector/rotate angleBetween: description: >Calculates the angle between two vectors.
@@ -509,7 +509,7 @@ methods: angles in the units of the current angleMode(). - path: p5.Vector/angleBetween + path: src\content\reference\en\p5.Vector/angleBetween lerp: description: >Calculates new x, y, and z
@@ -532,7 +532,7 @@ methods:
doesn't change
the original.
Calculates a new heading and magnitude that are between two @@ -565,7 +565,7 @@ methods: doesn't change the original.
- path: p5.Vector/slerp + path: src\content\reference\en\p5.Vector/slerp reflect: description: >Reflects a vector about a line in 2D or a plane in 3D.
@@ -582,11 +582,11 @@ methods: doesn't change the original. - path: p5.Vector/reflect + path: src\content\reference\en\p5.Vector/reflect array: description: |Returns the vector's components as an array of numbers.
- path: p5.Vector/array + path: src\content\reference\en\p5.Vector/array equals: description: >Checks whether all the vector's components are equal to another @@ -615,23 +615,23 @@ methods: interprets both parameters as p5.Vector objects.
- path: p5.Vector/equals + path: src\content\reference\en\p5.Vector/equals fromAngle: description: |Creates a new 2D vector from an angle.
- path: p5.Vector/fromAngle + path: src\content\reference\en\p5.Vector/fromAngle fromAngles: description: |Creates a new 3D vector from a pair of ISO spherical angles.
- path: p5.Vector/fromAngles + path: src\content\reference\en\p5.Vector/fromAngles random2D: description: |Creates a new 2D unit vector with a random heading.
- path: p5.Vector/random2D + path: src\content\reference\en\p5.Vector/random2D random3D: description: |Creates a new 3D unit vector with a random heading.
- path: p5.Vector/random3D + path: src\content\reference\en\p5.Vector/random3D clampToZero: description: >Replaces the components of a
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON
The x component of the vector
- path: p5.Vector/x + path: src\content\reference\en\p5.Vector/x 'y': description: |The y component of the vector
- path: p5.Vector/y + path: src\content\reference\en\p5.Vector/y z: description: |The z component of the vector
- path: p5.Vector/z + path: src\content\reference\en\p5.Vector/z chainable: false --- diff --git a/src/content/reference/en/p5/p5.XML.mdx b/src/content/reference/en/p5/p5.XML.mdx index bfa3c0c7e7..f463b63791 100644 --- a/src/content/reference/en/p5/p5.XML.mdx +++ b/src/content/reference/en/p5/p5.XML.mdx @@ -2,7 +2,7 @@ title: p5.XML module: IO submodule: Input -file: src/io/p5.XML.js +file: src\io\p5.XML.js description: >A class to describe an XML object.
@@ -11,7 +11,7 @@ description: > Extensible Markup Language - (XML) is a standard format for sending data between applications. Like HTML, the @@ -75,7 +75,7 @@ methods: href="/reference/p5/p5.XML">p5.XML object. - path: p5.XML/getParent + path: src\content\reference\en\p5.XML/getParent getName: description: >Returns the element's name as a String.
JavaScript has the name
language.
- path: p5.XML/getName
+ path: src\content\reference\en\p5.XML/getName
setName:
description: >
Sets the element's tag name.
@@ -101,17 +101,17 @@ methods: tag name.
- path: p5.XML/setName
+ path: src\content\reference\en\p5.XML/setName
hasChildren:
description: >
Returns true if the element has child elements and
false if not.
Returns an array with the names of the element's child elements as
Strings.
Returns an array with the element's child elements as new
@@ -125,7 +125,7 @@ methods:
child elements
with the tag .
Returns the first matching child element as a new
@@ -142,7 +142,7 @@ methods:
myXML.getChild(1), then the child element at that index will
be returned.
Adds a new child element and returns a reference to it.
@@ -154,7 +154,7 @@ methods:myXML.addChild(otherXML) inserts
otherXML as a child element of myXML.
- path: p5.XML/addChild
+ path: src\content\reference\en\p5.XML/addChild
removeChild:
description: >
Removes the first matching child element.
@@ -172,11 +172,11 @@ methods: will be removed. - path: p5.XML/removeChild + path: src\content\reference\en\p5.XML/removeChild getAttributeCount: description: |Returns the number of attributes the element has.
- path: p5.XML/getAttributeCount + path: src\content\reference\en\p5.XML/getAttributeCount listAttributes: description: >Returns an Array with the names of the element's
@@ -188,7 +188,7 @@ methods:
myXML.getNum() to return an
attribute's value.
Returns true if the element has a given attribute and
@@ -205,7 +205,7 @@ methods:
myXML.getNum() to return an
attribute's value.
Return an attribute's value as a Number.
Return an attribute's value as a string.
@@ -259,7 +259,7 @@ methods: myXML.getNum() to return an attribute's value. - path: p5.XML/getString + path: src\content\reference\en\p5.XML/getString setAttribute: description: >Sets an attribute to a given value.
@@ -276,7 +276,7 @@ methods:id attribute to the
value 123.
- path: p5.XML/setAttribute
+ path: src\content\reference\en\p5.XML/setAttribute
getContent:
description: >
Returns the element's content as a String.
Sets the element's content.
@@ -301,7 +301,7 @@ methods:The parameter, content, is a string with the element's new
content.
Returns the element as a String.
This is the p5 instance constructor.
diff --git a/src/content/reference/en/p5/pAccelerationX.mdx b/src/content/reference/en/p5/pAccelerationX.mdx index 3f8b670561..3a84f2d163 100644 --- a/src/content/reference/en/p5/pAccelerationX.mdx +++ b/src/content/reference/en/p5/pAccelerationX.mdx @@ -2,7 +2,7 @@ title: pAccelerationX module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: |The system variable pAccelerationX always contains the acceleration of the device along the x axis in the frame previous to the current frame. Value diff --git a/src/content/reference/en/p5/pAccelerationY.mdx b/src/content/reference/en/p5/pAccelerationY.mdx index d085f75f46..029001de87 100644 --- a/src/content/reference/en/p5/pAccelerationY.mdx +++ b/src/content/reference/en/p5/pAccelerationY.mdx @@ -2,7 +2,7 @@ title: pAccelerationY module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: |
The system variable pAccelerationY always contains the acceleration of the device along the y axis in the frame previous to the current frame. Value diff --git a/src/content/reference/en/p5/pAccelerationZ.mdx b/src/content/reference/en/p5/pAccelerationZ.mdx index b8954c8efe..9aa5b2addd 100644 --- a/src/content/reference/en/p5/pAccelerationZ.mdx +++ b/src/content/reference/en/p5/pAccelerationZ.mdx @@ -2,7 +2,7 @@ title: pAccelerationZ module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: |
The system variable pAccelerationZ always contains the acceleration of the device along the z axis in the frame previous to the current frame. Value diff --git a/src/content/reference/en/p5/pRotationX.mdx b/src/content/reference/en/p5/pRotationX.mdx index 3d73a4d59b..6af0c22f35 100644 --- a/src/content/reference/en/p5/pRotationX.mdx +++ b/src/content/reference/en/p5/pRotationX.mdx @@ -2,7 +2,7 @@ title: pRotationX module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The system variable pRotationX always contains the rotation of the diff --git a/src/content/reference/en/p5/pRotationY.mdx b/src/content/reference/en/p5/pRotationY.mdx index a8a67df6c7..85e4388a8c 100644 --- a/src/content/reference/en/p5/pRotationY.mdx +++ b/src/content/reference/en/p5/pRotationY.mdx @@ -2,7 +2,7 @@ title: pRotationY module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The system variable pRotationY always contains the rotation of the diff --git a/src/content/reference/en/p5/pRotationZ.mdx b/src/content/reference/en/p5/pRotationZ.mdx index 6751e5b90e..80aea1c8c9 100644 --- a/src/content/reference/en/p5/pRotationZ.mdx +++ b/src/content/reference/en/p5/pRotationZ.mdx @@ -2,7 +2,7 @@ title: pRotationZ module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: >
The system variable pRotationZ always contains the rotation of the diff --git a/src/content/reference/en/p5/paletteLerp.mdx b/src/content/reference/en/p5/paletteLerp.mdx index 281627209d..584487956d 100644 --- a/src/content/reference/en/p5/paletteLerp.mdx +++ b/src/content/reference/en/p5/paletteLerp.mdx @@ -2,7 +2,7 @@ title: paletteLerp module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >
Blends multiple colors to find a color between them.
diff --git a/src/content/reference/en/p5/panorama.mdx b/src/content/reference/en/p5/panorama.mdx index 04dc04b3a3..2745c08047 100644 --- a/src/content/reference/en/p5/panorama.mdx +++ b/src/content/reference/en/p5/panorama.mdx @@ -2,7 +2,7 @@ title: panorama module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >Creates an immersive 3D background.
diff --git a/src/content/reference/en/p5/perspective.mdx b/src/content/reference/en/p5/perspective.mdx index 52fd7e8575..e60636415f 100644 --- a/src/content/reference/en/p5/perspective.mdx +++ b/src/content/reference/en/p5/perspective.mdx @@ -2,7 +2,7 @@ title: perspective module: 3D submodule: Camera -file: src/webgl/p5.Camera.js +file: src\webgl\p5.Camera.js description: >Sets a perspective projection for the current camera in a 3D sketch.
diff --git a/src/content/reference/en/p5/pixelDensity.mdx b/src/content/reference/en/p5/pixelDensity.mdx index 6dcd2f93f3..5eff2c93a6 100644 --- a/src/content/reference/en/p5/pixelDensity.mdx +++ b/src/content/reference/en/p5/pixelDensity.mdx @@ -2,7 +2,7 @@ title: pixelDensity module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >Sets the pixel density or returns the current density.
diff --git a/src/content/reference/en/p5/pixels.mdx b/src/content/reference/en/p5/pixels.mdx index e10644dcc1..1bdbe3ba40 100644 --- a/src/content/reference/en/p5/pixels.mdx +++ b/src/content/reference/en/p5/pixels.mdx @@ -2,7 +2,7 @@ title: pixels module: Image submodule: Pixels -file: src/image/pixels.js +file: src\image\pixels.js description: >An array containing the color of each pixel on the canvas.
diff --git a/src/content/reference/en/p5/plane.mdx b/src/content/reference/en/p5/plane.mdx index 1d9b2523d4..2eb80df381 100644 --- a/src/content/reference/en/p5/plane.mdx +++ b/src/content/reference/en/p5/plane.mdx @@ -2,7 +2,7 @@ title: plane module: Shape submodule: 3D Primitives -file: src/webgl/3d_primitives.js +file: src\webgl\3d_primitives.js description: >Draws a plane.
diff --git a/src/content/reference/en/p5/pmouseX.mdx b/src/content/reference/en/p5/pmouseX.mdx index 8b26aab5ea..630a6f9ef5 100644 --- a/src/content/reference/en/p5/pmouseX.mdx +++ b/src/content/reference/en/p5/pmouseX.mdx @@ -2,7 +2,7 @@ title: pmouseX module: Events submodule: Mouse -file: src/events/mouse.js +file: src\events\mouse.js description: >A Number system variable that tracks the mouse's previous
horizontal
diff --git a/src/content/reference/en/p5/pmouseY.mdx b/src/content/reference/en/p5/pmouseY.mdx
index 048df69332..dac3c76216 100644
--- a/src/content/reference/en/p5/pmouseY.mdx
+++ b/src/content/reference/en/p5/pmouseY.mdx
@@ -2,7 +2,7 @@
title: pmouseY
module: Events
submodule: Mouse
-file: src/events/mouse.js
+file: src\events\mouse.js
description: >
A Number system variable that tracks the mouse's previous
vertical
diff --git a/src/content/reference/en/p5/point.mdx b/src/content/reference/en/p5/point.mdx
index b01bfe8778..3ac0665ce1 100644
--- a/src/content/reference/en/p5/point.mdx
+++ b/src/content/reference/en/p5/point.mdx
@@ -2,7 +2,7 @@
title: point
module: Shape
submodule: 2D Primitives
-file: src/core/shape/2d_primitives.js
+file: src\core\shape\2d_primitives.js
description: >
Draws a single point in space.
diff --git a/src/content/reference/en/p5/pointLight.mdx b/src/content/reference/en/p5/pointLight.mdx index 4bc73595cd..7377f74acf 100644 --- a/src/content/reference/en/p5/pointLight.mdx +++ b/src/content/reference/en/p5/pointLight.mdx @@ -2,7 +2,7 @@ title: pointLight module: 3D submodule: Lights -file: src/webgl/light.js +file: src\webgl\light.js description: >Creates a light that shines from a point in all directions.
diff --git a/src/content/reference/en/p5/pop.mdx b/src/content/reference/en/p5/pop.mdx index 367998f3b6..122e918f93 100644 --- a/src/content/reference/en/p5/pop.mdx +++ b/src/content/reference/en/p5/pop.mdx @@ -2,7 +2,7 @@ title: pop module: Structure submodule: Structure -file: src/core/structure.js +file: src\core\structure.js description: "Ends a drawing group that contains its own styles and transformations.
\nBy default, styles such as fill() and\ntransformations such as rotate() are applied to\nall drawing that follows. The push() and pop()\nfunctions can limit the effect of styles and transformations to a specific\ngroup of shapes, images, and text. For example, a group of shapes could be\ntranslated to follow the mouse without affecting the rest of the sketch:
// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw the face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\nellipse(-20, -20, 30, 20);\n\n// Draw the right eye.\nellipse(20, -20, 30, 20);\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('\U0001F99F', x, y);\n\nIn the code snippet above, the bug's position isn't affected by\ntranslate(mouseX, mouseY) because that transformation is contained\nbetween push() and pop(). The bug moves around\nthe entire canvas as expected.
Note: push() and pop() are always called as a\npair. Both functions are required to begin and end a drawing group.
push() and pop() can also be nested to create\nsubgroups. For example, the code snippet above could be changed to give\nmore detail to the frog’s eyes:
// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw a face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\npush();\ntranslate(-20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// Draw the right eye.\npush();\ntranslate(20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('\U0001F99F', x, y);\n\nIn this version, the code to draw each eye is contained between its own\npush() and pop() functions. Doing so makes it\neasier to add details in the correct part of a drawing.
push() and pop() contain the effects of the\nfollowing functions:
In WebGL mode, push() and pop() contain the\neffects of a few additional styles:
Calculates exponential expressions such as 23.
For example, pow(2, 3) evaluates the expression
diff --git a/src/content/reference/en/p5/preload.mdx b/src/content/reference/en/p5/preload.mdx
index d406aa1f57..210f70c949 100644
--- a/src/content/reference/en/p5/preload.mdx
+++ b/src/content/reference/en/p5/preload.mdx
@@ -2,7 +2,7 @@
title: preload
module: Structure
submodule: Structure
-file: src/core/main.js
+file: src\core\main.js
description: >
A function that's called once to load assets before the sketch runs.
diff --git a/src/content/reference/en/p5/print.mdx b/src/content/reference/en/p5/print.mdx index d7e670846b..780d72b653 100644 --- a/src/content/reference/en/p5/print.mdx +++ b/src/content/reference/en/p5/print.mdx @@ -2,7 +2,7 @@ title: print module: Environment submodule: Environment -file: src/core/environment.js +file: src\core\environment.js description: >Displays text in the web browser's console.
diff --git a/src/content/reference/en/p5/push.mdx b/src/content/reference/en/p5/push.mdx index cfaf3defa7..4517251eeb 100644 --- a/src/content/reference/en/p5/push.mdx +++ b/src/content/reference/en/p5/push.mdx @@ -2,7 +2,7 @@ title: push module: Structure submodule: Structure -file: src/core/structure.js +file: src\core\structure.js description: "Begins a drawing group that contains its own styles and transformations.
\nBy default, styles such as fill() and\ntransformations such as rotate() are applied to\nall drawing that follows. The push() and pop()\nfunctions can limit the effect of styles and transformations to a specific\ngroup of shapes, images, and text. For example, a group of shapes could be\ntranslated to follow the mouse without affecting the rest of the sketch:
// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw the face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\nellipse(-20, -20, 30, 20);\n\n// Draw the right eye.\nellipse(20, -20, 30, 20);\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('\U0001F99F', x, y);\n\nIn the code snippet above, the bug's position isn't affected by\ntranslate(mouseX, mouseY) because that transformation is contained\nbetween push() and pop(). The bug moves around\nthe entire canvas as expected.
Note: push() and pop() are always called as a\npair. Both functions are required to begin and end a drawing group.
push() and pop() can also be nested to create\nsubgroups. For example, the code snippet above could be changed to give\nmore detail to the frog’s eyes:
// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw a face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\npush();\ntranslate(-20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// Draw the right eye.\npush();\ntranslate(20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('\U0001F99F', x, y);\n\nIn this version, the code to draw each eye is contained between its own\npush() and pop() functions. Doing so makes it\neasier to add details in the correct part of a drawing.
push() and pop() contain the effects of the\nfollowing functions:
In WebGL mode, push() and pop() contain the\neffects of a few additional styles:
A Number variable that tracks the mouse's previous horizontal
position
diff --git a/src/content/reference/en/p5/pwinMouseY.mdx b/src/content/reference/en/p5/pwinMouseY.mdx
index 9c85afbda1..8227553e38 100644
--- a/src/content/reference/en/p5/pwinMouseY.mdx
+++ b/src/content/reference/en/p5/pwinMouseY.mdx
@@ -2,7 +2,7 @@
title: pwinMouseY
module: Events
submodule: Mouse
-file: src/events/mouse.js
+file: src\events\mouse.js
description: >
A Number variable that tracks the mouse's previous vertical
position
diff --git a/src/content/reference/en/p5/quad.mdx b/src/content/reference/en/p5/quad.mdx
index 71932f1aae..fcb73f0f47 100644
--- a/src/content/reference/en/p5/quad.mdx
+++ b/src/content/reference/en/p5/quad.mdx
@@ -2,7 +2,7 @@
title: quad
module: Shape
submodule: 2D Primitives
-file: src/core/shape/2d_primitives.js
+file: src\core\shape\2d_primitives.js
description: >
Draws a quadrilateral (four-sided shape).
diff --git a/src/content/reference/en/p5/quadraticVertex.mdx b/src/content/reference/en/p5/quadraticVertex.mdx index 2823a5da26..21e1147211 100644 --- a/src/content/reference/en/p5/quadraticVertex.mdx +++ b/src/content/reference/en/p5/quadraticVertex.mdx @@ -2,7 +2,7 @@ title: quadraticVertex module: Shape submodule: Vertex -file: src/core/shape/vertex.js +file: src\core\shape\vertex.js description: >Adds a quadratic Bézier curve segment to a custom shape.
diff --git a/src/content/reference/en/p5/radians.mdx b/src/content/reference/en/p5/radians.mdx index 06e14a25f7..cb64d8f096 100644 --- a/src/content/reference/en/p5/radians.mdx +++ b/src/content/reference/en/p5/radians.mdx @@ -2,7 +2,7 @@ title: radians module: Math submodule: Trigonometry -file: src/math/trigonometry.js +file: src\math\trigonometry.js description: |Converts an angle measured in degrees to its value in radians.
Degrees and radians are both units for measuring angles. There are 360˚ in diff --git a/src/content/reference/en/p5/random.mdx b/src/content/reference/en/p5/random.mdx index 2b381cc197..d094918c46 100644 --- a/src/content/reference/en/p5/random.mdx +++ b/src/content/reference/en/p5/random.mdx @@ -2,7 +2,7 @@ title: random module: Math submodule: Random -file: src/math/random.js +file: src\math\random.js description: "
Returns a random number or a random element from an array.
\nrandom() follows uniform distribution, which means that all outcomes are\nequally likely. When random() is used to generate numbers, all\nnumbers in the output range are equally likely to be returned. When\nrandom() is used to select elements from an array, all elements are\nequally likely to be chosen.
By default, random() produces different results each time a sketch runs.\nThe randomSeed() function can be used to\ngenerate the same sequence of numbers or choices each time a sketch runs.
The version of random() with no parameters returns a random number from 0\nup to but not including 1.
The version of random() with one parameter works one of two ways. If the\nargument passed is a number, random() returns a random number from 0 up\nto but not including the number. For example, calling random(5) returns\nvalues between 0 and 5. If the argument passed is an array, random()\nreturns a random element from that array. For example, calling\nrandom(['\U0001F981', '\U0001F42F', '\U0001F43B']) returns either a lion, tiger, or bear emoji.
The version of random() with two parameters returns a random number from\na given range. The arguments passed set the range's lower and upper bounds.\nFor example, calling random(-5, 10.2) returns values from -5 up to but\nnot including 10.2.
Returns a random number fitting a Gaussian, or normal, distribution.
diff --git a/src/content/reference/en/p5/randomSeed.mdx b/src/content/reference/en/p5/randomSeed.mdx index 36fa0da316..b4179caa78 100644 --- a/src/content/reference/en/p5/randomSeed.mdx +++ b/src/content/reference/en/p5/randomSeed.mdx @@ -2,7 +2,7 @@ title: randomSeed module: Math submodule: Random -file: src/math/random.js +file: src\math\random.js description: >Sets the seed value for the random() and diff --git a/src/content/reference/en/p5/rect.mdx b/src/content/reference/en/p5/rect.mdx index c7d4bdabf1..d98b516bb4 100644 --- a/src/content/reference/en/p5/rect.mdx +++ b/src/content/reference/en/p5/rect.mdx @@ -2,7 +2,7 @@ title: rect module: Shape submodule: 2D Primitives -file: src/core/shape/2d_primitives.js +file: src\core\shape\2d_primitives.js description: >
Draws a rectangle.
diff --git a/src/content/reference/en/p5/rectMode.mdx b/src/content/reference/en/p5/rectMode.mdx index c0301b1344..7ad0b41500 100644 --- a/src/content/reference/en/p5/rectMode.mdx +++ b/src/content/reference/en/p5/rectMode.mdx @@ -2,7 +2,7 @@ title: rectMode module: Shape submodule: Attributes -file: src/core/shape/attributes.js +file: src\core\shape\attributes.js description: >Changes where rectangles and squares are drawn.
diff --git a/src/content/reference/en/p5/red.mdx b/src/content/reference/en/p5/red.mdx index 53caf4c44c..87b2fc4a53 100644 --- a/src/content/reference/en/p5/red.mdx +++ b/src/content/reference/en/p5/red.mdx @@ -2,7 +2,7 @@ title: red module: Color submodule: Creating & Reading -file: src/color/creating_reading.js +file: src\color\creating_reading.js description: >Gets the red value of a color.
diff --git a/src/content/reference/en/p5/redraw.mdx b/src/content/reference/en/p5/redraw.mdx index abca2ea938..2d93dd099b 100644 --- a/src/content/reference/en/p5/redraw.mdx +++ b/src/content/reference/en/p5/redraw.mdx @@ -2,7 +2,7 @@ title: redraw module: Structure submodule: Structure -file: src/core/structure.js +file: src\core\structure.js description: >Runs the code in draw() once.
diff --git a/src/content/reference/en/p5/remove.mdx b/src/content/reference/en/p5/remove.mdx index 9d193b668f..96ef8790ac 100644 --- a/src/content/reference/en/p5/remove.mdx +++ b/src/content/reference/en/p5/remove.mdx @@ -2,7 +2,7 @@ title: remove module: Structure submodule: Structure -file: src/core/main.js +file: src\core\main.js description: >Removes the sketch from the web page.
diff --git a/src/content/reference/en/p5/removeElements.mdx b/src/content/reference/en/p5/removeElements.mdx index 1256f7e67b..0926795659 100644 --- a/src/content/reference/en/p5/removeElements.mdx +++ b/src/content/reference/en/p5/removeElements.mdx @@ -2,7 +2,7 @@ title: removeElements module: DOM submodule: DOM -file: src/dom/dom.js +file: src\dom\dom.js description: >Removes all elements created by p5.js, including any event handlers.
diff --git a/src/content/reference/en/p5/removeItem.mdx b/src/content/reference/en/p5/removeItem.mdx index ac354f2224..14606923fc 100644 --- a/src/content/reference/en/p5/removeItem.mdx +++ b/src/content/reference/en/p5/removeItem.mdx @@ -2,14 +2,13 @@ title: removeItem module: Data submodule: LocalStorage -file: src/data/local_storage.js +file: src\data\local_storage.js description: >Removes an item from the web browser's local storage.
Web browsers can save small amounts of data using the built-in
- localStorage object.
Data stored in localStorage can be retrieved at any point, even
diff --git a/src/content/reference/en/p5/requestPointerLock.mdx b/src/content/reference/en/p5/requestPointerLock.mdx
index 96d2d4919b..d818d1dbc9 100644
--- a/src/content/reference/en/p5/requestPointerLock.mdx
+++ b/src/content/reference/en/p5/requestPointerLock.mdx
@@ -2,7 +2,7 @@
title: requestPointerLock
module: Events
submodule: Mouse
-file: src/events/mouse.js
+file: src\events\mouse.js
description: >
Locks the mouse pointer to its current position and makes it invisible.
diff --git a/src/content/reference/en/p5/resetMatrix.mdx b/src/content/reference/en/p5/resetMatrix.mdx index f8c82f3c73..01e4c9ccaa 100644 --- a/src/content/reference/en/p5/resetMatrix.mdx +++ b/src/content/reference/en/p5/resetMatrix.mdx @@ -2,7 +2,7 @@ title: resetMatrix module: Transform submodule: Transform -file: src/core/transform.js +file: src\core\transform.js description: |Clears all transformations applied to the coordinate system.
line: 246 diff --git a/src/content/reference/en/p5/resetShader.mdx b/src/content/reference/en/p5/resetShader.mdx index a0fb62d812..ca986d3454 100644 --- a/src/content/reference/en/p5/resetShader.mdx +++ b/src/content/reference/en/p5/resetShader.mdx @@ -2,7 +2,7 @@ title: resetShader module: 3D submodule: Material -file: src/webgl/material.js +file: src\webgl\material.js description: |Restores the default shaders.
resetShader() deactivates any shaders previously applied by
diff --git a/src/content/reference/en/p5/resizeCanvas.mdx b/src/content/reference/en/p5/resizeCanvas.mdx
index 4b4cd46c00..0dd2907a81 100644
--- a/src/content/reference/en/p5/resizeCanvas.mdx
+++ b/src/content/reference/en/p5/resizeCanvas.mdx
@@ -2,7 +2,7 @@
title: resizeCanvas
module: Rendering
submodule: Rendering
-file: src/core/rendering.js
+file: src\core\rendering.js
description: >
Resizes the canvas to a given width and height.
diff --git a/src/content/reference/en/p5/reverse.mdx b/src/content/reference/en/p5/reverse.mdx index d2b6df8fd5..55da3a946f 100644 --- a/src/content/reference/en/p5/reverse.mdx +++ b/src/content/reference/en/p5/reverse.mdx @@ -2,7 +2,7 @@ title: reverse module: Data submodule: Array Functions -file: src/utilities/array_functions.js +file: src\utilities\array_functions.js description: |Reverses the order of an array, maps to Array.reverse()
line: 141 diff --git a/src/content/reference/en/p5/rotate.mdx b/src/content/reference/en/p5/rotate.mdx index 30dc265216..26f0896b6b 100644 --- a/src/content/reference/en/p5/rotate.mdx +++ b/src/content/reference/en/p5/rotate.mdx @@ -2,7 +2,7 @@ title: rotate module: Transform submodule: Transform -file: src/core/transform.js +file: src\core\transform.js description: >Rotates the coordinate system.
diff --git a/src/content/reference/en/p5/rotateX.mdx b/src/content/reference/en/p5/rotateX.mdx index 157dfb2fa2..e9adcd88e2 100644 --- a/src/content/reference/en/p5/rotateX.mdx +++ b/src/content/reference/en/p5/rotateX.mdx @@ -2,7 +2,7 @@ title: rotateX module: Transform submodule: Transform -file: src/core/transform.js +file: src\core\transform.js description: >Rotates the coordinate system about the x-axis in WebGL mode.
diff --git a/src/content/reference/en/p5/rotateY.mdx b/src/content/reference/en/p5/rotateY.mdx index d84c3ef63c..6c870c1538 100644 --- a/src/content/reference/en/p5/rotateY.mdx +++ b/src/content/reference/en/p5/rotateY.mdx @@ -2,7 +2,7 @@ title: rotateY module: Transform submodule: Transform -file: src/core/transform.js +file: src\core\transform.js description: >Rotates the coordinate system about the y-axis in WebGL mode.
diff --git a/src/content/reference/en/p5/rotateZ.mdx b/src/content/reference/en/p5/rotateZ.mdx index 42ce80165a..fdd6011d85 100644 --- a/src/content/reference/en/p5/rotateZ.mdx +++ b/src/content/reference/en/p5/rotateZ.mdx @@ -2,7 +2,7 @@ title: rotateZ module: Transform submodule: Transform -file: src/core/transform.js +file: src\core\transform.js description: >Rotates the coordinate system about the z-axis in WebGL mode.
diff --git a/src/content/reference/en/p5/rotationX.mdx b/src/content/reference/en/p5/rotationX.mdx index 2283679bba..3c500de734 100644 --- a/src/content/reference/en/p5/rotationX.mdx +++ b/src/content/reference/en/p5/rotationX.mdx @@ -2,7 +2,7 @@ title: rotationX module: Events submodule: Acceleration -file: src/events/acceleration.js +file: src\events\acceleration.js description: |The system variable rotationX always contains the rotation of the
device along the x axis. If the sketch
diff --git a/src/content/reference/en/p5/rotationY.mdx b/src/content/reference/en/p5/rotationY.mdx
index 5787d7c2e7..42d09dbdb8 100644
--- a/src/content/reference/en/p5/rotationY.mdx
+++ b/src/content/reference/en/p5/rotationY.mdx
@@ -2,7 +2,7 @@
title: rotationY
module: Events
submodule: Acceleration
-file: src/events/acceleration.js
+file: src\events\acceleration.js
description: |
The system variable rotationY always contains the rotation of the
device along the y axis. If the sketch
diff --git a/src/content/reference/en/p5/rotationZ.mdx b/src/content/reference/en/p5/rotationZ.mdx
index f2d302282f..5762ec73ee 100644
--- a/src/content/reference/en/p5/rotationZ.mdx
+++ b/src/content/reference/en/p5/rotationZ.mdx
@@ -2,7 +2,7 @@
title: rotationZ
module: Events
submodule: Acceleration
-file: src/events/acceleration.js
+file: src\events\acceleration.js
description: |
The system variable rotationZ always contains the rotation of the
device along the z axis. If the sketch
diff --git a/src/content/reference/en/p5/round.mdx b/src/content/reference/en/p5/round.mdx
index a97ad50ec8..b38a0b74b0 100644
--- a/src/content/reference/en/p5/round.mdx
+++ b/src/content/reference/en/p5/round.mdx
@@ -2,7 +2,7 @@
title: round
module: Math
submodule: Calculation
-file: src/math/calculation.js
+file: src\math\calculation.js
description: >
Calculates the integer closest to a number. Returns a number representing the sample rate, in samples per second,
of all sound objects in this audio context. It is determined by the
diff --git a/src/content/reference/en/p5/saturation.mdx b/src/content/reference/en/p5/saturation.mdx
index 2940cc659f..54f5268ba1 100644
--- a/src/content/reference/en/p5/saturation.mdx
+++ b/src/content/reference/en/p5/saturation.mdx
@@ -2,7 +2,7 @@
title: saturation
module: Color
submodule: Creating & Reading
-file: src/color/creating_reading.js
+file: src\color\creating_reading.js
description: >
Gets the saturation value of a color. Saves a given element(image, text, json, csv, wav, or html) to the client's
diff --git a/src/content/reference/en/p5/saveCanvas.mdx b/src/content/reference/en/p5/saveCanvas.mdx
index 2aa632ebdc..500aa13359 100644
--- a/src/content/reference/en/p5/saveCanvas.mdx
+++ b/src/content/reference/en/p5/saveCanvas.mdx
@@ -2,7 +2,7 @@
title: saveCanvas
module: Image
submodule: Image
-file: src/image/image.js
+file: src\image\image.js
description: >
Saves the current canvas as an image. Captures a sequence of frames from the canvas that can be saved as
images. Generates a gif from a sketch and saves it to a file. Saves an JavaScript Object Notation
- (JSON)
is a standard format for sending data between applications. The format is
diff --git a/src/content/reference/en/p5/saveSound.mdx b/src/content/reference/en/p5/saveSound.mdx
index 0676ce11fe..e590f158b9 100644
--- a/src/content/reference/en/p5/saveSound.mdx
+++ b/src/content/reference/en/p5/saveSound.mdx
@@ -2,7 +2,7 @@
title: saveSound
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Save a p5.SoundFile as a .wav file. The browser will prompt the user
diff --git a/src/content/reference/en/p5/saveStrings.mdx b/src/content/reference/en/p5/saveStrings.mdx
index a383012902..93a9c1ce88 100644
--- a/src/content/reference/en/p5/saveStrings.mdx
+++ b/src/content/reference/en/p5/saveStrings.mdx
@@ -2,7 +2,7 @@
title: saveStrings
module: IO
submodule: Output
-file: src/io/files.js
+file: src\io\files.js
description: >
Saves an Writes the contents of a Table object
to a file. Defaults to a
diff --git a/src/content/reference/en/p5/scale.mdx b/src/content/reference/en/p5/scale.mdx
index c3eab0e1b2..9ae9cc9367 100644
--- a/src/content/reference/en/p5/scale.mdx
+++ b/src/content/reference/en/p5/scale.mdx
@@ -2,7 +2,7 @@
title: scale
module: Transform
submodule: Transform
-file: src/core/transform.js
+file: src\core\transform.js
description: >
Scales the coordinate system. Returns the current second as a number from 0–59. Searches the page for the first element that matches the given
@@ -24,7 +24,7 @@ description: >
p5.Element object, or an
- HTMLElement object. Searches the page for all elements that matches the given
@@ -24,7 +24,7 @@ description: >
p5.Element object, or an
- HTMLElement object. Sets the color of a pixel or draws an image to the canvas. Set attributes for the WebGL Drawing context.
This is a way of adjusting how the WebGL
diff --git a/src/content/reference/en/p5/setBPM.mdx b/src/content/reference/en/p5/setBPM.mdx
index b79bc041ee..c575347549 100644
--- a/src/content/reference/en/p5/setBPM.mdx
+++ b/src/content/reference/en/p5/setBPM.mdx
@@ -2,7 +2,7 @@
title: setBPM
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
Set the global tempo, in beats per minute, for all
p5.Parts. This method will impact all active p5.Parts. Sets the current (active) camera of a 3D sketch. The setMoveThreshold()
function is used to set the movement threshold for
diff --git a/src/content/reference/en/p5/setShakeThreshold.mdx b/src/content/reference/en/p5/setShakeThreshold.mdx
index 188422faf2..c31f34c1cf 100644
--- a/src/content/reference/en/p5/setShakeThreshold.mdx
+++ b/src/content/reference/en/p5/setShakeThreshold.mdx
@@ -2,7 +2,7 @@
title: setShakeThreshold
module: Events
submodule: Acceleration
-file: src/events/acceleration.js
+file: src\events\acceleration.js
description: >
The setShakeThreshold()
function is used to set the movement threshold for
diff --git a/src/content/reference/en/p5/setup.mdx b/src/content/reference/en/p5/setup.mdx
index e300ec51a1..417b55bfe4 100644
--- a/src/content/reference/en/p5/setup.mdx
+++ b/src/content/reference/en/p5/setup.mdx
@@ -2,7 +2,7 @@
title: setup
module: Structure
submodule: Structure
-file: src/core/main.js
+file: src\core\main.js
description: >
A function that's called once when the sketch begins running. Sets the p5.Shader object to apply
while drawing. Shears the x-axis so that shapes appear skewed. Shears the y-axis so that shapes appear skewed. Sets the amount of gloss ("shininess") of a
diff --git a/src/content/reference/en/p5/shorten.mdx b/src/content/reference/en/p5/shorten.mdx
index 3bdbd4d352..7f584ccf08 100644
--- a/src/content/reference/en/p5/shorten.mdx
+++ b/src/content/reference/en/p5/shorten.mdx
@@ -2,7 +2,7 @@
title: shorten
module: Data
submodule: Array Functions
-file: src/utilities/array_functions.js
+file: src\utilities\array_functions.js
description: |
Decreases an array by one element and returns the shortened array,
maps to Array.pop(). Shuffles the elements of an array. Calculates the sine of an angle. Draws certain features with smooth (antialiased) edges. Sorts an array of numbers from smallest to largest, or puts an array of
words in alphabetical order. The original array is not modified; a
diff --git a/src/content/reference/en/p5/soundFormats.mdx b/src/content/reference/en/p5/soundFormats.mdx
index 180a2f116d..d88a359cd4 100644
--- a/src/content/reference/en/p5/soundFormats.mdx
+++ b/src/content/reference/en/p5/soundFormats.mdx
@@ -2,7 +2,7 @@
title: soundFormats
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: |
List the SoundFile formats that you will include. LoadSound
will search your directory for these extensions, and will pick
diff --git a/src/content/reference/en/p5/soundOut.mdx b/src/content/reference/en/p5/soundOut.mdx
index b18a31404e..e46879699b 100644
--- a/src/content/reference/en/p5/soundOut.mdx
+++ b/src/content/reference/en/p5/soundOut.mdx
@@ -2,7 +2,7 @@
title: soundOut
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >
Sets the specular color for lights. Sets the specular color of shapes’ surface material. Draws a sphere. Inserts a value or an array of values into an existing array. The first
parameter specifies the initial array to be modified, and the second
diff --git a/src/content/reference/en/p5/split.mdx b/src/content/reference/en/p5/split.mdx
index 1828d63fbd..a9b06bad44 100644
--- a/src/content/reference/en/p5/split.mdx
+++ b/src/content/reference/en/p5/split.mdx
@@ -2,7 +2,7 @@
title: split
module: Data
submodule: String Functions
-file: src/utilities/string_functions.js
+file: src\utilities\string_functions.js
description: >
Splits a Splits a Creates a light that shines from a point in one direction. Calculates the square of a number. Calculates the square root of a number. Draws a square. Stores a value in the web browser's local storage. Web browsers can save small amounts of data using the built-in
- localStorage object.
Data stored in Converts a Sets the color used to draw points, lines, and the outlines of shapes. Sets the style for rendering the ends of lines. Sets the style of the joints that connect line segments. Sets the width of the stroke used for points, lines, and the outlines of
diff --git a/src/content/reference/en/p5/subset.mdx b/src/content/reference/en/p5/subset.mdx
index 0499618abb..91ab1c46d1 100644
--- a/src/content/reference/en/p5/subset.mdx
+++ b/src/content/reference/en/p5/subset.mdx
@@ -2,7 +2,7 @@
title: subset
module: Data
submodule: Array Functions
-file: src/utilities/array_functions.js
+file: src\utilities\array_functions.js
description: |
Extracts an array of elements from an existing array. The list parameter
defines the array from which the elements will be copied, and the start
diff --git a/src/content/reference/en/p5/tan.mdx b/src/content/reference/en/p5/tan.mdx
index 5fc10331cb..571882bf6a 100644
--- a/src/content/reference/en/p5/tan.mdx
+++ b/src/content/reference/en/p5/tan.mdx
@@ -2,7 +2,7 @@
title: tan
module: Math
submodule: Trigonometry
-file: src/math/trigonometry.js
+file: src\math\trigonometry.js
description: >
Calculates the tangent of an angle. Draws text to the canvas. Sets the way text is aligned when text()
is called. Calculates the ascent of the current font at its current size. The ascent represents the distance, in pixels, of the tallest character
diff --git a/src/content/reference/en/p5/textDescent.mdx b/src/content/reference/en/p5/textDescent.mdx
index 9c9cd6ad42..70b305ff2b 100644
--- a/src/content/reference/en/p5/textDescent.mdx
+++ b/src/content/reference/en/p5/textDescent.mdx
@@ -2,7 +2,7 @@
title: textDescent
module: Typography
submodule: Attributes
-file: src/typography/attributes.js
+file: src\typography\attributes.js
description: |
Calculates the descent of the current font at its current size. The descent represents the distance, in pixels, of the character with the
diff --git a/src/content/reference/en/p5/textFont.mdx b/src/content/reference/en/p5/textFont.mdx
index f16eeb0913..e5143dc8e4 100644
--- a/src/content/reference/en/p5/textFont.mdx
+++ b/src/content/reference/en/p5/textFont.mdx
@@ -2,7 +2,7 @@
title: textFont
module: Typography
submodule: Loading & Displaying
-file: src/typography/loading_displaying.js
+file: src\typography\loading_displaying.js
description: >
Sets the font used by the text()
function. Sets the spacing between lines of text when
diff --git a/src/content/reference/en/p5/textOutput.mdx b/src/content/reference/en/p5/textOutput.mdx
index 28bc163b8a..650a1520c3 100644
--- a/src/content/reference/en/p5/textOutput.mdx
+++ b/src/content/reference/en/p5/textOutput.mdx
@@ -2,7 +2,7 @@
title: textOutput
module: Environment
submodule: Environment
-file: src/accessibility/outputs.js
+file: src\accessibility\outputs.js
description: >
Creates a screen reader-accessible description of shapes on the canvas. Sets the font size when
diff --git a/src/content/reference/en/p5/textStyle.mdx b/src/content/reference/en/p5/textStyle.mdx
index 7110406ac6..c4ee9e80f4 100644
--- a/src/content/reference/en/p5/textStyle.mdx
+++ b/src/content/reference/en/p5/textStyle.mdx
@@ -2,7 +2,7 @@
title: textStyle
module: Typography
submodule: Attributes
-file: src/typography/attributes.js
+file: src\typography\attributes.js
description: >
Sets the style for system fonts when
diff --git a/src/content/reference/en/p5/textWidth.mdx b/src/content/reference/en/p5/textWidth.mdx
index b537b164a5..04edf70726 100644
--- a/src/content/reference/en/p5/textWidth.mdx
+++ b/src/content/reference/en/p5/textWidth.mdx
@@ -2,7 +2,7 @@
title: textWidth
module: Typography
submodule: Attributes
-file: src/typography/attributes.js
+file: src\typography\attributes.js
description: |
Calculates the maximum width of a string of text drawn when
text() is called. Sets the style for wrapping text when
diff --git a/src/content/reference/en/p5/texture.mdx b/src/content/reference/en/p5/texture.mdx
index 0287a33787..bedd6a8c2c 100644
--- a/src/content/reference/en/p5/texture.mdx
+++ b/src/content/reference/en/p5/texture.mdx
@@ -2,7 +2,7 @@
title: texture
module: 3D
submodule: Material
-file: src/webgl/material.js
+file: src\webgl\material.js
description: >
Sets the texture that will be used on shapes. Changes the coordinate system used for textures when they’re applied to
diff --git a/src/content/reference/en/p5/textureWrap.mdx b/src/content/reference/en/p5/textureWrap.mdx
index def9b93807..83416eca19 100644
--- a/src/content/reference/en/p5/textureWrap.mdx
+++ b/src/content/reference/en/p5/textureWrap.mdx
@@ -2,7 +2,7 @@
title: textureWrap
module: 3D
submodule: Material
-file: src/webgl/material.js
+file: src\webgl\material.js
description: >
Changes the way textures behave when a shape’s uv coordinates go beyond the
diff --git a/src/content/reference/en/p5/tint.mdx b/src/content/reference/en/p5/tint.mdx
index 76942642b1..9069666e4c 100644
--- a/src/content/reference/en/p5/tint.mdx
+++ b/src/content/reference/en/p5/tint.mdx
@@ -2,7 +2,7 @@
title: tint
module: Image
submodule: Loading & Displaying
-file: src/image/loading_displaying.js
+file: src\image\loading_displaying.js
description: >
Tints images using a color. Draws a torus. A function that's called once each time a screen touch ends. The parameter, event, is optional. A function that's called when the user touches the screen and moves. The parameter, event, is optional. A function that's called once each time the user touches the screen. The parameter, event, is optional. An Translates the coordinate system. Draws a triangle. Removes whitespace from the start and end of a When a device is rotated, the axis that triggers the deviceTurned()
diff --git a/src/content/reference/en/p5/types/Array.mdx b/src/content/reference/en/p5/types/Array.mdx
index e02c7eb35c..c9653d2145 100644
--- a/src/content/reference/en/p5/types/Array.mdx
+++ b/src/content/reference/en/p5/types/Array.mdx
@@ -2,7 +2,7 @@
title: Array
module: Foundation
submodule: Foundation
-file: src/core/reference.js
+file: src\core\reference.js
description: >
A list that keeps several pieces of data in order. Elements can be added to the end of an array by calling the
push()
method as follows: See MDN
for more information about arrays. A value that's either A number that can be positive, negative, or zero. The value A container for data that's stored as key-value pairs. Objects help to organize related data of any type, including other objects.\nA value stored in an object can be accessed by name, called its key. Each\nkey-value pair is called a \"property.\" Objects are similar to dictionaries\nin Python and maps in Java and Ruby. For example, an object could contain the location, size, and appearance of\na dog: The variable An object's data can be updated while a sketch runs. For example, the If needed, an object's values can be accessed using square brackets This syntax can be helpful when the key's name has spaces, as in\n A sequence of text characters. Converts a single-character Converts a Updates the canvas with the RGBA values in the
diff --git a/src/content/reference/en/p5/userStartAudio.mdx b/src/content/reference/en/p5/userStartAudio.mdx
index 73b258e9d6..3e21fee1c4 100644
--- a/src/content/reference/en/p5/userStartAudio.mdx
+++ b/src/content/reference/en/p5/userStartAudio.mdx
@@ -2,17 +2,17 @@
title: userStartAudio
module: p5.sound
submodule: p5.sound
-file: lib/addons/p5.sound.js
+file: lib\addons\p5.sound.js
description: >-
It is not only a good practice to give users control over starting
audio. This policy is enforced by many web browsers, including iOS and
- Google Chrome, which create the Web Audio API's
- Audio Context
in a suspended state. Adds a vertex to a custom shape. A A way to repeat a block of code. A A A A The layout viewport
is the area within the browser that's available for drawing. A function that's called when the browser window is resized. A The layout viewport
is the area within the browser that's available for drawing. Returns the current year as a number such as 1999.Object or Array to a JSON file.Array of Strings to a file, one per
line.shader(). See
MDN
for more information about compiling shaders.p5.soundOut is the p5.sound final output bus. It sends output
to
diff --git a/src/content/reference/en/p5/specularColor.mdx b/src/content/reference/en/p5/specularColor.mdx
index 3b7be5aaf1..a667aadc65 100644
--- a/src/content/reference/en/p5/specularColor.mdx
+++ b/src/content/reference/en/p5/specularColor.mdx
@@ -2,7 +2,7 @@
title: specularColor
module: 3D
submodule: Lights
-file: src/webgl/light.js
+file: src\webgl\light.js
description: >
String into pieces and returns an array containing
the pieces.String into pieces and returns an array containing
the pieces.localStorage can be retrieved at any point, even
diff --git a/src/content/reference/en/p5/str.mdx b/src/content/reference/en/p5/str.mdx
index 4a3da99706..ba918a1bbf 100644
--- a/src/content/reference/en/p5/str.mdx
+++ b/src/content/reference/en/p5/str.mdx
@@ -2,7 +2,7 @@
title: str
module: Data
submodule: Conversion
-file: src/utilities/conversion.js
+file: src\utilities\conversion.js
description: >
Boolean or Number to
String.touchEnded() will be passed
a
- TouchEvent
object with properties that describe the touch event:touchMoved() will be passed
a
- TouchEvent
object with properties that describe the touch event:touchStarted() will be
passed a
- TouchEvent
object with properties that describe the touch event:Array of all the current touch points on a touchscreen
device.String without
changing the middle.trim() trims
- whitespace characters
such as spaces, carriage returns, tabs, Unicode "nbsp" character.true or false.NaN stands for
Not-A-Number.
NaN appears when calculations or conversions don't work.
diff --git a/src/content/reference/en/p5/types/Object.mdx b/src/content/reference/en/p5/types/Object.mdx
index 2836774396..f68902c745 100644
--- a/src/content/reference/en/p5/types/Object.mdx
+++ b/src/content/reference/en/p5/types/Object.mdx
@@ -2,7 +2,7 @@
title: Object
module: Foundation
submodule: Foundation
-file: src/core/reference.js
+file: src\core\reference.js
description: "
\n// Declare the dog variable and assign it an object.\nlet dog = { x: 50, y: 50, size: 20, emoji: '\U0001F436' };\n\n// Style the text.\ntextAlign(CENTER, CENTER);\ntextSize(dog.size);\n\n// Draw the dog.\ntext(dog.emoji, dog.x, dog.y);\ndog is assigned an object with four properties. Objects\nare declared with curly braces {}. Values can be accessed using the dot\noperator, as in dog.size. In the example above, the key size\ncorresponds to the value 20. Objects can also be empty to start:
\n// Declare a cat variable and assign it an empty object.\nlet cat = {};\n\n// Add properties to the object.\ncat.x = 50;\ncat.y = 50;\ncat.size = 20;\ncat.emoji = '\U0001F431';\n\n// Style the text.\ntextAlign(CENTER, CENTER);\ntextSize(cat.size);\n\n// Draw the cat.\ntext(cat.emoji, cat.x, cat.y);\ncat\ncould run away from the dog by updating its location:
\n// Run to the right.\ncat.x += 5;\n[]\nand strings instead of dot notation:
\n// Run to the right.\ncat[\"x\"] += 5;\ncat['height (m)'].String to a
Number.String with a hexadecimal value to a
Number.String variable with the WebGL version in use.Number variable that stores the width of the canvas in
pixels.Number variable that tracks the mouse's horizontal position
within the
diff --git a/src/content/reference/en/p5/winMouseY.mdx b/src/content/reference/en/p5/winMouseY.mdx
index 2edb4c5926..932960ff7a 100644
--- a/src/content/reference/en/p5/winMouseY.mdx
+++ b/src/content/reference/en/p5/winMouseY.mdx
@@ -2,7 +2,7 @@
title: winMouseY
module: Events
submodule: Mouse
-file: src/events/mouse.js
+file: src\events\mouse.js
description: >
Number variable that tracks the mouse's vertical position
within the
diff --git a/src/content/reference/en/p5/windowHeight.mdx b/src/content/reference/en/p5/windowHeight.mdx
index 7abd1919d0..c67b0eb659 100644
--- a/src/content/reference/en/p5/windowHeight.mdx
+++ b/src/content/reference/en/p5/windowHeight.mdx
@@ -2,13 +2,13 @@
title: windowHeight
module: Environment
submodule: Environment
-file: src/core/environment.js
+file: src\core\environment.js
description: >
Number variable that stores the height of the browser's
viewport.Number variable that stores the width of the browser's
viewport.