From 61b3ce0b36665abc5c0af43b35bb33de60bbc0c8 Mon Sep 17 00:00:00 2001 From: Stalgia Grigg Date: Wed, 28 Feb 2024 16:51:41 -0800 Subject: [PATCH] Simplify builder --- src/content/reference/en/JSON/stringify.mdx | 3 +- src/content/reference/en/console/log.mdx | 3 +- .../reference/en/p5.Amplitude/getLevel.mdx | 1 + .../reference/en/p5.Amplitude/setInput.mdx | 1 + .../reference/en/p5.Amplitude/smooth.mdx | 1 + .../en/p5.Amplitude/toggleNormalize.mdx | 1 + src/content/reference/en/p5.AudioIn/amp.mdx | 1 + .../reference/en/p5.AudioIn/amplitude.mdx | 1 + .../reference/en/p5.AudioIn/connect.mdx | 1 + .../reference/en/p5.AudioIn/currentSource.mdx | 1 + .../reference/en/p5.AudioIn/disconnect.mdx | 1 + .../reference/en/p5.AudioIn/enabled.mdx | 1 + .../reference/en/p5.AudioIn/getLevel.mdx | 1 + .../reference/en/p5.AudioIn/getSources.mdx | 1 + src/content/reference/en/p5.AudioIn/input.mdx | 1 + .../reference/en/p5.AudioIn/mediaStream.mdx | 1 + .../reference/en/p5.AudioIn/output.mdx | 1 + .../reference/en/p5.AudioIn/setSource.mdx | 1 + src/content/reference/en/p5.AudioIn/start.mdx | 1 + src/content/reference/en/p5.AudioIn/stop.mdx | 1 + .../reference/en/p5.AudioIn/stream.mdx | 1 + .../reference/en/p5.AudioVoice/connect.mdx | 1 + .../reference/en/p5.AudioVoice/disconnect.mdx | 1 + src/content/reference/en/p5.Camera/camera.mdx | 7 +- .../reference/en/p5.Camera/centerX.mdx | 3 +- .../reference/en/p5.Camera/centerY.mdx | 3 +- .../reference/en/p5.Camera/centerZ.mdx | 3 +- src/content/reference/en/p5.Camera/eyeX.mdx | 3 +- src/content/reference/en/p5.Camera/eyeY.mdx | 3 +- src/content/reference/en/p5.Camera/eyeZ.mdx | 3 +- .../reference/en/p5.Camera/frustum.mdx | 7 +- src/content/reference/en/p5.Camera/lookAt.mdx | 7 +- src/content/reference/en/p5.Camera/move.mdx | 7 +- src/content/reference/en/p5.Camera/ortho.mdx | 7 +- src/content/reference/en/p5.Camera/pan.mdx | 3 +- .../reference/en/p5.Camera/perspective.mdx | 3 +- src/content/reference/en/p5.Camera/set.mdx | 13 +- .../reference/en/p5.Camera/setPosition.mdx | 3 +- src/content/reference/en/p5.Camera/slerp.mdx | 15 +- src/content/reference/en/p5.Camera/tilt.mdx | 3 +- src/content/reference/en/p5.Camera/upX.mdx | 3 +- src/content/reference/en/p5.Camera/upY.mdx | 3 +- src/content/reference/en/p5.Camera/upZ.mdx | 3 +- .../reference/en/p5.Color/setAlpha.mdx | 1 + src/content/reference/en/p5.Color/setBlue.mdx | 1 + .../reference/en/p5.Color/setGreen.mdx | 1 + src/content/reference/en/p5.Color/setRed.mdx | 1 + .../reference/en/p5.Color/toString.mdx | 1 + .../reference/en/p5.Compressor/attack.mdx | 1 + .../reference/en/p5.Compressor/compressor.mdx | 1 + .../reference/en/p5.Compressor/knee.mdx | 1 + .../reference/en/p5.Compressor/process.mdx | 1 + .../reference/en/p5.Compressor/ratio.mdx | 1 + .../reference/en/p5.Compressor/reduction.mdx | 1 + .../reference/en/p5.Compressor/release.mdx | 1 + .../reference/en/p5.Compressor/set.mdx | 1 + .../reference/en/p5.Compressor/threshold.mdx | 1 + .../reference/en/p5.Convolver/addImpulse.mdx | 1 + .../en/p5.Convolver/convolverNode.mdx | 1 + .../reference/en/p5.Convolver/impulses.mdx | 1 + .../reference/en/p5.Convolver/process.mdx | 1 + .../en/p5.Convolver/resetImpulse.mdx | 1 + .../en/p5.Convolver/toggleImpulse.mdx | 1 + src/content/reference/en/p5.Delay/amp.mdx | 1 + src/content/reference/en/p5.Delay/connect.mdx | 1 + .../reference/en/p5.Delay/delayTime.mdx | 1 + .../reference/en/p5.Delay/disconnect.mdx | 1 + .../reference/en/p5.Delay/feedback.mdx | 1 + src/content/reference/en/p5.Delay/filter.mdx | 1 + .../reference/en/p5.Delay/leftDelay.mdx | 1 + src/content/reference/en/p5.Delay/process.mdx | 1 + .../reference/en/p5.Delay/rightDelay.mdx | 1 + src/content/reference/en/p5.Delay/setType.mdx | 1 + .../en/p5.Distortion/WaveShaperNode.mdx | 1 + .../reference/en/p5.Distortion/getAmount.mdx | 1 + .../en/p5.Distortion/getOversample.mdx | 1 + .../reference/en/p5.Distortion/process.mdx | 1 + .../reference/en/p5.Distortion/set.mdx | 1 + src/content/reference/en/p5.EQ/bands.mdx | 1 + src/content/reference/en/p5.EQ/process.mdx | 1 + src/content/reference/en/p5.Effect/amp.mdx | 1 + src/content/reference/en/p5.Effect/chain.mdx | 1 + .../reference/en/p5.Effect/connect.mdx | 1 + .../reference/en/p5.Effect/disconnect.mdx | 1 + src/content/reference/en/p5.Effect/drywet.mdx | 1 + .../reference/en/p5.Element/addClass.mdx | 1 + .../reference/en/p5.Element/attribute.mdx | 1 + .../reference/en/p5.Element/center.mdx | 1 + src/content/reference/en/p5.Element/child.mdx | 1 + src/content/reference/en/p5.Element/class.mdx | 1 + .../reference/en/p5.Element/doubleClicked.mdx | 1 + .../reference/en/p5.Element/dragLeave.mdx | 1 + .../reference/en/p5.Element/dragOver.mdx | 1 + .../reference/en/p5.Element/draggable.mdx | 1 + src/content/reference/en/p5.Element/drop.mdx | 1 + src/content/reference/en/p5.Element/elt.mdx | 1 + .../reference/en/p5.Element/hasClass.mdx | 1 + .../reference/en/p5.Element/height.mdx | 1 + src/content/reference/en/p5.Element/hide.mdx | 1 + src/content/reference/en/p5.Element/html.mdx | 1 + src/content/reference/en/p5.Element/id.mdx | 1 + .../reference/en/p5.Element/mouseClicked.mdx | 1 + .../reference/en/p5.Element/mouseMoved.mdx | 1 + .../reference/en/p5.Element/mouseOut.mdx | 1 + .../reference/en/p5.Element/mouseOver.mdx | 1 + .../reference/en/p5.Element/mousePressed.mdx | 1 + .../reference/en/p5.Element/mouseReleased.mdx | 1 + .../reference/en/p5.Element/mouseWheel.mdx | 1 + .../reference/en/p5.Element/parent.mdx | 1 + .../reference/en/p5.Element/position.mdx | 1 + .../reference/en/p5.Element/remove.mdx | 1 + .../en/p5.Element/removeAttribute.mdx | 1 + .../reference/en/p5.Element/removeClass.mdx | 1 + src/content/reference/en/p5.Element/show.mdx | 1 + src/content/reference/en/p5.Element/size.mdx | 1 + src/content/reference/en/p5.Element/style.mdx | 1 + .../reference/en/p5.Element/toggleClass.mdx | 1 + .../reference/en/p5.Element/touchEnded.mdx | 1 + .../reference/en/p5.Element/touchMoved.mdx | 1 + .../reference/en/p5.Element/touchStarted.mdx | 1 + src/content/reference/en/p5.Element/value.mdx | 1 + src/content/reference/en/p5.Element/width.mdx | 1 + src/content/reference/en/p5.Envelope/add.mdx | 1 + .../reference/en/p5.Envelope/attackLevel.mdx | 1 + .../reference/en/p5.Envelope/attackTime.mdx | 1 + .../reference/en/p5.Envelope/decayLevel.mdx | 1 + .../reference/en/p5.Envelope/decayTime.mdx | 1 + src/content/reference/en/p5.Envelope/mult.mdx | 1 + src/content/reference/en/p5.Envelope/play.mdx | 1 + src/content/reference/en/p5.Envelope/ramp.mdx | 1 + .../reference/en/p5.Envelope/releaseLevel.mdx | 1 + .../reference/en/p5.Envelope/releaseTime.mdx | 1 + .../reference/en/p5.Envelope/scale.mdx | 1 + src/content/reference/en/p5.Envelope/set.mdx | 1 + .../reference/en/p5.Envelope/setADSR.mdx | 1 + .../reference/en/p5.Envelope/setExp.mdx | 1 + .../reference/en/p5.Envelope/setInput.mdx | 1 + .../reference/en/p5.Envelope/setRange.mdx | 1 + .../en/p5.Envelope/triggerAttack.mdx | 1 + .../en/p5.Envelope/triggerRelease.mdx | 1 + src/content/reference/en/p5.FFT/analyze.mdx | 1 + .../reference/en/p5.FFT/getCentroid.mdx | 1 + src/content/reference/en/p5.FFT/getEnergy.mdx | 1 + .../reference/en/p5.FFT/getOctaveBands.mdx | 1 + .../reference/en/p5.FFT/linAverages.mdx | 1 + .../reference/en/p5.FFT/logAverages.mdx | 1 + src/content/reference/en/p5.FFT/setInput.mdx | 1 + src/content/reference/en/p5.FFT/smooth.mdx | 1 + src/content/reference/en/p5.FFT/waveform.mdx | 1 + src/content/reference/en/p5.File/data.mdx | 1 + src/content/reference/en/p5.File/file.mdx | 1 + src/content/reference/en/p5.File/name.mdx | 1 + src/content/reference/en/p5.File/size.mdx | 1 + src/content/reference/en/p5.File/subtype.mdx | 1 + src/content/reference/en/p5.File/type.mdx | 1 + .../reference/en/p5.Filter/biquadFilter.mdx | 1 + src/content/reference/en/p5.Filter/freq.mdx | 1 + src/content/reference/en/p5.Filter/gain.mdx | 1 + .../reference/en/p5.Filter/process.mdx | 1 + src/content/reference/en/p5.Filter/res.mdx | 1 + src/content/reference/en/p5.Filter/set.mdx | 1 + .../reference/en/p5.Filter/setType.mdx | 1 + src/content/reference/en/p5.Filter/toggle.mdx | 1 + src/content/reference/en/p5.Font/font.mdx | 1 + .../reference/en/p5.Font/textBounds.mdx | 1 + .../reference/en/p5.Font/textToPoints.mdx | 1 + .../reference/en/p5.Framebuffer/autoSized.mdx | 1 + .../reference/en/p5.Framebuffer/begin.mdx | 7 +- .../reference/en/p5.Framebuffer/color.mdx | 3 +- .../en/p5.Framebuffer/createCamera.mdx | 1 + .../reference/en/p5.Framebuffer/depth.mdx | 9 +- .../reference/en/p5.Framebuffer/draw.mdx | 7 +- .../reference/en/p5.Framebuffer/end.mdx | 1 + .../reference/en/p5.Framebuffer/get.mdx | 1 + .../en/p5.Framebuffer/pixelDensity.mdx | 1 + .../reference/en/p5.Framebuffer/pixels.mdx | 1 + .../reference/en/p5.Framebuffer/remove.mdx | 3 +- .../reference/en/p5.Framebuffer/resize.mdx | 9 +- src/content/reference/en/p5.Gain/amp.mdx | 1 + src/content/reference/en/p5.Gain/connect.mdx | 1 + .../reference/en/p5.Gain/disconnect.mdx | 1 + src/content/reference/en/p5.Gain/setInput.mdx | 1 + .../en/p5.Geometry/averageNormals.mdx | 1 + .../en/p5.Geometry/averagePoleNormals.mdx | 1 + .../reference/en/p5.Geometry/clearColors.mdx | 1 + .../reference/en/p5.Geometry/computeFaces.mdx | 1 + .../en/p5.Geometry/computeNormals.mdx | 11 +- .../reference/en/p5.Geometry/flipU.mdx | 1 + .../reference/en/p5.Geometry/flipV.mdx | 1 + .../reference/en/p5.Geometry/normalize.mdx | 1 + .../en/p5.Graphics/createFramebuffer.mdx | 1 + .../reference/en/p5.Graphics/remove.mdx | 7 +- .../reference/en/p5.Graphics/reset.mdx | 15 +- src/content/reference/en/p5.Image/blend.mdx | 1 + src/content/reference/en/p5.Image/copy.mdx | 1 + src/content/reference/en/p5.Image/delay.mdx | 1 + src/content/reference/en/p5.Image/filter.mdx | 1 + src/content/reference/en/p5.Image/get.mdx | 1 + .../reference/en/p5.Image/getCurrentFrame.mdx | 1 + src/content/reference/en/p5.Image/height.mdx | 1 + .../reference/en/p5.Image/loadPixels.mdx | 1 + src/content/reference/en/p5.Image/mask.mdx | 1 + .../reference/en/p5.Image/numFrames.mdx | 1 + src/content/reference/en/p5.Image/pause.mdx | 1 + .../reference/en/p5.Image/pixelDensity.mdx | 1 + src/content/reference/en/p5.Image/pixels.mdx | 1 + src/content/reference/en/p5.Image/play.mdx | 1 + src/content/reference/en/p5.Image/reset.mdx | 1 + src/content/reference/en/p5.Image/resize.mdx | 1 + src/content/reference/en/p5.Image/save.mdx | 1 + src/content/reference/en/p5.Image/set.mdx | 1 + .../reference/en/p5.Image/setFrame.mdx | 1 + .../reference/en/p5.Image/updatePixels.mdx | 1 + src/content/reference/en/p5.Image/width.mdx | 1 + .../reference/en/p5.MediaElement/addCue.mdx | 1 + .../reference/en/p5.MediaElement/autoplay.mdx | 1 + .../en/p5.MediaElement/clearCues.mdx | 1 + .../reference/en/p5.MediaElement/connect.mdx | 1 + .../en/p5.MediaElement/disconnect.mdx | 1 + .../reference/en/p5.MediaElement/duration.mdx | 1 + .../en/p5.MediaElement/hideControls.mdx | 1 + .../reference/en/p5.MediaElement/loop.mdx | 1 + .../reference/en/p5.MediaElement/noLoop.mdx | 1 + .../reference/en/p5.MediaElement/onended.mdx | 1 + .../reference/en/p5.MediaElement/pause.mdx | 1 + .../reference/en/p5.MediaElement/play.mdx | 1 + .../en/p5.MediaElement/removeCue.mdx | 1 + .../en/p5.MediaElement/showControls.mdx | 1 + .../reference/en/p5.MediaElement/speed.mdx | 1 + .../reference/en/p5.MediaElement/src.mdx | 1 + .../reference/en/p5.MediaElement/stop.mdx | 1 + .../reference/en/p5.MediaElement/time.mdx | 1 + .../reference/en/p5.MediaElement/volume.mdx | 1 + src/content/reference/en/p5.MonoSynth/amp.mdx | 1 + .../reference/en/p5.MonoSynth/attack.mdx | 1 + .../reference/en/p5.MonoSynth/connect.mdx | 1 + .../reference/en/p5.MonoSynth/decay.mdx | 1 + .../reference/en/p5.MonoSynth/disconnect.mdx | 1 + .../reference/en/p5.MonoSynth/dispose.mdx | 1 + .../reference/en/p5.MonoSynth/play.mdx | 1 + .../reference/en/p5.MonoSynth/release.mdx | 1 + .../reference/en/p5.MonoSynth/setADSR.mdx | 1 + .../reference/en/p5.MonoSynth/sustain.mdx | 1 + .../en/p5.MonoSynth/triggerAttack.mdx | 1 + .../en/p5.MonoSynth/triggerRelease.mdx | 1 + src/content/reference/en/p5.Noise/setType.mdx | 1 + .../reference/en/p5.NumberDict/add.mdx | 1 + .../reference/en/p5.NumberDict/div.mdx | 1 + .../reference/en/p5.NumberDict/maxKey.mdx | 1 + .../reference/en/p5.NumberDict/maxValue.mdx | 1 + .../reference/en/p5.NumberDict/minKey.mdx | 1 + .../reference/en/p5.NumberDict/minValue.mdx | 1 + .../reference/en/p5.NumberDict/mult.mdx | 1 + .../reference/en/p5.NumberDict/sub.mdx | 1 + .../reference/en/p5.Oscillator/add.mdx | 1 + .../reference/en/p5.Oscillator/amp.mdx | 1 + .../reference/en/p5.Oscillator/connect.mdx | 1 + .../reference/en/p5.Oscillator/disconnect.mdx | 1 + .../reference/en/p5.Oscillator/freq.mdx | 1 + .../reference/en/p5.Oscillator/getAmp.mdx | 1 + .../reference/en/p5.Oscillator/getFreq.mdx | 1 + .../reference/en/p5.Oscillator/getPan.mdx | 1 + .../reference/en/p5.Oscillator/getType.mdx | 1 + .../reference/en/p5.Oscillator/mult.mdx | 1 + .../reference/en/p5.Oscillator/pan.mdx | 1 + .../reference/en/p5.Oscillator/phase.mdx | 1 + .../reference/en/p5.Oscillator/scale.mdx | 1 + .../reference/en/p5.Oscillator/setType.mdx | 1 + .../reference/en/p5.Oscillator/start.mdx | 1 + .../reference/en/p5.Oscillator/stop.mdx | 1 + .../reference/en/p5.Panner3D/maxDist.mdx | 1 + .../reference/en/p5.Panner3D/orient.mdx | 1 + .../reference/en/p5.Panner3D/orientX.mdx | 1 + .../reference/en/p5.Panner3D/orientY.mdx | 1 + .../reference/en/p5.Panner3D/orientZ.mdx | 1 + .../reference/en/p5.Panner3D/panner.mdx | 1 + .../reference/en/p5.Panner3D/positionX.mdx | 1 + .../reference/en/p5.Panner3D/positionY.mdx | 1 + .../reference/en/p5.Panner3D/positionZ.mdx | 1 + .../reference/en/p5.Panner3D/process.mdx | 1 + .../reference/en/p5.Panner3D/rollof.mdx | 1 + src/content/reference/en/p5.Panner3D/set.mdx | 1 + .../reference/en/p5.Panner3D/setFalloff.mdx | 1 + .../reference/en/p5.Part/addPhrase.mdx | 1 + src/content/reference/en/p5.Part/getBPM.mdx | 1 + .../reference/en/p5.Part/getPhrase.mdx | 1 + src/content/reference/en/p5.Part/loop.mdx | 1 + src/content/reference/en/p5.Part/noLoop.mdx | 1 + src/content/reference/en/p5.Part/onStep.mdx | 1 + src/content/reference/en/p5.Part/pause.mdx | 1 + .../reference/en/p5.Part/removePhrase.mdx | 1 + .../reference/en/p5.Part/replaceSequence.mdx | 1 + src/content/reference/en/p5.Part/setBPM.mdx | 1 + src/content/reference/en/p5.Part/start.mdx | 1 + src/content/reference/en/p5.Part/stop.mdx | 1 + .../reference/en/p5.PeakDetect/isDetected.mdx | 1 + .../reference/en/p5.PeakDetect/onPeak.mdx | 1 + .../reference/en/p5.PeakDetect/update.mdx | 1 + .../reference/en/p5.Phrase/sequence.mdx | 1 + .../reference/en/p5.PolySynth/AudioVoice.mdx | 1 + .../reference/en/p5.PolySynth/connect.mdx | 1 + .../reference/en/p5.PolySynth/disconnect.mdx | 1 + .../reference/en/p5.PolySynth/dispose.mdx | 1 + .../reference/en/p5.PolySynth/noteADSR.mdx | 1 + .../reference/en/p5.PolySynth/noteAttack.mdx | 1 + .../reference/en/p5.PolySynth/noteRelease.mdx | 1 + .../reference/en/p5.PolySynth/notes.mdx | 1 + .../reference/en/p5.PolySynth/play.mdx | 1 + .../reference/en/p5.PolySynth/polyvalue.mdx | 1 + .../reference/en/p5.PolySynth/setADSR.mdx | 1 + .../reference/en/p5.PrintWriter/clear.mdx | 1 + .../reference/en/p5.PrintWriter/close.mdx | 1 + .../reference/en/p5.PrintWriter/print.mdx | 1 + .../reference/en/p5.PrintWriter/write.mdx | 1 + src/content/reference/en/p5.Pulse/width.mdx | 1 + src/content/reference/en/p5.Reverb/amp.mdx | 1 + .../reference/en/p5.Reverb/connect.mdx | 1 + .../reference/en/p5.Reverb/disconnect.mdx | 1 + .../reference/en/p5.Reverb/process.mdx | 1 + src/content/reference/en/p5.Reverb/set.mdx | 1 + src/content/reference/en/p5.Score/loop.mdx | 1 + src/content/reference/en/p5.Score/noLoop.mdx | 1 + src/content/reference/en/p5.Score/pause.mdx | 1 + src/content/reference/en/p5.Score/setBPM.mdx | 1 + src/content/reference/en/p5.Score/start.mdx | 1 + src/content/reference/en/p5.Score/stop.mdx | 1 + .../reference/en/p5.Shader/copyToContext.mdx | 1 + .../reference/en/p5.Shader/setUniform.mdx | 9 +- .../reference/en/p5.SoundFile/addCue.mdx | 1 + .../reference/en/p5.SoundFile/channels.mdx | 1 + .../reference/en/p5.SoundFile/clearCues.mdx | 1 + .../reference/en/p5.SoundFile/connect.mdx | 1 + .../reference/en/p5.SoundFile/currentTime.mdx | 1 + .../reference/en/p5.SoundFile/disconnect.mdx | 1 + .../reference/en/p5.SoundFile/duration.mdx | 1 + .../reference/en/p5.SoundFile/frames.mdx | 1 + .../reference/en/p5.SoundFile/getBlob.mdx | 1 + .../reference/en/p5.SoundFile/getPan.mdx | 1 + .../reference/en/p5.SoundFile/getPeaks.mdx | 1 + .../reference/en/p5.SoundFile/isLoaded.mdx | 1 + .../reference/en/p5.SoundFile/isLooping.mdx | 1 + .../reference/en/p5.SoundFile/isPaused.mdx | 1 + .../reference/en/p5.SoundFile/isPlaying.mdx | 1 + .../reference/en/p5.SoundFile/jump.mdx | 1 + .../reference/en/p5.SoundFile/loop.mdx | 1 + .../reference/en/p5.SoundFile/onended.mdx | 1 + src/content/reference/en/p5.SoundFile/pan.mdx | 1 + .../reference/en/p5.SoundFile/pause.mdx | 1 + .../reference/en/p5.SoundFile/play.mdx | 1 + .../reference/en/p5.SoundFile/playMode.mdx | 1 + .../reference/en/p5.SoundFile/rate.mdx | 1 + .../reference/en/p5.SoundFile/removeCue.mdx | 1 + .../en/p5.SoundFile/reverseBuffer.mdx | 1 + .../reference/en/p5.SoundFile/sampleRate.mdx | 1 + .../reference/en/p5.SoundFile/save.mdx | 1 + .../reference/en/p5.SoundFile/setBuffer.mdx | 1 + .../reference/en/p5.SoundFile/setLoop.mdx | 1 + .../reference/en/p5.SoundFile/setPath.mdx | 1 + .../reference/en/p5.SoundFile/setVolume.mdx | 1 + .../reference/en/p5.SoundFile/stop.mdx | 1 + src/content/reference/en/p5.SoundLoop/bpm.mdx | 1 + .../reference/en/p5.SoundLoop/interval.mdx | 1 + .../reference/en/p5.SoundLoop/iterations.mdx | 1 + .../en/p5.SoundLoop/maxIterations.mdx | 1 + .../en/p5.SoundLoop/musicalTimeMode.mdx | 1 + .../reference/en/p5.SoundLoop/pause.mdx | 1 + .../reference/en/p5.SoundLoop/start.mdx | 1 + .../reference/en/p5.SoundLoop/stop.mdx | 1 + .../reference/en/p5.SoundLoop/syncedStart.mdx | 1 + .../en/p5.SoundLoop/timeSignature.mdx | 1 + .../reference/en/p5.SoundRecorder/record.mdx | 1 + .../en/p5.SoundRecorder/setInput.mdx | 1 + .../reference/en/p5.SoundRecorder/stop.mdx | 1 + .../reference/en/p5.Table/addColumn.mdx | 1 + src/content/reference/en/p5.Table/addRow.mdx | 1 + .../reference/en/p5.Table/clearRows.mdx | 1 + src/content/reference/en/p5.Table/columns.mdx | 1 + src/content/reference/en/p5.Table/findRow.mdx | 1 + .../reference/en/p5.Table/findRows.mdx | 1 + src/content/reference/en/p5.Table/get.mdx | 1 + .../reference/en/p5.Table/getArray.mdx | 1 + .../reference/en/p5.Table/getColumn.mdx | 1 + .../reference/en/p5.Table/getColumnCount.mdx | 1 + src/content/reference/en/p5.Table/getNum.mdx | 1 + .../reference/en/p5.Table/getObject.mdx | 1 + src/content/reference/en/p5.Table/getRow.mdx | 1 + .../reference/en/p5.Table/getRowCount.mdx | 1 + src/content/reference/en/p5.Table/getRows.mdx | 1 + .../reference/en/p5.Table/getString.mdx | 1 + .../reference/en/p5.Table/matchRow.mdx | 1 + .../reference/en/p5.Table/matchRows.mdx | 1 + .../reference/en/p5.Table/removeColumn.mdx | 1 + .../reference/en/p5.Table/removeRow.mdx | 1 + .../reference/en/p5.Table/removeTokens.mdx | 1 + src/content/reference/en/p5.Table/rows.mdx | 1 + src/content/reference/en/p5.Table/set.mdx | 1 + src/content/reference/en/p5.Table/setNum.mdx | 1 + .../reference/en/p5.Table/setString.mdx | 1 + src/content/reference/en/p5.Table/trim.mdx | 1 + src/content/reference/en/p5.TableRow/get.mdx | 1 + .../reference/en/p5.TableRow/getNum.mdx | 1 + .../reference/en/p5.TableRow/getString.mdx | 1 + src/content/reference/en/p5.TableRow/set.mdx | 1 + .../reference/en/p5.TableRow/setNum.mdx | 1 + .../reference/en/p5.TableRow/setString.mdx | 1 + .../reference/en/p5.TypedDict/clear.mdx | 1 + .../reference/en/p5.TypedDict/create.mdx | 1 + src/content/reference/en/p5.TypedDict/get.mdx | 1 + .../reference/en/p5.TypedDict/hasKey.mdx | 1 + .../reference/en/p5.TypedDict/print.mdx | 1 + .../reference/en/p5.TypedDict/remove.mdx | 1 + .../reference/en/p5.TypedDict/saveJSON.mdx | 1 + .../reference/en/p5.TypedDict/saveTable.mdx | 1 + src/content/reference/en/p5.TypedDict/set.mdx | 1 + .../reference/en/p5.TypedDict/size.mdx | 1 + src/content/reference/en/p5.Vector/add.mdx | 1 + .../reference/en/p5.Vector/angleBetween.mdx | 1 + src/content/reference/en/p5.Vector/array.mdx | 1 + src/content/reference/en/p5.Vector/copy.mdx | 1 + src/content/reference/en/p5.Vector/cross.mdx | 1 + src/content/reference/en/p5.Vector/dist.mdx | 1 + src/content/reference/en/p5.Vector/div.mdx | 1 + src/content/reference/en/p5.Vector/dot.mdx | 1 + src/content/reference/en/p5.Vector/equals.mdx | 1 + .../reference/en/p5.Vector/fromAngle.mdx | 1 + .../reference/en/p5.Vector/fromAngles.mdx | 1 + .../reference/en/p5.Vector/heading.mdx | 1 + src/content/reference/en/p5.Vector/lerp.mdx | 1 + src/content/reference/en/p5.Vector/limit.mdx | 1 + src/content/reference/en/p5.Vector/mag.mdx | 1 + src/content/reference/en/p5.Vector/magSq.mdx | 1 + src/content/reference/en/p5.Vector/mult.mdx | 1 + .../reference/en/p5.Vector/normalize.mdx | 1 + .../reference/en/p5.Vector/random2D.mdx | 1 + .../reference/en/p5.Vector/random3D.mdx | 1 + .../reference/en/p5.Vector/reflect.mdx | 1 + src/content/reference/en/p5.Vector/rem.mdx | 1 + src/content/reference/en/p5.Vector/rotate.mdx | 1 + src/content/reference/en/p5.Vector/set.mdx | 1 + .../reference/en/p5.Vector/setHeading.mdx | 1 + src/content/reference/en/p5.Vector/setMag.mdx | 1 + src/content/reference/en/p5.Vector/slerp.mdx | 1 + src/content/reference/en/p5.Vector/sub.mdx | 1 + .../reference/en/p5.Vector/toString.mdx | 1 + src/content/reference/en/p5.Vector/x.mdx | 1 + src/content/reference/en/p5.Vector/y.mdx | 1 + src/content/reference/en/p5.Vector/z.mdx | 1 + src/content/reference/en/p5.XML/addChild.mdx | 1 + .../reference/en/p5.XML/getAttributeCount.mdx | 1 + src/content/reference/en/p5.XML/getChild.mdx | 1 + .../reference/en/p5.XML/getChildren.mdx | 1 + .../reference/en/p5.XML/getContent.mdx | 1 + src/content/reference/en/p5.XML/getName.mdx | 1 + src/content/reference/en/p5.XML/getNum.mdx | 1 + src/content/reference/en/p5.XML/getParent.mdx | 1 + src/content/reference/en/p5.XML/getString.mdx | 1 + .../reference/en/p5.XML/hasAttribute.mdx | 1 + .../reference/en/p5.XML/hasChildren.mdx | 1 + .../reference/en/p5.XML/listAttributes.mdx | 1 + .../reference/en/p5.XML/listChildren.mdx | 1 + .../reference/en/p5.XML/removeChild.mdx | 1 + src/content/reference/en/p5.XML/serialize.mdx | 1 + .../reference/en/p5.XML/setAttribute.mdx | 1 + .../reference/en/p5.XML/setContent.mdx | 1 + src/content/reference/en/p5.XML/setName.mdx | 1 + .../reference/en/p5.sound/p5.Amplitude.mdx | 30 +- .../reference/en/p5.sound/p5.AudioIn.mdx | 91 +--- .../reference/en/p5.sound/p5.AudioVoice.mdx | 10 +- .../reference/en/p5.sound/p5.BandPass.mdx | 1 + .../reference/en/p5.sound/p5.Compressor.mdx | 42 +- .../reference/en/p5.sound/p5.Convolver.mdx | 82 ++-- .../reference/en/p5.sound/p5.Delay.mdx | 91 ++-- .../reference/en/p5.sound/p5.Distortion.mdx | 25 +- src/content/reference/en/p5.sound/p5.EQ.mdx | 71 ++- .../reference/en/p5.sound/p5.Effect.mdx | 25 +- .../reference/en/p5.sound/p5.Envelope.mdx | 144 ++---- src/content/reference/en/p5.sound/p5.FFT.mdx | 145 ++---- .../reference/en/p5.sound/p5.Filter.mdx | 101 +++-- src/content/reference/en/p5.sound/p5.Gain.mdx | 80 +++- .../reference/en/p5.sound/p5.HighPass.mdx | 1 + .../reference/en/p5.sound/p5.LowPass.mdx | 1 + .../reference/en/p5.sound/p5.MonoSynth.mdx | 74 ++- .../reference/en/p5.sound/p5.Noise.mdx | 7 +- .../reference/en/p5.sound/p5.OnsetDetect.mdx | 1 + .../reference/en/p5.sound/p5.Oscillator.mdx | 125 ++--- .../reference/en/p5.sound/p5.Panner3D.mdx | 62 +-- src/content/reference/en/p5.sound/p5.Part.mdx | 104 ++--- .../reference/en/p5.sound/p5.PeakDetect.mdx | 70 ++- .../reference/en/p5.sound/p5.Phrase.mdx | 44 +- .../reference/en/p5.sound/p5.PolySynth.mdx | 92 ++-- .../reference/en/p5.sound/p5.Pulse.mdx | 37 +- .../reference/en/p5.sound/p5.Reverb.mdx | 58 ++- .../reference/en/p5.sound/p5.SawOsc.mdx | 1 + .../reference/en/p5.sound/p5.Score.mdx | 28 +- .../reference/en/p5.sound/p5.SinOsc.mdx | 1 + .../reference/en/p5.sound/p5.SoundFile.mdx | 241 +--------- .../reference/en/p5.sound/p5.SoundLoop.mdx | 88 ++-- .../en/p5.sound/p5.SoundRecorder.mdx | 89 +++- .../reference/en/p5.sound/p5.SqrOsc.mdx | 1 + .../reference/en/p5.sound/p5.TriOsc.mdx | 1 + src/content/reference/en/p5/<.mdx | 34 ++ src/content/reference/en/p5/<=.mdx | 34 ++ src/content/reference/en/p5/===.mdx | 3 +- src/content/reference/en/p5/>.mdx | 35 ++ src/content/reference/en/p5/>=.mdx | 34 ++ src/content/reference/en/p5/ADD.mdx | 1 + src/content/reference/en/p5/ALT.mdx | 1 + src/content/reference/en/p5/ARROW.mdx | 1 + src/content/reference/en/p5/AUTO.mdx | 1 + src/content/reference/en/p5/AXES.mdx | 1 + src/content/reference/en/p5/BACKSPACE.mdx | 1 + src/content/reference/en/p5/BASELINE.mdx | 1 + src/content/reference/en/p5/BEVEL.mdx | 1 + src/content/reference/en/p5/BLEND.mdx | 1 + src/content/reference/en/p5/BLUR.mdx | 1 + src/content/reference/en/p5/BOLD.mdx | 1 + src/content/reference/en/p5/BOLDITALIC.mdx | 1 + src/content/reference/en/p5/BOTTOM.mdx | 1 + src/content/reference/en/p5/BURN.mdx | 1 + src/content/reference/en/p5/CENTER.mdx | 1 + src/content/reference/en/p5/CHAR.mdx | 1 + src/content/reference/en/p5/CHORD.mdx | 1 + src/content/reference/en/p5/CLAMP.mdx | 1 + src/content/reference/en/p5/CLOSE.mdx | 1 + src/content/reference/en/p5/CONTAIN.mdx | 1 + src/content/reference/en/p5/CONTROL.mdx | 1 + src/content/reference/en/p5/CORNER.mdx | 1 + src/content/reference/en/p5/CORNERS.mdx | 1 + src/content/reference/en/p5/COVER.mdx | 1 + src/content/reference/en/p5/CROSS.mdx | 1 + src/content/reference/en/p5/DARKEST.mdx | 1 + src/content/reference/en/p5/DEGREES.mdx | 1 + src/content/reference/en/p5/DELETE.mdx | 1 + src/content/reference/en/p5/DIFFERENCE.mdx | 1 + src/content/reference/en/p5/DILATE.mdx | 1 + src/content/reference/en/p5/DODGE.mdx | 1 + src/content/reference/en/p5/DOWN_ARROW.mdx | 1 + src/content/reference/en/p5/ENTER.mdx | 1 + src/content/reference/en/p5/ERODE.mdx | 1 + src/content/reference/en/p5/ESCAPE.mdx | 1 + src/content/reference/en/p5/EXCLUSION.mdx | 1 + src/content/reference/en/p5/FALLBACK.mdx | 1 + src/content/reference/en/p5/FLAT.mdx | 1 + src/content/reference/en/p5/FLOAT.mdx | 1 + src/content/reference/en/p5/GRAY.mdx | 1 + src/content/reference/en/p5/GRID.mdx | 1 + src/content/reference/en/p5/HALF_FLOAT.mdx | 1 + src/content/reference/en/p5/HALF_PI.mdx | 3 +- src/content/reference/en/p5/HAND.mdx | 1 + src/content/reference/en/p5/HARD_LIGHT.mdx | 1 + src/content/reference/en/p5/HSB.mdx | 1 + src/content/reference/en/p5/HSL.mdx | 1 + src/content/reference/en/p5/IMAGE.mdx | 1 + src/content/reference/en/p5/IMMEDIATE.mdx | 1 + src/content/reference/en/p5/INVERT.mdx | 1 + src/content/reference/en/p5/ITALIC.mdx | 1 + src/content/reference/en/p5/LABEL.mdx | 1 + src/content/reference/en/p5/LANDSCAPE.mdx | 1 + src/content/reference/en/p5/LEFT.mdx | 1 + src/content/reference/en/p5/LEFT_ARROW.mdx | 1 + src/content/reference/en/p5/LIGHTEST.mdx | 1 + src/content/reference/en/p5/LINEAR.mdx | 1 + src/content/reference/en/p5/LINES.mdx | 1 + src/content/reference/en/p5/LINE_LOOP.mdx | 1 + src/content/reference/en/p5/LINE_STRIP.mdx | 1 + src/content/reference/en/p5/MIRROR.mdx | 1 + src/content/reference/en/p5/MITER.mdx | 1 + src/content/reference/en/p5/MOVE.mdx | 1 + src/content/reference/en/p5/MULTIPLY.mdx | 1 + src/content/reference/en/p5/NEAREST.mdx | 1 + src/content/reference/en/p5/OPAQUE.mdx | 1 + src/content/reference/en/p5/OPEN.mdx | 1 + src/content/reference/en/p5/OPTION.mdx | 1 + src/content/reference/en/p5/OVERLAY.mdx | 1 + src/content/reference/en/p5/P2D.mdx | 1 + src/content/reference/en/p5/PI.mdx | 3 +- src/content/reference/en/p5/PIE.mdx | 1 + src/content/reference/en/p5/POINTS.mdx | 1 + src/content/reference/en/p5/PORTRAIT.mdx | 1 + src/content/reference/en/p5/POSTERIZE.mdx | 1 + src/content/reference/en/p5/PROJECT.mdx | 1 + src/content/reference/en/p5/QUADRATIC.mdx | 1 + src/content/reference/en/p5/QUADS.mdx | 1 + src/content/reference/en/p5/QUAD_STRIP.mdx | 1 + src/content/reference/en/p5/QUARTER_PI.mdx | 3 +- src/content/reference/en/p5/RADIANS.mdx | 1 + src/content/reference/en/p5/RADIUS.mdx | 1 + src/content/reference/en/p5/REMOVE.mdx | 3 +- src/content/reference/en/p5/REPEAT.mdx | 1 + src/content/reference/en/p5/REPLACE.mdx | 1 + src/content/reference/en/p5/RETURN.mdx | 3 +- src/content/reference/en/p5/RGB.mdx | 1 + src/content/reference/en/p5/RGBA.mdx | 1 + src/content/reference/en/p5/RIGHT.mdx | 1 + src/content/reference/en/p5/RIGHT_ARROW.mdx | 1 + src/content/reference/en/p5/ROUND.mdx | 1 + src/content/reference/en/p5/SCREEN.mdx | 1 + src/content/reference/en/p5/SHIFT.mdx | 1 + src/content/reference/en/p5/SOFT_LIGHT.mdx | 1 + src/content/reference/en/p5/SUBTRACT.mdx | 1 + src/content/reference/en/p5/TAB.mdx | 1 + src/content/reference/en/p5/TAU.mdx | 3 +- src/content/reference/en/p5/TESS.mdx | 1 + src/content/reference/en/p5/TEXT.mdx | 1 + src/content/reference/en/p5/TEXTURE.mdx | 3 +- src/content/reference/en/p5/THRESHOLD.mdx | 1 + src/content/reference/en/p5/TOP.mdx | 1 + src/content/reference/en/p5/TRIANGLES.mdx | 1 + src/content/reference/en/p5/TRIANGLE_FAN.mdx | 1 + .../reference/en/p5/TRIANGLE_STRIP.mdx | 1 + src/content/reference/en/p5/TWO_PI.mdx | 3 +- src/content/reference/en/p5/UNSIGNED_BYTE.mdx | 1 + src/content/reference/en/p5/UNSIGNED_INT.mdx | 1 + src/content/reference/en/p5/UP_ARROW.mdx | 1 + src/content/reference/en/p5/VERSION.mdx | 1 + src/content/reference/en/p5/WAIT.mdx | 1 + src/content/reference/en/p5/WEBGL.mdx | 1 + src/content/reference/en/p5/WEBGL2.mdx | 1 + src/content/reference/en/p5/WORD.mdx | 1 + src/content/reference/en/p5/abs.mdx | 1 + src/content/reference/en/p5/accelerationX.mdx | 1 + src/content/reference/en/p5/accelerationY.mdx | 1 + src/content/reference/en/p5/accelerationZ.mdx | 1 + src/content/reference/en/p5/acos.mdx | 1 + src/content/reference/en/p5/alpha.mdx | 1 + src/content/reference/en/p5/ambientLight.mdx | 3 +- .../reference/en/p5/ambientMaterial.mdx | 3 +- src/content/reference/en/p5/angleMode.mdx | 1 + src/content/reference/en/p5/append.mdx | 1 + src/content/reference/en/p5/applyMatrix.mdx | 13 +- src/content/reference/en/p5/arc.mdx | 1 + src/content/reference/en/p5/arrayCopy.mdx | 1 + src/content/reference/en/p5/asin.mdx | 1 + src/content/reference/en/p5/atan.mdx | 1 + src/content/reference/en/p5/atan2.mdx | 1 + src/content/reference/en/p5/background.mdx | 1 + src/content/reference/en/p5/beginClip.mdx | 7 +- src/content/reference/en/p5/beginContour.mdx | 3 +- src/content/reference/en/p5/beginGeometry.mdx | 3 +- src/content/reference/en/p5/beginShape.mdx | 25 +- src/content/reference/en/p5/bezier.mdx | 1 + src/content/reference/en/p5/bezierDetail.mdx | 3 +- src/content/reference/en/p5/bezierPoint.mdx | 3 +- src/content/reference/en/p5/bezierTangent.mdx | 11 +- src/content/reference/en/p5/bezierVertex.mdx | 15 +- src/content/reference/en/p5/blendMode.mdx | 7 +- src/content/reference/en/p5/blue.mdx | 1 + src/content/reference/en/p5/boolean.mdx | 1 + src/content/reference/en/p5/box.mdx | 1 + src/content/reference/en/p5/brightness.mdx | 1 + src/content/reference/en/p5/buildGeometry.mdx | 3 +- src/content/reference/en/p5/byte.mdx | 1 + src/content/reference/en/p5/camera.mdx | 70 +++ src/content/reference/en/p5/ceil.mdx | 1 + src/content/reference/en/p5/changed.mdx | 1 + src/content/reference/en/p5/circle.mdx | 1 + src/content/reference/en/p5/class.mdx | 3 +- src/content/reference/en/p5/clear.mdx | 1 + src/content/reference/en/p5/clearDepth.mdx | 7 +- src/content/reference/en/p5/clearStorage.mdx | 1 + src/content/reference/en/p5/clip.mdx | 7 +- src/content/reference/en/p5/color.mdx | 1 + src/content/reference/en/p5/colorMode.mdx | 1 + src/content/reference/en/p5/concat.mdx | 1 + src/content/reference/en/p5/cone.mdx | 1 + src/content/reference/en/p5/const.mdx | 3 +- src/content/reference/en/p5/constrain.mdx | 1 + src/content/reference/en/p5/copy.mdx | 1 + src/content/reference/en/p5/cos.mdx | 1 + src/content/reference/en/p5/createA.mdx | 1 + src/content/reference/en/p5/createAudio.mdx | 1 + src/content/reference/en/p5/createButton.mdx | 1 + src/content/reference/en/p5/createCamera.mdx | 3 +- src/content/reference/en/p5/createCanvas.mdx | 3 +- src/content/reference/en/p5/createCapture.mdx | 1 + .../reference/en/p5/createCheckbox.mdx | 1 + .../reference/en/p5/createColorPicker.mdx | 1 + .../reference/en/p5/createConvolver.mdx | 1 + src/content/reference/en/p5/createDiv.mdx | 1 + src/content/reference/en/p5/createElement.mdx | 1 + .../reference/en/p5/createFileInput.mdx | 1 + .../reference/en/p5/createFilterShader.mdx | 1 + .../reference/en/p5/createFramebuffer.mdx | 7 +- .../reference/en/p5/createGraphics.mdx | 3 +- src/content/reference/en/p5/createImage.mdx | 1 + src/content/reference/en/p5/createImg.mdx | 1 + src/content/reference/en/p5/createInput.mdx | 1 + .../reference/en/p5/createNumberDict.mdx | 1 + src/content/reference/en/p5/createP.mdx | 1 + src/content/reference/en/p5/createRadio.mdx | 1 + src/content/reference/en/p5/createSelect.mdx | 1 + src/content/reference/en/p5/createShader.mdx | 3 +- src/content/reference/en/p5/createSlider.mdx | 1 + src/content/reference/en/p5/createSpan.mdx | 1 + .../reference/en/p5/createStringDict.mdx | 1 + src/content/reference/en/p5/createVector.mdx | 1 + src/content/reference/en/p5/createVideo.mdx | 1 + src/content/reference/en/p5/createWriter.mdx | 1 + src/content/reference/en/p5/cursor.mdx | 1 + src/content/reference/en/p5/curve.mdx | 1 + src/content/reference/en/p5/curveDetail.mdx | 3 +- src/content/reference/en/p5/curvePoint.mdx | 1 + src/content/reference/en/p5/curveTangent.mdx | 3 +- .../reference/en/p5/curveTightness.mdx | 3 +- src/content/reference/en/p5/curveVertex.mdx | 3 +- src/content/reference/en/p5/cylinder.mdx | 1 + src/content/reference/en/p5/day.mdx | 1 + src/content/reference/en/p5/debugMode.mdx | 9 +- src/content/reference/en/p5/deltaTime.mdx | 1 + src/content/reference/en/p5/describe.mdx | 1 + .../reference/en/p5/describeElement.mdx | 1 + src/content/reference/en/p5/deviceMoved.mdx | 1 + .../reference/en/p5/deviceOrientation.mdx | 1 + src/content/reference/en/p5/deviceShaken.mdx | 1 + src/content/reference/en/p5/deviceTurned.mdx | 1 + .../reference/en/p5/directionalLight.mdx | 7 +- .../reference/en/p5/disableFriendlyErrors.mdx | 1 + .../reference/en/p5/displayDensity.mdx | 1 + src/content/reference/en/p5/displayHeight.mdx | 3 +- src/content/reference/en/p5/displayWidth.mdx | 3 +- src/content/reference/en/p5/dist.mdx | 1 + src/content/reference/en/p5/doubleClicked.mdx | 1 + src/content/reference/en/p5/draw.mdx | 3 +- .../reference/en/p5/drawingContext.mdx | 3 +- src/content/reference/en/p5/ellipse.mdx | 1 + src/content/reference/en/p5/ellipseMode.mdx | 1 + src/content/reference/en/p5/ellipsoid.mdx | 1 + .../reference/en/p5/emissiveMaterial.mdx | 3 +- src/content/reference/en/p5/endClip.mdx | 1 + src/content/reference/en/p5/endContour.mdx | 3 +- src/content/reference/en/p5/endGeometry.mdx | 1 + src/content/reference/en/p5/endShape.mdx | 3 +- src/content/reference/en/p5/erase.mdx | 1 + .../reference/en/p5/exitPointerLock.mdx | 1 + src/content/reference/en/p5/exp.mdx | 1 + src/content/reference/en/p5/fill.mdx | 1 + src/content/reference/en/p5/filter.mdx | 1 + src/content/reference/en/p5/floor.mdx | 1 + src/content/reference/en/p5/focused.mdx | 1 + src/content/reference/en/p5/for.mdx | 3 +- src/content/reference/en/p5/fract.mdx | 1 + src/content/reference/en/p5/frameCount.mdx | 1 + src/content/reference/en/p5/frameRate.mdx | 1 + src/content/reference/en/p5/freeGeometry.mdx | 1 + src/content/reference/en/p5/freqToMidi.mdx | 1 + src/content/reference/en/p5/frustum.mdx | 7 +- src/content/reference/en/p5/fullscreen.mdx | 1 + src/content/reference/en/p5/function.mdx | 3 +- src/content/reference/en/p5/get.mdx | 1 + .../reference/en/p5/getAudioContext.mdx | 1 + src/content/reference/en/p5/getItem.mdx | 1 + .../reference/en/p5/getOutputVolume.mdx | 1 + .../reference/en/p5/getTargetFrameRate.mdx | 1 + src/content/reference/en/p5/getURL.mdx | 1 + src/content/reference/en/p5/getURLParams.mdx | 3 +- src/content/reference/en/p5/getURLPath.mdx | 1 + src/content/reference/en/p5/green.mdx | 1 + src/content/reference/en/p5/gridOutput.mdx | 1 + src/content/reference/en/p5/height.mdx | 1 + src/content/reference/en/p5/hex.mdx | 1 + src/content/reference/en/p5/hour.mdx | 1 + src/content/reference/en/p5/httpDo.mdx | 1 + src/content/reference/en/p5/httpGet.mdx | 1 + src/content/reference/en/p5/httpPost.mdx | 1 + src/content/reference/en/p5/hue.mdx | 1 + src/content/reference/en/p5/if-else.mdx | 3 +- src/content/reference/en/p5/imageLight.mdx | 3 +- src/content/reference/en/p5/imageMode.mdx | 1 + src/content/reference/en/p5/input.mdx | 1 + src/content/reference/en/p5/int.mdx | 1 + src/content/reference/en/p5/isLooping.mdx | 7 +- src/content/reference/en/p5/join.mdx | 1 + src/content/reference/en/p5/key.mdx | 1 + src/content/reference/en/p5/keyCode.mdx | 1 + src/content/reference/en/p5/keyIsDown.mdx | 1 + src/content/reference/en/p5/keyIsPressed.mdx | 1 + src/content/reference/en/p5/keyPressed.mdx | 1 + src/content/reference/en/p5/keyReleased.mdx | 1 + src/content/reference/en/p5/keyTyped.mdx | 1 + src/content/reference/en/p5/lerp.mdx | 1 + src/content/reference/en/p5/lerpColor.mdx | 1 + src/content/reference/en/p5/let.mdx | 3 +- src/content/reference/en/p5/lightFalloff.mdx | 3 +- src/content/reference/en/p5/lightness.mdx | 1 + src/content/reference/en/p5/lights.mdx | 3 +- src/content/reference/en/p5/line.mdx | 1 + src/content/reference/en/p5/loadBytes.mdx | 1 + src/content/reference/en/p5/loadFont.mdx | 1 + src/content/reference/en/p5/loadImage.mdx | 1 + src/content/reference/en/p5/loadJSON.mdx | 1 + src/content/reference/en/p5/loadModel.mdx | 3 +- src/content/reference/en/p5/loadPixels.mdx | 1 + src/content/reference/en/p5/loadShader.mdx | 3 +- src/content/reference/en/p5/loadSound.mdx | 1 + src/content/reference/en/p5/loadStrings.mdx | 1 + src/content/reference/en/p5/loadTable.mdx | 1 + src/content/reference/en/p5/loadXML.mdx | 1 + src/content/reference/en/p5/log.mdx | 1 + src/content/reference/en/p5/loop.mdx | 3 +- src/content/reference/en/p5/mag.mdx | 1 + src/content/reference/en/p5/map.mdx | 1 + src/content/reference/en/p5/match.mdx | 1 + src/content/reference/en/p5/matchAll.mdx | 1 + src/content/reference/en/p5/max.mdx | 1 + src/content/reference/en/p5/metalness.mdx | 1 + src/content/reference/en/p5/midiToFreq.mdx | 1 + src/content/reference/en/p5/millis.mdx | 1 + src/content/reference/en/p5/min.mdx | 1 + src/content/reference/en/p5/minute.mdx | 1 + src/content/reference/en/p5/model.mdx | 3 +- src/content/reference/en/p5/month.mdx | 1 + src/content/reference/en/p5/mouseButton.mdx | 1 + src/content/reference/en/p5/mouseClicked.mdx | 1 + src/content/reference/en/p5/mouseDragged.mdx | 1 + .../reference/en/p5/mouseIsPressed.mdx | 1 + src/content/reference/en/p5/mouseMoved.mdx | 1 + src/content/reference/en/p5/mousePressed.mdx | 1 + src/content/reference/en/p5/mouseReleased.mdx | 1 + src/content/reference/en/p5/mouseWheel.mdx | 1 + src/content/reference/en/p5/mouseX.mdx | 1 + src/content/reference/en/p5/mouseY.mdx | 1 + src/content/reference/en/p5/movedX.mdx | 1 + src/content/reference/en/p5/movedY.mdx | 1 + src/content/reference/en/p5/nf.mdx | 1 + src/content/reference/en/p5/nfc.mdx | 1 + src/content/reference/en/p5/nfp.mdx | 1 + src/content/reference/en/p5/nfs.mdx | 1 + src/content/reference/en/p5/noCanvas.mdx | 3 +- src/content/reference/en/p5/noCursor.mdx | 1 + src/content/reference/en/p5/noDebugMode.mdx | 11 +- src/content/reference/en/p5/noErase.mdx | 1 + src/content/reference/en/p5/noFill.mdx | 1 + src/content/reference/en/p5/noLights.mdx | 7 +- src/content/reference/en/p5/noLoop.mdx | 7 +- src/content/reference/en/p5/noSmooth.mdx | 1 + src/content/reference/en/p5/noStroke.mdx | 1 + src/content/reference/en/p5/noTint.mdx | 1 + src/content/reference/en/p5/noise.mdx | 1 + src/content/reference/en/p5/noiseDetail.mdx | 1 + src/content/reference/en/p5/noiseSeed.mdx | 1 + src/content/reference/en/p5/norm.mdx | 1 + src/content/reference/en/p5/normal.mdx | 1 + .../reference/en/p5/normalMaterial.mdx | 3 +- src/content/reference/en/p5/number.mdx | 3 +- src/content/reference/en/p5/object.mdx | 3 +- src/content/reference/en/p5/orbitControl.mdx | 3 +- src/content/reference/en/p5/ortho.mdx | 7 +- src/content/reference/en/p5/outputVolume.mdx | 1 + src/content/reference/en/p5/p5.Camera.mdx | 3 +- src/content/reference/en/p5/p5.Color.mdx | 34 +- src/content/reference/en/p5/p5.Element.mdx | 426 ++---------------- src/content/reference/en/p5/p5.File.mdx | 113 +++-- src/content/reference/en/p5/p5.Font.mdx | 97 +--- .../reference/en/p5/p5.Framebuffer.mdx | 160 +------ src/content/reference/en/p5/p5.Geometry.mdx | 60 +-- src/content/reference/en/p5/p5.Graphics.mdx | 30 +- src/content/reference/en/p5/p5.Image.mdx | 382 +++------------- .../reference/en/p5/p5.MediaElement.mdx | 204 +-------- src/content/reference/en/p5/p5.NumberDict.mdx | 47 +- .../reference/en/p5/p5.PrintWriter.mdx | 1 + src/content/reference/en/p5/p5.Renderer.mdx | 1 + src/content/reference/en/p5/p5.Shader.mdx | 68 +-- src/content/reference/en/p5/p5.StringDict.mdx | 1 + src/content/reference/en/p5/p5.Table.mdx | 183 +------- src/content/reference/en/p5/p5.TableRow.mdx | 34 +- src/content/reference/en/p5/p5.TypedDict.mdx | 49 +- src/content/reference/en/p5/p5.Vector.mdx | 426 ++---------------- src/content/reference/en/p5/p5.XML.mdx | 163 ++----- src/content/reference/en/p5/p5.mdx | 1 + .../reference/en/p5/pAccelerationX.mdx | 1 + .../reference/en/p5/pAccelerationY.mdx | 1 + .../reference/en/p5/pAccelerationZ.mdx | 1 + src/content/reference/en/p5/pRotationX.mdx | 1 + src/content/reference/en/p5/pRotationY.mdx | 1 + src/content/reference/en/p5/pRotationZ.mdx | 1 + src/content/reference/en/p5/perspective.mdx | 3 +- src/content/reference/en/p5/pixelDensity.mdx | 1 + src/content/reference/en/p5/pixels.mdx | 1 + src/content/reference/en/p5/plane.mdx | 17 +- src/content/reference/en/p5/pmouseX.mdx | 1 + src/content/reference/en/p5/pmouseY.mdx | 1 + src/content/reference/en/p5/point.mdx | 1 + src/content/reference/en/p5/pointLight.mdx | 7 +- src/content/reference/en/p5/pop.mdx | 7 +- src/content/reference/en/p5/pow.mdx | 1 + src/content/reference/en/p5/preload.mdx | 3 +- src/content/reference/en/p5/print.mdx | 1 + src/content/reference/en/p5/push.mdx | 7 +- src/content/reference/en/p5/pwinMouseX.mdx | 1 + src/content/reference/en/p5/pwinMouseY.mdx | 1 + src/content/reference/en/p5/quad.mdx | 1 + .../reference/en/p5/quadraticVertex.mdx | 7 +- src/content/reference/en/p5/random.mdx | 1 + .../reference/en/p5/randomGaussian.mdx | 1 + src/content/reference/en/p5/randomSeed.mdx | 1 + src/content/reference/en/p5/rect.mdx | 1 + src/content/reference/en/p5/rectMode.mdx | 1 + src/content/reference/en/p5/red.mdx | 1 + src/content/reference/en/p5/redraw.mdx | 7 +- .../reference/en/p5/removeElements.mdx | 1 + src/content/reference/en/p5/removeItem.mdx | 1 + .../reference/en/p5/requestPointerLock.mdx | 1 + src/content/reference/en/p5/resetMatrix.mdx | 3 +- src/content/reference/en/p5/resetShader.mdx | 11 +- src/content/reference/en/p5/resizeCanvas.mdx | 3 +- src/content/reference/en/p5/reverse.mdx | 1 + src/content/reference/en/p5/rotate.mdx | 3 +- src/content/reference/en/p5/rotateX.mdx | 3 +- src/content/reference/en/p5/rotateY.mdx | 3 +- src/content/reference/en/p5/rotateZ.mdx | 3 +- src/content/reference/en/p5/rotationX.mdx | 1 + src/content/reference/en/p5/rotationY.mdx | 1 + src/content/reference/en/p5/rotationZ.mdx | 1 + src/content/reference/en/p5/sampleRate.mdx | 1 + src/content/reference/en/p5/saturation.mdx | 1 + src/content/reference/en/p5/save.mdx | 1 + src/content/reference/en/p5/saveCanvas.mdx | 1 + src/content/reference/en/p5/saveFrames.mdx | 1 + src/content/reference/en/p5/saveGif.mdx | 1 + src/content/reference/en/p5/saveJSON.mdx | 1 + src/content/reference/en/p5/saveSound.mdx | 1 + src/content/reference/en/p5/saveStrings.mdx | 1 + src/content/reference/en/p5/saveTable.mdx | 1 + src/content/reference/en/p5/scale.mdx | 7 +- src/content/reference/en/p5/second.mdx | 1 + src/content/reference/en/p5/select.mdx | 1 + src/content/reference/en/p5/selectAll.mdx | 1 + src/content/reference/en/p5/set.mdx | 1 + src/content/reference/en/p5/setAttributes.mdx | 3 +- src/content/reference/en/p5/setBPM.mdx | 1 + src/content/reference/en/p5/setCamera.mdx | 7 +- .../reference/en/p5/setMoveThreshold.mdx | 1 + .../reference/en/p5/setShakeThreshold.mdx | 1 + src/content/reference/en/p5/setup.mdx | 3 +- src/content/reference/en/p5/shader.mdx | 9 +- src/content/reference/en/p5/shearX.mdx | 3 +- src/content/reference/en/p5/shearY.mdx | 3 +- src/content/reference/en/p5/shininess.mdx | 3 +- src/content/reference/en/p5/shorten.mdx | 1 + src/content/reference/en/p5/shuffle.mdx | 1 + src/content/reference/en/p5/sin.mdx | 1 + src/content/reference/en/p5/smooth.mdx | 1 + src/content/reference/en/p5/sort.mdx | 1 + src/content/reference/en/p5/soundFormats.mdx | 1 + src/content/reference/en/p5/soundOut.mdx | 1 + src/content/reference/en/p5/specularColor.mdx | 7 +- .../reference/en/p5/specularMaterial.mdx | 3 +- src/content/reference/en/p5/sphere.mdx | 1 + src/content/reference/en/p5/splice.mdx | 1 + src/content/reference/en/p5/split.mdx | 1 + src/content/reference/en/p5/splitTokens.mdx | 1 + src/content/reference/en/p5/spotLight.mdx | 7 +- src/content/reference/en/p5/sq.mdx | 1 + src/content/reference/en/p5/sqrt.mdx | 1 + src/content/reference/en/p5/square.mdx | 1 + src/content/reference/en/p5/storeItem.mdx | 1 + src/content/reference/en/p5/str.mdx | 1 + src/content/reference/en/p5/string.mdx | 3 +- src/content/reference/en/p5/stroke.mdx | 1 + src/content/reference/en/p5/strokeCap.mdx | 1 + src/content/reference/en/p5/strokeJoin.mdx | 1 + src/content/reference/en/p5/strokeWeight.mdx | 1 + src/content/reference/en/p5/subset.mdx | 1 + src/content/reference/en/p5/tan.mdx | 1 + src/content/reference/en/p5/textAlign.mdx | 1 + src/content/reference/en/p5/textAscent.mdx | 1 + src/content/reference/en/p5/textDescent.mdx | 1 + src/content/reference/en/p5/textFont.mdx | 1 + src/content/reference/en/p5/textLeading.mdx | 1 + src/content/reference/en/p5/textOutput.mdx | 1 + src/content/reference/en/p5/textSize.mdx | 1 + src/content/reference/en/p5/textStyle.mdx | 1 + src/content/reference/en/p5/textWidth.mdx | 1 + src/content/reference/en/p5/textWrap.mdx | 1 + src/content/reference/en/p5/textureMode.mdx | 3 +- src/content/reference/en/p5/textureWrap.mdx | 3 +- src/content/reference/en/p5/tint.mdx | 1 + src/content/reference/en/p5/torus.mdx | 1 + src/content/reference/en/p5/touchEnded.mdx | 1 + src/content/reference/en/p5/touchMoved.mdx | 1 + src/content/reference/en/p5/touchStarted.mdx | 1 + src/content/reference/en/p5/touches.mdx | 1 + src/content/reference/en/p5/translate.mdx | 9 +- src/content/reference/en/p5/triangle.mdx | 1 + src/content/reference/en/p5/trim.mdx | 1 + src/content/reference/en/p5/turnAxis.mdx | 1 + src/content/reference/en/p5/unchar.mdx | 1 + src/content/reference/en/p5/unhex.mdx | 1 + src/content/reference/en/p5/updatePixels.mdx | 1 + .../reference/en/p5/userStartAudio.mdx | 1 + src/content/reference/en/p5/vertex.mdx | 13 +- src/content/reference/en/p5/webglVersion.mdx | 1 + src/content/reference/en/p5/while.mdx | 3 +- src/content/reference/en/p5/width.mdx | 1 + src/content/reference/en/p5/winMouseX.mdx | 1 + src/content/reference/en/p5/winMouseY.mdx | 1 + src/content/reference/en/p5/windowHeight.mdx | 3 +- src/content/reference/en/p5/windowResized.mdx | 3 +- src/content/reference/en/p5/windowWidth.mdx | 3 +- src/content/reference/en/p5/year.mdx | 1 + src/scripts/builders/reference.ts | 295 +++++------- src/scripts/parsers/reference.ts | 2 +- types/parsers.interface.ts | 12 +- 1003 files changed, 2617 insertions(+), 3935 deletions(-) create mode 100644 src/content/reference/en/p5/<.mdx create mode 100644 src/content/reference/en/p5/<=.mdx create mode 100644 src/content/reference/en/p5/>.mdx create mode 100644 src/content/reference/en/p5/>=.mdx diff --git a/src/content/reference/en/JSON/stringify.mdx b/src/content/reference/en/JSON/stringify.mdx index f8e9cc899c..8aecbd6b7f 100644 --- a/src/content/reference/en/JSON/stringify.mdx +++ b/src/content/reference/en/JSON/stringify.mdx @@ -10,6 +10,7 @@ description: > The JSON.stringify() method converts a JavaScript object or value to a JSON string.

+isConstructor: false line: 490 params: - name: object @@ -17,6 +18,7 @@ params:

:Javascript object that you would like to convert to JSON

type: Object itemtype: method +alt: This example does not render anything class: JSON example: - |- @@ -29,7 +31,6 @@ example: console.log(typeof myObjectAsString); // prints 'string' to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/console/log.mdx b/src/content/reference/en/console/log.mdx index 7d6caaca7f..25c500a60c 100644 --- a/src/content/reference/en/console/log.mdx +++ b/src/content/reference/en/console/log.mdx @@ -36,6 +36,7 @@ description: > values), or it may be any one or more JavaScript objects.

+isConstructor: false line: 512 params: - name: message @@ -43,6 +44,7 @@ params:

:Message that you would like to print to the console

type: String|Expression|Object itemtype: method +alt: This example does not render anything class: console example: - |- @@ -54,7 +56,6 @@ example: console.log(myNum + 12); // prints 17 to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5.Amplitude/getLevel.mdx b/src/content/reference/en/p5.Amplitude/getLevel.mdx index 9f7ffaca52..db3c157700 100644 --- a/src/content/reference/en/p5.Amplitude/getLevel.mdx +++ b/src/content/reference/en/p5.Amplitude/getLevel.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Returns a single Amplitude reading at the moment it is called. For continuous readings, run in the draw loop.

+isConstructor: false line: 3209 params: - name: channel diff --git a/src/content/reference/en/p5.Amplitude/setInput.mdx b/src/content/reference/en/p5.Amplitude/setInput.mdx index 807dfe53eb..0e9cb003cc 100644 --- a/src/content/reference/en/p5.Amplitude/setInput.mdx +++ b/src/content/reference/en/p5.Amplitude/setInput.mdx @@ -6,6 +6,7 @@ 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).

+isConstructor: false line: 3117 params: - name: snd diff --git a/src/content/reference/en/p5.Amplitude/smooth.mdx b/src/content/reference/en/p5.Amplitude/smooth.mdx index dd21701ce3..2d9e9f546e 100644 --- a/src/content/reference/en/p5.Amplitude/smooth.mdx +++ b/src/content/reference/en/p5.Amplitude/smooth.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Smooth Amplitude analysis by averaging with the last analysis frame. Off by default.

+isConstructor: false line: 3293 params: - name: set diff --git a/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx b/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx index 144b30a1c1..c53676dd04 100644 --- a/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx +++ b/src/content/reference/en/p5.Amplitude/toggleNormalize.mdx @@ -12,6 +12,7 @@ description: | 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.

+isConstructor: false line: 3264 params: - name: boolean diff --git a/src/content/reference/en/p5.AudioIn/amp.mdx b/src/content/reference/en/p5.AudioIn/amp.mdx index 28c3429c10..3d5df6ecc4 100644 --- a/src/content/reference/en/p5.AudioIn/amp.mdx +++ b/src/content/reference/en/p5.AudioIn/amp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set amplitude (volume) of a mic input between 0 and 1.0.

+isConstructor: false line: 6257 params: - name: vol diff --git a/src/content/reference/en/p5.AudioIn/amplitude.mdx b/src/content/reference/en/p5.AudioIn/amplitude.mdx index 4779dad1cd..9815c9ac84 100644 --- a/src/content/reference/en/p5.AudioIn/amplitude.mdx +++ b/src/content/reference/en/p5.AudioIn/amplitude.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Input amplitude, connect to it by default but not to master out

+isConstructor: false line: 6098 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/connect.mdx b/src/content/reference/en/p5.AudioIn/connect.mdx index 71ecab68ef..0278824587 100644 --- a/src/content/reference/en/p5.AudioIn/connect.mdx +++ b/src/content/reference/en/p5.AudioIn/connect.mdx @@ -6,6 +6,7 @@ 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).

+isConstructor: false line: 6191 params: - name: unit diff --git a/src/content/reference/en/p5.AudioIn/currentSource.mdx b/src/content/reference/en/p5.AudioIn/currentSource.mdx index 1cf170d65a..437a91a147 100644 --- a/src/content/reference/en/p5.AudioIn/currentSource.mdx +++ b/src/content/reference/en/p5.AudioIn/currentSource.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 6085 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/disconnect.mdx b/src/content/reference/en/p5.AudioIn/disconnect.mdx index 63f11b4745..cda1dbf886 100644 --- a/src/content/reference/en/p5.AudioIn/disconnect.mdx +++ b/src/content/reference/en/p5.AudioIn/disconnect.mdx @@ -7,6 +7,7 @@ description: |

Disconnect the AudioIn from all audio units. For example, if connect() had been called, disconnect() will stop sending signal to your speakers.

+isConstructor: false line: 6216 itemtype: method class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/enabled.mdx b/src/content/reference/en/p5.AudioIn/enabled.mdx index 2418e6e853..92ccbbd4b9 100644 --- a/src/content/reference/en/p5.AudioIn/enabled.mdx +++ b/src/content/reference/en/p5.AudioIn/enabled.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 6090 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/getLevel.mdx b/src/content/reference/en/p5.AudioIn/getLevel.mdx index cabec08dd9..7a95cabb64 100644 --- a/src/content/reference/en/p5.AudioIn/getLevel.mdx +++ b/src/content/reference/en/p5.AudioIn/getLevel.mdx @@ -9,6 +9,7 @@ description: | 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().

+isConstructor: false line: 6234 params: - name: smoothing diff --git a/src/content/reference/en/p5.AudioIn/getSources.mdx b/src/content/reference/en/p5.AudioIn/getSources.mdx index e1196b848a..a93a45a832 100644 --- a/src/content/reference/en/p5.AudioIn/getSources.mdx +++ b/src/content/reference/en/p5.AudioIn/getSources.mdx @@ -9,6 +9,7 @@ description: | en-US/docs/Web/API/MediaDevices/enumerateDevices" target="_blank"> MediaDevices.enumerateDevices() - Web APIs | MDN and it returns a Promise.

+isConstructor: false line: 6280 params: - name: successCallback diff --git a/src/content/reference/en/p5.AudioIn/input.mdx b/src/content/reference/en/p5.AudioIn/input.mdx index 13e58ce643..83a149a9fa 100644 --- a/src/content/reference/en/p5.AudioIn/input.mdx +++ b/src/content/reference/en/p5.AudioIn/input.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 6066 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/mediaStream.mdx b/src/content/reference/en/p5.AudioIn/mediaStream.mdx index ccc42fcd97..f140b38544 100644 --- a/src/content/reference/en/p5.AudioIn/mediaStream.mdx +++ b/src/content/reference/en/p5.AudioIn/mediaStream.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 6080 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/output.mdx b/src/content/reference/en/p5.AudioIn/output.mdx index 8676f6fa99..2ea6c6b962 100644 --- a/src/content/reference/en/p5.AudioIn/output.mdx +++ b/src/content/reference/en/p5.AudioIn/output.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 6070 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/setSource.mdx b/src/content/reference/en/p5.AudioIn/setSource.mdx index e85f32e6eb..9f8e5209ec 100644 --- a/src/content/reference/en/p5.AudioIn/setSource.mdx +++ b/src/content/reference/en/p5.AudioIn/setSource.mdx @@ -10,6 +10,7 @@ description: | navigator.mediaDevices.enumerateDevices()

+isConstructor: false line: 6340 params: - name: num diff --git a/src/content/reference/en/p5.AudioIn/start.mdx b/src/content/reference/en/p5.AudioIn/start.mdx index 154728c849..67eaddd3a2 100644 --- a/src/content/reference/en/p5.AudioIn/start.mdx +++ b/src/content/reference/en/p5.AudioIn/start.mdx @@ -12,6 +12,7 @@ description: | 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.

+isConstructor: false line: 6114 params: - name: successCallback diff --git a/src/content/reference/en/p5.AudioIn/stop.mdx b/src/content/reference/en/p5.AudioIn/stop.mdx index 05c246826e..e5114a99e1 100644 --- a/src/content/reference/en/p5.AudioIn/stop.mdx +++ b/src/content/reference/en/p5.AudioIn/stop.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 6171 itemtype: method class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioIn/stream.mdx b/src/content/reference/en/p5.AudioIn/stream.mdx index f6ea8ea58a..a99480a5ef 100644 --- a/src/content/reference/en/p5.AudioIn/stream.mdx +++ b/src/content/reference/en/p5.AudioIn/stream.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 6075 itemtype: property class: p5.AudioIn diff --git a/src/content/reference/en/p5.AudioVoice/connect.mdx b/src/content/reference/en/p5.AudioVoice/connect.mdx index 6ce743ac6a..99a130a027 100644 --- a/src/content/reference/en/p5.AudioVoice/connect.mdx +++ b/src/content/reference/en/p5.AudioVoice/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect to p5 objects or Web Audio Nodes

+isConstructor: false line: 11181 params: - name: unit diff --git a/src/content/reference/en/p5.AudioVoice/disconnect.mdx b/src/content/reference/en/p5.AudioVoice/disconnect.mdx index 65c2631b77..f74a1a47a8 100644 --- a/src/content/reference/en/p5.AudioVoice/disconnect.mdx +++ b/src/content/reference/en/p5.AudioVoice/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect from soundOut

+isConstructor: false line: 11194 itemtype: method class: p5.AudioVoice diff --git a/src/content/reference/en/p5.Camera/camera.mdx b/src/content/reference/en/p5.Camera/camera.mdx index 1efeb918f7..893e9830a1 100644 --- a/src/content/reference/en/p5.Camera/camera.mdx +++ b/src/content/reference/en/p5.Camera/camera.mdx @@ -8,8 +8,12 @@ description: | Accepts the same parameters as the global camera(). More information on this function can be found there.

+isConstructor: false line: 1250 itemtype: method +alt: |- + An interactive example of a red cube with 3 sliders for moving it across x, y, + z axis and 3 sliders for shifting its center. class: p5.Camera example: - |- @@ -85,9 +89,6 @@ example: } -alt: |- - An interactive example of a red cube with 3 sliders for moving it across x, y, - z axis and 3 sliders for shifting its center. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/centerX.mdx b/src/content/reference/en/p5.Camera/centerX.mdx index e1e4128f6a..86aa02ac5a 100644 --- a/src/content/reference/en/p5.Camera/centerX.mdx +++ b/src/content/reference/en/p5.Camera/centerX.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

x coordinate representing center of the sketch

+isConstructor: false line: 580 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -29,7 +31,6 @@ example: box(10); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/centerY.mdx b/src/content/reference/en/p5.Camera/centerY.mdx index 1b51c88411..188a1a789f 100644 --- a/src/content/reference/en/p5.Camera/centerY.mdx +++ b/src/content/reference/en/p5.Camera/centerY.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

y coordinate representing center of the sketch

+isConstructor: false line: 609 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -29,7 +31,6 @@ example: box(10); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/centerZ.mdx b/src/content/reference/en/p5.Camera/centerZ.mdx index 87f8369130..5ae7b2bff4 100644 --- a/src/content/reference/en/p5.Camera/centerZ.mdx +++ b/src/content/reference/en/p5.Camera/centerZ.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

z coordinate representing center of the sketch

+isConstructor: false line: 638 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -29,7 +31,6 @@ example: box(10); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/eyeX.mdx b/src/content/reference/en/p5.Camera/eyeX.mdx index e6e8436f34..e47be4c8ed 100644 --- a/src/content/reference/en/p5.Camera/eyeX.mdx +++ b/src/content/reference/en/p5.Camera/eyeX.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

camera position value on x axis. default value is 0

+isConstructor: false line: 495 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -29,7 +31,6 @@ example: div.html('eyeX = ' + cam.eyeX); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/eyeY.mdx b/src/content/reference/en/p5.Camera/eyeY.mdx index c7ea199454..e659f79e8f 100644 --- a/src/content/reference/en/p5.Camera/eyeY.mdx +++ b/src/content/reference/en/p5.Camera/eyeY.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

camera position value on y axis. default value is 0

+isConstructor: false line: 524 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -28,7 +30,6 @@ example: div.html('eyeY = ' + cam.eyeY); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/eyeZ.mdx b/src/content/reference/en/p5.Camera/eyeZ.mdx index d28cb86e31..8aa3db1712 100644 --- a/src/content/reference/en/p5.Camera/eyeZ.mdx +++ b/src/content/reference/en/p5.Camera/eyeZ.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

camera position value on z axis. default value is 800

+isConstructor: false line: 552 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -28,7 +30,6 @@ example: div.html('eyeZ = ' + cam.eyeZ); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/frustum.mdx b/src/content/reference/en/p5.Camera/frustum.mdx index 4052ab88fe..e714bfccbb 100644 --- a/src/content/reference/en/p5.Camera/frustum.mdx +++ b/src/content/reference/en/p5.Camera/frustum.mdx @@ -8,8 +8,12 @@ description: | Accepts the same parameters as the global frustum(). More information on this function can be found there.

+isConstructor: false line: 930 itemtype: method +alt: >- + two 3D boxes move back and forth along same plane, rotating as mouse is + dragged. class: p5.Camera example: - |- @@ -46,9 +50,6 @@ example: } -alt: >- - two 3D boxes move back and forth along same plane, rotating as mouse is - dragged. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/lookAt.mdx b/src/content/reference/en/p5.Camera/lookAt.mdx index 3763c4e0d6..47b8a63d2a 100644 --- a/src/content/reference/en/p5.Camera/lookAt.mdx +++ b/src/content/reference/en/p5.Camera/lookAt.mdx @@ -5,6 +5,7 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

Reorients the camera to look at a position in world space.

+isConstructor: false line: 1181 params: - name: x @@ -20,6 +21,9 @@ params:

z position of a point in world space

type: Number itemtype: method +alt: |- + camera view of rotating 3D cubes changes to look at a new random + point every second . class: p5.Camera example: - |- @@ -62,9 +66,6 @@ example: } -alt: |- - camera view of rotating 3D cubes changes to look at a new random - point every second . chainable: false --- diff --git a/src/content/reference/en/p5.Camera/move.mdx b/src/content/reference/en/p5.Camera/move.mdx index e249ea964c..d4d45656b2 100644 --- a/src/content/reference/en/p5.Camera/move.mdx +++ b/src/content/reference/en/p5.Camera/move.mdx @@ -6,6 +6,7 @@ file: src/webgl/p5.Camera.js description: >

Move camera along its local axes while maintaining current camera orientation.

+isConstructor: false line: 1398 params: - name: x @@ -21,6 +22,9 @@ params:

amount to move along camera's forward-backward axis

type: Number itemtype: method +alt: |- + camera view moves along a series of 3D boxes, maintaining the same + orientation throughout the move class: p5.Camera example: - |- @@ -65,9 +69,6 @@ example: } -alt: |- - camera view moves along a series of 3D boxes, maintaining the same - orientation throughout the move chainable: false --- diff --git a/src/content/reference/en/p5.Camera/ortho.mdx b/src/content/reference/en/p5.Camera/ortho.mdx index 444c2e4d72..3de51b9c2f 100644 --- a/src/content/reference/en/p5.Camera/ortho.mdx +++ b/src/content/reference/en/p5.Camera/ortho.mdx @@ -8,8 +8,12 @@ description: | Accepts the same parameters as the global ortho(). More information on this function can be found there.

+isConstructor: false line: 846 itemtype: method +alt: >- + two 3D boxes move back and forth along same plane, rotating as mouse is + dragged. class: p5.Camera example: - |- @@ -47,9 +51,6 @@ example: } -alt: >- - two 3D boxes move back and forth along same plane, rotating as mouse is - dragged. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/pan.mdx b/src/content/reference/en/p5.Camera/pan.mdx index 055222b044..9d2eb44c05 100644 --- a/src/content/reference/en/p5.Camera/pan.mdx +++ b/src/content/reference/en/p5.Camera/pan.mdx @@ -5,6 +5,7 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

Panning rotates the camera view to the left and right.

+isConstructor: false line: 1061 params: - name: angle @@ -14,6 +15,7 @@ params: Greater than 0 values rotate counterclockwise (to the left).

type: Number itemtype: method +alt: camera view pans left and right across a series of rotating 3D boxes. class: p5.Camera example: - |- @@ -62,7 +64,6 @@ example: } -alt: camera view pans left and right across a series of rotating 3D boxes. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/perspective.mdx b/src/content/reference/en/p5.Camera/perspective.mdx index 3011034fdf..4898bfe5df 100644 --- a/src/content/reference/en/p5.Camera/perspective.mdx +++ b/src/content/reference/en/p5.Camera/perspective.mdx @@ -8,8 +8,10 @@ description: | Accepts the same parameters as the global perspective(). More information on this function can be found there.

+isConstructor: false line: 743 itemtype: method +alt: 'two colored 3D boxes move back and forth, rotating as mouse is dragged.' class: p5.Camera example: - |- @@ -49,7 +51,6 @@ example: } -alt: 'two colored 3D boxes move back and forth, rotating as mouse is dragged.' chainable: false --- diff --git a/src/content/reference/en/p5.Camera/set.mdx b/src/content/reference/en/p5.Camera/set.mdx index 789d2b1ed4..682a5b041d 100644 --- a/src/content/reference/en/p5.Camera/set.mdx +++ b/src/content/reference/en/p5.Camera/set.mdx @@ -7,6 +7,7 @@ description: |

Copies information about the argument camera's view and projection to the target camera. If the target camera is active, it will be reflected on the screen.

+isConstructor: false line: 1536 params: - name: cam @@ -14,6 +15,12 @@ params:

source camera

type: p5.Camera itemtype: method +alt: |- + Prepare two cameras. One is the camera that sets the initial state, + and the other is the camera that moves with interaction. + Draw a plane and a box on top of it, operate the camera using orbitControl(). + Double-click to set the camera in the initial state and return to + the initial state. class: p5.Camera example: - |- @@ -53,12 +60,6 @@ example: } -alt: |- - Prepare two cameras. One is the camera that sets the initial state, - and the other is the camera that moves with interaction. - Draw a plane and a box on top of it, operate the camera using orbitControl(). - Double-click to set the camera in the initial state and return to - the initial state. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/setPosition.mdx b/src/content/reference/en/p5.Camera/setPosition.mdx index 01d497f5dc..794f4b3c9a 100644 --- a/src/content/reference/en/p5.Camera/setPosition.mdx +++ b/src/content/reference/en/p5.Camera/setPosition.mdx @@ -6,6 +6,7 @@ file: src/webgl/p5.Camera.js description: |

Set camera position in world-space while maintaining current camera orientation.

+isConstructor: false line: 1472 params: - name: x @@ -21,6 +22,7 @@ params:

z position of a point in world space

type: Number itemtype: method +alt: 'camera position changes as the user presses keys, altering view of a 3D box' class: p5.Camera example: - |- @@ -59,7 +61,6 @@ example: } -alt: 'camera position changes as the user presses keys, altering view of a 3D box' chainable: false --- diff --git a/src/content/reference/en/p5.Camera/slerp.mdx b/src/content/reference/en/p5.Camera/slerp.mdx index 82f506e739..fb4286864e 100644 --- a/src/content/reference/en/p5.Camera/slerp.mdx +++ b/src/content/reference/en/p5.Camera/slerp.mdx @@ -32,6 +32,7 @@ description: > equal to each other. For example, when it is changed by orbitControl().

+isConstructor: false line: 1609 params: - name: cam0 @@ -47,6 +48,13 @@ params:

amount to use for interpolation during slerp

type: Number itemtype: method +alt: >- + There is a camera, drawing a cube. The camera can be moved freely with + + orbitControl(). Double-click to smoothly return the camera to its initial + state. + + The camera cannot be moved during that time. class: p5.Camera example: - |- @@ -143,13 +151,6 @@ example: } -alt: >- - There is a camera, drawing a cube. The camera can be moved freely with - - orbitControl(). Double-click to smoothly return the camera to its initial - state. - - The camera cannot be moved during that time. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/tilt.mdx b/src/content/reference/en/p5.Camera/tilt.mdx index 042441c034..a507f45e9b 100644 --- a/src/content/reference/en/p5.Camera/tilt.mdx +++ b/src/content/reference/en/p5.Camera/tilt.mdx @@ -5,6 +5,7 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

Tilting rotates the camera view up and down.

+isConstructor: false line: 1121 params: - name: angle @@ -14,6 +15,7 @@ params: Greater than 0 values rotate counterclockwise (to the left).

type: Number itemtype: method +alt: camera view tilts up and down across a series of rotating 3D boxes. class: p5.Camera example: - |- @@ -62,7 +64,6 @@ example: } -alt: camera view tilts up and down across a series of rotating 3D boxes. chainable: false --- diff --git a/src/content/reference/en/p5.Camera/upX.mdx b/src/content/reference/en/p5.Camera/upX.mdx index 109624c9b1..545a5e2c97 100644 --- a/src/content/reference/en/p5.Camera/upX.mdx +++ b/src/content/reference/en/p5.Camera/upX.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

x component of direction 'up' from camera

+isConstructor: false line: 667 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -24,7 +26,6 @@ example: describe('An example showing the use of camera object properties'); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/upY.mdx b/src/content/reference/en/p5.Camera/upY.mdx index 27bcee4e60..97c6de2959 100644 --- a/src/content/reference/en/p5.Camera/upY.mdx +++ b/src/content/reference/en/p5.Camera/upY.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

y component of direction 'up' from camera

+isConstructor: false line: 691 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -24,7 +26,6 @@ example: describe('An example showing the use of camera object properties'); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Camera/upZ.mdx b/src/content/reference/en/p5.Camera/upZ.mdx index b9c66b1b8e..2ebe1d1cb9 100644 --- a/src/content/reference/en/p5.Camera/upZ.mdx +++ b/src/content/reference/en/p5.Camera/upZ.mdx @@ -5,8 +5,10 @@ submodule: Camera file: src/webgl/p5.Camera.js description: |

z component of direction 'up' from camera

+isConstructor: false line: 715 itemtype: property +alt: An example showing the use of camera object properties class: p5.Camera example: - |- @@ -24,7 +26,6 @@ example: describe('An example showing the use of camera object properties'); } -alt: An example showing the use of camera object properties chainable: false --- diff --git a/src/content/reference/en/p5.Color/setAlpha.mdx b/src/content/reference/en/p5.Color/setAlpha.mdx index e51009a974..32307103c6 100644 --- a/src/content/reference/en/p5.Color/setAlpha.mdx +++ b/src/content/reference/en/p5.Color/setAlpha.mdx @@ -7,6 +7,7 @@ description: |

Sets the alpha (transparency) value of a color. The range depends on the colorMode(). In the default RGB mode it's between 0 and 255.

+isConstructor: false line: 653 params: - name: alpha diff --git a/src/content/reference/en/p5.Color/setBlue.mdx b/src/content/reference/en/p5.Color/setBlue.mdx index b85d91b707..ea7349eeba 100644 --- a/src/content/reference/en/p5.Color/setBlue.mdx +++ b/src/content/reference/en/p5.Color/setBlue.mdx @@ -7,6 +7,7 @@ description: |

Sets the blue component of a color. The range depends on the colorMode(). In the default RGB mode it's between 0 and 255.

+isConstructor: false line: 623 params: - name: blue diff --git a/src/content/reference/en/p5.Color/setGreen.mdx b/src/content/reference/en/p5.Color/setGreen.mdx index 09aa8cabd7..4084614b0d 100644 --- a/src/content/reference/en/p5.Color/setGreen.mdx +++ b/src/content/reference/en/p5.Color/setGreen.mdx @@ -7,6 +7,7 @@ description: |

Sets the green component of a color. The range depends on the colorMode(). In the default RGB mode it's between 0 and 255.

+isConstructor: false line: 593 params: - name: green diff --git a/src/content/reference/en/p5.Color/setRed.mdx b/src/content/reference/en/p5.Color/setRed.mdx index c7d165a725..4fd3b9f1b2 100644 --- a/src/content/reference/en/p5.Color/setRed.mdx +++ b/src/content/reference/en/p5.Color/setRed.mdx @@ -7,6 +7,7 @@ description: |

Sets the red component of a color. The range depends on the colorMode(). In the default RGB mode it's between 0 and 255.

+isConstructor: false line: 563 params: - name: red diff --git a/src/content/reference/en/p5.Color/toString.mdx b/src/content/reference/en/p5.Color/toString.mdx index 91efbacf46..b46ba09fd0 100644 --- a/src/content/reference/en/p5.Color/toString.mdx +++ b/src/content/reference/en/p5.Color/toString.mdx @@ -6,6 +6,7 @@ file: src/color/p5.Color.js description: |

Returns the color formatted as a string. Doing so can be useful for debugging, or for using p5.js with other libraries.

+isConstructor: false line: 360 params: - name: format diff --git a/src/content/reference/en/p5.Compressor/attack.mdx b/src/content/reference/en/p5.Compressor/attack.mdx index cbef7932c0..50428561a9 100644 --- a/src/content/reference/en/p5.Compressor/attack.mdx +++ b/src/content/reference/en/p5.Compressor/attack.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get current attack or set value w/ time ramp

+isConstructor: false line: 10152 params: - name: attack diff --git a/src/content/reference/en/p5.Compressor/compressor.mdx b/src/content/reference/en/p5.Compressor/compressor.mdx index 90a23cf938..5a689cdea0 100644 --- a/src/content/reference/en/p5.Compressor/compressor.mdx +++ b/src/content/reference/en/p5.Compressor/compressor.mdx @@ -8,6 +8,7 @@ description: > href="https://www.w3.org/TR/webaudio/#the-dynamicscompressornode-interface" target="_blank" title="W3 spec for Dynamics Compressor Node">Web Audio Dynamics Compressor Node

+isConstructor: false line: 10068 itemtype: property class: p5.Compressor diff --git a/src/content/reference/en/p5.Compressor/knee.mdx b/src/content/reference/en/p5.Compressor/knee.mdx index 4393efb41d..22d915ac8f 100644 --- a/src/content/reference/en/p5.Compressor/knee.mdx +++ b/src/content/reference/en/p5.Compressor/knee.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get current knee or set value w/ time ramp

+isConstructor: false line: 10178 params: - name: knee diff --git a/src/content/reference/en/p5.Compressor/process.mdx b/src/content/reference/en/p5.Compressor/process.mdx index c86e599272..81f9ec3854 100644 --- a/src/content/reference/en/p5.Compressor/process.mdx +++ b/src/content/reference/en/p5.Compressor/process.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Performs the same function as .connect, but also accepts optional parameters to set compressor's audioParams

+isConstructor: false line: 10084 params: - name: src diff --git a/src/content/reference/en/p5.Compressor/ratio.mdx b/src/content/reference/en/p5.Compressor/ratio.mdx index 505bcda9de..bf1164f00c 100644 --- a/src/content/reference/en/p5.Compressor/ratio.mdx +++ b/src/content/reference/en/p5.Compressor/ratio.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get current ratio or set value w/ time ramp

+isConstructor: false line: 10204 params: - name: ratio diff --git a/src/content/reference/en/p5.Compressor/reduction.mdx b/src/content/reference/en/p5.Compressor/reduction.mdx index 1d38f63fbe..8566371f2a 100644 --- a/src/content/reference/en/p5.Compressor/reduction.mdx +++ b/src/content/reference/en/p5.Compressor/reduction.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Return the current reduction value

+isConstructor: false line: 10277 itemtype: method class: p5.Compressor diff --git a/src/content/reference/en/p5.Compressor/release.mdx b/src/content/reference/en/p5.Compressor/release.mdx index c3591f2e25..a7c8850f3d 100644 --- a/src/content/reference/en/p5.Compressor/release.mdx +++ b/src/content/reference/en/p5.Compressor/release.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get current release or set value w/ time ramp

+isConstructor: false line: 10252 params: - name: release diff --git a/src/content/reference/en/p5.Compressor/set.mdx b/src/content/reference/en/p5.Compressor/set.mdx index ee69a06d79..9aa0b52d75 100644 --- a/src/content/reference/en/p5.Compressor/set.mdx +++ b/src/content/reference/en/p5.Compressor/set.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the paramters of a compressor.

+isConstructor: false line: 10112 params: - name: attack diff --git a/src/content/reference/en/p5.Compressor/threshold.mdx b/src/content/reference/en/p5.Compressor/threshold.mdx index 16f25dbd8d..e88a594364 100644 --- a/src/content/reference/en/p5.Compressor/threshold.mdx +++ b/src/content/reference/en/p5.Compressor/threshold.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get current threshold or set value w/ time ramp

+isConstructor: false line: 10228 params: - name: threshold diff --git a/src/content/reference/en/p5.Convolver/addImpulse.mdx b/src/content/reference/en/p5.Convolver/addImpulse.mdx index efbd2368f1..5133aac209 100644 --- a/src/content/reference/en/p5.Convolver/addImpulse.mdx +++ b/src/content/reference/en/p5.Convolver/addImpulse.mdx @@ -8,6 +8,7 @@ description: | The impulse is added to the .impulses array. Previous impulses can be accessed with the .toggleImpulse(id) method.

+isConstructor: false line: 8786 params: - name: path diff --git a/src/content/reference/en/p5.Convolver/convolverNode.mdx b/src/content/reference/en/p5.Convolver/convolverNode.mdx index a886b642a2..99bf1f04cd 100644 --- a/src/content/reference/en/p5.Convolver/convolverNode.mdx +++ b/src/content/reference/en/p5.Convolver/convolverNode.mdx @@ -7,6 +7,7 @@ description: |

Internally, the p5.Convolver uses the a Web Audio Convolver Node.

+isConstructor: false line: 8621 itemtype: property class: p5.Convolver diff --git a/src/content/reference/en/p5.Convolver/impulses.mdx b/src/content/reference/en/p5.Convolver/impulses.mdx index 5bdea9ed69..f375a27f2b 100644 --- a/src/content/reference/en/p5.Convolver/impulses.mdx +++ b/src/content/reference/en/p5.Convolver/impulses.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 8645 itemtype: property class: p5.Convolver diff --git a/src/content/reference/en/p5.Convolver/process.mdx b/src/content/reference/en/p5.Convolver/process.mdx index ac30c50d6e..8156ce4437 100644 --- a/src/content/reference/en/p5.Convolver/process.mdx +++ b/src/content/reference/en/p5.Convolver/process.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect a source to the convolver.

+isConstructor: false line: 8737 params: - name: src diff --git a/src/content/reference/en/p5.Convolver/resetImpulse.mdx b/src/content/reference/en/p5.Convolver/resetImpulse.mdx index a37a511fe5..700d83d734 100644 --- a/src/content/reference/en/p5.Convolver/resetImpulse.mdx +++ b/src/content/reference/en/p5.Convolver/resetImpulse.mdx @@ -7,6 +7,7 @@ description: |

Similar to .addImpulse, except that the .impulses Array is reset to save memory. A new .impulses array is created with this impulse as the only item.

+isConstructor: false line: 8808 params: - name: path diff --git a/src/content/reference/en/p5.Convolver/toggleImpulse.mdx b/src/content/reference/en/p5.Convolver/toggleImpulse.mdx index 5f20006ffc..fee880e1eb 100644 --- a/src/content/reference/en/p5.Convolver/toggleImpulse.mdx +++ b/src/content/reference/en/p5.Convolver/toggleImpulse.mdx @@ -16,6 +16,7 @@ description: | http://webaudio.github.io/web-audio-api/#the-audiobuffer-interface"> AudioBuffer) and a .name, a String that corresponds with the original filename.

+isConstructor: false line: 8831 params: - name: id diff --git a/src/content/reference/en/p5.Delay/amp.mdx b/src/content/reference/en/p5.Delay/amp.mdx index 44925feab8..616e792d19 100644 --- a/src/content/reference/en/p5.Delay/amp.mdx +++ b/src/content/reference/en/p5.Delay/amp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the output level of the delay effect.

+isConstructor: false line: 8223 params: - name: volume diff --git a/src/content/reference/en/p5.Delay/connect.mdx b/src/content/reference/en/p5.Delay/connect.mdx index 7b278d0906..83c3cb95d3 100644 --- a/src/content/reference/en/p5.Delay/connect.mdx +++ b/src/content/reference/en/p5.Delay/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Send output to a p5.sound or web audio object

+isConstructor: false line: 8234 params: - name: unit diff --git a/src/content/reference/en/p5.Delay/delayTime.mdx b/src/content/reference/en/p5.Delay/delayTime.mdx index 998f8d9b87..f5ef4859bf 100644 --- a/src/content/reference/en/p5.Delay/delayTime.mdx +++ b/src/content/reference/en/p5.Delay/delayTime.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Set the delay (echo) time, in seconds. Usually this value will be a floating point number between 0.0 and 1.0.

+isConstructor: false line: 8094 params: - name: delayTime diff --git a/src/content/reference/en/p5.Delay/disconnect.mdx b/src/content/reference/en/p5.Delay/disconnect.mdx index 859f91e889..18967c5a7e 100644 --- a/src/content/reference/en/p5.Delay/disconnect.mdx +++ b/src/content/reference/en/p5.Delay/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all output.

+isConstructor: false line: 8242 itemtype: method class: p5.Delay diff --git a/src/content/reference/en/p5.Delay/feedback.mdx b/src/content/reference/en/p5.Delay/feedback.mdx index f8b81e4b28..1e47fbff21 100644 --- a/src/content/reference/en/p5.Delay/feedback.mdx +++ b/src/content/reference/en/p5.Delay/feedback.mdx @@ -9,6 +9,7 @@ description: | time through the loop. A feedback greater than 1.0 is not desirable because it will increase the overall output each time through the loop, creating an infinite feedback loop. The default value is 0.5

+isConstructor: false line: 8116 params: - name: feedback diff --git a/src/content/reference/en/p5.Delay/filter.mdx b/src/content/reference/en/p5.Delay/filter.mdx index 077c4ae591..a92e5ab2ab 100644 --- a/src/content/reference/en/p5.Delay/filter.mdx +++ b/src/content/reference/en/p5.Delay/filter.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 8148 params: - name: cutoffFreq diff --git a/src/content/reference/en/p5.Delay/leftDelay.mdx b/src/content/reference/en/p5.Delay/leftDelay.mdx index d919fc4dc1..88ae083b89 100644 --- a/src/content/reference/en/p5.Delay/leftDelay.mdx +++ b/src/content/reference/en/p5.Delay/leftDelay.mdx @@ -7,6 +7,7 @@ description: |

The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.

+isConstructor: false line: 7989 itemtype: property class: p5.Delay diff --git a/src/content/reference/en/p5.Delay/process.mdx b/src/content/reference/en/p5.Delay/process.mdx index 297507bad7..0eddb7aa75 100644 --- a/src/content/reference/en/p5.Delay/process.mdx +++ b/src/content/reference/en/p5.Delay/process.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Add delay to an audio signal according to a set of delay parameters.

+isConstructor: false line: 8049 params: - name: Signal diff --git a/src/content/reference/en/p5.Delay/rightDelay.mdx b/src/content/reference/en/p5.Delay/rightDelay.mdx index 51e0ae92ee..a1f615d268 100644 --- a/src/content/reference/en/p5.Delay/rightDelay.mdx +++ b/src/content/reference/en/p5.Delay/rightDelay.mdx @@ -7,6 +7,7 @@ description: |

The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.

+isConstructor: false line: 7999 itemtype: property class: p5.Delay diff --git a/src/content/reference/en/p5.Delay/setType.mdx b/src/content/reference/en/p5.Delay/setType.mdx index 803913a3fd..b8d863406a 100644 --- a/src/content/reference/en/p5.Delay/setType.mdx +++ b/src/content/reference/en/p5.Delay/setType.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 8170 params: - name: type diff --git a/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx b/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx index 600790f95a..b543ad1953 100644 --- a/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx +++ b/src/content/reference/en/p5.Distortion/WaveShaperNode.mdx @@ -7,6 +7,7 @@ description: |

The p5.Distortion is built with a Web Audio WaveShaper Node.

+isConstructor: false line: 10864 itemtype: property class: p5.Distortion diff --git a/src/content/reference/en/p5.Distortion/getAmount.mdx b/src/content/reference/en/p5.Distortion/getAmount.mdx index e19649b1b8..5b5fb517d1 100644 --- a/src/content/reference/en/p5.Distortion/getAmount.mdx +++ b/src/content/reference/en/p5.Distortion/getAmount.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Return the distortion amount, typically between 0-1.

+isConstructor: false line: 10923 itemtype: method class: p5.Distortion diff --git a/src/content/reference/en/p5.Distortion/getOversample.mdx b/src/content/reference/en/p5.Distortion/getOversample.mdx index 4738705a93..0ca6a88e5f 100644 --- a/src/content/reference/en/p5.Distortion/getOversample.mdx +++ b/src/content/reference/en/p5.Distortion/getOversample.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Return the oversampling.

+isConstructor: false line: 10937 itemtype: method class: p5.Distortion diff --git a/src/content/reference/en/p5.Distortion/process.mdx b/src/content/reference/en/p5.Distortion/process.mdx index 54874f1bf1..93b379f663 100644 --- a/src/content/reference/en/p5.Distortion/process.mdx +++ b/src/content/reference/en/p5.Distortion/process.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

Process a sound source, optionally specify amount and oversample values.

+isConstructor: false line: 10883 params: - name: amount diff --git a/src/content/reference/en/p5.Distortion/set.mdx b/src/content/reference/en/p5.Distortion/set.mdx index d899affff6..b7767cd646 100644 --- a/src/content/reference/en/p5.Distortion/set.mdx +++ b/src/content/reference/en/p5.Distortion/set.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the amount and oversample of the waveshaper distortion.

+isConstructor: false line: 10900 params: - name: amount diff --git a/src/content/reference/en/p5.EQ/bands.mdx b/src/content/reference/en/p5.EQ/bands.mdx index 4626b8dada..edcf6a0f43 100644 --- a/src/content/reference/en/p5.EQ/bands.mdx +++ b/src/content/reference/en/p5.EQ/bands.mdx @@ -9,6 +9,7 @@ description: | href="/reference/#/p5.Filter" title="p5.Filter reference"> p5.Filter API, especially gain and freq. Bands are stored in an array, with indices 0 - 3, or 0 - 7

+isConstructor: false line: 7198 itemtype: property class: p5.EQ diff --git a/src/content/reference/en/p5.EQ/process.mdx b/src/content/reference/en/p5.EQ/process.mdx index 782efa97d3..890d3d20f3 100644 --- a/src/content/reference/en/p5.EQ/process.mdx +++ b/src/content/reference/en/p5.EQ/process.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Process an input by connecting it to the EQ

+isConstructor: false line: 7239 params: - name: src diff --git a/src/content/reference/en/p5.Effect/amp.mdx b/src/content/reference/en/p5.Effect/amp.mdx index 9f7ec0e631..74f563de6c 100644 --- a/src/content/reference/en/p5.Effect/amp.mdx +++ b/src/content/reference/en/p5.Effect/amp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the output volume of the filter.

+isConstructor: false line: 6478 params: - name: vol diff --git a/src/content/reference/en/p5.Effect/chain.mdx b/src/content/reference/en/p5.Effect/chain.mdx index 39bc537fb8..e0746d2d7c 100644 --- a/src/content/reference/en/p5.Effect/chain.mdx +++ b/src/content/reference/en/p5.Effect/chain.mdx @@ -7,6 +7,7 @@ description: |

Link effects together in a chain Example usage: filter.chain(reverb, delay, panner); May be used with an open-ended number of arguments

+isConstructor: false line: 6502 params: - name: arguments diff --git a/src/content/reference/en/p5.Effect/connect.mdx b/src/content/reference/en/p5.Effect/connect.mdx index 257edf8d41..ec097e844a 100644 --- a/src/content/reference/en/p5.Effect/connect.mdx +++ b/src/content/reference/en/p5.Effect/connect.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Send output to a p5.js-sound, Web Audio Node, or use signal to control an AudioParam

+isConstructor: false line: 6542 params: - name: unit diff --git a/src/content/reference/en/p5.Effect/disconnect.mdx b/src/content/reference/en/p5.Effect/disconnect.mdx index 06151d26cf..ed748bed81 100644 --- a/src/content/reference/en/p5.Effect/disconnect.mdx +++ b/src/content/reference/en/p5.Effect/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all output.

+isConstructor: false line: 6557 itemtype: method class: p5.Effect diff --git a/src/content/reference/en/p5.Effect/drywet.mdx b/src/content/reference/en/p5.Effect/drywet.mdx index 71b16ffc58..deb65555df 100644 --- a/src/content/reference/en/p5.Effect/drywet.mdx +++ b/src/content/reference/en/p5.Effect/drywet.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Adjust the dry/wet value.

+isConstructor: false line: 6525 params: - name: fade diff --git a/src/content/reference/en/p5.Element/addClass.mdx b/src/content/reference/en/p5.Element/addClass.mdx index 7ae6f3278e..1946ee327b 100644 --- a/src/content/reference/en/p5.Element/addClass.mdx +++ b/src/content/reference/en/p5.Element/addClass.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Adds specified class to the element.

+isConstructor: false line: 2323 params: - name: class diff --git a/src/content/reference/en/p5.Element/attribute.mdx b/src/content/reference/en/p5.Element/attribute.mdx index 77834ffe4b..ab76570611 100644 --- a/src/content/reference/en/p5.Element/attribute.mdx +++ b/src/content/reference/en/p5.Element/attribute.mdx @@ -37,6 +37,7 @@ description: > horizontal alignment to center.

+isConstructor: false line: 2859 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/center.mdx b/src/content/reference/en/p5.Element/center.mdx index b742d6ef7c..5ac8b6caa7 100644 --- a/src/content/reference/en/p5.Element/center.mdx +++ b/src/content/reference/en/p5.Element/center.mdx @@ -8,6 +8,7 @@ description: | or both, relative to its parent or according to the body if the p5.Element has no parent. If no argument is passed the p5.Element is aligned both vertically and horizontally.

+isConstructor: false line: 2494 params: - name: align diff --git a/src/content/reference/en/p5.Element/child.mdx b/src/content/reference/en/p5.Element/child.mdx index 368a31352c..59effa3987 100644 --- a/src/content/reference/en/p5.Element/child.mdx +++ b/src/content/reference/en/p5.Element/child.mdx @@ -7,6 +7,7 @@ description: |

Attaches the element as a child to the parent specified. Accepts either a string ID, DOM node, or p5.Element. If no argument is specified, an array of children DOM nodes is returned.

+isConstructor: false line: 2441 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/class.mdx b/src/content/reference/en/p5.Element/class.mdx index 50c1005767..174738397f 100644 --- a/src/content/reference/en/p5.Element/class.mdx +++ b/src/content/reference/en/p5.Element/class.mdx @@ -14,6 +14,7 @@ description: >

Calling myElement.class() without an argument returns a string with its current classes.

+isConstructor: false line: 280 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/doubleClicked.mdx b/src/content/reference/en/p5.Element/doubleClicked.mdx index b7dda433c0..eee21ba6cd 100644 --- a/src/content/reference/en/p5.Element/doubleClicked.mdx +++ b/src/content/reference/en/p5.Element/doubleClicked.mdx @@ -6,6 +6,7 @@ file: src/core/p5.Element.js description: |

Calls a function when the mouse is pressed twice over the element. Calling myElement.doubleClicked(false) disables the function.

+isConstructor: false line: 404 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/dragLeave.mdx b/src/content/reference/en/p5.Element/dragLeave.mdx index 63093fc04e..5a98d5c392 100644 --- a/src/content/reference/en/p5.Element/dragLeave.mdx +++ b/src/content/reference/en/p5.Element/dragLeave.mdx @@ -6,6 +6,7 @@ file: src/core/p5.Element.js description: |

Calls a function when a file is dragged off the element. Calling Calling myElement.dragLeave(false) disables the function.

+isConstructor: false line: 1153 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/dragOver.mdx b/src/content/reference/en/p5.Element/dragOver.mdx index 75da77ca9a..b9c980b286 100644 --- a/src/content/reference/en/p5.Element/dragOver.mdx +++ b/src/content/reference/en/p5.Element/dragOver.mdx @@ -6,6 +6,7 @@ file: src/core/p5.Element.js description: |

Calls a function when a file is dragged over the element. Calling myElement.dragOver(false) disables the function.

+isConstructor: false line: 1090 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/draggable.mdx b/src/content/reference/en/p5.Element/draggable.mdx index 6eb0aaab34..1bb0cc8286 100644 --- a/src/content/reference/en/p5.Element/draggable.mdx +++ b/src/content/reference/en/p5.Element/draggable.mdx @@ -7,6 +7,7 @@ description: >

Turns p5.Element into a draggable item. If an argument is given, it will drag that p5.Element instead, ie. drag a entire GUI panel (parent container) with the panel's title bar.

+isConstructor: false line: 3511 params: - name: elmnt diff --git a/src/content/reference/en/p5.Element/drop.mdx b/src/content/reference/en/p5.Element/drop.mdx index 7dc3d25c9b..d69f2dd0d5 100644 --- a/src/content/reference/en/p5.Element/drop.mdx +++ b/src/content/reference/en/p5.Element/drop.mdx @@ -24,6 +24,7 @@ description: > DragEvent.

+isConstructor: false line: 3355 params: - name: callback diff --git a/src/content/reference/en/p5.Element/elt.mdx b/src/content/reference/en/p5.Element/elt.mdx index 7c1aba3cc9..57bf2cb3a9 100644 --- a/src/content/reference/en/p5.Element/elt.mdx +++ b/src/content/reference/en/p5.Element/elt.mdx @@ -10,6 +10,7 @@ description: > target="_blank">HTMLElement object. Its properties and methods can be used directly.

+isConstructor: false line: 55 itemtype: property class: p5.Element diff --git a/src/content/reference/en/p5.Element/hasClass.mdx b/src/content/reference/en/p5.Element/hasClass.mdx index d91b9df57f..56fec52451 100644 --- a/src/content/reference/en/p5.Element/hasClass.mdx +++ b/src/content/reference/en/p5.Element/hasClass.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Checks if specified class is already applied to element.

+isConstructor: false line: 2379 params: - name: c diff --git a/src/content/reference/en/p5.Element/height.mdx b/src/content/reference/en/p5.Element/height.mdx index cb30e1b666..7865b702fc 100644 --- a/src/content/reference/en/p5.Element/height.mdx +++ b/src/content/reference/en/p5.Element/height.mdx @@ -4,6 +4,7 @@ module: DOM submodule: DOM file: src/core/p5.Element.js description: '' +isConstructor: false line: 97 itemtype: property class: p5.Element diff --git a/src/content/reference/en/p5.Element/hide.mdx b/src/content/reference/en/p5.Element/hide.mdx index a8b90bfe3e..5a52181ca3 100644 --- a/src/content/reference/en/p5.Element/hide.mdx +++ b/src/content/reference/en/p5.Element/hide.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Hides the current element.

+isConstructor: false line: 3110 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/html.mdx b/src/content/reference/en/p5.Element/html.mdx index 36037acdfc..faff4c8590 100644 --- a/src/content/reference/en/p5.Element/html.mdx +++ b/src/content/reference/en/p5.Element/html.mdx @@ -9,6 +9,7 @@ description: | argument, HTML is appended instead of replacing existing HTML. If no arguments are given, returns the inner HTML of the element.

+isConstructor: false line: 2545 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/id.mdx b/src/content/reference/en/p5.Element/id.mdx index 5a03d5166d..ab0c31f145 100644 --- a/src/content/reference/en/p5.Element/id.mdx +++ b/src/content/reference/en/p5.Element/id.mdx @@ -8,6 +8,7 @@ description: >

Calling myElement.id() without an argument returns its ID as a string.

+isConstructor: false line: 233 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/mouseClicked.mdx b/src/content/reference/en/p5.Element/mouseClicked.mdx index 6f8cb4c179..7233e9313b 100644 --- a/src/content/reference/en/p5.Element/mouseClicked.mdx +++ b/src/content/reference/en/p5.Element/mouseClicked.mdx @@ -8,6 +8,7 @@ description: | Calling myElement.mouseReleased(false) disables the function.

Note: Some mobile browsers may also trigger this event when the element receives a quick tap.

+isConstructor: false line: 638 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/mouseMoved.mdx b/src/content/reference/en/p5.Element/mouseMoved.mdx index 8c473459c5..ab61fb7e2c 100644 --- a/src/content/reference/en/p5.Element/mouseMoved.mdx +++ b/src/content/reference/en/p5.Element/mouseMoved.mdx @@ -6,6 +6,7 @@ file: src/core/p5.Element.js description: |

Calls a function when the mouse moves over the element. Calling myElement.mouseMoved(false) disables the function.

+isConstructor: false line: 703 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/mouseOut.mdx b/src/content/reference/en/p5.Element/mouseOut.mdx index 285d04e86a..3d4f9b955a 100644 --- a/src/content/reference/en/p5.Element/mouseOut.mdx +++ b/src/content/reference/en/p5.Element/mouseOut.mdx @@ -6,6 +6,7 @@ file: src/core/p5.Element.js description: |

Calls a function when the mouse moves off the element. Calling myElement.mouseOut(false) disables the function.

+isConstructor: false line: 828 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/mouseOver.mdx b/src/content/reference/en/p5.Element/mouseOver.mdx index 68eff2c2ad..47ab43d69b 100644 --- a/src/content/reference/en/p5.Element/mouseOver.mdx +++ b/src/content/reference/en/p5.Element/mouseOver.mdx @@ -6,6 +6,7 @@ file: src/core/p5.Element.js description: |

Calls a function when the mouse moves onto the element. Calling myElement.mouseOver(false) disables the function.

+isConstructor: false line: 765 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/mousePressed.mdx b/src/content/reference/en/p5.Element/mousePressed.mdx index c779080335..4126249ea5 100644 --- a/src/content/reference/en/p5.Element/mousePressed.mdx +++ b/src/content/reference/en/p5.Element/mousePressed.mdx @@ -8,6 +8,7 @@ description: | Calling myElement.mousePressed(false) disables the function.

Note: Some mobile browsers may also trigger this event when the element receives a quick tap.

+isConstructor: false line: 329 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/mouseReleased.mdx b/src/content/reference/en/p5.Element/mouseReleased.mdx index da46ee5537..1b8eb540e6 100644 --- a/src/content/reference/en/p5.Element/mouseReleased.mdx +++ b/src/content/reference/en/p5.Element/mouseReleased.mdx @@ -8,6 +8,7 @@ description: | myElement.mouseReleased(false) disables the function.

Note: Some mobile browsers may also trigger this event when the element receives a quick tap.

+isConstructor: false line: 573 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/mouseWheel.mdx b/src/content/reference/en/p5.Element/mouseWheel.mdx index fbc6249030..eecc071a00 100644 --- a/src/content/reference/en/p5.Element/mouseWheel.mdx +++ b/src/content/reference/en/p5.Element/mouseWheel.mdx @@ -22,6 +22,7 @@ description: > to the left.

Calling myElement.mouseWheel(false) disables the function.

+isConstructor: false line: 466 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/parent.mdx b/src/content/reference/en/p5.Element/parent.mdx index 91aca1a950..c6e61d8d10 100644 --- a/src/content/reference/en/p5.Element/parent.mdx +++ b/src/content/reference/en/p5.Element/parent.mdx @@ -34,6 +34,7 @@ description: > element's parent.

+isConstructor: false line: 105 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/position.mdx b/src/content/reference/en/p5.Element/position.mdx index 02a2de4bb4..e5e7f8725d 100644 --- a/src/content/reference/en/p5.Element/position.mdx +++ b/src/content/reference/en/p5.Element/position.mdx @@ -14,6 +14,7 @@ description: > If no arguments given, the function returns the x and y position of the element. found documentation on how to be more specific with object type https://stackoverflow.com/questions/14714314/how-do-i-comment-object-literals-in-yuidoc

+isConstructor: false line: 2584 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/remove.mdx b/src/content/reference/en/p5.Element/remove.mdx index 0344fb3866..2632a40181 100644 --- a/src/content/reference/en/p5.Element/remove.mdx +++ b/src/content/reference/en/p5.Element/remove.mdx @@ -6,6 +6,7 @@ file: src/dom/dom.js description: |

Removes the element, stops all audio/video streams, and removes all callback functions.

+isConstructor: false line: 3299 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/removeAttribute.mdx b/src/content/reference/en/p5.Element/removeAttribute.mdx index c1e7abc839..93857c0bb2 100644 --- a/src/content/reference/en/p5.Element/removeAttribute.mdx +++ b/src/content/reference/en/p5.Element/removeAttribute.mdx @@ -13,6 +13,7 @@ description: > align attribute if it's been set.

+isConstructor: false line: 2948 params: - name: attr diff --git a/src/content/reference/en/p5.Element/removeClass.mdx b/src/content/reference/en/p5.Element/removeClass.mdx index fa7dc4026e..c7337b505c 100644 --- a/src/content/reference/en/p5.Element/removeClass.mdx +++ b/src/content/reference/en/p5.Element/removeClass.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Removes specified class from the element.

+isConstructor: false line: 2348 params: - name: class diff --git a/src/content/reference/en/p5.Element/show.mdx b/src/content/reference/en/p5.Element/show.mdx index 339ea9532f..014fad58f9 100644 --- a/src/content/reference/en/p5.Element/show.mdx +++ b/src/content/reference/en/p5.Element/show.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Shows the current element.

+isConstructor: false line: 3077 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/size.mdx b/src/content/reference/en/p5.Element/size.mdx index 53c5236d0f..e6788966ad 100644 --- a/src/content/reference/en/p5.Element/size.mdx +++ b/src/content/reference/en/p5.Element/size.mdx @@ -39,6 +39,7 @@ description: >

Note: In the case of elements that need to load data, such as images, wait to call myElement.size() until after the data loads.

+isConstructor: false line: 3140 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/style.mdx b/src/content/reference/en/p5.Element/style.mdx index 752b777e6b..e0fc9af2af 100644 --- a/src/content/reference/en/p5.Element/style.mdx +++ b/src/content/reference/en/p5.Element/style.mdx @@ -34,6 +34,7 @@ description: > p5.Color object, as in myElement.style('color', myColor).

+isConstructor: false line: 2704 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/toggleClass.mdx b/src/content/reference/en/p5.Element/toggleClass.mdx index 3acad032de..ab7d2d0792 100644 --- a/src/content/reference/en/p5.Element/toggleClass.mdx +++ b/src/content/reference/en/p5.Element/toggleClass.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Toggles element class.

+isConstructor: false line: 2408 params: - name: c diff --git a/src/content/reference/en/p5.Element/touchEnded.mdx b/src/content/reference/en/p5.Element/touchEnded.mdx index e810c244a1..77d7619875 100644 --- a/src/content/reference/en/p5.Element/touchEnded.mdx +++ b/src/content/reference/en/p5.Element/touchEnded.mdx @@ -7,6 +7,7 @@ description: |

Calls a function when the user stops touching the element. Calling myElement.touchMoved(false) disables the function.

Note: Touch functions only work on mobile devices.

+isConstructor: false line: 1023 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/touchMoved.mdx b/src/content/reference/en/p5.Element/touchMoved.mdx index b1e291d1ec..dc1b6a8e0a 100644 --- a/src/content/reference/en/p5.Element/touchMoved.mdx +++ b/src/content/reference/en/p5.Element/touchMoved.mdx @@ -8,6 +8,7 @@ description: | finger. Calling myElement.touchMoved(false) disables the function.

Note: Touch functions only work on mobile devices.

+isConstructor: false line: 956 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/touchStarted.mdx b/src/content/reference/en/p5.Element/touchStarted.mdx index ba6788a836..61bb6ca673 100644 --- a/src/content/reference/en/p5.Element/touchStarted.mdx +++ b/src/content/reference/en/p5.Element/touchStarted.mdx @@ -7,6 +7,7 @@ description: |

Calls a function when the element is touched. Calling myElement.touchStarted(false) disables the function.

Note: Touch functions only work on mobile devices.

+isConstructor: false line: 891 params: - name: fxn diff --git a/src/content/reference/en/p5.Element/value.mdx b/src/content/reference/en/p5.Element/value.mdx index 6ebde1e525..eae459d744 100644 --- a/src/content/reference/en/p5.Element/value.mdx +++ b/src/content/reference/en/p5.Element/value.mdx @@ -14,6 +14,7 @@ description: > as in myElement.value(123), it's used to set the element's value.

+isConstructor: false line: 2997 itemtype: method class: p5.Element diff --git a/src/content/reference/en/p5.Element/width.mdx b/src/content/reference/en/p5.Element/width.mdx index c618bfff48..5b44cdf1e3 100644 --- a/src/content/reference/en/p5.Element/width.mdx +++ b/src/content/reference/en/p5.Element/width.mdx @@ -4,6 +4,7 @@ module: DOM submodule: DOM file: src/core/p5.Element.js description: '' +isConstructor: false line: 91 itemtype: property class: p5.Element diff --git a/src/content/reference/en/p5.Envelope/add.mdx b/src/content/reference/en/p5.Envelope/add.mdx index 303c3ff33b..8278574726 100644 --- a/src/content/reference/en/p5.Envelope/add.mdx +++ b/src/content/reference/en/p5.Envelope/add.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 5460 params: - name: number diff --git a/src/content/reference/en/p5.Envelope/attackLevel.mdx b/src/content/reference/en/p5.Envelope/attackLevel.mdx index 9c4e202a8a..d380591fd2 100644 --- a/src/content/reference/en/p5.Envelope/attackLevel.mdx +++ b/src/content/reference/en/p5.Envelope/attackLevel.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Level once attack is complete.

+isConstructor: false line: 4772 itemtype: property class: p5.Envelope diff --git a/src/content/reference/en/p5.Envelope/attackTime.mdx b/src/content/reference/en/p5.Envelope/attackTime.mdx index 802af3838a..92d12d7edb 100644 --- a/src/content/reference/en/p5.Envelope/attackTime.mdx +++ b/src/content/reference/en/p5.Envelope/attackTime.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Time until envelope reaches attackLevel

+isConstructor: false line: 4767 itemtype: property class: p5.Envelope diff --git a/src/content/reference/en/p5.Envelope/decayLevel.mdx b/src/content/reference/en/p5.Envelope/decayLevel.mdx index 5c0a15c10c..f7845434cf 100644 --- a/src/content/reference/en/p5.Envelope/decayLevel.mdx +++ b/src/content/reference/en/p5.Envelope/decayLevel.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Level after decay. The envelope will sustain here until it is released.

+isConstructor: false line: 4784 itemtype: property class: p5.Envelope diff --git a/src/content/reference/en/p5.Envelope/decayTime.mdx b/src/content/reference/en/p5.Envelope/decayTime.mdx index 4401e2f807..87143765df 100644 --- a/src/content/reference/en/p5.Envelope/decayTime.mdx +++ b/src/content/reference/en/p5.Envelope/decayTime.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Time until envelope reaches decayLevel.

+isConstructor: false line: 4778 itemtype: property class: p5.Envelope diff --git a/src/content/reference/en/p5.Envelope/mult.mdx b/src/content/reference/en/p5.Envelope/mult.mdx index 30187c7cdd..2ccb1d3be9 100644 --- a/src/content/reference/en/p5.Envelope/mult.mdx +++ b/src/content/reference/en/p5.Envelope/mult.mdx @@ -7,6 +7,7 @@ description: |

Multiply the p5.Envelope's output amplitude by a fixed value. Calling this method again will override the initial mult() with new values.

+isConstructor: false line: 5479 params: - name: number diff --git a/src/content/reference/en/p5.Envelope/play.mdx b/src/content/reference/en/p5.Envelope/play.mdx index 6e11012ca1..33d5bafccd 100644 --- a/src/content/reference/en/p5.Envelope/play.mdx +++ b/src/content/reference/en/p5.Envelope/play.mdx @@ -10,6 +10,7 @@ description: |- Envelopes can also be used to control any Web Audio Audio Param.

+isConstructor: false line: 5078 params: - name: unit diff --git a/src/content/reference/en/p5.Envelope/ramp.mdx b/src/content/reference/en/p5.Envelope/ramp.mdx index b216f84aed..cbab7064d5 100644 --- a/src/content/reference/en/p5.Envelope/ramp.mdx +++ b/src/content/reference/en/p5.Envelope/ramp.mdx @@ -16,6 +16,7 @@ description: > If the value is higher than current value, it uses attackTime, while a decrease uses decayTime.

+isConstructor: false line: 5350 params: - name: unit diff --git a/src/content/reference/en/p5.Envelope/releaseLevel.mdx b/src/content/reference/en/p5.Envelope/releaseLevel.mdx index a9e1cff19b..09067e31c2 100644 --- a/src/content/reference/en/p5.Envelope/releaseLevel.mdx +++ b/src/content/reference/en/p5.Envelope/releaseLevel.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Level at the end of the release.

+isConstructor: false line: 4796 itemtype: property class: p5.Envelope diff --git a/src/content/reference/en/p5.Envelope/releaseTime.mdx b/src/content/reference/en/p5.Envelope/releaseTime.mdx index 35bdfbcded..37de1134af 100644 --- a/src/content/reference/en/p5.Envelope/releaseTime.mdx +++ b/src/content/reference/en/p5.Envelope/releaseTime.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Duration of the release portion of the envelope.

+isConstructor: false line: 4790 itemtype: property class: p5.Envelope diff --git a/src/content/reference/en/p5.Envelope/scale.mdx b/src/content/reference/en/p5.Envelope/scale.mdx index f21a5e3e4f..f294dbbbf7 100644 --- a/src/content/reference/en/p5.Envelope/scale.mdx +++ b/src/content/reference/en/p5.Envelope/scale.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 5498 params: - name: inMin diff --git a/src/content/reference/en/p5.Envelope/set.mdx b/src/content/reference/en/p5.Envelope/set.mdx index 212a62c786..0f466a0148 100644 --- a/src/content/reference/en/p5.Envelope/set.mdx +++ b/src/content/reference/en/p5.Envelope/set.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Reset the envelope with a series of time/value pairs.

+isConstructor: false line: 4833 params: - name: attackTime diff --git a/src/content/reference/en/p5.Envelope/setADSR.mdx b/src/content/reference/en/p5.Envelope/setADSR.mdx index 4c77394044..0970b17875 100644 --- a/src/content/reference/en/p5.Envelope/setADSR.mdx +++ b/src/content/reference/en/p5.Envelope/setADSR.mdx @@ -12,6 +12,7 @@ description: > ADSR envelope .

+isConstructor: false line: 4895 params: - name: attackTime diff --git a/src/content/reference/en/p5.Envelope/setExp.mdx b/src/content/reference/en/p5.Envelope/setExp.mdx index 2e7d9b6840..29afa9d930 100644 --- a/src/content/reference/en/p5.Envelope/setExp.mdx +++ b/src/content/reference/en/p5.Envelope/setExp.mdx @@ -7,6 +7,7 @@ description: |

Set whether the envelope ramp is linear (default) or exponential. Exponential ramps can be useful because we perceive amplitude and frequency logarithmically.

+isConstructor: false line: 5055 params: - name: isExp diff --git a/src/content/reference/en/p5.Envelope/setInput.mdx b/src/content/reference/en/p5.Envelope/setInput.mdx index c9dd0bd84c..af2e615d8a 100644 --- a/src/content/reference/en/p5.Envelope/setInput.mdx +++ b/src/content/reference/en/p5.Envelope/setInput.mdx @@ -8,6 +8,7 @@ description: | 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.

+isConstructor: false line: 5037 params: - name: inputs diff --git a/src/content/reference/en/p5.Envelope/setRange.mdx b/src/content/reference/en/p5.Envelope/setRange.mdx index ec75925c3e..31deddf2bf 100644 --- a/src/content/reference/en/p5.Envelope/setRange.mdx +++ b/src/content/reference/en/p5.Envelope/setRange.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set max (attackLevel) and min (releaseLevel) of envelope.

+isConstructor: false line: 4964 params: - name: aLevel diff --git a/src/content/reference/en/p5.Envelope/triggerAttack.mdx b/src/content/reference/en/p5.Envelope/triggerAttack.mdx index 39b3b12474..269c42822b 100644 --- a/src/content/reference/en/p5.Envelope/triggerAttack.mdx +++ b/src/content/reference/en/p5.Envelope/triggerAttack.mdx @@ -10,6 +10,7 @@ description: | any p5.sound object, or a Web Audio Param.

+isConstructor: false line: 5148 params: - name: unit diff --git a/src/content/reference/en/p5.Envelope/triggerRelease.mdx b/src/content/reference/en/p5.Envelope/triggerRelease.mdx index 63d3b5341f..37f1eb3c9f 100644 --- a/src/content/reference/en/p5.Envelope/triggerRelease.mdx +++ b/src/content/reference/en/p5.Envelope/triggerRelease.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 5256 params: - name: unit diff --git a/src/content/reference/en/p5.FFT/analyze.mdx b/src/content/reference/en/p5.FFT/analyze.mdx index 8fc01be8f0..6378b71584 100644 --- a/src/content/reference/en/p5.FFT/analyze.mdx +++ b/src/content/reference/en/p5.FFT/analyze.mdx @@ -11,6 +11,7 @@ description: | hear. Each value represents amplitude at that slice of the frequency spectrum. Must be called prior to using getEnergy().

+isConstructor: false line: 3553 params: - name: bins diff --git a/src/content/reference/en/p5.FFT/getCentroid.mdx b/src/content/reference/en/p5.FFT/getCentroid.mdx index 9f843f7842..53a70c6622 100644 --- a/src/content/reference/en/p5.FFT/getCentroid.mdx +++ b/src/content/reference/en/p5.FFT/getCentroid.mdx @@ -10,6 +10,7 @@ description: | 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.

+isConstructor: false line: 3739 itemtype: method class: p5.FFT diff --git a/src/content/reference/en/p5.FFT/getEnergy.mdx b/src/content/reference/en/p5.FFT/getEnergy.mdx index 939300e694..2c45a5437f 100644 --- a/src/content/reference/en/p5.FFT/getEnergy.mdx +++ b/src/content/reference/en/p5.FFT/getEnergy.mdx @@ -16,6 +16,7 @@ description: | tells the FFT to analyze frequency data, and getEnergy() uses the results to determine the value at a specific frequency or range of frequencies.

+isConstructor: false line: 3650 params: - name: frequency1 diff --git a/src/content/reference/en/p5.FFT/getOctaveBands.mdx b/src/content/reference/en/p5.FFT/getOctaveBands.mdx index 4e0364984f..168a2de0ff 100644 --- a/src/content/reference/en/p5.FFT/getOctaveBands.mdx +++ b/src/content/reference/en/p5.FFT/getOctaveBands.mdx @@ -17,6 +17,7 @@ description: > bands and produce less frequency groups.

+isConstructor: false line: 3925 params: - name: 'N' diff --git a/src/content/reference/en/p5.FFT/linAverages.mdx b/src/content/reference/en/p5.FFT/linAverages.mdx index 0d337297cb..f1d140388e 100644 --- a/src/content/reference/en/p5.FFT/linAverages.mdx +++ b/src/content/reference/en/p5.FFT/linAverages.mdx @@ -9,6 +9,7 @@ description: | 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.

+isConstructor: false line: 3854 params: - name: 'N' diff --git a/src/content/reference/en/p5.FFT/logAverages.mdx b/src/content/reference/en/p5.FFT/logAverages.mdx index e696723b9e..934a13cec6 100644 --- a/src/content/reference/en/p5.FFT/logAverages.mdx +++ b/src/content/reference/en/p5.FFT/logAverages.mdx @@ -10,6 +10,7 @@ description: | NOTE: analyze() must be called prior to logAverages(). Analyze() tells the FFT to analyze frequency data, and logAverages() uses the results to group them into a smaller set of averages.

+isConstructor: false line: 3889 params: - name: octaveBands diff --git a/src/content/reference/en/p5.FFT/setInput.mdx b/src/content/reference/en/p5.FFT/setInput.mdx index fa29d4c4cb..d60d0bd23f 100644 --- a/src/content/reference/en/p5.FFT/setInput.mdx +++ b/src/content/reference/en/p5.FFT/setInput.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 3476 params: - name: source diff --git a/src/content/reference/en/p5.FFT/smooth.mdx b/src/content/reference/en/p5.FFT/smooth.mdx index 152ccadc2e..9145984b31 100644 --- a/src/content/reference/en/p5.FFT/smooth.mdx +++ b/src/content/reference/en/p5.FFT/smooth.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Smooth FFT analysis by averaging with the last analysis frame.

+isConstructor: false line: 3826 params: - name: smoothing diff --git a/src/content/reference/en/p5.FFT/waveform.mdx b/src/content/reference/en/p5.FFT/waveform.mdx index 19d58a9119..303fbeea4b 100644 --- a/src/content/reference/en/p5.FFT/waveform.mdx +++ b/src/content/reference/en/p5.FFT/waveform.mdx @@ -8,6 +8,7 @@ description: | a snapshot of amplitude readings in a single buffer. Length will be equal to bins (defaults to 1024). Can be used to draw the waveform of a sound.

+isConstructor: false line: 3501 params: - name: bins diff --git a/src/content/reference/en/p5.File/data.mdx b/src/content/reference/en/p5.File/data.mdx index beae22178a..3c22422eb5 100644 --- a/src/content/reference/en/p5.File/data.mdx +++ b/src/content/reference/en/p5.File/data.mdx @@ -7,6 +7,7 @@ description: |

A string containing either the file's image data, text contents, or a parsed object in the case of JSON and p5.XML objects.

+isConstructor: false line: 5173 itemtype: property class: p5.File diff --git a/src/content/reference/en/p5.File/file.mdx b/src/content/reference/en/p5.File/file.mdx index c8a5c1d13c..4d0b3b1b7e 100644 --- a/src/content/reference/en/p5.File/file.mdx +++ b/src/content/reference/en/p5.File/file.mdx @@ -10,6 +10,7 @@ description: > target="_blank">File object. All File properties and methods are accessible.

+isConstructor: false line: 4986 itemtype: property class: p5.File diff --git a/src/content/reference/en/p5.File/name.mdx b/src/content/reference/en/p5.File/name.mdx index fd8222b684..3d322df67b 100644 --- a/src/content/reference/en/p5.File/name.mdx +++ b/src/content/reference/en/p5.File/name.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

The file name as a string.

+isConstructor: false line: 5104 itemtype: property class: p5.File diff --git a/src/content/reference/en/p5.File/size.mdx b/src/content/reference/en/p5.File/size.mdx index 4a39d3e612..3ede0c61c1 100644 --- a/src/content/reference/en/p5.File/size.mdx +++ b/src/content/reference/en/p5.File/size.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

The number of bytes in the file.

+isConstructor: false line: 5138 itemtype: property class: p5.File diff --git a/src/content/reference/en/p5.File/subtype.mdx b/src/content/reference/en/p5.File/subtype.mdx index 9693a78b2d..a79e3d9f2c 100644 --- a/src/content/reference/en/p5.File/subtype.mdx +++ b/src/content/reference/en/p5.File/subtype.mdx @@ -12,6 +12,7 @@ description: > target="_blank">MIME type may have a subtype such as png or jpeg.

+isConstructor: false line: 5068 itemtype: property class: p5.File diff --git a/src/content/reference/en/p5.File/type.mdx b/src/content/reference/en/p5.File/type.mdx index e703316898..0e76a9f177 100644 --- a/src/content/reference/en/p5.File/type.mdx +++ b/src/content/reference/en/p5.File/type.mdx @@ -12,6 +12,7 @@ description: > as a string. For example, 'image', 'text', and so on.

+isConstructor: false line: 5032 itemtype: property class: p5.File diff --git a/src/content/reference/en/p5.Filter/biquadFilter.mdx b/src/content/reference/en/p5.Filter/biquadFilter.mdx index d2ed90b6e4..028a5b3a70 100644 --- a/src/content/reference/en/p5.Filter/biquadFilter.mdx +++ b/src/content/reference/en/p5.Filter/biquadFilter.mdx @@ -7,6 +7,7 @@ description: |

The p5.Filter is built with a Web Audio BiquadFilter Node.

+isConstructor: false line: 6719 itemtype: property class: p5.Filter diff --git a/src/content/reference/en/p5.Filter/freq.mdx b/src/content/reference/en/p5.Filter/freq.mdx index 564458bf36..c3c7c298d8 100644 --- a/src/content/reference/en/p5.Filter/freq.mdx +++ b/src/content/reference/en/p5.Filter/freq.mdx @@ -7,6 +7,7 @@ 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).

+isConstructor: false line: 6781 params: - name: freq diff --git a/src/content/reference/en/p5.Filter/gain.mdx b/src/content/reference/en/p5.Filter/gain.mdx index 1ef064fb46..1fe680f915 100644 --- a/src/content/reference/en/p5.Filter/gain.mdx +++ b/src/content/reference/en/p5.Filter/gain.mdx @@ -8,6 +8,7 @@ description: | 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.

+isConstructor: false line: 6838 params: - name: gain diff --git a/src/content/reference/en/p5.Filter/process.mdx b/src/content/reference/en/p5.Filter/process.mdx index 1e518adedd..02ae2f616e 100644 --- a/src/content/reference/en/p5.Filter/process.mdx +++ b/src/content/reference/en/p5.Filter/process.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Filter an audio signal according to a set of filter parameters.

+isConstructor: false line: 6742 params: - name: Signal diff --git a/src/content/reference/en/p5.Filter/res.mdx b/src/content/reference/en/p5.Filter/res.mdx index ca430496ae..707031f204 100644 --- a/src/content/reference/en/p5.Filter/res.mdx +++ b/src/content/reference/en/p5.Filter/res.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Controls either width of a bandpass frequency, or the resonance of a low/highpass cutoff frequency.

+isConstructor: false line: 6811 params: - name: res diff --git a/src/content/reference/en/p5.Filter/set.mdx b/src/content/reference/en/p5.Filter/set.mdx index cfcdbed7c4..577edd7e11 100644 --- a/src/content/reference/en/p5.Filter/set.mdx +++ b/src/content/reference/en/p5.Filter/set.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the frequency and the resonance of the filter.

+isConstructor: false line: 6760 params: - name: freq diff --git a/src/content/reference/en/p5.Filter/setType.mdx b/src/content/reference/en/p5.Filter/setType.mdx index d5759bc201..58ecc5065d 100644 --- a/src/content/reference/en/p5.Filter/setType.mdx +++ b/src/content/reference/en/p5.Filter/setType.mdx @@ -8,6 +8,7 @@ description: | "lowpass" (default), "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass".

+isConstructor: false line: 6884 params: - name: t diff --git a/src/content/reference/en/p5.Filter/toggle.mdx b/src/content/reference/en/p5.Filter/toggle.mdx index 6f93ffd798..8a11a0bbbb 100644 --- a/src/content/reference/en/p5.Filter/toggle.mdx +++ b/src/content/reference/en/p5.Filter/toggle.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Toggle function. Switches between the specified type and allpass

+isConstructor: false line: 6864 itemtype: method class: p5.Filter diff --git a/src/content/reference/en/p5.Font/font.mdx b/src/content/reference/en/p5.Font/font.mdx index 47fbfe3f84..273309f345 100644 --- a/src/content/reference/en/p5.Font/font.mdx +++ b/src/content/reference/en/p5.Font/font.mdx @@ -7,6 +7,7 @@ description: |

Underlying opentype.js font object.

+isConstructor: false line: 45 itemtype: property class: p5.Font diff --git a/src/content/reference/en/p5.Font/textBounds.mdx b/src/content/reference/en/p5.Font/textBounds.mdx index 1e3bf8b3f4..ac46386b69 100644 --- a/src/content/reference/en/p5.Font/textBounds.mdx +++ b/src/content/reference/en/p5.Font/textBounds.mdx @@ -25,6 +25,7 @@ description: > use the current textSize().

+isConstructor: false line: 55 params: - name: str diff --git a/src/content/reference/en/p5.Font/textToPoints.mdx b/src/content/reference/en/p5.Font/textToPoints.mdx index 7705497ee5..6775659ce7 100644 --- a/src/content/reference/en/p5.Font/textToPoints.mdx +++ b/src/content/reference/en/p5.Font/textToPoints.mdx @@ -43,6 +43,7 @@ description: > than 0. The value represents the threshold angle to use when determining whether two edges are collinear.

+isConstructor: false line: 249 params: - name: str diff --git a/src/content/reference/en/p5.Framebuffer/autoSized.mdx b/src/content/reference/en/p5.Framebuffer/autoSized.mdx index e1d253ac88..97c197a253 100644 --- a/src/content/reference/en/p5.Framebuffer/autoSized.mdx +++ b/src/content/reference/en/p5.Framebuffer/autoSized.mdx @@ -8,6 +8,7 @@ description: | along with the canvas it's attached to in order to match its size.

Call this method with no arguments to see if it is currently auto-sized, or pass in a boolean to set this property.

+isConstructor: false line: 257 params: - name: autoSized diff --git a/src/content/reference/en/p5.Framebuffer/begin.mdx b/src/content/reference/en/p5.Framebuffer/begin.mdx index 55d378c6b7..3a9d9cb6b3 100644 --- a/src/content/reference/en/p5.Framebuffer/begin.mdx +++ b/src/content/reference/en/p5.Framebuffer/begin.mdx @@ -10,8 +10,12 @@ description: | end() when finished to make draw functions go right to the canvas again and to be able to read the contents of the framebuffer's texture.

+isConstructor: false line: 790 itemtype: method +alt: |- + A video of a floating and rotating red cube is pasted twice on the + canvas: once in the top left, and again, larger, in the bottom right. class: p5.Framebuffer example: - |- @@ -43,9 +47,6 @@ example: } -alt: |- - A video of a floating and rotating red cube is pasted twice on the - canvas: once in the top left, and again, larger, in the bottom right. chainable: false --- diff --git a/src/content/reference/en/p5.Framebuffer/color.mdx b/src/content/reference/en/p5.Framebuffer/color.mdx index a6dd93dc69..4667d8edd8 100644 --- a/src/content/reference/en/p5.Framebuffer/color.mdx +++ b/src/content/reference/en/p5.Framebuffer/color.mdx @@ -12,8 +12,10 @@ description: | flipped compared to images and videos. When texturing with a framebuffer texture, you may want to flip vertically, e.g. with plane(framebuffer.width, -framebuffer.height).

+isConstructor: false line: 1279 itemtype: property +alt: 'A red, green, and blue sphere in the middle of the canvas' class: p5.Framebuffer example: - |- @@ -40,7 +42,6 @@ example: } -alt: 'A red, green, and blue sphere in the middle of the canvas' chainable: false --- diff --git a/src/content/reference/en/p5.Framebuffer/createCamera.mdx b/src/content/reference/en/p5.Framebuffer/createCamera.mdx index 144d1e29b2..5204d75422 100644 --- a/src/content/reference/en/p5.Framebuffer/createCamera.mdx +++ b/src/content/reference/en/p5.Framebuffer/createCamera.mdx @@ -8,6 +8,7 @@ description: | p5.FramebufferCamera to be used while drawing to this framebuffer. The camera will be set as the currently active camera.

+isConstructor: false line: 698 itemtype: method class: p5.Framebuffer diff --git a/src/content/reference/en/p5.Framebuffer/depth.mdx b/src/content/reference/en/p5.Framebuffer/depth.mdx index dc91b5d68d..0c6949c2c5 100644 --- a/src/content/reference/en/p5.Framebuffer/depth.mdx +++ b/src/content/reference/en/p5.Framebuffer/depth.mdx @@ -22,8 +22,13 @@ description: > texture, you may want to flip vertically, e.g. with plane(framebuffer.width, -framebuffer.height).

+isConstructor: false line: 1321 itemtype: property +alt: |- + A video of a rectangular prism rotating, with parts closest to the camera + appearing yellow and colors getting progressively more blue the farther + from the camera they go class: p5.Framebuffer example: - |- @@ -84,10 +89,6 @@ example: } -alt: |- - A video of a rectangular prism rotating, with parts closest to the camera - appearing yellow and colors getting progressively more blue the farther - from the camera they go chainable: false --- diff --git a/src/content/reference/en/p5.Framebuffer/draw.mdx b/src/content/reference/en/p5.Framebuffer/draw.mdx index 19c49a6cb1..40b7a8cfe4 100644 --- a/src/content/reference/en/p5.Framebuffer/draw.mdx +++ b/src/content/reference/en/p5.Framebuffer/draw.mdx @@ -12,6 +12,7 @@ description: > and then calling framebuffer.end(), but ensures that one never accidentally forgets begin or end.

+isConstructor: false line: 947 params: - name: callback @@ -21,6 +22,9 @@ params: instead of the canvas.

type: Function itemtype: method +alt: |- + A video of a floating and rotating red cube is pasted twice on the + canvas: once in the top left, and again, larger, in the bottom right. class: p5.Framebuffer example: - |- @@ -52,9 +56,6 @@ example: } -alt: |- - A video of a floating and rotating red cube is pasted twice on the - canvas: once in the top left, and again, larger, in the bottom right. chainable: false --- diff --git a/src/content/reference/en/p5.Framebuffer/end.mdx b/src/content/reference/en/p5.Framebuffer/end.mdx index 3cc20e6f77..4ed335e6b9 100644 --- a/src/content/reference/en/p5.Framebuffer/end.mdx +++ b/src/content/reference/en/p5.Framebuffer/end.mdx @@ -9,6 +9,7 @@ description: | functions from going to the framebuffer's texture, allowing them to go right to the canvas again. After this, one can read from the framebuffer's texture.

+isConstructor: false line: 918 itemtype: method class: p5.Framebuffer diff --git a/src/content/reference/en/p5.Framebuffer/get.mdx b/src/content/reference/en/p5.Framebuffer/get.mdx index 74b87192ac..9d694e43fe 100644 --- a/src/content/reference/en/p5.Framebuffer/get.mdx +++ b/src/content/reference/en/p5.Framebuffer/get.mdx @@ -26,6 +26,7 @@ description: > upper-left corner of the image, regardless of the current imageMode().

+isConstructor: false line: 1026 itemtype: method class: p5.Framebuffer diff --git a/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx b/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx index b746105bd4..97aee5f57f 100644 --- a/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx +++ b/src/content/reference/en/p5.Framebuffer/pixelDensity.mdx @@ -9,6 +9,7 @@ description: | created on, which will match the display density.

Call this method with no arguments to get the current density, or pass in a number to set the density.

+isConstructor: false line: 235 params: - name: density diff --git a/src/content/reference/en/p5.Framebuffer/pixels.mdx b/src/content/reference/en/p5.Framebuffer/pixels.mdx index 0fbdf23a8e..ec955ca96f 100644 --- a/src/content/reference/en/p5.Framebuffer/pixels.mdx +++ b/src/content/reference/en/p5.Framebuffer/pixels.mdx @@ -24,6 +24,7 @@ description: > drawing to the framebuffer directly. Consider using a shader instead of looping over pixels.

+isConstructor: false line: 93 itemtype: property class: p5.Framebuffer diff --git a/src/content/reference/en/p5.Framebuffer/remove.mdx b/src/content/reference/en/p5.Framebuffer/remove.mdx index e5678e470f..288abefcc4 100644 --- a/src/content/reference/en/p5.Framebuffer/remove.mdx +++ b/src/content/reference/en/p5.Framebuffer/remove.mdx @@ -5,8 +5,10 @@ submodule: '' file: src/webgl/p5.Framebuffer.js description: |

Removes the framebuffer and frees its resources.

+isConstructor: false line: 729 itemtype: method +alt: A rotating red cube blinks on and off every second. class: p5.Framebuffer example: - |- @@ -45,7 +47,6 @@ example: } -alt: A rotating red cube blinks on and off every second. chainable: false --- diff --git a/src/content/reference/en/p5.Framebuffer/resize.mdx b/src/content/reference/en/p5.Framebuffer/resize.mdx index ef4c8b72de..13a0617dd1 100644 --- a/src/content/reference/en/p5.Framebuffer/resize.mdx +++ b/src/content/reference/en/p5.Framebuffer/resize.mdx @@ -5,6 +5,7 @@ submodule: '' file: src/webgl/p5.Framebuffer.js description: |

Resizes the framebuffer to the given width and height.

+isConstructor: false line: 184 params: - name: width @@ -14,6 +15,10 @@ params: description: '' type: Number itemtype: method +alt: |- + A red, green, and blue sphere is drawn in the middle of a white rectangle + which starts in the top left of the canvas and whose bottom right is at + the user's mouse class: p5.Framebuffer example: - |- @@ -48,10 +53,6 @@ example: } -alt: |- - A red, green, and blue sphere is drawn in the middle of a white rectangle - which starts in the top left of the canvas and whose bottom right is at - the user's mouse chainable: false --- diff --git a/src/content/reference/en/p5.Gain/amp.mdx b/src/content/reference/en/p5.Gain/amp.mdx index 2d83881240..94800007fc 100644 --- a/src/content/reference/en/p5.Gain/amp.mdx +++ b/src/content/reference/en/p5.Gain/amp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the output level of the gain node.

+isConstructor: false line: 11098 params: - name: volume diff --git a/src/content/reference/en/p5.Gain/connect.mdx b/src/content/reference/en/p5.Gain/connect.mdx index df4ce7fa92..e7cb0e15d7 100644 --- a/src/content/reference/en/p5.Gain/connect.mdx +++ b/src/content/reference/en/p5.Gain/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Send output to a p5.sound or web audio object

+isConstructor: false line: 11070 params: - name: unit diff --git a/src/content/reference/en/p5.Gain/disconnect.mdx b/src/content/reference/en/p5.Gain/disconnect.mdx index c112f1112f..368f360565 100644 --- a/src/content/reference/en/p5.Gain/disconnect.mdx +++ b/src/content/reference/en/p5.Gain/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all output.

+isConstructor: false line: 11084 itemtype: method class: p5.Gain diff --git a/src/content/reference/en/p5.Gain/setInput.mdx b/src/content/reference/en/p5.Gain/setInput.mdx index f715aff562..e256efcd2d 100644 --- a/src/content/reference/en/p5.Gain/setInput.mdx +++ b/src/content/reference/en/p5.Gain/setInput.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect a source to the gain node.

+isConstructor: false line: 11055 params: - name: src diff --git a/src/content/reference/en/p5.Geometry/averageNormals.mdx b/src/content/reference/en/p5.Geometry/averageNormals.mdx index 8f7855f0fc..bc987fbea4 100644 --- a/src/content/reference/en/p5.Geometry/averageNormals.mdx +++ b/src/content/reference/en/p5.Geometry/averageNormals.mdx @@ -6,6 +6,7 @@ file: src/webgl/p5.Geometry.js description: |

Averages the vertex normals. Used in curved surfaces

+isConstructor: false line: 535 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Geometry/averagePoleNormals.mdx b/src/content/reference/en/p5.Geometry/averagePoleNormals.mdx index be565943e9..f259269119 100644 --- a/src/content/reference/en/p5.Geometry/averagePoleNormals.mdx +++ b/src/content/reference/en/p5.Geometry/averagePoleNormals.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/p5.Geometry.js description: |

Averages pole normals. Used in spherical primitives

+isConstructor: false line: 556 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Geometry/clearColors.mdx b/src/content/reference/en/p5.Geometry/clearColors.mdx index fe652b05d5..203ccad104 100644 --- a/src/content/reference/en/p5.Geometry/clearColors.mdx +++ b/src/content/reference/en/p5.Geometry/clearColors.mdx @@ -11,6 +11,7 @@ description: > If clearColors() is not used, the shapes will use their internal colors by ignoring fill().

+isConstructor: false line: 123 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Geometry/computeFaces.mdx b/src/content/reference/en/p5.Geometry/computeFaces.mdx index e44d0cc2f5..df5d13919f 100644 --- a/src/content/reference/en/p5.Geometry/computeFaces.mdx +++ b/src/content/reference/en/p5.Geometry/computeFaces.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/p5.Geometry.js description: |

computes faces for geometry objects based on the vertices.

+isConstructor: false line: 321 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Geometry/computeNormals.mdx b/src/content/reference/en/p5.Geometry/computeNormals.mdx index 498f5cd723..41d7438e1d 100644 --- a/src/content/reference/en/p5.Geometry/computeNormals.mdx +++ b/src/content/reference/en/p5.Geometry/computeNormals.mdx @@ -23,6 +23,7 @@ description: > Defaults to 3. +isConstructor: false line: 364 params: - name: shadingType @@ -38,6 +39,11 @@ params: type: Object optional: true itemtype: method +alt: >- + A star-like geometry, here the computeNormals(SMOOTH) is applied for a smooth + shading effect. + + This helps to avoid the faceted appearance that can occur with flat shading. class: p5.Geometry example: - |- @@ -114,11 +120,6 @@ example: } -alt: >- - A star-like geometry, here the computeNormals(SMOOTH) is applied for a smooth - shading effect. - - This helps to avoid the faceted appearance that can occur with flat shading. chainable: true --- diff --git a/src/content/reference/en/p5.Geometry/flipU.mdx b/src/content/reference/en/p5.Geometry/flipU.mdx index 6b2f425e5c..65436055a4 100644 --- a/src/content/reference/en/p5.Geometry/flipU.mdx +++ b/src/content/reference/en/p5.Geometry/flipU.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/p5.Geometry.js description: |

Flips the U texture coordinates of the model.

+isConstructor: false line: 177 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Geometry/flipV.mdx b/src/content/reference/en/p5.Geometry/flipV.mdx index d0b884f443..158515c441 100644 --- a/src/content/reference/en/p5.Geometry/flipV.mdx +++ b/src/content/reference/en/p5.Geometry/flipV.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/p5.Geometry.js description: |

Flips the V texture coordinates of the model.

+isConstructor: false line: 249 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Geometry/normalize.mdx b/src/content/reference/en/p5.Geometry/normalize.mdx index b85d409114..a6aefeb7c2 100644 --- a/src/content/reference/en/p5.Geometry/normalize.mdx +++ b/src/content/reference/en/p5.Geometry/normalize.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/p5.Geometry.js description: |

Modifies all vertices to be centered within the range -100 to 100.

+isConstructor: false line: 866 itemtype: method class: p5.Geometry diff --git a/src/content/reference/en/p5.Graphics/createFramebuffer.mdx b/src/content/reference/en/p5.Graphics/createFramebuffer.mdx index 6104f3cead..3b3a3bfd80 100644 --- a/src/content/reference/en/p5.Graphics/createFramebuffer.mdx +++ b/src/content/reference/en/p5.Graphics/createFramebuffer.mdx @@ -12,6 +12,7 @@ description: > href="#/p5/createFramebuffer">global createFramebuffer function.

+isConstructor: false line: 199 itemtype: method class: p5.Graphics diff --git a/src/content/reference/en/p5.Graphics/remove.mdx b/src/content/reference/en/p5.Graphics/remove.mdx index 692a111021..7338b0751e 100644 --- a/src/content/reference/en/p5.Graphics/remove.mdx +++ b/src/content/reference/en/p5.Graphics/remove.mdx @@ -6,8 +6,12 @@ file: src/core/p5.Graphics.js description: |

Removes a Graphics object from the page and frees any resources associated with it.

+isConstructor: false line: 131 itemtype: method +alt: |- + no image + a multi-colored circle moving back and forth over a scrolling background. class: p5.Graphics example: - |- @@ -54,9 +58,6 @@ example: } } -alt: |- - no image - a multi-colored circle moving back and forth over a scrolling background. chainable: false --- diff --git a/src/content/reference/en/p5.Graphics/reset.mdx b/src/content/reference/en/p5.Graphics/reset.mdx index d0cf8d6950..b49a91c2c1 100644 --- a/src/content/reference/en/p5.Graphics/reset.mdx +++ b/src/content/reference/en/p5.Graphics/reset.mdx @@ -13,8 +13,16 @@ description: > will copy the behavior of the standard canvas.

+isConstructor: false line: 79 itemtype: method +alt: >- + A white line on a black background stays still on the top-left half. + + A black line animates from top to bottom on a white background on the right + half. + + When clicked, the black line starts back over at the top. class: p5.Graphics example: - |- @@ -50,13 +58,6 @@ example: pg.reset(); } -alt: >- - A white line on a black background stays still on the top-left half. - - A black line animates from top to bottom on a white background on the right - half. - - When clicked, the black line starts back over at the top. chainable: false --- diff --git a/src/content/reference/en/p5.Image/blend.mdx b/src/content/reference/en/p5.Image/blend.mdx index 6aa5bdbbeb..63bc0235e9 100644 --- a/src/content/reference/en/p5.Image/blend.mdx +++ b/src/content/reference/en/p5.Image/blend.mdx @@ -10,6 +10,7 @@ description: > blendMode parameter blends the images' colors to create different effects.

+isConstructor: false line: 1107 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/copy.mdx b/src/content/reference/en/p5.Image/copy.mdx index 78f692d665..723d9f50d4 100644 --- a/src/content/reference/en/p5.Image/copy.mdx +++ b/src/content/reference/en/p5.Image/copy.mdx @@ -7,6 +7,7 @@ description: |

Copies pixels from a source p5.Image to this one. Calling img.copy() will scale pixels from the source region if it isn't the same size as the destination region.

+isConstructor: false line: 770 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/delay.mdx b/src/content/reference/en/p5.Image/delay.mdx index 9153613d73..937bfab65f 100644 --- a/src/content/reference/en/p5.Image/delay.mdx +++ b/src/content/reference/en/p5.Image/delay.mdx @@ -12,6 +12,7 @@ description: > at index will have its delay modified. All other frames will keep their default delay.

+isConstructor: false line: 1521 params: - name: d diff --git a/src/content/reference/en/p5.Image/filter.mdx b/src/content/reference/en/p5.Image/filter.mdx index 0d7985ddc8..8f4bce0595 100644 --- a/src/content/reference/en/p5.Image/filter.mdx +++ b/src/content/reference/en/p5.Image/filter.mdx @@ -29,6 +29,7 @@ description: | Reduces the light areas. No parameter is used.

DILATE Increases the light areas. No parameter is used.

+isConstructor: false line: 926 params: - name: filterType diff --git a/src/content/reference/en/p5.Image/get.mdx b/src/content/reference/en/p5.Image/get.mdx index df8517f5d4..5b66fbd177 100644 --- a/src/content/reference/en/p5.Image/get.mdx +++ b/src/content/reference/en/p5.Image/get.mdx @@ -39,6 +39,7 @@ description: >

Use img.get() to work directly with p5.Image objects.

+isConstructor: false line: 430 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/getCurrentFrame.mdx b/src/content/reference/en/p5.Image/getCurrentFrame.mdx index 8c509dba93..1f37bf388b 100644 --- a/src/content/reference/en/p5.Image/getCurrentFrame.mdx +++ b/src/content/reference/en/p5.Image/getCurrentFrame.mdx @@ -5,6 +5,7 @@ submodule: Image file: src/image/p5.Image.js description: |

Gets the index of the current frame in an animated GIF.

+isConstructor: false line: 1334 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/height.mdx b/src/content/reference/en/p5.Image/height.mdx index 4850ac7d93..8b734f45e1 100644 --- a/src/content/reference/en/p5.Image/height.mdx +++ b/src/content/reference/en/p5.Image/height.mdx @@ -5,6 +5,7 @@ submodule: Image file: src/image/p5.Image.js description: |

Image height.

+isConstructor: false line: 117 itemtype: property class: p5.Image diff --git a/src/content/reference/en/p5.Image/loadPixels.mdx b/src/content/reference/en/p5.Image/loadPixels.mdx index 7799b80a7e..a8f4cb3ccf 100644 --- a/src/content/reference/en/p5.Image/loadPixels.mdx +++ b/src/content/reference/en/p5.Image/loadPixels.mdx @@ -10,6 +10,7 @@ description: > array. This method must be called before reading or modifying pixel values.

+isConstructor: false line: 308 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/mask.mdx b/src/content/reference/en/p5.Image/mask.mdx index 781506c69c..d8a87ac072 100644 --- a/src/content/reference/en/p5.Image/mask.mdx +++ b/src/content/reference/en/p5.Image/mask.mdx @@ -8,6 +8,7 @@ description: | image and using its alpha channel as an alpha channel for this image. Masks are cumulative, once applied to an image object, they cannot be removed.

+isConstructor: false line: 845 params: - name: srcImage diff --git a/src/content/reference/en/p5.Image/numFrames.mdx b/src/content/reference/en/p5.Image/numFrames.mdx index c28d994867..304093a1ac 100644 --- a/src/content/reference/en/p5.Image/numFrames.mdx +++ b/src/content/reference/en/p5.Image/numFrames.mdx @@ -5,6 +5,7 @@ submodule: Image file: src/image/p5.Image.js description: |

Returns the number of frames in an animated GIF.

+isConstructor: false line: 1413 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/pause.mdx b/src/content/reference/en/p5.Image/pause.mdx index d444b693ba..5a447861be 100644 --- a/src/content/reference/en/p5.Image/pause.mdx +++ b/src/content/reference/en/p5.Image/pause.mdx @@ -6,6 +6,7 @@ file: src/image/p5.Image.js description: |

Pauses an animated GIF. The GIF can be resumed by calling img.play().

+isConstructor: false line: 1483 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/pixelDensity.mdx b/src/content/reference/en/p5.Image/pixelDensity.mdx index cec2c4aa00..497c644dda 100644 --- a/src/content/reference/en/p5.Image/pixelDensity.mdx +++ b/src/content/reference/en/p5.Image/pixelDensity.mdx @@ -9,6 +9,7 @@ description: |

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.

+isConstructor: false line: 227 params: - name: density diff --git a/src/content/reference/en/p5.Image/pixels.mdx b/src/content/reference/en/p5.Image/pixels.mdx index bf130ec069..45a43d1984 100644 --- a/src/content/reference/en/p5.Image/pixels.mdx +++ b/src/content/reference/en/p5.Image/pixels.mdx @@ -44,6 +44,7 @@ description: > img.updatePixels() method must be called after any changes are made.

+isConstructor: false line: 155 itemtype: property class: p5.Image diff --git a/src/content/reference/en/p5.Image/play.mdx b/src/content/reference/en/p5.Image/play.mdx index cdc266108a..e514e8b783 100644 --- a/src/content/reference/en/p5.Image/play.mdx +++ b/src/content/reference/en/p5.Image/play.mdx @@ -6,6 +6,7 @@ file: src/image/p5.Image.js description: |

Plays an animated GIF that was paused with img.pause().

+isConstructor: false line: 1445 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/reset.mdx b/src/content/reference/en/p5.Image/reset.mdx index 33bdfab8e6..015c01b27f 100644 --- a/src/content/reference/en/p5.Image/reset.mdx +++ b/src/content/reference/en/p5.Image/reset.mdx @@ -5,6 +5,7 @@ submodule: Image file: src/image/p5.Image.js description: |

Restarts an animated GIF at its first frame.

+isConstructor: false line: 1295 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/resize.mdx b/src/content/reference/en/p5.Image/resize.mdx index b0331a841a..47dc943fb1 100644 --- a/src/content/reference/en/p5.Image/resize.mdx +++ b/src/content/reference/en/p5.Image/resize.mdx @@ -16,6 +16,7 @@ description: > on an image that was 500 × 300 pixels will resize it to 50 × 30 pixels.

+isConstructor: false line: 626 params: - name: width diff --git a/src/content/reference/en/p5.Image/save.mdx b/src/content/reference/en/p5.Image/save.mdx index a6d3aca42e..402adad0cf 100644 --- a/src/content/reference/en/p5.Image/save.mdx +++ b/src/content/reference/en/p5.Image/save.mdx @@ -30,6 +30,7 @@ description: > p5.Image object was loaded from a GIF file. See saveGif() to create new GIFs.

+isConstructor: false line: 1238 params: - name: filename diff --git a/src/content/reference/en/p5.Image/set.mdx b/src/content/reference/en/p5.Image/set.mdx index 363c66054e..b1f2d087f0 100644 --- a/src/content/reference/en/p5.Image/set.mdx +++ b/src/content/reference/en/p5.Image/set.mdx @@ -27,6 +27,7 @@ description: >

img.updatePixels() must be called after using img.set() for changes to appear.

+isConstructor: false line: 535 params: - name: x diff --git a/src/content/reference/en/p5.Image/setFrame.mdx b/src/content/reference/en/p5.Image/setFrame.mdx index 662937751e..ab530808a5 100644 --- a/src/content/reference/en/p5.Image/setFrame.mdx +++ b/src/content/reference/en/p5.Image/setFrame.mdx @@ -5,6 +5,7 @@ submodule: Image file: src/image/p5.Image.js description: |

Sets the current frame in an animated GIF.

+isConstructor: false line: 1365 params: - name: index diff --git a/src/content/reference/en/p5.Image/updatePixels.mdx b/src/content/reference/en/p5.Image/updatePixels.mdx index 6537729e5a..72e6ecca9b 100644 --- a/src/content/reference/en/p5.Image/updatePixels.mdx +++ b/src/content/reference/en/p5.Image/updatePixels.mdx @@ -31,6 +31,7 @@ description: > then calling img.updatePixels() will update the pixels in current frame.

+isConstructor: false line: 358 itemtype: method class: p5.Image diff --git a/src/content/reference/en/p5.Image/width.mdx b/src/content/reference/en/p5.Image/width.mdx index 0bc78fb633..55d832cd14 100644 --- a/src/content/reference/en/p5.Image/width.mdx +++ b/src/content/reference/en/p5.Image/width.mdx @@ -5,6 +5,7 @@ submodule: Image file: src/image/p5.Image.js description: |

Image width.

+isConstructor: false line: 89 itemtype: property class: p5.Image diff --git a/src/content/reference/en/p5.MediaElement/addCue.mdx b/src/content/reference/en/p5.MediaElement/addCue.mdx index f0db92384f..f4c658a0d1 100644 --- a/src/content/reference/en/p5.MediaElement/addCue.mdx +++ b/src/content/reference/en/p5.MediaElement/addCue.mdx @@ -28,6 +28,7 @@ description: > useful for removing the cue later.

+isConstructor: false line: 4696 params: - name: time diff --git a/src/content/reference/en/p5.MediaElement/autoplay.mdx b/src/content/reference/en/p5.MediaElement/autoplay.mdx index 51fc9a2771..63856afd3b 100644 --- a/src/content/reference/en/p5.MediaElement/autoplay.mdx +++ b/src/content/reference/en/p5.MediaElement/autoplay.mdx @@ -16,6 +16,7 @@ description: > media will automatically play. If false is passed, as in media.autoPlay(false), it won't play automatically.

+isConstructor: false line: 4055 params: - name: shouldAutoplay diff --git a/src/content/reference/en/p5.MediaElement/clearCues.mdx b/src/content/reference/en/p5.MediaElement/clearCues.mdx index 7812ab2f2d..e2553f1d8a 100644 --- a/src/content/reference/en/p5.MediaElement/clearCues.mdx +++ b/src/content/reference/en/p5.MediaElement/clearCues.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Removes all functions scheduled with media.addCue().

+isConstructor: false line: 4820 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/connect.mdx b/src/content/reference/en/p5.MediaElement/connect.mdx index ca7660be01..dd7698db82 100644 --- a/src/content/reference/en/p5.MediaElement/connect.mdx +++ b/src/content/reference/en/p5.MediaElement/connect.mdx @@ -9,6 +9,7 @@ description: | output. That connection is established when this method is first called. All connections are removed by the .disconnect() method.

This method is meant to be used with the p5.sound.js addon library.

+isConstructor: false line: 4547 params: - name: audioNode diff --git a/src/content/reference/en/p5.MediaElement/disconnect.mdx b/src/content/reference/en/p5.MediaElement/disconnect.mdx index a6d957a0bf..f5899698cb 100644 --- a/src/content/reference/en/p5.MediaElement/disconnect.mdx +++ b/src/content/reference/en/p5.MediaElement/disconnect.mdx @@ -7,6 +7,7 @@ description: |

Disconnect all Web Audio routing, including to main output. This is useful if you want to re-route the output through audio effects, for example.

+isConstructor: false line: 4596 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/duration.mdx b/src/content/reference/en/p5.MediaElement/duration.mdx index fd77d6e4ee..9868fe4cff 100644 --- a/src/content/reference/en/p5.MediaElement/duration.mdx +++ b/src/content/reference/en/p5.MediaElement/duration.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Returns the audio/video's duration in seconds.

+isConstructor: false line: 4339 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/hideControls.mdx b/src/content/reference/en/p5.MediaElement/hideControls.mdx index 1b87ccadc1..1f2c644672 100644 --- a/src/content/reference/en/p5.MediaElement/hideControls.mdx +++ b/src/content/reference/en/p5.MediaElement/hideControls.mdx @@ -10,6 +10,7 @@ description: > target="_blank">HTMLMediaElement controls.

+isConstructor: false line: 4645 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/loop.mdx b/src/content/reference/en/p5.MediaElement/loop.mdx index ab58372818..6a3668539a 100644 --- a/src/content/reference/en/p5.MediaElement/loop.mdx +++ b/src/content/reference/en/p5.MediaElement/loop.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Play the audio/video repeatedly in a loop.

+isConstructor: false line: 3922 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/noLoop.mdx b/src/content/reference/en/p5.MediaElement/noLoop.mdx index 80bb940647..015a303361 100644 --- a/src/content/reference/en/p5.MediaElement/noLoop.mdx +++ b/src/content/reference/en/p5.MediaElement/noLoop.mdx @@ -6,6 +6,7 @@ file: src/dom/dom.js description: |

Stops the audio/video from playing in a loop. It will stop when it reaches the end.

+isConstructor: false line: 3978 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/onended.mdx b/src/content/reference/en/p5.MediaElement/onended.mdx index 0ed92f6ecc..0d39a68b2e 100644 --- a/src/content/reference/en/p5.MediaElement/onended.mdx +++ b/src/content/reference/en/p5.MediaElement/onended.mdx @@ -10,6 +10,7 @@ description: >

The p5.MediaElement is passed as an argument to the callback function.

+isConstructor: false line: 4482 params: - name: callback diff --git a/src/content/reference/en/p5.MediaElement/pause.mdx b/src/content/reference/en/p5.MediaElement/pause.mdx index fede2ad855..c5db87afe4 100644 --- a/src/content/reference/en/p5.MediaElement/pause.mdx +++ b/src/content/reference/en/p5.MediaElement/pause.mdx @@ -8,6 +8,7 @@ description: > playing audio/video from the moment it paused.

+isConstructor: false line: 3867 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/play.mdx b/src/content/reference/en/p5.MediaElement/play.mdx index f79cbd317a..a70cf474fd 100644 --- a/src/content/reference/en/p5.MediaElement/play.mdx +++ b/src/content/reference/en/p5.MediaElement/play.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Play audio or video from a media element.

+isConstructor: false line: 3753 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/removeCue.mdx b/src/content/reference/en/p5.MediaElement/removeCue.mdx index 04d423d8c0..c074135250 100644 --- a/src/content/reference/en/p5.MediaElement/removeCue.mdx +++ b/src/content/reference/en/p5.MediaElement/removeCue.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Remove a callback based on its ID.

+isConstructor: false line: 4756 params: - name: id diff --git a/src/content/reference/en/p5.MediaElement/showControls.mdx b/src/content/reference/en/p5.MediaElement/showControls.mdx index 652f594d5f..b5fd31c8b8 100644 --- a/src/content/reference/en/p5.MediaElement/showControls.mdx +++ b/src/content/reference/en/p5.MediaElement/showControls.mdx @@ -10,6 +10,7 @@ description: > target="_blank">HTMLMediaElement controls. These vary between web browser.

+isConstructor: false line: 4613 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/speed.mdx b/src/content/reference/en/p5.MediaElement/speed.mdx index dbbba03ac6..b7889d45a9 100644 --- a/src/content/reference/en/p5.MediaElement/speed.mdx +++ b/src/content/reference/en/p5.MediaElement/speed.mdx @@ -21,6 +21,7 @@ description: >

Note: Not all browsers support backward playback. Even if they do, playback might not be smooth.

+isConstructor: false line: 4188 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/src.mdx b/src/content/reference/en/p5.MediaElement/src.mdx index dc173cf3f1..51f232792d 100644 --- a/src/content/reference/en/p5.MediaElement/src.mdx +++ b/src/content/reference/en/p5.MediaElement/src.mdx @@ -5,6 +5,7 @@ submodule: DOM file: src/dom/dom.js description: |

Path to the media element's source as a string.

+isConstructor: false line: 3699 itemtype: property class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/stop.mdx b/src/content/reference/en/p5.MediaElement/stop.mdx index 3aef42b5dd..aa19f45595 100644 --- a/src/content/reference/en/p5.MediaElement/stop.mdx +++ b/src/content/reference/en/p5.MediaElement/stop.mdx @@ -8,6 +8,7 @@ description: > media.play() will restart playing audio/video from the beginning.

+isConstructor: false line: 3813 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/time.mdx b/src/content/reference/en/p5.MediaElement/time.mdx index 7fad6107b8..12eb28c06b 100644 --- a/src/content/reference/en/p5.MediaElement/time.mdx +++ b/src/content/reference/en/p5.MediaElement/time.mdx @@ -15,6 +15,7 @@ description: > the time, in seconds, to jump to when playback begins.

+isConstructor: false line: 4255 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MediaElement/volume.mdx b/src/content/reference/en/p5.MediaElement/volume.mdx index 9bfe6a8dcd..a1ee4d4105 100644 --- a/src/content/reference/en/p5.MediaElement/volume.mdx +++ b/src/content/reference/en/p5.MediaElement/volume.mdx @@ -18,6 +18,7 @@ description: > media.volume(0.5) sets the volume to half of its maximum.

+isConstructor: false line: 4128 itemtype: method class: p5.MediaElement diff --git a/src/content/reference/en/p5.MonoSynth/amp.mdx b/src/content/reference/en/p5.MonoSynth/amp.mdx index 10c68675ba..01a44fa209 100644 --- a/src/content/reference/en/p5.MonoSynth/amp.mdx +++ b/src/content/reference/en/p5.MonoSynth/amp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

MonoSynth amp

+isConstructor: false line: 11544 params: - name: vol diff --git a/src/content/reference/en/p5.MonoSynth/attack.mdx b/src/content/reference/en/p5.MonoSynth/attack.mdx index b158ce2fff..621275c889 100644 --- a/src/content/reference/en/p5.MonoSynth/attack.mdx +++ b/src/content/reference/en/p5.MonoSynth/attack.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getters and Setters

+isConstructor: false line: 11322 itemtype: property class: p5.MonoSynth diff --git a/src/content/reference/en/p5.MonoSynth/connect.mdx b/src/content/reference/en/p5.MonoSynth/connect.mdx index 495205d1b1..d7052dbea7 100644 --- a/src/content/reference/en/p5.MonoSynth/connect.mdx +++ b/src/content/reference/en/p5.MonoSynth/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect to a p5.sound / Web Audio object.

+isConstructor: false line: 11564 params: - name: unit diff --git a/src/content/reference/en/p5.MonoSynth/decay.mdx b/src/content/reference/en/p5.MonoSynth/decay.mdx index f83a38cbba..a02f060ae2 100644 --- a/src/content/reference/en/p5.MonoSynth/decay.mdx +++ b/src/content/reference/en/p5.MonoSynth/decay.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 11328 itemtype: property class: p5.MonoSynth diff --git a/src/content/reference/en/p5.MonoSynth/disconnect.mdx b/src/content/reference/en/p5.MonoSynth/disconnect.mdx index 38a5031db4..323b753904 100644 --- a/src/content/reference/en/p5.MonoSynth/disconnect.mdx +++ b/src/content/reference/en/p5.MonoSynth/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all outputs

+isConstructor: false line: 11578 itemtype: method class: p5.MonoSynth diff --git a/src/content/reference/en/p5.MonoSynth/dispose.mdx b/src/content/reference/en/p5.MonoSynth/dispose.mdx index ac715ca3c0..8a0e19b3a2 100644 --- a/src/content/reference/en/p5.MonoSynth/dispose.mdx +++ b/src/content/reference/en/p5.MonoSynth/dispose.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get rid of the MonoSynth and free up its resources / memory.

+isConstructor: false line: 11592 itemtype: method class: p5.MonoSynth diff --git a/src/content/reference/en/p5.MonoSynth/play.mdx b/src/content/reference/en/p5.MonoSynth/play.mdx index bdd0ead768..e1b3aa6b13 100644 --- a/src/content/reference/en/p5.MonoSynth/play.mdx +++ b/src/content/reference/en/p5.MonoSynth/play.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Play tells the MonoSynth to start playing a note. This method schedules the calling of .triggerAttack and .triggerRelease.

+isConstructor: false line: 11379 params: - name: note diff --git a/src/content/reference/en/p5.MonoSynth/release.mdx b/src/content/reference/en/p5.MonoSynth/release.mdx index 7b24c42339..f4b81b9173 100644 --- a/src/content/reference/en/p5.MonoSynth/release.mdx +++ b/src/content/reference/en/p5.MonoSynth/release.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 11338 itemtype: property class: p5.MonoSynth diff --git a/src/content/reference/en/p5.MonoSynth/setADSR.mdx b/src/content/reference/en/p5.MonoSynth/setADSR.mdx index 31f7c06c2e..4f6e762f5d 100644 --- a/src/content/reference/en/p5.MonoSynth/setADSR.mdx +++ b/src/content/reference/en/p5.MonoSynth/setADSR.mdx @@ -12,6 +12,7 @@ description: > ADSR envelope .

+isConstructor: false line: 11516 params: - name: attackTime diff --git a/src/content/reference/en/p5.MonoSynth/sustain.mdx b/src/content/reference/en/p5.MonoSynth/sustain.mdx index 7ef6e79489..813800d089 100644 --- a/src/content/reference/en/p5.MonoSynth/sustain.mdx +++ b/src/content/reference/en/p5.MonoSynth/sustain.mdx @@ -4,6 +4,7 @@ module: p5.sound submodule: p5.sound file: lib/addons/p5.sound.js description: '' +isConstructor: false line: 11333 itemtype: property class: p5.MonoSynth diff --git a/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx b/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx index 64d0a506e5..3c0e795948 100644 --- a/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx +++ b/src/content/reference/en/p5.MonoSynth/triggerAttack.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 11431 params: - name: note diff --git a/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx b/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx index c11221e461..45a3af1925 100644 --- a/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx +++ b/src/content/reference/en/p5.MonoSynth/triggerRelease.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 11478 params: - name: secondsFromNow diff --git a/src/content/reference/en/p5.Noise/setType.mdx b/src/content/reference/en/p5.Noise/setType.mdx index bb315dca89..416e8c4a9e 100644 --- a/src/content/reference/en/p5.Noise/setType.mdx +++ b/src/content/reference/en/p5.Noise/setType.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Set type of noise to 'white', 'pink' or 'brown'. White is the default.

+isConstructor: false line: 5657 params: - name: type diff --git a/src/content/reference/en/p5.NumberDict/add.mdx b/src/content/reference/en/p5.NumberDict/add.mdx index 47c2df72a1..186326144f 100644 --- a/src/content/reference/en/p5.NumberDict/add.mdx +++ b/src/content/reference/en/p5.NumberDict/add.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js 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.

+isConstructor: false line: 439 params: - name: Key diff --git a/src/content/reference/en/p5.NumberDict/div.mdx b/src/content/reference/en/p5.NumberDict/div.mdx index 1bfda5b46c..113c6d9b66 100644 --- a/src/content/reference/en/p5.NumberDict/div.mdx +++ b/src/content/reference/en/p5.NumberDict/div.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js description: |

Divide the given number with the value currently stored at the given key. The quotient then replaces the value previously stored in the Dictionary.

+isConstructor: false line: 516 params: - name: Key diff --git a/src/content/reference/en/p5.NumberDict/maxKey.mdx b/src/content/reference/en/p5.NumberDict/maxKey.mdx index 2697f38108..b05e330cf6 100644 --- a/src/content/reference/en/p5.NumberDict/maxKey.mdx +++ b/src/content/reference/en/p5.NumberDict/maxKey.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Return the highest key currently used in the Dictionary.

+isConstructor: false line: 649 itemtype: method class: p5.NumberDict diff --git a/src/content/reference/en/p5.NumberDict/maxValue.mdx b/src/content/reference/en/p5.NumberDict/maxValue.mdx index 901cbf4327..e5e8f14e61 100644 --- a/src/content/reference/en/p5.NumberDict/maxValue.mdx +++ b/src/content/reference/en/p5.NumberDict/maxValue.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Return the highest number currently stored in the Dictionary.

+isConstructor: false line: 587 itemtype: method class: p5.NumberDict diff --git a/src/content/reference/en/p5.NumberDict/minKey.mdx b/src/content/reference/en/p5.NumberDict/minKey.mdx index 10a9d6b22d..8f2a1f6dd5 100644 --- a/src/content/reference/en/p5.NumberDict/minKey.mdx +++ b/src/content/reference/en/p5.NumberDict/minKey.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Return the lowest key currently used in the Dictionary.

+isConstructor: false line: 629 itemtype: method class: p5.NumberDict diff --git a/src/content/reference/en/p5.NumberDict/minValue.mdx b/src/content/reference/en/p5.NumberDict/minValue.mdx index 6dcc50921d..90c4855323 100644 --- a/src/content/reference/en/p5.NumberDict/minValue.mdx +++ b/src/content/reference/en/p5.NumberDict/minValue.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Return the lowest number currently stored in the Dictionary.

+isConstructor: false line: 567 itemtype: method class: p5.NumberDict diff --git a/src/content/reference/en/p5.NumberDict/mult.mdx b/src/content/reference/en/p5.NumberDict/mult.mdx index a233f12b19..0c366ca24e 100644 --- a/src/content/reference/en/p5.NumberDict/mult.mdx +++ b/src/content/reference/en/p5.NumberDict/mult.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js description: |

Multiply the given number with the value currently stored at the given key. The product then replaces the value previously stored in the Dictionary.

+isConstructor: false line: 489 params: - name: Key diff --git a/src/content/reference/en/p5.NumberDict/sub.mdx b/src/content/reference/en/p5.NumberDict/sub.mdx index 6a7873ea30..5cc775ecc4 100644 --- a/src/content/reference/en/p5.NumberDict/sub.mdx +++ b/src/content/reference/en/p5.NumberDict/sub.mdx @@ -8,6 +8,7 @@ description: > The difference then replaces the value previously stored in the Dictionary.

+isConstructor: false line: 466 params: - name: Key diff --git a/src/content/reference/en/p5.Oscillator/add.mdx b/src/content/reference/en/p5.Oscillator/add.mdx index 12820b52f4..ce2614c15f 100644 --- a/src/content/reference/en/p5.Oscillator/add.mdx +++ b/src/content/reference/en/p5.Oscillator/add.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 4522 params: - name: number diff --git a/src/content/reference/en/p5.Oscillator/amp.mdx b/src/content/reference/en/p5.Oscillator/amp.mdx index 798f1063d3..7dcb053014 100644 --- a/src/content/reference/en/p5.Oscillator/amp.mdx +++ b/src/content/reference/en/p5.Oscillator/amp.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 4238 params: - name: vol diff --git a/src/content/reference/en/p5.Oscillator/connect.mdx b/src/content/reference/en/p5.Oscillator/connect.mdx index 761d94fbc9..ad7aa5731c 100644 --- a/src/content/reference/en/p5.Oscillator/connect.mdx +++ b/src/content/reference/en/p5.Oscillator/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect to a p5.sound / Web Audio object.

+isConstructor: false line: 4399 params: - name: unit diff --git a/src/content/reference/en/p5.Oscillator/disconnect.mdx b/src/content/reference/en/p5.Oscillator/disconnect.mdx index 3d82d1f971..54a40742b6 100644 --- a/src/content/reference/en/p5.Oscillator/disconnect.mdx +++ b/src/content/reference/en/p5.Oscillator/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all outputs

+isConstructor: false line: 4420 itemtype: method class: p5.Oscillator diff --git a/src/content/reference/en/p5.Oscillator/freq.mdx b/src/content/reference/en/p5.Oscillator/freq.mdx index 849f8af45c..442e231e53 100644 --- a/src/content/reference/en/p5.Oscillator/freq.mdx +++ b/src/content/reference/en/p5.Oscillator/freq.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js 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.

+isConstructor: false line: 4285 params: - name: Frequency diff --git a/src/content/reference/en/p5.Oscillator/getAmp.mdx b/src/content/reference/en/p5.Oscillator/getAmp.mdx index 950d68048c..d17ffa90f5 100644 --- a/src/content/reference/en/p5.Oscillator/getAmp.mdx +++ b/src/content/reference/en/p5.Oscillator/getAmp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Returns the value of output gain

+isConstructor: false line: 4271 itemtype: method class: p5.Oscillator diff --git a/src/content/reference/en/p5.Oscillator/getFreq.mdx b/src/content/reference/en/p5.Oscillator/getFreq.mdx index b944db613f..292d17930f 100644 --- a/src/content/reference/en/p5.Oscillator/getFreq.mdx +++ b/src/content/reference/en/p5.Oscillator/getFreq.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Returns the value of frequency of oscillator

+isConstructor: false line: 4360 itemtype: method class: p5.Oscillator diff --git a/src/content/reference/en/p5.Oscillator/getPan.mdx b/src/content/reference/en/p5.Oscillator/getPan.mdx index 33ea31b7c2..d826c508dc 100644 --- a/src/content/reference/en/p5.Oscillator/getPan.mdx +++ b/src/content/reference/en/p5.Oscillator/getPan.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

Returns the current value of panPosition , between Left (-1) and Right (1)

+isConstructor: false line: 4460 itemtype: method class: p5.Oscillator diff --git a/src/content/reference/en/p5.Oscillator/getType.mdx b/src/content/reference/en/p5.Oscillator/getType.mdx index 53cb0111ed..e2b333d3af 100644 --- a/src/content/reference/en/p5.Oscillator/getType.mdx +++ b/src/content/reference/en/p5.Oscillator/getType.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' or 'square'.

+isConstructor: false line: 4386 itemtype: method class: p5.Oscillator diff --git a/src/content/reference/en/p5.Oscillator/mult.mdx b/src/content/reference/en/p5.Oscillator/mult.mdx index 8c1554c536..2a4ece383e 100644 --- a/src/content/reference/en/p5.Oscillator/mult.mdx +++ b/src/content/reference/en/p5.Oscillator/mult.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 4543 params: - name: number diff --git a/src/content/reference/en/p5.Oscillator/pan.mdx b/src/content/reference/en/p5.Oscillator/pan.mdx index 60fb0b3e71..8051c5df34 100644 --- a/src/content/reference/en/p5.Oscillator/pan.mdx +++ b/src/content/reference/en/p5.Oscillator/pan.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Pan between Left (-1) and Right (1)

+isConstructor: false line: 4444 params: - name: panning diff --git a/src/content/reference/en/p5.Oscillator/phase.mdx b/src/content/reference/en/p5.Oscillator/phase.mdx index 14753cbd94..ea47709421 100644 --- a/src/content/reference/en/p5.Oscillator/phase.mdx +++ b/src/content/reference/en/p5.Oscillator/phase.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 4494 params: - name: phase diff --git a/src/content/reference/en/p5.Oscillator/scale.mdx b/src/content/reference/en/p5.Oscillator/scale.mdx index 43ccb1c9f5..1a50e26eb4 100644 --- a/src/content/reference/en/p5.Oscillator/scale.mdx +++ b/src/content/reference/en/p5.Oscillator/scale.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 4563 params: - name: inMin diff --git a/src/content/reference/en/p5.Oscillator/setType.mdx b/src/content/reference/en/p5.Oscillator/setType.mdx index 1be1ef7a67..9ba965ee84 100644 --- a/src/content/reference/en/p5.Oscillator/setType.mdx +++ b/src/content/reference/en/p5.Oscillator/setType.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set type to 'sine', 'triangle', 'sawtooth' or 'square'.

+isConstructor: false line: 4373 params: - name: type diff --git a/src/content/reference/en/p5.Oscillator/start.mdx b/src/content/reference/en/p5.Oscillator/start.mdx index 8c8c307e90..37948ede01 100644 --- a/src/content/reference/en/p5.Oscillator/start.mdx +++ b/src/content/reference/en/p5.Oscillator/start.mdx @@ -8,6 +8,7 @@ description: |

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().

+isConstructor: false line: 4168 params: - name: time diff --git a/src/content/reference/en/p5.Oscillator/stop.mdx b/src/content/reference/en/p5.Oscillator/stop.mdx index c8a25c1ef7..05457c80da 100644 --- a/src/content/reference/en/p5.Oscillator/stop.mdx +++ b/src/content/reference/en/p5.Oscillator/stop.mdx @@ -7,6 +7,7 @@ description: |

Stop an oscillator. Accepts an optional parameter to determine how long (in seconds from now) until the oscillator stops.

+isConstructor: false line: 4218 params: - name: secondsFromNow diff --git a/src/content/reference/en/p5.Panner3D/maxDist.mdx b/src/content/reference/en/p5.Panner3D/maxDist.mdx index 273555a238..d8528bc378 100644 --- a/src/content/reference/en/p5.Panner3D/maxDist.mdx +++ b/src/content/reference/en/p5.Panner3D/maxDist.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Maxium distance between the source and the listener

+isConstructor: false line: 7852 params: - name: maxDistance diff --git a/src/content/reference/en/p5.Panner3D/orient.mdx b/src/content/reference/en/p5.Panner3D/orient.mdx index 33aaf5a75c..eb412e455d 100644 --- a/src/content/reference/en/p5.Panner3D/orient.mdx +++ b/src/content/reference/en/p5.Panner3D/orient.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the X,Y,Z position of the Panner

+isConstructor: false line: 7753 params: - name: xVal diff --git a/src/content/reference/en/p5.Panner3D/orientX.mdx b/src/content/reference/en/p5.Panner3D/orientX.mdx index 7f5b7d20e1..b821c43170 100644 --- a/src/content/reference/en/p5.Panner3D/orientX.mdx +++ b/src/content/reference/en/p5.Panner3D/orientX.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getter and setter methods for orient coordinates

+isConstructor: false line: 7772 itemtype: method class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/orientY.mdx b/src/content/reference/en/p5.Panner3D/orientY.mdx index 0e09027e16..d62b51523b 100644 --- a/src/content/reference/en/p5.Panner3D/orientY.mdx +++ b/src/content/reference/en/p5.Panner3D/orientY.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getter and setter methods for orient coordinates

+isConstructor: false line: 7779 itemtype: method class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/orientZ.mdx b/src/content/reference/en/p5.Panner3D/orientZ.mdx index de23e27964..759aa51e89 100644 --- a/src/content/reference/en/p5.Panner3D/orientZ.mdx +++ b/src/content/reference/en/p5.Panner3D/orientZ.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getter and setter methods for orient coordinates

+isConstructor: false line: 7786 itemtype: method class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/panner.mdx b/src/content/reference/en/p5.Panner3D/panner.mdx index e7e2161429..e07ff8e723 100644 --- a/src/content/reference/en/p5.Panner3D/panner.mdx +++ b/src/content/reference/en/p5.Panner3D/panner.mdx @@ -12,6 +12,7 @@ description: | : "equal power" or "HRTF"
DistanceModel : "linear", "inverse", or "exponential"

+isConstructor: false line: 7629 itemtype: property class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/positionX.mdx b/src/content/reference/en/p5.Panner3D/positionX.mdx index a1d4b47a22..6ae8f819f6 100644 --- a/src/content/reference/en/p5.Panner3D/positionX.mdx +++ b/src/content/reference/en/p5.Panner3D/positionX.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getter and setter methods for position coordinates

+isConstructor: false line: 7687 itemtype: method class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/positionY.mdx b/src/content/reference/en/p5.Panner3D/positionY.mdx index c2b250e7a6..1a22e87388 100644 --- a/src/content/reference/en/p5.Panner3D/positionY.mdx +++ b/src/content/reference/en/p5.Panner3D/positionY.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getter and setter methods for position coordinates

+isConstructor: false line: 7694 itemtype: method class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/positionZ.mdx b/src/content/reference/en/p5.Panner3D/positionZ.mdx index b8d7d7a46b..9070b52822 100644 --- a/src/content/reference/en/p5.Panner3D/positionZ.mdx +++ b/src/content/reference/en/p5.Panner3D/positionZ.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Getter and setter methods for position coordinates

+isConstructor: false line: 7701 itemtype: method class: p5.Panner3D diff --git a/src/content/reference/en/p5.Panner3D/process.mdx b/src/content/reference/en/p5.Panner3D/process.mdx index ed5a350c86..27ce469b5e 100644 --- a/src/content/reference/en/p5.Panner3D/process.mdx +++ b/src/content/reference/en/p5.Panner3D/process.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect an audio sorce

+isConstructor: false line: 7654 params: - name: src diff --git a/src/content/reference/en/p5.Panner3D/rollof.mdx b/src/content/reference/en/p5.Panner3D/rollof.mdx index 0ec2f484d0..bb38e39522 100644 --- a/src/content/reference/en/p5.Panner3D/rollof.mdx +++ b/src/content/reference/en/p5.Panner3D/rollof.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

How quickly the volume is reduced as the source moves away from the listener

+isConstructor: false line: 7869 params: - name: rolloffFactor diff --git a/src/content/reference/en/p5.Panner3D/set.mdx b/src/content/reference/en/p5.Panner3D/set.mdx index e3afcf8e93..ae02b0f60a 100644 --- a/src/content/reference/en/p5.Panner3D/set.mdx +++ b/src/content/reference/en/p5.Panner3D/set.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the X,Y,Z position of the Panner

+isConstructor: false line: 7668 params: - name: xVal diff --git a/src/content/reference/en/p5.Panner3D/setFalloff.mdx b/src/content/reference/en/p5.Panner3D/setFalloff.mdx index 2b15745c07..6c753e6414 100644 --- a/src/content/reference/en/p5.Panner3D/setFalloff.mdx +++ b/src/content/reference/en/p5.Panner3D/setFalloff.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the rolloff factor and max distance

+isConstructor: false line: 7838 params: - name: maxDistance diff --git a/src/content/reference/en/p5.Part/addPhrase.mdx b/src/content/reference/en/p5.Part/addPhrase.mdx index a4410a2080..da3a556d79 100644 --- a/src/content/reference/en/p5.Part/addPhrase.mdx +++ b/src/content/reference/en/p5.Part/addPhrase.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Add a p5.Phrase to this Part.

+isConstructor: false line: 9379 params: - name: phrase diff --git a/src/content/reference/en/p5.Part/getBPM.mdx b/src/content/reference/en/p5.Part/getBPM.mdx index af68ed3e49..61a6eb31d1 100644 --- a/src/content/reference/en/p5.Part/getBPM.mdx +++ b/src/content/reference/en/p5.Part/getBPM.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Returns the tempo, in Beats Per Minute, of this part.

+isConstructor: false line: 9278 itemtype: method class: p5.Part diff --git a/src/content/reference/en/p5.Part/getPhrase.mdx b/src/content/reference/en/p5.Part/getPhrase.mdx index f1d1c9132c..7bd85829fd 100644 --- a/src/content/reference/en/p5.Part/getPhrase.mdx +++ b/src/content/reference/en/p5.Part/getPhrase.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Get a phrase from this part, based on the name it was given when it was created. Now you can modify its array.

+isConstructor: false line: 9424 params: - name: phraseName diff --git a/src/content/reference/en/p5.Part/loop.mdx b/src/content/reference/en/p5.Part/loop.mdx index f17fcd1ac0..64c151f23b 100644 --- a/src/content/reference/en/p5.Part/loop.mdx +++ b/src/content/reference/en/p5.Part/loop.mdx @@ -7,6 +7,7 @@ description: |

Loop playback of this part. It will begin looping through all of its phrases at a speed determined by setBPM.

+isConstructor: false line: 9311 params: - name: time diff --git a/src/content/reference/en/p5.Part/noLoop.mdx b/src/content/reference/en/p5.Part/noLoop.mdx index 9057b9d90e..683854a90c 100644 --- a/src/content/reference/en/p5.Part/noLoop.mdx +++ b/src/content/reference/en/p5.Part/noLoop.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Tell the part to stop looping.

+isConstructor: false line: 9333 itemtype: method class: p5.Part diff --git a/src/content/reference/en/p5.Part/onStep.mdx b/src/content/reference/en/p5.Part/onStep.mdx index 8cb5adec76..c9b689c090 100644 --- a/src/content/reference/en/p5.Part/onStep.mdx +++ b/src/content/reference/en/p5.Part/onStep.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

Set the function that will be called at every step. This will clear the previous function.

+isConstructor: false line: 9473 params: - name: callback diff --git a/src/content/reference/en/p5.Part/pause.mdx b/src/content/reference/en/p5.Part/pause.mdx index 4b6962f0d9..30f855966d 100644 --- a/src/content/reference/en/p5.Part/pause.mdx +++ b/src/content/reference/en/p5.Part/pause.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Pause the part. Playback will resume from the current step.

+isConstructor: false line: 9363 params: - name: time diff --git a/src/content/reference/en/p5.Part/removePhrase.mdx b/src/content/reference/en/p5.Part/removePhrase.mdx index c81c918281..13ab5a742d 100644 --- a/src/content/reference/en/p5.Part/removePhrase.mdx +++ b/src/content/reference/en/p5.Part/removePhrase.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Remove a phrase from this part, based on the name it was given when it was created.

+isConstructor: false line: 9406 params: - name: phraseName diff --git a/src/content/reference/en/p5.Part/replaceSequence.mdx b/src/content/reference/en/p5.Part/replaceSequence.mdx index 1076541db1..272c64487c 100644 --- a/src/content/reference/en/p5.Part/replaceSequence.mdx +++ b/src/content/reference/en/p5.Part/replaceSequence.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

Find all sequences with the specified name, and replace their patterns with the specified array.

+isConstructor: false line: 9442 params: - name: phraseName diff --git a/src/content/reference/en/p5.Part/setBPM.mdx b/src/content/reference/en/p5.Part/setBPM.mdx index ca2906396b..5738b25f40 100644 --- a/src/content/reference/en/p5.Part/setBPM.mdx +++ b/src/content/reference/en/p5.Part/setBPM.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the tempo of this part, in Beats Per Minute.

+isConstructor: false line: 9263 params: - name: BPM diff --git a/src/content/reference/en/p5.Part/start.mdx b/src/content/reference/en/p5.Part/start.mdx index ac777a3010..3a640ca5d9 100644 --- a/src/content/reference/en/p5.Part/start.mdx +++ b/src/content/reference/en/p5.Part/start.mdx @@ -7,6 +7,7 @@ description: |

Start playback of this part. It will play through all of its phrases at a speed determined by setBPM.

+isConstructor: false line: 9291 params: - name: time diff --git a/src/content/reference/en/p5.Part/stop.mdx b/src/content/reference/en/p5.Part/stop.mdx index c36b9bad71..9858675052 100644 --- a/src/content/reference/en/p5.Part/stop.mdx +++ b/src/content/reference/en/p5.Part/stop.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 9349 params: - name: time diff --git a/src/content/reference/en/p5.PeakDetect/isDetected.mdx b/src/content/reference/en/p5.PeakDetect/isDetected.mdx index a5d39c7cfa..c6644bd5c2 100644 --- a/src/content/reference/en/p5.PeakDetect/isDetected.mdx +++ b/src/content/reference/en/p5.PeakDetect/isDetected.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

isDetected is set to true when a peak is detected.

+isConstructor: false line: 10419 itemtype: attribute class: p5.PeakDetect diff --git a/src/content/reference/en/p5.PeakDetect/onPeak.mdx b/src/content/reference/en/p5.PeakDetect/onPeak.mdx index 85f68ea9cf..8aec0eb5dd 100644 --- a/src/content/reference/en/p5.PeakDetect/onPeak.mdx +++ b/src/content/reference/en/p5.PeakDetect/onPeak.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 10470 params: - name: callback diff --git a/src/content/reference/en/p5.PeakDetect/update.mdx b/src/content/reference/en/p5.PeakDetect/update.mdx index 3a87285b19..f9cb88d1eb 100644 --- a/src/content/reference/en/p5.PeakDetect/update.mdx +++ b/src/content/reference/en/p5.PeakDetect/update.mdx @@ -8,6 +8,7 @@ description: |

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.

+isConstructor: false line: 10432 params: - name: fftObject diff --git a/src/content/reference/en/p5.Phrase/sequence.mdx b/src/content/reference/en/p5.Phrase/sequence.mdx index e193895bf2..c992cb9984 100644 --- a/src/content/reference/en/p5.Phrase/sequence.mdx +++ b/src/content/reference/en/p5.Phrase/sequence.mdx @@ -9,6 +9,7 @@ description: | function's requirements, these values may be numbers, strings, or an object with multiple parameters. Zero (0) indicates a rest.

+isConstructor: false line: 9173 itemtype: property class: p5.Phrase diff --git a/src/content/reference/en/p5.PolySynth/AudioVoice.mdx b/src/content/reference/en/p5.PolySynth/AudioVoice.mdx index cb8fcc30f9..40843d02fa 100644 --- a/src/content/reference/en/p5.PolySynth/AudioVoice.mdx +++ b/src/content/reference/en/p5.PolySynth/AudioVoice.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 11761 itemtype: property class: p5.PolySynth diff --git a/src/content/reference/en/p5.PolySynth/connect.mdx b/src/content/reference/en/p5.PolySynth/connect.mdx index f856c37254..9c78d986d3 100644 --- a/src/content/reference/en/p5.PolySynth/connect.mdx +++ b/src/content/reference/en/p5.PolySynth/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect to a p5.sound / Web Audio object.

+isConstructor: false line: 12105 params: - name: unit diff --git a/src/content/reference/en/p5.PolySynth/disconnect.mdx b/src/content/reference/en/p5.PolySynth/disconnect.mdx index c7a16d397b..62c645981c 100644 --- a/src/content/reference/en/p5.PolySynth/disconnect.mdx +++ b/src/content/reference/en/p5.PolySynth/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all outputs

+isConstructor: false line: 12119 itemtype: method class: p5.PolySynth diff --git a/src/content/reference/en/p5.PolySynth/dispose.mdx b/src/content/reference/en/p5.PolySynth/dispose.mdx index 1e6c07cf38..fbaf21d2a8 100644 --- a/src/content/reference/en/p5.PolySynth/dispose.mdx +++ b/src/content/reference/en/p5.PolySynth/dispose.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Get rid of the MonoSynth and free up its resources / memory.

+isConstructor: false line: 12133 itemtype: method class: p5.PolySynth diff --git a/src/content/reference/en/p5.PolySynth/noteADSR.mdx b/src/content/reference/en/p5.PolySynth/noteADSR.mdx index 65f7646546..6260918970 100644 --- a/src/content/reference/en/p5.PolySynth/noteADSR.mdx +++ b/src/content/reference/en/p5.PolySynth/noteADSR.mdx @@ -13,6 +13,7 @@ description: > called in order to prevent the modified envelope from being used on other notes.

+isConstructor: false line: 11849 params: - name: note diff --git a/src/content/reference/en/p5.PolySynth/noteAttack.mdx b/src/content/reference/en/p5.PolySynth/noteAttack.mdx index 19b4edb73e..38e60fd121 100644 --- a/src/content/reference/en/p5.PolySynth/noteAttack.mdx +++ b/src/content/reference/en/p5.PolySynth/noteAttack.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 11909 params: - name: note diff --git a/src/content/reference/en/p5.PolySynth/noteRelease.mdx b/src/content/reference/en/p5.PolySynth/noteRelease.mdx index 4a98964bd0..5ba2dbb8d8 100644 --- a/src/content/reference/en/p5.PolySynth/noteRelease.mdx +++ b/src/content/reference/en/p5.PolySynth/noteRelease.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 12021 params: - name: note diff --git a/src/content/reference/en/p5.PolySynth/notes.mdx b/src/content/reference/en/p5.PolySynth/notes.mdx index 1cdcf33b10..30eec439f0 100644 --- a/src/content/reference/en/p5.PolySynth/notes.mdx +++ b/src/content/reference/en/p5.PolySynth/notes.mdx @@ -9,6 +9,7 @@ description: | on the fly. While a note has been attacked, but not released, the value of the key is the audiovoice which is generating that note. When notes are released, the value of the key becomes undefined.

+isConstructor: false line: 11742 itemtype: property class: p5.PolySynth diff --git a/src/content/reference/en/p5.PolySynth/play.mdx b/src/content/reference/en/p5.PolySynth/play.mdx index cc5b9b5663..39fd8bfd53 100644 --- a/src/content/reference/en/p5.PolySynth/play.mdx +++ b/src/content/reference/en/p5.PolySynth/play.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Play a note by triggering noteAttack and noteRelease with sustain time

+isConstructor: false line: 11800 params: - name: note diff --git a/src/content/reference/en/p5.PolySynth/polyvalue.mdx b/src/content/reference/en/p5.PolySynth/polyvalue.mdx index e83842dae7..fab6df41eb 100644 --- a/src/content/reference/en/p5.PolySynth/polyvalue.mdx +++ b/src/content/reference/en/p5.PolySynth/polyvalue.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

A PolySynth must have at least 1 voice, defaults to 8

+isConstructor: false line: 11755 itemtype: property class: p5.PolySynth diff --git a/src/content/reference/en/p5.PolySynth/setADSR.mdx b/src/content/reference/en/p5.PolySynth/setADSR.mdx index 9f16029d30..db012e4a73 100644 --- a/src/content/reference/en/p5.PolySynth/setADSR.mdx +++ b/src/content/reference/en/p5.PolySynth/setADSR.mdx @@ -8,6 +8,7 @@ description: > each monosynth so that all notes are played with this envelope.

+isConstructor: false line: 11881 params: - name: attackTime diff --git a/src/content/reference/en/p5.PrintWriter/clear.mdx b/src/content/reference/en/p5.PrintWriter/clear.mdx index b34b8df9e9..4adf01c727 100644 --- a/src/content/reference/en/p5.PrintWriter/clear.mdx +++ b/src/content/reference/en/p5.PrintWriter/clear.mdx @@ -5,6 +5,7 @@ submodule: Output file: src/io/files.js description: |

Clears the data already written to the PrintWriter object

+isConstructor: false line: 1298 itemtype: method class: p5.PrintWriter diff --git a/src/content/reference/en/p5.PrintWriter/close.mdx b/src/content/reference/en/p5.PrintWriter/close.mdx index 270c407fa8..d731d236bc 100644 --- a/src/content/reference/en/p5.PrintWriter/close.mdx +++ b/src/content/reference/en/p5.PrintWriter/close.mdx @@ -5,6 +5,7 @@ submodule: Output file: src/io/files.js description: |

Closes the PrintWriter

+isConstructor: false line: 1332 itemtype: method class: p5.PrintWriter diff --git a/src/content/reference/en/p5.PrintWriter/print.mdx b/src/content/reference/en/p5.PrintWriter/print.mdx index 5478207401..3065d6da00 100644 --- a/src/content/reference/en/p5.PrintWriter/print.mdx +++ b/src/content/reference/en/p5.PrintWriter/print.mdx @@ -5,6 +5,7 @@ submodule: Output file: src/io/files.js description: |

Writes data to the PrintWriter stream, and adds a new line at the end

+isConstructor: false line: 1257 params: - name: data diff --git a/src/content/reference/en/p5.PrintWriter/write.mdx b/src/content/reference/en/p5.PrintWriter/write.mdx index c729e41612..9da20c74d0 100644 --- a/src/content/reference/en/p5.PrintWriter/write.mdx +++ b/src/content/reference/en/p5.PrintWriter/write.mdx @@ -5,6 +5,7 @@ submodule: Output file: src/io/files.js description: |

Writes data to the PrintWriter stream

+isConstructor: false line: 1198 params: - name: data diff --git a/src/content/reference/en/p5.Pulse/width.mdx b/src/content/reference/en/p5.Pulse/width.mdx index b79afb59a6..e03f7722d6 100644 --- a/src/content/reference/en/p5.Pulse/width.mdx +++ b/src/content/reference/en/p5.Pulse/width.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Set the width of a Pulse object (an oscillator that implements Pulse Width Modulation).

+isConstructor: false line: 5871 params: - name: width diff --git a/src/content/reference/en/p5.Reverb/amp.mdx b/src/content/reference/en/p5.Reverb/amp.mdx index 4472477e7e..03a1756c13 100644 --- a/src/content/reference/en/p5.Reverb/amp.mdx +++ b/src/content/reference/en/p5.Reverb/amp.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the output level of the reverb effect.

+isConstructor: false line: 8482 params: - name: volume diff --git a/src/content/reference/en/p5.Reverb/connect.mdx b/src/content/reference/en/p5.Reverb/connect.mdx index 0d6ab0a796..0489262548 100644 --- a/src/content/reference/en/p5.Reverb/connect.mdx +++ b/src/content/reference/en/p5.Reverb/connect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Send output to a p5.sound or web audio object

+isConstructor: false line: 8493 params: - name: unit diff --git a/src/content/reference/en/p5.Reverb/disconnect.mdx b/src/content/reference/en/p5.Reverb/disconnect.mdx index 07357a7adb..361965712c 100644 --- a/src/content/reference/en/p5.Reverb/disconnect.mdx +++ b/src/content/reference/en/p5.Reverb/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnect all output.

+isConstructor: false line: 8501 itemtype: method class: p5.Reverb diff --git a/src/content/reference/en/p5.Reverb/process.mdx b/src/content/reference/en/p5.Reverb/process.mdx index 1131e9eb99..844b8b7a82 100644 --- a/src/content/reference/en/p5.Reverb/process.mdx +++ b/src/content/reference/en/p5.Reverb/process.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Connect a source to the reverb, and assign reverb parameters.

+isConstructor: false line: 8409 params: - name: src diff --git a/src/content/reference/en/p5.Reverb/set.mdx b/src/content/reference/en/p5.Reverb/set.mdx index 09d9a379cc..077bd82ec4 100644 --- a/src/content/reference/en/p5.Reverb/set.mdx +++ b/src/content/reference/en/p5.Reverb/set.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Set the reverb settings. Similar to .process(), but without assigning a new input.

+isConstructor: false line: 8446 params: - name: seconds diff --git a/src/content/reference/en/p5.Score/loop.mdx b/src/content/reference/en/p5.Score/loop.mdx index 21fbacd64e..c6b79728c5 100644 --- a/src/content/reference/en/p5.Score/loop.mdx +++ b/src/content/reference/en/p5.Score/loop.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Loop playback of the score.

+isConstructor: false line: 9581 itemtype: method class: p5.Score diff --git a/src/content/reference/en/p5.Score/noLoop.mdx b/src/content/reference/en/p5.Score/noLoop.mdx index 6ebe69d665..02312cbb90 100644 --- a/src/content/reference/en/p5.Score/noLoop.mdx +++ b/src/content/reference/en/p5.Score/noLoop.mdx @@ -7,6 +7,7 @@ description: |

Stop looping playback of the score. If it is currently playing, this will go into effect after the current round of playback completes.

+isConstructor: false line: 9594 itemtype: method class: p5.Score diff --git a/src/content/reference/en/p5.Score/pause.mdx b/src/content/reference/en/p5.Score/pause.mdx index c6252b64b4..ce6347c4d0 100644 --- a/src/content/reference/en/p5.Score/pause.mdx +++ b/src/content/reference/en/p5.Score/pause.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Pause playback of the score.

+isConstructor: false line: 9569 itemtype: method class: p5.Score diff --git a/src/content/reference/en/p5.Score/setBPM.mdx b/src/content/reference/en/p5.Score/setBPM.mdx index 535b34016e..af1c2bf519 100644 --- a/src/content/reference/en/p5.Score/setBPM.mdx +++ b/src/content/reference/en/p5.Score/setBPM.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set the tempo for all parts in the score

+isConstructor: false line: 9628 params: - name: BPM diff --git a/src/content/reference/en/p5.Score/start.mdx b/src/content/reference/en/p5.Score/start.mdx index 50496ba16d..902ddcde1f 100644 --- a/src/content/reference/en/p5.Score/start.mdx +++ b/src/content/reference/en/p5.Score/start.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Start playback of the score.

+isConstructor: false line: 9542 itemtype: method class: p5.Score diff --git a/src/content/reference/en/p5.Score/stop.mdx b/src/content/reference/en/p5.Score/stop.mdx index de28ff17df..32e71e98f4 100644 --- a/src/content/reference/en/p5.Score/stop.mdx +++ b/src/content/reference/en/p5.Score/stop.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Stop playback of the score.

+isConstructor: false line: 9555 itemtype: method class: p5.Score diff --git a/src/content/reference/en/p5.Shader/copyToContext.mdx b/src/content/reference/en/p5.Shader/copyToContext.mdx index 17bc41772d..59cc0aee39 100644 --- a/src/content/reference/en/p5.Shader/copyToContext.mdx +++ b/src/content/reference/en/p5.Shader/copyToContext.mdx @@ -8,6 +8,7 @@ description: | they can only be used in the context they were compiled on.

Use this method to make a new copy of a shader that gets compiled on a different context.

+isConstructor: false line: 106 params: - name: context diff --git a/src/content/reference/en/p5.Shader/setUniform.mdx b/src/content/reference/en/p5.Shader/setUniform.mdx index b67c4051f3..95dbc0cbe1 100644 --- a/src/content/reference/en/p5.Shader/setUniform.mdx +++ b/src/content/reference/en/p5.Shader/setUniform.mdx @@ -55,6 +55,7 @@ description: > +isConstructor: false line: 367 params: - name: uniformName @@ -69,6 +70,10 @@ params: an image (p5.Image, p5.Graphics, p5.MediaElement, p5.Texture)

type: 'Boolean|Number|Number[]|p5.Image|p5.Graphics|p5.MediaElement|p5.Texture' itemtype: method +alt: >- + canvas toggles between a circular gradient of orange and blue vertically. and + a circular gradient of red and green moving horizontally when mouse is + clicked/pressed. class: p5.Shader example: - |- @@ -121,10 +126,6 @@ example: } -alt: >- - canvas toggles between a circular gradient of orange and blue vertically. and - a circular gradient of red and green moving horizontally when mouse is - clicked/pressed. chainable: true --- diff --git a/src/content/reference/en/p5.SoundFile/addCue.mdx b/src/content/reference/en/p5.SoundFile/addCue.mdx index 6d95dbb2c9..c97e58682d 100644 --- a/src/content/reference/en/p5.SoundFile/addCue.mdx +++ b/src/content/reference/en/p5.SoundFile/addCue.mdx @@ -10,6 +10,7 @@ description: | 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.

+isConstructor: false line: 2719 params: - name: time diff --git a/src/content/reference/en/p5.SoundFile/channels.mdx b/src/content/reference/en/p5.SoundFile/channels.mdx index 5a99b676d1..6abe0a8fd2 100644 --- a/src/content/reference/en/p5.SoundFile/channels.mdx +++ b/src/content/reference/en/p5.SoundFile/channels.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Return the number of channels in a sound file. For example, Mono = 1, Stereo = 2.

+isConstructor: false line: 2340 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/clearCues.mdx b/src/content/reference/en/p5.SoundFile/clearCues.mdx index 1587d72b52..5764aef5a2 100644 --- a/src/content/reference/en/p5.SoundFile/clearCues.mdx +++ b/src/content/reference/en/p5.SoundFile/clearCues.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Remove all of the callbacks that had originally been scheduled via the addCue method.

+isConstructor: false line: 2817 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/connect.mdx b/src/content/reference/en/p5.SoundFile/connect.mdx index 3975c1b225..7aa9adae5a 100644 --- a/src/content/reference/en/p5.SoundFile/connect.mdx +++ b/src/content/reference/en/p5.SoundFile/connect.mdx @@ -9,6 +9,7 @@ description: | 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.

+isConstructor: false line: 2565 params: - name: object diff --git a/src/content/reference/en/p5.SoundFile/currentTime.mdx b/src/content/reference/en/p5.SoundFile/currentTime.mdx index c2fecbed4f..3d20bc7110 100644 --- a/src/content/reference/en/p5.SoundFile/currentTime.mdx +++ b/src/content/reference/en/p5.SoundFile/currentTime.mdx @@ -10,6 +10,7 @@ description: > reverseBuffer has been called, currentTime will count backwards.

+isConstructor: false line: 2293 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/disconnect.mdx b/src/content/reference/en/p5.SoundFile/disconnect.mdx index 57da18d949..96ade3e59a 100644 --- a/src/content/reference/en/p5.SoundFile/disconnect.mdx +++ b/src/content/reference/en/p5.SoundFile/disconnect.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Disconnects the output of this p5sound object.

+isConstructor: false line: 2590 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/duration.mdx b/src/content/reference/en/p5.SoundFile/duration.mdx index 22d3e8e5c8..2d9edde6eb 100644 --- a/src/content/reference/en/p5.SoundFile/duration.mdx +++ b/src/content/reference/en/p5.SoundFile/duration.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Returns the duration of a sound file in seconds.

+isConstructor: false line: 2276 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/frames.mdx b/src/content/reference/en/p5.SoundFile/frames.mdx index 85a3985695..150c925152 100644 --- a/src/content/reference/en/p5.SoundFile/frames.mdx +++ b/src/content/reference/en/p5.SoundFile/frames.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Return the number of samples in a sound file. Equal to sampleRate * duration.

+isConstructor: false line: 2367 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/getBlob.mdx b/src/content/reference/en/p5.SoundFile/getBlob.mdx index e66d558176..86a219c7ba 100644 --- a/src/content/reference/en/p5.SoundFile/getBlob.mdx +++ b/src/content/reference/en/p5.SoundFile/getBlob.mdx @@ -12,6 +12,7 @@ description: | use the httpDo options object to send a POST request with some specific options: we encode the request as multipart/form-data, and attach the blob as one of the form values using FormData.

+isConstructor: false line: 2882 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/getPan.mdx b/src/content/reference/en/p5.SoundFile/getPan.mdx index d942a4ccfc..d668cc891d 100644 --- a/src/content/reference/en/p5.SoundFile/getPan.mdx +++ b/src/content/reference/en/p5.SoundFile/getPan.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Returns the current stereo pan position (-1.0 to 1.0)

+isConstructor: false line: 2131 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/getPeaks.mdx b/src/content/reference/en/p5.SoundFile/getPeaks.mdx index c0de10c5ec..a5215e7028 100644 --- a/src/content/reference/en/p5.SoundFile/getPeaks.mdx +++ b/src/content/reference/en/p5.SoundFile/getPeaks.mdx @@ -10,6 +10,7 @@ description: | parameter, 'length', which determines size of the array. Larger arrays result in more precise waveform visualizations.

Inspired by Wavesurfer.js.

+isConstructor: false line: 2381 params: - name: length diff --git a/src/content/reference/en/p5.SoundFile/isLoaded.mdx b/src/content/reference/en/p5.SoundFile/isLoaded.mdx index a5e775cf6b..52046a4075 100644 --- a/src/content/reference/en/p5.SoundFile/isLoaded.mdx +++ b/src/content/reference/en/p5.SoundFile/isLoaded.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Returns true if the sound file finished loading successfully.

+isConstructor: false line: 1662 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/isLooping.mdx b/src/content/reference/en/p5.SoundFile/isLooping.mdx index 82a4aefa7d..ca7eea599b 100644 --- a/src/content/reference/en/p5.SoundFile/isLooping.mdx +++ b/src/content/reference/en/p5.SoundFile/isLooping.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: >

Returns 'true' if a p5.SoundFile is currently looping and playing, 'false' if not.

+isConstructor: false line: 1976 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/isPaused.mdx b/src/content/reference/en/p5.SoundFile/isPaused.mdx index ed4510d9a7..ed9b220c21 100644 --- a/src/content/reference/en/p5.SoundFile/isPaused.mdx +++ b/src/content/reference/en/p5.SoundFile/isPaused.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Returns true if a p5.SoundFile is paused, false if not (i.e. playing or stopped).

+isConstructor: false line: 2011 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/isPlaying.mdx b/src/content/reference/en/p5.SoundFile/isPlaying.mdx index 0d441deda0..0b35f119b7 100644 --- a/src/content/reference/en/p5.SoundFile/isPlaying.mdx +++ b/src/content/reference/en/p5.SoundFile/isPlaying.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Returns true if a p5.SoundFile is playing, false if not (i.e. paused or stopped).

+isConstructor: false line: 1997 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/jump.mdx b/src/content/reference/en/p5.SoundFile/jump.mdx index b127dc67fe..051df848c0 100644 --- a/src/content/reference/en/p5.SoundFile/jump.mdx +++ b/src/content/reference/en/p5.SoundFile/jump.mdx @@ -14,6 +14,7 @@ description: > not currently playing, use the play or loop methods.

+isConstructor: false line: 2308 params: - name: cueTime diff --git a/src/content/reference/en/p5.SoundFile/loop.mdx b/src/content/reference/en/p5.SoundFile/loop.mdx index 034530f1c8..42484d6054 100644 --- a/src/content/reference/en/p5.SoundFile/loop.mdx +++ b/src/content/reference/en/p5.SoundFile/loop.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Loop the p5.SoundFile. Accepts optional parameters to set the playback rate, playback volume, loopStart, loopEnd.

+isConstructor: false line: 1905 params: - name: startTime diff --git a/src/content/reference/en/p5.SoundFile/onended.mdx b/src/content/reference/en/p5.SoundFile/onended.mdx index cab30b6295..d978d01b61 100644 --- a/src/content/reference/en/p5.SoundFile/onended.mdx +++ b/src/content/reference/en/p5.SoundFile/onended.mdx @@ -9,6 +9,7 @@ description: | playing through once, this will be called when it ends. If it is looping, it will be called when stop is called.

+isConstructor: false line: 2497 params: - name: callback diff --git a/src/content/reference/en/p5.SoundFile/pan.mdx b/src/content/reference/en/p5.SoundFile/pan.mdx index 8d2e56e2ce..b2cc3dc6cd 100644 --- a/src/content/reference/en/p5.SoundFile/pan.mdx +++ b/src/content/reference/en/p5.SoundFile/pan.mdx @@ -7,6 +7,7 @@ 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).

+isConstructor: false line: 2087 params: - name: panValue diff --git a/src/content/reference/en/p5.SoundFile/pause.mdx b/src/content/reference/en/p5.SoundFile/pause.mdx index fd085dd976..d921f4aa18 100644 --- a/src/content/reference/en/p5.SoundFile/pause.mdx +++ b/src/content/reference/en/p5.SoundFile/pause.mdx @@ -10,6 +10,7 @@ description: | position. If p5.SoundFile had been set to loop before it was paused, it will continue to loop after it is unpaused with .play().

+isConstructor: false line: 1847 params: - name: startTime diff --git a/src/content/reference/en/p5.SoundFile/play.mdx b/src/content/reference/en/p5.SoundFile/play.mdx index 9c2cf893ea..9a6f93af5b 100644 --- a/src/content/reference/en/p5.SoundFile/play.mdx +++ b/src/content/reference/en/p5.SoundFile/play.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Play the p5.SoundFile

+isConstructor: false line: 1679 params: - name: startTime diff --git a/src/content/reference/en/p5.SoundFile/playMode.mdx b/src/content/reference/en/p5.SoundFile/playMode.mdx index 38ac511955..5925771715 100644 --- a/src/content/reference/en/p5.SoundFile/playMode.mdx +++ b/src/content/reference/en/p5.SoundFile/playMode.mdx @@ -11,6 +11,7 @@ description: | 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.

+isConstructor: false line: 1787 params: - name: str diff --git a/src/content/reference/en/p5.SoundFile/rate.mdx b/src/content/reference/en/p5.SoundFile/rate.mdx index aed6a64bd5..0c177bed0f 100644 --- a/src/content/reference/en/p5.SoundFile/rate.mdx +++ b/src/content/reference/en/p5.SoundFile/rate.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js 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.

+isConstructor: false line: 2146 params: - name: playbackRate diff --git a/src/content/reference/en/p5.SoundFile/removeCue.mdx b/src/content/reference/en/p5.SoundFile/removeCue.mdx index 69f00501ea..0f6ec4e65e 100644 --- a/src/content/reference/en/p5.SoundFile/removeCue.mdx +++ b/src/content/reference/en/p5.SoundFile/removeCue.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Remove a callback based on its ID. The ID is returned by the addCue method.

+isConstructor: false line: 2790 params: - name: id diff --git a/src/content/reference/en/p5.SoundFile/reverseBuffer.mdx b/src/content/reference/en/p5.SoundFile/reverseBuffer.mdx index 2710239062..f67660c58e 100644 --- a/src/content/reference/en/p5.SoundFile/reverseBuffer.mdx +++ b/src/content/reference/en/p5.SoundFile/reverseBuffer.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Reverses the p5.SoundFile's buffer source. Playback must be handled separately (see example).

+isConstructor: false line: 2443 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/sampleRate.mdx b/src/content/reference/en/p5.SoundFile/sampleRate.mdx index 31ab6bd438..4cf5d889cc 100644 --- a/src/content/reference/en/p5.SoundFile/sampleRate.mdx +++ b/src/content/reference/en/p5.SoundFile/sampleRate.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Return the sample rate of the sound file.

+isConstructor: false line: 2354 itemtype: method class: p5.SoundFile diff --git a/src/content/reference/en/p5.SoundFile/save.mdx b/src/content/reference/en/p5.SoundFile/save.mdx index 951cc427a0..a5cd4b7237 100644 --- a/src/content/reference/en/p5.SoundFile/save.mdx +++ b/src/content/reference/en/p5.SoundFile/save.mdx @@ -7,6 +7,7 @@ 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

+isConstructor: false line: 2850 params: - name: fileName diff --git a/src/content/reference/en/p5.SoundFile/setBuffer.mdx b/src/content/reference/en/p5.SoundFile/setBuffer.mdx index 7f6f3591b4..4a4c43fc32 100644 --- a/src/content/reference/en/p5.SoundFile/setBuffer.mdx +++ b/src/content/reference/en/p5.SoundFile/setBuffer.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Replace the current Audio Buffer with a new Buffer.

+isConstructor: false line: 2630 params: - name: buf diff --git a/src/content/reference/en/p5.SoundFile/setLoop.mdx b/src/content/reference/en/p5.SoundFile/setLoop.mdx index da966e53ea..4ec3d6e676 100644 --- a/src/content/reference/en/p5.SoundFile/setLoop.mdx +++ b/src/content/reference/en/p5.SoundFile/setLoop.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 1950 params: - name: Boolean diff --git a/src/content/reference/en/p5.SoundFile/setPath.mdx b/src/content/reference/en/p5.SoundFile/setPath.mdx index 527df97219..331d53cfa8 100644 --- a/src/content/reference/en/p5.SoundFile/setPath.mdx +++ b/src/content/reference/en/p5.SoundFile/setPath.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

Reset the source for this SoundFile to a new path (URL).

+isConstructor: false line: 2612 params: - name: path diff --git a/src/content/reference/en/p5.SoundFile/setVolume.mdx b/src/content/reference/en/p5.SoundFile/setVolume.mdx index 3f7bf6967a..ff195ca54c 100644 --- a/src/content/reference/en/p5.SoundFile/setVolume.mdx +++ b/src/content/reference/en/p5.SoundFile/setVolume.mdx @@ -12,6 +12,7 @@ description: | 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.

+isConstructor: false line: 2239 params: - name: volume diff --git a/src/content/reference/en/p5.SoundFile/stop.mdx b/src/content/reference/en/p5.SoundFile/stop.mdx index c7c74b8386..62b435bb25 100644 --- a/src/content/reference/en/p5.SoundFile/stop.mdx +++ b/src/content/reference/en/p5.SoundFile/stop.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Stop soundfile playback.

+isConstructor: false line: 2025 params: - name: startTime diff --git a/src/content/reference/en/p5.SoundLoop/bpm.mdx b/src/content/reference/en/p5.SoundLoop/bpm.mdx index fdca299ed1..fbf84311e1 100644 --- a/src/content/reference/en/p5.SoundLoop/bpm.mdx +++ b/src/content/reference/en/p5.SoundLoop/bpm.mdx @@ -10,6 +10,7 @@ description: > frequency, that will be reflected after the next callback beats per minute (defaults to 60)

+isConstructor: false line: 9729 itemtype: property class: p5.SoundLoop diff --git a/src/content/reference/en/p5.SoundLoop/interval.mdx b/src/content/reference/en/p5.SoundLoop/interval.mdx index c69502de92..7c51f5bdf2 100644 --- a/src/content/reference/en/p5.SoundLoop/interval.mdx +++ b/src/content/reference/en/p5.SoundLoop/interval.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

length of the loops interval

+isConstructor: false line: 9770 itemtype: property class: p5.SoundLoop diff --git a/src/content/reference/en/p5.SoundLoop/iterations.mdx b/src/content/reference/en/p5.SoundLoop/iterations.mdx index 097a6d65f8..cf4b4d2411 100644 --- a/src/content/reference/en/p5.SoundLoop/iterations.mdx +++ b/src/content/reference/en/p5.SoundLoop/iterations.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

how many times the callback has been called so far

+isConstructor: false line: 9787 itemtype: property class: p5.SoundLoop diff --git a/src/content/reference/en/p5.SoundLoop/maxIterations.mdx b/src/content/reference/en/p5.SoundLoop/maxIterations.mdx index ccf18cede2..c910d85f15 100644 --- a/src/content/reference/en/p5.SoundLoop/maxIterations.mdx +++ b/src/content/reference/en/p5.SoundLoop/maxIterations.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Set a limit to the number of loops to play. defaults to Infinity

+isConstructor: false line: 9816 itemtype: property class: p5.SoundLoop diff --git a/src/content/reference/en/p5.SoundLoop/musicalTimeMode.mdx b/src/content/reference/en/p5.SoundLoop/musicalTimeMode.mdx index 8b3c0a5489..fc649d6afe 100644 --- a/src/content/reference/en/p5.SoundLoop/musicalTimeMode.mdx +++ b/src/content/reference/en/p5.SoundLoop/musicalTimeMode.mdx @@ -8,6 +8,7 @@ description: > "https://github.com/Tonejs/Tone.js/wiki/Time">Tone.Time convention true if string, false if number

+isConstructor: false line: 9800 itemtype: property class: p5.SoundLoop diff --git a/src/content/reference/en/p5.SoundLoop/pause.mdx b/src/content/reference/en/p5.SoundLoop/pause.mdx index 859c90c0fe..d179bcda23 100644 --- a/src/content/reference/en/p5.SoundLoop/pause.mdx +++ b/src/content/reference/en/p5.SoundLoop/pause.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Pause the loop

+isConstructor: false line: 9878 params: - name: timeFromNow diff --git a/src/content/reference/en/p5.SoundLoop/start.mdx b/src/content/reference/en/p5.SoundLoop/start.mdx index c56965c7c2..4ac250c3c6 100644 --- a/src/content/reference/en/p5.SoundLoop/start.mdx +++ b/src/content/reference/en/p5.SoundLoop/start.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Start the loop

+isConstructor: false line: 9841 params: - name: timeFromNow diff --git a/src/content/reference/en/p5.SoundLoop/stop.mdx b/src/content/reference/en/p5.SoundLoop/stop.mdx index ec116e585f..9879ccda50 100644 --- a/src/content/reference/en/p5.SoundLoop/stop.mdx +++ b/src/content/reference/en/p5.SoundLoop/stop.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

Stop the loop

+isConstructor: false line: 9860 params: - name: timeFromNow diff --git a/src/content/reference/en/p5.SoundLoop/syncedStart.mdx b/src/content/reference/en/p5.SoundLoop/syncedStart.mdx index 85110c3df4..d185e0be65 100644 --- a/src/content/reference/en/p5.SoundLoop/syncedStart.mdx +++ b/src/content/reference/en/p5.SoundLoop/syncedStart.mdx @@ -13,6 +13,7 @@ description: > loop i.e. loopToStart.syncedStart(loopToSyncWith)

+isConstructor: false line: 9896 params: - name: otherLoop diff --git a/src/content/reference/en/p5.SoundLoop/timeSignature.mdx b/src/content/reference/en/p5.SoundLoop/timeSignature.mdx index e2d6ce9c1c..9ee9247d8a 100644 --- a/src/content/reference/en/p5.SoundLoop/timeSignature.mdx +++ b/src/content/reference/en/p5.SoundLoop/timeSignature.mdx @@ -5,6 +5,7 @@ submodule: p5.sound file: lib/addons/p5.sound.js description: |

number of quarter notes in a measure (defaults to 4)

+isConstructor: false line: 9750 itemtype: property class: p5.SoundLoop diff --git a/src/content/reference/en/p5.SoundRecorder/record.mdx b/src/content/reference/en/p5.SoundRecorder/record.mdx index 5f07e94ea2..20017c3791 100644 --- a/src/content/reference/en/p5.SoundRecorder/record.mdx +++ b/src/content/reference/en/p5.SoundRecorder/record.mdx @@ -11,6 +11,7 @@ description: | (in seconds) of the recording, and a callback function that will be called once the complete recording has been transfered to the p5.SoundFile.

+isConstructor: false line: 10703 params: - name: soundFile diff --git a/src/content/reference/en/p5.SoundRecorder/setInput.mdx b/src/content/reference/en/p5.SoundRecorder/setInput.mdx index befb4cbd28..414cff0281 100644 --- a/src/content/reference/en/p5.SoundRecorder/setInput.mdx +++ b/src/content/reference/en/p5.SoundRecorder/setInput.mdx @@ -7,6 +7,7 @@ description: |

Connect a specific device to the p5.SoundRecorder. If no parameter is given, p5.SoundRecorer will record all audible p5.sound from your sketch.

+isConstructor: false line: 10676 params: - name: unit diff --git a/src/content/reference/en/p5.SoundRecorder/stop.mdx b/src/content/reference/en/p5.SoundRecorder/stop.mdx index 9a54ad28ee..0671b5022a 100644 --- a/src/content/reference/en/p5.SoundRecorder/stop.mdx +++ b/src/content/reference/en/p5.SoundRecorder/stop.mdx @@ -8,6 +8,7 @@ description: | 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.

+isConstructor: false line: 10739 itemtype: method class: p5.SoundRecorder diff --git a/src/content/reference/en/p5.Table/addColumn.mdx b/src/content/reference/en/p5.Table/addColumn.mdx index 83587f5f24..b1a511f617 100644 --- a/src/content/reference/en/p5.Table/addColumn.mdx +++ b/src/content/reference/en/p5.Table/addColumn.mdx @@ -12,6 +12,7 @@ description: > may be easily referenced later by name. (If no title is specified, the new column's title will be null.)

+isConstructor: false line: 631 params: - name: title diff --git a/src/content/reference/en/p5.Table/addRow.mdx b/src/content/reference/en/p5.Table/addRow.mdx index c1d29e779a..f353246175 100644 --- a/src/content/reference/en/p5.Table/addRow.mdx +++ b/src/content/reference/en/p5.Table/addRow.mdx @@ -17,6 +17,7 @@ description: > parameter, then that row is duplicated and added to the table.

+isConstructor: false line: 90 params: - name: row diff --git a/src/content/reference/en/p5.Table/clearRows.mdx b/src/content/reference/en/p5.Table/clearRows.mdx index 136100b639..c43bb1485b 100644 --- a/src/content/reference/en/p5.Table/clearRows.mdx +++ b/src/content/reference/en/p5.Table/clearRows.mdx @@ -6,6 +6,7 @@ file: src/io/p5.Table.js description: |

Removes all rows from a Table. While all rows are removed, columns and column titles are maintained.

+isConstructor: false line: 592 itemtype: method class: p5.Table diff --git a/src/content/reference/en/p5.Table/columns.mdx b/src/content/reference/en/p5.Table/columns.mdx index b11325dfaa..7005e1987d 100644 --- a/src/content/reference/en/p5.Table/columns.mdx +++ b/src/content/reference/en/p5.Table/columns.mdx @@ -8,6 +8,7 @@ description: > the table is loaded with the "header" parameter.

+isConstructor: false line: 43 itemtype: property class: p5.Table diff --git a/src/content/reference/en/p5.Table/findRow.mdx b/src/content/reference/en/p5.Table/findRow.mdx index 6a895c305d..d2f45442c9 100644 --- a/src/content/reference/en/p5.Table/findRow.mdx +++ b/src/content/reference/en/p5.Table/findRow.mdx @@ -9,6 +9,7 @@ description: | 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.

+isConstructor: false line: 289 params: - name: value diff --git a/src/content/reference/en/p5.Table/findRows.mdx b/src/content/reference/en/p5.Table/findRows.mdx index 8ee59bde5a..89dbaa07d2 100644 --- a/src/content/reference/en/p5.Table/findRows.mdx +++ b/src/content/reference/en/p5.Table/findRows.mdx @@ -9,6 +9,7 @@ description: | 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.

+isConstructor: false line: 351 params: - name: value diff --git a/src/content/reference/en/p5.Table/get.mdx b/src/content/reference/en/p5.Table/get.mdx index 59fae5b880..4ce6799abe 100644 --- a/src/content/reference/en/p5.Table/get.mdx +++ b/src/content/reference/en/p5.Table/get.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 1087 params: - name: row diff --git a/src/content/reference/en/p5.Table/getArray.mdx b/src/content/reference/en/p5.Table/getArray.mdx index a6f01b29ab..cdd24ca3db 100644 --- a/src/content/reference/en/p5.Table/getArray.mdx +++ b/src/content/reference/en/p5.Table/getArray.mdx @@ -5,6 +5,7 @@ submodule: Table file: src/io/p5.Table.js description: |

Retrieves all table data and returns it as a multidimensional array.

+isConstructor: false line: 1285 itemtype: method class: p5.Table diff --git a/src/content/reference/en/p5.Table/getColumn.mdx b/src/content/reference/en/p5.Table/getColumn.mdx index 3ccb8b1970..b7548c718f 100644 --- a/src/content/reference/en/p5.Table/getColumn.mdx +++ b/src/content/reference/en/p5.Table/getColumn.mdx @@ -6,6 +6,7 @@ file: src/io/p5.Table.js 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.

+isConstructor: false line: 542 params: - name: column diff --git a/src/content/reference/en/p5.Table/getColumnCount.mdx b/src/content/reference/en/p5.Table/getColumnCount.mdx index 577ef255ca..4a098059e4 100644 --- a/src/content/reference/en/p5.Table/getColumnCount.mdx +++ b/src/content/reference/en/p5.Table/getColumnCount.mdx @@ -5,6 +5,7 @@ submodule: Table file: src/io/p5.Table.js description: |

Returns the total number of columns in a Table.

+isConstructor: false line: 680 itemtype: method class: p5.Table diff --git a/src/content/reference/en/p5.Table/getNum.mdx b/src/content/reference/en/p5.Table/getNum.mdx index e251b2b9fb..b6600701b0 100644 --- a/src/content/reference/en/p5.Table/getNum.mdx +++ b/src/content/reference/en/p5.Table/getNum.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 1131 params: - name: row diff --git a/src/content/reference/en/p5.Table/getObject.mdx b/src/content/reference/en/p5.Table/getObject.mdx index 9bf781cac5..0724e88de0 100644 --- a/src/content/reference/en/p5.Table/getObject.mdx +++ b/src/content/reference/en/p5.Table/getObject.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 1223 params: - name: headerColumn diff --git a/src/content/reference/en/p5.Table/getRow.mdx b/src/content/reference/en/p5.Table/getRow.mdx index cd5213a4cc..a759348cc6 100644 --- a/src/content/reference/en/p5.Table/getRow.mdx +++ b/src/content/reference/en/p5.Table/getRow.mdx @@ -8,6 +8,7 @@ description: > href="#/p5.TableRow">p5.TableRow. The reference can then be used to get and set values of the selected row.

+isConstructor: false line: 198 params: - name: rowID diff --git a/src/content/reference/en/p5.Table/getRowCount.mdx b/src/content/reference/en/p5.Table/getRowCount.mdx index 467094d958..2dca9a87e1 100644 --- a/src/content/reference/en/p5.Table/getRowCount.mdx +++ b/src/content/reference/en/p5.Table/getRowCount.mdx @@ -5,6 +5,7 @@ submodule: Table file: src/io/p5.Table.js description: |

Returns the total number of rows in a Table.

+isConstructor: false line: 716 itemtype: method class: p5.Table diff --git a/src/content/reference/en/p5.Table/getRows.mdx b/src/content/reference/en/p5.Table/getRows.mdx index 8c7c24d575..9a307e4fc4 100644 --- a/src/content/reference/en/p5.Table/getRows.mdx +++ b/src/content/reference/en/p5.Table/getRows.mdx @@ -6,6 +6,7 @@ file: src/io/p5.Table.js description: >

Gets all rows from the table. Returns an array of p5.TableRows.

+isConstructor: false line: 242 itemtype: method class: p5.Table diff --git a/src/content/reference/en/p5.Table/getString.mdx b/src/content/reference/en/p5.Table/getString.mdx index 9d603b9f9d..8b3add5ddb 100644 --- a/src/content/reference/en/p5.Table/getString.mdx +++ b/src/content/reference/en/p5.Table/getString.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 1173 params: - name: row diff --git a/src/content/reference/en/p5.Table/matchRow.mdx b/src/content/reference/en/p5.Table/matchRow.mdx index 8f900ebdc3..265a602a1b 100644 --- a/src/content/reference/en/p5.Table/matchRow.mdx +++ b/src/content/reference/en/p5.Table/matchRow.mdx @@ -9,6 +9,7 @@ description: | 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.

+isConstructor: false line: 417 params: - name: regexp diff --git a/src/content/reference/en/p5.Table/matchRows.mdx b/src/content/reference/en/p5.Table/matchRows.mdx index 52da741a51..14a4c44e2f 100644 --- a/src/content/reference/en/p5.Table/matchRows.mdx +++ b/src/content/reference/en/p5.Table/matchRows.mdx @@ -8,6 +8,7 @@ description: | 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.

+isConstructor: false line: 475 params: - name: regexp diff --git a/src/content/reference/en/p5.Table/removeColumn.mdx b/src/content/reference/en/p5.Table/removeColumn.mdx index 9e6524a025..be7abc103d 100644 --- a/src/content/reference/en/p5.Table/removeColumn.mdx +++ b/src/content/reference/en/p5.Table/removeColumn.mdx @@ -14,6 +14,7 @@ description: > removeColumn(0) would remove the first column, removeColumn(1) would remove the second column, and so on.

+isConstructor: false line: 888 params: - name: column diff --git a/src/content/reference/en/p5.Table/removeRow.mdx b/src/content/reference/en/p5.Table/removeRow.mdx index e782dae110..5f0f21d19a 100644 --- a/src/content/reference/en/p5.Table/removeRow.mdx +++ b/src/content/reference/en/p5.Table/removeRow.mdx @@ -5,6 +5,7 @@ submodule: Table file: src/io/p5.Table.js description: |

Removes a row from the table object.

+isConstructor: false line: 152 params: - name: id diff --git a/src/content/reference/en/p5.Table/removeTokens.mdx b/src/content/reference/en/p5.Table/removeTokens.mdx index e5d097c6f2..6cb9ad41a2 100644 --- a/src/content/reference/en/p5.Table/removeTokens.mdx +++ b/src/content/reference/en/p5.Table/removeTokens.mdx @@ -8,6 +8,7 @@ description: |

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.

+isConstructor: false line: 752 params: - name: chars diff --git a/src/content/reference/en/p5.Table/rows.mdx b/src/content/reference/en/p5.Table/rows.mdx index 9c803b1a9e..f1fc9d255e 100644 --- a/src/content/reference/en/p5.Table/rows.mdx +++ b/src/content/reference/en/p5.Table/rows.mdx @@ -9,6 +9,7 @@ description: > rows of the table. The same result as calling getRows()

+isConstructor: false line: 80 itemtype: property class: p5.Table diff --git a/src/content/reference/en/p5.Table/set.mdx b/src/content/reference/en/p5.Table/set.mdx index 8ac08228be..28183cd022 100644 --- a/src/content/reference/en/p5.Table/set.mdx +++ b/src/content/reference/en/p5.Table/set.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 950 params: - name: row diff --git a/src/content/reference/en/p5.Table/setNum.mdx b/src/content/reference/en/p5.Table/setNum.mdx index 66ade0bef4..a86cc68769 100644 --- a/src/content/reference/en/p5.Table/setNum.mdx +++ b/src/content/reference/en/p5.Table/setNum.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 998 params: - name: row diff --git a/src/content/reference/en/p5.Table/setString.mdx b/src/content/reference/en/p5.Table/setString.mdx index 603cc8c5a2..445b509de1 100644 --- a/src/content/reference/en/p5.Table/setString.mdx +++ b/src/content/reference/en/p5.Table/setString.mdx @@ -7,6 +7,7 @@ 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.

+isConstructor: false line: 1043 params: - name: row diff --git a/src/content/reference/en/p5.Table/trim.mdx b/src/content/reference/en/p5.Table/trim.mdx index 37aab4fe2b..34b8ca8aef 100644 --- a/src/content/reference/en/p5.Table/trim.mdx +++ b/src/content/reference/en/p5.Table/trim.mdx @@ -8,6 +8,7 @@ description: | 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.

+isConstructor: false line: 824 params: - name: column diff --git a/src/content/reference/en/p5.TableRow/get.mdx b/src/content/reference/en/p5.TableRow/get.mdx index c085e02c9c..4e74d639a7 100644 --- a/src/content/reference/en/p5.TableRow/get.mdx +++ b/src/content/reference/en/p5.TableRow/get.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 184 params: - name: column diff --git a/src/content/reference/en/p5.TableRow/getNum.mdx b/src/content/reference/en/p5.TableRow/getNum.mdx index 4d7d4a021d..2c71ae52bd 100644 --- a/src/content/reference/en/p5.TableRow/getNum.mdx +++ b/src/content/reference/en/p5.TableRow/getNum.mdx @@ -7,6 +7,7 @@ description: |

Retrieves a Float value from the TableRow's specified column. The column may be specified by either its ID or title.

+isConstructor: false line: 231 params: - name: column diff --git a/src/content/reference/en/p5.TableRow/getString.mdx b/src/content/reference/en/p5.TableRow/getString.mdx index 208d4880ca..4181d8b427 100644 --- a/src/content/reference/en/p5.TableRow/getString.mdx +++ b/src/content/reference/en/p5.TableRow/getString.mdx @@ -7,6 +7,7 @@ description: |

Retrieves an String value from the TableRow's specified column. The column may be specified by either its ID or title.

+isConstructor: false line: 285 params: - name: column diff --git a/src/content/reference/en/p5.TableRow/set.mdx b/src/content/reference/en/p5.TableRow/set.mdx index b5d7018306..aaa6c06e5a 100644 --- a/src/content/reference/en/p5.TableRow/set.mdx +++ b/src/content/reference/en/p5.TableRow/set.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 36 params: - name: column diff --git a/src/content/reference/en/p5.TableRow/setNum.mdx b/src/content/reference/en/p5.TableRow/setNum.mdx index f0db44e85a..b5eade235e 100644 --- a/src/content/reference/en/p5.TableRow/setNum.mdx +++ b/src/content/reference/en/p5.TableRow/setNum.mdx @@ -6,6 +6,7 @@ file: src/io/p5.TableRow.js description: |

Stores a Float value in the TableRow's specified column. The column may be specified by either its ID or title.

+isConstructor: false line: 97 params: - name: column diff --git a/src/content/reference/en/p5.TableRow/setString.mdx b/src/content/reference/en/p5.TableRow/setString.mdx index c6afdd5ca4..6c5a709271 100644 --- a/src/content/reference/en/p5.TableRow/setString.mdx +++ b/src/content/reference/en/p5.TableRow/setString.mdx @@ -6,6 +6,7 @@ file: src/io/p5.TableRow.js description: |

Stores a String value in the TableRow's specified column. The column may be specified by either its ID or title.

+isConstructor: false line: 140 params: - name: column diff --git a/src/content/reference/en/p5.TypedDict/clear.mdx b/src/content/reference/en/p5.TypedDict/clear.mdx index dee3637443..7acd7361ac 100644 --- a/src/content/reference/en/p5.TypedDict/clear.mdx +++ b/src/content/reference/en/p5.TypedDict/clear.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Removes all previously stored key-value pairs from the Dictionary.

+isConstructor: false line: 245 itemtype: method class: p5.TypedDict diff --git a/src/content/reference/en/p5.TypedDict/create.mdx b/src/content/reference/en/p5.TypedDict/create.mdx index cd287013b6..a03579c476 100644 --- a/src/content/reference/en/p5.TypedDict/create.mdx +++ b/src/content/reference/en/p5.TypedDict/create.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Creates a new key-value pair in the Dictionary.

+isConstructor: false line: 209 itemtype: method class: p5.TypedDict diff --git a/src/content/reference/en/p5.TypedDict/get.mdx b/src/content/reference/en/p5.TypedDict/get.mdx index 0f2567ba61..9d5593019c 100644 --- a/src/content/reference/en/p5.TypedDict/get.mdx +++ b/src/content/reference/en/p5.TypedDict/get.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Returns the value stored at the given key.

+isConstructor: false line: 145 params: - name: the diff --git a/src/content/reference/en/p5.TypedDict/hasKey.mdx b/src/content/reference/en/p5.TypedDict/hasKey.mdx index fb39567533..737dd9560d 100644 --- a/src/content/reference/en/p5.TypedDict/hasKey.mdx +++ b/src/content/reference/en/p5.TypedDict/hasKey.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js description: |

Returns true if the given key exists in the Dictionary, otherwise returns false.

+isConstructor: false line: 123 params: - name: key diff --git a/src/content/reference/en/p5.TypedDict/print.mdx b/src/content/reference/en/p5.TypedDict/print.mdx index 5252e20ef9..f47712c092 100644 --- a/src/content/reference/en/p5.TypedDict/print.mdx +++ b/src/content/reference/en/p5.TypedDict/print.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js description: >

Logs the set of items currently stored in the Dictionary to the console.

+isConstructor: false line: 295 itemtype: method class: p5.TypedDict diff --git a/src/content/reference/en/p5.TypedDict/remove.mdx b/src/content/reference/en/p5.TypedDict/remove.mdx index 7b25324331..07b6deed87 100644 --- a/src/content/reference/en/p5.TypedDict/remove.mdx +++ b/src/content/reference/en/p5.TypedDict/remove.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Removes the key-value pair stored at the given key from the Dictionary.

+isConstructor: false line: 266 params: - name: key diff --git a/src/content/reference/en/p5.TypedDict/saveJSON.mdx b/src/content/reference/en/p5.TypedDict/saveJSON.mdx index f8b06da530..97be74a24f 100644 --- a/src/content/reference/en/p5.TypedDict/saveJSON.mdx +++ b/src/content/reference/en/p5.TypedDict/saveJSON.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Converts the Dictionary into a JSON file for local download.

+isConstructor: false line: 357 itemtype: method class: p5.TypedDict diff --git a/src/content/reference/en/p5.TypedDict/saveTable.mdx b/src/content/reference/en/p5.TypedDict/saveTable.mdx index e6925a634c..12c47755fa 100644 --- a/src/content/reference/en/p5.TypedDict/saveTable.mdx +++ b/src/content/reference/en/p5.TypedDict/saveTable.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

Converts the Dictionary into a CSV file for local download.

+isConstructor: false line: 319 itemtype: method class: p5.TypedDict diff --git a/src/content/reference/en/p5.TypedDict/set.mdx b/src/content/reference/en/p5.TypedDict/set.mdx index 022722c996..1c87f1b0da 100644 --- a/src/content/reference/en/p5.TypedDict/set.mdx +++ b/src/content/reference/en/p5.TypedDict/set.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js 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.

+isConstructor: false line: 171 params: - name: key diff --git a/src/content/reference/en/p5.TypedDict/size.mdx b/src/content/reference/en/p5.TypedDict/size.mdx index ecb42e8184..7650a20d32 100644 --- a/src/content/reference/en/p5.TypedDict/size.mdx +++ b/src/content/reference/en/p5.TypedDict/size.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js description: >

Returns the number of key-value pairs currently stored in the Dictionary.

+isConstructor: false line: 102 itemtype: method class: p5.TypedDict diff --git a/src/content/reference/en/p5.Vector/add.mdx b/src/content/reference/en/p5.Vector/add.mdx index 33ecb7eaaa..2d675e9d44 100644 --- a/src/content/reference/en/p5.Vector/add.mdx +++ b/src/content/reference/en/p5.Vector/add.mdx @@ -17,6 +17,7 @@ description: > p5.Vector object and doesn't change the originals.

+isConstructor: false line: 249 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/angleBetween.mdx b/src/content/reference/en/p5.Vector/angleBetween.mdx index da7d1403e6..9ad48e6ecf 100644 --- a/src/content/reference/en/p5.Vector/angleBetween.mdx +++ b/src/content/reference/en/p5.Vector/angleBetween.mdx @@ -17,6 +17,7 @@ description: > angles in the units of the current angleMode().

+isConstructor: false line: 1797 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/array.mdx b/src/content/reference/en/p5.Vector/array.mdx index 8c8137408c..e62737f661 100644 --- a/src/content/reference/en/p5.Vector/array.mdx +++ b/src/content/reference/en/p5.Vector/array.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Returns the vector's components as an array of numbers.

+isConstructor: false line: 2250 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/copy.mdx b/src/content/reference/en/p5.Vector/copy.mdx index c3379aac2c..30e539bbfe 100644 --- a/src/content/reference/en/p5.Vector/copy.mdx +++ b/src/content/reference/en/p5.Vector/copy.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Returns a copy of the p5.Vector object.

+isConstructor: false line: 217 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/cross.mdx b/src/content/reference/en/p5.Vector/cross.mdx index 85c347d6f6..3cbd33b2f4 100644 --- a/src/content/reference/en/p5.Vector/cross.mdx +++ b/src/content/reference/en/p5.Vector/cross.mdx @@ -16,6 +16,7 @@ description: > v2), is the same as calling v1.cross(v2).

+isConstructor: false line: 1192 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/dist.mdx b/src/content/reference/en/p5.Vector/dist.mdx index 287dc67f7d..f3d6dc4612 100644 --- a/src/content/reference/en/p5.Vector/dist.mdx +++ b/src/content/reference/en/p5.Vector/dist.mdx @@ -16,6 +16,7 @@ description: >

Use dist() to calculate the distance between points using coordinates as in dist(x1, y1, x2, y2).

+isConstructor: false line: 1236 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/div.mdx b/src/content/reference/en/p5.Vector/div.mdx index be37cb8435..7c2bb47423 100644 --- a/src/content/reference/en/p5.Vector/div.mdx +++ b/src/content/reference/en/p5.Vector/div.mdx @@ -19,6 +19,7 @@ description: > p5.Vector object and doesn't change the originals.

+isConstructor: false line: 822 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/dot.mdx b/src/content/reference/en/p5.Vector/dot.mdx index a5ec8ab441..9b4c38b1b3 100644 --- a/src/content/reference/en/p5.Vector/dot.mdx +++ b/src/content/reference/en/p5.Vector/dot.mdx @@ -29,6 +29,7 @@ description: > v2), is the same as calling v1.dot(v2).

+isConstructor: false line: 1103 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/equals.mdx b/src/content/reference/en/p5.Vector/equals.mdx index 96024abd51..5a821d0a75 100644 --- a/src/content/reference/en/p5.Vector/equals.mdx +++ b/src/content/reference/en/p5.Vector/equals.mdx @@ -25,6 +25,7 @@ description: > p5.Vector.equals(v0, v1), interprets both parameters as p5.Vector objects.

+isConstructor: false line: 2268 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/fromAngle.mdx b/src/content/reference/en/p5.Vector/fromAngle.mdx index a429f9503e..74e079ca09 100644 --- a/src/content/reference/en/p5.Vector/fromAngle.mdx +++ b/src/content/reference/en/p5.Vector/fromAngle.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Make a new 2D vector from an angle.

+isConstructor: false line: 2352 params: - name: angle diff --git a/src/content/reference/en/p5.Vector/fromAngles.mdx b/src/content/reference/en/p5.Vector/fromAngles.mdx index ab226221c1..10e6d6b1f7 100644 --- a/src/content/reference/en/p5.Vector/fromAngles.mdx +++ b/src/content/reference/en/p5.Vector/fromAngles.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Make a new 3D vector from a pair of ISO spherical angles.

+isConstructor: false line: 2405 params: - name: theta diff --git a/src/content/reference/en/p5.Vector/heading.mdx b/src/content/reference/en/p5.Vector/heading.mdx index ff8f11a585..f8223b6311 100644 --- a/src/content/reference/en/p5.Vector/heading.mdx +++ b/src/content/reference/en/p5.Vector/heading.mdx @@ -19,6 +19,7 @@ description: > p5.Vector.heading(v), works the same way.

+isConstructor: false line: 1530 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/lerp.mdx b/src/content/reference/en/p5.Vector/lerp.mdx index 083fdafb1b..7358aa03a9 100644 --- a/src/content/reference/en/p5.Vector/lerp.mdx +++ b/src/content/reference/en/p5.Vector/lerp.mdx @@ -22,6 +22,7 @@ description: > returns a new p5.Vector object and doesn't change the original.

+isConstructor: false line: 1911 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/limit.mdx b/src/content/reference/en/p5.Vector/limit.mdx index 9f02cd4002..028e9e6cc3 100644 --- a/src/content/reference/en/p5.Vector/limit.mdx +++ b/src/content/reference/en/p5.Vector/limit.mdx @@ -12,6 +12,7 @@ description: > new p5.Vector object and doesn't change the original.

+isConstructor: false line: 1388 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/mag.mdx b/src/content/reference/en/p5.Vector/mag.mdx index 7ecc656096..8f15096ad9 100644 --- a/src/content/reference/en/p5.Vector/mag.mdx +++ b/src/content/reference/en/p5.Vector/mag.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Returns the magnitude (length) of the vector.

+isConstructor: false line: 1056 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/magSq.mdx b/src/content/reference/en/p5.Vector/magSq.mdx index 80ba2cb968..12fff19059 100644 --- a/src/content/reference/en/p5.Vector/magSq.mdx +++ b/src/content/reference/en/p5.Vector/magSq.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Returns the magnitude (length) of the vector squared.

+isConstructor: false line: 1078 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/mult.mdx b/src/content/reference/en/p5.Vector/mult.mdx index 73c2bf9da6..2ceff9c972 100644 --- a/src/content/reference/en/p5.Vector/mult.mdx +++ b/src/content/reference/en/p5.Vector/mult.mdx @@ -19,6 +19,7 @@ description: > p5.Vector object and doesn't change the originals.

+isConstructor: false line: 604 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/normalize.mdx b/src/content/reference/en/p5.Vector/normalize.mdx index 2ff153e08b..bcd3ecca34 100644 --- a/src/content/reference/en/p5.Vector/normalize.mdx +++ b/src/content/reference/en/p5.Vector/normalize.mdx @@ -14,6 +14,7 @@ description: > returns a new p5.Vector object and doesn't change the original.

+isConstructor: false line: 1314 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/random2D.mdx b/src/content/reference/en/p5.Vector/random2D.mdx index aafbcc638f..423bdb5645 100644 --- a/src/content/reference/en/p5.Vector/random2D.mdx +++ b/src/content/reference/en/p5.Vector/random2D.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Make a new 2D unit vector with a random heading.

+isConstructor: false line: 2465 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/random3D.mdx b/src/content/reference/en/p5.Vector/random3D.mdx index 7b27d46c02..9bb6aa4aa5 100644 --- a/src/content/reference/en/p5.Vector/random3D.mdx +++ b/src/content/reference/en/p5.Vector/random3D.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

Make a new 3D unit vector with a random heading.

+isConstructor: false line: 2516 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/reflect.mdx b/src/content/reference/en/p5.Vector/reflect.mdx index 77c71aff94..1bc6ddd2d2 100644 --- a/src/content/reference/en/p5.Vector/reflect.mdx +++ b/src/content/reference/en/p5.Vector/reflect.mdx @@ -16,6 +16,7 @@ description: > returns a new p5.Vector object and doesn't change the original.

+isConstructor: false line: 2175 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/rem.mdx b/src/content/reference/en/p5.Vector/rem.mdx index ebc0bb02a6..fff72ab2f0 100644 --- a/src/content/reference/en/p5.Vector/rem.mdx +++ b/src/content/reference/en/p5.Vector/rem.mdx @@ -17,6 +17,7 @@ description: > p5.Vector object and doesn't change the originals.

+isConstructor: false line: 368 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/rotate.mdx b/src/content/reference/en/p5.Vector/rotate.mdx index 97e13c5870..72a2f2db26 100644 --- a/src/content/reference/en/p5.Vector/rotate.mdx +++ b/src/content/reference/en/p5.Vector/rotate.mdx @@ -22,6 +22,7 @@ description: > returns a new p5.Vector object and doesn't change the original.

+isConstructor: false line: 1689 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/set.mdx b/src/content/reference/en/p5.Vector/set.mdx index eba3aa5860..25f6928590 100644 --- a/src/content/reference/en/p5.Vector/set.mdx +++ b/src/content/reference/en/p5.Vector/set.mdx @@ -11,6 +11,7 @@ description: > Calling set() with no arguments sets the vector's components to 0.

+isConstructor: false line: 156 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/setHeading.mdx b/src/content/reference/en/p5.Vector/setHeading.mdx index a48779f078..61f5f74aed 100644 --- a/src/content/reference/en/p5.Vector/setHeading.mdx +++ b/src/content/reference/en/p5.Vector/setHeading.mdx @@ -10,6 +10,7 @@ description: |

If the vector was created with createVector(), setHeading() uses the units of the current angleMode().

+isConstructor: false line: 1610 params: - name: angle diff --git a/src/content/reference/en/p5.Vector/setMag.mdx b/src/content/reference/en/p5.Vector/setMag.mdx index 6ba86052fb..8faead8a30 100644 --- a/src/content/reference/en/p5.Vector/setMag.mdx +++ b/src/content/reference/en/p5.Vector/setMag.mdx @@ -12,6 +12,7 @@ description: > a new p5.Vector object and doesn't change the original.

+isConstructor: false line: 1460 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/slerp.mdx b/src/content/reference/en/p5.Vector/slerp.mdx index 09587a67ba..79779fea5c 100644 --- a/src/content/reference/en/p5.Vector/slerp.mdx +++ b/src/content/reference/en/p5.Vector/slerp.mdx @@ -32,6 +32,7 @@ description: > returns a new p5.Vector object and doesn't change the original.

+isConstructor: false line: 2009 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/sub.mdx b/src/content/reference/en/p5.Vector/sub.mdx index 9ab25fa7fb..5c3f7573ad 100644 --- a/src/content/reference/en/p5.Vector/sub.mdx +++ b/src/content/reference/en/p5.Vector/sub.mdx @@ -17,6 +17,7 @@ description: > p5.Vector object and doesn't change the originals.

+isConstructor: false line: 485 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/toString.mdx b/src/content/reference/en/p5.Vector/toString.mdx index 31faeb59f3..758cc9515b 100644 --- a/src/content/reference/en/p5.Vector/toString.mdx +++ b/src/content/reference/en/p5.Vector/toString.mdx @@ -6,6 +6,7 @@ file: src/math/p5.Vector.js description: |

Returns a string representation of a vector. This method is useful for printing vectors to the console while debugging.

+isConstructor: false line: 136 itemtype: method class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/x.mdx b/src/content/reference/en/p5.Vector/x.mdx index 89d3eeb822..c895454509 100644 --- a/src/content/reference/en/p5.Vector/x.mdx +++ b/src/content/reference/en/p5.Vector/x.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

The x component of the vector

+isConstructor: false line: 113 itemtype: property class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/y.mdx b/src/content/reference/en/p5.Vector/y.mdx index 38a9f0acdd..f9111ed683 100644 --- a/src/content/reference/en/p5.Vector/y.mdx +++ b/src/content/reference/en/p5.Vector/y.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

The y component of the vector

+isConstructor: false line: 120 itemtype: property class: p5.Vector diff --git a/src/content/reference/en/p5.Vector/z.mdx b/src/content/reference/en/p5.Vector/z.mdx index 42f266d6b0..0d8cfde2dc 100644 --- a/src/content/reference/en/p5.Vector/z.mdx +++ b/src/content/reference/en/p5.Vector/z.mdx @@ -5,6 +5,7 @@ submodule: Vector file: src/math/p5.Vector.js description: |

The z component of the vector

+isConstructor: false line: 127 itemtype: property class: p5.Vector diff --git a/src/content/reference/en/p5.XML/addChild.mdx b/src/content/reference/en/p5.XML/addChild.mdx index 3e502926a7..53398d553f 100644 --- a/src/content/reference/en/p5.XML/addChild.mdx +++ b/src/content/reference/en/p5.XML/addChild.mdx @@ -12,6 +12,7 @@ description: > A reference to the newly created child is returned as an p5.XML object.

+isConstructor: false line: 368 params: - name: node diff --git a/src/content/reference/en/p5.XML/getAttributeCount.mdx b/src/content/reference/en/p5.XML/getAttributeCount.mdx index 8841c0d350..71f09fbce4 100644 --- a/src/content/reference/en/p5.XML/getAttributeCount.mdx +++ b/src/content/reference/en/p5.XML/getAttributeCount.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: >

Counts the specified element's number of attributes, returned as an Number.

+isConstructor: false line: 492 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/getChild.mdx b/src/content/reference/en/p5.XML/getChild.mdx index 6fa2de7fc0..bf9258ab33 100644 --- a/src/content/reference/en/p5.XML/getChild.mdx +++ b/src/content/reference/en/p5.XML/getChild.mdx @@ -7,6 +7,7 @@ description: |

Returns the first of the element's children that matches the name parameter or the child of the given index.It returns undefined if no matching child is found.

+isConstructor: false line: 308 params: - name: name diff --git a/src/content/reference/en/p5.XML/getChildren.mdx b/src/content/reference/en/p5.XML/getChildren.mdx index 735b3227c7..99721c9d81 100644 --- a/src/content/reference/en/p5.XML/getChildren.mdx +++ b/src/content/reference/en/p5.XML/getChildren.mdx @@ -10,6 +10,7 @@ description: > the name parameter is specified, then it will return all children that match that name.

+isConstructor: false line: 258 params: - name: name diff --git a/src/content/reference/en/p5.XML/getContent.mdx b/src/content/reference/en/p5.XML/getContent.mdx index 660b2ffb28..b001e8989c 100644 --- a/src/content/reference/en/p5.XML/getContent.mdx +++ b/src/content/reference/en/p5.XML/getContent.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: |

Returns the content of an element. If there is no such content, defaultValue is returned if specified, otherwise null is returned.

+isConstructor: false line: 751 params: - name: defaultValue diff --git a/src/content/reference/en/p5.XML/getName.mdx b/src/content/reference/en/p5.XML/getName.mdx index 56f3aa2009..94d278b4b8 100644 --- a/src/content/reference/en/p5.XML/getName.mdx +++ b/src/content/reference/en/p5.XML/getName.mdx @@ -5,6 +5,7 @@ submodule: Input file: src/io/p5.XML.js description: |

Gets the element's full name, which is returned as a String.

+isConstructor: false line: 100 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/getNum.mdx b/src/content/reference/en/p5.XML/getNum.mdx index 5206b37f16..3b619463ff 100644 --- a/src/content/reference/en/p5.XML/getNum.mdx +++ b/src/content/reference/en/p5.XML/getNum.mdx @@ -8,6 +8,7 @@ description: | parameter is specified and the attribute doesn't exist, then defaultValue is returned. If no defaultValue is specified and the attribute doesn't exist, the value 0 is returned.

+isConstructor: false line: 616 params: - name: name diff --git a/src/content/reference/en/p5.XML/getParent.mdx b/src/content/reference/en/p5.XML/getParent.mdx index 2f1a3b4094..b48390fc04 100644 --- a/src/content/reference/en/p5.XML/getParent.mdx +++ b/src/content/reference/en/p5.XML/getParent.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: |

Gets a copy of the element's parent. Returns the parent as another p5.XML object.

+isConstructor: false line: 62 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/getString.mdx b/src/content/reference/en/p5.XML/getString.mdx index 6efab9896b..f9a7b37304 100644 --- a/src/content/reference/en/p5.XML/getString.mdx +++ b/src/content/reference/en/p5.XML/getString.mdx @@ -8,6 +8,7 @@ description: | parameter is specified and the attribute doesn't exist, then defaultValue is returned. If no defaultValue is specified and the attribute doesn't exist, null is returned.

+isConstructor: false line: 663 params: - name: name diff --git a/src/content/reference/en/p5.XML/hasAttribute.mdx b/src/content/reference/en/p5.XML/hasAttribute.mdx index 95ebbba5b7..4b42e79f9b 100644 --- a/src/content/reference/en/p5.XML/hasAttribute.mdx +++ b/src/content/reference/en/p5.XML/hasAttribute.mdx @@ -5,6 +5,7 @@ submodule: Input file: src/io/p5.XML.js description: |

Checks whether or not an element has the specified attribute.

+isConstructor: false line: 571 params: - name: the diff --git a/src/content/reference/en/p5.XML/hasChildren.mdx b/src/content/reference/en/p5.XML/hasChildren.mdx index 9eeda97e42..8de1b0888f 100644 --- a/src/content/reference/en/p5.XML/hasChildren.mdx +++ b/src/content/reference/en/p5.XML/hasChildren.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: |

Checks whether or not the element has any children, and returns the result as a boolean.

+isConstructor: false line: 181 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/listAttributes.mdx b/src/content/reference/en/p5.XML/listAttributes.mdx index c98356397a..2e9c855761 100644 --- a/src/content/reference/en/p5.XML/listAttributes.mdx +++ b/src/content/reference/en/p5.XML/listAttributes.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: |

Gets all of the specified element's attributes, and returns them as an array of Strings.

+isConstructor: false line: 528 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/listChildren.mdx b/src/content/reference/en/p5.XML/listChildren.mdx index 4f825c3245..9393cf683e 100644 --- a/src/content/reference/en/p5.XML/listChildren.mdx +++ b/src/content/reference/en/p5.XML/listChildren.mdx @@ -10,6 +10,7 @@ description: > href="#/p5.XML/getName">getName() on each child element individually.

+isConstructor: false line: 217 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/removeChild.mdx b/src/content/reference/en/p5.XML/removeChild.mdx index d742b35401..3bdaf21ea9 100644 --- a/src/content/reference/en/p5.XML/removeChild.mdx +++ b/src/content/reference/en/p5.XML/removeChild.mdx @@ -5,6 +5,7 @@ submodule: Input file: src/io/p5.XML.js description: |

Removes the element specified by name or index.

+isConstructor: false line: 420 params: - name: name diff --git a/src/content/reference/en/p5.XML/serialize.mdx b/src/content/reference/en/p5.XML/serialize.mdx index 48c281571c..74deea5dee 100644 --- a/src/content/reference/en/p5.XML/serialize.mdx +++ b/src/content/reference/en/p5.XML/serialize.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: |

Serializes the element into a string. This function is useful for preparing the content to be sent over a http request or saved to file.

+isConstructor: false line: 833 itemtype: method class: p5.XML diff --git a/src/content/reference/en/p5.XML/setAttribute.mdx b/src/content/reference/en/p5.XML/setAttribute.mdx index 2dbb62a205..e6aa94402f 100644 --- a/src/content/reference/en/p5.XML/setAttribute.mdx +++ b/src/content/reference/en/p5.XML/setAttribute.mdx @@ -6,6 +6,7 @@ file: src/io/p5.XML.js description: |

Sets the content of an element's attribute. The first parameter specifies the attribute name, while the second specifies the new content.

+isConstructor: false line: 710 params: - name: name diff --git a/src/content/reference/en/p5.XML/setContent.mdx b/src/content/reference/en/p5.XML/setContent.mdx index 71e7f82305..3af2daa5f0 100644 --- a/src/content/reference/en/p5.XML/setContent.mdx +++ b/src/content/reference/en/p5.XML/setContent.mdx @@ -5,6 +5,7 @@ submodule: Input file: src/io/p5.XML.js description: |

Sets the element's content.

+isConstructor: false line: 792 params: - name: text diff --git a/src/content/reference/en/p5.XML/setName.mdx b/src/content/reference/en/p5.XML/setName.mdx index 012543860b..e686e0ee2b 100644 --- a/src/content/reference/en/p5.XML/setName.mdx +++ b/src/content/reference/en/p5.XML/setName.mdx @@ -5,6 +5,7 @@ submodule: Input file: src/io/p5.XML.js description: |

Sets the element's name, which is specified as a String.

+isConstructor: false line: 135 params: - name: the diff --git a/src/content/reference/en/p5.sound/p5.Amplitude.mdx b/src/content/reference/en/p5.sound/p5.Amplitude.mdx index 630ff88fd2..b6d29ebe6b 100644 --- a/src/content/reference/en/p5.sound/p5.Amplitude.mdx +++ b/src/content/reference/en/p5.sound/p5.Amplitude.mdx @@ -17,33 +17,9 @@ params: amplitude readings (defaults to 0)

type: Number optional: true -memberMethodPreviews: - setInput: - description: | -

Connects to the p5sound instance (main output) by default. - Optionally, you can pass in a specific source (i.e. a soundfile).

- path: .././src/content/reference/en//p5.Amplitude/setInput - getLevel: - description: | -

Returns a single Amplitude reading at the moment it is called. - For continuous readings, run in the draw loop.

- path: .././src/content/reference/en//p5.Amplitude/getLevel - toggleNormalize: - description: | -

Determines whether the results of Amplitude.process() will be - Normalized. To normalize, Amplitude finds the difference the - loudest reading it has processed and the maximum amplitude of - 1.0. Amplitude adds this difference to all values to produce - results that will reliably map between 0.0 and 1.0. However, - 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.

- path: .././src/content/reference/en//p5.Amplitude/toggleNormalize - smooth: - description: | -

Smooth Amplitude analysis by averaging with the last analysis - frame. Off by default.

- path: .././src/content/reference/en//p5.Amplitude/smooth +example: + - "\n
\nlet sound, amplitude;\n\nfunction preload(){\n sound = loadSound('assets/beat.mp3');\n}\nfunction setup() {\n let cnv = createCanvas(100,100);\n cnv.mouseClicked(togglePlay);\n amplitude = new p5.Amplitude();\n}\n\nfunction draw() {\n background(220);\n text('tap to play', 20, 20);\n\n let level = amplitude.getLevel();\n let size = map(level, 0, 1, 0, 200);\n ellipse(width/2, height/2, size, size);\n}\n\nfunction togglePlay() {\n if (sound.isPlaying() ){\n sound.pause();\n } else {\n sound.loop();\n\t\tamplitude = new p5.Amplitude();\n\t\tamplitude.setInput(sound);\n }\n}\n\n
" +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.AudioIn.mdx b/src/content/reference/en/p5.sound/p5.AudioIn.mdx index 2cf9259406..7a88f439e8 100644 --- a/src/content/reference/en/p5.sound/p5.AudioIn.mdx +++ b/src/content/reference/en/p5.sound/p5.AudioIn.mdx @@ -39,72 +39,31 @@ params: currently allow microphone access.

type: Function optional: true -memberMethodPreviews: - enabled: - description: | -

Client must allow browser to access their microphone / audioin source. - Default: false. Will become true when the client enables access.

- path: .././src/content/reference/en//p5.AudioIn/enabled - amplitude: - description: | -

Input amplitude, connect to it by default but not to master out

- path: .././src/content/reference/en//p5.AudioIn/amplitude - start: - description: | -

Start processing audio input. This enables the use of other - AudioIn methods like getLevel(). Note that by default, AudioIn - is not connected to p5.sound's output. So you won't hear - anything unless you use the connect() method.

-

Certain browsers limit access to the user's microphone. For example, - 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.

- path: .././src/content/reference/en//p5.AudioIn/start - stop: - description: | -

Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel(). - If re-starting, the user may be prompted for permission access.

- path: .././src/content/reference/en//p5.AudioIn/stop - connect: - description: | -

Connect to an audio unit. If no parameter is provided, will - connect to the main output (i.e. your speakers).

- path: .././src/content/reference/en//p5.AudioIn/connect - disconnect: - description: | -

Disconnect the AudioIn from all audio units. For example, if - connect() had been called, disconnect() will stop sending - signal to your speakers.

- path: .././src/content/reference/en//p5.AudioIn/disconnect - getLevel: - description: | -

Read the Amplitude (volume level) of an AudioIn. The AudioIn - class contains its own instance of the Amplitude class to help - 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().

- path: .././src/content/reference/en//p5.AudioIn/getLevel - amp: - description: | -

Set amplitude (volume) of a mic input between 0 and 1.0.

- path: .././src/content/reference/en//p5.AudioIn/amp - getSources: - description: | -

Returns a list of available input sources. This is a wrapper - for - MediaDevices.enumerateDevices() - Web APIs | MDN - and it returns a Promise.

- path: .././src/content/reference/en//p5.AudioIn/getSources - setSource: - 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 - - navigator.mediaDevices.enumerateDevices()

- path: .././src/content/reference/en//p5.AudioIn/setSource +example: + - |- + +
+ let mic; + + function setup(){ + let cnv = createCanvas(100, 100); + cnv.mousePressed(userStartAudio); + textAlign(CENTER); + mic = new p5.AudioIn(); + mic.start(); + } + + function draw(){ + background(0); + fill(255); + text('tap to start', width/2, 20); + + micLevel = mic.getLevel(); + let y = height - micLevel * height; + ellipse(width/2, y, 10, 10); + } +
+chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.AudioVoice.mdx b/src/content/reference/en/p5.sound/p5.AudioVoice.mdx index ed6a1083ce..8d6a2aa756 100644 --- a/src/content/reference/en/p5.sound/p5.AudioVoice.mdx +++ b/src/content/reference/en/p5.sound/p5.AudioVoice.mdx @@ -9,15 +9,7 @@ description: | remain compatible with p5.PolySynth();

isConstructor: true line: 11149 -memberMethodPreviews: - connect: - description: | -

Connect to p5 objects or Web Audio Nodes

- path: .././src/content/reference/en//p5.AudioVoice/connect - disconnect: - description: | -

Disconnect from soundOut

- path: .././src/content/reference/en//p5.AudioVoice/disconnect +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.BandPass.mdx b/src/content/reference/en/p5.sound/p5.BandPass.mdx index 002669bbe8..f301f919f4 100644 --- a/src/content/reference/en/p5.sound/p5.BandPass.mdx +++ b/src/content/reference/en/p5.sound/p5.BandPass.mdx @@ -10,6 +10,7 @@ description: | See p5.Filter for methods.

isConstructor: true line: 6962 +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Compressor.mdx b/src/content/reference/en/p5.sound/p5.Compressor.mdx index 487b36702d..061e32cfe5 100644 --- a/src/content/reference/en/p5.sound/p5.Compressor.mdx +++ b/src/content/reference/en/p5.sound/p5.Compressor.mdx @@ -32,47 +32,7 @@ description: > available.

isConstructor: true line: 10036 -memberMethodPreviews: - compressor: - description: > -

The p5.Compressor is built with a Web Audio Dynamics Compressor Node -

- path: .././src/content/reference/en//p5.Compressor/compressor - process: - description: | -

Performs the same function as .connect, but also accepts - optional parameters to set compressor's audioParams

- path: .././src/content/reference/en//p5.Compressor/process - set: - description: | -

Set the paramters of a compressor.

- path: .././src/content/reference/en//p5.Compressor/set - attack: - description: | -

Get current attack or set value w/ time ramp

- path: .././src/content/reference/en//p5.Compressor/attack - knee: - description: | -

Get current knee or set value w/ time ramp

- path: .././src/content/reference/en//p5.Compressor/knee - ratio: - description: | -

Get current ratio or set value w/ time ramp

- path: .././src/content/reference/en//p5.Compressor/ratio - threshold: - description: | -

Get current threshold or set value w/ time ramp

- path: .././src/content/reference/en//p5.Compressor/threshold - release: - description: | -

Get current release or set value w/ time ramp

- path: .././src/content/reference/en//p5.Compressor/release - reduction: - description: | -

Return the current reduction value

- path: .././src/content/reference/en//p5.Compressor/reduction +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Convolver.mdx b/src/content/reference/en/p5.sound/p5.Convolver.mdx index b796c0bfec..4ef8885fba 100644 --- a/src/content/reference/en/p5.sound/p5.Convolver.mdx +++ b/src/content/reference/en/p5.sound/p5.Convolver.mdx @@ -38,51 +38,43 @@ params: about what went wrong.

type: Function optional: true -memberMethodPreviews: - convolverNode: - description: | -

Internally, the p5.Convolver uses the a - - Web Audio Convolver Node.

- 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.

- path: .././src/content/reference/en//p5.Convolver/impulses - process: - description: | -

Connect a source to the convolver.

- path: .././src/content/reference/en//p5.Convolver/process - addImpulse: - description: | -

Load and assign a new Impulse Response to the p5.Convolver. - The impulse is added to the .impulses array. Previous - impulses can be accessed with the .toggleImpulse(id) - method.

- path: .././src/content/reference/en//p5.Convolver/addImpulse - resetImpulse: - description: | -

Similar to .addImpulse, except that the .impulses - Array is reset to save memory. A new .impulses - array is created with this impulse as the only item.

- path: .././src/content/reference/en//p5.Convolver/resetImpulse - toggleImpulse: - description: | -

If you have used .addImpulse() to add multiple impulses - to a p5.Convolver, then you can use this method to toggle between - the items in the .impulses Array. Accepts a parameter - to identify which impulse you wish to use, identified either by its - original filename (String) or by its position in the .impulses - Array (Number).
- You can access the objects in the .impulses Array directly. Each - Object has two attributes: an .audioBuffer (type: - Web Audio - AudioBuffer) and a .name, a String that corresponds - with the original filename.

- path: .././src/content/reference/en//p5.Convolver/toggleImpulse +example: + - |- + +
+ let cVerb, sound; + function preload() { + // We have both MP3 and OGG versions of all sound assets + soundFormats('ogg', 'mp3'); + + // Try replacing 'bx-spring' with other soundfiles like + // 'concrete-tunnel' 'small-plate' 'drum' 'beatbox' + cVerb = createConvolver('assets/bx-spring.mp3'); + + // Try replacing 'Damscray_DancingTiger' with + // 'beat', 'doorbell', lucky_dragons_-_power_melody' + sound = loadSound('assets/Damscray_DancingTiger.mp3'); + } + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playSound); + background(220); + text('tap to play', 20, 20); + + // disconnect from main output... + sound.disconnect(); + + // ...and process with cVerb + // so that we only hear the convolution + cVerb.process(sound); + } + + function playSound() { + sound.play(); + } +
+chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Delay.mdx b/src/content/reference/en/p5.sound/p5.Delay.mdx index 0ee4f597b3..12278b63c5 100644 --- a/src/content/reference/en/p5.sound/p5.Delay.mdx +++ b/src/content/reference/en/p5.sound/p5.Delay.mdx @@ -32,65 +32,38 @@ description: > available.

isConstructor: true line: 7926 -memberMethodPreviews: - leftDelay: - description: | -

The p5.Delay is built with two - - Web Audio Delay Nodes, one for each stereo channel.

- 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: .././src/content/reference/en//p5.Delay/rightDelay - process: - description: | -

Add delay to an audio signal according to a set - of delay parameters.

- 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: .././src/content/reference/en//p5.Delay/delayTime - feedback: - description: > -

Feedback occurs when Delay sends its signal back through its input - - in a loop. The feedback amount determines how much signal to send each - - time through the loop. A feedback greater than 1.0 is not desirable - because - - it will increase the overall output each time through the loop, - - creating an infinite feedback loop. The default value is 0.5

- 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: .././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: .././src/content/reference/en//p5.Delay/setType - amp: - description: | -

Set the output level of the delay effect.

- path: .././src/content/reference/en//p5.Delay/amp - connect: - description: | -

Send output to a p5.sound or web audio object

- path: .././src/content/reference/en//p5.Delay/connect - disconnect: - description: | -

Disconnect all output.

- path: .././src/content/reference/en//p5.Delay/disconnect +example: + - |- + +
+ let osc; + + function setup() { + let cnv = createCanvas(100, 100); + background(220); + textAlign(CENTER); + text('tap to play', width/2, height/2); + + osc = new p5.Oscillator('square'); + osc.amp(0.5); + delay = new p5.Delay(); + + // delay.process() accepts 4 parameters: + // source, delayTime (in seconds), feedback, filter frequency + delay.process(osc, 0.12, .7, 2300); + + cnv.mousePressed(oscStart); + } + + function oscStart() { + osc.start(); + } + + function mouseReleased() { + osc.stop(); + } +
+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 c4ca67d308..7ec5912c39 100644 --- a/src/content/reference/en/p5.sound/p5.Distortion.mdx +++ b/src/content/reference/en/p5.sound/p5.Distortion.mdx @@ -38,30 +38,7 @@ params: type: String optional: true optdefault: '''none''' -memberMethodPreviews: - WaveShaperNode: - description: | -

The p5.Distortion is built with a - - Web Audio WaveShaper Node.

- path: .././src/content/reference/en//p5.Distortion/WaveShaperNode - process: - description: > -

Process a sound source, optionally specify amount and oversample - values.

- path: .././src/content/reference/en//p5.Distortion/process - set: - description: | -

Set the amount and oversample of the waveshaper distortion.

- path: .././src/content/reference/en//p5.Distortion/set - getAmount: - description: | -

Return the distortion amount, typically between 0-1.

- path: .././src/content/reference/en//p5.Distortion/getAmount - getOversample: - description: | -

Return the oversampling.

- path: .././src/content/reference/en//p5.Distortion/getOversample +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 66ab4a614c..2b7edb9902 100644 --- a/src/content/reference/en/p5.sound/p5.EQ.mdx +++ b/src/content/reference/en/p5.sound/p5.EQ.mdx @@ -40,22 +40,67 @@ params:

Constructor will accept 3 or 8, defaults to 3

type: Number optional: true +example: + - |- + +
+ let eq, soundFile + let eqBandIndex = 0; + let eqBandNames = ['lows', 'mids', 'highs']; + + function preload() { + soundFormats('mp3', 'ogg'); + soundFile = loadSound('assets/beat'); + } + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(toggleSound); + + eq = new p5.EQ(eqBandNames.length); + soundFile.disconnect(); + eq.process(soundFile); + } + + function draw() { + background(30); + noStroke(); + fill(255); + textAlign(CENTER); + text('filtering ', 50, 25); + + fill(255, 40, 255); + textSize(26); + text(eqBandNames[eqBandIndex], 50, 55); + + fill(255); + textSize(9); + + if (!soundFile.isPlaying()) { + text('tap to play', 50, 80); + } else { + text('tap to filter next band', 50, 80) + } + } + + function toggleSound() { + if (!soundFile.isPlaying()) { + soundFile.play(); + } else { + eqBandIndex = (eqBandIndex + 1) % eq.bands.length; + } + + for (let i = 0; i < eq.bands.length; i++) { + eq.bands[i].gain(0); + } + // filter the band we want to filter + eq.bands[eqBandIndex].gain(-40); + } +
return: description: p5.EQ object type: Object -memberMethodPreviews: - bands: - description: | -

The p5.EQ is built with abstracted p5.Filter objects. - To modify any bands, use methods of the - p5.Filter API, especially gain and freq. - Bands are stored in an array, with indices 0 - 3, or 0 - 7

- path: .././src/content/reference/en//p5.EQ/bands - process: - description: | -

Process an input by connecting it to the EQ

- path: .././src/content/reference/en//p5.EQ/process +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 aad01fe789..bc41f95faf 100644 --- a/src/content/reference/en/p5.sound/p5.Effect.mdx +++ b/src/content/reference/en/p5.sound/p5.Effect.mdx @@ -50,30 +50,7 @@ params: signals are mixed properly.

type: AudioNode optional: true -memberMethodPreviews: - amp: - description: | -

Set the output volume of the filter.

- 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: .././src/content/reference/en//p5.Effect/chain - drywet: - description: | -

Adjust the dry/wet value.

- 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: .././src/content/reference/en//p5.Effect/connect - disconnect: - description: | -

Disconnect all output.

- 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 fd2bae4911..f53452276c 100644 --- a/src/content/reference/en/p5.sound/p5.Envelope.mdx +++ b/src/content/reference/en/p5.sound/p5.Envelope.mdx @@ -38,121 +38,35 @@ description: >- trigger noteOn/noteOff.

isConstructor: true line: 4721 -memberMethodPreviews: - attackTime: - description: | -

Time until envelope reaches attackLevel

- path: .././src/content/reference/en//p5.Envelope/attackTime - attackLevel: - description: | -

Level once attack is complete.

- path: .././src/content/reference/en//p5.Envelope/attackLevel - decayTime: - description: | -

Time until envelope reaches decayLevel.

- path: .././src/content/reference/en//p5.Envelope/decayTime - decayLevel: - description: > -

Level after decay. The envelope will sustain here until it is - released.

- path: .././src/content/reference/en//p5.Envelope/decayLevel - releaseTime: - description: | -

Duration of the release portion of the envelope.

- path: .././src/content/reference/en//p5.Envelope/releaseTime - releaseLevel: - description: | -

Level at the end of the release.

- path: .././src/content/reference/en//p5.Envelope/releaseLevel - set: - description: | -

Reset the envelope with a series of time/value pairs.

- path: .././src/content/reference/en//p5.Envelope/set - setADSR: - description: > -

Set values like a traditional - - - - ADSR envelope - - .

- path: .././src/content/reference/en//p5.Envelope/setADSR - setRange: - description: | -

Set max (attackLevel) and min (releaseLevel) of envelope.

- 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: .././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: .././src/content/reference/en//p5.Envelope/setExp - play: - description: |- -

Play tells the envelope to start acting on a given input. - If the input is a p5.sound object (i.e. AudioIn, Oscillator, - SoundFile), then Envelope will control its output volume. - Envelopes can also be used to control any - Web Audio Audio Param.

- path: .././src/content/reference/en//p5.Envelope/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. Input can be - any p5.sound object, or a - Web Audio Param.

- 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: .././src/content/reference/en//p5.Envelope/triggerRelease - ramp: - description: > -

Exponentially ramp to a value using the first two - - values from setADSR(attackTime, - decayTime) - - as - - time constants for simple exponential ramps. - - If the value is higher than current value, it uses attackTime, - - while a decrease uses decayTime.

- 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: .././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: .././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: .././src/content/reference/en//p5.Envelope/scale +example: + - |- + +
+ let t1 = 0.1; // attack time in seconds + let l1 = 0.7; // attack level 0.0 to 1.0 + let t2 = 0.3; // decay time in seconds + let l2 = 0.1; // decay level 0.0 to 1.0 + + let env; + let triOsc; + + function setup() { + let cnv = createCanvas(100, 100); + background(220); + text('tap to play', 20, 20); + cnv.mousePressed(playSound); + + env = new p5.Envelope(t1, l1, t2, l2); + triOsc = new p5.Oscillator('triangle'); + } + + function playSound() { + // starting the oscillator ensures that audio is enabled. + triOsc.start(); + env.play(triOsc); + } +
+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 5b267d5e60..53373764ab 100644 --- a/src/content/reference/en/p5.sound/p5.FFT.mdx +++ b/src/content/reference/en/p5.sound/p5.FFT.mdx @@ -46,101 +46,56 @@ params: 16 and 1024. Defaults to 1024.

type: Number optional: true -memberMethodPreviews: - setInput: - description: | -

Set the input source for the FFT analysis. If no source is - provided, FFT will analyze all sound in the sketch.

- path: .././src/content/reference/en//p5.FFT/setInput - waveform: - description: > -

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 - - equal to bins (defaults to 1024). Can be used to draw the waveform - - of a sound.

- path: .././src/content/reference/en//p5.FFT/waveform - analyze: - description: | -

Returns an array of amplitude values (between 0 and 255) - across the frequency spectrum. Length is equal to FFT bins - (1024 by default). The array indices correspond to frequencies - (i.e. pitches), from the lowest to the highest that humans can - hear. Each value represents amplitude at that slice of the - frequency spectrum. Must be called prior to using - getEnergy().

- path: .././src/content/reference/en//p5.FFT/analyze - getEnergy: - 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 - frequency ranges ("bass", "lowMid", "mid", "highMid", "treble"). - Returns a range between 0 (no energy/volume at that frequency) and - 255 (maximum energy). - NOTE: analyze() must be called prior to getEnergy(). analyze() - 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: .././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: .././src/content/reference/en//p5.FFT/getCentroid - smooth: - description: | -

Smooth FFT analysis by averaging with the last analysis frame.

- path: .././src/content/reference/en//p5.FFT/smooth - linAverages: - description: | -

Returns an array of average amplitude values for a given number - of frequency bands split equally. N defaults to 16. - 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: .././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 - - NOTE: analyze() must be called prior to logAverages(). Analyze() - - tells the FFT to analyze frequency data, and logAverages() uses - - the results to group them into a smaller set of averages.

- path: .././src/content/reference/en//p5.FFT/logAverages - getOctaveBands: - description: > -

Calculates and Returns the 1/N - - Octave - Bands - - N defaults to 3 and minimum central frequency to 15.625Hz. - - (1/3 Octave Bands ~= 31 Frequency Bands) - - Setting fCtr0 to a central value of a higher octave will ignore the lower - bands - - and produce less frequency groups.

- path: .././src/content/reference/en//p5.FFT/getOctaveBands +example: + - |- + +
+ function preload(){ + sound = loadSound('assets/Damscray_DancingTiger.mp3'); + } + + function setup(){ + let cnv = createCanvas(100,100); + cnv.mouseClicked(togglePlay); + fft = new p5.FFT(); + sound.amp(0.2); + } + + function draw(){ + background(220); + + let spectrum = fft.analyze(); + noStroke(); + fill(255, 0, 255); + for (let i = 0; i< spectrum.length; i++){ + let x = map(i, 0, spectrum.length, 0, width); + let h = -height + map(spectrum[i], 0, 255, height, 0); + rect(x, height, width / spectrum.length, h ) + } + + let waveform = fft.waveform(); + noFill(); + beginShape(); + stroke(20); + for (let i = 0; i < waveform.length; i++){ + let x = map(i, 0, waveform.length, 0, width); + let y = map( waveform[i], -1, 1, 0, height); + vertex(x,y); + } + endShape(); + + text('tap to play', 20, 20); + } + + function togglePlay() { + if (sound.isPlaying()) { + sound.pause(); + } else { + sound.loop(); + } + } +
+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 ff217bad6a..af1e62ed8b 100644 --- a/src/content/reference/en/p5.sound/p5.Filter.mdx +++ b/src/content/reference/en/p5.sound/p5.Filter.mdx @@ -49,51 +49,62 @@ params:

'lowpass' (default), 'highpass', 'bandpass'

type: String optional: true -memberMethodPreviews: - biquadFilter: - description: | -

The p5.Filter is built with a - - Web Audio BiquadFilter Node.

- path: .././src/content/reference/en//p5.Filter/biquadFilter - process: - description: | -

Filter an audio signal according to a set - of filter parameters.

- path: .././src/content/reference/en//p5.Filter/process - set: - description: | -

Set the frequency and the resonance of the filter.

- 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: .././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: .././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: .././src/content/reference/en//p5.Filter/gain - toggle: - description: | -

Toggle function. Switches between the specified type and allpass

- 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: .././src/content/reference/en//p5.Filter/setType +example: + - |- + +
+ let fft, noise, filter; + + function setup() { + let cnv = createCanvas(100,100); + cnv.mousePressed(makeNoise); + fill(255, 0, 255); + + filter = new p5.BandPass(); + noise = new p5.Noise(); + noise.disconnect(); + noise.connect(filter); + + fft = new p5.FFT(); + } + + function draw() { + background(220); + + // set the BandPass frequency based on mouseX + let freq = map(mouseX, 0, width, 20, 10000); + freq = constrain(freq, 0, 22050); + filter.freq(freq); + // give the filter a narrow band (lower res = wider bandpass) + filter.res(50); + + // draw filtered spectrum + let spectrum = fft.analyze(); + noStroke(); + for (let i = 0; i < spectrum.length; i++) { + let x = map(i, 0, spectrum.length, 0, width); + let h = -height + map(spectrum[i], 0, 255, height, 0); + rect(x, height, width/spectrum.length, h); + } + if (!noise.started) { + text('tap here and drag to change frequency', 10, 20, width - 20); + } else { + text('Frequency: ' + round(freq)+'Hz', 20, 20, width - 20); + } + } + + function makeNoise() { + // see also: `userStartAudio()` + noise.start(); + noise.amp(0.5, 0.2); + } + + function mouseReleased() { + noise.amp(0, 0.2); + } + +
+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 66dc473db1..d8ad999ca7 100644 --- a/src/content/reference/en/p5.sound/p5.Gain.mdx +++ b/src/content/reference/en/p5.sound/p5.Gain.mdx @@ -8,23 +8,69 @@ description: | It's typically used to build mixers.

isConstructor: true line: 10973 -memberMethodPreviews: - setInput: - description: | -

Connect a source to the gain node.

- path: .././src/content/reference/en//p5.Gain/setInput - connect: - description: | -

Send output to a p5.sound or web audio object

- path: .././src/content/reference/en//p5.Gain/connect - disconnect: - description: | -

Disconnect all output.

- path: .././src/content/reference/en//p5.Gain/disconnect - amp: - description: | -

Set the output level of the gain node.

- path: .././src/content/reference/en//p5.Gain/amp +example: + - |- + +
+ + // load two soundfile and crossfade beetween them + let sound1,sound2; + let sound1Gain, sound2Gain, mixGain; + function preload(){ + soundFormats('ogg', 'mp3'); + sound1 = loadSound('assets/Damscray_-_Dancing_Tiger_01'); + sound2 = loadSound('assets/beat'); + } + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(startSound); + // create a 'mix' gain bus to which we will connect both soundfiles + mixGain = new p5.Gain(); + mixGain.connect(); + sound1.disconnect(); // diconnect from p5 output + sound1Gain = new p5.Gain(); // setup a gain node + sound1Gain.setInput(sound1); // connect the first sound to its input + sound1Gain.connect(mixGain); // connect its output to the final mix bus + sound2.disconnect(); + sound2Gain = new p5.Gain(); + sound2Gain.setInput(sound2); + sound2Gain.connect(mixGain); + } + function startSound() { + sound1.loop(); + sound2.loop(); + loop(); + } + function mouseReleased() { + sound1.stop(); + sound2.stop(); + } + function draw(){ + background(220); + textAlign(CENTER); + textSize(11); + fill(0); + if (!sound1.isPlaying()) { + text('tap and drag to play', width/2, height/2); + return; + } + // map the horizontal position of the mouse to values useable for volume * control of sound1 + var sound1Volume = constrain(map(mouseX,width,0,0,1), 0, 1); + var sound2Volume = 1-sound1Volume; + sound1Gain.amp(sound1Volume); + sound2Gain.amp(sound2Volume); + // map the vertical position of the mouse to values useable for 'output * volume control' + var outputVolume = constrain(map(mouseY,height,0,0,1), 0, 1); + mixGain.amp(outputVolume); + text('output', width/2, height - outputVolume * height * 0.9) + fill(255, 0, 255); + textAlign(LEFT); + text('sound1', 5, height - sound1Volume * height * 0.9); + textAlign(RIGHT); + text('sound2', width - 5, height - sound2Volume * height * 0.9); + } +
+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 a360924038..c51b8d46a6 100644 --- a/src/content/reference/en/p5.sound/p5.HighPass.mdx +++ b/src/content/reference/en/p5.sound/p5.HighPass.mdx @@ -10,6 +10,7 @@ description: | See p5.Filter for methods.

isConstructor: true line: 6938 +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.LowPass.mdx b/src/content/reference/en/p5.sound/p5.LowPass.mdx index 49a393da01..c7b308f8f5 100644 --- a/src/content/reference/en/p5.sound/p5.LowPass.mdx +++ b/src/content/reference/en/p5.sound/p5.LowPass.mdx @@ -10,6 +10,7 @@ description: | See p5.Filter for methods.

isConstructor: true line: 6914 +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.MonoSynth.mdx b/src/content/reference/en/p5.sound/p5.MonoSynth.mdx index 1607ef4d66..0c74b0677e 100644 --- a/src/content/reference/en/p5.sound/p5.MonoSynth.mdx +++ b/src/content/reference/en/p5.sound/p5.MonoSynth.mdx @@ -10,55 +10,37 @@ description: | this class.

isConstructor: true line: 11247 -memberMethodPreviews: - attack: - description: | -

Getters and Setters

- path: .././src/content/reference/en//p5.MonoSynth/attack - play: - description: | -

Play tells the MonoSynth to start playing a note. This method schedules - the calling of .triggerAttack and .triggerRelease.

- 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: .././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: .././src/content/reference/en//p5.MonoSynth/triggerRelease - setADSR: - description: > -

Set values like a traditional +example: + - |- - +

+ let monoSynth; - ADSR envelope + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playSynth); + background(220); + textAlign(CENTER); + text('tap to play', width/2, height/2); - .

- path: .././src/content/reference/en//p5.MonoSynth/setADSR - amp: - description: | -

MonoSynth amp

- path: .././src/content/reference/en//p5.MonoSynth/amp - connect: - description: | -

Connect to a p5.sound / Web Audio object.

- path: .././src/content/reference/en//p5.MonoSynth/connect - disconnect: - description: | -

Disconnect all outputs

- path: .././src/content/reference/en//p5.MonoSynth/disconnect - dispose: - description: | -

Get rid of the MonoSynth and free up its resources / memory.

- path: .././src/content/reference/en//p5.MonoSynth/dispose + monoSynth = new p5.MonoSynth(); + } + + function playSynth() { + userStartAudio(); + + let note = random(['Fb4', 'G4']); + // note velocity (volume, from 0 to 1) + let velocity = random(); + // time from now (in seconds) + let time = 0; + // note duration (in seconds) + let dur = 1/6; + + monoSynth.play(note, velocity, time, dur); + } +
+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 54941e0234..16c23937e1 100644 --- a/src/content/reference/en/p5.sound/p5.Noise.mdx +++ b/src/content/reference/en/p5.sound/p5.Noise.mdx @@ -14,12 +14,7 @@ params:

Type of noise can be 'white' (default), 'brown' or 'pink'.

type: String -memberMethodPreviews: - setType: - description: | -

Set type of noise to 'white', 'pink' or 'brown'. - White is the default.

- 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 a721e49e04..cd71f50abb 100644 --- a/src/content/reference/en/p5.sound/p5.OnsetDetect.mdx +++ b/src/content/reference/en/p5.sound/p5.OnsetDetect.mdx @@ -25,6 +25,7 @@ params: description: |

Function to call when an onset is detected

type: Function +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Oscillator.mdx b/src/content/reference/en/p5.sound/p5.Oscillator.mdx index ca82618eaf..d86870affd 100644 --- a/src/content/reference/en/p5.sound/p5.Oscillator.mdx +++ b/src/content/reference/en/p5.sound/p5.Oscillator.mdx @@ -32,88 +32,49 @@ params: 'sawtooth', 'square'

type: String optional: true -memberMethodPreviews: - start: - description: | -

Start an oscillator.

-

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().

- path: .././src/content/reference/en//p5.Oscillator/start - stop: - description: | -

Stop an oscillator. Accepts an optional parameter - to determine how long (in seconds from now) until the - oscillator stops.

- 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: .././src/content/reference/en//p5.Oscillator/amp - getAmp: - description: | -

Returns the value of output gain

- 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: .././src/content/reference/en//p5.Oscillator/freq - getFreq: - description: | -

Returns the value of frequency of oscillator

- path: .././src/content/reference/en//p5.Oscillator/getFreq - setType: - description: | -

Set type to 'sine', 'triangle', 'sawtooth' or 'square'.

- path: .././src/content/reference/en//p5.Oscillator/setType - getType: - description: > -

Returns current type of oscillator eg. 'sine', 'triangle', 'sawtooth' - or 'square'.

- path: .././src/content/reference/en//p5.Oscillator/getType - connect: - description: | -

Connect to a p5.sound / Web Audio object.

- path: .././src/content/reference/en//p5.Oscillator/connect - disconnect: - description: | -

Disconnect all outputs

- path: .././src/content/reference/en//p5.Oscillator/disconnect - pan: - description: | -

Pan between Left (-1) and Right (1)

- path: .././src/content/reference/en//p5.Oscillator/pan - getPan: - description: > -

Returns the current value of panPosition , between Left (-1) and Right - (1)

- 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: .././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: .././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: .././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: .././src/content/reference/en//p5.Oscillator/scale +example: + - |- + +
+ let osc, playing, freq, amp; + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playOscillator); + osc = new p5.Oscillator('sine'); + } + + function draw() { + background(220) + freq = constrain(map(mouseX, 0, width, 100, 500), 100, 500); + amp = constrain(map(mouseY, height, 0, 0, 1), 0, 1); + + text('tap to play', 20, 20); + text('freq: ' + freq, 20, 40); + text('amp: ' + amp, 20, 60); + + if (playing) { + // smooth the transitions by 0.1 seconds + osc.freq(freq, 0.1); + osc.amp(amp, 0.1); + } + } + + function playOscillator() { + // starting an oscillator on a user gesture will enable audio + // in browsers that have a strict autoplay policy. + // See also: userStartAudio(); + osc.start(); + playing = true; + } + + function mouseReleased() { + // ramp amplitude to 0 over 0.5 seconds + osc.amp(0, 0.5); + playing = false; + } +
+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 1d9ef7bd3e..a9c8611f49 100644 --- a/src/content/reference/en/p5.sound/p5.Panner3D.mdx +++ b/src/content/reference/en/p5.sound/p5.Panner3D.mdx @@ -15,67 +15,7 @@ description: | by p5.soundOut.audiocontext.listener

isConstructor: true line: 7602 -memberMethodPreviews: - panner: - description: | -

- Web Audio Spatial Panner Node

-

Properties include
- Panning Model - : "equal power" or "HRTF"
- DistanceModel - : "linear", "inverse", or "exponential"

- path: .././src/content/reference/en//p5.Panner3D/panner - process: - description: | -

Connect an audio sorce

- path: .././src/content/reference/en//p5.Panner3D/process - set: - description: | -

Set the X,Y,Z position of the Panner

- path: .././src/content/reference/en//p5.Panner3D/set - positionX: - description: | -

Getter and setter methods for position coordinates

- path: .././src/content/reference/en//p5.Panner3D/positionX - positionY: - description: | -

Getter and setter methods for position coordinates

- path: .././src/content/reference/en//p5.Panner3D/positionY - positionZ: - description: | -

Getter and setter methods for position coordinates

- path: .././src/content/reference/en//p5.Panner3D/positionZ - orient: - description: | -

Set the X,Y,Z position of the Panner

- path: .././src/content/reference/en//p5.Panner3D/orient - orientX: - description: | -

Getter and setter methods for orient coordinates

- path: .././src/content/reference/en//p5.Panner3D/orientX - orientY: - description: | -

Getter and setter methods for orient coordinates

- path: .././src/content/reference/en//p5.Panner3D/orientY - orientZ: - description: | -

Getter and setter methods for orient coordinates

- path: .././src/content/reference/en//p5.Panner3D/orientZ - setFalloff: - description: | -

Set the rolloff factor and max distance

- path: .././src/content/reference/en//p5.Panner3D/setFalloff - maxDist: - description: | -

Maxium distance between the source and the listener

- 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: .././src/content/reference/en//p5.Panner3D/rollof +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Part.mdx b/src/content/reference/en/p5.sound/p5.Part.mdx index 247e7a3652..caa690610f 100644 --- a/src/content/reference/en/p5.sound/p5.Part.mdx +++ b/src/content/reference/en/p5.sound/p5.Part.mdx @@ -22,65 +22,51 @@ params: is 1/16, a sixteenth note)

type: Number optional: true -memberMethodPreviews: - setBPM: - description: | -

Set the tempo of this part, in Beats Per Minute.

- path: .././src/content/reference/en//p5.Part/setBPM - getBPM: - description: | -

Returns the tempo, in Beats Per Minute, of this part.

- 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: .././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: .././src/content/reference/en//p5.Part/loop - noLoop: - description: | -

Tell the part to stop looping.

- 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: .././src/content/reference/en//p5.Part/stop - pause: - description: | -

Pause the part. Playback will resume - from the current step.

- path: .././src/content/reference/en//p5.Part/pause - addPhrase: - description: | -

Add a p5.Phrase to this Part.

- 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: .././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: .././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: .././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: .././src/content/reference/en//p5.Part/onStep +example: + - |- + +
+ let box, drum, myPart; + let boxPat = [1,0,0,2,0,2,0,0]; + let drumPat = [0,1,1,0,2,0,1,0]; + + function preload() { + box = loadSound('assets/beatbox.mp3'); + drum = loadSound('assets/drum.mp3'); + } + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playMyPart); + background(220); + textAlign(CENTER, CENTER); + text('tap to play', width/2, height/2); + + let boxPhrase = new p5.Phrase('box', playBox, boxPat); + let drumPhrase = new p5.Phrase('drum', playDrum, drumPat); + myPart = new p5.Part(); + myPart.addPhrase(boxPhrase); + myPart.addPhrase(drumPhrase); + myPart.setBPM(60); + } + + function playBox(time, playbackRate) { + box.rate(playbackRate); + box.play(time); + } + + function playDrum(time, playbackRate) { + drum.rate(playbackRate); + drum.play(time); + } + + function playMyPart() { + userStartAudio(); + + myPart.start(); + } +
+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 0deb2d6528..263146160a 100644 --- a/src/content/reference/en/p5.sound/p5.PeakDetect.mdx +++ b/src/content/reference/en/p5.sound/p5.PeakDetect.mdx @@ -87,24 +87,58 @@ params:

Defaults to 20.

type: Number optional: true -memberMethodPreviews: - isDetected: - description: | -

isDetected is set to true when a peak is detected.

- path: .././src/content/reference/en//p5.PeakDetect/isDetected - update: - description: | -

The update method is run in the draw loop.

-

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: .././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: .././src/content/reference/en//p5.PeakDetect/onPeak +example: + - |- + +
+ + var cnv, soundFile, fft, peakDetect; + var ellipseWidth = 10; + + function preload() { + soundFile = loadSound('assets/beat.mp3'); + } + + function setup() { + background(0); + noStroke(); + fill(255); + textAlign(CENTER); + + // p5.PeakDetect requires a p5.FFT + fft = new p5.FFT(); + peakDetect = new p5.PeakDetect(); + } + + function draw() { + background(0); + text('click to play/pause', width/2, height/2); + + // peakDetect accepts an fft post-analysis + fft.analyze(); + peakDetect.update(fft); + + if ( peakDetect.isDetected ) { + ellipseWidth = 50; + } else { + ellipseWidth *= 0.95; + } + + ellipse(width/2, height/2, ellipseWidth, ellipseWidth); + } + + // toggle play/stop when canvas is clicked + function mouseClicked() { + if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) { + if (soundFile.isPlaying() ) { + soundFile.stop(); + } else { + soundFile.play(); + } + } + } +
+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 48baddfafb..dc631a4606 100644 --- a/src/content/reference/en/p5.sound/p5.Phrase.mdx +++ b/src/content/reference/en/p5.sound/p5.Phrase.mdx @@ -41,15 +41,41 @@ params:

Array of values to pass into the callback at each step of the phrase.

type: Array -memberMethodPreviews: - sequence: - description: | -

Array of values to pass into the callback - at each step of the phrase. Depending on the callback - function's requirements, these values may be numbers, - strings, or an object with multiple parameters. - Zero (0) indicates a rest.

- path: .././src/content/reference/en//p5.Phrase/sequence +example: + - |- + +
+ let mySound, myPhrase, myPart; + let pattern = [1,0,0,2,0,2,0,0]; + + function preload() { + mySound = loadSound('assets/beatbox.mp3'); + } + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playMyPart); + background(220); + text('tap to play', width/2, height/2); + textAlign(CENTER, CENTER); + + myPhrase = new p5.Phrase('bbox', onEachStep, pattern); + myPart = new p5.Part(); + myPart.addPhrase(myPhrase); + myPart.setBPM(60); + } + + function onEachStep(time, playbackRate) { + mySound.rate(playbackRate); + mySound.play(time); + } + + function playMyPart() { + userStartAudio(); + myPart.start(); + } +
+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 ae30a736cb..d72d434975 100644 --- a/src/content/reference/en/p5.sound/p5.PolySynth.mdx +++ b/src/content/reference/en/p5.sound/p5.PolySynth.mdx @@ -22,80 +22,40 @@ params:

Number of voices, defaults to 8;

type: Number optional: true -memberMethodPreviews: - notes: - description: > -

An object that holds information about which notes have been played and +example: + - |- - which notes are currently being played. New notes are added as keys +

+ let polySynth; - on the fly. While a note has been attacked, but not released, the value of - the + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playSynth); + background(220); + text('click to play', 20, 20); - key is the audiovoice which is generating that note. When notes are - released, + polySynth = new p5.PolySynth(); + } - the value of the key becomes undefined.

- path: .././src/content/reference/en//p5.PolySynth/notes - polyvalue: - description: | -

A PolySynth must have at least 1 voice, defaults to 8

- 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: .././src/content/reference/en//p5.PolySynth/AudioVoice - play: - description: > -

Play a note by triggering noteAttack and noteRelease with sustain - time

- path: .././src/content/reference/en//p5.PolySynth/play - noteADSR: - description: > -

noteADSR sets the envelope for a specific note that has just been - triggered. + function playSynth() { + userStartAudio(); - Using this method modifies the envelope of whichever audiovoice is being - used + // note duration (in seconds) + let dur = 1.5; - to play the desired note. The envelope should be reset before noteRelease - is called + // time from now (in seconds) + let time = 0; - in order to prevent the modified envelope from being used on other - notes.

- path: .././src/content/reference/en//p5.PolySynth/noteADSR - setADSR: - description: > -

Set the PolySynths global envelope. This method modifies the envelopes - of each + // velocity (volume, from 0 to 1) + let vel = 0.1; - monosynth so that all notes are played with this envelope.

- 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: .././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: .././src/content/reference/en//p5.PolySynth/noteRelease - connect: - description: | -

Connect to a p5.sound / Web Audio object.

- path: .././src/content/reference/en//p5.PolySynth/connect - disconnect: - description: | -

Disconnect all outputs

- path: .././src/content/reference/en//p5.PolySynth/disconnect - dispose: - description: | -

Get rid of the MonoSynth and free up its resources / memory.

- path: .././src/content/reference/en//p5.PolySynth/dispose + // notes can overlap with each other + polySynth.play('G2', vel, 0, dur); + polySynth.play('C3', vel, time += 1/3, dur); + polySynth.play('G3', vel, time += 1/3, dur); + } +
+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 5e498d2107..14cf71b511 100644 --- a/src/content/reference/en/p5.sound/p5.Pulse.mdx +++ b/src/content/reference/en/p5.sound/p5.Pulse.mdx @@ -25,12 +25,37 @@ params: defaults to 0)

type: Number optional: true -memberMethodPreviews: - width: - description: | -

Set the width of a Pulse object (an oscillator that implements - Pulse Width Modulation).

- path: .././src/content/reference/en//p5.Pulse/width +example: + - |- + +
+ let pulse; + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(startPulse); + background(220); + + pulse = new p5.Pulse(); + pulse.amp(0.5); + pulse.freq(220); + } + function startPulse() { + pulse.start(); + pulse.amp(0.5, 0.02); + } + function mouseReleased() { + pulse.amp(0, 0.2); + } + function draw() { + background(220); + text('tap to play', 5, 20, width - 20); + let w = map(mouseX, 0, width, 0, 1); + w = constrain(w, 0, 1); + pulse.width(w); + text('pulse width: ' + w, 5, height - 20); + } +
+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 fb82e59da6..5231bdb713 100644 --- a/src/content/reference/en/p5.sound/p5.Reverb.mdx +++ b/src/content/reference/en/p5.sound/p5.Reverb.mdx @@ -30,28 +30,42 @@ description: > available.

isConstructor: true line: 8308 -memberMethodPreviews: - process: - description: | -

Connect a source to the reverb, and assign reverb parameters.

- path: .././src/content/reference/en//p5.Reverb/process - set: - description: | -

Set the reverb settings. Similar to .process(), but without - assigning a new input.

- path: .././src/content/reference/en//p5.Reverb/set - amp: - description: | -

Set the output level of the reverb effect.

- path: .././src/content/reference/en//p5.Reverb/amp - connect: - description: | -

Send output to a p5.sound or web audio object

- path: .././src/content/reference/en//p5.Reverb/connect - disconnect: - description: | -

Disconnect all output.

- path: .././src/content/reference/en//p5.Reverb/disconnect +example: + - |- + +
+ let soundFile, reverb; + function preload() { + soundFile = loadSound('assets/Damscray_DancingTiger.mp3'); + } + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(playSound); + + reverb = new p5.Reverb(); + soundFile.disconnect(); // so we'll only hear reverb... + + // connect soundFile to reverb, process w/ + // 3 second reverbTime, decayRate of 2% + reverb.process(soundFile, 3, 2); + } + + function draw() { + let dryWet = constrain(map(mouseX, 0, width, 0, 1), 0, 1); + // 1 = all reverb, 0 = no reverb + reverb.drywet(dryWet); + + background(220); + text('tap to play', 10, 20); + text('dry/wet: ' + round(dryWet * 100) + '%', 10, height - 20); + } + + function playSound() { + soundFile.play(); + } +
+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 ad0f523829..2c9fa91874 100644 --- a/src/content/reference/en/p5.sound/p5.SawOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.SawOsc.mdx @@ -18,6 +18,7 @@ params:

Set the frequency

type: Number optional: true +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.Score.mdx b/src/content/reference/en/p5.sound/p5.Score.mdx index de3efb9032..4135f429b1 100644 --- a/src/content/reference/en/p5.sound/p5.Score.mdx +++ b/src/content/reference/en/p5.sound/p5.Score.mdx @@ -17,33 +17,7 @@ params: type: p5.Part optional: true multiple: true -memberMethodPreviews: - start: - description: | -

Start playback of the score.

- path: .././src/content/reference/en//p5.Score/start - stop: - description: | -

Stop playback of the score.

- path: .././src/content/reference/en//p5.Score/stop - pause: - description: | -

Pause playback of the score.

- path: .././src/content/reference/en//p5.Score/pause - loop: - description: | -

Loop playback of the score.

- 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: .././src/content/reference/en//p5.Score/noLoop - setBPM: - description: | -

Set the tempo for all parts in the score

- 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 ff187c62f7..9818db201a 100644 --- a/src/content/reference/en/p5.sound/p5.SinOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.SinOsc.mdx @@ -18,6 +18,7 @@ params:

Set the frequency

type: Number optional: true +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.SoundFile.mdx b/src/content/reference/en/p5.sound/p5.SoundFile.mdx index 819bc730ec..83f8519cde 100644 --- a/src/content/reference/en/p5.sound/p5.SoundFile.mdx +++ b/src/content/reference/en/p5.sound/p5.SoundFile.mdx @@ -52,223 +52,30 @@ params: time needed to decode the audio data.

type: Function optional: true -memberMethodPreviews: - isLoaded: - description: | -

Returns true if the sound file finished loading successfully.

- path: .././src/content/reference/en//p5.SoundFile/isLoaded - play: - description: | -

Play the p5.SoundFile

- path: .././src/content/reference/en//p5.SoundFile/play - playMode: - description: | -

p5.SoundFile has two play modes: restart and - sustain. Play Mode determines what happens to a - p5.SoundFile if it is triggered while in the middle of playback. - In sustain mode, playback will continue simultaneous to the - 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.

- path: .././src/content/reference/en//p5.SoundFile/playMode - pause: - description: | -

Pauses a file that is currently playing. If the file is not - playing, then nothing will happen.

-

After pausing, .play() will resume from the paused - 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: .././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: .././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: .././src/content/reference/en//p5.SoundFile/setLoop - isLooping: - description: > -

Returns 'true' if a p5.SoundFile is currently looping and playing, - 'false' if not.

- 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: .././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: .././src/content/reference/en//p5.SoundFile/isPaused - stop: - description: | -

Stop soundfile playback.

- 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: .././src/content/reference/en//p5.SoundFile/pan - getPan: - description: | -

Returns the current stereo pan position (-1.0 to 1.0)

- 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: .././src/content/reference/en//p5.SoundFile/rate - setVolume: - description: | -

Multiply the output volume (amplitude) of a sound file - between 0.0 (silence) and 1.0 (full volume). - 1.0 is the maximum amplitude of a digital sound, so multiplying - by greater than 1.0 may cause digital distortion. To - fade, provide a rampTime parameter. For more - 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: .././src/content/reference/en//p5.SoundFile/setVolume - duration: - description: | -

Returns the duration of a sound file in seconds.

- path: .././src/content/reference/en//p5.SoundFile/duration - currentTime: - description: > -

Return the current position of the p5.SoundFile playhead, in seconds. - - Time is relative to the normal buffer direction, so if - reverseBuffer - - has been called, currentTime will count backwards.

- path: .././src/content/reference/en//p5.SoundFile/currentTime - jump: - description: > -

Move the playhead of a soundfile that is currently playing to a - - new position and a new duration, in seconds. - - If none are given, will reset the file to play entire duration - - from start to finish. To set the position of a soundfile that is - - not currently playing, use the play or loop - methods.

- path: .././src/content/reference/en//p5.SoundFile/jump - channels: - description: | -

Return the number of channels in a sound file. - For example, Mono = 1, Stereo = 2.

- path: .././src/content/reference/en//p5.SoundFile/channels - sampleRate: - description: | -

Return the sample rate of the sound file.

- path: .././src/content/reference/en//p5.SoundFile/sampleRate - frames: - description: | -

Return the number of samples in a sound file. - Equal to sampleRate * duration.

- path: .././src/content/reference/en//p5.SoundFile/frames - getPeaks: - description: | -

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 - audio buffer to find the greatest amplitudes. Accepts one - parameter, 'length', which determines size of the array. - Larger arrays result in more precise waveform visualizations.

-

Inspired by Wavesurfer.js.

- 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: .././src/content/reference/en//p5.SoundFile/reverseBuffer - onended: - description: | -

Schedule an event to be called when the soundfile - reaches the end of a buffer. If the soundfile is - playing through once, this will be called when it - ends. If it is looping, it will be called when - stop is called.

- path: .././src/content/reference/en//p5.SoundFile/onended - connect: - description: | -

Connects the output of a p5sound object to input of another - p5.sound object. For example, you may connect a p5.SoundFile to an - 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: .././src/content/reference/en//p5.SoundFile/connect - disconnect: - description: | -

Disconnects the output of this p5sound object.

- path: .././src/content/reference/en//p5.SoundFile/disconnect - setPath: - description: | -

Reset the source for this SoundFile to a - new path (URL).

- path: .././src/content/reference/en//p5.SoundFile/setPath - setBuffer: - description: | -

Replace the current Audio Buffer with a new Buffer.

- path: .././src/content/reference/en//p5.SoundFile/setBuffer - addCue: - description: | -

Schedule events to trigger every time a MediaElement - (audio/video) reaches a playback cue point.

-

Accepts a callback function, a time (in seconds) at which to trigger - 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: .././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: .././src/content/reference/en//p5.SoundFile/removeCue - clearCues: - description: | -

Remove all of the callbacks that had originally been scheduled - via the addCue method.

- 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: .././src/content/reference/en//p5.SoundFile/save - getBlob: - description: > -

This method is useful for sending a SoundFile to a server. It returns - the - - .wav-encoded audio data as a "Blob". - - A Blob is a file-like data object that can be uploaded to a server - - with an http request. We'll - - use the httpDo options object to send a POST request with - some - - specific options: we encode the request as - multipart/form-data, - - and attach the blob as one of the form values using - FormData.

- path: .././src/content/reference/en//p5.SoundFile/getBlob +example: + - |- + +
+ let mySound; + function preload() { + soundFormats('mp3', 'ogg'); + mySound = loadSound('assets/doorbell'); + } + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(canvasPressed); + background(220); + text('tap here to play', 10, 20); + } + + function canvasPressed() { + // playing a sound file on a user gesture + // is equivalent to `userStartAudio()` + mySound.play(); + } +
+chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.SoundLoop.mdx b/src/content/reference/en/p5.sound/p5.SoundLoop.mdx index 52c64a427d..8d1e81d29e 100644 --- a/src/content/reference/en/p5.sound/p5.SoundLoop.mdx +++ b/src/content/reference/en/p5.sound/p5.SoundLoop.mdx @@ -19,63 +19,49 @@ params: for each iteration of the loop. Defaults to 1 second.

type: Number|String optional: true -memberMethodPreviews: - bpm: - description: > -

Getters and Setters, setting any paramter will result in a change in - the clock's +example: + - |- - frequency, that will be reflected after the next callback +

+ let synth, soundLoop; + let notePattern = [60, 62, 64, 67, 69, 72]; - beats per minute (defaults to 60)

- path: .././src/content/reference/en//p5.SoundLoop/bpm - timeSignature: - description: | -

number of quarter notes in a measure (defaults to 4)

- path: .././src/content/reference/en//p5.SoundLoop/timeSignature - interval: - description: | -

length of the loops interval

- path: .././src/content/reference/en//p5.SoundLoop/interval - iterations: - description: | -

how many times the callback has been called so far

- path: .././src/content/reference/en//p5.SoundLoop/iterations - musicalTimeMode: - description: > -

musicalTimeMode uses Tone.Time convention + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(canvasPressed); + colorMode(HSB); + background(0, 0, 86); + text('tap to start/stop', 10, 20); - true if string, false if number

- path: .././src/content/reference/en//p5.SoundLoop/musicalTimeMode - maxIterations: - description: | -

Set a limit to the number of loops to play. defaults to Infinity

- path: .././src/content/reference/en//p5.SoundLoop/maxIterations - start: - description: | -

Start the loop

- path: .././src/content/reference/en//p5.SoundLoop/start - stop: - description: | -

Stop the loop

- path: .././src/content/reference/en//p5.SoundLoop/stop - pause: - description: | -

Pause the loop

- path: .././src/content/reference/en//p5.SoundLoop/pause - syncedStart: - description: > -

Synchronize loops. Use this method to start two or more loops in - synchronization + //the looper's callback is passed the timeFromNow + //this value should be used as a reference point from + //which to schedule sounds + let intervalInSeconds = 0.2; + soundLoop = new p5.SoundLoop(onSoundLoop, intervalInSeconds); + + synth = new p5.MonoSynth(); + } - or to start a loop in synchronization with a loop that is already playing + function canvasPressed() { + // ensure audio is enabled + userStartAudio(); - This method will schedule the implicit loop in sync with the explicit - master loop + if (soundLoop.isPlaying) { + soundLoop.stop(); + } else { + // start the loop + soundLoop.start(); + } + } - i.e. loopToStart.syncedStart(loopToSyncWith)

- path: .././src/content/reference/en//p5.SoundLoop/syncedStart + function onSoundLoop(timeFromNow) { + let noteIndex = (soundLoop.iterations - 1) % notePattern.length; + let note = midiToFreq(notePattern[noteIndex]); + synth.play(note, 0.5, timeFromNow); + background(noteIndex * 360 / notePattern.length, 50, 100); + } +
+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 bba19aedf9..0ef841ed71 100644 --- a/src/content/reference/en/p5.sound/p5.SoundRecorder.mdx +++ b/src/content/reference/en/p5.sound/p5.SoundRecorder.mdx @@ -13,30 +13,71 @@ description: |- recording to that p5.SoundFile for playback.

isConstructor: true line: 10559 -memberMethodPreviews: - setInput: - description: | -

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: .././src/content/reference/en//p5.SoundRecorder/setInput - record: - description: | -

Start recording. To access the recording, provide - a p5.SoundFile as the first parameter. The p5.SoundRecorder - will send its recording to that p5.SoundFile for playback once - recording is complete. Optional parameters include duration - (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: .././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: .././src/content/reference/en//p5.SoundRecorder/stop +example: + - |- + +
+ let mic, recorder, soundFile; + let state = 0; + + function setup() { + let cnv = createCanvas(100, 100); + cnv.mousePressed(canvasPressed); + background(220); + textAlign(CENTER, CENTER); + + // create an audio in + mic = new p5.AudioIn(); + + // prompts user to enable their browser mic + mic.start(); + + // create a sound recorder + recorder = new p5.SoundRecorder(); + + // connect the mic to the recorder + recorder.setInput(mic); + + // this sound file will be used to + // playback & save the recording + soundFile = new p5.SoundFile(); + + text('tap to record', width/2, height/2); + } + + function canvasPressed() { + // ensure audio is enabled + userStartAudio(); + + // make sure user enabled the mic + if (state === 0 && mic.enabled) { + + // record to our p5.SoundFile + recorder.record(soundFile); + + background(255,0,0); + text('Recording!', width/2, height/2); + state++; + } + else if (state === 1) { + background(0,255,0); + + // stop recorder and + // send result to soundFile + recorder.stop(); + + text('Done! Tap to play and download', width/2, height/2, width - 20); + state++; + } + + else if (state === 2) { + soundFile.play(); // play the result! + save(soundFile, 'mySound.wav'); + state++; + } + } +
+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 b85bdc82f0..d39f521602 100644 --- a/src/content/reference/en/p5.sound/p5.SqrOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.SqrOsc.mdx @@ -18,6 +18,7 @@ params:

Set the frequency

type: Number optional: true +chainable: false --- diff --git a/src/content/reference/en/p5.sound/p5.TriOsc.mdx b/src/content/reference/en/p5.sound/p5.TriOsc.mdx index 847aac51b7..af481e50b8 100644 --- a/src/content/reference/en/p5.sound/p5.TriOsc.mdx +++ b/src/content/reference/en/p5.sound/p5.TriOsc.mdx @@ -18,6 +18,7 @@ params:

Set the frequency

type: Number optional: true +chainable: false --- diff --git a/src/content/reference/en/p5/<.mdx b/src/content/reference/en/p5/<.mdx new file mode 100644 index 0000000000..0d549b922f --- /dev/null +++ b/src/content/reference/en/p5/<.mdx @@ -0,0 +1,34 @@ +--- +title: '<' +module: Foundation +submodule: Foundation +file: src/core/reference.js +description: > +

The less than operator < + + evaluates to true if the left value is less than + + the right value.

+ +

There + is more info on comparison operators on MDN.

+isConstructor: false +line: 158 +itemtype: property +alt: This example does not render anything +class: p5 +example: + - |- + +
+ + console.log(1 < 100); // prints true to the console + console.log(100 < 99); // prints false to the console + +
+chainable: false +--- + + +# \< diff --git a/src/content/reference/en/p5/<=.mdx b/src/content/reference/en/p5/<=.mdx new file mode 100644 index 0000000000..0124e2262e --- /dev/null +++ b/src/content/reference/en/p5/<=.mdx @@ -0,0 +1,34 @@ +--- +title: '<=' +module: Foundation +submodule: Foundation +file: src/core/reference.js +description: > +

The less than or equal to operator <= + + evaluates to true if the left value is less than or equal to + + the right value.

+ +

There + is more info on comparison operators on MDN.

+isConstructor: false +line: 179 +itemtype: property +alt: This example does not render anything +class: p5 +example: + - |- + +
+ + console.log(100 <= 100); // prints true to the console + console.log(99 <= 100); // prints true to the console + +
+chainable: false +--- + + +# \<= diff --git a/src/content/reference/en/p5/===.mdx b/src/content/reference/en/p5/===.mdx index d4e71cea4f..24964dd2d7 100644 --- a/src/content/reference/en/p5/===.mdx +++ b/src/content/reference/en/p5/===.mdx @@ -28,8 +28,10 @@ description: > This will convert the two values being compared to the same type before comparing them.

+isConstructor: false line: 87 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -40,7 +42,6 @@ example: console.log(1 === '1'); // prints false to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/>.mdx b/src/content/reference/en/p5/>.mdx new file mode 100644 index 0000000000..26ce8ae35f --- /dev/null +++ b/src/content/reference/en/p5/>.mdx @@ -0,0 +1,35 @@ +--- +title: '>' +module: Foundation +submodule: Foundation +file: src/core/reference.js +description: >- +

The greater than operator > + + evaluates to true if the left value is greater than + + the right value.

+ + + + There is more info on comparison operators on MDN. +isConstructor: false +line: 115 +itemtype: property +alt: This example does not render anything +class: p5 +example: + - |- + +
+ + console.log(100 > 1); // prints true to the console + console.log(1 > 100); // prints false to the console + +
+chainable: false +--- + + +# > diff --git a/src/content/reference/en/p5/>=.mdx b/src/content/reference/en/p5/>=.mdx new file mode 100644 index 0000000000..59db99a1cb --- /dev/null +++ b/src/content/reference/en/p5/>=.mdx @@ -0,0 +1,34 @@ +--- +title: '>=' +module: Foundation +submodule: Foundation +file: src/core/reference.js +description: > +

The greater than or equal to operator >= + + evaluates to true if the left value is greater than or equal to + + the right value.

+ +

There + is more info on comparison operators on MDN.

+isConstructor: false +line: 137 +itemtype: property +alt: This example does not render anything +class: p5 +example: + - |- + +
+ + console.log(100 >= 100); // prints true to the console + console.log(101 >= 100); // prints true to the console + +
+chainable: false +--- + + +# >= diff --git a/src/content/reference/en/p5/ADD.mdx b/src/content/reference/en/p5/ADD.mdx index 5e162182a8..64372221d7 100644 --- a/src/content/reference/en/p5/ADD.mdx +++ b/src/content/reference/en/p5/ADD.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 480 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ALT.mdx b/src/content/reference/en/p5/ALT.mdx index 8742d7bb56..37849a9121 100644 --- a/src/content/reference/en/p5/ALT.mdx +++ b/src/content/reference/en/p5/ALT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 395 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ARROW.mdx b/src/content/reference/en/p5/ARROW.mdx index 5416301c06..14291b231c 100644 --- a/src/content/reference/en/p5/ARROW.mdx +++ b/src/content/reference/en/p5/ARROW.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 55 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/AUTO.mdx b/src/content/reference/en/p5/AUTO.mdx index 89044e67f4..feefce7955 100644 --- a/src/content/reference/en/p5/AUTO.mdx +++ b/src/content/reference/en/p5/AUTO.mdx @@ -11,6 +11,7 @@ description: > be passed to the size function as AUTO, at a time.

+isConstructor: false line: 385 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/AXES.mdx b/src/content/reference/en/p5/AXES.mdx index f60bf58a86..9147f423fa 100644 --- a/src/content/reference/en/p5/AXES.mdx +++ b/src/content/reference/en/p5/AXES.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 746 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BACKSPACE.mdx b/src/content/reference/en/p5/BACKSPACE.mdx index 4819f5ec53..dfaf060f70 100644 --- a/src/content/reference/en/p5/BACKSPACE.mdx +++ b/src/content/reference/en/p5/BACKSPACE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 401 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BASELINE.mdx b/src/content/reference/en/p5/BASELINE.mdx index ccf1169ff0..7d8993fa50 100644 --- a/src/content/reference/en/p5/BASELINE.mdx +++ b/src/content/reference/en/p5/BASELINE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 250 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BEVEL.mdx b/src/content/reference/en/p5/BEVEL.mdx index 507bdeb29b..8b6ceefc53 100644 --- a/src/content/reference/en/p5/BEVEL.mdx +++ b/src/content/reference/en/p5/BEVEL.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 352 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BLEND.mdx b/src/content/reference/en/p5/BLEND.mdx index 41e22c9170..0b6095eb94 100644 --- a/src/content/reference/en/p5/BLEND.mdx +++ b/src/content/reference/en/p5/BLEND.mdx @@ -8,6 +8,7 @@ description: > blendMode parameter blends the images' colors to create different effects.

+isConstructor: false line: 106 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/BLUR.mdx b/src/content/reference/en/p5/BLUR.mdx index 0dbed70c0a..81a30f1100 100644 --- a/src/content/reference/en/p5/BLUR.mdx +++ b/src/content/reference/en/p5/BLUR.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 594 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BOLD.mdx b/src/content/reference/en/p5/BOLD.mdx index d65938e351..87474e3d71 100644 --- a/src/content/reference/en/p5/BOLD.mdx +++ b/src/content/reference/en/p5/BOLD.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 611 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BOLDITALIC.mdx b/src/content/reference/en/p5/BOLDITALIC.mdx index f0eac6e1a5..7cb442ae4f 100644 --- a/src/content/reference/en/p5/BOLDITALIC.mdx +++ b/src/content/reference/en/p5/BOLDITALIC.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 616 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BOTTOM.mdx b/src/content/reference/en/p5/BOTTOM.mdx index 14075d17c1..95ba28d77c 100644 --- a/src/content/reference/en/p5/BOTTOM.mdx +++ b/src/content/reference/en/p5/BOTTOM.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 245 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/BURN.mdx b/src/content/reference/en/p5/BURN.mdx index e6bc97e4aa..269b8cdc6a 100644 --- a/src/content/reference/en/p5/BURN.mdx +++ b/src/content/reference/en/p5/BURN.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 551 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CENTER.mdx b/src/content/reference/en/p5/CENTER.mdx index d9613acd4f..a8e830fc6f 100644 --- a/src/content/reference/en/p5/CENTER.mdx +++ b/src/content/reference/en/p5/CENTER.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 235 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CHAR.mdx b/src/content/reference/en/p5/CHAR.mdx index 48b6561d3b..2350f72a34 100644 --- a/src/content/reference/en/p5/CHAR.mdx +++ b/src/content/reference/en/p5/CHAR.mdx @@ -9,6 +9,7 @@ description: | parsed as an integer and then translated into a single-character string. When an array of number or string values is passed in, then an array of single-character strings of the same length is returned.

+isConstructor: false line: 180 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/CHORD.mdx b/src/content/reference/en/p5/CHORD.mdx index 2d033dbe3e..9c9dfa5f21 100644 --- a/src/content/reference/en/p5/CHORD.mdx +++ b/src/content/reference/en/p5/CHORD.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 325 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CLAMP.mdx b/src/content/reference/en/p5/CLAMP.mdx index 30f8d97c1b..16cccf8afa 100644 --- a/src/content/reference/en/p5/CLAMP.mdx +++ b/src/content/reference/en/p5/CLAMP.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 701 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CLOSE.mdx b/src/content/reference/en/p5/CLOSE.mdx index c0b58739b7..005b3ed72a 100644 --- a/src/content/reference/en/p5/CLOSE.mdx +++ b/src/content/reference/en/p5/CLOSE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 315 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CONTAIN.mdx b/src/content/reference/en/p5/CONTAIN.mdx index d3797d4ad9..0d06e64492 100644 --- a/src/content/reference/en/p5/CONTAIN.mdx +++ b/src/content/reference/en/p5/CONTAIN.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 763 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CONTROL.mdx b/src/content/reference/en/p5/CONTROL.mdx index 2884f7926c..9a28820e11 100644 --- a/src/content/reference/en/p5/CONTROL.mdx +++ b/src/content/reference/en/p5/CONTROL.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 406 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CORNER.mdx b/src/content/reference/en/p5/CORNER.mdx index 565cd2cc3e..02e9f06daf 100644 --- a/src/content/reference/en/p5/CORNER.mdx +++ b/src/content/reference/en/p5/CORNER.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 210 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CORNERS.mdx b/src/content/reference/en/p5/CORNERS.mdx index d903054ed5..3bd5a77569 100644 --- a/src/content/reference/en/p5/CORNERS.mdx +++ b/src/content/reference/en/p5/CORNERS.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 215 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/COVER.mdx b/src/content/reference/en/p5/COVER.mdx index c1d84dc28e..449798bed6 100644 --- a/src/content/reference/en/p5/COVER.mdx +++ b/src/content/reference/en/p5/COVER.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 769 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/CROSS.mdx b/src/content/reference/en/p5/CROSS.mdx index cc4ac89d98..4e2d6bd825 100644 --- a/src/content/reference/en/p5/CROSS.mdx +++ b/src/content/reference/en/p5/CROSS.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 60 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/DARKEST.mdx b/src/content/reference/en/p5/DARKEST.mdx index d06c701ac9..f2bb4ce4ae 100644 --- a/src/content/reference/en/p5/DARKEST.mdx +++ b/src/content/reference/en/p5/DARKEST.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 488 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/DEGREES.mdx b/src/content/reference/en/p5/DEGREES.mdx index c9571b3a3c..97c3901121 100644 --- a/src/content/reference/en/p5/DEGREES.mdx +++ b/src/content/reference/en/p5/DEGREES.mdx @@ -10,6 +10,7 @@ description: | radians in a circle. For example, 90° = π ÷ 2 (about 1.57) radians. This function doesn't take into account the current angleMode().

+isConstructor: false line: 322 params: - name: radians diff --git a/src/content/reference/en/p5/DELETE.mdx b/src/content/reference/en/p5/DELETE.mdx index 7801b705ff..2d83ea16a4 100644 --- a/src/content/reference/en/p5/DELETE.mdx +++ b/src/content/reference/en/p5/DELETE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 411 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/DIFFERENCE.mdx b/src/content/reference/en/p5/DIFFERENCE.mdx index 3fad823769..307a36131f 100644 --- a/src/content/reference/en/p5/DIFFERENCE.mdx +++ b/src/content/reference/en/p5/DIFFERENCE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 499 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/DILATE.mdx b/src/content/reference/en/p5/DILATE.mdx index 62008eece0..d1bfec2cdd 100644 --- a/src/content/reference/en/p5/DILATE.mdx +++ b/src/content/reference/en/p5/DILATE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 584 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/DODGE.mdx b/src/content/reference/en/p5/DODGE.mdx index dbedbb7222..7888705d2f 100644 --- a/src/content/reference/en/p5/DODGE.mdx +++ b/src/content/reference/en/p5/DODGE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 545 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/DOWN_ARROW.mdx b/src/content/reference/en/p5/DOWN_ARROW.mdx index 7c07c1c746..73bcefc1f5 100644 --- a/src/content/reference/en/p5/DOWN_ARROW.mdx +++ b/src/content/reference/en/p5/DOWN_ARROW.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 416 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ENTER.mdx b/src/content/reference/en/p5/ENTER.mdx index 0caa5f876f..5a3260d6ee 100644 --- a/src/content/reference/en/p5/ENTER.mdx +++ b/src/content/reference/en/p5/ENTER.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 421 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ERODE.mdx b/src/content/reference/en/p5/ERODE.mdx index b93853497f..27fbf6bd81 100644 --- a/src/content/reference/en/p5/ERODE.mdx +++ b/src/content/reference/en/p5/ERODE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 589 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ESCAPE.mdx b/src/content/reference/en/p5/ESCAPE.mdx index ce1fc216aa..97a6c16d86 100644 --- a/src/content/reference/en/p5/ESCAPE.mdx +++ b/src/content/reference/en/p5/ESCAPE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 426 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/EXCLUSION.mdx b/src/content/reference/en/p5/EXCLUSION.mdx index 4e8d6dfab6..e219ce482d 100644 --- a/src/content/reference/en/p5/EXCLUSION.mdx +++ b/src/content/reference/en/p5/EXCLUSION.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 509 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/FALLBACK.mdx b/src/content/reference/en/p5/FALLBACK.mdx index 2a727f89ab..5919121cc9 100644 --- a/src/content/reference/en/p5/FALLBACK.mdx +++ b/src/content/reference/en/p5/FALLBACK.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 757 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/FLAT.mdx b/src/content/reference/en/p5/FLAT.mdx index 2d319320d1..4d44af071e 100644 --- a/src/content/reference/en/p5/FLAT.mdx +++ b/src/content/reference/en/p5/FLAT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 713 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/FLOAT.mdx b/src/content/reference/en/p5/FLOAT.mdx index 7df46a2a02..e232359345 100644 --- a/src/content/reference/en/p5/FLOAT.mdx +++ b/src/content/reference/en/p5/FLOAT.mdx @@ -10,6 +10,7 @@ description: | will return NaN.

When an array of values is passed in, then an array of floats of the same length is returned.

+isConstructor: false line: 10 params: - name: str diff --git a/src/content/reference/en/p5/GRAY.mdx b/src/content/reference/en/p5/GRAY.mdx index 32023e9e07..a3a9771769 100644 --- a/src/content/reference/en/p5/GRAY.mdx +++ b/src/content/reference/en/p5/GRAY.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 564 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/GRID.mdx b/src/content/reference/en/p5/GRID.mdx index ae2f1092dc..8deedf9c12 100644 --- a/src/content/reference/en/p5/GRID.mdx +++ b/src/content/reference/en/p5/GRID.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 740 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/HALF_FLOAT.mdx b/src/content/reference/en/p5/HALF_FLOAT.mdx index 770b08ec25..fc40d53708 100644 --- a/src/content/reference/en/p5/HALF_FLOAT.mdx +++ b/src/content/reference/en/p5/HALF_FLOAT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 793 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/HALF_PI.mdx b/src/content/reference/en/p5/HALF_PI.mdx index d9ea1266eb..aa88e45423 100644 --- a/src/content/reference/en/p5/HALF_PI.mdx +++ b/src/content/reference/en/p5/HALF_PI.mdx @@ -12,8 +12,10 @@ description: > combination with the trigonometric functions sin() and cos().

+isConstructor: false line: 88 itemtype: property +alt: 80×80 white quarter-circle with curve toward bottom right of canvas. class: p5 example: - |- @@ -21,7 +23,6 @@ example:
arc(50, 50, 80, 80, 0, HALF_PI);
-alt: 80×80 white quarter-circle with curve toward bottom right of canvas. chainable: false --- diff --git a/src/content/reference/en/p5/HAND.mdx b/src/content/reference/en/p5/HAND.mdx index 2607ac295f..7a59131c81 100644 --- a/src/content/reference/en/p5/HAND.mdx +++ b/src/content/reference/en/p5/HAND.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 65 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/HARD_LIGHT.mdx b/src/content/reference/en/p5/HARD_LIGHT.mdx index 324f3c2841..444877db72 100644 --- a/src/content/reference/en/p5/HARD_LIGHT.mdx +++ b/src/content/reference/en/p5/HARD_LIGHT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 535 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/HSB.mdx b/src/content/reference/en/p5/HSB.mdx index f682aff071..3ff016f967 100644 --- a/src/content/reference/en/p5/HSB.mdx +++ b/src/content/reference/en/p5/HSB.mdx @@ -10,6 +10,7 @@ description: > HSB.

+isConstructor: false line: 369 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/HSL.mdx b/src/content/reference/en/p5/HSL.mdx index 468d6325e4..ce16a46f52 100644 --- a/src/content/reference/en/p5/HSL.mdx +++ b/src/content/reference/en/p5/HSL.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 378 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/IMAGE.mdx b/src/content/reference/en/p5/IMAGE.mdx index 1f75f66250..ecd782c0a4 100644 --- a/src/content/reference/en/p5/IMAGE.mdx +++ b/src/content/reference/en/p5/IMAGE.mdx @@ -75,6 +75,7 @@ description: > default, both xAlign and yAlign are set to CENTER.

+isConstructor: false line: 832 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/IMMEDIATE.mdx b/src/content/reference/en/p5/IMMEDIATE.mdx index 192b1e9653..26218d88c8 100644 --- a/src/content/reference/en/p5/IMMEDIATE.mdx +++ b/src/content/reference/en/p5/IMMEDIATE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 675 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/INVERT.mdx b/src/content/reference/en/p5/INVERT.mdx index ae8a6dec1c..8499f6fbeb 100644 --- a/src/content/reference/en/p5/INVERT.mdx +++ b/src/content/reference/en/p5/INVERT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 574 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ITALIC.mdx b/src/content/reference/en/p5/ITALIC.mdx index a9213dc6df..23669ab429 100644 --- a/src/content/reference/en/p5/ITALIC.mdx +++ b/src/content/reference/en/p5/ITALIC.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 606 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LABEL.mdx b/src/content/reference/en/p5/LABEL.mdx index aea1af3e68..d4a8fb7aea 100644 --- a/src/content/reference/en/p5/LABEL.mdx +++ b/src/content/reference/en/p5/LABEL.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 752 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LANDSCAPE.mdx b/src/content/reference/en/p5/LANDSCAPE.mdx index b165cbe4a7..d0d5c66b7b 100644 --- a/src/content/reference/en/p5/LANDSCAPE.mdx +++ b/src/content/reference/en/p5/LANDSCAPE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 725 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LEFT.mdx b/src/content/reference/en/p5/LEFT.mdx index 865e049d47..80e267c5f4 100644 --- a/src/content/reference/en/p5/LEFT.mdx +++ b/src/content/reference/en/p5/LEFT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 230 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LEFT_ARROW.mdx b/src/content/reference/en/p5/LEFT_ARROW.mdx index 6baf3a71d6..a7edd4cbfb 100644 --- a/src/content/reference/en/p5/LEFT_ARROW.mdx +++ b/src/content/reference/en/p5/LEFT_ARROW.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 431 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LIGHTEST.mdx b/src/content/reference/en/p5/LIGHTEST.mdx index 36f2c00747..0d74dcf52a 100644 --- a/src/content/reference/en/p5/LIGHTEST.mdx +++ b/src/content/reference/en/p5/LIGHTEST.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 493 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LINEAR.mdx b/src/content/reference/en/p5/LINEAR.mdx index 62209208f8..0ed06ba5cd 100644 --- a/src/content/reference/en/p5/LINEAR.mdx +++ b/src/content/reference/en/p5/LINEAR.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 638 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LINES.mdx b/src/content/reference/en/p5/LINES.mdx index 367bbc0895..4df6136537 100644 --- a/src/content/reference/en/p5/LINES.mdx +++ b/src/content/reference/en/p5/LINES.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 262 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LINE_LOOP.mdx b/src/content/reference/en/p5/LINE_LOOP.mdx index 917e8420e3..c5327d45a3 100644 --- a/src/content/reference/en/p5/LINE_LOOP.mdx +++ b/src/content/reference/en/p5/LINE_LOOP.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 274 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/LINE_STRIP.mdx b/src/content/reference/en/p5/LINE_STRIP.mdx index 0d1a47857d..f2a5941a04 100644 --- a/src/content/reference/en/p5/LINE_STRIP.mdx +++ b/src/content/reference/en/p5/LINE_STRIP.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 268 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/MIRROR.mdx b/src/content/reference/en/p5/MIRROR.mdx index db2e4fc8d8..dd5e6845fe 100644 --- a/src/content/reference/en/p5/MIRROR.mdx +++ b/src/content/reference/en/p5/MIRROR.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 706 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/MITER.mdx b/src/content/reference/en/p5/MITER.mdx index 8b34d5b65b..1e915d078b 100644 --- a/src/content/reference/en/p5/MITER.mdx +++ b/src/content/reference/en/p5/MITER.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 357 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/MOVE.mdx b/src/content/reference/en/p5/MOVE.mdx index 17f144fd92..afa8ab8894 100644 --- a/src/content/reference/en/p5/MOVE.mdx +++ b/src/content/reference/en/p5/MOVE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 70 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/MULTIPLY.mdx b/src/content/reference/en/p5/MULTIPLY.mdx index 702b64d092..b15805c09b 100644 --- a/src/content/reference/en/p5/MULTIPLY.mdx +++ b/src/content/reference/en/p5/MULTIPLY.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 514 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/NEAREST.mdx b/src/content/reference/en/p5/NEAREST.mdx index 4047a58821..150a869e43 100644 --- a/src/content/reference/en/p5/NEAREST.mdx +++ b/src/content/reference/en/p5/NEAREST.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 691 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/OPAQUE.mdx b/src/content/reference/en/p5/OPAQUE.mdx index b2f22aee25..48dac39ecd 100644 --- a/src/content/reference/en/p5/OPAQUE.mdx +++ b/src/content/reference/en/p5/OPAQUE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 569 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/OPEN.mdx b/src/content/reference/en/p5/OPEN.mdx index 60a4f7f2e4..8fd3e231e2 100644 --- a/src/content/reference/en/p5/OPEN.mdx +++ b/src/content/reference/en/p5/OPEN.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 320 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/OPTION.mdx b/src/content/reference/en/p5/OPTION.mdx index f43793e9ed..9cb7ed33b5 100644 --- a/src/content/reference/en/p5/OPTION.mdx +++ b/src/content/reference/en/p5/OPTION.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 436 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/OVERLAY.mdx b/src/content/reference/en/p5/OVERLAY.mdx index 4617603e95..538a90f158 100644 --- a/src/content/reference/en/p5/OVERLAY.mdx +++ b/src/content/reference/en/p5/OVERLAY.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 530 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/P2D.mdx b/src/content/reference/en/p5/P2D.mdx index 23d497f9bd..4544f0f069 100644 --- a/src/content/reference/en/p5/P2D.mdx +++ b/src/content/reference/en/p5/P2D.mdx @@ -5,6 +5,7 @@ submodule: Constants file: src/core/constants.js description: |

The default, two-dimensional renderer.

+isConstructor: false line: 18 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/PI.mdx b/src/content/reference/en/p5/PI.mdx index e9a6409a62..1c271748c6 100644 --- a/src/content/reference/en/p5/PI.mdx +++ b/src/content/reference/en/p5/PI.mdx @@ -12,8 +12,10 @@ description: > the trigonometric functions sin() and cos().

+isConstructor: false line: 106 itemtype: property +alt: white half-circle with curve toward bottom of canvas. class: p5 example: - |- @@ -21,7 +23,6 @@ example:
arc(50, 50, 80, 80, 0, PI);
-alt: white half-circle with curve toward bottom of canvas. chainable: false --- diff --git a/src/content/reference/en/p5/PIE.mdx b/src/content/reference/en/p5/PIE.mdx index d086a0bfb6..7a2f4377ec 100644 --- a/src/content/reference/en/p5/PIE.mdx +++ b/src/content/reference/en/p5/PIE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 330 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/POINTS.mdx b/src/content/reference/en/p5/POINTS.mdx index f9b376f796..40d943b1b8 100644 --- a/src/content/reference/en/p5/POINTS.mdx +++ b/src/content/reference/en/p5/POINTS.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 256 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/PORTRAIT.mdx b/src/content/reference/en/p5/PORTRAIT.mdx index 69f8ce7915..6fafd28d0f 100644 --- a/src/content/reference/en/p5/PORTRAIT.mdx +++ b/src/content/reference/en/p5/PORTRAIT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 730 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/POSTERIZE.mdx b/src/content/reference/en/p5/POSTERIZE.mdx index 01925d63ef..307d2e5fe6 100644 --- a/src/content/reference/en/p5/POSTERIZE.mdx +++ b/src/content/reference/en/p5/POSTERIZE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 579 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/PROJECT.mdx b/src/content/reference/en/p5/PROJECT.mdx index c235a70451..423ada02e7 100644 --- a/src/content/reference/en/p5/PROJECT.mdx +++ b/src/content/reference/en/p5/PROJECT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 335 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/QUADRATIC.mdx b/src/content/reference/en/p5/QUADRATIC.mdx index 38e9fd75d9..80c7913396 100644 --- a/src/content/reference/en/p5/QUADRATIC.mdx +++ b/src/content/reference/en/p5/QUADRATIC.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 643 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/QUADS.mdx b/src/content/reference/en/p5/QUADS.mdx index ef5eb9ced3..bf93b87dab 100644 --- a/src/content/reference/en/p5/QUADS.mdx +++ b/src/content/reference/en/p5/QUADS.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 298 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/QUAD_STRIP.mdx b/src/content/reference/en/p5/QUAD_STRIP.mdx index a069ac6102..76c89dad6f 100644 --- a/src/content/reference/en/p5/QUAD_STRIP.mdx +++ b/src/content/reference/en/p5/QUAD_STRIP.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 303 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/QUARTER_PI.mdx b/src/content/reference/en/p5/QUARTER_PI.mdx index 081c037fe5..bb4625290b 100644 --- a/src/content/reference/en/p5/QUARTER_PI.mdx +++ b/src/content/reference/en/p5/QUARTER_PI.mdx @@ -8,8 +8,10 @@ description: | It is one quarter the ratio of the circumference of a circle to its diameter. It is useful in combination with the trigonometric functions sin() and cos().

+isConstructor: false line: 124 itemtype: property +alt: white eighth-circle rotated about 40 degrees with curve bottom right canvas. class: p5 example: - |- @@ -17,7 +19,6 @@ example:
arc(50, 50, 80, 80, 0, QUARTER_PI);
-alt: white eighth-circle rotated about 40 degrees with curve bottom right canvas. chainable: false --- diff --git a/src/content/reference/en/p5/RADIANS.mdx b/src/content/reference/en/p5/RADIANS.mdx index 6319e3974c..7c395be3bf 100644 --- a/src/content/reference/en/p5/RADIANS.mdx +++ b/src/content/reference/en/p5/RADIANS.mdx @@ -10,6 +10,7 @@ description: | radians in a circle. For example, 90° = π ÷ 2 (about 1.57) radians. This function doesn't take into account the current angleMode().

+isConstructor: false line: 347 params: - name: degrees diff --git a/src/content/reference/en/p5/RADIUS.mdx b/src/content/reference/en/p5/RADIUS.mdx index 2c18a38cbc..aa8fe73fb6 100644 --- a/src/content/reference/en/p5/RADIUS.mdx +++ b/src/content/reference/en/p5/RADIUS.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 220 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/REMOVE.mdx b/src/content/reference/en/p5/REMOVE.mdx index 01d8daf8ae..f73004290e 100644 --- a/src/content/reference/en/p5/REMOVE.mdx +++ b/src/content/reference/en/p5/REMOVE.mdx @@ -11,8 +11,10 @@ description: | If you like, you can set p5 = null to erase it. While all functions and variables and objects created by the p5 library will be removed, any other global variables created by your code will remain.

+isConstructor: false line: 449 itemtype: method +alt: nothing displayed class: p5 example: - |- @@ -26,7 +28,6 @@ example: remove(); // remove whole sketch on mouse press } -alt: nothing displayed chainable: false --- diff --git a/src/content/reference/en/p5/REPEAT.mdx b/src/content/reference/en/p5/REPEAT.mdx index 500272e29e..a0e3a5b6f7 100644 --- a/src/content/reference/en/p5/REPEAT.mdx +++ b/src/content/reference/en/p5/REPEAT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 696 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/REPLACE.mdx b/src/content/reference/en/p5/REPLACE.mdx index 608cdf286e..d53df7f301 100644 --- a/src/content/reference/en/p5/REPLACE.mdx +++ b/src/content/reference/en/p5/REPLACE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 524 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/RETURN.mdx b/src/content/reference/en/p5/RETURN.mdx index 8c21c7edc9..de472248a4 100644 --- a/src/content/reference/en/p5/RETURN.mdx +++ b/src/content/reference/en/p5/RETURN.mdx @@ -10,8 +10,10 @@ description: > href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return"> the MDN entry for return.

+isConstructor: false line: 267 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -25,7 +27,6 @@ example: console.log(result); // prints '16' to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/RGB.mdx b/src/content/reference/en/p5/RGB.mdx index 14f857a4ba..80003bb63f 100644 --- a/src/content/reference/en/p5/RGB.mdx +++ b/src/content/reference/en/p5/RGB.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 364 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/RGBA.mdx b/src/content/reference/en/p5/RGBA.mdx index 361e9476a4..2654622b87 100644 --- a/src/content/reference/en/p5/RGBA.mdx +++ b/src/content/reference/en/p5/RGBA.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 799 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/RIGHT.mdx b/src/content/reference/en/p5/RIGHT.mdx index 6de9007856..d0577116aa 100644 --- a/src/content/reference/en/p5/RIGHT.mdx +++ b/src/content/reference/en/p5/RIGHT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 225 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/RIGHT_ARROW.mdx b/src/content/reference/en/p5/RIGHT_ARROW.mdx index c7f54e1754..e6714ea196 100644 --- a/src/content/reference/en/p5/RIGHT_ARROW.mdx +++ b/src/content/reference/en/p5/RIGHT_ARROW.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 446 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/ROUND.mdx b/src/content/reference/en/p5/ROUND.mdx index deea43ebe8..856c5789b1 100644 --- a/src/content/reference/en/p5/ROUND.mdx +++ b/src/content/reference/en/p5/ROUND.mdx @@ -8,6 +8,7 @@ description: > example, round(133.8) returns the value 134.

+isConstructor: false line: 635 params: - name: 'n' diff --git a/src/content/reference/en/p5/SCREEN.mdx b/src/content/reference/en/p5/SCREEN.mdx index 8faa14890e..04afb43d21 100644 --- a/src/content/reference/en/p5/SCREEN.mdx +++ b/src/content/reference/en/p5/SCREEN.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 519 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/SHIFT.mdx b/src/content/reference/en/p5/SHIFT.mdx index cc0b80588d..facb2730d3 100644 --- a/src/content/reference/en/p5/SHIFT.mdx +++ b/src/content/reference/en/p5/SHIFT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 451 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/SOFT_LIGHT.mdx b/src/content/reference/en/p5/SOFT_LIGHT.mdx index c3d98e1d2b..30baf4eb02 100644 --- a/src/content/reference/en/p5/SOFT_LIGHT.mdx +++ b/src/content/reference/en/p5/SOFT_LIGHT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 540 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/SUBTRACT.mdx b/src/content/reference/en/p5/SUBTRACT.mdx index e432f0bb3f..33d36bca53 100644 --- a/src/content/reference/en/p5/SUBTRACT.mdx +++ b/src/content/reference/en/p5/SUBTRACT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 504 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TAB.mdx b/src/content/reference/en/p5/TAB.mdx index efa90ea77b..51dacb6347 100644 --- a/src/content/reference/en/p5/TAB.mdx +++ b/src/content/reference/en/p5/TAB.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 456 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TAU.mdx b/src/content/reference/en/p5/TAU.mdx index 308531cb44..3e63508229 100644 --- a/src/content/reference/en/p5/TAU.mdx +++ b/src/content/reference/en/p5/TAU.mdx @@ -12,8 +12,10 @@ description: > combination with the trigonometric functions sin() and cos().

+isConstructor: false line: 142 itemtype: property +alt: 80×80 white ellipse shape in center of canvas. class: p5 example: - |- @@ -21,7 +23,6 @@ example:
arc(50, 50, 80, 80, 0, TAU);
-alt: 80×80 white ellipse shape in center of canvas. chainable: false --- diff --git a/src/content/reference/en/p5/TESS.mdx b/src/content/reference/en/p5/TESS.mdx index b642998c11..36deede4b4 100644 --- a/src/content/reference/en/p5/TESS.mdx +++ b/src/content/reference/en/p5/TESS.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 309 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TEXT.mdx b/src/content/reference/en/p5/TEXT.mdx index 69dfd9b631..3b9a0fd129 100644 --- a/src/content/reference/en/p5/TEXT.mdx +++ b/src/content/reference/en/p5/TEXT.mdx @@ -49,6 +49,7 @@ description: > stroke() has no effect in WEBGL mode.

+isConstructor: false line: 182 params: - name: str diff --git a/src/content/reference/en/p5/TEXTURE.mdx b/src/content/reference/en/p5/TEXTURE.mdx index db6a5c96da..752fccf81e 100644 --- a/src/content/reference/en/p5/TEXTURE.mdx +++ b/src/content/reference/en/p5/TEXTURE.mdx @@ -21,6 +21,7 @@ description: >

You can view more materials in this example.

+isConstructor: false line: 529 params: - name: tex @@ -29,6 +30,7 @@ params: type: >- p5.Image|p5.MediaElement|p5.Graphics|p5.Texture|p5.Framebuffer|p5.FramebufferTexture itemtype: method +alt: 'quad with a texture, mapped using normalized coordinates' class: p5 example: - |- @@ -135,7 +137,6 @@ example: } -alt: 'quad with a texture, mapped using normalized coordinates' chainable: true --- diff --git a/src/content/reference/en/p5/THRESHOLD.mdx b/src/content/reference/en/p5/THRESHOLD.mdx index f0d391c1f7..9687eb777b 100644 --- a/src/content/reference/en/p5/THRESHOLD.mdx +++ b/src/content/reference/en/p5/THRESHOLD.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 559 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TOP.mdx b/src/content/reference/en/p5/TOP.mdx index 3dbefdc199..b9ad3c8d34 100644 --- a/src/content/reference/en/p5/TOP.mdx +++ b/src/content/reference/en/p5/TOP.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 240 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TRIANGLES.mdx b/src/content/reference/en/p5/TRIANGLES.mdx index c09fcca6dd..bf5436bb9f 100644 --- a/src/content/reference/en/p5/TRIANGLES.mdx +++ b/src/content/reference/en/p5/TRIANGLES.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 280 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TRIANGLE_FAN.mdx b/src/content/reference/en/p5/TRIANGLE_FAN.mdx index 008161d873..852e20b1e9 100644 --- a/src/content/reference/en/p5/TRIANGLE_FAN.mdx +++ b/src/content/reference/en/p5/TRIANGLE_FAN.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 286 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TRIANGLE_STRIP.mdx b/src/content/reference/en/p5/TRIANGLE_STRIP.mdx index 1240d1d210..172e616328 100644 --- a/src/content/reference/en/p5/TRIANGLE_STRIP.mdx +++ b/src/content/reference/en/p5/TRIANGLE_STRIP.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 292 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/TWO_PI.mdx b/src/content/reference/en/p5/TWO_PI.mdx index 89630983fe..7bee42c8f3 100644 --- a/src/content/reference/en/p5/TWO_PI.mdx +++ b/src/content/reference/en/p5/TWO_PI.mdx @@ -12,8 +12,10 @@ description: > combination with the trigonometric functions sin() and cos().

+isConstructor: false line: 160 itemtype: property +alt: 80×80 white ellipse shape in center of canvas. class: p5 example: - |- @@ -21,7 +23,6 @@ example:
arc(50, 50, 80, 80, 0, TWO_PI);
-alt: 80×80 white ellipse shape in center of canvas. chainable: false --- diff --git a/src/content/reference/en/p5/UNSIGNED_BYTE.mdx b/src/content/reference/en/p5/UNSIGNED_BYTE.mdx index eb0e797da3..b0a120f647 100644 --- a/src/content/reference/en/p5/UNSIGNED_BYTE.mdx +++ b/src/content/reference/en/p5/UNSIGNED_BYTE.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 775 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/UNSIGNED_INT.mdx b/src/content/reference/en/p5/UNSIGNED_INT.mdx index bd4cc7c70b..363bd5a306 100644 --- a/src/content/reference/en/p5/UNSIGNED_INT.mdx +++ b/src/content/reference/en/p5/UNSIGNED_INT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 781 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/UP_ARROW.mdx b/src/content/reference/en/p5/UP_ARROW.mdx index eb9fb28aa6..a0286436d6 100644 --- a/src/content/reference/en/p5/UP_ARROW.mdx +++ b/src/content/reference/en/p5/UP_ARROW.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 461 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/VERSION.mdx b/src/content/reference/en/p5/VERSION.mdx index ffa35afafb..017c2bdd22 100644 --- a/src/content/reference/en/p5/VERSION.mdx +++ b/src/content/reference/en/p5/VERSION.mdx @@ -5,6 +5,7 @@ submodule: Constants file: src/core/constants.js description: |

Version of this p5.js.

+isConstructor: false line: 9 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/WAIT.mdx b/src/content/reference/en/p5/WAIT.mdx index f2712b881c..487d01200f 100644 --- a/src/content/reference/en/p5/WAIT.mdx +++ b/src/content/reference/en/p5/WAIT.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 80 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/WEBGL.mdx b/src/content/reference/en/p5/WEBGL.mdx index 61ed4fd964..54b6dc594c 100644 --- a/src/content/reference/en/p5/WEBGL.mdx +++ b/src/content/reference/en/p5/WEBGL.mdx @@ -78,6 +78,7 @@ description: > read the wiki article "Getting started with WebGL in p5".

+isConstructor: false line: 24 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/WEBGL2.mdx b/src/content/reference/en/p5/WEBGL2.mdx index 591732a05b..8941fb7e17 100644 --- a/src/content/reference/en/p5/WEBGL2.mdx +++ b/src/content/reference/en/p5/WEBGL2.mdx @@ -7,6 +7,7 @@ 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 has.

+isConstructor: false line: 45 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/WORD.mdx b/src/content/reference/en/p5/WORD.mdx index 5277aebaa2..24910405fe 100644 --- a/src/content/reference/en/p5/WORD.mdx +++ b/src/content/reference/en/p5/WORD.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 626 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/abs.mdx b/src/content/reference/en/p5/abs.mdx index 9c891bd57e..3c5d7e271b 100644 --- a/src/content/reference/en/p5/abs.mdx +++ b/src/content/reference/en/p5/abs.mdx @@ -12,6 +12,7 @@ description: > 5. The absolute value of a number is always positive.

+isConstructor: false line: 10 params: - name: 'n' diff --git a/src/content/reference/en/p5/accelerationX.mdx b/src/content/reference/en/p5/accelerationX.mdx index 11f9346adb..88c906298a 100644 --- a/src/content/reference/en/p5/accelerationX.mdx +++ b/src/content/reference/en/p5/accelerationX.mdx @@ -8,6 +8,7 @@ description: > device along the x axis. Value is represented as meters per second squared.

+isConstructor: false line: 23 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/accelerationY.mdx b/src/content/reference/en/p5/accelerationY.mdx index b27c0c217a..06097fd3a3 100644 --- a/src/content/reference/en/p5/accelerationY.mdx +++ b/src/content/reference/en/p5/accelerationY.mdx @@ -8,6 +8,7 @@ description: > device along the y axis. Value is represented as meters per second squared.

+isConstructor: false line: 45 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/accelerationZ.mdx b/src/content/reference/en/p5/accelerationZ.mdx index eb20d11c85..b49f21a4a6 100644 --- a/src/content/reference/en/p5/accelerationZ.mdx +++ b/src/content/reference/en/p5/accelerationZ.mdx @@ -8,6 +8,7 @@ description: > device along the z axis. Value is represented as meters per second squared.

+isConstructor: false line: 67 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/acos.mdx b/src/content/reference/en/p5/acos.mdx index e631dd1295..951ee94f79 100644 --- a/src/content/reference/en/p5/acos.mdx +++ b/src/content/reference/en/p5/acos.mdx @@ -14,6 +14,7 @@ description: > are returned in the range 0 to 180.

+isConstructor: false line: 18 params: - name: value diff --git a/src/content/reference/en/p5/alpha.mdx b/src/content/reference/en/p5/alpha.mdx index 94d403db4d..ec794803c9 100644 --- a/src/content/reference/en/p5/alpha.mdx +++ b/src/content/reference/en/p5/alpha.mdx @@ -7,6 +7,7 @@ description: |

Extracts the alpha (transparency) value from a p5.Color object, array of color components, or CSS color string.

+isConstructor: false line: 16 params: - name: color diff --git a/src/content/reference/en/p5/ambientLight.mdx b/src/content/reference/en/p5/ambientLight.mdx index 8c9eff723d..e0b01bd659 100644 --- a/src/content/reference/en/p5/ambientLight.mdx +++ b/src/content/reference/en/p5/ambientLight.mdx @@ -12,8 +12,10 @@ description: | within draw() to remain persistent in a looping program. Placing them in setup() will cause them to only have an effect the first time through the loop.

+isConstructor: false line: 10 itemtype: method +alt: pink ambient material cube under the ambient light class: p5 example: - |- @@ -68,7 +70,6 @@ example: } -alt: pink ambient material cube under the ambient light chainable: true --- diff --git a/src/content/reference/en/p5/ambientMaterial.mdx b/src/content/reference/en/p5/ambientMaterial.mdx index d559edeaf3..ff61dbea85 100644 --- a/src/content/reference/en/p5/ambientMaterial.mdx +++ b/src/content/reference/en/p5/ambientMaterial.mdx @@ -17,8 +17,10 @@ description: | the light that it can reflect.

You can view more materials in this example.

+isConstructor: false line: 869 itemtype: method +alt: box reflecting no light class: p5 example: - |- @@ -74,7 +76,6 @@ example: } -alt: box reflecting no light chainable: true --- diff --git a/src/content/reference/en/p5/angleMode.mdx b/src/content/reference/en/p5/angleMode.mdx index 86327d9202..be83a6c29c 100644 --- a/src/content/reference/en/p5/angleMode.mdx +++ b/src/content/reference/en/p5/angleMode.mdx @@ -10,6 +10,7 @@ description: >

Calling angleMode() with no arguments returns current angle mode.

+isConstructor: false line: 372 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/append.mdx b/src/content/reference/en/p5/append.mdx index 18dcd30346..59ee5b5965 100644 --- a/src/content/reference/en/p5/append.mdx +++ b/src/content/reference/en/p5/append.mdx @@ -6,6 +6,7 @@ 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().

+isConstructor: false line: 10 params: - name: array diff --git a/src/content/reference/en/p5/applyMatrix.mdx b/src/content/reference/en/p5/applyMatrix.mdx index 807935a32e..823f42bb9b 100644 --- a/src/content/reference/en/p5/applyMatrix.mdx +++ b/src/content/reference/en/p5/applyMatrix.mdx @@ -36,8 +36,15 @@ description: > alt="The transformation matrix used when applyMatrix is called with 4x4 matrix"/>

+isConstructor: false line: 11 itemtype: method +alt: |- + A rectangle translating to the right + A rectangle shrinking to the center + A rectangle rotating clockwise about the center + A rectangle shearing + A rectangle in the upper left corner class: p5 example: - |- @@ -157,12 +164,6 @@ example: } -alt: |- - A rectangle translating to the right - A rectangle shrinking to the center - A rectangle rotating clockwise about the center - A rectangle shearing - A rectangle in the upper left corner chainable: true --- diff --git a/src/content/reference/en/p5/arc.mdx b/src/content/reference/en/p5/arc.mdx index 576e28700e..c5f3af6a51 100644 --- a/src/content/reference/en/p5/arc.mdx +++ b/src/content/reference/en/p5/arc.mdx @@ -23,6 +23,7 @@ description: > a semi-circle (OPEN), a closed semi-circle (CHORD), or a closed pie segment (PIE).

+isConstructor: false line: 102 params: - name: x diff --git a/src/content/reference/en/p5/arrayCopy.mdx b/src/content/reference/en/p5/arrayCopy.mdx index d3023f95ab..24ce32600c 100644 --- a/src/content/reference/en/p5/arrayCopy.mdx +++ b/src/content/reference/en/p5/arrayCopy.mdx @@ -15,6 +15,7 @@ description: | arrayCopy(src, 0, dst, 0, src.length).

Using this function is far more efficient for copying array data than iterating through a for() loop and copying each element individually.

+isConstructor: false line: 35 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/asin.mdx b/src/content/reference/en/p5/asin.mdx index 734f0cf0b7..b054d599e4 100644 --- a/src/content/reference/en/p5/asin.mdx +++ b/src/content/reference/en/p5/asin.mdx @@ -16,6 +16,7 @@ description: > are returned in the range -90 to 90.

+isConstructor: false line: 60 params: - name: value diff --git a/src/content/reference/en/p5/atan.mdx b/src/content/reference/en/p5/atan.mdx index 0fa862ac90..e872bf3701 100644 --- a/src/content/reference/en/p5/atan.mdx +++ b/src/content/reference/en/p5/atan.mdx @@ -16,6 +16,7 @@ description: > are returned in the range -90 to 90.

+isConstructor: false line: 103 params: - name: value diff --git a/src/content/reference/en/p5/atan2.mdx b/src/content/reference/en/p5/atan2.mdx index 531b56593a..be740c4c3f 100644 --- a/src/content/reference/en/p5/atan2.mdx +++ b/src/content/reference/en/p5/atan2.mdx @@ -21,6 +21,7 @@ description: >

Note: The y-coordinate of the point is the first parameter and the x-coordinate is the second parameter.

+isConstructor: false line: 146 params: - name: 'y' diff --git a/src/content/reference/en/p5/background.mdx b/src/content/reference/en/p5/background.mdx index f50863fea7..8da79aed35 100644 --- a/src/content/reference/en/p5/background.mdx +++ b/src/content/reference/en/p5/background.mdx @@ -47,6 +47,7 @@ description: > 0) sets the background a bright yellow color.

+isConstructor: false line: 215 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/beginClip.mdx b/src/content/reference/en/p5/beginClip.mdx index 4f12310cb6..e35c941141 100644 --- a/src/content/reference/en/p5/beginClip.mdx +++ b/src/content/reference/en/p5/beginClip.mdx @@ -34,6 +34,7 @@ description: > not filled by the mask shape. Defaults to false. +isConstructor: false line: 13 params: - name: options @@ -42,6 +43,9 @@ params: type: Object optional: true itemtype: method +alt: |- + A silhouette of a rotating torus colored with a gradient from + cyan to purple class: p5 example: - |- @@ -107,9 +111,6 @@ example: } -alt: |- - A silhouette of a rotating torus colored with a gradient from - cyan to purple chainable: false --- diff --git a/src/content/reference/en/p5/beginContour.mdx b/src/content/reference/en/p5/beginContour.mdx index 8e09cab774..51ffb21719 100644 --- a/src/content/reference/en/p5/beginContour.mdx +++ b/src/content/reference/en/p5/beginContour.mdx @@ -35,8 +35,10 @@ description: > other shapes, such as ellipse() or rect() within.

+isConstructor: false line: 20 itemtype: method +alt: white rect and smaller grey rect with red outlines in center of canvas. class: p5 example: - |- @@ -61,7 +63,6 @@ example: endShape(CLOSE); -alt: white rect and smaller grey rect with red outlines in center of canvas. chainable: true --- diff --git a/src/content/reference/en/p5/beginGeometry.mdx b/src/content/reference/en/p5/beginGeometry.mdx index e388e51aa8..ce5b19b1fe 100644 --- a/src/content/reference/en/p5/beginGeometry.mdx +++ b/src/content/reference/en/p5/beginGeometry.mdx @@ -22,8 +22,10 @@ description: > drawing that will run faster than repeatedly drawing the individual pieces.

+isConstructor: false line: 13 itemtype: method +alt: 'A series of different flat, curved, and 3D shapes floating in space.' class: p5 example: - |- @@ -82,7 +84,6 @@ example: } -alt: 'A series of different flat, curved, and 3D shapes floating in space.' chainable: false --- diff --git a/src/content/reference/en/p5/beginShape.mdx b/src/content/reference/en/p5/beginShape.mdx index a836354f54..a990ad78e7 100644 --- a/src/content/reference/en/p5/beginShape.mdx +++ b/src/content/reference/en/p5/beginShape.mdx @@ -70,6 +70,7 @@ description: > ellipse() or rect() within beginShape().

+isConstructor: false line: 71 params: - name: kind @@ -79,6 +80,18 @@ params: type: Constant optional: true itemtype: method +alt: |- + white square-shape with black outline in middle-right of canvas. + 4 black points in a square shape in middle-right of canvas. + 2 horizontal black lines. In the top-right and bottom-right of canvas. + 3 line shape with horizontal on top, vertical in middle and horizontal bottom. + square line shape in middle-right of canvas. + 2 white triangle shapes mid-right canvas. left one pointing up and right down. + 5 horizontal interlocking and alternating white triangles in mid-right canvas. + 4 interlocking white triangles in 45 degree rotated square-shape. + 2 white rectangle shapes in mid-right canvas. Both 20×55. + 3 side-by-side white rectangles center rect is smaller in mid-right canvas. + Thick white l-shape with black outline mid-top-left of canvas. class: p5 example: - |- @@ -224,18 +237,6 @@ example: endShape(CLOSE); -alt: |- - white square-shape with black outline in middle-right of canvas. - 4 black points in a square shape in middle-right of canvas. - 2 horizontal black lines. In the top-right and bottom-right of canvas. - 3 line shape with horizontal on top, vertical in middle and horizontal bottom. - square line shape in middle-right of canvas. - 2 white triangle shapes mid-right canvas. left one pointing up and right down. - 5 horizontal interlocking and alternating white triangles in mid-right canvas. - 4 interlocking white triangles in 45 degree rotated square-shape. - 2 white rectangle shapes in mid-right canvas. Both 20×55. - 3 side-by-side white rectangles center rect is smaller in mid-right canvas. - Thick white l-shape with black outline mid-top-left of canvas. chainable: true --- diff --git a/src/content/reference/en/p5/bezier.mdx b/src/content/reference/en/p5/bezier.mdx index 018ac9f893..4f0d89c1a9 100644 --- a/src/content/reference/en/p5/bezier.mdx +++ b/src/content/reference/en/p5/bezier.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 648 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/bezierDetail.mdx b/src/content/reference/en/p5/bezierDetail.mdx index 04796b52a0..4b550917f6 100644 --- a/src/content/reference/en/p5/bezierDetail.mdx +++ b/src/content/reference/en/p5/bezierDetail.mdx @@ -10,6 +10,7 @@ description: >

Note, This function is only useful when using the WEBGL renderer as the default canvas renderer does not use this information.

+isConstructor: false line: 92 params: - name: detail @@ -17,6 +18,7 @@ params:

resolution of the curves

type: Number itemtype: method +alt: stretched black s-shape with a low level of bezier detail class: p5 example: - |- @@ -40,7 +42,6 @@ example: } -alt: stretched black s-shape with a low level of bezier detail chainable: true --- diff --git a/src/content/reference/en/p5/bezierPoint.mdx b/src/content/reference/en/p5/bezierPoint.mdx index c4ca2a83f7..b825dedc13 100644 --- a/src/content/reference/en/p5/bezierPoint.mdx +++ b/src/content/reference/en/p5/bezierPoint.mdx @@ -18,6 +18,7 @@ description: > This can be done once with the x coordinates and a second time with the y coordinates to get the location of a bezier curve at t.

+isConstructor: false line: 131 params: - name: a @@ -41,6 +42,7 @@ params:

value between 0 and 1

type: Number itemtype: method +alt: 10 points plotted on a given bezier at equal distances. class: p5 example: - |- @@ -67,7 +69,6 @@ example: } -alt: 10 points plotted on a given bezier at equal distances. return: description: the value of the Bezier at position t type: Number diff --git a/src/content/reference/en/p5/bezierTangent.mdx b/src/content/reference/en/p5/bezierTangent.mdx index 0beead6fcc..04dd1b4e2d 100644 --- a/src/content/reference/en/p5/bezierTangent.mdx +++ b/src/content/reference/en/p5/bezierTangent.mdx @@ -8,6 +8,7 @@ description: | The parameters a and d are the first and last points on the curve, and b and c are the control points. The final parameter t varies between 0 and 1.

+isConstructor: false line: 186 params: - name: a @@ -31,6 +32,11 @@ params:

value between 0 and 1

type: Number itemtype: method +alt: >- + s-shaped line with 6 short orange lines showing the tangents at those points. + + s-shaped line with 6 short orange lines showing lines coming out the underside + of the bezier. class: p5 example: - |- @@ -81,11 +87,6 @@ example: } -alt: >- - s-shaped line with 6 short orange lines showing the tangents at those points. - - s-shaped line with 6 short orange lines showing lines coming out the underside - of the bezier. return: description: the tangent at position t type: Number diff --git a/src/content/reference/en/p5/bezierVertex.mdx b/src/content/reference/en/p5/bezierVertex.mdx index b54f9d8604..bcd5cab0b6 100644 --- a/src/content/reference/en/p5/bezierVertex.mdx +++ b/src/content/reference/en/p5/bezierVertex.mdx @@ -29,8 +29,16 @@ description: > and only when there is no MODE or POINTS parameter specified to beginShape().

+isConstructor: false line: 297 itemtype: method +alt: >- + crescent-shaped line in middle of canvas. Points facing left. + + white crescent shape in middle of canvas. Points facing left. + + crescent shape in middle of canvas with another crescent shape on positive + z-axis. class: p5 example: - |- @@ -86,13 +94,6 @@ example: } -alt: >- - crescent-shaped line in middle of canvas. Points facing left. - - white crescent shape in middle of canvas. Points facing left. - - crescent shape in middle of canvas with another crescent shape on positive - z-axis. chainable: true --- diff --git a/src/content/reference/en/p5/blendMode.mdx b/src/content/reference/en/p5/blendMode.mdx index c1a2d2b38f..826befe90b 100644 --- a/src/content/reference/en/p5/blendMode.mdx +++ b/src/content/reference/en/p5/blendMode.mdx @@ -82,6 +82,7 @@ description: > (3D) indicates that this blend mode only works in the WEBGL renderer.

+isConstructor: false line: 451 params: - name: mode @@ -92,6 +93,9 @@ params: SOFT_LIGHT, DODGE, BURN, ADD, REMOVE or SUBTRACT

type: Constant itemtype: method +alt: |- + translucent image thick red & blue diagonal rounded lines intersecting center + Thick red & blue diagonal rounded lines intersecting center. dark at overlap class: p5 example: - |- @@ -117,9 +121,6 @@ example: line(75, 25, 25, 75); -alt: |- - translucent image thick red & blue diagonal rounded lines intersecting center - Thick red & blue diagonal rounded lines intersecting center. dark at overlap chainable: false --- diff --git a/src/content/reference/en/p5/blue.mdx b/src/content/reference/en/p5/blue.mdx index 250b47350a..bd727a7d6f 100644 --- a/src/content/reference/en/p5/blue.mdx +++ b/src/content/reference/en/p5/blue.mdx @@ -6,6 +6,7 @@ file: src/color/creating_reading.js description: |

Extracts the blue value from a p5.Color object, array of color components, or CSS color string.

+isConstructor: false line: 46 params: - name: color diff --git a/src/content/reference/en/p5/boolean.mdx b/src/content/reference/en/p5/boolean.mdx index 131c4cfb5a..facf336d20 100644 --- a/src/content/reference/en/p5/boolean.mdx +++ b/src/content/reference/en/p5/boolean.mdx @@ -10,6 +10,7 @@ description: | true, while any other value evaluates to false. When an array of number or string values is passed in, then a array of booleans of the same length is returned.

+isConstructor: false line: 112 params: - name: 'n' diff --git a/src/content/reference/en/p5/box.mdx b/src/content/reference/en/p5/box.mdx index 4082964583..f6c1fbb44b 100644 --- a/src/content/reference/en/p5/box.mdx +++ b/src/content/reference/en/p5/box.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/3d_primitives.js description: |

Draw a box with given width, height and depth

+isConstructor: false line: 268 params: - name: width diff --git a/src/content/reference/en/p5/brightness.mdx b/src/content/reference/en/p5/brightness.mdx index ef04f5d22e..d572abc37d 100644 --- a/src/content/reference/en/p5/brightness.mdx +++ b/src/content/reference/en/p5/brightness.mdx @@ -7,6 +7,7 @@ description: |

Extracts the HSB brightness value from a p5.Color object, array of color components, or CSS color string.

+isConstructor: false line: 74 params: - name: color diff --git a/src/content/reference/en/p5/buildGeometry.mdx b/src/content/reference/en/p5/buildGeometry.mdx index 30873f3e04..4bf0925d2e 100644 --- a/src/content/reference/en/p5/buildGeometry.mdx +++ b/src/content/reference/en/p5/buildGeometry.mdx @@ -25,6 +25,7 @@ description: > endGeometry() instead of using a callback function.

+isConstructor: false line: 102 params: - name: callback @@ -32,6 +33,7 @@ params:

A function that draws shapes.

type: Function itemtype: method +alt: A cluster of spheres. class: p5 example: - |- @@ -74,7 +76,6 @@ example: } -alt: A cluster of spheres. return: description: The model that was built from the callback function. type: p5.Geometry diff --git a/src/content/reference/en/p5/byte.mdx b/src/content/reference/en/p5/byte.mdx index f0d6233072..d0def004d6 100644 --- a/src/content/reference/en/p5/byte.mdx +++ b/src/content/reference/en/p5/byte.mdx @@ -14,6 +14,7 @@ description: > corresponding byte representation. When an array of number, string or boolean values is passed in, then an array of bytes the same length is returned.

+isConstructor: false line: 144 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/camera.mdx b/src/content/reference/en/p5/camera.mdx index 951b3fd19e..ffeeb2b28d 100644 --- a/src/content/reference/en/p5/camera.mdx +++ b/src/content/reference/en/p5/camera.mdx @@ -83,6 +83,76 @@ alt: |- White square repeatedly grows to fill canvas and then shrinks. An interactive example of a red cube with 3 sliders for moving it across x, y, z axis and 3 sliders for shifting its center. +class: p5 +example: + - |- + +
+ + function setup() { + createCanvas(100, 100, WEBGL); + perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3)); + describe('a square moving closer and then away from the camera.'); + } + function draw() { + background(204); + //move the camera away from the plane by a sin wave + camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0); + plane(10, 10); + } + +
+ - |- + +
+ + //move slider to see changes! + //sliders control the first 6 parameters of camera() + let sliderGroup = []; + let X; + let Y; + let Z; + let centerX; + let centerY; + let centerZ; + let h = 20; + + function setup() { + createCanvas(100, 100, WEBGL); + perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3)); + //create sliders + for (var i = 0; i < 6; i++) { + if (i === 2) { + sliderGroup[i] = createSlider(10, 400, 200); + } else { + sliderGroup[i] = createSlider(-400, 400, 0); + } + h = map(i, 0, 6, 5, 85); + sliderGroup[i].position(10, height + h); + sliderGroup[i].style('width', '80px'); + } + describe( + 'White square repeatedly grows to fill canvas and then shrinks. An interactive example of a red cube with 3 sliders for moving it across x, y, z axis and 3 sliders for shifting its center.' + ); + } + + function draw() { + background(60); + // assigning sliders' value to each parameters + X = sliderGroup[0].value(); + Y = sliderGroup[1].value(); + Z = sliderGroup[2].value(); + centerX = sliderGroup[3].value(); + centerY = sliderGroup[4].value(); + centerZ = sliderGroup[5].value(); + camera(X, Y, Z, centerX, centerY, centerZ, 0, 1, 0); + stroke(255); + fill(255, 102, 94); + box(85); + } + +
+chainable: true --- diff --git a/src/content/reference/en/p5/ceil.mdx b/src/content/reference/en/p5/ceil.mdx index 8453b790dd..0ca39b66d9 100644 --- a/src/content/reference/en/p5/ceil.mdx +++ b/src/content/reference/en/p5/ceil.mdx @@ -10,6 +10,7 @@ description: > value 10.

+isConstructor: false line: 39 params: - name: 'n' diff --git a/src/content/reference/en/p5/changed.mdx b/src/content/reference/en/p5/changed.mdx index 95345453c3..3f18efda64 100644 --- a/src/content/reference/en/p5/changed.mdx +++ b/src/content/reference/en/p5/changed.mdx @@ -10,6 +10,7 @@ description: > p5.Element object changes. Calling myElement.changed(false) disables the function.

+isConstructor: false line: 309 params: - name: fxn diff --git a/src/content/reference/en/p5/circle.mdx b/src/content/reference/en/p5/circle.mdx index e6e76a07f0..9816765574 100644 --- a/src/content/reference/en/p5/circle.mdx +++ b/src/content/reference/en/p5/circle.mdx @@ -9,6 +9,7 @@ description: | two parameters set the location of the center of the circle. The third parameter sets the shape's width and height (diameter). The origin may be changed with the ellipseMode() function.

+isConstructor: false line: 274 params: - name: x diff --git a/src/content/reference/en/p5/class.mdx b/src/content/reference/en/p5/class.mdx index 28c0c9e4a5..6346bdd2d9 100644 --- a/src/content/reference/en/p5/class.mdx +++ b/src/content/reference/en/p5/class.mdx @@ -15,8 +15,10 @@ description: > The class declaration creates a new Class with a given name using prototype-based inheritance.

+isConstructor: false line: 379 itemtype: property +alt: This example does not render anything class: p5 example: - >- @@ -41,7 +43,6 @@ example: -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/clear.mdx b/src/content/reference/en/p5/clear.mdx index 277ac1d7d8..a17f2d9489 100644 --- a/src/content/reference/en/p5/clear.mdx +++ b/src/content/reference/en/p5/clear.mdx @@ -24,6 +24,7 @@ description: > clears the depth buffer. If you are not using the WebGL renderer, these parameters will have no effect.

+isConstructor: false line: 390 params: - name: r diff --git a/src/content/reference/en/p5/clearDepth.mdx b/src/content/reference/en/p5/clearDepth.mdx index 65f4cc0347..956cdd2564 100644 --- a/src/content/reference/en/p5/clearDepth.mdx +++ b/src/content/reference/en/p5/clearDepth.mdx @@ -22,6 +22,7 @@ description: > 3D depth, anything you draw will always go on top of the previous content on the canvas anyway.

+isConstructor: false line: 381 params: - name: depth @@ -37,6 +38,9 @@ params: type: Number optional: true itemtype: method +alt: |- + A red, green, and blue box (using normalMaterial) moves and rotates around + the canvas, leaving a trail behind it that slowly grows and fades away. class: p5 example: - |- @@ -81,9 +85,6 @@ example: } -alt: |- - A red, green, and blue box (using normalMaterial) moves and rotates around - the canvas, leaving a trail behind it that slowly grows and fades away. chainable: false --- diff --git a/src/content/reference/en/p5/clearStorage.mdx b/src/content/reference/en/p5/clearStorage.mdx index 00f060e0ba..4f6f523f8b 100644 --- a/src/content/reference/en/p5/clearStorage.mdx +++ b/src/content/reference/en/p5/clearStorage.mdx @@ -6,6 +6,7 @@ file: src/data/local_storage.js description: |

Clears all local storage items set with storeItem() for the current domain.

+isConstructor: false line: 173 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/clip.mdx b/src/content/reference/en/p5/clip.mdx index 218538ddcd..0bb843b010 100644 --- a/src/content/reference/en/p5/clip.mdx +++ b/src/content/reference/en/p5/clip.mdx @@ -29,6 +29,7 @@ description: > not filled by the mask shape. Defaults to false. +isConstructor: false line: 120 params: - name: callback @@ -41,6 +42,9 @@ params: type: Object optional: true itemtype: method +alt: |- + A silhouette of a rotating torus colored with a gradient from + cyan to purple class: p5 example: - |- @@ -106,9 +110,6 @@ example: } -alt: |- - A silhouette of a rotating torus colored with a gradient from - cyan to purple chainable: false --- diff --git a/src/content/reference/en/p5/color.mdx b/src/content/reference/en/p5/color.mdx index 328ac2fe59..dc435411f7 100644 --- a/src/content/reference/en/p5/color.mdx +++ b/src/content/reference/en/p5/color.mdx @@ -37,6 +37,7 @@ description: > parameter sets the alpha (transparency) value.

+isConstructor: false line: 120 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/colorMode.mdx b/src/content/reference/en/p5/colorMode.mdx index 6f516a1d33..a81cf746c6 100644 --- a/src/content/reference/en/p5/colorMode.mdx +++ b/src/content/reference/en/p5/colorMode.mdx @@ -33,6 +33,7 @@ description: >

p5.Color objects remember the mode that they were created in. Changing modes doesn't affect their appearance.

+isConstructor: false line: 459 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/concat.mdx b/src/content/reference/en/p5/concat.mdx index 5bbf3edb6b..4e710e1aa4 100644 --- a/src/content/reference/en/p5/concat.mdx +++ b/src/content/reference/en/p5/concat.mdx @@ -6,6 +6,7 @@ file: src/utilities/array_functions.js description: |

Concatenates two arrays, maps to Array.concat(). Does not modify the input arrays.

+isConstructor: false line: 112 params: - name: a diff --git a/src/content/reference/en/p5/cone.mdx b/src/content/reference/en/p5/cone.mdx index c8297746f4..6d683d2f98 100644 --- a/src/content/reference/en/p5/cone.mdx +++ b/src/content/reference/en/p5/cone.mdx @@ -14,6 +14,7 @@ description: > recommended maximum value for detailX is 24. Using a value greater than 24 may cause a warning or slow down the browser.

+isConstructor: false line: 742 params: - name: radius diff --git a/src/content/reference/en/p5/const.mdx b/src/content/reference/en/p5/const.mdx index 402862528b..838d53cda3 100644 --- a/src/content/reference/en/p5/const.mdx +++ b/src/content/reference/en/p5/const.mdx @@ -44,8 +44,10 @@ description: > The value of a constant can't be changed through reassignment, and it can't be redeclared.

+isConstructor: false line: 34 itemtype: property +alt: These examples do not render anything class: p5 example: - |- @@ -76,7 +78,6 @@ example: // wordFrequency = { 'a': 2, 'b': 3}; // throws error here -alt: These examples do not render anything chainable: false --- diff --git a/src/content/reference/en/p5/constrain.mdx b/src/content/reference/en/p5/constrain.mdx index b13922d975..67937db754 100644 --- a/src/content/reference/en/p5/constrain.mdx +++ b/src/content/reference/en/p5/constrain.mdx @@ -5,6 +5,7 @@ submodule: Calculation file: src/math/calculation.js description: |

Constrains a number between a minimum and maximum value.

+isConstructor: false line: 69 params: - name: 'n' diff --git a/src/content/reference/en/p5/copy.mdx b/src/content/reference/en/p5/copy.mdx index c84e8c39dd..4b3210c1df 100644 --- a/src/content/reference/en/p5/copy.mdx +++ b/src/content/reference/en/p5/copy.mdx @@ -12,6 +12,7 @@ description: > isn't the same size as the destination region.

+isConstructor: false line: 207 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/cos.mdx b/src/content/reference/en/p5/cos.mdx index 608962d110..89fac421a8 100644 --- a/src/content/reference/en/p5/cos.mdx +++ b/src/content/reference/en/p5/cos.mdx @@ -13,6 +13,7 @@ description: > current angleMode.

+isConstructor: false line: 183 params: - name: angle diff --git a/src/content/reference/en/p5/createA.mdx b/src/content/reference/en/p5/createA.mdx index b4b8cb63df..579cfc392a 100644 --- a/src/content/reference/en/p5/createA.mdx +++ b/src/content/reference/en/p5/createA.mdx @@ -29,6 +29,7 @@ description: > other options.

+isConstructor: false line: 655 params: - name: href diff --git a/src/content/reference/en/p5/createAudio.mdx b/src/content/reference/en/p5/createAudio.mdx index f2371e0a78..c9dfafee65 100644 --- a/src/content/reference/en/p5/createAudio.mdx +++ b/src/content/reference/en/p5/createAudio.mdx @@ -34,6 +34,7 @@ description: > to call once the audio is ready to play.

+isConstructor: false line: 2043 params: - name: src diff --git a/src/content/reference/en/p5/createButton.mdx b/src/content/reference/en/p5/createButton.mdx index 54470896ba..32873b9716 100644 --- a/src/content/reference/en/p5/createButton.mdx +++ b/src/content/reference/en/p5/createButton.mdx @@ -21,6 +21,7 @@ description: > target="_blank">MDN for more details.

+isConstructor: false line: 842 params: - name: label diff --git a/src/content/reference/en/p5/createCamera.mdx b/src/content/reference/en/p5/createCamera.mdx index 0913c711c3..b28ab56e62 100644 --- a/src/content/reference/en/p5/createCamera.mdx +++ b/src/content/reference/en/p5/createCamera.mdx @@ -32,8 +32,10 @@ description: > and frustum() if it is the only camera in the scene.

+isConstructor: false line: 331 itemtype: method +alt: An example that creates a camera and moves it around the box. class: p5 example: - |- @@ -69,7 +71,6 @@ example: box(150, 150, 20); } -alt: An example that creates a camera and moves it around the box. return: description: The newly created camera object. type: p5.Camera diff --git a/src/content/reference/en/p5/createCanvas.mdx b/src/content/reference/en/p5/createCanvas.mdx index 58464a2286..5d4c439efb 100644 --- a/src/content/reference/en/p5/createCanvas.mdx +++ b/src/content/reference/en/p5/createCanvas.mdx @@ -57,8 +57,10 @@ description: > positioning the canvas wiki page.

+isConstructor: false line: 15 itemtype: method +alt: Black line extending from top-left of canvas to bottom right. class: p5 example: - |- @@ -72,7 +74,6 @@ example: } -alt: Black line extending from top-left of canvas to bottom right. return: description: pointer to p5.Renderer holding canvas type: p5.Renderer diff --git a/src/content/reference/en/p5/createCapture.mdx b/src/content/reference/en/p5/createCapture.mdx index c29454863a..bffee182df 100644 --- a/src/content/reference/en/p5/createCapture.mdx +++ b/src/content/reference/en/p5/createCapture.mdx @@ -59,6 +59,7 @@ description: > and here.

+isConstructor: false line: 2121 params: - name: type diff --git a/src/content/reference/en/p5/createCheckbox.mdx b/src/content/reference/en/p5/createCheckbox.mdx index 6e91e40f48..5f29a1b864 100644 --- a/src/content/reference/en/p5/createCheckbox.mdx +++ b/src/content/reference/en/p5/createCheckbox.mdx @@ -24,6 +24,7 @@ description: > that sets the checkbox's value.

+isConstructor: false line: 914 params: - name: label diff --git a/src/content/reference/en/p5/createColorPicker.mdx b/src/content/reference/en/p5/createColorPicker.mdx index f7e14b5d82..262f152157 100644 --- a/src/content/reference/en/p5/createColorPicker.mdx +++ b/src/content/reference/en/p5/createColorPicker.mdx @@ -25,6 +25,7 @@ description: > href="#/p5.Color">p5.Color object. +isConstructor: false line: 1614 params: - name: value diff --git a/src/content/reference/en/p5/createConvolver.mdx b/src/content/reference/en/p5/createConvolver.mdx index 257832f075..182e5230e3 100644 --- a/src/content/reference/en/p5/createConvolver.mdx +++ b/src/content/reference/en/p5/createConvolver.mdx @@ -6,6 +6,7 @@ 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.

+isConstructor: false line: 8885 params: - name: path diff --git a/src/content/reference/en/p5/createDiv.mdx b/src/content/reference/en/p5/createDiv.mdx index b60a0ac098..4317f3cc1e 100644 --- a/src/content/reference/en/p5/createDiv.mdx +++ b/src/content/reference/en/p5/createDiv.mdx @@ -13,6 +13,7 @@ description: > the inner HTML of the new <div></div>.

+isConstructor: false line: 444 params: - name: html diff --git a/src/content/reference/en/p5/createElement.mdx b/src/content/reference/en/p5/createElement.mdx index c6d4361053..324d3cdd85 100644 --- a/src/content/reference/en/p5/createElement.mdx +++ b/src/content/reference/en/p5/createElement.mdx @@ -15,6 +15,7 @@ description: > HTML content to insert into the new element. New elements have no content by default.

+isConstructor: false line: 2267 params: - name: tag diff --git a/src/content/reference/en/p5/createFileInput.mdx b/src/content/reference/en/p5/createFileInput.mdx index c7b5bbb759..f89b4ace4f 100644 --- a/src/content/reference/en/p5/createFileInput.mdx +++ b/src/content/reference/en/p5/createFileInput.mdx @@ -24,6 +24,7 @@ description: > true, callback will be called once per file.

+isConstructor: false line: 1785 params: - name: callback diff --git a/src/content/reference/en/p5/createFilterShader.mdx b/src/content/reference/en/p5/createFilterShader.mdx index ca156e617c..e383d92baa 100644 --- a/src/content/reference/en/p5/createFilterShader.mdx +++ b/src/content/reference/en/p5/createFilterShader.mdx @@ -39,6 +39,7 @@ description: > or the introduction to shaders page.

+isConstructor: false line: 202 params: - name: fragSrc diff --git a/src/content/reference/en/p5/createFramebuffer.mdx b/src/content/reference/en/p5/createFramebuffer.mdx index d9aa0b2f44..9e9bfd07d6 100644 --- a/src/content/reference/en/p5/createFramebuffer.mdx +++ b/src/content/reference/en/p5/createFramebuffer.mdx @@ -65,6 +65,7 @@ description: > it will update to match the main canvas's size and density when the main canvas changes.

+isConstructor: false line: 306 params: - name: options @@ -73,6 +74,9 @@ params: type: Object optional: true itemtype: method +alt: |- + A red, green, and blue box (using normalMaterial) moves and rotates around + the canvas, leaving a trail behind it that slowly grows and fades away. class: p5 example: - |- @@ -117,9 +121,6 @@ example: } -alt: |- - A red, green, and blue box (using normalMaterial) moves and rotates around - the canvas, leaving a trail behind it that slowly grows and fades away. return: description: '' type: p5.Framebuffer diff --git a/src/content/reference/en/p5/createGraphics.mdx b/src/content/reference/en/p5/createGraphics.mdx index c851d2abef..d8890e9086 100644 --- a/src/content/reference/en/p5/createGraphics.mdx +++ b/src/content/reference/en/p5/createGraphics.mdx @@ -26,8 +26,10 @@ description: > By default this canvas will be hidden (offscreen buffer), to make visible, set element's style to display:block;

+isConstructor: false line: 243 itemtype: method +alt: 4 grey squares alternating light and dark grey. White quarter circle mid-left. class: p5 example: - |- @@ -50,7 +52,6 @@ example: } -alt: 4 grey squares alternating light and dark grey. White quarter circle mid-left. return: description: offscreen graphics buffer type: p5.Graphics diff --git a/src/content/reference/en/p5/createImage.mdx b/src/content/reference/en/p5/createImage.mdx index fa7f758623..e884e06f5d 100644 --- a/src/content/reference/en/p5/createImage.mdx +++ b/src/content/reference/en/p5/createImage.mdx @@ -28,6 +28,7 @@ description: > updatePixels() method must be called for updates to take effect.

+isConstructor: false line: 15 params: - name: width diff --git a/src/content/reference/en/p5/createImg.mdx b/src/content/reference/en/p5/createImg.mdx index 40a5b16fae..c97be8b58d 100644 --- a/src/content/reference/en/p5/createImg.mdx +++ b/src/content/reference/en/p5/createImg.mdx @@ -42,6 +42,7 @@ description: > call after the image loads. The new image is passed to the callback function as a p5.Element object.

+isConstructor: false line: 583 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/createInput.mdx b/src/content/reference/en/p5/createInput.mdx index 2d706273b2..4d5f9a9ec2 100644 --- a/src/content/reference/en/p5/createInput.mdx +++ b/src/content/reference/en/p5/createInput.mdx @@ -23,6 +23,7 @@ description: > target="_blank">list of options. The default is 'text'.

+isConstructor: false line: 1708 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/createNumberDict.mdx b/src/content/reference/en/p5/createNumberDict.mdx index 6db4a071dc..31c54364eb 100644 --- a/src/content/reference/en/p5/createNumberDict.mdx +++ b/src/content/reference/en/p5/createNumberDict.mdx @@ -7,6 +7,7 @@ description: >

Creates a new instance of p5.NumberDict using the key-value pair or object you provide.

+isConstructor: false line: 48 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/createP.mdx b/src/content/reference/en/p5/createP.mdx index d5b5797f55..4865925cd0 100644 --- a/src/content/reference/en/p5/createP.mdx +++ b/src/content/reference/en/p5/createP.mdx @@ -12,6 +12,7 @@ description: > the inner HTML of the new <p></p>.

+isConstructor: false line: 488 params: - name: html diff --git a/src/content/reference/en/p5/createRadio.mdx b/src/content/reference/en/p5/createRadio.mdx index a9fabb4eba..27aa5df119 100644 --- a/src/content/reference/en/p5/createRadio.mdx +++ b/src/content/reference/en/p5/createRadio.mdx @@ -51,6 +51,7 @@ description: > passed. +isConstructor: false line: 1323 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/createSelect.mdx b/src/content/reference/en/p5/createSelect.mdx index 9714b329dd..ce213e2b2f 100644 --- a/src/content/reference/en/p5/createSelect.mdx +++ b/src/content/reference/en/p5/createSelect.mdx @@ -55,6 +55,7 @@ description: >
  • mySelect.enable(option) marks a given option as enabled.
  • +isConstructor: false line: 1057 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/createShader.mdx b/src/content/reference/en/p5/createShader.mdx index 019327b02f..025ff5195d 100644 --- a/src/content/reference/en/p5/createShader.mdx +++ b/src/content/reference/en/p5/createShader.mdx @@ -14,6 +14,7 @@ description: > To ensure consistency in rendering, it's recommended to use the vertex shader shown in the example below.

    +isConstructor: false line: 115 params: - name: vertSrc @@ -25,6 +26,7 @@ params:

    source code for the fragment shader

    type: String itemtype: method +alt: 'zooming Mandelbrot set. a colorful, infinitely detailed fractal.' class: p5 example: - |- @@ -91,7 +93,6 @@ example: } -alt: 'zooming Mandelbrot set. a colorful, infinitely detailed fractal.' return: description: |- a shader object created from the provided diff --git a/src/content/reference/en/p5/createSlider.mdx b/src/content/reference/en/p5/createSlider.mdx index 36b1125af0..0024bd68cd 100644 --- a/src/content/reference/en/p5/createSlider.mdx +++ b/src/content/reference/en/p5/createSlider.mdx @@ -27,6 +27,7 @@ description: > allows the slider to move smoothly from min to max.

    +isConstructor: false line: 717 params: - name: min diff --git a/src/content/reference/en/p5/createSpan.mdx b/src/content/reference/en/p5/createSpan.mdx index 823465c9d1..d595c61dcb 100644 --- a/src/content/reference/en/p5/createSpan.mdx +++ b/src/content/reference/en/p5/createSpan.mdx @@ -18,6 +18,7 @@ description: > the inner HTML of the new <span></span>.

    +isConstructor: false line: 518 params: - name: html diff --git a/src/content/reference/en/p5/createStringDict.mdx b/src/content/reference/en/p5/createStringDict.mdx index 2837a16477..c833c8cbc9 100644 --- a/src/content/reference/en/p5/createStringDict.mdx +++ b/src/content/reference/en/p5/createStringDict.mdx @@ -6,6 +6,7 @@ file: src/data/p5.TypedDict.js description: |

    Creates a new instance of p5.StringDict using the key-value pair or the object you provide.

    +isConstructor: false line: 14 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/createVector.mdx b/src/content/reference/en/p5/createVector.mdx index 68c9c98f0e..5eced5aa0e 100644 --- a/src/content/reference/en/p5/createVector.mdx +++ b/src/content/reference/en/p5/createVector.mdx @@ -30,6 +30,7 @@ description: > pos.add(vel). Vector math relies on methods inside the p5.Vector class.

    +isConstructor: false line: 10 params: - name: x diff --git a/src/content/reference/en/p5/createVideo.mdx b/src/content/reference/en/p5/createVideo.mdx index bced829851..26755c532f 100644 --- a/src/content/reference/en/p5/createVideo.mdx +++ b/src/content/reference/en/p5/createVideo.mdx @@ -39,6 +39,7 @@ description: > to call once the video is ready to play.

    +isConstructor: false line: 1950 params: - name: src diff --git a/src/content/reference/en/p5/createWriter.mdx b/src/content/reference/en/p5/createWriter.mdx index 8ed4ca1d60..59534e706c 100644 --- a/src/content/reference/en/p5/createWriter.mdx +++ b/src/content/reference/en/p5/createWriter.mdx @@ -4,6 +4,7 @@ module: IO submodule: Output file: src/io/files.js description: '' +isConstructor: false line: 1143 params: - name: name diff --git a/src/content/reference/en/p5/cursor.mdx b/src/content/reference/en/p5/cursor.mdx index 3f2ec1b7a0..84f8caac2b 100644 --- a/src/content/reference/en/p5/cursor.mdx +++ b/src/content/reference/en/p5/cursor.mdx @@ -38,6 +38,7 @@ description: > and y must be less than the image's width and height, respectively.

    +isConstructor: false line: 193 params: - name: type diff --git a/src/content/reference/en/p5/curve.mdx b/src/content/reference/en/p5/curve.mdx index ea13302812..eedc6d56ad 100644 --- a/src/content/reference/en/p5/curve.mdx +++ b/src/content/reference/en/p5/curve.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 653 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/curveDetail.mdx b/src/content/reference/en/p5/curveDetail.mdx index 1cc19209fc..a08c6b0485 100644 --- a/src/content/reference/en/p5/curveDetail.mdx +++ b/src/content/reference/en/p5/curveDetail.mdx @@ -9,6 +9,7 @@ description: |

    This function is only useful when using the WEBGL renderer as the default canvas renderer does not use this information.

    +isConstructor: false line: 359 params: - name: resolution @@ -16,6 +17,7 @@ params:

    resolution of the curves

    type: Number itemtype: method +alt: white arch shape with a low level of curve detail. class: p5 example: - |- @@ -34,7 +36,6 @@ example: } -alt: white arch shape with a low level of curve detail. chainable: true --- diff --git a/src/content/reference/en/p5/curvePoint.mdx b/src/content/reference/en/p5/curvePoint.mdx index b7c1c838b8..0b4b54afba 100644 --- a/src/content/reference/en/p5/curvePoint.mdx +++ b/src/content/reference/en/p5/curvePoint.mdx @@ -9,6 +9,7 @@ description: | of the curve, and b and c are the start and end points of the curve. This can be done once with the x coordinates and a second time with the y coordinates to get the location of a curve at t.

    +isConstructor: false line: 445 params: - name: a diff --git a/src/content/reference/en/p5/curveTangent.mdx b/src/content/reference/en/p5/curveTangent.mdx index 10e3718a0c..41f20db6fc 100644 --- a/src/content/reference/en/p5/curveTangent.mdx +++ b/src/content/reference/en/p5/curveTangent.mdx @@ -7,6 +7,7 @@ description: |

    Evaluates the tangent to the curve at position t for points a, b, c, d. The parameter t varies between 0 and 1, a and d are points on the curve, and b and c are the control points.

    +isConstructor: false line: 494 params: - name: a @@ -30,6 +31,7 @@ params:

    value between 0 and 1

    type: Number itemtype: method +alt: right curving line mid-right of canvas with 7 short lines radiating from it. class: p5 example: - |- @@ -52,7 +54,6 @@ example: } -alt: right curving line mid-right of canvas with 7 short lines radiating from it. return: description: the tangent at position t type: Number diff --git a/src/content/reference/en/p5/curveTightness.mdx b/src/content/reference/en/p5/curveTightness.mdx index af27c21512..afbe906a6a 100644 --- a/src/content/reference/en/p5/curveTightness.mdx +++ b/src/content/reference/en/p5/curveTightness.mdx @@ -18,6 +18,7 @@ description: > them recognizable and as values increase in magnitude, they will continue to deform.

    +isConstructor: false line: 399 params: - name: amount @@ -25,6 +26,7 @@ params:

    amount of deformation from the original vertices

    type: Number itemtype: method +alt: 'Line shaped like right-facing arrow,points move with mouse-x and warp shape.' class: p5 example: - |- @@ -52,7 +54,6 @@ example: } -alt: 'Line shaped like right-facing arrow,points move with mouse-x and warp shape.' chainable: true --- diff --git a/src/content/reference/en/p5/curveVertex.mdx b/src/content/reference/en/p5/curveVertex.mdx index 68816e813b..edcb826f48 100644 --- a/src/content/reference/en/p5/curveVertex.mdx +++ b/src/content/reference/en/p5/curveVertex.mdx @@ -29,8 +29,10 @@ description: > curveVertex() function is an implementation of Catmull-Rom splines.

    +isConstructor: false line: 419 itemtype: method +alt: 'Upside-down u-shape line, mid canvas. left point extends beyond canvas view.' class: p5 example: - |- @@ -55,7 +57,6 @@ example: endShape(); -alt: 'Upside-down u-shape line, mid canvas. left point extends beyond canvas view.' chainable: true --- diff --git a/src/content/reference/en/p5/cylinder.mdx b/src/content/reference/en/p5/cylinder.mdx index e37a698611..cc7a7a1c62 100644 --- a/src/content/reference/en/p5/cylinder.mdx +++ b/src/content/reference/en/p5/cylinder.mdx @@ -15,6 +15,7 @@ description: > The recommended maximum value for detailX is 24. Using a value greater than 24 may cause a warning or slow down the browser.

    +isConstructor: false line: 600 params: - name: radius diff --git a/src/content/reference/en/p5/day.mdx b/src/content/reference/en/p5/day.mdx index 3dd98ab954..380ad527aa 100644 --- a/src/content/reference/en/p5/day.mdx +++ b/src/content/reference/en/p5/day.mdx @@ -8,6 +8,7 @@ description: > href="#/p5/day">day() function returns the current day as a value from 1 - 31.

    +isConstructor: false line: 10 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/debugMode.mdx b/src/content/reference/en/p5/debugMode.mdx index 4f91b49446..09488698f9 100644 --- a/src/content/reference/en/p5/debugMode.mdx +++ b/src/content/reference/en/p5/debugMode.mdx @@ -32,8 +32,13 @@ description: > grid runs parallel to the default camera view, it is often helpful to use debugMode along with orbitControl to allow full view of the grid.

    +isConstructor: false line: 378 itemtype: method +alt: |- + a 3D box is centered on a grid in a 3D sketch. an icon + indicates the direction of each axis: a red line points +X, + a green line +Y, and a blue line +Z. class: p5 example: - |- @@ -150,10 +155,6 @@ example: } -alt: |- - a 3D box is centered on a grid in a 3D sketch. an icon - indicates the direction of each axis: a red line points +X, - a green line +Y, and a blue line +Z. chainable: false --- diff --git a/src/content/reference/en/p5/deltaTime.mdx b/src/content/reference/en/p5/deltaTime.mdx index 508f2e758f..811352debd 100644 --- a/src/content/reference/en/p5/deltaTime.mdx +++ b/src/content/reference/en/p5/deltaTime.mdx @@ -10,6 +10,7 @@ description: > deltaTime is useful for simulating physics.

    +isConstructor: false line: 119 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/describe.mdx b/src/content/reference/en/p5/describe.mdx index c431f2f797..31f3c6472f 100644 --- a/src/content/reference/en/p5/describe.mdx +++ b/src/content/reference/en/p5/describe.mdx @@ -29,6 +29,7 @@ description: > How to label your p5.js code to learn more about making sketches accessible.

    +isConstructor: false line: 18 params: - name: text diff --git a/src/content/reference/en/p5/describeElement.mdx b/src/content/reference/en/p5/describeElement.mdx index 631fc7f3d1..a17be1ac2a 100644 --- a/src/content/reference/en/p5/describeElement.mdx +++ b/src/content/reference/en/p5/describeElement.mdx @@ -38,6 +38,7 @@ description: > How to label your p5.js code to learn more about making sketches accessible.

    +isConstructor: false line: 162 params: - name: name diff --git a/src/content/reference/en/p5/deviceMoved.mdx b/src/content/reference/en/p5/deviceMoved.mdx index ff7c3b5f0b..038b948d1d 100644 --- a/src/content/reference/en/p5/deviceMoved.mdx +++ b/src/content/reference/en/p5/deviceMoved.mdx @@ -11,6 +11,7 @@ description: > The threshold value can be changed using setMoveThreshold().

    +isConstructor: false line: 501 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/deviceOrientation.mdx b/src/content/reference/en/p5/deviceOrientation.mdx index 4940d41846..57e4a74260 100644 --- a/src/content/reference/en/p5/deviceOrientation.mdx +++ b/src/content/reference/en/p5/deviceOrientation.mdx @@ -8,6 +8,7 @@ description: | the device. The value of this variable will either be set 'landscape' or 'portrait'. If no data is available it will be set to 'undefined'. either LANDSCAPE or PORTRAIT.

    +isConstructor: false line: 11 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/deviceShaken.mdx b/src/content/reference/en/p5/deviceShaken.mdx index 2b80ccd383..8f89d21569 100644 --- a/src/content/reference/en/p5/deviceShaken.mdx +++ b/src/content/reference/en/p5/deviceShaken.mdx @@ -13,6 +13,7 @@ description: > The threshold value can be changed using setShakeThreshold().

    +isConstructor: false line: 589 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/deviceTurned.mdx b/src/content/reference/en/p5/deviceTurned.mdx index d1433def2c..5d8a0504a5 100644 --- a/src/content/reference/en/p5/deviceTurned.mdx +++ b/src/content/reference/en/p5/deviceTurned.mdx @@ -16,6 +16,7 @@ description: > locked to trigger on any axis: X, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.

    +isConstructor: false line: 531 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/directionalLight.mdx b/src/content/reference/en/p5/directionalLight.mdx index e912a8068c..17c702518f 100644 --- a/src/content/reference/en/p5/directionalLight.mdx +++ b/src/content/reference/en/p5/directionalLight.mdx @@ -34,8 +34,12 @@ description: > Placing them in setup() will cause them to only have an effect the first time through the loop.

    +isConstructor: false line: 246 itemtype: method +alt: |- + scene with sphere and directional light. The direction of + the light is controlled with the mouse position. class: p5 example: - |- @@ -59,9 +63,6 @@ example: } -alt: |- - scene with sphere and directional light. The direction of - the light is controlled with the mouse position. chainable: true --- diff --git a/src/content/reference/en/p5/disableFriendlyErrors.mdx b/src/content/reference/en/p5/disableFriendlyErrors.mdx index 1a58e0a851..1b60d0df65 100644 --- a/src/content/reference/en/p5/disableFriendlyErrors.mdx +++ b/src/content/reference/en/p5/disableFriendlyErrors.mdx @@ -22,6 +22,7 @@ description: > href='https://github.com/processing/p5.js/wiki/Optimizing-p5.js-Code-for-Performance#disable-the-friendly-error-system-fes'> disabling the friendly error system.

    +isConstructor: false line: 750 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/displayDensity.mdx b/src/content/reference/en/p5/displayDensity.mdx index 9765042494..ec64fa1c8e 100644 --- a/src/content/reference/en/p5/displayDensity.mdx +++ b/src/content/reference/en/p5/displayDensity.mdx @@ -5,6 +5,7 @@ submodule: Environment file: src/core/environment.js description: |

    Returns the display's current pixel density.

    +isConstructor: false line: 1010 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/displayHeight.mdx b/src/content/reference/en/p5/displayHeight.mdx index 6e9b2a57ed..98d9929f9e 100644 --- a/src/content/reference/en/p5/displayHeight.mdx +++ b/src/content/reference/en/p5/displayHeight.mdx @@ -9,8 +9,10 @@ description: | displayHeight is useful for running full-screen programs.

    Note: The actual screen height can be computed as displayHeight * pixelDensity().

    +isConstructor: false line: 577 itemtype: property +alt: This example does not render anything. class: p5 example: - |- @@ -28,7 +30,6 @@ example: } -alt: This example does not render anything. chainable: false --- diff --git a/src/content/reference/en/p5/displayWidth.mdx b/src/content/reference/en/p5/displayWidth.mdx index c32e4c03e5..9baf54c5a9 100644 --- a/src/content/reference/en/p5/displayWidth.mdx +++ b/src/content/reference/en/p5/displayWidth.mdx @@ -9,8 +9,10 @@ description: | displayWidth is useful for running full-screen programs.

    Note: The actual screen width can be computed as displayWidth * pixelDensity().

    +isConstructor: false line: 547 itemtype: property +alt: This example does not render anything. class: p5 example: - |- @@ -28,7 +30,6 @@ example: } -alt: This example does not render anything. chainable: false --- diff --git a/src/content/reference/en/p5/dist.mdx b/src/content/reference/en/p5/dist.mdx index abd9ca6e4a..b91b3bcce3 100644 --- a/src/content/reference/en/p5/dist.mdx +++ b/src/content/reference/en/p5/dist.mdx @@ -19,6 +19,7 @@ description: >

    Use p5.Vector.dist() to calculate the distance between two p5.Vector objects.

    +isConstructor: false line: 124 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/doubleClicked.mdx b/src/content/reference/en/p5/doubleClicked.mdx index 6726ef464e..d36a3067e5 100644 --- a/src/content/reference/en/p5/doubleClicked.mdx +++ b/src/content/reference/en/p5/doubleClicked.mdx @@ -19,6 +19,7 @@ description: > https://developer.mozilla.org/en-US/docs/Web/Events/dblclick

    +isConstructor: false line: 826 params: - name: event diff --git a/src/content/reference/en/p5/draw.mdx b/src/content/reference/en/p5/draw.mdx index 6da59c423e..9d4b10692e 100644 --- a/src/content/reference/en/p5/draw.mdx +++ b/src/content/reference/en/p5/draw.mdx @@ -59,8 +59,10 @@ description: > over time. On the other hand, styling applied (ex: fill, stroke, etc) will remain in effect.

    +isConstructor: false line: 113 itemtype: method +alt: nothing displayed class: p5 example: - |- @@ -81,7 +83,6 @@ example: line(0, yPos, width, yPos); } -alt: nothing displayed chainable: false --- diff --git a/src/content/reference/en/p5/drawingContext.mdx b/src/content/reference/en/p5/drawingContext.mdx index 72082b0ef0..5da9aa71b1 100644 --- a/src/content/reference/en/p5/drawingContext.mdx +++ b/src/content/reference/en/p5/drawingContext.mdx @@ -23,8 +23,10 @@ description: > reference for the native canvas API for possible drawing functions you can call.

    +isConstructor: false line: 535 itemtype: property +alt: white ellipse with shadow blur effect around edges class: p5 example: - |- @@ -41,7 +43,6 @@ example: } -alt: white ellipse with shadow blur effect around edges chainable: false --- diff --git a/src/content/reference/en/p5/ellipse.mdx b/src/content/reference/en/p5/ellipse.mdx index 71aa12d106..67657ea35b 100644 --- a/src/content/reference/en/p5/ellipse.mdx +++ b/src/content/reference/en/p5/ellipse.mdx @@ -21,6 +21,7 @@ description: > height. If a negative height or width is specified, the absolute value is taken.

    +isConstructor: false line: 231 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/ellipseMode.mdx b/src/content/reference/en/p5/ellipseMode.mdx index 1ce83b9c86..ff52fe9a85 100644 --- a/src/content/reference/en/p5/ellipseMode.mdx +++ b/src/content/reference/en/p5/ellipseMode.mdx @@ -42,6 +42,7 @@ description: > CORNERS are defined this way. JavaScript is a case-sensitive language.

    +isConstructor: false line: 12 params: - name: mode diff --git a/src/content/reference/en/p5/ellipsoid.mdx b/src/content/reference/en/p5/ellipsoid.mdx index 91bdc2386f..4638114348 100644 --- a/src/content/reference/en/p5/ellipsoid.mdx +++ b/src/content/reference/en/p5/ellipsoid.mdx @@ -13,6 +13,7 @@ description: > smoother. Avoid detail number above 150, it may crash the browser.

    +isConstructor: false line: 864 params: - name: radiusx diff --git a/src/content/reference/en/p5/emissiveMaterial.mdx b/src/content/reference/en/p5/emissiveMaterial.mdx index c0803e0941..281433e6d3 100644 --- a/src/content/reference/en/p5/emissiveMaterial.mdx +++ b/src/content/reference/en/p5/emissiveMaterial.mdx @@ -12,8 +12,10 @@ description: | does not actually emit light that will affect surrounding objects.

    You can view more materials in this example.

    +isConstructor: false line: 982 itemtype: method +alt: sphere with green emissive material class: p5 example: - |- @@ -33,7 +35,6 @@ example: } -alt: sphere with green emissive material chainable: true --- diff --git a/src/content/reference/en/p5/endClip.mdx b/src/content/reference/en/p5/endClip.mdx index 0d4bfd2805..40919a3ce0 100644 --- a/src/content/reference/en/p5/endClip.mdx +++ b/src/content/reference/en/p5/endClip.mdx @@ -12,6 +12,7 @@ description: > Any shapes drawn between beginClip() and this will contribute to the mask shape.

    +isConstructor: false line: 108 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/endContour.mdx b/src/content/reference/en/p5/endContour.mdx index a1e4d6c978..884ff78c4c 100644 --- a/src/content/reference/en/p5/endContour.mdx +++ b/src/content/reference/en/p5/endContour.mdx @@ -34,8 +34,10 @@ description: > other shapes, such as ellipse() or rect() within.

    +isConstructor: false line: 528 itemtype: method +alt: white rect and smaller grey rect with red outlines in center of canvas. class: p5 example: - |- @@ -60,7 +62,6 @@ example: endShape(CLOSE); -alt: white rect and smaller grey rect with red outlines in center of canvas. chainable: true --- diff --git a/src/content/reference/en/p5/endGeometry.mdx b/src/content/reference/en/p5/endGeometry.mdx index f810ee7cb7..f09043f4e0 100644 --- a/src/content/reference/en/p5/endGeometry.mdx +++ b/src/content/reference/en/p5/endGeometry.mdx @@ -8,6 +8,7 @@ description: | started using beginGeometry(). One can also use buildGeometry() to pass a function that draws shapes.

    +isConstructor: false line: 89 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/endShape.mdx b/src/content/reference/en/p5/endShape.mdx index 54a04659be..13c9809951 100644 --- a/src/content/reference/en/p5/endShape.mdx +++ b/src/content/reference/en/p5/endShape.mdx @@ -37,6 +37,7 @@ description: > or by working from the example on this page.

    +isConstructor: false line: 591 params: - name: mode @@ -51,6 +52,7 @@ params: type: Integer optional: true itemtype: method +alt: Triangle line shape with smallest interior angle on bottom and upside-down L. class: p5 example: - |- @@ -151,7 +153,6 @@ example: } -alt: Triangle line shape with smallest interior angle on bottom and upside-down L. chainable: true --- diff --git a/src/content/reference/en/p5/erase.mdx b/src/content/reference/en/p5/erase.mdx index 98cfadbd2f..ef83498b6a 100644 --- a/src/content/reference/en/p5/erase.mdx +++ b/src/content/reference/en/p5/erase.mdx @@ -45,6 +45,7 @@ description: > image() and background() functions.

    +isConstructor: false line: 1005 params: - name: strengthFill diff --git a/src/content/reference/en/p5/exitPointerLock.mdx b/src/content/reference/en/p5/exitPointerLock.mdx index 532521e7c1..c5c9a430d1 100644 --- a/src/content/reference/en/p5/exitPointerLock.mdx +++ b/src/content/reference/en/p5/exitPointerLock.mdx @@ -10,6 +10,7 @@ description: > Lock for example to make ui elements usable etc

    +isConstructor: false line: 1005 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/exp.mdx b/src/content/reference/en/p5/exp.mdx index 2a6c9f9a2a..a23b848eec 100644 --- a/src/content/reference/en/p5/exp.mdx +++ b/src/content/reference/en/p5/exp.mdx @@ -8,6 +8,7 @@ description: > n parameter.

    +isConstructor: false line: 184 params: - name: 'n' diff --git a/src/content/reference/en/p5/fill.mdx b/src/content/reference/en/p5/fill.mdx index 5dfc98602f..b961e750f4 100644 --- a/src/content/reference/en/p5/fill.mdx +++ b/src/content/reference/en/p5/fill.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 665 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/filter.mdx b/src/content/reference/en/p5/filter.mdx index af9cd55b0e..681379e19e 100644 --- a/src/content/reference/en/p5/filter.mdx +++ b/src/content/reference/en/p5/filter.mdx @@ -69,6 +69,7 @@ description: > createFilterShader() for more information.

    +isConstructor: false line: 343 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/floor.mdx b/src/content/reference/en/p5/floor.mdx index 43c4dee61f..d4f55dbcd6 100644 --- a/src/content/reference/en/p5/floor.mdx +++ b/src/content/reference/en/p5/floor.mdx @@ -6,6 +6,7 @@ file: src/math/calculation.js description: |

    Calculates the closest integer value that is less than or equal to the value of the n parameter.

    +isConstructor: false line: 210 params: - name: 'n' diff --git a/src/content/reference/en/p5/focused.mdx b/src/content/reference/en/p5/focused.mdx index 0419236538..a8ae9ce9aa 100644 --- a/src/content/reference/en/p5/focused.mdx +++ b/src/content/reference/en/p5/focused.mdx @@ -8,6 +8,7 @@ description: > focused is true if the window if focused and false if not.

    +isConstructor: false line: 164 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/for.mdx b/src/content/reference/en/p5/for.mdx index 37c74fd609..7d0d26d518 100644 --- a/src/content/reference/en/p5/for.mdx +++ b/src/content/reference/en/p5/for.mdx @@ -54,8 +54,10 @@ description: > The condition is evaluated after executing the statement, resulting in the specified statement executing at least once.

    +isConstructor: false line: 408 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -67,7 +69,6 @@ example: } -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/fract.mdx b/src/content/reference/en/p5/fract.mdx index 6e94fd2eeb..c4a0608681 100644 --- a/src/content/reference/en/p5/fract.mdx +++ b/src/content/reference/en/p5/fract.mdx @@ -6,6 +6,7 @@ file: src/math/calculation.js description: |

    Calculates the fractional part of a number. For example, fract(12.34) returns 0.34.

    +isConstructor: false line: 730 params: - name: 'n' diff --git a/src/content/reference/en/p5/frameCount.mdx b/src/content/reference/en/p5/frameCount.mdx index 315bf7dd82..262739a1f2 100644 --- a/src/content/reference/en/p5/frameCount.mdx +++ b/src/content/reference/en/p5/frameCount.mdx @@ -12,6 +12,7 @@ description: > increments by 1 each time the code in draw() finishes executing.

    +isConstructor: false line: 69 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/frameRate.mdx b/src/content/reference/en/p5/frameRate.mdx index 679be95c79..d18d05c35b 100644 --- a/src/content/reference/en/p5/frameRate.mdx +++ b/src/content/reference/en/p5/frameRate.mdx @@ -21,6 +21,7 @@ description: > frame rate. The value returned is an approximation.

    +isConstructor: false line: 302 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/freeGeometry.mdx b/src/content/reference/en/p5/freeGeometry.mdx index befe74eb71..7dc1ccad93 100644 --- a/src/content/reference/en/p5/freeGeometry.mdx +++ b/src/content/reference/en/p5/freeGeometry.mdx @@ -10,6 +10,7 @@ description: |

    This method works on models generated with buildGeometry() as well as those loaded from loadModel().

    +isConstructor: false line: 167 params: - name: geometry diff --git a/src/content/reference/en/p5/freqToMidi.mdx b/src/content/reference/en/p5/freqToMidi.mdx index 3368b2292b..eb852b5b45 100644 --- a/src/content/reference/en/p5/freqToMidi.mdx +++ b/src/content/reference/en/p5/freqToMidi.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

    Returns the closest MIDI note value for a given frequency.

    +isConstructor: false line: 825 params: - name: frequency diff --git a/src/content/reference/en/p5/frustum.mdx b/src/content/reference/en/p5/frustum.mdx index c136615e60..9b8aacb8c2 100644 --- a/src/content/reference/en/p5/frustum.mdx +++ b/src/content/reference/en/p5/frustum.mdx @@ -18,6 +18,7 @@ description: |

    If no parameters are given, the following default is used: frustum(-width/20, width/20, height/20, -height/20, eyeZ/10, eyeZ*10), where eyeZ is equal to 800.

    +isConstructor: false line: 259 params: - name: left @@ -51,6 +52,9 @@ params: type: Number optional: true itemtype: method +alt: >- + two 3D boxes move back and forth along same plane, rotating as mouse is + dragged. class: p5 example: - |- @@ -84,9 +88,6 @@ example: } -alt: >- - two 3D boxes move back and forth along same plane, rotating as mouse is - dragged. chainable: true --- diff --git a/src/content/reference/en/p5/fullscreen.mdx b/src/content/reference/en/p5/fullscreen.mdx index 04f51f8bd6..7bc52e5a30 100644 --- a/src/content/reference/en/p5/fullscreen.mdx +++ b/src/content/reference/en/p5/fullscreen.mdx @@ -19,6 +19,7 @@ description: > called with user input such as a mouse press.

    +isConstructor: false line: 888 params: - name: val diff --git a/src/content/reference/en/p5/function.mdx b/src/content/reference/en/p5/function.mdx index a745b25aab..00f8a3383c 100644 --- a/src/content/reference/en/p5/function.mdx +++ b/src/content/reference/en/p5/function.mdx @@ -24,8 +24,10 @@ description: > MDN entry: Declares a function with the specified parameters.

    +isConstructor: false line: 231 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -46,7 +48,6 @@ example: console.log(square(5)); -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/get.mdx b/src/content/reference/en/p5/get.mdx index 7d761ca9a2..41523807f9 100644 --- a/src/content/reference/en/p5/get.mdx +++ b/src/content/reference/en/p5/get.mdx @@ -36,6 +36,7 @@ description: >

    Use p5.Image.get() to work directly with p5.Image objects.

    +isConstructor: false line: 665 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/getAudioContext.mdx b/src/content/reference/en/p5/getAudioContext.mdx index 95cb06ae05..9f393a805f 100644 --- a/src/content/reference/en/p5/getAudioContext.mdx +++ b/src/content/reference/en/p5/getAudioContext.mdx @@ -11,6 +11,7 @@ description: |-

    Some browsers require users to startAudioContext with a user gesture, such as touchStarted in the example below.

    +isConstructor: false line: 159 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/getItem.mdx b/src/content/reference/en/p5/getItem.mdx index 3ea4b50809..6f387fae5b 100644 --- a/src/content/reference/en/p5/getItem.mdx +++ b/src/content/reference/en/p5/getItem.mdx @@ -6,6 +6,7 @@ file: src/data/local_storage.js description: |

    Returns the value of an item that was stored in local storage using storeItem()

    +isConstructor: false line: 99 params: - name: key diff --git a/src/content/reference/en/p5/getOutputVolume.mdx b/src/content/reference/en/p5/getOutputVolume.mdx index 0968f35d94..a50a50ddd1 100644 --- a/src/content/reference/en/p5/getOutputVolume.mdx +++ b/src/content/reference/en/p5/getOutputVolume.mdx @@ -6,6 +6,7 @@ file: lib/addons/p5.sound.js description: |

    Returns a number representing the output volume for sound in this sketch.

    +isConstructor: false line: 726 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/getTargetFrameRate.mdx b/src/content/reference/en/p5/getTargetFrameRate.mdx index 3ccb549d85..9bd03d185c 100644 --- a/src/content/reference/en/p5/getTargetFrameRate.mdx +++ b/src/content/reference/en/p5/getTargetFrameRate.mdx @@ -6,6 +6,7 @@ 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 frameRate().

    +isConstructor: false line: 411 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/getURL.mdx b/src/content/reference/en/p5/getURL.mdx index f598258960..f005bcdbd3 100644 --- a/src/content/reference/en/p5/getURL.mdx +++ b/src/content/reference/en/p5/getURL.mdx @@ -11,6 +11,7 @@ description: > target="_blank">URL as a string.

    +isConstructor: false line: 1081 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/getURLParams.mdx b/src/content/reference/en/p5/getURLParams.mdx index 94b582f272..9703dfa973 100644 --- a/src/content/reference/en/p5/getURLParams.mdx +++ b/src/content/reference/en/p5/getURLParams.mdx @@ -18,8 +18,10 @@ description: > http://p5js.org?year=2014&month=May&day=15 returns { year: 2014, month: 'May', day: 15 }.

    +isConstructor: false line: 1140 itemtype: method +alt: This example does not render anything. class: p5 example: - |- @@ -44,7 +46,6 @@ example: } -alt: This example does not render anything. return: description: URL params type: Object diff --git a/src/content/reference/en/p5/getURLPath.mdx b/src/content/reference/en/p5/getURLPath.mdx index 27e533eaf6..1fe62669c6 100644 --- a/src/content/reference/en/p5/getURLPath.mdx +++ b/src/content/reference/en/p5/getURLPath.mdx @@ -23,6 +23,7 @@ description: > returns ['sketchbook', 'monday'].

    +isConstructor: false line: 1107 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/green.mdx b/src/content/reference/en/p5/green.mdx index f0c2c7294e..2cf270a78a 100644 --- a/src/content/reference/en/p5/green.mdx +++ b/src/content/reference/en/p5/green.mdx @@ -6,6 +6,7 @@ file: src/color/creating_reading.js description: |

    Extracts the green value from a p5.Color object, array of color components, or CSS color string.

    +isConstructor: false line: 303 params: - name: color diff --git a/src/content/reference/en/p5/gridOutput.mdx b/src/content/reference/en/p5/gridOutput.mdx index a44a3d2733..5d3363a5f8 100644 --- a/src/content/reference/en/p5/gridOutput.mdx +++ b/src/content/reference/en/p5/gridOutput.mdx @@ -63,6 +63,7 @@ description: > How to label your p5.js code to learn more about making sketches accessible.

    +isConstructor: false line: 145 params: - name: display diff --git a/src/content/reference/en/p5/height.mdx b/src/content/reference/en/p5/height.mdx index eb0fa4004e..222db1d77b 100644 --- a/src/content/reference/en/p5/height.mdx +++ b/src/content/reference/en/p5/height.mdx @@ -16,6 +16,7 @@ description: > value to 0.

    +isConstructor: false line: 819 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/hex.mdx b/src/content/reference/en/p5/hex.mdx index 8419b87a20..fb62ec2374 100644 --- a/src/content/reference/en/p5/hex.mdx +++ b/src/content/reference/en/p5/hex.mdx @@ -8,6 +8,7 @@ description: | second parameter is passed, it is used to set the number of characters to generate in the hexadecimal notation. When an array is passed in, an array of strings in hexadecimal notation of the same length is returned.

    +isConstructor: false line: 243 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/hour.mdx b/src/content/reference/en/p5/hour.mdx index 002982042c..5d88b04dfc 100644 --- a/src/content/reference/en/p5/hour.mdx +++ b/src/content/reference/en/p5/hour.mdx @@ -8,6 +8,7 @@ description: > href="#/p5/hour">hour() function returns the current hour as a value from 0 - 23.

    +isConstructor: false line: 29 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/httpDo.mdx b/src/content/reference/en/p5/httpDo.mdx index 40421caff4..1b917c022e 100644 --- a/src/content/reference/en/p5/httpDo.mdx +++ b/src/content/reference/en/p5/httpDo.mdx @@ -16,6 +16,7 @@ description: > This method is suitable for fetching files up to size of 64MB when "GET" is used.

    +isConstructor: false line: 907 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/httpGet.mdx b/src/content/reference/en/p5/httpGet.mdx index 170d973d00..9fecbc02a0 100644 --- a/src/content/reference/en/p5/httpGet.mdx +++ b/src/content/reference/en/p5/httpGet.mdx @@ -14,6 +14,7 @@ description: > a Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer which can be used to initialize typed arrays (such as Uint8Array).

    +isConstructor: false line: 740 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/httpPost.mdx b/src/content/reference/en/p5/httpPost.mdx index 547ac37392..791eff842b 100644 --- a/src/content/reference/en/p5/httpPost.mdx +++ b/src/content/reference/en/p5/httpPost.mdx @@ -10,6 +10,7 @@ description: > to calling httpDo(path, 'POST').

    +isConstructor: false line: 817 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/hue.mdx b/src/content/reference/en/p5/hue.mdx index bd0b800996..4e723261e6 100644 --- a/src/content/reference/en/p5/hue.mdx +++ b/src/content/reference/en/p5/hue.mdx @@ -11,6 +11,7 @@ description: | color wheel. By default, this function returns the HSL-normalized hue. If the colorMode() is set to HSB, it returns the HSB-normalized hue.

    +isConstructor: false line: 330 params: - name: color diff --git a/src/content/reference/en/p5/if-else.mdx b/src/content/reference/en/p5/if-else.mdx index dce846eb4c..80b9271cc6 100644 --- a/src/content/reference/en/p5/if-else.mdx +++ b/src/content/reference/en/p5/if-else.mdx @@ -28,8 +28,10 @@ description: > The 'if' statement executes a statement if a specified condition is truthy. If the condition is falsy, another statement can be executed

    +isConstructor: false line: 200 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -44,7 +46,6 @@ example: } -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/imageLight.mdx b/src/content/reference/en/p5/imageLight.mdx index c21cc6b813..e1ed5ae4e6 100644 --- a/src/content/reference/en/p5/imageLight.mdx +++ b/src/content/reference/en/p5/imageLight.mdx @@ -19,6 +19,7 @@ description: |

    Note: The image's diffuse light will be affected by fill() and the specular reflections will be affected by specularMaterial() and shininess().

    +isConstructor: false line: 497 params: - name: img @@ -26,6 +27,7 @@ params:

    image for the background

    type: p5.image itemtype: method +alt: light with slider having a slider for varying roughness class: p5 example: - |- @@ -102,7 +104,6 @@ example: } -alt: light with slider having a slider for varying roughness chainable: false --- diff --git a/src/content/reference/en/p5/imageMode.mdx b/src/content/reference/en/p5/imageMode.mdx index 88ca06a6fb..8337b5a988 100644 --- a/src/content/reference/en/p5/imageMode.mdx +++ b/src/content/reference/en/p5/imageMode.mdx @@ -30,6 +30,7 @@ description: > image() as the x- and y-coordinates of the image's center. The next parameters are its width and height.

    +isConstructor: false line: 1262 params: - name: mode diff --git a/src/content/reference/en/p5/input.mdx b/src/content/reference/en/p5/input.mdx index d5c9462996..05c2b6f925 100644 --- a/src/content/reference/en/p5/input.mdx +++ b/src/content/reference/en/p5/input.mdx @@ -13,6 +13,7 @@ description: > the function.

    +isConstructor: false line: 371 params: - name: fxn diff --git a/src/content/reference/en/p5/int.mdx b/src/content/reference/en/p5/int.mdx index 5775011b7c..97f90fb7de 100644 --- a/src/content/reference/en/p5/int.mdx +++ b/src/content/reference/en/p5/int.mdx @@ -7,6 +7,7 @@ description: |

    Converts a boolean, string, or float to its integer representation. When an array of values is passed in, then an int array of the same length is returned.

    +isConstructor: false line: 42 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/isLooping.mdx b/src/content/reference/en/p5/isLooping.mdx index 178fc67393..b15ae5fdba 100644 --- a/src/content/reference/en/p5/isLooping.mdx +++ b/src/content/reference/en/p5/isLooping.mdx @@ -14,8 +14,12 @@ description: > isLooping() returns the current state for use within custom event handlers.

    +isConstructor: false line: 133 itemtype: method +alt: |- + Ellipse moves slowly from left. Checkbox toggles loop()/noLoop(). + Button colorizes sketch if isLooping(). class: p5 example: - |- @@ -60,9 +64,6 @@ example: } -alt: |- - Ellipse moves slowly from left. Checkbox toggles loop()/noLoop(). - Button colorizes sketch if isLooping(). return: description: '' type: Boolean diff --git a/src/content/reference/en/p5/join.mdx b/src/content/reference/en/p5/join.mdx index 8e785f20f0..432259d00f 100644 --- a/src/content/reference/en/p5/join.mdx +++ b/src/content/reference/en/p5/join.mdx @@ -12,6 +12,7 @@ description: > href="#/p5/nf">nf() or nfs().

    +isConstructor: false line: 15 params: - name: list diff --git a/src/content/reference/en/p5/key.mdx b/src/content/reference/en/p5/key.mdx index 35cc463d17..68cb95de24 100644 --- a/src/content/reference/en/p5/key.mdx +++ b/src/content/reference/en/p5/key.mdx @@ -12,6 +12,7 @@ description: > keys, use the keyCode variable.

    +isConstructor: false line: 34 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/keyCode.mdx b/src/content/reference/en/p5/keyCode.mdx index f81dfca8d4..bd4726752e 100644 --- a/src/content/reference/en/p5/keyCode.mdx +++ b/src/content/reference/en/p5/keyCode.mdx @@ -9,6 +9,7 @@ description: | DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW. You can also check for custom keys by looking up the keyCode of any key on a site like this: keycode.info.

    +isConstructor: false line: 60 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/keyIsDown.mdx b/src/content/reference/en/p5/keyIsDown.mdx index 2ae01f5e58..ecd6a020c3 100644 --- a/src/content/reference/en/p5/keyIsDown.mdx +++ b/src/content/reference/en/p5/keyIsDown.mdx @@ -17,6 +17,7 @@ description: > listed here.

    +isConstructor: false line: 301 params: - name: code diff --git a/src/content/reference/en/p5/keyIsPressed.mdx b/src/content/reference/en/p5/keyIsPressed.mdx index ef7a2c4449..27fa2b5f5d 100644 --- a/src/content/reference/en/p5/keyIsPressed.mdx +++ b/src/content/reference/en/p5/keyIsPressed.mdx @@ -8,6 +8,7 @@ description: > true if any key is pressed and false if no keys are pressed.

    +isConstructor: false line: 10 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/keyPressed.mdx b/src/content/reference/en/p5/keyPressed.mdx index 2fc2b9f9bc..2fa357deea 100644 --- a/src/content/reference/en/p5/keyPressed.mdx +++ b/src/content/reference/en/p5/keyPressed.mdx @@ -40,6 +40,7 @@ description: > behaviors attached to various key events. To prevent any default behavior for this event, add "return false" to the end of the method.

    +isConstructor: false line: 98 params: - name: event diff --git a/src/content/reference/en/p5/keyReleased.mdx b/src/content/reference/en/p5/keyReleased.mdx index 71557b4824..baa49cff84 100644 --- a/src/content/reference/en/p5/keyReleased.mdx +++ b/src/content/reference/en/p5/keyReleased.mdx @@ -15,6 +15,7 @@ description: > behaviors attached to various key events. To prevent any default behavior for this event, add "return false" to the end of the function.

    +isConstructor: false line: 185 params: - name: event diff --git a/src/content/reference/en/p5/keyTyped.mdx b/src/content/reference/en/p5/keyTyped.mdx index a8a3e516b2..aa7551fd42 100644 --- a/src/content/reference/en/p5/keyTyped.mdx +++ b/src/content/reference/en/p5/keyTyped.mdx @@ -29,6 +29,7 @@ description: > events. To prevent any default behavior for this event, add "return false" to the end of the function.

    +isConstructor: false line: 237 params: - name: event diff --git a/src/content/reference/en/p5/lerp.mdx b/src/content/reference/en/p5/lerp.mdx index 242468189d..adb8903781 100644 --- a/src/content/reference/en/p5/lerp.mdx +++ b/src/content/reference/en/p5/lerp.mdx @@ -24,6 +24,7 @@ description: > number outside of the original interval. For example, calling lerp(0, 10, 1.5) will return 15.

    +isConstructor: false line: 239 params: - name: start diff --git a/src/content/reference/en/p5/lerpColor.mdx b/src/content/reference/en/p5/lerpColor.mdx index ee1e7d0e81..d490767579 100644 --- a/src/content/reference/en/p5/lerpColor.mdx +++ b/src/content/reference/en/p5/lerpColor.mdx @@ -22,6 +22,7 @@ description: >

    The way that colors are interpolated depends on the current colorMode().

    +isConstructor: false line: 368 params: - name: c1 diff --git a/src/content/reference/en/p5/let.mdx b/src/content/reference/en/p5/let.mdx index 4ca8a2678f..c1cd3d96dc 100644 --- a/src/content/reference/en/p5/let.mdx +++ b/src/content/reference/en/p5/let.mdx @@ -23,8 +23,10 @@ description: > Declares a block scope local variable, optionally initializing it to a value.

    +isConstructor: false line: 7 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -37,7 +39,6 @@ example: console.log(x); // prints 1 to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/lightFalloff.mdx b/src/content/reference/en/p5/lightFalloff.mdx index 6391ebf36e..2f40ca6edd 100644 --- a/src/content/reference/en/p5/lightFalloff.mdx +++ b/src/content/reference/en/p5/lightFalloff.mdx @@ -18,6 +18,7 @@ description: >

    d = distance from light position to vertex position

    falloff = 1 / (CONSTANT + d * LINEAR + (d * d) * QUADRATIC)

    +isConstructor: false line: 646 params: - name: constant @@ -33,6 +34,7 @@ params:

    QUADRATIC value for determining falloff

    type: Number itemtype: method +alt: Two spheres with different falloff values show different intensity of light class: p5 example: - |- @@ -69,7 +71,6 @@ example: } -alt: Two spheres with different falloff values show different intensity of light chainable: true --- diff --git a/src/content/reference/en/p5/lightness.mdx b/src/content/reference/en/p5/lightness.mdx index ac6db22028..a7777447ad 100644 --- a/src/content/reference/en/p5/lightness.mdx +++ b/src/content/reference/en/p5/lightness.mdx @@ -7,6 +7,7 @@ description: |

    Extracts the HSL lightness value from a p5.Color object, array of color components, or CSS color string.

    +isConstructor: false line: 474 params: - name: color diff --git a/src/content/reference/en/p5/lights.mdx b/src/content/reference/en/p5/lights.mdx index f0df94c5c0..e7263e9d3d 100644 --- a/src/content/reference/en/p5/lights.mdx +++ b/src/content/reference/en/p5/lights.mdx @@ -11,8 +11,10 @@ description: | within draw() to remain persistent in a looping program. Placing them in setup() will cause them to only have an effect the first time through the loop.

    +isConstructor: false line: 602 itemtype: method +alt: the light is partially ambient and partially directional class: p5 example: - |- @@ -35,7 +37,6 @@ example: } -alt: the light is partially ambient and partially directional chainable: true --- diff --git a/src/content/reference/en/p5/line.mdx b/src/content/reference/en/p5/line.mdx index de47d32a7f..3744393dab 100644 --- a/src/content/reference/en/p5/line.mdx +++ b/src/content/reference/en/p5/line.mdx @@ -25,6 +25,7 @@ description: > space. Doing so requires adding the WEBGL argument to createCanvas().

    +isConstructor: false line: 334 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/loadBytes.mdx b/src/content/reference/en/p5/loadBytes.mdx index b0c8d990ea..169602714c 100644 --- a/src/content/reference/en/p5/loadBytes.mdx +++ b/src/content/reference/en/p5/loadBytes.mdx @@ -5,6 +5,7 @@ submodule: Input file: src/io/files.js description: |

    This method is suitable for fetching files up to size of 64MB.

    +isConstructor: false line: 683 params: - name: file diff --git a/src/content/reference/en/p5/loadFont.mdx b/src/content/reference/en/p5/loadFont.mdx index 9c1692f60f..20f688ac88 100644 --- a/src/content/reference/en/p5/loadFont.mdx +++ b/src/content/reference/en/p5/loadFont.mdx @@ -56,6 +56,7 @@ description: > used in setup() or draw().

    +isConstructor: false line: 16 params: - name: path diff --git a/src/content/reference/en/p5/loadImage.mdx b/src/content/reference/en/p5/loadImage.mdx index 80bcfca5f9..aae075350d 100644 --- a/src/content/reference/en/p5/loadImage.mdx +++ b/src/content/reference/en/p5/loadImage.mdx @@ -40,6 +40,7 @@ description: > used in setup() or draw().

    +isConstructor: false line: 18 params: - name: path diff --git a/src/content/reference/en/p5/loadJSON.mdx b/src/content/reference/en/p5/loadJSON.mdx index b5f5dfc70a..a726429e26 100644 --- a/src/content/reference/en/p5/loadJSON.mdx +++ b/src/content/reference/en/p5/loadJSON.mdx @@ -13,6 +13,7 @@ description: | callback following the syntax specified here.

    This method is suitable for fetching files up to size of 64MB.

    +isConstructor: false line: 17 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/loadModel.mdx b/src/content/reference/en/p5/loadModel.mdx index ef155d3758..e5cc723014 100644 --- a/src/content/reference/en/p5/loadModel.mdx +++ b/src/content/reference/en/p5/loadModel.mdx @@ -54,8 +54,10 @@ description: >
  • flipV: Flips the V texture coordinates of the model.
  • +isConstructor: false line: 12 itemtype: method +alt: 'Vertically rotating 3-d teapot with red, green and blue gradient.' class: p5 example: - |- @@ -109,7 +111,6 @@ example: } -alt: 'Vertically rotating 3-d teapot with red, green and blue gradient.' return: description: the p5.Geometry object type: p5.Geometry diff --git a/src/content/reference/en/p5/loadPixels.mdx b/src/content/reference/en/p5/loadPixels.mdx index 04ba52f81c..17df91b803 100644 --- a/src/content/reference/en/p5/loadPixels.mdx +++ b/src/content/reference/en/p5/loadPixels.mdx @@ -8,6 +8,7 @@ description: | pixels array. This function must be called before reading from or writing to pixels.

    +isConstructor: false line: 765 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/loadShader.mdx b/src/content/reference/en/p5/loadShader.mdx index f7b0bc22c1..59e416e12d 100644 --- a/src/content/reference/en/p5/loadShader.mdx +++ b/src/content/reference/en/p5/loadShader.mdx @@ -19,6 +19,7 @@ description: > in the createShader example.

    Note, shaders can only be used in WEBGL mode.

    +isConstructor: false line: 12 params: - name: vertFilename @@ -47,6 +48,7 @@ params: type: Function optional: true itemtype: method +alt: 'zooming Mandelbrot set. a colorful, infinitely detailed fractal.' class: p5 example: - |- @@ -73,7 +75,6 @@ example: } -alt: 'zooming Mandelbrot set. a colorful, infinitely detailed fractal.' return: description: |- a shader object created from the provided diff --git a/src/content/reference/en/p5/loadSound.mdx b/src/content/reference/en/p5/loadSound.mdx index aad22679b0..cd4f8340fe 100644 --- a/src/content/reference/en/p5/loadSound.mdx +++ b/src/content/reference/en/p5/loadSound.mdx @@ -11,6 +11,7 @@ description: | loadSound accepts a callback as the second parameter. Using a local server is recommended when loading external files.

    +isConstructor: false line: 2946 params: - name: path diff --git a/src/content/reference/en/p5/loadStrings.mdx b/src/content/reference/en/p5/loadStrings.mdx index f8cc813a83..4a0eacbe71 100644 --- a/src/content/reference/en/p5/loadStrings.mdx +++ b/src/content/reference/en/p5/loadStrings.mdx @@ -14,6 +14,7 @@ description: |

    This method is asynchronous, meaning it may not finish before the next line in your sketch is executed.

    This method is suitable for fetching files up to size of 64MB.

    +isConstructor: false line: 180 params: - name: filename diff --git a/src/content/reference/en/p5/loadTable.mdx b/src/content/reference/en/p5/loadTable.mdx index a905cc658e..718fb50ed8 100644 --- a/src/content/reference/en/p5/loadTable.mdx +++ b/src/content/reference/en/p5/loadTable.mdx @@ -33,6 +33,7 @@ description: >

    All files loaded and saved use UTF-8 encoding. This method is suitable for fetching files up to size of 64MB.

    +isConstructor: false line: 300 params: - name: filename diff --git a/src/content/reference/en/p5/loadXML.mdx b/src/content/reference/en/p5/loadXML.mdx index 1b57e6c632..c350620640 100644 --- a/src/content/reference/en/p5/loadXML.mdx +++ b/src/content/reference/en/p5/loadXML.mdx @@ -32,6 +32,7 @@ description: > object.

    This method is suitable for fetching files up to size of 64MB.

    +isConstructor: false line: 575 params: - name: filename diff --git a/src/content/reference/en/p5/log.mdx b/src/content/reference/en/p5/log.mdx index 406758919c..fcee7abe9c 100644 --- a/src/content/reference/en/p5/log.mdx +++ b/src/content/reference/en/p5/log.mdx @@ -8,6 +8,7 @@ description: > function expects the n parameter to be a value greater than 0.0.

    +isConstructor: false line: 289 params: - name: 'n' diff --git a/src/content/reference/en/p5/loop.mdx b/src/content/reference/en/p5/loop.mdx index 68198bfd0f..b0efbec137 100644 --- a/src/content/reference/en/p5/loop.mdx +++ b/src/content/reference/en/p5/loop.mdx @@ -18,8 +18,10 @@ description: >

    Use isLooping() to check the current state of loop().

    +isConstructor: false line: 82 itemtype: method +alt: horizontal line moves slowly from left. Loops but stops on mouse press. class: p5 example: - |- @@ -50,7 +52,6 @@ example: } -alt: horizontal line moves slowly from left. Loops but stops on mouse press. chainable: false --- diff --git a/src/content/reference/en/p5/mag.mdx b/src/content/reference/en/p5/mag.mdx index 9e3b5911cb..bd37c0df2e 100644 --- a/src/content/reference/en/p5/mag.mdx +++ b/src/content/reference/en/p5/mag.mdx @@ -16,6 +16,7 @@ description: > calling dist(0, 0, x, y).

    +isConstructor: false line: 315 params: - name: x diff --git a/src/content/reference/en/p5/map.mdx b/src/content/reference/en/p5/map.mdx index f52d2967d2..f63def0258 100644 --- a/src/content/reference/en/p5/map.mdx +++ b/src/content/reference/en/p5/map.mdx @@ -16,6 +16,7 @@ description: > in the target range [0, 100] is proportional to 2's position in the original range [0, 10].

    +isConstructor: false line: 347 params: - name: value diff --git a/src/content/reference/en/p5/match.mdx b/src/content/reference/en/p5/match.mdx index e4f3c78886..6ad3120373 100644 --- a/src/content/reference/en/p5/match.mdx +++ b/src/content/reference/en/p5/match.mdx @@ -18,6 +18,7 @@ description: | Element [0] of a regular expression match returns the entire matching string, and the match groups start at element [1] (the first group is [1], the second [2], and so on).

    +isConstructor: false line: 41 params: - name: str diff --git a/src/content/reference/en/p5/matchAll.mdx b/src/content/reference/en/p5/matchAll.mdx index 201995b34e..8ff254cf99 100644 --- a/src/content/reference/en/p5/matchAll.mdx +++ b/src/content/reference/en/p5/matchAll.mdx @@ -19,6 +19,7 @@ description: | expression match returns the entire matching string, and the match groups start at element [i][1] (the first group is [i][1], the second [i][2], and so on).

    +isConstructor: false line: 79 params: - name: str diff --git a/src/content/reference/en/p5/max.mdx b/src/content/reference/en/p5/max.mdx index 49fcef6164..5773d56831 100644 --- a/src/content/reference/en/p5/max.mdx +++ b/src/content/reference/en/p5/max.mdx @@ -15,6 +15,7 @@ description: > them as individual numbers and returns the largest number.

    +isConstructor: false line: 410 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/metalness.mdx b/src/content/reference/en/p5/metalness.mdx index cf51dd9d52..ccedef3f51 100644 --- a/src/content/reference/en/p5/metalness.mdx +++ b/src/content/reference/en/p5/metalness.mdx @@ -27,6 +27,7 @@ description: > appearance of the metal surfaces. When no fill color is provided, it defaults to using white.

    +isConstructor: false line: 1186 params: - name: metallic diff --git a/src/content/reference/en/p5/midiToFreq.mdx b/src/content/reference/en/p5/midiToFreq.mdx index 90acbe5aca..511e751bfc 100644 --- a/src/content/reference/en/p5/midiToFreq.mdx +++ b/src/content/reference/en/p5/midiToFreq.mdx @@ -8,6 +8,7 @@ description: | General MIDI treats notes as integers where middle C is 60, C# is 61, D is 62 etc. Useful for generating musical frequencies with oscillators.

    +isConstructor: false line: 841 params: - name: midiNote diff --git a/src/content/reference/en/p5/millis.mdx b/src/content/reference/en/p5/millis.mdx index 132324503a..3cc8b5df27 100644 --- a/src/content/reference/en/p5/millis.mdx +++ b/src/content/reference/en/p5/millis.mdx @@ -10,6 +10,7 @@ description: > often used for timing events and animation sequences.

    +isConstructor: false line: 67 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/min.mdx b/src/content/reference/en/p5/min.mdx index b69172362e..d096f0913e 100644 --- a/src/content/reference/en/p5/min.mdx +++ b/src/content/reference/en/p5/min.mdx @@ -15,6 +15,7 @@ description: > them as individual numbers and returns the smallest number.

    +isConstructor: false line: 488 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/minute.mdx b/src/content/reference/en/p5/minute.mdx index 672adf83d7..29a89be653 100644 --- a/src/content/reference/en/p5/minute.mdx +++ b/src/content/reference/en/p5/minute.mdx @@ -8,6 +8,7 @@ description: > href="#/p5/minute">minute() function returns the current minute as a value from 0 - 59.

    +isConstructor: false line: 48 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/model.mdx b/src/content/reference/en/p5/model.mdx index 756bff4211..58e4d3ae98 100644 --- a/src/content/reference/en/p5/model.mdx +++ b/src/content/reference/en/p5/model.mdx @@ -5,6 +5,7 @@ submodule: 3D Models file: src/webgl/loading.js description: |

    Render a 3d model to the screen.

    +isConstructor: false line: 636 params: - name: model @@ -12,6 +13,7 @@ params:

    Loaded 3d model to be rendered

    type: p5.Geometry itemtype: method +alt: Vertically rotating 3-d octahedron. class: p5 example: - |- @@ -38,7 +40,6 @@ example: } -alt: Vertically rotating 3-d octahedron. chainable: false --- diff --git a/src/content/reference/en/p5/month.mdx b/src/content/reference/en/p5/month.mdx index f9eb440161..6899e8bcd8 100644 --- a/src/content/reference/en/p5/month.mdx +++ b/src/content/reference/en/p5/month.mdx @@ -8,6 +8,7 @@ description: > href="#/p5/month">month() function returns the current month as a value from 1 - 12.

    +isConstructor: false line: 92 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/mouseButton.mdx b/src/content/reference/en/p5/mouseButton.mdx index 835c415fa3..68ddbf7fa8 100644 --- a/src/content/reference/en/p5/mouseButton.mdx +++ b/src/content/reference/en/p5/mouseButton.mdx @@ -8,6 +8,7 @@ description: | button is pressed. The value of the system variable mouseButton is either LEFT, RIGHT, or CENTER depending on which button was pressed last. Warning: different browsers may track mouseButton differently.

    +isConstructor: false line: 341 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/mouseClicked.mdx b/src/content/reference/en/p5/mouseClicked.mdx index 6323e1a2ab..382119455d 100644 --- a/src/content/reference/en/p5/mouseClicked.mdx +++ b/src/content/reference/en/p5/mouseClicked.mdx @@ -21,6 +21,7 @@ description: > behaviors attached to various mouse events. To prevent any default behavior for this event, add "return false" to the end of the function.

    +isConstructor: false line: 760 params: - name: event diff --git a/src/content/reference/en/p5/mouseDragged.mdx b/src/content/reference/en/p5/mouseDragged.mdx index a384691754..f67eaa72c9 100644 --- a/src/content/reference/en/p5/mouseDragged.mdx +++ b/src/content/reference/en/p5/mouseDragged.mdx @@ -18,6 +18,7 @@ description: > behaviors attached to various mouse events. To prevent any default behavior for this event, add "return false" to the end of the function.

    +isConstructor: false line: 521 params: - name: event diff --git a/src/content/reference/en/p5/mouseIsPressed.mdx b/src/content/reference/en/p5/mouseIsPressed.mdx index 8b88c0718d..46f4047742 100644 --- a/src/content/reference/en/p5/mouseIsPressed.mdx +++ b/src/content/reference/en/p5/mouseIsPressed.mdx @@ -6,6 +6,7 @@ file: src/events/mouse.js description: |

    The boolean system variable mouseIsPressed is true if the mouse is pressed and false if not.

    +isConstructor: false line: 378 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/mouseMoved.mdx b/src/content/reference/en/p5/mouseMoved.mdx index 96626c6812..141412ce4e 100644 --- a/src/content/reference/en/p5/mouseMoved.mdx +++ b/src/content/reference/en/p5/mouseMoved.mdx @@ -14,6 +14,7 @@ description: > behaviors attached to various mouse events. To prevent any default behavior for this event, add "return false" to the end of the method.

    +isConstructor: false line: 469 params: - name: event diff --git a/src/content/reference/en/p5/mousePressed.mdx b/src/content/reference/en/p5/mousePressed.mdx index 4ee0c97383..aa4add8d30 100644 --- a/src/content/reference/en/p5/mousePressed.mdx +++ b/src/content/reference/en/p5/mousePressed.mdx @@ -21,6 +21,7 @@ description: > behaviors attached to various mouse events. To prevent any default behavior for this event, add "return false" to the end of the function.

    +isConstructor: false line: 599 params: - name: event diff --git a/src/content/reference/en/p5/mouseReleased.mdx b/src/content/reference/en/p5/mouseReleased.mdx index 7e159e8829..b1b54b54b2 100644 --- a/src/content/reference/en/p5/mouseReleased.mdx +++ b/src/content/reference/en/p5/mouseReleased.mdx @@ -17,6 +17,7 @@ description: > behaviors attached to various mouse events. To prevent any default behavior for this event, add "return false" to the end of the function.

    +isConstructor: false line: 680 params: - name: event diff --git a/src/content/reference/en/p5/mouseWheel.mdx b/src/content/reference/en/p5/mouseWheel.mdx index af77317612..445c2a09e5 100644 --- a/src/content/reference/en/p5/mouseWheel.mdx +++ b/src/content/reference/en/p5/mouseWheel.mdx @@ -29,6 +29,7 @@ description: > may only work as expected if "return false" is included while using Safari.

    +isConstructor: false line: 908 params: - name: event diff --git a/src/content/reference/en/p5/mouseX.mdx b/src/content/reference/en/p5/mouseX.mdx index eb6d6424ef..b965421e52 100644 --- a/src/content/reference/en/p5/mouseX.mdx +++ b/src/content/reference/en/p5/mouseX.mdx @@ -9,6 +9,7 @@ description: | the top-left corner is (0, 0) for 2-D and (-width/2, -height/2) for WebGL. If touch is used instead of mouse input, mouseX will hold the x value of the most recent touch point.

    +isConstructor: false line: 80 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/mouseY.mdx b/src/content/reference/en/p5/mouseY.mdx index ff01f421ee..ed8cffffbc 100644 --- a/src/content/reference/en/p5/mouseY.mdx +++ b/src/content/reference/en/p5/mouseY.mdx @@ -9,6 +9,7 @@ description: | the top-left corner is (0, 0) for 2-D and (-width/2, -height/2) for WebGL. If touch is used instead of mouse input, mouseY will hold the y value of the most recent touch point.

    +isConstructor: false line: 104 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/movedX.mdx b/src/content/reference/en/p5/movedX.mdx index 7af01fff1d..12878bd709 100644 --- a/src/content/reference/en/p5/movedX.mdx +++ b/src/content/reference/en/p5/movedX.mdx @@ -6,6 +6,7 @@ file: src/events/mouse.js description: >

    The variable movedX contains the horizontal movement of the mouse since the last frame

    +isConstructor: false line: 12 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/movedY.mdx b/src/content/reference/en/p5/movedY.mdx index b711ac1a1b..7faa309725 100644 --- a/src/content/reference/en/p5/movedY.mdx +++ b/src/content/reference/en/p5/movedY.mdx @@ -6,6 +6,7 @@ file: src/events/mouse.js description: >

    The variable movedY contains the vertical movement of the mouse since the last frame

    +isConstructor: false line: 43 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/nf.mdx b/src/content/reference/en/p5/nf.mdx index 99e3ce2b3b..1585b9506d 100644 --- a/src/content/reference/en/p5/nf.mdx +++ b/src/content/reference/en/p5/nf.mdx @@ -24,6 +24,7 @@ description: > i.e. if right is 3 than the result will be 123.200.

    +isConstructor: false line: 126 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/nfc.mdx b/src/content/reference/en/p5/nfc.mdx index 4800462f3a..c9da9a5b35 100644 --- a/src/content/reference/en/p5/nfc.mdx +++ b/src/content/reference/en/p5/nfc.mdx @@ -8,6 +8,7 @@ description: | appropriate commas to mark units of 1000. There are two versions: one for formatting ints, and one for formatting an array of ints. The value for the right parameter should always be a positive integer.

    +isConstructor: false line: 216 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/nfp.mdx b/src/content/reference/en/p5/nfp.mdx index 341aa12493..d49820bf09 100644 --- a/src/content/reference/en/p5/nfp.mdx +++ b/src/content/reference/en/p5/nfp.mdx @@ -14,6 +14,7 @@ description: > formatting ints. The values for left, and right parameters should always be positive integers.

    +isConstructor: false line: 289 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/nfs.mdx b/src/content/reference/en/p5/nfs.mdx index f7e13c2bf2..af54b8e53b 100644 --- a/src/content/reference/en/p5/nfs.mdx +++ b/src/content/reference/en/p5/nfs.mdx @@ -38,6 +38,7 @@ description: > i.e. if right is 3 than the result will be 123.200.

    +isConstructor: false line: 350 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noCanvas.mdx b/src/content/reference/en/p5/noCanvas.mdx index eb740bdbe2..dd58bf67d9 100644 --- a/src/content/reference/en/p5/noCanvas.mdx +++ b/src/content/reference/en/p5/noCanvas.mdx @@ -6,8 +6,10 @@ file: src/core/rendering.js description: >

    Removes the default canvas for a p5 sketch that doesn't require a canvas

    +isConstructor: false line: 222 itemtype: method +alt: no image displayed class: p5 example: - |- @@ -19,7 +21,6 @@ example: } -alt: no image displayed chainable: false --- diff --git a/src/content/reference/en/p5/noCursor.mdx b/src/content/reference/en/p5/noCursor.mdx index f747ab608c..50505bbe10 100644 --- a/src/content/reference/en/p5/noCursor.mdx +++ b/src/content/reference/en/p5/noCursor.mdx @@ -5,6 +5,7 @@ submodule: Environment file: src/core/environment.js description: |

    Hides the cursor from view.

    +isConstructor: false line: 440 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noDebugMode.mdx b/src/content/reference/en/p5/noDebugMode.mdx index 18b582b6db..718be5430c 100644 --- a/src/content/reference/en/p5/noDebugMode.mdx +++ b/src/content/reference/en/p5/noDebugMode.mdx @@ -5,8 +5,14 @@ submodule: Interaction file: src/webgl/interaction.js description: |

    Turns off debugMode() in a 3D sketch.

    +isConstructor: false line: 602 itemtype: method +alt: |- + a 3D box is centered on a grid in a 3D sketch. an icon + indicates the direction of each axis: a red line points +X, + a green line +Y, and a blue line +Z. the grid and icon disappear when the + spacebar is pressed. class: p5 example: - |- @@ -35,11 +41,6 @@ example: } -alt: |- - a 3D box is centered on a grid in a 3D sketch. an icon - indicates the direction of each axis: a red line points +X, - a green line +Y, and a blue line +Z. the grid and icon disappear when the - spacebar is pressed. chainable: false --- diff --git a/src/content/reference/en/p5/noErase.mdx b/src/content/reference/en/p5/noErase.mdx index a3ae999e19..d2a064adaf 100644 --- a/src/content/reference/en/p5/noErase.mdx +++ b/src/content/reference/en/p5/noErase.mdx @@ -8,6 +8,7 @@ description: | The fill(), stroke(), and blendMode() settings will return to what they were prior to calling erase().

    +isConstructor: false line: 1086 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noFill.mdx b/src/content/reference/en/p5/noFill.mdx index 0c03336e14..678a6ddc09 100644 --- a/src/content/reference/en/p5/noFill.mdx +++ b/src/content/reference/en/p5/noFill.mdx @@ -9,6 +9,7 @@ description: | noStroke() and noFill() are called, nothing will be drawn to the screen.

    +isConstructor: false line: 747 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noLights.mdx b/src/content/reference/en/p5/noLights.mdx index 777dbbdbbe..68b90c4768 100644 --- a/src/content/reference/en/p5/noLights.mdx +++ b/src/content/reference/en/p5/noLights.mdx @@ -12,8 +12,12 @@ description: | directionalLight(), pointLight(), spotLight()).

    +isConstructor: false line: 1108 itemtype: method +alt: |- + Three white spheres. Each appears as a different + color due to lighting. class: p5 example: - |- @@ -47,9 +51,6 @@ example: } -alt: |- - Three white spheres. Each appears as a different - color due to lighting. chainable: true --- diff --git a/src/content/reference/en/p5/noLoop.mdx b/src/content/reference/en/p5/noLoop.mdx index 0288359b10..228f16ddf8 100644 --- a/src/content/reference/en/p5/noLoop.mdx +++ b/src/content/reference/en/p5/noLoop.mdx @@ -45,8 +45,12 @@ description: >

    Use isLooping() to check the current state of loop().

    +isConstructor: false line: 9 itemtype: method +alt: |- + 113 pixel long line extending from top-left to bottom right of canvas. + horizontal line moves slowly from left. Loops but stops on mouse press. class: p5 example: - |- @@ -90,9 +94,6 @@ example: } -alt: |- - 113 pixel long line extending from top-left to bottom right of canvas. - horizontal line moves slowly from left. Loops but stops on mouse press. chainable: false --- diff --git a/src/content/reference/en/p5/noSmooth.mdx b/src/content/reference/en/p5/noSmooth.mdx index d87480944f..475fa8297b 100644 --- a/src/content/reference/en/p5/noSmooth.mdx +++ b/src/content/reference/en/p5/noSmooth.mdx @@ -17,6 +17,7 @@ description: > to call smooth() to draw smooth (antialiased) edges.

    +isConstructor: false line: 73 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noStroke.mdx b/src/content/reference/en/p5/noStroke.mdx index d60c95a69d..ea0aeb5e23 100644 --- a/src/content/reference/en/p5/noStroke.mdx +++ b/src/content/reference/en/p5/noStroke.mdx @@ -8,6 +8,7 @@ description: | noStroke() and noFill() are called, nothing will be drawn to the screen.

    +isConstructor: false line: 789 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noTint.mdx b/src/content/reference/en/p5/noTint.mdx index e9888c522c..ce5da56701 100644 --- a/src/content/reference/en/p5/noTint.mdx +++ b/src/content/reference/en/p5/noTint.mdx @@ -6,6 +6,7 @@ file: src/image/loading_displaying.js description: |

    Removes the current tint set by tint() and restores images to their original colors.

    +isConstructor: false line: 1223 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/noise.mdx b/src/content/reference/en/p5/noise.mdx index 9a8ba15205..a7f090f407 100644 --- a/src/content/reference/en/p5/noise.mdx +++ b/src/content/reference/en/p5/noise.mdx @@ -69,6 +69,7 @@ description: > noise(x, y, z), or space and time, as in noise(x, y, t).

    +isConstructor: false line: 36 params: - name: x diff --git a/src/content/reference/en/p5/noiseDetail.mdx b/src/content/reference/en/p5/noiseDetail.mdx index 5e4d105ddc..3d922a8cfb 100644 --- a/src/content/reference/en/p5/noiseDetail.mdx +++ b/src/content/reference/en/p5/noiseDetail.mdx @@ -32,6 +32,7 @@ description: > values between 0 and 1 are valid. However, falloff values greater than 0.5 might result in noise values greater than 1.

    +isConstructor: false line: 277 params: - name: lod diff --git a/src/content/reference/en/p5/noiseSeed.mdx b/src/content/reference/en/p5/noiseSeed.mdx index 45be7cd0f1..1a1bcbe90e 100644 --- a/src/content/reference/en/p5/noiseSeed.mdx +++ b/src/content/reference/en/p5/noiseSeed.mdx @@ -14,6 +14,7 @@ description: > href="#/p5/noise">noise() produce the same results each time a sketch is run.

    +isConstructor: false line: 338 params: - name: seed diff --git a/src/content/reference/en/p5/norm.mdx b/src/content/reference/en/p5/norm.mdx index 3e9657fd6f..bedcfe1ea3 100644 --- a/src/content/reference/en/p5/norm.mdx +++ b/src/content/reference/en/p5/norm.mdx @@ -16,6 +16,7 @@ description: >

    Numbers outside of the original range are not constrained between 0 and 1. Out-of-range values are often intentional and useful.

    +isConstructor: false line: 566 params: - name: value diff --git a/src/content/reference/en/p5/normal.mdx b/src/content/reference/en/p5/normal.mdx index 1d66853293..1978e964df 100644 --- a/src/content/reference/en/p5/normal.mdx +++ b/src/content/reference/en/p5/normal.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 601 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/normalMaterial.mdx b/src/content/reference/en/p5/normalMaterial.mdx index 80b616617d..9e1c762c1b 100644 --- a/src/content/reference/en/p5/normalMaterial.mdx +++ b/src/content/reference/en/p5/normalMaterial.mdx @@ -11,8 +11,10 @@ description: | become green, and those facing the Z-axis become blue.

    You can view more materials in this example.

    +isConstructor: false line: 824 itemtype: method +alt: Sphere with normal material class: p5 example: - |- @@ -31,7 +33,6 @@ example: } -alt: Sphere with normal material chainable: true --- diff --git a/src/content/reference/en/p5/number.mdx b/src/content/reference/en/p5/number.mdx index 266d45f349..9b836573c4 100644 --- a/src/content/reference/en/p5/number.mdx +++ b/src/content/reference/en/p5/number.mdx @@ -12,8 +12,10 @@ description: >

    The MDN entry for number

    +isConstructor: false line: 331 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -24,7 +26,6 @@ example: console.log(typeof num); // prints 'number' to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/object.mdx b/src/content/reference/en/p5/object.mdx index d9c3a2ddde..cea40b262a 100644 --- a/src/content/reference/en/p5/object.mdx +++ b/src/content/reference/en/p5/object.mdx @@ -10,8 +10,10 @@ description: > An object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and methods when they are inside objects.)

    +isConstructor: false line: 351 itemtype: property +alt: This example does not render anything class: p5 example: - |2- @@ -29,7 +31,6 @@ example: console.log(author.name); // prints 'Ursula K Le Guin' to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/orbitControl.mdx b/src/content/reference/en/p5/orbitControl.mdx index f8e4dd5ae5..f3f1a25647 100644 --- a/src/content/reference/en/p5/orbitControl.mdx +++ b/src/content/reference/en/p5/orbitControl.mdx @@ -14,6 +14,7 @@ description: | Calling this function without parameters is equivalent to calling orbitControl(1,1). To reverse direction of movement in either axis, enter a negative number for sensitivity.

    +isConstructor: false line: 11 params: - name: sensitivityX @@ -63,6 +64,7 @@ params: type: Object optional: true itemtype: method +alt: Camera orbits around a box when mouse is hold-clicked & then moved. class: p5 example: - |- @@ -91,7 +93,6 @@ example: } -alt: Camera orbits around a box when mouse is hold-clicked & then moved. chainable: true --- diff --git a/src/content/reference/en/p5/ortho.mdx b/src/content/reference/en/p5/ortho.mdx index 56e5b1be6d..7cbdee912c 100644 --- a/src/content/reference/en/p5/ortho.mdx +++ b/src/content/reference/en/p5/ortho.mdx @@ -24,6 +24,7 @@ description: > ortho(-width/2, width/2, -height/2, height/2, 0, max(width, height) + 800).

    +isConstructor: false line: 196 params: - name: left @@ -57,6 +58,9 @@ params: type: Number optional: true itemtype: method +alt: >- + two 3D boxes move back and forth along same plane, rotating as mouse is + dragged. class: p5 example: - |- @@ -90,9 +94,6 @@ example: } -alt: >- - two 3D boxes move back and forth along same plane, rotating as mouse is - dragged. chainable: true --- diff --git a/src/content/reference/en/p5/outputVolume.mdx b/src/content/reference/en/p5/outputVolume.mdx index 3dbb1c2ff8..69f04d23b9 100644 --- a/src/content/reference/en/p5/outputVolume.mdx +++ b/src/content/reference/en/p5/outputVolume.mdx @@ -20,6 +20,7 @@ description: |- sound in this module.

    If no value is provided, returns a Web Audio API Gain Node

    +isConstructor: false line: 738 params: - name: volume diff --git a/src/content/reference/en/p5/p5.Camera.mdx b/src/content/reference/en/p5/p5.Camera.mdx index 11002462ff..03de3cfa57 100644 --- a/src/content/reference/en/p5/p5.Camera.mdx +++ b/src/content/reference/en/p5/p5.Camera.mdx @@ -54,12 +54,14 @@ description: > are also accessible via the camera object generated using createCamera()

    +isConstructor: false line: 401 params: - name: rendererGL description: |

    instance of WebGL renderer

    type: RendererGL +alt: camera view pans left and right across a series of rotating 3D boxes. example: - |- @@ -110,7 +112,6 @@ example: } -alt: camera view pans left and right across a series of rotating 3D boxes. chainable: false --- diff --git a/src/content/reference/en/p5/p5.Color.mdx b/src/content/reference/en/p5/p5.Color.mdx index c293e0366f..1a576bc2e6 100644 --- a/src/content/reference/en/p5/p5.Color.mdx +++ b/src/content/reference/en/p5/p5.Color.mdx @@ -45,39 +45,7 @@ params: for red, green, blue and alpha channel or CSS color.

    type: 'Number[]|String' -memberMethodPreviews: - toString: - description: | -

    Returns the color formatted as a string. Doing so can be useful for - debugging, or for using p5.js with other libraries.

    - path: .././src/content/reference/en//p5.Color/toString - setRed: - description: | -

    Sets the red component of a color. The range depends on the - colorMode(). In the default RGB mode it's - between 0 and 255.

    - path: .././src/content/reference/en//p5.Color/setRed - setGreen: - description: | -

    Sets the green component of a color. The range depends on the - colorMode(). In the default RGB mode it's - between 0 and 255.

    - path: .././src/content/reference/en//p5.Color/setGreen - setBlue: - description: | -

    Sets the blue component of a color. The range depends on the - colorMode(). In the default RGB mode it's - between 0 and 255.

    - path: .././src/content/reference/en//p5.Color/setBlue - setAlpha: - description: > -

    Sets the alpha (transparency) value of a color. The range depends on - the - - colorMode(). In the default RGB mode it's - - between 0 and 255.

    - 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 4b2905fdec..06587b46fd 100644 --- a/src/content/reference/en/p5/p5.Element.mdx +++ b/src/content/reference/en/p5/p5.Element.mdx @@ -32,401 +32,37 @@ params:

    pointer to p5 instance.

    type: P5 optional: true -memberMethodPreviews: - elt: - description: > -

    Underlying - - HTMLElement - - object. Its properties and methods can be used directly.

    - path: .././src/content/reference/en//p5.Element/elt - parent: - description: > -

    Attaches this element to a parent element.

    - -

    For example, a <div></div> element may be used - as a box to - - hold two pieces of text, a header and a paragraph. The - - <div></div> is the parent element of both the - header and - - paragraph.

    - -

    The parameter parent can have one of three types. - parent can be a - - string with the parent element's ID, as in - - myElement.parent('container'). It can also be another - - p5.Element object, as in - - myElement.parent(myDiv). Finally, parent can be - an HTMLElement - - object, as in myElement.parent(anotherElement).

    - -

    Calling myElement.parent() without an argument returns - this element's - - parent.

    - path: .././src/content/reference/en//p5.Element/parent - id: - description: > -

    Sets this element's ID using a given string.

    - -

    Calling myElement.id() without an argument returns its ID - as a string.

    - path: .././src/content/reference/en//p5.Element/id - class: - description: > -

    Adds a - - class attribute - - to the element.

    - -

    Calling myElement.class() without an argument returns a - string with its current classes.

    - path: .././src/content/reference/en//p5.Element/class - mousePressed: - description: > -

    Calls a function when the mouse is pressed over the element. - - Calling myElement.mousePressed(false) disables the - function.

    - -

    Note: Some mobile browsers may also trigger this event when the element - - receives a quick tap.

    - 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.

    - path: .././src/content/reference/en//p5.Element/doubleClicked - mouseWheel: - description: > -

    Calls a function when the mouse wheel scrolls over th element.

    - -

    The callback function, fxn, is passed an - event object. event has - - two numeric properties, deltaY and deltaX. - event.deltaY is - - negative if the mouse wheel rotates away from the user. It's positive if - - the mouse wheel rotates toward the user. event.deltaX is - positive if - - the mouse wheel moves to the right. It's negative if the mouse wheel moves - - to the left.

    - -

    Calling myElement.mouseWheel(false) disables the - function.

    - path: .././src/content/reference/en//p5.Element/mouseWheel - mouseReleased: - description: | -

    Calls a function when the mouse is released over the element. Calling - myElement.mouseReleased(false) disables the function.

    -

    Note: Some mobile browsers may also trigger this event when the element - receives a quick tap.

    - path: .././src/content/reference/en//p5.Element/mouseReleased - mouseClicked: - description: > -

    Calls a function when the mouse is pressed and released over the - element. - - Calling myElement.mouseReleased(false) disables the - function.

    - -

    Note: Some mobile browsers may also trigger this event when the element - - receives a quick tap.

    - 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.

    - path: .././src/content/reference/en//p5.Element/mouseMoved - mouseOver: - description: | -

    Calls a function when the mouse moves onto the element. Calling - myElement.mouseOver(false) disables the function.

    - path: .././src/content/reference/en//p5.Element/mouseOver - mouseOut: - description: | -

    Calls a function when the mouse moves off the element. Calling - myElement.mouseOut(false) disables the function.

    - path: .././src/content/reference/en//p5.Element/mouseOut - touchStarted: - description: | -

    Calls a function when the element is touched. Calling - myElement.touchStarted(false) disables the function.

    -

    Note: Touch functions only work on mobile devices.

    - path: .././src/content/reference/en//p5.Element/touchStarted - touchMoved: - description: | -

    Calls a function when the user touches the element and moves their - finger. Calling myElement.touchMoved(false) disables the - function.

    -

    Note: Touch functions only work on mobile devices.

    - path: .././src/content/reference/en//p5.Element/touchMoved - touchEnded: - description: | -

    Calls a function when the user stops touching the element. Calling - myElement.touchMoved(false) disables the function.

    -

    Note: Touch functions only work on mobile devices.

    - 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.

    - path: .././src/content/reference/en//p5.Element/dragOver - dragLeave: - description: | -

    Calls a function when a file is dragged off the element. Calling - Calling myElement.dragLeave(false) disables the function.

    - path: .././src/content/reference/en//p5.Element/dragLeave - addClass: - description: | -

    Adds specified class to the element.

    - path: .././src/content/reference/en//p5.Element/addClass - removeClass: - description: | -

    Removes specified class from the element.

    - path: .././src/content/reference/en//p5.Element/removeClass - hasClass: - description: | -

    Checks if specified class is already applied to element.

    - path: .././src/content/reference/en//p5.Element/hasClass - toggleClass: - description: | -

    Toggles element class.

    - path: .././src/content/reference/en//p5.Element/toggleClass - child: - description: | -

    Attaches the element as a child to the parent specified. - Accepts either a string ID, DOM node, or p5.Element. - If no argument is specified, an array of children DOM nodes is returned.

    - path: .././src/content/reference/en//p5.Element/child - center: - description: | -

    Centers a p5.Element either vertically, horizontally, - or both, relative to its parent or according to - the body if the p5.Element has no parent. If no argument is passed - the p5.Element is aligned both vertically and horizontally.

    - path: .././src/content/reference/en//p5.Element/center - html: - description: | -

    If an argument is given, sets the inner HTML of the element, - replacing any existing HTML. If true is included as a second - argument, HTML is appended instead of replacing existing HTML. - If no arguments are given, returns - the inner HTML of the element.

    - path: .././src/content/reference/en//p5.Element/html - position: - description: > -

    Sets the position of the element. If no position type argument is - given, the - position will be relative to (0, 0) of the window. - Essentially, this sets position:absolute and left and top - properties of style. If an optional third argument specifying position type is given, - the x and y-coordinates will be interpreted based on the positioning scheme. - If no arguments given, the function returns the x and y position of the element. - found documentation on how to be more specific with object type - https://stackoverflow.com/questions/14714314/how-do-i-comment-object-literals-in-yuidoc

    - path: .././src/content/reference/en//p5.Element/position - style: - description: > -

    Applies a style to an element by adding a - - CSS declaration.

    - -

    The first parameter, property, is a string. If the name of - a style - - property is passed, as in myElement.style('color'), the - method returns - - the current value as a string or null if it hasn't been set. - If a - - property:style string is passed, as in - - myElement.style('color:deeppink'), the method sets - property to - - value.

    - -

    The second parameter, value, is optional. It sets the - property's value. - - value can be a string, as in - - myElement.style('color', 'deeppink'), or a - - p5.Color object, as in - - myElement.style('color', myColor).

    - path: .././src/content/reference/en//p5.Element/style - attribute: - description: > -

    Adds an - - attribute - - to the element. This method is useful for advanced tasks.

    - -

    Most commonly-used attributes, such as id, can be set with - their - - dedicated methods. For example, nextButton.id('next') sets an - element's - - id attribute.

    - -

    The first parameter, attr, is the attribute's name as a - string. Calling - - myElement.attribute('align') returns the attribute's current - value as a - - string or null if it hasn't been set.

    - -

    The second parameter, value, is optional. It's a string - used to set the - - attribute's value. For example, calling - - myElement.attribute('align', 'center') sets the element's - horizontal - - alignment to center.

    - path: .././src/content/reference/en//p5.Element/attribute - removeAttribute: - description: > -

    Removes an attribute from the element.

    - -

    The parameter attr is the attribute's name as a string. - For example, - - calling myElement.removeAttribute('align') removes its - align - - attribute if it's been set.

    - path: .././src/content/reference/en//p5.Element/removeAttribute - value: - description: > -

    Returns or sets the element's value.

    - -

    Calling myElement.value() returns the element's current - value.

    - -

    The parameter, value, is an optional number or string. If - provided, - - as in myElement.value(123), it's used to set the element's - value.

    - path: .././src/content/reference/en//p5.Element/value - show: - description: | -

    Shows the current element.

    - path: .././src/content/reference/en//p5.Element/show - hide: - description: | -

    Hides the current element.

    - path: .././src/content/reference/en//p5.Element/hide - size: - description: > -

    Sets the element's width and height.

    - -

    Calling myElement.size() without an argument returns the - element's size - - as an object with the properties width and - height. For example, - { width: 20, height: 10 }.

    -

    The first parameter, width, is optional. It's a number - used to set the - - element's width. Calling myElement.size(10)

    - -

    The second parameter, 'height, 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 - - to 10 pixels.

    - -

    The constant AUTO can be used to adjust one dimension at a - time while - - maintaining the aspect ratio, which is width / height. For - example, - - consider an element that's 200 pixels wide and 100 pixels tall. Calling - - myElement.size(20, AUTO) sets the width to 20 pixels and - height to 10 - - pixels.

    - -

    Note: In the case of elements that need to load data, such as images, - wait - - to call myElement.size() until after the data loads.

    - path: .././src/content/reference/en//p5.Element/size - remove: - description: | -

    Removes the element, stops all audio/video streams, and removes all - callback functions.

    - path: .././src/content/reference/en//p5.Element/remove - drop: - description: > -

    Sets a function to call when the user drops a file on the element.

    - -

    The first parameter, callback, is a function to call once - the file loads. - - The callback function should have one parameter, file, that's - a - - p5.File object. If the user drops multiple files - on - - the element, callback, is called once for each file.

    - -

    The second parameter, fxn, is a function to call when the - browser detects - - one or more dropped files. The callback function should have one - - parameter, event, that's a - - DragEvent.

    - path: .././src/content/reference/en//p5.Element/drop - draggable: - description: > -

    Turns p5.Element into a draggable item. If an argument is given, it - will drag that p5.Element instead, ie. drag a entire GUI panel (parent - container) with the panel's title bar.

    - path: .././src/content/reference/en//p5.Element/draggable +example: + - |- + +
    + + function setup() { + createCanvas(100, 100); + + background(200); + + // Create a button element and + // place it beneath the canvas. + let btn = createButton('change'); + btn.position(0, 100); + + // Call randomColor() when + // the button is pressed. + btn.mousePressed(randomColor); + + describe('A gray square with a button that says "change" beneath it. The square changes color when the user presses the button.'); + } + + // Paint the background either + // red, yellow, blue, or green. + function randomColor() { + let c = random(['red', 'yellow', 'blue', 'green']); + background(c); + } + +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.File.mdx b/src/content/reference/en/p5/p5.File.mdx index 480009cda4..17c9e34a65 100644 --- a/src/content/reference/en/p5/p5.File.mdx +++ b/src/content/reference/en/p5/p5.File.mdx @@ -16,52 +16,85 @@ params: description: |

    wrapped file.

    type: File -memberMethodPreviews: - file: - description: > -

    Underlying +example: + - |- - File +

    + + // Use the file input to load a + // file and display its info. - object. All File properties and methods are accessible.

    - path: .././src/content/reference/en//p5.File/file - type: - description: > -

    The file + function setup() { + background(200); - MIME type + // Create a file input and place it beneath + // the canvas. Call displayInfo() when + // the file loads. + let input = createFileInput(displayInfo); + input.position(0, 100); - as a string. For example, 'image', 'text', and - so on.

    - path: .././src/content/reference/en//p5.File/type - subtype: - description: > -

    The file subtype as a string. For example, a file with an - 'image' + describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.'); + } - MIME type + // Display the p5.File's info + // once it loads. + function displayInfo(file) { + background(200); - may have a subtype such as png or jpeg.

    - path: .././src/content/reference/en//p5.File/subtype - name: - description: | -

    The file name as a string.

    - path: .././src/content/reference/en//p5.File/name - size: - description: | -

    The number of bytes in the file.

    - path: .././src/content/reference/en//p5.File/size - data: - description: | -

    A string containing either the file's image data, text contents, or - a parsed object in the case of JSON and - p5.XML objects.

    - path: .././src/content/reference/en//p5.File/data + // Display the p5.File's name. + text(file.name, 10, 10, 80, 40); + // Display the p5.File's type and subtype. + text(`${file.type}/${file.subtype}`, 10, 70); + // Display the p5.File's size in bytes. + text(file.size, 10, 90); + } +
    +
    + +
    + + // Use the file input to select an image to + // load and display. + let img; + + function setup() { + // Create a file input and place it beneath + // the canvas. Call handleImage() when + // the file image loads. + let input = createFileInput(handleImage); + input.position(0, 100); + + describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.'); + } + + function draw() { + background(200); + + // Draw the image if it's ready. + if (img) { + image(img, 0, 0, width, height); + } + } + + // Use the p5.File's data once + // it loads. + function handleImage(file) { + // Check the p5.File's type. + if (file.type === 'image') { + // Create an image using using + // the p5.File's data. + img = createImg(file.data, ''); + + // Hide the image element so it + // doesn't appear twice. + img.hide(); + } else { + img = null; + } + } + +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.Font.mdx b/src/content/reference/en/p5/p5.Font.mdx index 183de2056c..341ee7ea66 100644 --- a/src/content/reference/en/p5/p5.Font.mdx +++ b/src/content/reference/en/p5/p5.Font.mdx @@ -13,80 +13,29 @@ params:

    pointer to p5 instance.

    type: P5 optional: true -memberMethodPreviews: - font: - description: | -

    Underlying - opentype.js - font object.

    - path: .././src/content/reference/en//p5.Font/font - textBounds: - description: > -

    Returns the bounding box for a string of text written using this - - p5.Font.

    - -

    The first parameter, str, is a string of text. The second - and third - - parameters, x and y, are the text's position. By - default, they set the - - coordinates of the bounding box's bottom-left corner. See - - textAlign() for more ways to align text.

    - -

    The fourth parameter, fontSize, is optional. It sets the - font size used to - - determine the bounding box. By default, font.textBounds() - will use the - - current textSize().

    - path: .././src/content/reference/en//p5.Font/textBounds - textToPoints: - description: > -

    Returns an array of points outlining a string of text written using - this - - p5.Font.

    - -

    The first parameter, str, is a string of text. The second - and third - - parameters, x and y, are the text's position. By - default, they set the - - coordinates of the bounding box's bottom-left corner. See - - textAlign() for more ways to align text.

    - -

    The fourth parameter, fontSize, is optional. It sets the - text's font - - size. By default, font.textToPoints() will use the current - - textSize().

    - -

    The fifth parameter, options, is also optional. - font.textToPoints() - - expects an object with the following properties:

    - -

    sampleFactor is the ratio of the text's path length to the - number of - - samples. It defaults to 0.1. Higher values produce more points along the - - path and are more precise.

    - -

    simplifyThreshold removes collinear points if it's set to - a number other - - than 0. The value represents the threshold angle to use when determining - - whether two edges are collinear.

    - path: .././src/content/reference/en//p5.Font/textToPoints +example: + - |- + +
    + + let font; + + function preload() { + // Creates a p5.Font object. + font = loadFont('assets/inconsolata.otf'); + } + + function setup() { + fill('deeppink'); + textFont(font); + textSize(36); + text('p5*js', 10, 50); + + describe('The text "p5*js" written in pink on a white background.'); + } + +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.Framebuffer.mdx b/src/content/reference/en/p5/p5.Framebuffer.mdx index 101549e474..f38ad3079c 100644 --- a/src/content/reference/en/p5/p5.Framebuffer.mdx +++ b/src/content/reference/en/p5/p5.Framebuffer.mdx @@ -20,165 +20,7 @@ params:

    A settings object

    type: Object optional: true -memberMethodPreviews: - pixels: - description: > -

    A Uint8ClampedArray - - containing the values for all the pixels in the Framebuffer.

    - -

    Like the main canvas pixels property, call - - loadPixels() before reading - - it, and call updatePixels() - - afterwards to update its data.

    - -

    Note that updating pixels via this property will be slower than - - drawing to the framebuffer directly. - - Consider using a shader instead of looping over pixels.

    - path: .././src/content/reference/en//p5.Framebuffer/pixels - resize: - description: | -

    Resizes the framebuffer to the given width and height.

    - path: .././src/content/reference/en//p5.Framebuffer/resize - pixelDensity: - description: | -

    Gets or sets the pixel scaling for high pixel density displays. By - default, the density will match that of the canvas the framebuffer was - created on, which will match the display density.

    -

    Call this method with no arguments to get the current density, or pass - in a number to set the density.

    - path: .././src/content/reference/en//p5.Framebuffer/pixelDensity - autoSized: - description: > -

    Gets or sets whether or not this framebuffer will automatically resize - - along with the canvas it's attached to in order to match its size.

    - -

    Call this method with no arguments to see if it is currently - auto-sized, - - or pass in a boolean to set this property.

    - path: .././src/content/reference/en//p5.Framebuffer/autoSized - createCamera: - description: | -

    Creates and returns a new - p5.FramebufferCamera to be used - while drawing to this framebuffer. The camera will be set as the - currently active camera.

    - path: .././src/content/reference/en//p5.Framebuffer/createCamera - remove: - description: | -

    Removes the framebuffer and frees its resources.

    - path: .././src/content/reference/en//p5.Framebuffer/remove - begin: - description: | -

    Begin drawing to this framebuffer. Subsequent drawing functions to the - canvas the framebuffer is attached to will not be immediately visible, and - will instead be drawn to the framebuffer's texture. Call - end() when finished to make draw - functions go right to the canvas again and to be able to read the - contents of the framebuffer's texture.

    - path: .././src/content/reference/en//p5.Framebuffer/begin - end: - description: | -

    After having previously called - begin(), this method stops drawing - functions from going to the framebuffer's texture, allowing them to go - right to the canvas again. After this, one can read from the framebuffer's - texture.

    - path: .././src/content/reference/en//p5.Framebuffer/end - draw: - description: > -

    Run a function while drawing to the framebuffer rather than to its - canvas. - - This is equivalent to calling framebuffer.begin(), running - the function, - - and then calling framebuffer.end(), but ensures that one - never - - accidentally forgets begin or end.

    - path: .././src/content/reference/en//p5.Framebuffer/draw - get: - description: > -

    Get a region of pixels from the canvas in the form of a - - p5.Image, or a single pixel as an array of - - numbers.

    - -

    Returns an array of [R,G,B,A] values for any pixel or grabs a section - of - - an image. If the Framebuffer has been set up to not store alpha values, - then - - only [R,G,B] will be returned. If no parameters are specified, the entire - - image is returned. - - Use the x and y parameters to get the value of one pixel. Get a section of - - the display window by specifying additional w and h parameters. When - - getting an image, the x and y parameters define the coordinates for the - - upper-left corner of the image, regardless of the current imageMode().

    - path: .././src/content/reference/en//p5.Framebuffer/get - color: - description: > -

    A texture with the color information of the framebuffer. Pass this (or - the - - framebuffer itself) to texture() to draw it to - - the canvas, or pass it to a shader with - - setUniform() to read its data.

    - -

    Since Framebuffers are controlled by WebGL, their y coordinates are - stored - - flipped compared to images and videos. When texturing with a framebuffer - - texture, you may want to flip vertically, e.g. with - - plane(framebuffer.width, -framebuffer.height).

    - path: .././src/content/reference/en//p5.Framebuffer/color - depth: - description: > -

    A texture with the depth information of the framebuffer. If the - framebuffer - - was created with { depth: false } in its settings, then this - property will - - be undefined. Pass this to texture() to draw it - to - - the canvas, or pass it to a shader with - - setUniform() to read its data.

    - -

    Since Framebuffers are controlled by WebGL, their y coordinates are - stored - - flipped compared to images and videos. When texturing with a framebuffer - - texture, you may want to flip vertically, e.g. with - - plane(framebuffer.width, -framebuffer.height).

    - path: .././src/content/reference/en//p5.Framebuffer/depth +chainable: false --- diff --git a/src/content/reference/en/p5/p5.Geometry.mdx b/src/content/reference/en/p5/p5.Geometry.mdx index 2fac07f57a..22ef373c5e 100644 --- a/src/content/reference/en/p5/p5.Geometry.mdx +++ b/src/content/reference/en/p5/p5.Geometry.mdx @@ -23,65 +23,7 @@ params:

    function to call upon object instantiation.

    type: Function optional: true -memberMethodPreviews: - clearColors: - description: > -

    Removes the internal colors of p5.Geometry. - - Using clearColors(), you can use fill() to - supply new colors before drawing each shape. - - If clearColors() is not used, the shapes will use their - internal colors by ignoring fill().

    - path: .././src/content/reference/en//p5.Geometry/clearColors - flipU: - description: | -

    Flips the U texture coordinates of the model.

    - path: .././src/content/reference/en//p5.Geometry/flipU - flipV: - description: | -

    Flips the V texture coordinates of the model.

    - path: .././src/content/reference/en//p5.Geometry/flipV - computeFaces: - description: | -

    computes faces for geometry objects based on the vertices.

    - path: .././src/content/reference/en//p5.Geometry/computeFaces - computeNormals: - description: > -

    This function calculates normals for each face, where each vertex's - normal is the average of the normals of all faces it's connected to. - - i.e computes smooth normals per vertex as an average of each face.

    - -

    When using FLAT shading, vertices are - disconnected/duplicated i.e each face has its own copy of vertices. - - When using SMOOTH shading, vertices are - connected/deduplicated i.e each face has its vertices shared with other - faces.

    - -

    Options can include:

    - - - path: .././src/content/reference/en//p5.Geometry/computeNormals - averageNormals: - description: | -

    Averages the vertex normals. Used in curved - surfaces

    - path: .././src/content/reference/en//p5.Geometry/averageNormals - averagePoleNormals: - description: | -

    Averages pole normals. Used in spherical primitives

    - path: .././src/content/reference/en//p5.Geometry/averagePoleNormals - normalize: - description: | -

    Modifies all vertices to be centered within the range -100 to 100.

    - path: .././src/content/reference/en//p5.Geometry/normalize +chainable: false --- diff --git a/src/content/reference/en/p5/p5.Graphics.mdx b/src/content/reference/en/p5/p5.Graphics.mdx index f155f2fd0a..a481bc1199 100644 --- a/src/content/reference/en/p5/p5.Graphics.mdx +++ b/src/content/reference/en/p5/p5.Graphics.mdx @@ -34,35 +34,7 @@ params:

    existing html canvas element

    type: HTMLCanvasElement optional: true -memberMethodPreviews: - reset: - description: > -

    Resets certain values such as those modified by functions in the - Transform category - - and in the Lights category that are not automatically reset - - with graphics buffer objects. Calling this in draw() will copy the behavior - - of the standard canvas.

    - path: .././src/content/reference/en//p5.Graphics/reset - remove: - description: | -

    Removes a Graphics object from the page and frees any resources - associated with it.

    - path: .././src/content/reference/en//p5.Graphics/remove - createFramebuffer: - description: > -

    Creates and returns a new p5.Framebuffer - - inside a p5.Graphics WebGL context.

    - -

    This takes the same parameters as the global - - createFramebuffer function.

    - 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 484eacd733..94de306de7 100644 --- a/src/content/reference/en/p5/p5.Image.mdx +++ b/src/content/reference/en/p5/p5.Image.mdx @@ -27,335 +27,59 @@ params: - name: height description: '' type: Number -memberMethodPreviews: - width: - description: | -

    Image width.

    - path: .././src/content/reference/en//p5.Image/width - height: - description: | -

    Image height.

    - path: .././src/content/reference/en//p5.Image/height - pixels: - description: > -

    An array containing the color of each pixel in the - - p5.Image object. Colors are stored as numbers - - representing red, green, blue, and alpha (RGBA) values. - img.pixels is a - - one-dimensional array for performance reasons.

    - -

    Each pixel occupies four elements in the pixels array, one for each - - RGBA value. For example, the pixel at coordinates (0, 0) stores its - - RGBA values at img.pixels[0], img.pixels[1], - img.pixels[2], - - and img.pixels[3], respectively. The next pixel at - coordinates (1, 0) - - stores its RGBA values at img.pixels[4], - img.pixels[5], - - img.pixels[6], and img.pixels[7]. And so on. The - img.pixels array - - for a 100×100 p5.Image object has - - 100 × 100 × 4 = 40,000 elements.

    - -

    Accessing the RGBA values for a pixel in the - - p5.Image object requires a little math as - - shown below. The img.loadPixels() - - method must be called before accessing the img.pixels array. - The - - img.updatePixels() method must be - - called after any changes are made.

    - path: .././src/content/reference/en//p5.Image/pixels - pixelDensity: - description: > -

    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 - - in a number to set the density. If a non-positive number is provided, - - it defaults to 1.

    - path: .././src/content/reference/en//p5.Image/pixelDensity - loadPixels: - description: > -

    Loads the current value of each pixel in the - - p5.Image object into the img.pixels - array. - - This method must be called before reading or modifying pixel values.

    - path: .././src/content/reference/en//p5.Image/loadPixels - updatePixels: - description: > -

    Updates the canvas with the RGBA values in the - - img.pixels array.

    - -

    img.updatePixels() only needs to be called after changing - values in - - the img.pixels array. Such changes can be - - made directly after calling - - img.loadPixels() or by calling - - img.set().

    - -

    The optional parameters x, y, - width, and height define a - - subsection of the p5.Image object to update. - - Doing so can improve performance in some cases.

    - -

    If the p5.Image object was loaded from a GIF, - - then calling img.updatePixels() will update the pixels in - current - - frame.

    - path: .././src/content/reference/en//p5.Image/updatePixels - get: - description: > -

    Gets a pixel or a region of pixels from a - - p5.Image object.

    - -

    img.get() is easy to use but it's not as fast as - - img.pixels. Use - - img.pixels to read many pixel values.

    - -

    The version of img.get() with no parameters returns the - entire image.

    - -

    The version of img.get() with two parameters interprets - them as - - coordinates. It returns an array with the [R, G, B, A] values - of the - - pixel at the given point.

    - -

    The version of img.get() with four parameters interprets - them as - - coordinates and dimensions. It returns a subsection of the canvas as a - - p5.Image object. The first two parameters are - - the coordinates for the upper-left corner of the subsection. The last two - - parameters are the width and height of the subsection.

    - -

    Use img.get() to work directly with - - p5.Image objects.

    - path: .././src/content/reference/en//p5.Image/get - set: - description: > -

    Sets the color of one or more pixels within a - - p5.Image object.

    - -

    img.set() is easy to use but it's not as fast as - - img.pixels. Use - - img.pixels to set many pixel values.

    - -

    img.set() interprets the first two parameters as x- and - y-coordinates. It - - interprets the last parameter as a grayscale value, a [R, G, B, - A] pixel - - array, a p5.Color object, or another - - p5.Image object.

    - -

    img.updatePixels() must be called - - after using img.set() for changes to appear.

    - path: .././src/content/reference/en//p5.Image/set - resize: - description: > -

    Resizes the p5.Image object to a given - width - - and height. The image's original aspect ratio can be kept by - passing 0 - - for either width or height. For example, calling - img.resize(50, 0) - - on an image that was 500 × 300 pixels will resize it to - - 50 × 30 pixels.

    - path: .././src/content/reference/en//p5.Image/resize - copy: - description: | -

    Copies pixels from a source p5.Image - to this one. Calling img.copy() will scale pixels from the source - region if it isn't the same size as the destination region.

    - path: .././src/content/reference/en//p5.Image/copy - mask: - description: | -

    Masks part of an image from displaying by loading another - image and using its alpha channel as an alpha channel for - this image. Masks are cumulative, once applied to an image - object, they cannot be removed.

    - path: .././src/content/reference/en//p5.Image/mask - filter: - description: > -

    Applies an image filter to the p5.Image - object. - - The preset options are:

    - -

    INVERT - - Inverts the colors in the image. No parameter is used.

    - -

    GRAY - - Converts the image to grayscale. No parameter is used.

    - -

    THRESHOLD - - Converts the image to black and white. Pixels with a grayscale value - - above a given threshold are converted to white. The rest are converted to - - black. The threshold must be between 0.0 (black) and 1.0 (white). If no - - value is specified, 0.5 is used.

    - -

    OPAQUE - - Sets the alpha channel to be entirely opaque. No parameter is used.

    - -

    POSTERIZE - - Limits the number of colors in the image. Each color channel is limited to - - the number of colors specified. Values between 2 and 255 are valid, but - - results are most noticeable with lower values. The default value is 4.

    - -

    BLUR - - Blurs the image. The level of blurring is specified by a blur radius. - Larger - - values increase the blur. The default value is 4. A gaussian blur is used - - in P2D mode. A box blur is used in WEBGL - mode.

    - -

    ERODE - - Reduces the light areas. No parameter is used.

    - -

    DILATE - - Increases the light areas. No parameter is used.

    - path: .././src/content/reference/en//p5.Image/filter - blend: - description: > -

    Copies a region of pixels from another - - p5.Image object into this one. The - blendMode - - parameter blends the images' colors to create different effects.

    - path: .././src/content/reference/en//p5.Image/blend - save: - description: > -

    Saves the p5.Image object to a file. - - The browser will either save the file immediately or prompt the user - - with a dialogue window.

    - -

    By default, calling img.save() will save the image as - untitled.png.

    - -

    Calling img.save() with one argument, as in - img.save('photo.png'), - - will set the image's filename and type together.

    - -

    Calling img.save() with two arguments, as in - - image.save('photo', 'png'), will set the image's filename and - type - - separately.

    - -

    The image will only be downloaded as an animated GIF if the - - p5.Image object was loaded from a GIF file. - - See saveGif() to create new GIFs.

    - path: .././src/content/reference/en//p5.Image/save - reset: - description: | -

    Restarts an animated GIF at its first frame.

    - path: .././src/content/reference/en//p5.Image/reset - getCurrentFrame: - description: | -

    Gets the index of the current frame in an animated GIF.

    - path: .././src/content/reference/en//p5.Image/getCurrentFrame - setFrame: - description: | -

    Sets the current frame in an animated GIF.

    - path: .././src/content/reference/en//p5.Image/setFrame - numFrames: - description: | -

    Returns the number of frames in an animated GIF.

    - path: .././src/content/reference/en//p5.Image/numFrames - play: - description: | -

    Plays an animated GIF that was paused with - img.pause().

    - path: .././src/content/reference/en//p5.Image/play - pause: - description: | -

    Pauses an animated GIF. The GIF can be resumed by calling - img.play().

    - path: .././src/content/reference/en//p5.Image/pause - delay: - description: > -

    Changes the delay between frames in an animated GIF.

    - -

    The second parameter, index, is optional. If provided, - only the frame - - at index will have its delay modified. All other frames will - keep - - their default delay.

    - path: .././src/content/reference/en//p5.Image/delay +example: + - |- + +
    + + let img; + + function preload() { + img = loadImage('assets/bricks.jpg'); + } + + function setup() { + image(img, 0, 0); + + describe('An image of a brick wall.'); + } + +
    + +
    + + let img; + + function preload() { + img = loadImage('assets/bricks.jpg'); + } + + function setup() { + img.filter(GRAY); + image(img, 0, 0); + + describe('A grayscale image of a brick wall.'); + } + +
    + +
    + + background(200); + let img = createImage(66, 66); + img.loadPixels(); + for (let x = 0; x < img.width; x += 1) { + for (let y = 0; y < img.height; y += 1) { + img.set(x, y, 0); + } + } + img.updatePixels(); + image(img, 17, 17); + + describe('A black square drawn in the middle of a gray square.'); + +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.MediaElement.mdx b/src/content/reference/en/p5/p5.MediaElement.mdx index 72128ab6d6..5ba8dfda50 100644 --- a/src/content/reference/en/p5/p5.MediaElement.mdx +++ b/src/content/reference/en/p5/p5.MediaElement.mdx @@ -24,187 +24,29 @@ params: description: |

    DOM node that is wrapped

    type: String -memberMethodPreviews: - src: - description: | -

    Path to the media element's source as a string.

    - path: .././src/content/reference/en//p5.MediaElement/src - play: - description: | -

    Play audio or video from a media element.

    - path: .././src/content/reference/en//p5.MediaElement/play - stop: - description: > -

    Stops a media element and sets its current time to zero. Calling - - media.play() will restart playing audio/video from the - beginning.

    - path: .././src/content/reference/en//p5.MediaElement/stop - pause: - description: > -

    Pauses a media element. Calling media.play() will resume - playing - - audio/video from the moment it paused.

    - path: .././src/content/reference/en//p5.MediaElement/pause - loop: - description: | -

    Play the audio/video repeatedly in a loop.

    - path: .././src/content/reference/en//p5.MediaElement/loop - noLoop: - description: | -

    Stops the audio/video from playing in a loop. It will stop when it - reaches the end.

    - path: .././src/content/reference/en//p5.MediaElement/noLoop - autoplay: - description: > -

    Sets the audio/video to play once it's loaded.

    - -

    The parameter, shouldAutoplay, is optional. Calling - - media.autoplay() without an argument causes the media to play - - automatically. If true is passed, as in - media.autoplay(true), the - - media will automatically play. If false is passed, as in - - media.autoPlay(false), it won't play automatically.

    - path: .././src/content/reference/en//p5.MediaElement/autoplay - volume: - description: > -

    Manages the audio/video volume.

    - -

    Calling media.volume() without an argument returns the - current volume - - as a number in the range 0 (off) to 1 (maximum).

    - -

    The parameter, val, is optional. It's a number that sets - the volume - - from 0 (off) to 1 (maximum). For example, calling - media.volume(0.5) - - sets the volume to half of its maximum.

    - path: .././src/content/reference/en//p5.MediaElement/volume - speed: - description: > -

    Manages the audio/video playback speed. Calling - media.speed() returns - - the current speed as a number.

    - -

    The parameter, val, is optional. It's a number that sets - the playback - - speed. 1 plays the media at normal speed, 0.5 plays it at half speed, 2 - - plays it at double speed, and so on. -1 plays the media at normal speed - - in reverse.

    - -

    Note: Not all browsers support backward playback. Even if they do, - - playback might not be smooth.

    - path: .././src/content/reference/en//p5.MediaElement/speed - time: - description: > -

    Manages the media element's playback time. Calling - media.time() - - returns the number of seconds the audio/video has played. Time resets to - - 0 when the looping media restarts.

    - -

    The parameter, time, is optional. It's a number that - specifies the - - time, in seconds, to jump to when playback begins.

    - path: .././src/content/reference/en//p5.MediaElement/time - duration: - description: | -

    Returns the audio/video's duration in seconds.

    - path: .././src/content/reference/en//p5.MediaElement/duration - onended: - description: > -

    Calls a function when the audio/video reaches the end of its playback - - The function won't be called if the media is looping.

    - -

    The p5.MediaElement is passed as an argument to the - callback function.

    - path: .././src/content/reference/en//p5.MediaElement/onended - connect: - description: | -

    Send the audio output of this element to a specified audioNode or - p5.sound object. If no element is provided, connects to p5's main - output. That connection is established when this method is first called. - All connections are removed by the .disconnect() method.

    -

    This method is meant to be used with the p5.sound.js addon library.

    - path: .././src/content/reference/en//p5.MediaElement/connect - disconnect: - description: | -

    Disconnect all Web Audio routing, including to main output. - This is useful if you want to re-route the output through - audio effects, for example.

    - path: .././src/content/reference/en//p5.MediaElement/disconnect - showControls: - description: > -

    Show the default - - HTMLMediaElement - - controls. These vary between web browser.

    - path: .././src/content/reference/en//p5.MediaElement/showControls - hideControls: - description: > -

    Hide the default - - HTMLMediaElement - - controls.

    - path: .././src/content/reference/en//p5.MediaElement/hideControls - addCue: - description: > -

    Schedules a function to call when the audio/video reaches a specific - time - - during its playback.

    - -

    The first parameter, time, is the time, in seconds, when - the function - - should run. This value is passed to callback as its first - argument.

    - -

    The second parameter, callback, is the function to call at - the specified - - cue time.

    - -

    The third parameter, value, is optional and can be any - type of value. - - value is passed to callback.

    - -

    Calling media.addCue() returns an ID as a string. This is - useful for - - removing the cue later.

    - path: .././src/content/reference/en//p5.MediaElement/addCue - removeCue: - description: | -

    Remove a callback based on its ID.

    - path: .././src/content/reference/en//p5.MediaElement/removeCue - clearCues: - description: | -

    Removes all functions scheduled with media.addCue().

    - path: .././src/content/reference/en//p5.MediaElement/clearCues +example: + - |- + +
    + + let capture; + + function setup() { + createCanvas(100, 100); + + // Create a p5.MediaElement using createCapture(). + capture = createCapture(VIDEO); + capture.hide(); + } + + function draw() { + // Display the video stream and invert the colors. + image(capture, 0, 0, width, width * capture.height / capture.width); + filter(INVERT); + } + +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.NumberDict.mdx b/src/content/reference/en/p5/p5.NumberDict.mdx index f9af24f01e..d22a6261fd 100644 --- a/src/content/reference/en/p5/p5.NumberDict.mdx +++ b/src/content/reference/en/p5/p5.NumberDict.mdx @@ -7,52 +7,7 @@ description: |

    A simple Dictionary class for Numbers.

    isConstructor: true line: 415 -memberMethodPreviews: - add: - 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: .././src/content/reference/en//p5.NumberDict/add - sub: - description: > -

    Subtract the given number from the value currently stored at the given - key. - - The difference then replaces the value previously stored in the - Dictionary.

    - path: .././src/content/reference/en//p5.NumberDict/sub - mult: - description: > -

    Multiply the given number with the value currently stored at the given - key. - - The product then replaces the value previously stored in the - Dictionary.

    - path: .././src/content/reference/en//p5.NumberDict/mult - div: - description: > -

    Divide the given number with the value currently stored at the given - key. - - The quotient then replaces the value previously stored in the - Dictionary.

    - path: .././src/content/reference/en//p5.NumberDict/div - minValue: - description: | -

    Return the lowest number currently stored in the Dictionary.

    - path: .././src/content/reference/en//p5.NumberDict/minValue - maxValue: - description: | -

    Return the highest number currently stored in the Dictionary.

    - path: .././src/content/reference/en//p5.NumberDict/maxValue - minKey: - description: | -

    Return the lowest key currently used in the Dictionary.

    - path: .././src/content/reference/en//p5.NumberDict/minKey - maxKey: - description: | -

    Return the highest key currently used in the Dictionary.

    - 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 d940fb3440..c3cca56c3c 100644 --- a/src/content/reference/en/p5/p5.PrintWriter.mdx +++ b/src/content/reference/en/p5/p5.PrintWriter.mdx @@ -4,6 +4,7 @@ module: IO submodule: Output file: src/io/files.js description: '' +isConstructor: false line: 1188 params: - name: filename diff --git a/src/content/reference/en/p5/p5.Renderer.mdx b/src/content/reference/en/p5/p5.Renderer.mdx index 0d70730a6c..81b4923f17 100644 --- a/src/content/reference/en/p5/p5.Renderer.mdx +++ b/src/content/reference/en/p5/p5.Renderer.mdx @@ -24,6 +24,7 @@ params:

    whether we're using it as main canvas

    type: Boolean optional: true +chainable: false --- diff --git a/src/content/reference/en/p5/p5.Shader.mdx b/src/content/reference/en/p5/p5.Shader.mdx index 8f77b12b7d..3401c4761b 100644 --- a/src/content/reference/en/p5/p5.Shader.mdx +++ b/src/content/reference/en/p5/p5.Shader.mdx @@ -21,73 +21,7 @@ params: description: |

    source code for the fragment shader (as a string)

    type: String -memberMethodPreviews: - copyToContext: - description: > -

    Shaders belong to the main canvas or a p5.Graphics. Once they are - compiled, - - they can only be used in the context they were compiled on.

    - -

    Use this method to make a new copy of a shader that gets compiled on a - - different context.

    - path: .././src/content/reference/en//p5.Shader/copyToContext - setUniform: - description: > -

    Used to set the uniforms of a - - p5.Shader object.

    - -

    Uniforms are used as a way to provide shader programs - - (which run on the GPU) with values from a sketch - - (which runs on the CPU).

    - -

    Here are some examples of uniforms you can make:

    - - - 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 7439d174c0..e2d96796af 100644 --- a/src/content/reference/en/p5/p5.StringDict.mdx +++ b/src/content/reference/en/p5/p5.StringDict.mdx @@ -5,6 +5,7 @@ submodule: Dictionary file: src/data/p5.TypedDict.js description: |

    A simple Dictionary class for Strings.

    +isConstructor: false line: 397 chainable: false --- diff --git a/src/content/reference/en/p5/p5.Table.mdx b/src/content/reference/en/p5/p5.Table.mdx index 5397937b2e..741cd90506 100644 --- a/src/content/reference/en/p5/p5.Table.mdx +++ b/src/content/reference/en/p5/p5.Table.mdx @@ -18,188 +18,7 @@ params:

    An array of p5.TableRow objects

    type: 'p5.TableRow[]' optional: true -memberMethodPreviews: - columns: - description: > -

    An array containing the names of the columns in the table, if the - "header" the table is - - loaded with the "header" parameter.

    - path: .././src/content/reference/en//p5.Table/columns - rows: - description: > -

    An array containing the p5.TableRow objects - that make up the - - rows of the table. The same result as calling getRows()

    - path: .././src/content/reference/en//p5.Table/rows - addRow: - description: > -

    Use addRow() to add a new row of data to a p5.Table object. By default, - - an empty row is created. Typically, you would store a reference to - - the new row in a TableRow object (see newRow in the example above), - - and then set individual values using set().

    - -

    If a p5.TableRow object is included as a - parameter, then that row is - - duplicated and added to the table.

    - path: .././src/content/reference/en//p5.Table/addRow - removeRow: - description: | -

    Removes a row from the table object.

    - 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: .././src/content/reference/en//p5.Table/getRow - getRows: - description: > -

    Gets all rows from the table. Returns an array of p5.TableRows.

    - path: .././src/content/reference/en//p5.Table/getRows - findRow: - description: | -

    Finds the first row in the Table that contains the value - provided, and returns a reference to that row. 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: .././src/content/reference/en//p5.Table/findRow - findRows: - description: | -

    Finds the rows in the Table that contain the value - 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 above. The column to search may be - specified by either its ID or title.

    - path: .././src/content/reference/en//p5.Table/findRows - matchRow: - description: | -

    Finds the first row in the Table that matches the regular - expression provided, and returns a reference to that row. - 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: .././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: .././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: .././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: .././src/content/reference/en//p5.Table/clearRows - addColumn: - description: > -

    Use addColumn() to add a new column to a - Table object. - - Typically, you will want to specify a title, so the column - - may be easily referenced later by name. (If no title is - - specified, the new column's title will be null.)

    - path: .././src/content/reference/en//p5.Table/addColumn - getColumnCount: - description: | -

    Returns the total number of columns in a Table.

    - path: .././src/content/reference/en//p5.Table/getColumnCount - getRowCount: - description: | -

    Returns the total number of rows in a Table.

    - 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: .././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: .././src/content/reference/en//p5.Table/trim - removeColumn: - description: > -

    Use removeColumn() to remove an - existing column from a Table - - object. The column to be removed may be identified by either - - its title (a String) or its index value (an int). - - removeColumn(0) would remove the first column, removeColumn(1) - - would remove the second column, and so on.

    - 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: .././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: .././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: .././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: .././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: .././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: .././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: .././src/content/reference/en//p5.Table/getObject - getArray: - description: > -

    Retrieves all table data and returns it as a multidimensional - array.

    - path: .././src/content/reference/en//p5.Table/getArray +chainable: false --- diff --git a/src/content/reference/en/p5/p5.TableRow.mdx b/src/content/reference/en/p5/p5.TableRow.mdx index 47934e981e..680d7d7c7f 100644 --- a/src/content/reference/en/p5/p5.TableRow.mdx +++ b/src/content/reference/en/p5/p5.TableRow.mdx @@ -23,39 +23,7 @@ params:

    comma separated values (csv) by default

    type: String optional: true -memberMethodPreviews: - set: - description: | -

    Stores a value in the TableRow's specified column. - The column may be specified by either its ID or title.

    - 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: .././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: .././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: .././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: .././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: .././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 0b86ca591e..0abe935c57 100644 --- a/src/content/reference/en/p5/p5.TypedDict.mdx +++ b/src/content/reference/en/p5/p5.TypedDict.mdx @@ -8,54 +8,7 @@ description: | typed Dictionary classes inherit from this class.

    isConstructor: true line: 82 -memberMethodPreviews: - size: - description: > -

    Returns the number of key-value pairs currently stored in the - Dictionary.

    - path: .././src/content/reference/en//p5.TypedDict/size - hasKey: - description: | -

    Returns true if the given key exists in the Dictionary, - otherwise returns false.

    - path: .././src/content/reference/en//p5.TypedDict/hasKey - get: - description: | -

    Returns the value stored at the given key.

    - 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: .././src/content/reference/en//p5.TypedDict/set - create: - description: | -

    Creates a new key-value pair in the Dictionary.

    - path: .././src/content/reference/en//p5.TypedDict/create - clear: - description: | -

    Removes all previously stored key-value pairs from the Dictionary.

    - path: .././src/content/reference/en//p5.TypedDict/clear - remove: - description: > -

    Removes the key-value pair stored at the given key from the - Dictionary.

    - path: .././src/content/reference/en//p5.TypedDict/remove - print: - description: > -

    Logs the set of items currently stored in the Dictionary to the - console.

    - path: .././src/content/reference/en//p5.TypedDict/print - saveTable: - description: | -

    Converts the Dictionary into a CSV file for local download.

    - path: .././src/content/reference/en//p5.TypedDict/saveTable - saveJSON: - description: | -

    Converts the Dictionary into a JSON file for local download.

    - 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 57d31d8748..615fcb6a03 100644 --- a/src/content/reference/en/p5/p5.Vector.mdx +++ b/src/content/reference/en/p5/p5.Vector.mdx @@ -45,424 +45,68 @@ params:

    z component of the vector.

    type: Number optional: true -memberMethodPreviews: - x: - description: | -

    The x component of the vector

    - path: .././src/content/reference/en//p5.Vector/x - 'y': - description: | -

    The y component of the vector

    - path: .././src/content/reference/en//p5.Vector/y - z: - description: | -

    The z component of the vector

    - path: .././src/content/reference/en//p5.Vector/z - toString: - description: | -

    Returns a string representation of a vector. This method is useful for - printing vectors to the console while debugging.

    - path: .././src/content/reference/en//p5.Vector/toString - set: - description: > -

    Sets the x, y, and z components - of the vector using separate numbers, - - a p5.Vector object, or an array of numbers. - - Calling set() with no arguments sets the vector's components - to 0.

    - path: .././src/content/reference/en//p5.Vector/set - copy: - description: | -

    Returns a copy of the p5.Vector object.

    - path: .././src/content/reference/en//p5.Vector/copy - add: - description: > -

    Adds to a vector's x, y, and z - components using separate numbers, - - another p5.Vector object, or an array of - numbers. - - Calling add() with no arguments has no effect.

    - -

    The static version of add(), as in p5.Vector.add(v2, - v1), returns a new - - p5.Vector object and doesn't change the - - originals.

    - path: .././src/content/reference/en//p5.Vector/add - rem: - description: > -

    Performs modulo (remainder) division with a vector's x, - y, and z - - components using separate numbers, another - - p5.Vector object, or an array of numbers.

    - -

    The static version of rem() as in p5.Vector.rem(v2, - v1), returns a new - - p5.Vector object and doesn't change the - - originals.

    - path: .././src/content/reference/en//p5.Vector/rem - sub: - description: > -

    Subtracts from a vector's x, y, and - z components using separate - - numbers, another p5.Vector object, or an array - of - - numbers. Calling sub() with no arguments has no effect.

    - -

    The static version of sub(), as in p5.Vector.sub(v2, - v1), returns a new - - p5.Vector object and doesn't change the - - originals.

    - path: .././src/content/reference/en//p5.Vector/sub - mult: - description: > -

    Multiplies a vector's x, y, and - z components by the same number, - - separate numbers, the components of another - - p5.Vector object, or an array of numbers. - Calling - - mult() with no arguments has no effect.

    - -

    The static version of mult(), as in - p5.Vector.mult(v, 2), returns a new - - p5.Vector object and doesn't change the - - originals.

    - path: .././src/content/reference/en//p5.Vector/mult - div: - description: > -

    Divides a vector's x, y, and z - components by the same number, - - separate numbers, the components of another - - p5.Vector object, or an array of numbers. - Calling - - div() with no arguments has no effect.

    - -

    The static version of div(), as in p5.Vector.div(v, - 2), returns a new - - p5.Vector object and doesn't change the - - originals.

    - path: .././src/content/reference/en//p5.Vector/div - mag: - description: | -

    Returns the magnitude (length) of the vector.

    - path: .././src/content/reference/en//p5.Vector/mag - magSq: - description: | -

    Returns the magnitude (length) of the vector squared.

    - path: .././src/content/reference/en//p5.Vector/magSq - dot: - description: > -

    Returns the dot product of two vectors. The dot product is a number - that - - describes the overlap between two vectors. Visually, the dot product can - be - - thought of as the "shadow" one vector casts on another. The dot product's - - magnitude is largest when two vectors point in the same or opposite - - directions. Its magnitude is 0 when two vectors form a right angle.

    - -

    The version of dot() with one parameter interprets it as - another - - p5.Vector object.

    - -

    The version of dot() with multiple parameters interprets - them as the - - x, y, and z components of another - vector.

    - -

    The static version of dot(), as in p5.Vector.dot(v1, - v2), is the same - - as calling v1.dot(v2).

    - path: .././src/content/reference/en//p5.Vector/dot - cross: - description: > -

    Returns the cross product of two vectors. The cross product is a vector - - that points straight out of the plane created by two vectors. The cross - - product's magnitude is the area of the parallelogram formed by the - original - - two vectors.

    - -

    The static version of cross(), as in - p5.Vector.cross(v1, v2), is the same - - as calling v1.cross(v2).

    - path: .././src/content/reference/en//p5.Vector/cross - dist: - description: > -

    Returns the distance between two points represented by vectors. A - point's +example: + - >- - coordinates can be thought of as a vector's components.

    +
    -

    The static version of dist(), as in - p5.Vector.dist(v1, v2), is the same + - as calling v1.dist(v2).

    + let p1 = createVector(25, 25); -

    Use dist() to calculate the distance between - points + let p2 = createVector(75, 75); - using coordinates as in dist(x1, y1, x2, y2).

    - path: .././src/content/reference/en//p5.Vector/dist - normalize: - description: > -

    Scales the components of a p5.Vector object - so - that its magnitude is 1.

    + strokeWeight(5); -

    The static version of normalize(), as in - p5.Vector.normalize(v), + point(p1); - returns a new p5.Vector object and doesn't - change + point(p2.x, p2.y); - the original.

    - path: .././src/content/reference/en//p5.Vector/normalize - limit: - description: > -

    Limits a vector's magnitude to a maximum value.

    -

    The static version of limit(), as in - p5.Vector.limit(v, 5), returns a + describe('Two black dots on a gray square, one at the top left and the other + at the bottom right.'); - new p5.Vector object and doesn't change the + - original.

    - path: .././src/content/reference/en//p5.Vector/limit - setMag: - description: > -

    Sets a vector's magnitude to a given value.

    +
    -

    The static version of setMag(), as in - p5.Vector.setMag(v, 10), returns - a new p5.Vector object and doesn't change the +

    - original.

    - path: .././src/content/reference/en//p5.Vector/setMag - heading: - description: > -

    Calculates the angle a 2D vector makes with the positive x-axis. Angles + - increase in the clockwise direction.

    + let pos; -

    If the vector was created with + let vel; - createVector(), heading() - returns angles - in the units of the current angleMode().

    + function setup() { + createCanvas(100, 100); + pos = createVector(width / 2, height); + vel = createVector(0, -1); + } -

    The static version of heading(), as in - p5.Vector.heading(v), works the - same way.

    - path: .././src/content/reference/en//p5.Vector/heading - setHeading: - description: > -

    Rotates a 2D vector to a specific angle without changing its magnitude. + function draw() { + background(200); - By convention, the positive x-axis has an angle of 0. Angles increase in + pos.add(vel); - the clockwise direction.

    + if (pos.y < 0) { + pos.y = height; + } -

    If the vector was created with + strokeWeight(5); + point(pos); - createVector(), setHeading() - uses + describe('A black dot moves from bottom to top on a gray square. The dot reappears at the bottom when it reaches the top.'); + } - the units of the current angleMode().

    - path: .././src/content/reference/en//p5.Vector/setHeading - rotate: - description: > -

    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 - - the clockwise direction.

    - -

    If the vector was created with - - createVector(), rotate() uses - - the units of the current angleMode().

    - -

    The static version of rotate(), as in - p5.Vector.rotate(v, PI), - - returns a new p5.Vector object and doesn't - change - - the original.

    - path: .././src/content/reference/en//p5.Vector/rotate - angleBetween: - description: > -

    Returns the angle between two vectors. The angles returned are signed, - - which means that v1.angleBetween(v2) === - -v2.angleBetween(v1).

    - -

    If the vector was created with - - createVector(), - angleBetween() returns - - angles in the units of the current - - angleMode().

    - path: .././src/content/reference/en//p5.Vector/angleBetween - lerp: - description: > -

    Calculates new x, y, and z - components that are proportionally the - - same distance between two vectors. The amt parameter is the - amount to - - interpolate between the old vector and the new vector. 0.0 keeps all - - components equal to the old vector's, 0.5 is halfway between, and 1.0 sets - - all components equal to the new vector's.

    - -

    The static version of lerp(), as in - p5.Vector.lerp(v0, v1, 0.5), - - returns a new p5.Vector object and doesn't - change - - the original.

    - path: .././src/content/reference/en//p5.Vector/lerp - slerp: - description: > -

    Calculates a new heading and magnitude that are between two vectors. - The - - amt parameter is the amount to interpolate between the old - vector and - - the new vector. 0.0 keeps the heading and magnitude equal to the old - - vector's, 0.5 sets them halfway between, and 1.0 sets the heading and - - magnitude equal to the new vector's.

    - -

    slerp() differs from lerp() - because - - it interpolates magnitude. Calling v0.slerp(v1, 0.5) sets - v0's - - magnitude to a value halfway between its original magnitude and - v1's. - - Calling v0.lerp(v1, 0.5) makes no such guarantee.

    - -

    The static version of slerp(), as in - p5.Vector.slerp(v0, v1, 0.5), - - returns a new p5.Vector object and doesn't - change - - the original.

    - path: .././src/content/reference/en//p5.Vector/slerp - reflect: - description: > -

    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 points away from - the - - shape.

    - -

    The static version of reflect(), as in - p5.Vector.reflect(v, n), - - returns a new p5.Vector object and doesn't - change - - the original.

    - path: .././src/content/reference/en//p5.Vector/reflect - array: - description: | -

    Returns the vector's components as an array of numbers.

    - path: .././src/content/reference/en//p5.Vector/array - equals: - description: > -

    Returns true if the vector's components are all the same - as another - - vector's and false if not.

    - -

    The version of equals() with one parameter interprets it - as another - - p5.Vector object.

    - -

    The version of equals() with multiple parameters - interprets them as the - - components of another vector. Any missing parameters are assigned the - value - - 0.

    - -

    The static version of equals(), as in - p5.Vector.equals(v0, v1), - - interprets both parameters as p5.Vector - objects.

    - path: .././src/content/reference/en//p5.Vector/equals - fromAngle: - description: | -

    Make a new 2D vector from an angle.

    - path: .././src/content/reference/en//p5.Vector/fromAngle - fromAngles: - description: | -

    Make a new 3D vector from a pair of ISO spherical angles.

    - path: .././src/content/reference/en//p5.Vector/fromAngles - random2D: - description: | -

    Make a new 2D unit vector with a random heading.

    - path: .././src/content/reference/en//p5.Vector/random2D - random3D: - description: | -

    Make a new 3D unit vector with a random heading.

    - path: .././src/content/reference/en//p5.Vector/random3D +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.XML.mdx b/src/content/reference/en/p5/p5.XML.mdx index 04ab0218b5..897b8aaed5 100644 --- a/src/content/reference/en/p5/p5.XML.mdx +++ b/src/content/reference/en/p5/p5.XML.mdx @@ -10,130 +10,45 @@ description: > objects.

    isConstructor: true line: 9 -memberMethodPreviews: - getParent: - description: | -

    Gets a copy of the element's parent. Returns the parent as another - p5.XML object.

    - path: .././src/content/reference/en//p5.XML/getParent - getName: - description: | -

    Gets the element's full name, which is returned as a String.

    - path: .././src/content/reference/en//p5.XML/getName - setName: - description: | -

    Sets the element's name, which is specified as a String.

    - path: .././src/content/reference/en//p5.XML/setName - hasChildren: - description: > -

    Checks whether or not the element has any children, and returns the - result - - as a boolean.

    - path: .././src/content/reference/en//p5.XML/hasChildren - listChildren: - description: > -

    Get the names of all of the element's children, and returns the names - as an - - array of Strings. This is the same as looping through and calling getName() - - on each child element individually.

    - path: .././src/content/reference/en//p5.XML/listChildren - getChildren: - description: > -

    Returns all of the element's children as an array of p5.XML objects. When - - the name parameter is specified, then it will return all children that - match - - that name.

    - path: .././src/content/reference/en//p5.XML/getChildren - getChild: - description: > -

    Returns the first of the element's children that matches the name - parameter - - or the child of the given index.It returns undefined if no matching - - child is found.

    - path: .././src/content/reference/en//p5.XML/getChild - addChild: - description: > -

    Appends a new child to the element. The child can be specified with - - either a String, which will be used as the new tag's name, or as a - - reference to an existing p5.XML object. - - A reference to the newly created child is returned as an p5.XML object.

    - path: .././src/content/reference/en//p5.XML/addChild - removeChild: - description: | -

    Removes the element specified by name or index.

    - path: .././src/content/reference/en//p5.XML/removeChild - getAttributeCount: - description: > -

    Counts the specified element's number of attributes, returned as an - Number.

    - path: .././src/content/reference/en//p5.XML/getAttributeCount - listAttributes: - description: | -

    Gets all of the specified element's attributes, and returns them as an - array of Strings.

    - path: .././src/content/reference/en//p5.XML/listAttributes - hasAttribute: - description: | -

    Checks whether or not an element has the specified attribute.

    - path: .././src/content/reference/en//p5.XML/hasAttribute - getNum: - description: > -

    Returns an attribute value of the element as an Number. If the - defaultValue - - parameter is specified and the attribute doesn't exist, then defaultValue - - is returned. If no defaultValue is specified and the attribute doesn't - - exist, the value 0 is returned.

    - path: .././src/content/reference/en//p5.XML/getNum - getString: - description: > -

    Returns an attribute value of the element as an String. If the - defaultValue - - parameter is specified and the attribute doesn't exist, then defaultValue - - is returned. If no defaultValue is specified and the attribute doesn't - - exist, null is returned.

    - path: .././src/content/reference/en//p5.XML/getString - setAttribute: - description: > -

    Sets the content of an element's attribute. The first parameter - specifies - - the attribute name, while the second specifies the new content.

    - path: .././src/content/reference/en//p5.XML/setAttribute - getContent: - description: | -

    Returns the content of an element. If there is no such content, - defaultValue is returned if specified, otherwise null is returned.

    - path: .././src/content/reference/en//p5.XML/getContent - setContent: - description: | -

    Sets the element's content.

    - path: .././src/content/reference/en//p5.XML/setContent - serialize: - description: > -

    Serializes the element into a string. This function is useful for - preparing - - the content to be sent over a http request or saved to file.

    - path: .././src/content/reference/en//p5.XML/serialize +example: + - |- + +
    + // The following short XML file called "mammals.xml" is parsed + // in the code below. + // + // + // <mammals> + // <animal id="0" species="Capra hircus">Goat</animal> + // <animal id="1" species="Panthera pardus">Leopard</animal> + // <animal id="2" species="Equus zebra">Zebra</animal> + // </mammals> + + let xml; + + function preload() { + xml = loadXML('assets/mammals.xml'); + } + + function setup() { + let children = xml.getChildren('animal'); + + for (let i = 0; i < children.length; i++) { + let id = children[i].getNum('id'); + let coloring = children[i].getString('species'); + let name = children[i].getContent(); + print(id + ', ' + coloring + ', ' + name); + } + + describe('no image displayed'); + } + + // Sketch prints: + // 0, Capra hircus, Goat + // 1, Panthera pardus, Leopard + // 2, Equus zebra, Zebra +
    +chainable: false --- diff --git a/src/content/reference/en/p5/p5.mdx b/src/content/reference/en/p5/p5.mdx index 4540987bf8..4a39b485f5 100644 --- a/src/content/reference/en/p5/p5.mdx +++ b/src/content/reference/en/p5/p5.mdx @@ -32,6 +32,7 @@ params: return: description: a p5 instance type: P5 +chainable: false --- diff --git a/src/content/reference/en/p5/pAccelerationX.mdx b/src/content/reference/en/p5/pAccelerationX.mdx index e24b3a3c3a..ab820c95e9 100644 --- a/src/content/reference/en/p5/pAccelerationX.mdx +++ b/src/content/reference/en/p5/pAccelerationX.mdx @@ -7,6 +7,7 @@ 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 is represented as meters per second squared.

    +isConstructor: false line: 90 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pAccelerationY.mdx b/src/content/reference/en/p5/pAccelerationY.mdx index ebbcc8070f..d144d16a60 100644 --- a/src/content/reference/en/p5/pAccelerationY.mdx +++ b/src/content/reference/en/p5/pAccelerationY.mdx @@ -7,6 +7,7 @@ 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 is represented as meters per second squared.

    +isConstructor: false line: 100 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pAccelerationZ.mdx b/src/content/reference/en/p5/pAccelerationZ.mdx index 730abb4a50..db18f878d9 100644 --- a/src/content/reference/en/p5/pAccelerationZ.mdx +++ b/src/content/reference/en/p5/pAccelerationZ.mdx @@ -7,6 +7,7 @@ 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 is represented as meters per second squared.

    +isConstructor: false line: 110 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pRotationX.mdx b/src/content/reference/en/p5/pRotationX.mdx index 54c9422128..0844b44d7b 100644 --- a/src/content/reference/en/p5/pRotationX.mdx +++ b/src/content/reference/en/p5/pRotationX.mdx @@ -11,6 +11,7 @@ description: | be -PI to PI.

    pRotationX can also be used with rotationX to determine the rotate direction of the device along the X-axis.

    +isConstructor: false line: 234 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pRotationY.mdx b/src/content/reference/en/p5/pRotationY.mdx index 6d596134e5..43bfa65f42 100644 --- a/src/content/reference/en/p5/pRotationY.mdx +++ b/src/content/reference/en/p5/pRotationY.mdx @@ -11,6 +11,7 @@ description: | be -PI/2 to PI/2.

    pRotationY can also be used with rotationY to determine the rotate direction of the device along the Y-axis.

    +isConstructor: false line: 278 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pRotationZ.mdx b/src/content/reference/en/p5/pRotationZ.mdx index a14700bdf9..9cb181e90d 100644 --- a/src/content/reference/en/p5/pRotationZ.mdx +++ b/src/content/reference/en/p5/pRotationZ.mdx @@ -11,6 +11,7 @@ description: | be 0 to 2*PI.

    pRotationZ can also be used with rotationZ to determine the rotate direction of the device along the Z-axis.

    +isConstructor: false line: 321 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/perspective.mdx b/src/content/reference/en/p5/perspective.mdx index 978d369c72..fded0f396a 100644 --- a/src/content/reference/en/p5/perspective.mdx +++ b/src/content/reference/en/p5/perspective.mdx @@ -57,6 +57,7 @@ description: > 10); +isConstructor: false line: 121 params: - name: fovy @@ -81,6 +82,7 @@ params: type: Number optional: true itemtype: method +alt: 'two colored 3D boxes move back and forth, rotating as mouse is dragged.' class: p5 example: - |- @@ -116,7 +118,6 @@ example: } -alt: 'two colored 3D boxes move back and forth, rotating as mouse is dragged.' chainable: true --- diff --git a/src/content/reference/en/p5/pixelDensity.mdx b/src/content/reference/en/p5/pixelDensity.mdx index b8ee598524..2cd464de6d 100644 --- a/src/content/reference/en/p5/pixelDensity.mdx +++ b/src/content/reference/en/p5/pixelDensity.mdx @@ -14,6 +14,7 @@ description: > pixel density.

    +isConstructor: false line: 943 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/pixels.mdx b/src/content/reference/en/p5/pixels.mdx index 72fbcf298b..019abf4abd 100644 --- a/src/content/reference/en/p5/pixels.mdx +++ b/src/content/reference/en/p5/pixels.mdx @@ -47,6 +47,7 @@ description: > updatePixels() function must be called after any changes are made.

    +isConstructor: false line: 12 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/plane.mdx b/src/content/reference/en/p5/plane.mdx index 9665ed5eb4..15aba5a798 100644 --- a/src/content/reference/en/p5/plane.mdx +++ b/src/content/reference/en/p5/plane.mdx @@ -5,6 +5,7 @@ submodule: 3D Primitives file: src/webgl/3d_primitives.js description: |

    Draw a plane with given a width and height

    +isConstructor: false line: 183 params: - name: width @@ -30,6 +31,14 @@ params: type: Integer optional: true itemtype: method +alt: |- + Nothing displayed on canvas + Rotating interior view of a box with sides that change color. + 3d red and green gradient. + Rotating interior view of a cylinder with sides that change color. + Rotating view of a cylinder with sides that change color. + 3d red and green gradient. + rotating view of a multi-colored cylinder with concave sides. class: p5 example: - |- @@ -49,14 +58,6 @@ example: } -alt: |- - Nothing displayed on canvas - Rotating interior view of a box with sides that change color. - 3d red and green gradient. - Rotating interior view of a cylinder with sides that change color. - Rotating view of a cylinder with sides that change color. - 3d red and green gradient. - rotating view of a multi-colored cylinder with concave sides. chainable: true --- diff --git a/src/content/reference/en/p5/pmouseX.mdx b/src/content/reference/en/p5/pmouseX.mdx index aa1dff441e..e6a9f9d74c 100644 --- a/src/content/reference/en/p5/pmouseX.mdx +++ b/src/content/reference/en/p5/pmouseX.mdx @@ -14,6 +14,7 @@ description: > mouseX value at the start of each touch event.

    +isConstructor: false line: 128 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pmouseY.mdx b/src/content/reference/en/p5/pmouseY.mdx index bb4be821d3..1b3201a975 100644 --- a/src/content/reference/en/p5/pmouseY.mdx +++ b/src/content/reference/en/p5/pmouseY.mdx @@ -14,6 +14,7 @@ description: > mouseY value at the start of each touch event.

    +isConstructor: false line: 159 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/point.mdx b/src/content/reference/en/p5/point.mdx index c89debc864..e97252e4f3 100644 --- a/src/content/reference/en/p5/point.mdx +++ b/src/content/reference/en/p5/point.mdx @@ -25,6 +25,7 @@ description: > set with a p5.Vector object.

    +isConstructor: false line: 416 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/pointLight.mdx b/src/content/reference/en/p5/pointLight.mdx index 01f959e678..52f07a3cea 100644 --- a/src/content/reference/en/p5/pointLight.mdx +++ b/src/content/reference/en/p5/pointLight.mdx @@ -14,8 +14,12 @@ description: | within draw() to remain persistent in a looping program. Placing them in setup() will cause them to only have an effect the first time through the loop.

    +isConstructor: false line: 373 itemtype: method +alt: |- + scene with sphere and point light. The position of + the light is controlled with the mouse position. class: p5 example: - |- @@ -46,9 +50,6 @@ example: } -alt: |- - scene with sphere and point light. The position of - the light is controlled with the mouse position. chainable: true --- diff --git a/src/content/reference/en/p5/pop.mdx b/src/content/reference/en/p5/pop.mdx index a6c22243f8..7905bc01ae 100644 --- a/src/content/reference/en/p5/pop.mdx +++ b/src/content/reference/en/p5/pop.mdx @@ -97,8 +97,12 @@ description: > normalMaterial() and shader().

    +isConstructor: false line: 290 itemtype: method +alt: |- + Gold ellipse + thick black outline @center 2 white ellipses on left and right. + 2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right. class: p5 example: - |- @@ -137,9 +141,6 @@ example: ellipse(100, 50, 33, 33); // Right circle -alt: |- - Gold ellipse + thick black outline @center 2 white ellipses on left and right. - 2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right. chainable: false --- diff --git a/src/content/reference/en/p5/pow.mdx b/src/content/reference/en/p5/pow.mdx index 05342bc577..fd0187ecfe 100644 --- a/src/content/reference/en/p5/pow.mdx +++ b/src/content/reference/en/p5/pow.mdx @@ -8,6 +8,7 @@ description: |

    For example, pow(2, 3) is equivalent to the expression 2 × 2 × 2. pow(2, -3) is equivalent to 1 ÷ (2 × 2 × 2).

    +isConstructor: false line: 601 params: - name: 'n' diff --git a/src/content/reference/en/p5/preload.mdx b/src/content/reference/en/p5/preload.mdx index 06b287ffbe..09aec0ebc1 100644 --- a/src/content/reference/en/p5/preload.mdx +++ b/src/content/reference/en/p5/preload.mdx @@ -28,8 +28,10 @@ description: > loading page, include an HTML element with id "p5_loading" in your page. More information here.

    +isConstructor: false line: 41 itemtype: method +alt: nothing displayed class: p5 example: - |- @@ -54,7 +56,6 @@ example: image(img, 25, 25, 50, 50); } -alt: nothing displayed chainable: false --- diff --git a/src/content/reference/en/p5/print.mdx b/src/content/reference/en/p5/print.mdx index 6213cf54eb..a7efa85931 100644 --- a/src/content/reference/en/p5/print.mdx +++ b/src/content/reference/en/p5/print.mdx @@ -15,6 +15,7 @@ description: > print() without an argument opens the browser's dialog for printing documents.

    +isConstructor: false line: 21 params: - name: contents diff --git a/src/content/reference/en/p5/push.mdx b/src/content/reference/en/p5/push.mdx index 59f95cc25d..bc95d47494 100644 --- a/src/content/reference/en/p5/push.mdx +++ b/src/content/reference/en/p5/push.mdx @@ -97,8 +97,12 @@ description: > normalMaterial() and shader().

    +isConstructor: false line: 192 itemtype: method +alt: |- + Gold ellipse + thick black outline @center 2 white ellipses on left and right. + 2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right. class: p5 example: - |- @@ -137,9 +141,6 @@ example: ellipse(100, 50, 33, 33); // Right circle -alt: |- - Gold ellipse + thick black outline @center 2 white ellipses on left and right. - 2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right. chainable: false --- diff --git a/src/content/reference/en/p5/pwinMouseX.mdx b/src/content/reference/en/p5/pwinMouseX.mdx index fa95cee433..5c9c56bfc5 100644 --- a/src/content/reference/en/p5/pwinMouseX.mdx +++ b/src/content/reference/en/p5/pwinMouseX.mdx @@ -8,6 +8,7 @@ description: | of the mouse in the frame previous to the current frame, relative to (0, 0) of the window. Note: pwinMouseX will be reset to the current winMouseX value at the start of each touch event.

    +isConstructor: false line: 263 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/pwinMouseY.mdx b/src/content/reference/en/p5/pwinMouseY.mdx index 1c2662f138..c1568e4fbc 100644 --- a/src/content/reference/en/p5/pwinMouseY.mdx +++ b/src/content/reference/en/p5/pwinMouseY.mdx @@ -8,6 +8,7 @@ description: | the mouse in the frame previous to the current frame, relative to (0, 0) of the window. Note: pwinMouseY will be reset to the current winMouseY value at the start of each touch event.

    +isConstructor: false line: 302 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/quad.mdx b/src/content/reference/en/p5/quad.mdx index 1c2a38a999..149169d70e 100644 --- a/src/content/reference/en/p5/quad.mdx +++ b/src/content/reference/en/p5/quad.mdx @@ -23,6 +23,7 @@ description: > in 3D space. Doing so requires adding the WEBGL argument to createCanvas().

    +isConstructor: false line: 507 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/quadraticVertex.mdx b/src/content/reference/en/p5/quadraticVertex.mdx index b60b87ba95..e8121aa7c6 100644 --- a/src/content/reference/en/p5/quadraticVertex.mdx +++ b/src/content/reference/en/p5/quadraticVertex.mdx @@ -29,8 +29,12 @@ description: > and only when there is no MODE or POINTS parameter specified to beginShape().

    +isConstructor: false line: 772 itemtype: method +alt: |- + arched-shaped black line with 4 pixel thick stroke weight. + backwards s-shaped black line with 4 pixel thick stroke weight. class: p5 example: - |- @@ -72,9 +76,6 @@ example: endShape(); -alt: |- - arched-shaped black line with 4 pixel thick stroke weight. - backwards s-shaped black line with 4 pixel thick stroke weight. chainable: true --- diff --git a/src/content/reference/en/p5/random.mdx b/src/content/reference/en/p5/random.mdx index 4cc16c6df4..5de3dfe209 100644 --- a/src/content/reference/en/p5/random.mdx +++ b/src/content/reference/en/p5/random.mdx @@ -4,6 +4,7 @@ module: Math submodule: Random file: src/math/random.js description: "

    Returns a random number or a random element from an array.

    \n

    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.

    \n

    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.

    \n

    The version of random() with no parameters returns a random number from 0\nup to but not including 1.

    \n

    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.

    \n

    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.

    \n" +isConstructor: false line: 70 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/randomGaussian.mdx b/src/content/reference/en/p5/randomGaussian.mdx index 85f1b72d27..1a6fef2edd 100644 --- a/src/content/reference/en/p5/randomGaussian.mdx +++ b/src/content/reference/en/p5/randomGaussian.mdx @@ -40,6 +40,7 @@ description: > the first argument passed as the mean and the second as the standard deviation.

    +isConstructor: false line: 193 params: - name: mean diff --git a/src/content/reference/en/p5/randomSeed.mdx b/src/content/reference/en/p5/randomSeed.mdx index 0983d13ebd..48e6c8832f 100644 --- a/src/content/reference/en/p5/randomSeed.mdx +++ b/src/content/reference/en/p5/randomSeed.mdx @@ -19,6 +19,7 @@ description: > the same results each time a sketch is run.

    +isConstructor: false line: 37 params: - name: seed diff --git a/src/content/reference/en/p5/rect.mdx b/src/content/reference/en/p5/rect.mdx index 18e8d6d559..b2e4d9384d 100644 --- a/src/content/reference/en/p5/rect.mdx +++ b/src/content/reference/en/p5/rect.mdx @@ -31,6 +31,7 @@ description: > clockwise around the rectangle. If any of these parameters are omitted, they are set to the value of the last specified corner radius.

    +isConstructor: false line: 603 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/rectMode.mdx b/src/content/reference/en/p5/rectMode.mdx index b01512b9c9..cf0013ac74 100644 --- a/src/content/reference/en/p5/rectMode.mdx +++ b/src/content/reference/en/p5/rectMode.mdx @@ -40,6 +40,7 @@ description: > CORNERS are defined this way. JavaScript is a case-sensitive language.

    +isConstructor: false line: 108 params: - name: mode diff --git a/src/content/reference/en/p5/red.mdx b/src/content/reference/en/p5/red.mdx index e2b63588ca..2c4424e168 100644 --- a/src/content/reference/en/p5/red.mdx +++ b/src/content/reference/en/p5/red.mdx @@ -7,6 +7,7 @@ description: |

    Extracts the red value from a p5.Color object, array of color components, or CSS color string.

    +isConstructor: false line: 505 params: - name: color diff --git a/src/content/reference/en/p5/redraw.mdx b/src/content/reference/en/p5/redraw.mdx index 8b9aa86813..06edd48bf6 100644 --- a/src/content/reference/en/p5/redraw.mdx +++ b/src/content/reference/en/p5/redraw.mdx @@ -33,6 +33,7 @@ description: >

    In addition you can set the number of redraws per method call. Just add an integer as single parameter for the number of redraws.

    +isConstructor: false line: 391 params: - name: 'n' @@ -41,6 +42,9 @@ params: type: Integer optional: true itemtype: method +alt: |- + black line on far left of canvas + black line on far left of canvas class: p5 example: - |- @@ -85,9 +89,6 @@ example: } -alt: |- - black line on far left of canvas - black line on far left of canvas chainable: false --- diff --git a/src/content/reference/en/p5/removeElements.mdx b/src/content/reference/en/p5/removeElements.mdx index 9615830252..bcf19f15e3 100644 --- a/src/content/reference/en/p5/removeElements.mdx +++ b/src/content/reference/en/p5/removeElements.mdx @@ -9,6 +9,7 @@ description: | canvas elements created by createCanvas and p5.Render objects created by createGraphics.

    +isConstructor: false line: 240 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/removeItem.mdx b/src/content/reference/en/p5/removeItem.mdx index 797e59d933..ce44413757 100644 --- a/src/content/reference/en/p5/removeItem.mdx +++ b/src/content/reference/en/p5/removeItem.mdx @@ -5,6 +5,7 @@ submodule: LocalStorage file: src/data/local_storage.js description: |

    Removes an item that was stored with storeItem()

    +isConstructor: false line: 201 params: - name: key diff --git a/src/content/reference/en/p5/requestPointerLock.mdx b/src/content/reference/en/p5/requestPointerLock.mdx index d5daf3a70d..af67320ae3 100644 --- a/src/content/reference/en/p5/requestPointerLock.mdx +++ b/src/content/reference/en/p5/requestPointerLock.mdx @@ -21,6 +21,7 @@ description: > even if it is repeatedly moved into one direction. For example, a first person perspective experience.

    +isConstructor: false line: 960 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/resetMatrix.mdx b/src/content/reference/en/p5/resetMatrix.mdx index d284b01a11..71e3b26a34 100644 --- a/src/content/reference/en/p5/resetMatrix.mdx +++ b/src/content/reference/en/p5/resetMatrix.mdx @@ -5,8 +5,10 @@ submodule: Transform file: src/core/transform.js description: |

    Replaces the current matrix with the identity matrix.

    +isConstructor: false line: 197 itemtype: method +alt: A rotated rectangle in the center with another at the top left corner class: p5 example: - |- @@ -21,7 +23,6 @@ example: rect(0, 0, 20, 20); -alt: A rotated rectangle in the center with another at the top left corner chainable: true --- diff --git a/src/content/reference/en/p5/resetShader.mdx b/src/content/reference/en/p5/resetShader.mdx index d2cc249155..e5d4c8c2c5 100644 --- a/src/content/reference/en/p5/resetShader.mdx +++ b/src/content/reference/en/p5/resetShader.mdx @@ -7,8 +7,14 @@ description: |

    Restores the default shaders. Code that runs after resetShader() will not be affected by the shader previously set by shader()

    +isConstructor: false line: 440 itemtype: method +alt: >- + Two rotating cubes. The left one is painted using a custom (user-defined) + shader, + + while the right one is painted using the default fill shader. class: p5 example: - |- @@ -85,11 +91,6 @@ example: } -alt: >- - Two rotating cubes. The left one is painted using a custom (user-defined) - shader, - - while the right one is painted using the default fill shader. chainable: true --- diff --git a/src/content/reference/en/p5/resizeCanvas.mdx b/src/content/reference/en/p5/resizeCanvas.mdx index 086c6de87e..299d80dc49 100644 --- a/src/content/reference/en/p5/resizeCanvas.mdx +++ b/src/content/reference/en/p5/resizeCanvas.mdx @@ -7,6 +7,7 @@ description: |

    Resizes the canvas to given width and height. The canvas will be cleared and draw will be called immediately, allowing the sketch to re-render itself in the resized canvas.

    +isConstructor: false line: 162 params: - name: w @@ -23,6 +24,7 @@ params: type: Boolean optional: true itemtype: method +alt: No image displayed. class: p5 example: - |- @@ -40,7 +42,6 @@ example: resizeCanvas(windowWidth, windowHeight); } -alt: No image displayed. chainable: false --- diff --git a/src/content/reference/en/p5/reverse.mdx b/src/content/reference/en/p5/reverse.mdx index 77a59fba46..ea589b6154 100644 --- a/src/content/reference/en/p5/reverse.mdx +++ b/src/content/reference/en/p5/reverse.mdx @@ -5,6 +5,7 @@ submodule: Array Functions file: src/utilities/array_functions.js description: |

    Reverses the order of an array, maps to Array.reverse()

    +isConstructor: false line: 141 params: - name: list diff --git a/src/content/reference/en/p5/rotate.mdx b/src/content/reference/en/p5/rotate.mdx index 6974e95c1e..8b836c5d6b 100644 --- a/src/content/reference/en/p5/rotate.mdx +++ b/src/content/reference/en/p5/rotate.mdx @@ -29,6 +29,7 @@ description: > by a rotation matrix. This function can be further controlled by push() and pop().

    +isConstructor: false line: 222 params: - name: angle @@ -42,6 +43,7 @@ params: type: 'p5.Vector|Number[]' optional: true itemtype: method +alt: white 52×52 rect with black outline at center rotated counter 45 degrees class: p5 example: - |- @@ -53,7 +55,6 @@ example: rect(-26, -26, 52, 52); -alt: white 52×52 rect with black outline at center rotated counter 45 degrees chainable: true --- diff --git a/src/content/reference/en/p5/rotateX.mdx b/src/content/reference/en/p5/rotateX.mdx index 22b584506e..6ed172f27b 100644 --- a/src/content/reference/en/p5/rotateX.mdx +++ b/src/content/reference/en/p5/rotateX.mdx @@ -14,6 +14,7 @@ description: > All transformations are reset when draw() begins again.

    +isConstructor: false line: 261 params: - name: angle @@ -22,6 +23,7 @@ params: or degrees, depending on current angleMode

    type: Number itemtype: method +alt: 3d box rotating around the x axis. class: p5 example: - |- @@ -40,7 +42,6 @@ example: } -alt: 3d box rotating around the x axis. chainable: true --- diff --git a/src/content/reference/en/p5/rotateY.mdx b/src/content/reference/en/p5/rotateY.mdx index 8b44f171a8..08a51f667a 100644 --- a/src/content/reference/en/p5/rotateY.mdx +++ b/src/content/reference/en/p5/rotateY.mdx @@ -14,6 +14,7 @@ description: > All transformations are reset when draw() begins again.

    +isConstructor: false line: 299 params: - name: angle @@ -22,6 +23,7 @@ params: or degrees, depending on current angleMode

    type: Number itemtype: method +alt: 3d box rotating around the y axis. class: p5 example: - |- @@ -40,7 +42,6 @@ example: } -alt: 3d box rotating around the y axis. chainable: true --- diff --git a/src/content/reference/en/p5/rotateZ.mdx b/src/content/reference/en/p5/rotateZ.mdx index afbda81746..b190bad4d7 100644 --- a/src/content/reference/en/p5/rotateZ.mdx +++ b/src/content/reference/en/p5/rotateZ.mdx @@ -16,6 +16,7 @@ description: > All transformations are reset when draw() begins again.

    +isConstructor: false line: 337 params: - name: angle @@ -24,6 +25,7 @@ params: or degrees, depending on current angleMode

    type: Number itemtype: method +alt: 3d box rotating around the z axis. class: p5 example: - |- @@ -42,7 +44,6 @@ example: } -alt: 3d box rotating around the z axis. chainable: true --- diff --git a/src/content/reference/en/p5/rotationX.mdx b/src/content/reference/en/p5/rotationX.mdx index 12ed0f5995..abf56f7dfb 100644 --- a/src/content/reference/en/p5/rotationX.mdx +++ b/src/content/reference/en/p5/rotationX.mdx @@ -11,6 +11,7 @@ description: |

    Note: The order the rotations are called is important, ie. if used together, it must be called in the order Z-X-Y or there might be unexpected behaviour.

    +isConstructor: false line: 131 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/rotationY.mdx b/src/content/reference/en/p5/rotationY.mdx index a01bb9dbf6..e204bb2c8c 100644 --- a/src/content/reference/en/p5/rotationY.mdx +++ b/src/content/reference/en/p5/rotationY.mdx @@ -11,6 +11,7 @@ description: |

    Note: The order the rotations are called is important, ie. if used together, it must be called in the order Z-X-Y or there might be unexpected behaviour.

    +isConstructor: false line: 164 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/rotationZ.mdx b/src/content/reference/en/p5/rotationZ.mdx index 34bfea5344..bb74a969a9 100644 --- a/src/content/reference/en/p5/rotationZ.mdx +++ b/src/content/reference/en/p5/rotationZ.mdx @@ -13,6 +13,7 @@ description: |

    Note: The order the rotations are called is important, ie. if used together, it must be called in the order Z-X-Y or there might be unexpected behaviour.

    +isConstructor: false line: 197 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/sampleRate.mdx b/src/content/reference/en/p5/sampleRate.mdx index d5e8f55afc..25319cbccc 100644 --- a/src/content/reference/en/p5/sampleRate.mdx +++ b/src/content/reference/en/p5/sampleRate.mdx @@ -9,6 +9,7 @@ description: | sampling rate of your operating system's sound card, and it is not currently possile to change. It is often 44100, or twice the range of human hearing.

    +isConstructor: false line: 811 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/saturation.mdx b/src/content/reference/en/p5/saturation.mdx index 81a87c9097..86b4fb0c03 100644 --- a/src/content/reference/en/p5/saturation.mdx +++ b/src/content/reference/en/p5/saturation.mdx @@ -10,6 +10,7 @@ description: |

    Saturation is scaled differently in HSB and HSL. By default, this function returns the HSL saturation. If the colorMode() is set to HSB, it returns the HSB saturation.

    +isConstructor: false line: 535 params: - name: color diff --git a/src/content/reference/en/p5/save.mdx b/src/content/reference/en/p5/save.mdx index 2730967cac..96a40b1009 100644 --- a/src/content/reference/en/p5/save.mdx +++ b/src/content/reference/en/p5/save.mdx @@ -18,6 +18,7 @@ description: | Note that it is not recommended to call this method within draw, as it will open a new save dialog on every render.

    +isConstructor: false line: 1381 params: - name: objectOrFilename diff --git a/src/content/reference/en/p5/saveCanvas.mdx b/src/content/reference/en/p5/saveCanvas.mdx index 4ac18f9a8f..493e3feb35 100644 --- a/src/content/reference/en/p5/saveCanvas.mdx +++ b/src/content/reference/en/p5/saveCanvas.mdx @@ -6,6 +6,7 @@ file: src/image/image.js description: |

    Saves the current canvas as an image. The browser will either save the file immediately or prompt the user with a dialogue window.

    +isConstructor: false line: 97 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/saveFrames.mdx b/src/content/reference/en/p5/saveFrames.mdx index 8c072e088e..c5cb7e825c 100644 --- a/src/content/reference/en/p5/saveFrames.mdx +++ b/src/content/reference/en/p5/saveFrames.mdx @@ -45,6 +45,7 @@ description: > frame: imageData, filename, and extension.

    +isConstructor: false line: 460 params: - name: filename diff --git a/src/content/reference/en/p5/saveGif.mdx b/src/content/reference/en/p5/saveGif.mdx index 47c778fa85..45015060b7 100644 --- a/src/content/reference/en/p5/saveGif.mdx +++ b/src/content/reference/en/p5/saveGif.mdx @@ -26,6 +26,7 @@ description: > silent, notificationDuration, and notificationID.

    +isConstructor: false line: 188 params: - name: filename diff --git a/src/content/reference/en/p5/saveJSON.mdx b/src/content/reference/en/p5/saveJSON.mdx index c682f0dc0f..3a892c344d 100644 --- a/src/content/reference/en/p5/saveJSON.mdx +++ b/src/content/reference/en/p5/saveJSON.mdx @@ -7,6 +7,7 @@ description: |

    Writes the contents of an Array or a JSON object to a .json file. The file saving process and location of the saved file will vary between web browsers.

    +isConstructor: false line: 1525 params: - name: json diff --git a/src/content/reference/en/p5/saveSound.mdx b/src/content/reference/en/p5/saveSound.mdx index 4ad3e90a5c..80c861e9af 100644 --- a/src/content/reference/en/p5/saveSound.mdx +++ b/src/content/reference/en/p5/saveSound.mdx @@ -12,6 +12,7 @@ description: > p5.SoundFile.saveBlob.

    +isConstructor: false line: 1145 params: - name: soundFile diff --git a/src/content/reference/en/p5/saveStrings.mdx b/src/content/reference/en/p5/saveStrings.mdx index 091988b785..c13f719530 100644 --- a/src/content/reference/en/p5/saveStrings.mdx +++ b/src/content/reference/en/p5/saveStrings.mdx @@ -7,6 +7,7 @@ description: |

    Writes an array of Strings to a text file, one line per String. The file saving process and location of the saved file will vary between web browsers.

    +isConstructor: false line: 1580 params: - name: list diff --git a/src/content/reference/en/p5/saveTable.mdx b/src/content/reference/en/p5/saveTable.mdx index 94d4b9ceba..fe4ef587b1 100644 --- a/src/content/reference/en/p5/saveTable.mdx +++ b/src/content/reference/en/p5/saveTable.mdx @@ -14,6 +14,7 @@ description: > The file saving process and location of the saved file will vary between web browsers.

    +isConstructor: false line: 1642 params: - name: Table diff --git a/src/content/reference/en/p5/scale.mdx b/src/content/reference/en/p5/scale.mdx index f76b1cd6bb..1d5db76900 100644 --- a/src/content/reference/en/p5/scale.mdx +++ b/src/content/reference/en/p5/scale.mdx @@ -28,8 +28,12 @@ description: > This function can be further controlled with push() and pop().

    +isConstructor: false line: 377 itemtype: method +alt: |- + white 52×52 rect with black outline at center rotated counter 45 degrees + 2 white rects with black outline- 1 50×50 at center. other 25×65 bottom left class: p5 example: - |- @@ -49,9 +53,6 @@ example: rect(30, 20, 50, 50); -alt: |- - white 52×52 rect with black outline at center rotated counter 45 degrees - 2 white rects with black outline- 1 50×50 at center. other 25×65 bottom left chainable: true --- diff --git a/src/content/reference/en/p5/second.mdx b/src/content/reference/en/p5/second.mdx index 21bcfecc2c..79160109e9 100644 --- a/src/content/reference/en/p5/second.mdx +++ b/src/content/reference/en/p5/second.mdx @@ -8,6 +8,7 @@ description: > href="#/p5/second">second() function returns the current second as a value from 0 - 59.

    +isConstructor: false line: 112 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/select.mdx b/src/content/reference/en/p5/select.mdx index 2836e53507..c7c2649f12 100644 --- a/src/content/reference/en/p5/select.mdx +++ b/src/content/reference/en/p5/select.mdx @@ -26,6 +26,7 @@ description: > HTMLElement object.

    +isConstructor: false line: 21 params: - name: selectors diff --git a/src/content/reference/en/p5/selectAll.mdx b/src/content/reference/en/p5/selectAll.mdx index bb6d01dad5..a4898dacbe 100644 --- a/src/content/reference/en/p5/selectAll.mdx +++ b/src/content/reference/en/p5/selectAll.mdx @@ -26,6 +26,7 @@ description: > HTMLElement object.

    +isConstructor: false line: 103 params: - name: selectors diff --git a/src/content/reference/en/p5/set.mdx b/src/content/reference/en/p5/set.mdx index b5a29e354d..9e355ea2af 100644 --- a/src/content/reference/en/p5/set.mdx +++ b/src/content/reference/en/p5/set.mdx @@ -29,6 +29,7 @@ description: >

    updatePixels() must be called after using set() for changes to appear.

    +isConstructor: false line: 801 params: - name: x diff --git a/src/content/reference/en/p5/setAttributes.mdx b/src/content/reference/en/p5/setAttributes.mdx index d2ad7c401a..f333671a20 100644 --- a/src/content/reference/en/p5/setAttributes.mdx +++ b/src/content/reference/en/p5/setAttributes.mdx @@ -35,8 +35,10 @@ description: | default, WebGL 2 will be requested. If WebGL2 is not available, it will fall back to WebGL 1. You can check what version is used with by looking at the global webglVersion property.

    +isConstructor: false line: 112 itemtype: method +alt: a rotating cube with smoother edges class: p5 example: - |- @@ -134,7 +136,6 @@ example: } -alt: a rotating cube with smoother edges chainable: false --- diff --git a/src/content/reference/en/p5/setBPM.mdx b/src/content/reference/en/p5/setBPM.mdx index ec42b9c704..ea8a2029e2 100644 --- a/src/content/reference/en/p5/setBPM.mdx +++ b/src/content/reference/en/p5/setBPM.mdx @@ -6,6 +6,7 @@ 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.

    +isConstructor: false line: 9084 params: - name: BPM diff --git a/src/content/reference/en/p5/setCamera.mdx b/src/content/reference/en/p5/setCamera.mdx index 0d2e7cc92d..a105dca60a 100644 --- a/src/content/reference/en/p5/setCamera.mdx +++ b/src/content/reference/en/p5/setCamera.mdx @@ -6,6 +6,7 @@ file: src/webgl/p5.Camera.js description: |

    Sets the current (active) camera of a 3D sketch. Allows for switching between multiple cameras.

    +isConstructor: false line: 2222 params: - name: cam @@ -13,6 +14,9 @@ params:

    p5.Camera object

    type: p5.Camera itemtype: method +alt: |- + Canvas switches between two camera views, each showing a series of spinning + 3D boxes. class: p5 example: - |- @@ -82,9 +86,6 @@ example: } -alt: |- - Canvas switches between two camera views, each showing a series of spinning - 3D boxes. chainable: false --- diff --git a/src/content/reference/en/p5/setMoveThreshold.mdx b/src/content/reference/en/p5/setMoveThreshold.mdx index 6bea4bf9b5..8e764848d6 100644 --- a/src/content/reference/en/p5/setMoveThreshold.mdx +++ b/src/content/reference/en/p5/setMoveThreshold.mdx @@ -9,6 +9,7 @@ description: > the deviceMoved() function. The default threshold is set to 0.5.

    +isConstructor: false line: 417 params: - name: value diff --git a/src/content/reference/en/p5/setShakeThreshold.mdx b/src/content/reference/en/p5/setShakeThreshold.mdx index 7ca0d612f3..76f8c5949a 100644 --- a/src/content/reference/en/p5/setShakeThreshold.mdx +++ b/src/content/reference/en/p5/setShakeThreshold.mdx @@ -9,6 +9,7 @@ description: > the deviceShaken() function. The default threshold is set to 30.

    +isConstructor: false line: 459 params: - name: value diff --git a/src/content/reference/en/p5/setup.mdx b/src/content/reference/en/p5/setup.mdx index b629f0c593..ccffdcfd91 100644 --- a/src/content/reference/en/p5/setup.mdx +++ b/src/content/reference/en/p5/setup.mdx @@ -20,8 +20,10 @@ description: > accessible within other functions, including draw().

    +isConstructor: false line: 82 itemtype: method +alt: nothing displayed class: p5 example: - |- @@ -39,7 +41,6 @@ example: rect(a++ % width, 10, 2, 80); } -alt: nothing displayed chainable: false --- diff --git a/src/content/reference/en/p5/shader.mdx b/src/content/reference/en/p5/shader.mdx index 6c38a5214d..1337afacdb 100644 --- a/src/content/reference/en/p5/shader.mdx +++ b/src/content/reference/en/p5/shader.mdx @@ -51,6 +51,7 @@ description: >

    Note, shaders can only be used in WEBGL mode.

    +isConstructor: false line: 331 params: - name: s @@ -59,6 +60,10 @@ params: to use for rendering shapes.

    type: p5.Shader itemtype: method +alt: >- + canvas toggles between a circular gradient of orange and blue vertically. and + a circular gradient of red and green moving horizontally when mouse is + clicked/pressed. class: p5 example: - |- @@ -122,10 +127,6 @@ example: } -alt: >- - canvas toggles between a circular gradient of orange and blue vertically. and - a circular gradient of red and green moving horizontally when mouse is - clicked/pressed. chainable: true --- diff --git a/src/content/reference/en/p5/shearX.mdx b/src/content/reference/en/p5/shearX.mdx index 278b15cbb7..998d48e5a3 100644 --- a/src/content/reference/en/p5/shearX.mdx +++ b/src/content/reference/en/p5/shearX.mdx @@ -29,6 +29,7 @@ description: > controlled by the push() and pop() functions.

    +isConstructor: false line: 451 params: - name: angle @@ -37,6 +38,7 @@ params: depending on current angleMode

    type: Number itemtype: method +alt: white irregular quadrilateral with black outline at top middle. class: p5 example: - |- @@ -48,7 +50,6 @@ example: rect(0, 0, 30, 30); -alt: white irregular quadrilateral with black outline at top middle. chainable: true --- diff --git a/src/content/reference/en/p5/shearY.mdx b/src/content/reference/en/p5/shearY.mdx index 284c6b5ede..b99c10bdb9 100644 --- a/src/content/reference/en/p5/shearY.mdx +++ b/src/content/reference/en/p5/shearY.mdx @@ -29,6 +29,7 @@ description: > rotation matrix. This function can be further controlled by the push() and pop() functions.

    +isConstructor: false line: 490 params: - name: angle @@ -37,6 +38,7 @@ params: depending on current angleMode

    type: Number itemtype: method +alt: white irregular quadrilateral with black outline at middle bottom. class: p5 example: - |- @@ -48,7 +50,6 @@ example: rect(0, 0, 30, 30); -alt: white irregular quadrilateral with black outline at middle bottom. chainable: true --- diff --git a/src/content/reference/en/p5/shininess.mdx b/src/content/reference/en/p5/shininess.mdx index 65ec641fb6..ac12c31092 100644 --- a/src/content/reference/en/p5/shininess.mdx +++ b/src/content/reference/en/p5/shininess.mdx @@ -7,6 +7,7 @@ description: |

    Sets the amount of gloss ("shininess") of a specularMaterial().

    The default and minimum value is 1.

    +isConstructor: false line: 1139 params: - name: shine @@ -14,6 +15,7 @@ params:

    degree of shininess

    type: Number itemtype: method +alt: 'two spheres, one more shiny than the other' class: p5 example: - |- @@ -41,7 +43,6 @@ example: } -alt: 'two spheres, one more shiny than the other' chainable: true --- diff --git a/src/content/reference/en/p5/shorten.mdx b/src/content/reference/en/p5/shorten.mdx index 13f9a80ab8..342bab729c 100644 --- a/src/content/reference/en/p5/shorten.mdx +++ b/src/content/reference/en/p5/shorten.mdx @@ -6,6 +6,7 @@ file: src/utilities/array_functions.js description: |

    Decreases an array by one element and returns the shortened array, maps to Array.pop().

    +isConstructor: false line: 161 params: - name: list diff --git a/src/content/reference/en/p5/shuffle.mdx b/src/content/reference/en/p5/shuffle.mdx index 47e9e2ff63..5eac0fcbe8 100644 --- a/src/content/reference/en/p5/shuffle.mdx +++ b/src/content/reference/en/p5/shuffle.mdx @@ -7,6 +7,7 @@ description: |

    Randomizes the order of the elements of an array. Implements Fisher-Yates Shuffle Algorithm.

    +isConstructor: false line: 185 params: - name: array diff --git a/src/content/reference/en/p5/sin.mdx b/src/content/reference/en/p5/sin.mdx index 4b725bb44f..d00037052f 100644 --- a/src/content/reference/en/p5/sin.mdx +++ b/src/content/reference/en/p5/sin.mdx @@ -12,6 +12,7 @@ description: > input angle increases. sin() takes into account the current angleMode.

    +isConstructor: false line: 239 params: - name: angle diff --git a/src/content/reference/en/p5/smooth.mdx b/src/content/reference/en/p5/smooth.mdx index 7c47c9215f..7943e63a33 100644 --- a/src/content/reference/en/p5/smooth.mdx +++ b/src/content/reference/en/p5/smooth.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 718 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/sort.mdx b/src/content/reference/en/p5/sort.mdx index 59db133cb7..2906b6d272 100644 --- a/src/content/reference/en/p5/sort.mdx +++ b/src/content/reference/en/p5/sort.mdx @@ -9,6 +9,7 @@ description: | re-ordered array is returned. The count parameter states the number of elements to sort. For example, if there are 12 elements in an array and count is set to 5, only the first 5 elements in the array will be sorted.

    +isConstructor: false line: 227 params: - name: list diff --git a/src/content/reference/en/p5/soundFormats.mdx b/src/content/reference/en/p5/soundFormats.mdx index da5dcb0c27..86f9c34006 100644 --- a/src/content/reference/en/p5/soundFormats.mdx +++ b/src/content/reference/en/p5/soundFormats.mdx @@ -9,6 +9,7 @@ description: | a format that is compatable with the client's web browser. Here is a free online file converter.

    +isConstructor: false line: 925 params: - name: formats diff --git a/src/content/reference/en/p5/soundOut.mdx b/src/content/reference/en/p5/soundOut.mdx index 4ad73e0003..b08ffe6dae 100644 --- a/src/content/reference/en/p5/soundOut.mdx +++ b/src/content/reference/en/p5/soundOut.mdx @@ -12,6 +12,7 @@ description: > Web Audio API nodes including a dyanmicsCompressor (.limiter), and Gain Nodes for .input and .output.

    +isConstructor: false line: 782 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/specularColor.mdx b/src/content/reference/en/p5/specularColor.mdx index bbeea19092..ef0af67106 100644 --- a/src/content/reference/en/p5/specularColor.mdx +++ b/src/content/reference/en/p5/specularColor.mdx @@ -28,8 +28,12 @@ description: > lightSpecular.

    +isConstructor: false line: 134 itemtype: method +alt: |- + Sphere with specular highlight. Clicking the mouse toggles the + specular highlight color between red and the default white. class: p5 example: - |- @@ -74,9 +78,6 @@ example: } -alt: |- - Sphere with specular highlight. Clicking the mouse toggles the - specular highlight color between red and the default white. chainable: true --- diff --git a/src/content/reference/en/p5/specularMaterial.mdx b/src/content/reference/en/p5/specularMaterial.mdx index 927217cad5..89748a7b64 100644 --- a/src/content/reference/en/p5/specularMaterial.mdx +++ b/src/content/reference/en/p5/specularMaterial.mdx @@ -32,8 +32,10 @@ description: >

    You can view more materials in this example.

    +isConstructor: false line: 1053 itemtype: method +alt: torus with specular material class: p5 example: - |- @@ -62,7 +64,6 @@ example: } -alt: torus with specular material chainable: true --- diff --git a/src/content/reference/en/p5/sphere.mdx b/src/content/reference/en/p5/sphere.mdx index a2d1c4e4ee..da6f7a380b 100644 --- a/src/content/reference/en/p5/sphere.mdx +++ b/src/content/reference/en/p5/sphere.mdx @@ -14,6 +14,7 @@ description: > smoother. The recommended maximum values are both 24. Using a value greater than 24 may cause a warning or slow down the browser.

    +isConstructor: false line: 389 params: - name: radius diff --git a/src/content/reference/en/p5/splice.mdx b/src/content/reference/en/p5/splice.mdx index 36e3d58300..e1007e75aa 100644 --- a/src/content/reference/en/p5/splice.mdx +++ b/src/content/reference/en/p5/splice.mdx @@ -10,6 +10,7 @@ description: | value which specifies the array position from which to insert data. (Remember that array index numbering starts at zero, so the first position is 0, the second position is 1, and so on.)

    +isConstructor: false line: 273 params: - name: list diff --git a/src/content/reference/en/p5/split.mdx b/src/content/reference/en/p5/split.mdx index 0a55765d8c..16ee63092e 100644 --- a/src/content/reference/en/p5/split.mdx +++ b/src/content/reference/en/p5/split.mdx @@ -19,6 +19,7 @@ description: > splits using a range of characters instead of a specific character or sequence.

    +isConstructor: false line: 427 params: - name: value diff --git a/src/content/reference/en/p5/splitTokens.mdx b/src/content/reference/en/p5/splitTokens.mdx index db7052d7c3..c11c1b94b9 100644 --- a/src/content/reference/en/p5/splitTokens.mdx +++ b/src/content/reference/en/p5/splitTokens.mdx @@ -16,6 +16,7 @@ description: > split. Whitespace characters include tab (\t), line feed (\n), carriage return (\r), form feed (\f), and space.

    +isConstructor: false line: 458 params: - name: value diff --git a/src/content/reference/en/p5/spotLight.mdx b/src/content/reference/en/p5/spotLight.mdx index f638462071..77ef367362 100644 --- a/src/content/reference/en/p5/spotLight.mdx +++ b/src/content/reference/en/p5/spotLight.mdx @@ -43,8 +43,12 @@ description: > Placing them in setup() will cause them to only have an effect the first time through the loop.

    +isConstructor: false line: 747 itemtype: method +alt: |- + scene with sphere and spot light. The position of + the light is controlled with the mouse position. class: p5 example: - |- @@ -76,9 +80,6 @@ example: } -alt: |- - scene with sphere and spot light. The position of - the light is controlled with the mouse position. chainable: true --- diff --git a/src/content/reference/en/p5/sq.mdx b/src/content/reference/en/p5/sq.mdx index 62acd77a3b..2cf8d6cb3f 100644 --- a/src/content/reference/en/p5/sq.mdx +++ b/src/content/reference/en/p5/sq.mdx @@ -14,6 +14,7 @@ description: > -3 × -3 which is also 9. Multiplying two negative numbers produces a positive number.

    +isConstructor: false line: 670 params: - name: 'n' diff --git a/src/content/reference/en/p5/sqrt.mdx b/src/content/reference/en/p5/sqrt.mdx index 36a89e5952..d4114e8850 100644 --- a/src/content/reference/en/p5/sqrt.mdx +++ b/src/content/reference/en/p5/sqrt.mdx @@ -15,6 +15,7 @@ description: > arguments such as sqrt(-9).

    +isConstructor: false line: 700 params: - name: 'n' diff --git a/src/content/reference/en/p5/square.mdx b/src/content/reference/en/p5/square.mdx index eecd7d4c28..0de9a46df5 100644 --- a/src/content/reference/en/p5/square.mdx +++ b/src/content/reference/en/p5/square.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 341 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/storeItem.mdx b/src/content/reference/en/p5/storeItem.mdx index 8aaa289441..1b0a72a4d7 100644 --- a/src/content/reference/en/p5/storeItem.mdx +++ b/src/content/reference/en/p5/storeItem.mdx @@ -12,6 +12,7 @@ description: | see getItem. Sensitive data such as passwords or personal information should not be stored in local storage.

    +isConstructor: false line: 10 params: - name: key diff --git a/src/content/reference/en/p5/str.mdx b/src/content/reference/en/p5/str.mdx index d7a39a535f..340553ec65 100644 --- a/src/content/reference/en/p5/str.mdx +++ b/src/content/reference/en/p5/str.mdx @@ -7,6 +7,7 @@ description: |

    Converts a boolean, string or number to its string representation. When an array of values is passed in, then an array of strings of the same length is returned.

    +isConstructor: false line: 86 params: - name: 'n' diff --git a/src/content/reference/en/p5/string.mdx b/src/content/reference/en/p5/string.mdx index ab64eb7b63..2aaccbed50 100644 --- a/src/content/reference/en/p5/string.mdx +++ b/src/content/reference/en/p5/string.mdx @@ -17,8 +17,10 @@ description: > MDN entry: A string is a sequence of characters used to represent text.

    +isConstructor: false line: 309 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -29,7 +31,6 @@ example: console.log(typeof mood); // prints 'string' to the console -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/stroke.mdx b/src/content/reference/en/p5/stroke.mdx index 7b03fac310..b4b5ad42dc 100644 --- a/src/content/reference/en/p5/stroke.mdx +++ b/src/content/reference/en/p5/stroke.mdx @@ -4,6 +4,7 @@ module: Constants submodule: Constants file: src/core/constants.js description: '' +isConstructor: false line: 660 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/strokeCap.mdx b/src/content/reference/en/p5/strokeCap.mdx index 1ae7b70187..b11279f771 100644 --- a/src/content/reference/en/p5/strokeCap.mdx +++ b/src/content/reference/en/p5/strokeCap.mdx @@ -18,6 +18,7 @@ description: > PROJECT are defined this way. JavaScript is a case-sensitive language.

    +isConstructor: false line: 209 params: - name: cap diff --git a/src/content/reference/en/p5/strokeJoin.mdx b/src/content/reference/en/p5/strokeJoin.mdx index 281c95b69c..4e3e0b2560 100644 --- a/src/content/reference/en/p5/strokeJoin.mdx +++ b/src/content/reference/en/p5/strokeJoin.mdx @@ -19,6 +19,7 @@ description: > are defined this way. JavaScript is a case-sensitive language.

    +isConstructor: false line: 247 params: - name: join diff --git a/src/content/reference/en/p5/strokeWeight.mdx b/src/content/reference/en/p5/strokeWeight.mdx index 064bee261e..83962cbf4a 100644 --- a/src/content/reference/en/p5/strokeWeight.mdx +++ b/src/content/reference/en/p5/strokeWeight.mdx @@ -12,6 +12,7 @@ description: > scaling that has been applied previously.

    +isConstructor: false line: 314 params: - name: weight diff --git a/src/content/reference/en/p5/subset.mdx b/src/content/reference/en/p5/subset.mdx index a7c1dbf018..be94359c39 100644 --- a/src/content/reference/en/p5/subset.mdx +++ b/src/content/reference/en/p5/subset.mdx @@ -10,6 +10,7 @@ description: | given, elements will be extracted from the start to the end of the array. When specifying the start, remember that the first array element is 0. This function does not change the source array.

    +isConstructor: false line: 308 params: - name: list diff --git a/src/content/reference/en/p5/tan.mdx b/src/content/reference/en/p5/tan.mdx index 15ea24a9f6..8fe845ac6e 100644 --- a/src/content/reference/en/p5/tan.mdx +++ b/src/content/reference/en/p5/tan.mdx @@ -13,6 +13,7 @@ description: > tan() takes into account the current angleMode.

    +isConstructor: false line: 295 params: - name: angle diff --git a/src/content/reference/en/p5/textAlign.mdx b/src/content/reference/en/p5/textAlign.mdx index deee91c8fb..5ae43a6e54 100644 --- a/src/content/reference/en/p5/textAlign.mdx +++ b/src/content/reference/en/p5/textAlign.mdx @@ -34,6 +34,7 @@ description: > BOTTOM, CENTER, or BASELINE.

    +isConstructor: false line: 11 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textAscent.mdx b/src/content/reference/en/p5/textAscent.mdx index 67446ec6e9..6383b4c8d8 100644 --- a/src/content/reference/en/p5/textAscent.mdx +++ b/src/content/reference/en/p5/textAscent.mdx @@ -7,6 +7,7 @@ description: |

    Returns the ascent of the current font at its current size. The ascent represents the distance, in pixels, of the tallest character above the baseline.

    +isConstructor: false line: 258 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textDescent.mdx b/src/content/reference/en/p5/textDescent.mdx index fbc8f4838e..106d23238c 100644 --- a/src/content/reference/en/p5/textDescent.mdx +++ b/src/content/reference/en/p5/textDescent.mdx @@ -7,6 +7,7 @@ description: |

    Returns the descent of the current font at its current size. The descent represents the distance, in pixels, of the character with the longest descender below the baseline.

    +isConstructor: false line: 310 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textFont.mdx b/src/content/reference/en/p5/textFont.mdx index 40aac8fc7b..3fb5dfee6c 100644 --- a/src/content/reference/en/p5/textFont.mdx +++ b/src/content/reference/en/p5/textFont.mdx @@ -22,6 +22,7 @@ description: >

    Note: WEBGL mode only supports fonts loaded with loadFont().

    +isConstructor: false line: 335 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textLeading.mdx b/src/content/reference/en/p5/textLeading.mdx index 209015e763..ce43284e8b 100644 --- a/src/content/reference/en/p5/textLeading.mdx +++ b/src/content/reference/en/p5/textLeading.mdx @@ -10,6 +10,7 @@ description: >

    Calling textLeading() without an argument returns the current spacing.

    +isConstructor: false line: 85 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textOutput.mdx b/src/content/reference/en/p5/textOutput.mdx index 3f68524fec..82c50848af 100644 --- a/src/content/reference/en/p5/textOutput.mdx +++ b/src/content/reference/en/p5/textOutput.mdx @@ -59,6 +59,7 @@ description: > How to label your p5.js code to learn more about making sketches accessible.

    +isConstructor: false line: 10 params: - name: display diff --git a/src/content/reference/en/p5/textSize.mdx b/src/content/reference/en/p5/textSize.mdx index 9b1874c18f..5ad65ceff2 100644 --- a/src/content/reference/en/p5/textSize.mdx +++ b/src/content/reference/en/p5/textSize.mdx @@ -10,6 +10,7 @@ description: >

    Calling textSize() without an arugment returns the current size.

    +isConstructor: false line: 119 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textStyle.mdx b/src/content/reference/en/p5/textStyle.mdx index 08e77450aa..b4a91600bf 100644 --- a/src/content/reference/en/p5/textStyle.mdx +++ b/src/content/reference/en/p5/textStyle.mdx @@ -15,6 +15,7 @@ description: > doesn't affect fonts loaded with loadFont().

    +isConstructor: false line: 152 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/textWidth.mdx b/src/content/reference/en/p5/textWidth.mdx index cdccd27ccf..269c1f3b01 100644 --- a/src/content/reference/en/p5/textWidth.mdx +++ b/src/content/reference/en/p5/textWidth.mdx @@ -6,6 +6,7 @@ file: src/typography/attributes.js description: |

    Returns the maximum width of a string of text drawn when text() is called.

    +isConstructor: false line: 192 params: - name: str diff --git a/src/content/reference/en/p5/textWrap.mdx b/src/content/reference/en/p5/textWrap.mdx index 9c3e29f517..a1f6b752d1 100644 --- a/src/content/reference/en/p5/textWrap.mdx +++ b/src/content/reference/en/p5/textWrap.mdx @@ -30,6 +30,7 @@ description: >

    Calling textWrap() without an argument returns the current style.

    +isConstructor: false line: 369 params: - name: style diff --git a/src/content/reference/en/p5/textureMode.mdx b/src/content/reference/en/p5/textureMode.mdx index b6d6218b4d..b2e45be60c 100644 --- a/src/content/reference/en/p5/textureMode.mdx +++ b/src/content/reference/en/p5/textureMode.mdx @@ -16,6 +16,7 @@ description: > size of a quad would require the points (0,0) (100, 0) (100,200) (0,200). The same mapping in NORMAL is (0,0) (1,0) (1,1) (0,1).

    +isConstructor: false line: 674 params: - name: mode @@ -23,6 +24,7 @@ params:

    either IMAGE or NORMAL

    type: Constant itemtype: method +alt: 'quad with a texture, mapped using image coordinates' class: p5 example: - |- @@ -79,7 +81,6 @@ example: } -alt: 'quad with a texture, mapped using image coordinates' chainable: false --- diff --git a/src/content/reference/en/p5/textureWrap.mdx b/src/content/reference/en/p5/textureWrap.mdx index f457a269ea..fe0ac7fcf2 100644 --- a/src/content/reference/en/p5/textureWrap.mdx +++ b/src/content/reference/en/p5/textureWrap.mdx @@ -28,6 +28,7 @@ description: >

    If only one argument is provided, it will be applied to both the horizontal and vertical axes.

    +isConstructor: false line: 752 params: - name: wrapX @@ -40,6 +41,7 @@ params: type: Constant optional: true itemtype: method +alt: an image of the rocky mountains repeated in mirrored tiles class: p5 example: - |- @@ -82,7 +84,6 @@ example: } -alt: an image of the rocky mountains repeated in mirrored tiles chainable: false --- diff --git a/src/content/reference/en/p5/tint.mdx b/src/content/reference/en/p5/tint.mdx index f9b449f2d6..c772f4f6b1 100644 --- a/src/content/reference/en/p5/tint.mdx +++ b/src/content/reference/en/p5/tint.mdx @@ -36,6 +36,7 @@ description: > images a red tint and make them transparent.

    +isConstructor: false line: 1098 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/torus.mdx b/src/content/reference/en/p5/torus.mdx index db4bfe0977..7e20993963 100644 --- a/src/content/reference/en/p5/torus.mdx +++ b/src/content/reference/en/p5/torus.mdx @@ -18,6 +18,7 @@ description: > Setting them to relatively small values like 4 and 6 allows you to create new shapes other than a torus.

    +isConstructor: false line: 1006 params: - name: radius diff --git a/src/content/reference/en/p5/touchEnded.mdx b/src/content/reference/en/p5/touchEnded.mdx index ad77dff4c1..b965658a74 100644 --- a/src/content/reference/en/p5/touchEnded.mdx +++ b/src/content/reference/en/p5/touchEnded.mdx @@ -17,6 +17,7 @@ description: > events. To prevent any default behavior for this event, add "return false" to the end of the method.

    +isConstructor: false line: 212 params: - name: event diff --git a/src/content/reference/en/p5/touchMoved.mdx b/src/content/reference/en/p5/touchMoved.mdx index f1e7091cc6..3b4493639a 100644 --- a/src/content/reference/en/p5/touchMoved.mdx +++ b/src/content/reference/en/p5/touchMoved.mdx @@ -17,6 +17,7 @@ description: > events. To prevent any default behavior for this event, add "return false" to the end of the method.

    +isConstructor: false line: 141 params: - name: event diff --git a/src/content/reference/en/p5/touchStarted.mdx b/src/content/reference/en/p5/touchStarted.mdx index a00f5d9f34..33b568189b 100644 --- a/src/content/reference/en/p5/touchStarted.mdx +++ b/src/content/reference/en/p5/touchStarted.mdx @@ -16,6 +16,7 @@ description: > events. To prevent any default behavior for this event, add "return false" to the end of the method.

    +isConstructor: false line: 70 params: - name: event diff --git a/src/content/reference/en/p5/touches.mdx b/src/content/reference/en/p5/touches.mdx index 5c2fcd09e5..0ab5068ccd 100644 --- a/src/content/reference/en/p5/touches.mdx +++ b/src/content/reference/en/p5/touches.mdx @@ -10,6 +10,7 @@ description: | and id properties.

    The touches[] array is not supported on Safari and IE on touch-based desktops (laptops).

    +isConstructor: false line: 10 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/translate.mdx b/src/content/reference/en/p5/translate.mdx index 1493399408..1540d3ec16 100644 --- a/src/content/reference/en/p5/translate.mdx +++ b/src/content/reference/en/p5/translate.mdx @@ -23,8 +23,13 @@ description: > further controlled by using push() and pop().

    +isConstructor: false line: 529 itemtype: method +alt: |- + white 55×55 rect with black outline at center right. + 3 white 55×55 rects with black outlines at top-l, center-r and bottom-r. + a 20×20 white rect moving in a circle around the canvas class: p5 example: - |- @@ -58,10 +63,6 @@ example: } -alt: |- - white 55×55 rect with black outline at center right. - 3 white 55×55 rects with black outlines at top-l, center-r and bottom-r. - a 20×20 white rect moving in a circle around the canvas chainable: true --- diff --git a/src/content/reference/en/p5/triangle.mdx b/src/content/reference/en/p5/triangle.mdx index ed144bd685..b457af78db 100644 --- a/src/content/reference/en/p5/triangle.mdx +++ b/src/content/reference/en/p5/triangle.mdx @@ -13,6 +13,7 @@ description: > parameters specify its third point (x3, y3).

    +isConstructor: false line: 759 params: - name: x1 diff --git a/src/content/reference/en/p5/trim.mdx b/src/content/reference/en/p5/trim.mdx index 9be3cfd5a6..b080520a0b 100644 --- a/src/content/reference/en/p5/trim.mdx +++ b/src/content/reference/en/p5/trim.mdx @@ -7,6 +7,7 @@ description: |

    Removes whitespace characters from the beginning and end of a String. In addition to standard whitespace characters such as space, carriage return, and tab, this function also removes the Unicode "nbsp" character.

    +isConstructor: false line: 511 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/turnAxis.mdx b/src/content/reference/en/p5/turnAxis.mdx index a549ade952..8ca154afa6 100644 --- a/src/content/reference/en/p5/turnAxis.mdx +++ b/src/content/reference/en/p5/turnAxis.mdx @@ -11,6 +11,7 @@ description: > defined within the scope of deviceTurned().

    +isConstructor: false line: 378 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/unchar.mdx b/src/content/reference/en/p5/unchar.mdx index 01c99b2e6e..ac559286c4 100644 --- a/src/content/reference/en/p5/unchar.mdx +++ b/src/content/reference/en/p5/unchar.mdx @@ -7,6 +7,7 @@ description: |

    Converts a single-character string to its corresponding integer representation. When an array of single-character string values is passed in, then an array of integers of the same length is returned.

    +isConstructor: false line: 214 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/unhex.mdx b/src/content/reference/en/p5/unhex.mdx index 827b4ab109..ed6445f846 100644 --- a/src/content/reference/en/p5/unhex.mdx +++ b/src/content/reference/en/p5/unhex.mdx @@ -7,6 +7,7 @@ description: |

    Converts a string representation of a hexadecimal number to its equivalent integer value. When an array of strings in hexadecimal notation is passed in, an array of integers of the same length is returned.

    +isConstructor: false line: 293 itemtype: method class: p5 diff --git a/src/content/reference/en/p5/updatePixels.mdx b/src/content/reference/en/p5/updatePixels.mdx index 9f4d3e2852..39888d1498 100644 --- a/src/content/reference/en/p5/updatePixels.mdx +++ b/src/content/reference/en/p5/updatePixels.mdx @@ -16,6 +16,7 @@ description: > after calling loadPixels() or by calling set().

    +isConstructor: false line: 884 params: - name: x diff --git a/src/content/reference/en/p5/userStartAudio.mdx b/src/content/reference/en/p5/userStartAudio.mdx index 4545ba3f17..9ef4ec20e8 100644 --- a/src/content/reference/en/p5/userStartAudio.mdx +++ b/src/content/reference/en/p5/userStartAudio.mdx @@ -26,6 +26,7 @@ description: |- example below. This method utilizes StartAudioContext , a library by Yotam Mann (MIT Licence, 2016).

    +isConstructor: false line: 198 params: - name: elements diff --git a/src/content/reference/en/p5/vertex.mdx b/src/content/reference/en/p5/vertex.mdx index 70f7bfba36..7e301f01e8 100644 --- a/src/content/reference/en/p5/vertex.mdx +++ b/src/content/reference/en/p5/vertex.mdx @@ -13,8 +13,15 @@ description: > href="#/p5/beginShape">beginShape() and endShape() functions.

    +isConstructor: false line: 930 itemtype: method +alt: |- + 4 black points in a square shape in middle-right of canvas. + 4 points making a diamond shape. + 8 points making a star. + 8 points making 4 lines. + A rotating 3D shape with a hollow section in the middle. class: p5 example: - |- @@ -132,12 +139,6 @@ example: } -alt: |- - 4 black points in a square shape in middle-right of canvas. - 4 points making a diamond shape. - 8 points making a star. - 8 points making 4 lines. - A rotating 3D shape with a hollow section in the middle. chainable: true --- diff --git a/src/content/reference/en/p5/webglVersion.mdx b/src/content/reference/en/p5/webglVersion.mdx index b6b9f7dac2..7ccab658ab 100644 --- a/src/content/reference/en/p5/webglVersion.mdx +++ b/src/content/reference/en/p5/webglVersion.mdx @@ -22,6 +22,7 @@ description: >

    See setAttributes() for ways to set the WebGL version.

    +isConstructor: false line: 466 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/while.mdx b/src/content/reference/en/p5/while.mdx index bea1472383..787cc25fb3 100644 --- a/src/content/reference/en/p5/while.mdx +++ b/src/content/reference/en/p5/while.mdx @@ -36,8 +36,10 @@ description: > as the test condition evaluates to true.The condition is evaluated before executing the statement.

    +isConstructor: false line: 448 itemtype: property +alt: This example does not render anything class: p5 example: - |- @@ -57,7 +59,6 @@ example: } -alt: This example does not render anything chainable: false --- diff --git a/src/content/reference/en/p5/width.mdx b/src/content/reference/en/p5/width.mdx index daa085abb5..2774e483de 100644 --- a/src/content/reference/en/p5/width.mdx +++ b/src/content/reference/en/p5/width.mdx @@ -16,6 +16,7 @@ description: > value to 0.

    +isConstructor: false line: 750 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/winMouseX.mdx b/src/content/reference/en/p5/winMouseX.mdx index 22a22dc652..245d1e3df1 100644 --- a/src/content/reference/en/p5/winMouseX.mdx +++ b/src/content/reference/en/p5/winMouseX.mdx @@ -6,6 +6,7 @@ file: src/events/mouse.js description: |

    The system variable winMouseX always contains the current horizontal position of the mouse, relative to (0, 0) of the window.

    +isConstructor: false line: 189 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/winMouseY.mdx b/src/content/reference/en/p5/winMouseY.mdx index 49432db7a8..00ef189618 100644 --- a/src/content/reference/en/p5/winMouseY.mdx +++ b/src/content/reference/en/p5/winMouseY.mdx @@ -6,6 +6,7 @@ file: src/events/mouse.js description: |

    The system variable winMouseY always contains the current vertical position of the mouse, relative to (0, 0) of the window.

    +isConstructor: false line: 226 itemtype: property class: p5 diff --git a/src/content/reference/en/p5/windowHeight.mdx b/src/content/reference/en/p5/windowHeight.mdx index 9fb186041c..8013c655b1 100644 --- a/src/content/reference/en/p5/windowHeight.mdx +++ b/src/content/reference/en/p5/windowHeight.mdx @@ -10,8 +10,10 @@ description: > target="_blank">layout viewport. This viewport is the area within the browser that's available for drawing.

    +isConstructor: false line: 634 itemtype: property +alt: This example does not render anything. class: p5 example: - |- @@ -29,7 +31,6 @@ example: } -alt: This example does not render anything. chainable: false --- diff --git a/src/content/reference/en/p5/windowResized.mdx b/src/content/reference/en/p5/windowResized.mdx index 8d71f2db66..1d5603e335 100644 --- a/src/content/reference/en/p5/windowResized.mdx +++ b/src/content/reference/en/p5/windowResized.mdx @@ -15,6 +15,7 @@ description: > definition, it can be used for debugging or other purposes.

    +isConstructor: false line: 661 params: - name: event @@ -23,6 +24,7 @@ params: type: UIEvent optional: true itemtype: method +alt: This example does not render anything. class: p5 example: - |- @@ -46,7 +48,6 @@ example: } -alt: This example does not render anything. chainable: false --- diff --git a/src/content/reference/en/p5/windowWidth.mdx b/src/content/reference/en/p5/windowWidth.mdx index a0da899b2c..a67c09118c 100644 --- a/src/content/reference/en/p5/windowWidth.mdx +++ b/src/content/reference/en/p5/windowWidth.mdx @@ -10,8 +10,10 @@ description: > target="_blank">layout viewport. This viewport is the area within the browser that's available for drawing.

    +isConstructor: false line: 607 itemtype: property +alt: This example does not render anything. class: p5 example: - |- @@ -29,7 +31,6 @@ example: } -alt: This example does not render anything. chainable: false --- diff --git a/src/content/reference/en/p5/year.mdx b/src/content/reference/en/p5/year.mdx index 7b3558f5bb..643c74cc29 100644 --- a/src/content/reference/en/p5/year.mdx +++ b/src/content/reference/en/p5/year.mdx @@ -8,6 +8,7 @@ description: > href="#/p5/year">year() function returns the current year as an integer (2014, 2015, 2016, etc).

    +isConstructor: false line: 131 itemtype: method class: p5 diff --git a/src/scripts/builders/reference.ts b/src/scripts/builders/reference.ts index 50133949a9..31b87ba690 100644 --- a/src/scripts/builders/reference.ts +++ b/src/scripts/builders/reference.ts @@ -3,230 +3,149 @@ import matter from "gray-matter"; import { remark } from "remark"; import remarkMDX from "remark-mdx"; import { parseLibrary } from "../parsers/reference"; +import type { + LibraryReferenceClassDefinition, + LibraryReferenceClassItem, +} from "../../../types/parsers.interface"; +import type { ReferenceModulePathTree } from "../../../types/builders.interface"; -const prefix = `./src/content/reference/en/`; - +const prefix = "./src/content/reference/en/"; const classMethodPreviews = {}; - -/** - * @description modulePathTree is used to structure the export of the reference docs - * It will be built up as the docs are processed - */ -const modulePathTree: ReferenceModulePathTree = { - modules: {}, - classes: {}, -}; +const modulePathTree = { modules: {}, classes: {} } as ReferenceModulePathTree; export const buildReference = async () => { const parsedOutput = await parseLibrary(); - - // Class items also covers the functions that - // p5 makes globally available - const classItemMDXDocs = await classItemsToMDX(parsedOutput); - await saveMDX(classItemMDXDocs); - // Do in two separate steps so that class MDX - // can reference classitems - const classMDXDocs = await classesToMDX(parsedOutput); - await saveMDX(classMDXDocs); - - console.log("Done building reference docs!"); -}; - -const getModulePath = (doc) => { - if (!doc || !doc.name) { + if (!parsedOutput) { + console.error("Unable to build reference docs to error in parsing!"); return; } - - let docClass = doc.class; - if (!docClass) { - if (doc.module.startsWith("p5.")) { - docClass = doc.module; - } else { - docClass = "p5"; - } - } - const path = `${prefix}/${docClass}/`; - - return path; + const mdxDocs = [ + ...(await convertDocsToMDX(Object.values(parsedOutput.classitems))), + ...(await convertDocsToMDX(Object.values(parsedOutput.classes))), + ]; + await saveMDX(mdxDocs); + console.log("Done building reference docs!"); }; -const addDocToModulePathTree = (doc, path) => { - if (!doc || !doc.name || !path) { - return; - } - - const modulePath = path.replace("./src/pages/en/reference/", "") + doc.name; - if (doc.class && doc.class !== "p5") { - if (!modulePathTree.classes[doc.class]) { - modulePathTree.classes[doc.class] = {}; - } - modulePathTree.classes[doc.class][doc.name] = modulePath; - } else { - if (!modulePathTree.modules[doc.module]) { - modulePathTree.modules[doc.module] = {}; - } - if (doc.submodule) { - if (!modulePathTree.modules[doc.module][doc.submodule]) { - modulePathTree.modules[doc.module][doc.submodule] = {}; - } - modulePathTree.modules[doc.module][doc.submodule][doc.name] = modulePath; - } else { - modulePathTree.modules[doc.module][doc.name] = modulePath; - } - } +const getModulePath = ( + doc: LibraryReferenceClassDefinition | LibraryReferenceClassItem, +) => { + if (!doc || !doc.name) return; + const docClass = + doc.class || (doc.module.startsWith("p5.") ? doc.module : "p5"); + return `${prefix}/${docClass}/`; }; -async function convertClassToMDX(doc) { - let frontMatterArgs = {}; - const sourcePath = doc.file?.replace(/.*p5\.js\/(.*)/, "$1") ?? ""; - const memberMethodPreviews = classMethodPreviews[doc.name] - ? { memberMethodPreviews: classMethodPreviews[doc.name] } - : {}; - try { - frontMatterArgs = { - title: doc.name ?? "", - module: doc.module, - submodule: doc.submodule ?? "", - file: sourcePath ?? "", - description: doc.description ?? "", - isConstructor: true, - ...(doc.line ? { line: doc.line } : {}), - ...(doc.params ? { params: doc.params } : {}), - ...(doc.itemtype ? { itemtype: doc.itemtype } : {}), - ...(doc.examples ? { examples: doc.examples } : {}), - ...(doc.alt ? { alt: doc.alt } : {}), - ...(doc.return ? { return: doc.return } : {}), - ...memberMethodPreviews, - }; +const addDocToModulePathTree = ( + doc: LibraryReferenceClassDefinition | LibraryReferenceClassItem, + path: string, +) => { + if (!doc || !doc.name || !path) return; - const frontmatter = matter.stringify("", frontMatterArgs); - const markdownContent = `# ${doc.name}\n`; - const mdxContent = remark().use(remarkMDX).processSync(markdownContent); - return `${frontmatter}\n${mdxContent.toString()}`; - } catch (err) { - console.error(`Error converting ${doc.name} to MDX: ${err}`); - console.log(frontMatterArgs); - return; - } -} + const modulePath = `${path.replace("./src/pages/en/reference/", "")}${doc.name}`; -async function convertToMDX(doc) { - if (!doc || !doc.name || !doc.file) { - return; - } + // Type guard to check if 'doc' is LibraryReferenceClassItem + if ("class" in doc) { + const treePath = doc.class && doc.class !== "p5" ? "classes" : "modules"; + const subPath = doc.submodule + ? `${doc.module}.${doc.submodule}` + : doc.module; - if (doc.is_constructor) { - return convertClassToMDX(doc); + if (!modulePathTree[treePath][subPath]) + modulePathTree[treePath][subPath] = {}; + modulePathTree[treePath][subPath][doc.name] = modulePath; + } else { + // Handle the case for LibraryReferenceClassDefinition or add an else if branch for other types, if necessary + // For example, assuming LibraryReferenceClassDefinition always goes into "modules" + const treePath = "modules"; + const subPath = doc.module; // Assuming 'module' exists on LibraryReferenceClassDefinition + + if (!modulePathTree[treePath][subPath]) + modulePathTree[treePath][subPath] = {}; + modulePathTree[treePath][subPath][doc.name] = modulePath; } +}; - if (doc.name?.startsWith("_")) { - return; - } +const convertToMDX = async (doc) => { + if (!doc || !doc.name || !doc.file) return; + + const sanitizeName = (name) => + name.replace(//g, ">"); + let frontMatterArgs = { + title: sanitizeName(doc.name), + module: doc.module, + submodule: doc.submodule ?? "", + file: doc.file.replace(/.*p5\.js\/(.*)/, "$1"), + description: doc.description ?? "", + isConstructor: !!doc.is_constructor, + line: doc.line, + params: doc.params, + itemtype: doc.itemtype, + examples: doc.examples, + alt: doc.alt, + class: doc.class, + example: doc.example, + return: doc.return, + chainable: doc.chainable === 1, + ...classMethodPreviews[doc.name], + }; - if (doc.name.startsWith(">") || doc.name.startsWith("<")) { - doc.name = doc.name.replace(//g, ">"); - } + // Filter out undefined values + frontMatterArgs = Object.entries(frontMatterArgs).reduce( + (acc, [key, value]) => { + if (value !== undefined) acc[key] = value; + return acc; + }, + {}, + ); - let frontMatterArgs = {}; - const sourcePath = doc.file.replace(/.*p5\.js\/(.*)/, "$1") ?? ""; try { - frontMatterArgs = { - title: doc.name ?? "", - module: doc.module, - submodule: doc.submodule ?? "", - file: sourcePath ?? "", - description: doc.description ?? "", - ...(doc.line ? { line: doc.line } : {}), - ...(doc.params ? { params: doc.params } : {}), - ...(doc.itemtype ? { itemtype: doc.itemtype } : {}), - ...(doc.class ? { class: doc.class } : {}), - ...(doc.example ? { example: doc.example } : {}), - ...(doc.alt ? { alt: doc.alt } : {}), - ...(doc.return ? { return: doc.return } : {}), - chainable: doc.chainable === 1, - }; - const frontmatter = matter.stringify("", frontMatterArgs); - const markdownContent = `# ${doc.name}\n`; + const markdownContent = `# ${sanitizeName(doc.name)}\n`; const mdxContent = remark().use(remarkMDX).processSync(markdownContent); return `${frontmatter}\n${mdxContent.toString()}`; } catch (err) { console.error(`Error converting ${doc.name} to MDX: ${err}`); - console.log(frontMatterArgs); return; } -} - -async function classItemsToMDX(docs) { - console.log("Converting YUI classitem docs to MDX..."); - - return convertDocsToMDX(Object.values(docs.classitems)); -} - -async function classesToMDX(docs) { - console.log("Converting YUI classes docs to MDX..."); - - return convertDocsToMDX(Object.values(docs.classes)); -} - -function addClassMethodPreviewsToClassDocs(doc, path) { - if ( - !doc.class || - doc.class === "p5" || - !doc.name || - !path || - !doc.description - ) { - return; - } - // If this is a class method, we need to add relevant info to the classMethodPreviews object - if (!classMethodPreviews[doc.class]) { - classMethodPreviews[doc.class] = {}; - } - const classMethodPath = `../${modulePathTree.classes[doc.class][doc.name]}`; - classMethodPreviews[doc.class][doc.name] = { - description: doc.description, - path: classMethodPath, - }; -} +}; -const convertDocsToMDX = async (docs): ReferenceMDXDoc[] | [] => { +const convertDocsToMDX = async ( + docs: LibraryReferenceClassDefinition[] | LibraryReferenceClassItem[], +) => { try { - const mdxDocs = await Promise.all( - docs.map(async (doc) => { - const mdx = await convertToMDX(doc); - const savePath = getModulePath(doc); - const name = doc.name; - addDocToModulePathTree(doc, savePath); - addClassMethodPreviewsToClassDocs(doc, savePath); - return { mdx, savePath, name }; - }), - ); - - return mdxDocs.filter( - (mdxDoc) => mdxDoc.mdx && mdxDoc.savePath && mdxDoc.name, - ); + return ( + await Promise.all( + docs.map(async (doc) => { + const mdx = await convertToMDX(doc); + + const savePath = getModulePath(doc); + if (!savePath) { + console.error(`Error getting save path for ${doc.name}`); + return; + } + + addDocToModulePathTree(doc, savePath); + return mdx ? { mdx, savePath, name: doc.name } : null; + }), + ) + ).filter(Boolean); } catch (err) { console.error(`Error converting docs to MDX: ${err}`); return []; } }; -async function saveMDX(mdxDocs) { +const saveMDX = async (mdxDocs) => { console.log("Saving MDX..."); - try { - for (const mdxDoc of mdxDocs) { - await fs.mkdir(mdxDoc.savePath, { - recursive: true, - }); - await fs.writeFile( - `${mdxDoc.savePath}/${mdxDoc.name}.mdx`, - mdxDoc.mdx.toString(), - ); + for (const { mdx, savePath, name } of mdxDocs) { + try { + await fs.mkdir(savePath, { recursive: true }); + await fs.writeFile(`${savePath}/${name}.mdx`, mdx.toString()); + } catch (err) { + console.error(`Error saving MDX: ${err}`); } - } catch (err) { - console.error(`Error saving MDX: ${err}`); } -} +}; buildReference(); diff --git a/src/scripts/parsers/reference.ts b/src/scripts/parsers/reference.ts index 78af738991..e8e87c8e8d 100644 --- a/src/scripts/parsers/reference.ts +++ b/src/scripts/parsers/reference.ts @@ -1,4 +1,4 @@ -import { cloneLibraryRepo, readFile, writeFile } from "./utils"; +import { cloneLibraryRepo, readFile } from "./utils"; import { exec } from "child_process"; import path from "path"; import { fileURLToPath } from "url"; diff --git a/types/parsers.interface.ts b/types/parsers.interface.ts index a48196cfc0..7276c277f4 100644 --- a/types/parsers.interface.ts +++ b/types/parsers.interface.ts @@ -39,7 +39,7 @@ interface Param { optional?: boolean; } -interface ClassDefinition { +export interface LibraryReferenceClassDefinition { name: string; shortname: string; classitems: Param[]; @@ -58,8 +58,8 @@ interface ClassDefinition { example?: string[]; } -export interface Classes { - [className: string]: ClassDefinition; +export interface LibraryReferenceClass { + [className: string]: LibraryReferenceClassDefinition; } interface BaseClassItem { @@ -107,7 +107,7 @@ export interface PropertyClassItem extends BaseClassItem { type: string; } -export type ClassItem = MethodClassItem | PropertyClassItem; +export type LibraryReferenceClassItem = MethodClassItem | PropertyClassItem; export interface ParsedConsts { [key: string]: string[]; @@ -117,7 +117,7 @@ export interface ParsedLibraryReference { project: Project; files: Record; modules: Modules; - classes: Classes; - classitems: ClassItem[]; + classes: LibraryReferenceClass; + classitems: LibraryReferenceClassItem[]; consts: ParsedConsts; }