diff --git a/.all-contributorsrc b/.all-contributorsrc index 55809f85bd..0200543013 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1326,7 +1326,8 @@ "profile": "https://aatishb.com", "contributions": [ "doc", - "bug" + "bug", + "example" ] }, { @@ -1391,7 +1392,8 @@ "contributions": [ "bug", "code", - "doc" + "doc", + "example" ] }, { @@ -1400,7 +1402,8 @@ "avatar_url": "https://avatars2.githubusercontent.com/u/9020979?s=460&v=4", "profile": "https://github.com/hydrosquall", "contributions": [ - "doc" + "doc", + "example" ] }, { @@ -1851,7 +1854,8 @@ "avatar_url": "https://avatars1.githubusercontent.com/u/36653440?v=4", "profile": "https://github.com/sm7515", "contributions": [ - "doc" + "doc", + "example" ] }, { @@ -2174,7 +2178,8 @@ "avatar_url": "https://avatars1.githubusercontent.com/u/56646605?v=4", "profile": "https://berkeozgen.me/", "contributions": [ - "bug" + "bug", + "example" ] }, { @@ -2495,7 +2500,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/43292181?v=4", "profile": "https://github.com/suhascv", "contributions": [ - "doc" + "doc", + "example" ] }, { @@ -2555,7 +2561,8 @@ "profile": "http://www.davepagurek.com", "contributions": [ "code", - "test" + "test", + "example" ] }, { @@ -3323,7 +3330,8 @@ "profile": "https://github.com/Malayvasa", "contributions": [ "design", - "code" + "code", + "example" ] }, { @@ -3659,7 +3667,8 @@ "contributions": [ "ideas", "review", - "plugin" + "plugin", + "example" ] }, { @@ -3767,7 +3776,8 @@ "profile": "http://aceslowman.com", "contributions": [ "code", - "doc" + "doc", + "example" ] }, { @@ -3947,7 +3957,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/74553433?v=4", "profile": "https://github.com/Acha0203", "contributions": [ - "code" + "code", + "example" ] }, { @@ -4091,7 +4102,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/92529?v=4", "profile": "http://jareddonovan.com/", "contributions": [ - "code" + "code", + "example" ] }, { @@ -4460,7 +4472,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/22816171?v=4", "profile": "https://github.com/ihsavru", "contributions": [ - "code" + "code", + "example" ] }, { @@ -4523,7 +4536,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/19987520?v=4", "profile": "https://jithinks.netlify.app/", "contributions": [ - "code" + "code", + "example" ] }, { @@ -5330,7 +5344,16 @@ "avatar_url": "https://avatars.githubusercontent.com/u/127239756?v=4", "profile": "https://github.com/perminder-17", "contributions": [ - "code" + "code", + "bug", + "doc", + "example", + "ideas", + "plugin", + "projectManagement", + "promotion", + "question", + "research" ] }, { @@ -6210,7 +6233,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/7389189?v=4", "profile": "https://github.com/AaratiAkkapeddi", "contributions": [ - "code" + "code", + "ideas" ] }, { @@ -6445,6 +6469,257 @@ "code", "doc" ] + }, + { + "login": "philyawj", + "name": "Jordan Philyaw", + "avatar_url": "https://avatars.githubusercontent.com/u/37485853?v=4", + "profile": "http://jordanphilyaw.com", + "contributions": [ + "doc" + ] + }, + { + "login": "thrly", + "name": "oliver thurley", + "avatar_url": "https://avatars.githubusercontent.com/u/22343302?v=4", + "profile": "http://oliverthurley.co.uk", + "contributions": [ + "doc", + "code" + ] + }, + { + "login": "lirenjie95", + "name": "Renjie Li", + "avatar_url": "https://avatars.githubusercontent.com/u/17038472?v=4", + "profile": "https://github.com/lirenjie95", + "contributions": [ + "doc", + "code" + ] + }, + { + "login": "Vaivaswat2244", + "name": "Vaivaswat Dubey", + "avatar_url": "https://avatars.githubusercontent.com/u/113991324?v=4", + "profile": "https://github.com/Vaivaswat2244", + "contributions": [ + "code" + ] + }, + { + "login": "xinemata", + "name": "Xin Xin", + "avatar_url": "https://avatars.githubusercontent.com/u/9159424?v=4", + "profile": "https://github.com/xinemata", + "contributions": [ + "eventOrganizing", + "tutorial", + "talk", + "mentoring", + "ideas" + ] + }, + { + "login": "akkarn1689", + "name": "Ashish Karn", + "avatar_url": "https://avatars.githubusercontent.com/u/82334486?v=4", + "profile": "https://karn-ashish-16.onrender.com/", + "contributions": [ + "code" + ] + }, + { + "login": "dkessner", + "name": "Darren Kessner", + "avatar_url": "https://avatars.githubusercontent.com/u/1002034?v=4", + "profile": "https://dkessner.github.io/", + "contributions": [ + "example" + ] + }, + { + "login": "AnimeshSinha1309", + "name": "Animesh Sinha", + "avatar_url": "https://avatars.githubusercontent.com/u/9739218?v=4", + "profile": "http://www.facebook.com/AnimeshSinha1309", + "contributions": [ + "example" + ] + }, + { + "login": "katlich112358", + "name": "Kathryn Lichlyter", + "avatar_url": "https://avatars.githubusercontent.com/u/59926191?v=4", + "profile": "https://github.com/katlich112358", + "contributions": [ + "example" + ] + }, + { + "login": "geealbers", + "name": "Greg Albers", + "avatar_url": "https://avatars.githubusercontent.com/u/7796401?v=4", + "profile": "https://geealbers.net/", + "contributions": [ + "example" + ] + }, + { + "login": "macarena", + "name": "Marco Macarena", + "avatar_url": "https://avatars.githubusercontent.com/u/79822?v=4", + "profile": "http://macarena.pro.br", + "contributions": [ + "example" + ] + }, + { + "login": "khamiltonuk", + "name": "Kristian Hamilton", + "avatar_url": "https://avatars.githubusercontent.com/u/4013283?v=4", + "profile": "http://www.khamilton.co.uk", + "contributions": [ + "example" + ] + }, + { + "login": "keshavg2", + "name": "Keshav Gupta", + "avatar_url": "https://avatars.githubusercontent.com/u/34001173?v=4", + "profile": "https://keshav-portfolio-resume.netlify.app/", + "contributions": [ + "example" + ] + }, + { + "login": "riteshsp2000", + "name": "Ritesh Patil", + "avatar_url": "https://avatars.githubusercontent.com/u/56112399?v=4", + "profile": "http://riteshpatil.com", + "contributions": [ + "example" + ] + }, + { + "login": "gabrielsroka", + "name": "Gabriel Sroka", + "avatar_url": "https://avatars.githubusercontent.com/u/14354736?v=4", + "profile": "https://gabrielsroka.github.io", + "contributions": [ + "example" + ] + }, + { + "login": "kcconch", + "name": "Casey Conchinha", + "avatar_url": "https://avatars.githubusercontent.com/u/26172283?v=4", + "profile": "http://kccon.ch", + "contributions": [ + "example" + ] + }, + { + "login": "davidblitz", + "name": "davidblitz", + "avatar_url": "https://avatars.githubusercontent.com/u/13055497?v=4", + "profile": "https://github.com/davidblitz", + "contributions": [ + "example" + ] + }, + { + "login": "crh82", + "name": "crh82", + "avatar_url": "https://avatars.githubusercontent.com/u/103348212?v=4", + "profile": "https://github.com/crh82", + "contributions": [ + "example" + ] + }, + { + "login": "", + "name": "Aaron Welles", + "avatar_url": "https://hello-assets.p5js.org/placeholder_avatar.png", + "profile": "", + "contributions": [ + "example" + ] + }, + { + "login": "seyko1", + "name": "Seyko", + "avatar_url": "https://avatars.githubusercontent.com/u/26870879?v=4", + "profile": "https://github.com/seyko1", + "contributions": [ + "code" + ] + }, + { + "login": "thekinardist", + "name": "Xevi H. Aqeel", + "avatar_url": "https://avatars.githubusercontent.com/u/21345916?v=4", + "profile": "http://kinardist.media", + "contributions": [ + "example", + "design" + ] + }, + { + "login": "GregStanton", + "name": "Greg Stanton", + "avatar_url": "https://avatars.githubusercontent.com/u/51820777?v=4", + "profile": "https://www.youtube.com/c/HigherMathNotes", + "contributions": [ + "bug", + "code", + "doc", + "example", + "ideas", + "plugin", + "projectManagement", + "promotion", + "question", + "research" + ] + }, + { + "login": "bojidar-bg", + "name": "Bojidar Marinov", + "avatar_url": "https://avatars.githubusercontent.com/u/5276727?v=4", + "profile": "https://bojidar-bg.dev/", + "contributions": [ + "code", + "test" + ] + }, + { + "login": "webermayank", + "name": "Mayank Verma", + "avatar_url": "https://avatars.githubusercontent.com/u/111176033?v=4", + "profile": "https://github.com/webermayank", + "contributions": [ + "code" + ] + }, + { + "login": "mclark414", + "name": "mclark414", + "avatar_url": "https://avatars.githubusercontent.com/u/26391144?v=4", + "profile": "https://github.com/mclark414", + "contributions": [ + "ideas" + ] + }, + { + "login": "mxramsey", + "name": "Mx. Ramsey", + "avatar_url": "https://avatars.githubusercontent.com/u/161327383?v=4", + "profile": "https://github.com/mxramsey", + "contributions": [ + "ideas" + ] } ], "repoType": "github", diff --git a/README.md b/README.md index 19505fbabc..a63f39819e 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ Current Lead/Mentor * [@limzykenneth](https://github.com/limzykenneth) - p5.js Mentor,2023-present Lead/Mentor Alumni -* [@lmccart](https://github.com/lmccart)- p5.js Creator -* [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-2024 +* [@lmccart](https://github.com/lmccart) - p5.js Creator +* [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-present (on leave) * [@outofambit](https://github.com/outofambit) - p5.js Co-Lead 2021-22, Mentor 2022-2023 * [@mcturner1995](https://github.com/mcturner1995) - p5.js Lead 2020 @@ -353,7 +353,7 @@ We recognize all types of contributions. This project follows the [all-contribut Caroline Hermans
Caroline Hermans

💡 📖 Faith Wuyue Yu
Faith Wuyue Yu

- Aatish Bhatia
Aatish Bhatia

📖 🐛 + Aatish Bhatia
Aatish Bhatia

📖 🐛 💡 Mislav Milicevic
Mislav Milicevic

💻 🐛 Yuting Lu
Yuting Lu

📖 Adil Rabbani
Adil Rabbani

💻 🐛 💡 @@ -361,8 +361,8 @@ We recognize all types of contributions. This project follows the [all-contribut Pierre Krafft
Pierre Krafft

🐛 💻 📖 💡 👀 ⚠️ 🔧 Zoë Ingram
Zoë Ingram

📖 - Aidan Nelson
Aidan Nelson

🐛 💻 📖 - Cameron Yick
Cameron Yick

📖 + Aidan Nelson
Aidan Nelson

🐛 💻 📖 💡 + Cameron Yick
Cameron Yick

📖 💡 Tanvi Kumar
Tanvi Kumar

🐛 💻 📖 💡 Katsuya Endoh
Katsuya Endoh

@@ -425,7 +425,7 @@ We recognize all types of contributions. This project follows the [all-contribut Samuel Alarco Cantos
Samuel Alarco Cantos

🌍 DIVYANSHU RAJ
DIVYANSHU RAJ

💻 🐛 📖 - sm7515
sm7515

📖 + sm7515
sm7515

📖 💡 Aditya Rachman Putra
Aditya Rachman Putra

📖 shaharyarshamshi
shaharyarshamshi

🌍 Ayush Jain
Ayush Jain

🌍 @@ -472,7 +472,7 @@ We recognize all types of contributions. This project follows the [all-contribut Keith Tan
Keith Tan

📖 - Berke Özgen
Berke Özgen

🐛 + Berke Özgen
Berke Özgen

🐛 💡 Musab Kılıç
Musab Kılıç

💻 ⚠️ Nicholas Marino
Nicholas Marino

📖 Greg Sadetsky
Greg Sadetsky

💻 @@ -516,7 +516,7 @@ We recognize all types of contributions. This project follows the [all-contribut Kathryn Isabelle Lawrence
Kathryn Isabelle Lawrence

💻 🤔 Joonas Jokinen
Joonas Jokinen

🎨 Ajaya Mati
Ajaya Mati

💻 - Suhas CV
Suhas CV

📖 + Suhas CV
Suhas CV

📖 💡 Sanjay Singh Rajpoot
Sanjay Singh Rajpoot

📖 @@ -524,7 +524,7 @@ We recognize all types of contributions. This project follows the [all-contribut Thomas Herlea
Thomas Herlea

🐛 💻 📖 Simranjeet Singh
Simranjeet Singh

💻 📢 🎨 👀 Rahul Mohata
Rahul Mohata

📖 - Dave Pagurek
Dave Pagurek

💻 ⚠️ + Dave Pagurek
Dave Pagurek

💻 ⚠️ 💡 Leo Kamwathi
Leo Kamwathi

💻 @@ -634,7 +634,7 @@ We recognize all types of contributions. This project follows the [all-contribut UnityOfFairfax
UnityOfFairfax

💻 INARI_DARKFOX
INARI_DARKFOX

💻 James Dunn
James Dunn

🐛 💻 - Malay Vasa
Malay Vasa

🎨 💻 + Malay Vasa
Malay Vasa

🎨 💻 💡 wagedu
wagedu

🐛 Wes Lord
Wes Lord

📖 ⚠️ @@ -681,7 +681,7 @@ We recognize all types of contributions. This project follows the [all-contribut SHIBAHARA Hiroki
SHIBAHARA Hiroki

💻 🌍 siddhant
siddhant

🐛 💻 - Caleb Foss
Caleb Foss

🤔 👀 🔌 + Caleb Foss
Caleb Foss

🤔 👀 🔌 💡 chechenxu
chechenxu

💻 Peter Marsh
Peter Marsh

💻 Ahmet Kaya
Ahmet Kaya

🌍 @@ -696,7 +696,7 @@ We recognize all types of contributions. This project follows the [all-contribut J Wong
J Wong

💻 📖 - Austin Lee Slominski
Austin Lee Slominski

💻 📖 + Austin Lee Slominski
Austin Lee Slominski

💻 📖 💡 Nick Briz
Nick Briz

👀 Ayush Shankar
Ayush Shankar

💻 zelf0
zelf0

📖 @@ -721,7 +721,7 @@ We recognize all types of contributions. This project follows the [all-contribut Aaron Casanova
Aaron Casanova

💻 Adam Smith
Adam Smith

💻 - Acha
Acha

💻 + Acha
Acha

💻 💡 Aditya Siddheshwar
Aditya Siddheshwar

💻 Adwaith D
Adwaith D

💻 æmon
æmon

💻 @@ -743,7 +743,7 @@ We recognize all types of contributions. This project follows the [all-contribut AsukaMinato
AsukaMinato

💻 - Jared Donovan
Jared Donovan

💻 + Jared Donovan
Jared Donovan

💻 💡 beau-muylle
beau-muylle

💻 Yana Agun Siswanto
Yana Agun Siswanto

💻 Benjamin Davies
Benjamin Davies

💻 @@ -796,7 +796,7 @@ We recognize all types of contributions. This project follows the [all-contribut Half Scheidl
Half Scheidl

💻 Ashris
Ashris

💻 Arijit
Arijit

💻 - Urvashi
Urvashi

💻 + Urvashi
Urvashi

💻 💡 José Miguel Tajuelo Garrigós
José Miguel Tajuelo Garrigós

💻 @@ -807,7 +807,7 @@ We recognize all types of contributions. This project follows the [all-contribut Joseph Hong
Joseph Hong

💻 - Jithin KS
Jithin KS

💻 + Jithin KS
Jithin KS

💻 💡 Jason Mandel
Jason Mandel

💻 JoeCastor
JoeCastor

💻 Juan Irache
Juan Irache

💻 @@ -921,7 +921,7 @@ We recognize all types of contributions. This project follows the [all-contribut Garima
Garima

💻 Lakshay Joshi
Lakshay Joshi

💻 - perminder-17
perminder-17

💻 + perminder-17
perminder-17

💻 🐛 📖 💡 🤔 🔌 📆 📣 💬 🔬 Yash Pandey
Yash Pandey

🐛 💻 Aditya Deshpande
Aditya Deshpande

🐛 📖 Alejandro
Alejandro

🐛 💻 @@ -1044,7 +1044,7 @@ We recognize all types of contributions. This project follows the [all-contribut c-dacanay
c-dacanay

🎨 📋 💡 mathewpan2
mathewpan2

💻 cog25
cog25

🌍 - Aarati Akkapeddi
Aarati Akkapeddi

💻 + Aarati Akkapeddi
Aarati Akkapeddi

💻 🤔 Maya Arguelles
Maya Arguelles

💻 @@ -1080,6 +1080,40 @@ We recognize all types of contributions. This project follows the [all-contribut Rajas Samse
Rajas Samse

💻 📖 + Jordan Philyaw
Jordan Philyaw

📖 + oliver thurley
oliver thurley

📖 💻 + Renjie Li
Renjie Li

📖 💻 + Vaivaswat Dubey
Vaivaswat Dubey

💻 + Xin Xin
Xin Xin

📋 📢 🧑‍🏫 🤔 + + + Ashish Karn
Ashish Karn

💻 + Darren Kessner
Darren Kessner

💡 + Animesh Sinha
Animesh Sinha

💡 + Kathryn Lichlyter
Kathryn Lichlyter

💡 + Greg Albers
Greg Albers

💡 + Marco Macarena
Marco Macarena

💡 + + + Kristian Hamilton
Kristian Hamilton

💡 + Keshav Gupta
Keshav Gupta

💡 + Ritesh Patil
Ritesh Patil

💡 + Gabriel Sroka
Gabriel Sroka

💡 + Casey Conchinha
Casey Conchinha

💡 + davidblitz
davidblitz

💡 + + + crh82
crh82

💡 + Aaron Welles
Aaron Welles
💡 + Seyko
Seyko

💻 + Xevi H. Aqeel
Xevi H. Aqeel

💡 🎨 + Greg Stanton
Greg Stanton

🐛 💻 📖 💡 🤔 🔌 📆 📣 💬 🔬 + Bojidar Marinov
Bojidar Marinov

💻 ⚠️ + + + Mayank Verma
Mayank Verma

💻 + mclark414
mclark414

🤔 + Mx. Ramsey
Mx. Ramsey

🤔 diff --git a/contributor_docs/es/contributing_to_the_p5js_reference.md b/contributor_docs/es/contributing_to_the_p5js_reference.md index c70557d84c..714cc4cc4c 100644 --- a/contributor_docs/es/contributing_to_the_p5js_reference.md +++ b/contributor_docs/es/contributing_to_the_p5js_reference.md @@ -71,7 +71,7 @@ Cualquier cosa en un bloque de estos se interpretará como documentación de ref ## Bloque de comentarios de referencia -Desglosemos el bloque de comentarios de referencia anterior para la función `sin()` y veamos qué hace cada sección. Puedes comparar lo que vez en estos comentarios con el contenido de la página de referencia para [`sin()`](https://p5js.org/reference/#/p5/sin). +Desglosemos el bloque de comentarios de referencia anterior para la función `sin()` y veamos qué hace cada sección. Puedes comparar lo que vez en estos comentarios con el contenido de la página de referencia para [`sin()`](https://p5js.org/reference/p5/sin). ``` /** @@ -138,7 +138,7 @@ Si el método devuelve el objeto de la superclase, puedes omitir la etiqueta `@r ## Firmas adicionales -Si una función tiene múltiples opciones de parámetros posibles, puedes especificar cada una individualmente. Por ejemplo, la función [`background()`](http://p5js.org/reference/#p5/background) toma una serie de opciones de parámetros diferentes (ver la sección "Sintaxis" en la página de referencia). Elige una versión para incluirla como la primera firma usando la plantilla anterior. Al final del primer bloque de comentarios de referencia puedes agregar firmas adicionales, cada una en su propio bloque, como en el siguiente ejemplo. +Si una función tiene múltiples opciones de parámetros posibles, puedes especificar cada una individualmente. Por ejemplo, la función [`background()`](https://p5js.org/reference/#p5/background) toma una serie de opciones de parámetros diferentes (ver la sección "Sintaxis" en la página de referencia). Elige una versión para incluirla como la primera firma usando la plantilla anterior. Al final del primer bloque de comentarios de referencia puedes agregar firmas adicionales, cada una en su propio bloque, como en el siguiente ejemplo. ``` /** @@ -262,7 +262,7 @@ Si no quieres que el ejemplo se ejecute como parte de las pruebas automatizadas * ``` -Si tu ejemplo utiliza archivos externos como recursos, colócalos en la carpeta [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) (o reutiliza uno que ya esté allí) y luego enlázalos con "assets/nombrearchivo.ext" en el código. Consulta la referencia de [tint()](http://p5js.org/reference/#/p5/tint) como ejemplo. +Si tu ejemplo utiliza archivos externos como recursos, colócalos en la carpeta [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) (o reutiliza uno que ya esté allí) y luego enlázalos con "assets/nombrearchivo.ext" en el código. Consulta la referencia de [tint()](https://p5js.org/reference/p5/tint) como ejemplo. ### Agregar descripción a un lienzo usando `describe()` diff --git a/contributor_docs/fes_contribution_guide.md b/contributor_docs/fes_contribution_guide.md index 8796ab9102..99911707e1 100644 --- a/contributor_docs/fes_contribution_guide.md +++ b/contributor_docs/fes_contribution_guide.md @@ -245,7 +245,7 @@ arc(1, 1, 10.5, 10); FES will generate the following message in the console: ``` -🌸 p5.js says: [sketch.js, line 13] arc() was expecting at least 6 arguments, but received only 4. (http://p5js.org/reference/#/p5/arc) +🌸 p5.js says: [sketch.js, line 13] arc() was expecting at least 6 arguments, but received only 4. (https://p5js.org/reference/p5/arc) ``` Example of a type mismatch @@ -257,7 +257,7 @@ arc(1, ',1', 10.5, 10, 0, Math.PI); FES will generate the following message in the console: ``` -🌸 p5.js says: [sketch.js, line 14] arc() was expecting Number for the first parameter, received string instead. (http://p5js.org/reference/#/p5/arc) +🌸 p5.js says: [sketch.js, line 14] arc() was expecting Number for the first parameter, received string instead. (https://p5js.org/reference/p5/arc) ``` @@ -336,7 +336,7 @@ function preload() { FES will generate the following message in the console: ``` -🌸 p5.js says: [sketch.js, line 8] An error with message "Cannot read properties of undefined (reading 'background')" occurred inside the p5js library when "background" was called. If not stated otherwise, it might be due to "background" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function. (http://p5js.org/reference/#/p5/preload) +🌸 p5.js says: [sketch.js, line 8] An error with message "Cannot read properties of undefined (reading 'background')" occurred inside the p5js library when "background" was called. If not stated otherwise, it might be due to "background" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function. (https://p5js.org/reference/p5/preload) ``` Internal Error Example 2: @@ -351,7 +351,7 @@ function setup() { FES will generate the following message in the console: ```js -🌸 p5.js says: [sketch.js, line 12] An error with message "Cannot read properties of undefined (reading 'bind')" occurred inside the p5js library when mouseClicked was called. If not stated otherwise, it might be an issue with the arguments passed to mouseClicked. (http://p5js.org/reference/#/p5/mouseClicked) +🌸 p5.js says: [sketch.js, line 12] An error with message "Cannot read properties of undefined (reading 'bind')" occurred inside the p5js library when mouseClicked was called. If not stated otherwise, it might be an issue with the arguments passed to mouseClicked. (https://p5js.org/reference/p5/mouseClicked) ``` Example of an Error (Scope): @@ -386,7 +386,7 @@ function setup() { FES will generate the following message in the console: ``` -🌸 p5.js says: [sketch.js, line 2] It seems that you may have accidentally written "xolor" instead of "color". Please correct it to color if you wish to use the function from p5.js. (http://p5js.org/reference/#/p5/color) +🌸 p5.js says: [sketch.js, line 2] It seems that you may have accidentally written "xolor" instead of "color". Please correct it to color if you wish to use the function from p5.js. (https://p5js.org/reference/p5/color) ``` @@ -431,7 +431,7 @@ function preload() { FES will generate the following message in the console: ``` -🌸 p5.js says: It seems that you may have accidentally written preLoad instead of preload. Please correct it if it's not intentional. (http://p5js.org/reference/#/p5/preload) +🌸 p5.js says: It seems that you may have accidentally written preLoad instead of preload. Please correct it if it's not intentional. (https://p5js.org/reference/p5/preload) ``` diff --git a/contributor_docs/hi/README.md b/contributor_docs/hi/README.md index ff65b5214c..d6a109063f 100644 --- a/contributor_docs/hi/README.md +++ b/contributor_docs/hi/README.md @@ -13,7 +13,7 @@ p5.js में योगदान देने में आपकी रुच व्यापक p5.js परियोजना में इस के अलावा कुछ रिपॉजिटरी शामिल हैं- - [p5.js](https://github.com/processing/p5.js): इस रिपॉजिटरी में p5.js लाइब्रेरी का स्रोत कोड है। [p5.js संदर्भ मैनुअल](https://p5js.org/reference/) भी इस स्रोत कोड में शामिल [JSDoc](http://usejsdoc.org/) टिप्पणियों से उत्पन्न होता है। इसका अनुरक्षण [Moira Turner](https://github.com/mcturner1995) के द्वारा किया जा रहा है। -- [p5.js-website](https://github.com/processing/p5.js-website) इस रिपॉजिटरी में [p5.js वेबसाइट](http://p5js.org) का अधिकांश कोड हैं, संदर्भ मैनुअल के अपवाद के साथ। इसका अनुरक्षण [Moira Turner](https://github.com/mcturner1995) के द्वारा किया जा रहा है। +- [p5.js-website](https://github.com/processing/p5.js-website) इस रिपॉजिटरी में [p5.js वेबसाइट](https://p5js.org) का अधिकांश कोड हैं, संदर्भ मैनुअल के अपवाद के साथ। इसका अनुरक्षण [Moira Turner](https://github.com/mcturner1995) के द्वारा किया जा रहा है। - [p5.js-sound](https://github.com/processing/p5.js-sound) इस भंडार में p5.sound.js लाइब्रेरी है। इसका अनुरक्षण [Jason Sigal](https://github.com/therewasaguy) के द्वारा किया जा रहा है। - [p5.js-web-editor](https://github.com/processing/p5.js-web-editor) इस रिपॉजिटरी में [p5.js वेब एडिटर](https://editor.p5js.org) के लिए स्रोत कोड है। इसका अनुरक्षण [Cassie Tarakajian](https://github.com/catarak) के द्वारा किया जा रहा है। ध्यान दें कि पुराना [p5.js संपादक](https://github.com/processing/p5.js-editor) अब पदावनत हो गया है। @@ -34,7 +34,7 @@ p5.js में योगदान देने में आपकी रुच हमें एहसास है कि प्रलेखन इस परियोजना का सबसे महत्वपूर्ण हिस्सा है। खराब प्रलेखन नए उपयोगकर्ताओं और योगदानकर्ताओं के लिए उपयोग करने के लिए मुख्य बाधाओं में से एक है, जिससे परियोजना कम समावेशी हो जाती है। [contributing_documentation.md](./contributing_documentation.md) पृष्ठ प्रलेखन के साथ आरंभ करने का एक गहन अवलोकन देता है। p5.js के लिए प्रलेखन कुछ मुख्य स्थानों में पाया जा सकता है: - [p5js.org संदर्भ](https://p5js.org/reference/) स्रोत कोड में ही [इनलाइन प्रलेखन](./inline_documentation.md) से उत्पन्न होता है। इसमें पाठ विवरण और पैरामीटर के साथ-साथ कोड स्निपेट उदाहरण भी शामिल हैं। हम कोड और प्रलेखन को निकटता से रखने के लिए यह सब इनलाइन रखते हैं, और इस विचार को सुदृढ़ करने के लिए कि कोड में योगदान देने की तुलना में प्रलेखन में योगदान करना अधिक महत्वपूर्ण है (यदि अधिक नहीं)। जब लाइब्रेरी निर्मित हो जाता है, तो यह इनलाइन प्रलेखन और उदाहरणों की जांच करता है ताकि यह सुनिश्चित हो सके कि वे कोड के व्यवहार के तरीके से मेल खाते हैं। योगदान करने के लिए, आप [inline_documentation.md](./inline_documentation.md) पृष्ठ को देखकर शुरू कर सकते हैं। -- The [p5js.org उदाहरण](http://p5js.org/examples) पृष्ठ में लंबे उदाहरण हैं जो p5.js. सीखने के लिए उपयोगी हो सकते हैं। योगदान करने के लिए, आप [add_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) पृष्ठ को देखकर शुरू कर सकते हैं। +- The [p5js.org उदाहरण](https://p5js.org/examples) पृष्ठ में लंबे उदाहरण हैं जो p5.js. सीखने के लिए उपयोगी हो सकते हैं। योगदान करने के लिए, आप [add_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) पृष्ठ को देखकर शुरू कर सकते हैं। - The [p5js.org सीखिए](https://p5js.org/tutorials) पृष्ठ में p5.js और प्रोग्रामिंग की अवधारणाओं को सीखने में मदद करने के लिए ट्यूटोरियल हैं। योगदान करने के लिए, आप [p5.js ट्यूटोरियल में योगदान करने के लिए गाइड](https://p5js.org/learn/tutorial-guide.html) देखकर शुरू कर सकते हैं। - आप देखेंगे कि वर्तमान में p5.js वेबसाइट कुछ अलग भाषाओं का समर्थन करती है। इसे अंतर्राष्ट्रीयकरण (या संक्षेप में i18n) कहा जाता है। आप इस दस्तावेज़ के बारे में [i18n_contribution](https://github.com/processing/p5.js-website/blob/main/contributor_docs/i18n_contention.md) पृष्ठ पर अधिक पढ़ सकते हैं। diff --git a/contributor_docs/hi/contributing_to_the_p5js_reference.md b/contributor_docs/hi/contributing_to_the_p5js_reference.md index 3a9efa1beb..07d86d503c 100644 --- a/contributor_docs/hi/contributing_to_the_p5js_reference.md +++ b/contributor_docs/hi/contributing_to_the_p5js_reference.md @@ -73,7 +73,7 @@ p5.js के स्रोत कोड को देखने पर, आपक ## संदर्भ टिप्पणी ब्लॉक -ऊपर दिए गए `sin()` फ़ंक्शन के लिए संदर्भ टिप्पणियों ब्लॉक को विश्लेषित करें और देखें कि प्रत्येक खंड का क्या काम है। आप यहाँ टिप्पणियों में दिखने वाली जानकारी और `sin()` के संदर्भ पृष्ठ पर जो दिखता है, उनकी तुलना कर सकते हैं। ([`sin()`](https://p5js.org/reference/#/p5/sin)) +ऊपर दिए गए `sin()` फ़ंक्शन के लिए संदर्भ टिप्पणियों ब्लॉक को विश्लेषित करें और देखें कि प्रत्येक खंड का क्या काम है। आप यहाँ टिप्पणियों में दिखने वाली जानकारी और `sin()` के संदर्भ पृष्ठ पर जो दिखता है, उनकी तुलना कर सकते हैं। ([`sin()`](https://p5js.org/reference/p5/sin)) ``` /** @@ -143,7 +143,7 @@ p5.js के स्रोत कोड को देखने पर, आपक ## अतिरिक्त चिन्ह -यदि किसी फ़ंक्शन के पास कई संभावित पैरामीटर विकल्प हैं, तो आप प्रत्येक को व्यक्तिगत रूप से निर्दिष्ट कर सकते हैं। उदाहरण के लिए, [`background()`](http://p5js.org/reference/#p5/background) फ़ंक्शन कई विभिन्न पैरामीटर विकल्प लेता है (संदर्भ पृष्ठ पर "सिंटैक्स" खण्ड देखें)। पहले हस्ताक्षर के रूप में एक संस्करण को चुनें और उसे पहले संदर्भ टिप्पणी ब्लॉक के अंत में जोड़ें, निम्नलिखित उदाहरण का पालन करें। पहले संदर्भ टिप्पणी ब्लॉक के अंत में, आप अतिरिक्त हस्ताक्षर जोड़ सकते हैं, प्रत्येक अपने ब्लॉक में, केवल `@method` और `@param` टैग का पालन करते हुए, निम्नलिखित उदाहरण का पालन करें। +यदि किसी फ़ंक्शन के पास कई संभावित पैरामीटर विकल्प हैं, तो आप प्रत्येक को व्यक्तिगत रूप से निर्दिष्ट कर सकते हैं। उदाहरण के लिए, [`background()`](https://p5js.org/reference/#p5/background) फ़ंक्शन कई विभिन्न पैरामीटर विकल्प लेता है (संदर्भ पृष्ठ पर "सिंटैक्स" खण्ड देखें)। पहले हस्ताक्षर के रूप में एक संस्करण को चुनें और उसे पहले संदर्भ टिप्पणी ब्लॉक के अंत में जोड़ें, निम्नलिखित उदाहरण का पालन करें। पहले संदर्भ टिप्पणी ब्लॉक के अंत में, आप अतिरिक्त हस्ताक्षर जोड़ सकते हैं, प्रत्येक अपने ब्लॉक में, केवल `@method` और `@param` टैग का पालन करते हुए, निम्नलिखित उदाहरण का पालन करें। ``` /** @@ -270,7 +270,7 @@ p5.js के स्रोत कोड को देखने पर, आपक * ``` -यदि आपका उदाहरण बाहरी संसाधन फ़ाइलों का उपयोग करता है, तो उन्हें [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) फ़ोल्डर में रखें (या पहले से वहां मौजूद कोई उपयोग करें) फिर उन्हें कोड में "assets/filename.ext" के साथ लिंक करें। उदाहरण के लिए [tint()](http://p5js.org/reference/#/p5/tint) संदर्भ देखें। +यदि आपका उदाहरण बाहरी संसाधन फ़ाइलों का उपयोग करता है, तो उन्हें [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) फ़ोल्डर में रखें (या पहले से वहां मौजूद कोई उपयोग करें) फिर उन्हें कोड में "assets/filename.ext" के साथ लिंक करें। उदाहरण के लिए [tint()](https://p5js.org/reference/p5/tint) संदर्भ देखें। ### `describe()` का उपयोग करके कैनवास का विवरण जोड़ें diff --git a/contributor_docs/how-to-add-friendly-error-messages.md b/contributor_docs/how-to-add-friendly-error-messages.md index 46976705c9..4b945c899d 100644 --- a/contributor_docs/how-to-add-friendly-error-messages.md +++ b/contributor_docs/how-to-add-friendly-error-messages.md @@ -122,9 +122,9 @@ circle(100, 100, 'hello'); The code above should generate the following FE messages: ``` -🌸 p5.js says: [sketch.js, line 9] circle() was expecting at least 3 arguments, but received only 1. (http://p5js.org/reference/#/p5/circle) -🌸 p5.js says: [sketch.js, line 14] circle() was expecting no more than 3 arguments, but received 4. (http://p5js.org/reference/#/p5/circle) -🌸 p5.js says: [sketch.js, line 12] circle() was expecting Number for the third parameter, received string instead. (http://p5js.org/reference/#/p5/circle) +🌸 p5.js says: [sketch.js, line 9] circle() was expecting at least 3 arguments, but received only 1. (https://p5js.org/reference/p5/circle) +🌸 p5.js says: [sketch.js, line 14] circle() was expecting no more than 3 arguments, but received 4. (https://p5js.org/reference/p5/circle) +🌸 p5.js says: [sketch.js, line 12] circle() was expecting Number for the third parameter, received string instead. (https://p5js.org/reference/p5/circle) ``` Congratulations 🎈! You are now done adding parameter validation for your new method. @@ -247,7 +247,7 @@ p5._friendlyError( This should generate the following FE messages: ``` -🌸 p5.js says: [sketch.js, line 19] An error with the message "vertex() must be used once before calling bezierVertex()" occurred inside the p5js library when bezierVertex was called. If not stated otherwise, it might be an issue with the arguments passed to bezierVertex. (http://p5js.org/reference/#/p5/bezierVertex)  +🌸 p5.js says: [sketch.js, line 19] An error with the message "vertex() must be used once before calling bezierVertex()" occurred inside the p5js library when bezierVertex was called. If not stated otherwise, it might be an issue with the arguments passed to bezierVertex. (https://p5js.org/reference/p5/bezierVertex)  ``` Congratulations 🎈! You are now done adding library error messages for your method. @@ -258,13 +258,13 @@ Congratulations 🎈! You are now done adding library error messages for your me FES message writers should prioritize lowering the barrier of understanding error messages and increasing the accessibility of the debugging process. Here is one example: ``` -🌸 p5.js says: [sketch.js, line 7] circle() was expecting at least 3 arguments, but received only 1. (http://p5js.org/reference/#/p5/circle)  +🌸 p5.js says: [sketch.js, line 7] circle() was expecting at least 3 arguments, but received only 1. (https://p5js.org/reference/p5/circle)  ``` The above parameter validation message will be shown in Korean if the browser is set to `ko-KR` (Korean) locale: ``` -🌸 p5.js says: [sketch.js, 줄7] 최소 3개의 인수(argument)를 받는 함수 circle()에 인수가 1개만 입력되었습니다. (http://p5js.org/reference/#/p5/circle)  +🌸 p5.js says: [sketch.js, 줄7] 최소 3개의 인수(argument)를 받는 함수 circle()에 인수가 1개만 입력되었습니다. (https://p5js.org/reference/p5/circle)  ``` [Friendly Errors i18n Book](https://almchung.github.io/p5-fes-i18n-book/) discusses challenges and best practices for writing Friendly Error messages within the cross-cultural i18n context. Here are the main points from the book: diff --git a/contributor_docs/ja/README.md b/contributor_docs/ja/README.md index 0859e93c1b..cd3a874808 100644 --- a/contributor_docs/ja/README.md +++ b/contributor_docs/ja/README.md @@ -11,7 +11,7 @@ p5.jsに貢献することに興味を持ってくれてありがとうござい p5.jsプロジェクトには、このコードリポジトリ以外にもいくつかの他のコードリポジトリがあります: - [p5.js](https://github.com/processing/p5.js):p5.jsのソースコードを含みます。[ユーザー向けのp5.js参照文献](https://p5js.org/reference/)も、このソースコード内の[JSDoc](http://usejsdoc.org/)コメントから生成されます。[Lauren Lee McCarthy](https://github.com/lmccart)がメンテナーです。 -- [p5.js-website](https://github.com/processing/p5.js-website):このソースコードは、[p5.jsウェブサイト](http://p5js.org)の大部分のコードを含んでいます(参照文献を除く)。[Lauren Lee McCarthy](https://github.com/lmccart)がメンテナーです。 +- [p5.js-website](https://github.com/processing/p5.js-website):このソースコードは、[p5.jsウェブサイト](https://p5js.org)の大部分のコードを含んでいます(参照文献を除く)。[Lauren Lee McCarthy](https://github.com/lmccart)がメンテナーです。 - [p5.js-sound](https://github.com/processing/p5.js-sound):p5.sound.jsライブラリを含みます。[Jason Sigal](https://github.com/therewasaguy)がメンテナーです。 - [p5.js-web-editor](https://github.com/processing/p5.js-web-editor):[p5.jsウェブエディタ](https://editor.p5js.org)のソースコードを含みます。[Cassie Tarakajian](https://github.com/catarak)がメンテナーです。旧版の[p5.jsエディタ](https://github.com/processing/p5.js-editor)はもはやサポートされていませんのでご注意ください。 - [p5.accessibility](https://github.com/processing/p5.accessibility):盲人や視覚障害者がp5.jsをより使いやすくするためのライブラリです。 @@ -34,7 +34,7 @@ p5.jsプロジェクトには、このコードリポジトリ以外にもいく 私たちは、参照文献がこのプロジェクトの最も重要な部分であることを認識しています。不十分な参照文献は、新規ユーザーや新規貢献者にとって最大の障壁であり、プロジェクトの包括性を損ないます。[contributing_documentation.md](./contributing_documentation.md)ページでは、参照文献の修正を開始するための詳細なガイドを提供しています。p5.jsの参照文献は、以下の場所で見つけることができます: - [p5js.org/reference](https://p5js.org/reference/):[inline documentation](./inline_documentation.md)のソースコードから生成されます。それには、テキストの説明とパラメータ、添付されたコードスニペットの例が含まれています。コードと参照文献を密接に連携させるために、これらすべてのインラインドキュメントとコードを一緒に配置し、参照文献への貢献がコードへの貢献と少なくとも同じくらい重要であるという考えを強化しています。ライブラリをビルドすると、インライン参照文献と例がコードの動作と一致するかどうかをチェックします。貢献するには、まず[inline_documentation.md](./inline_documentation.md)ページをチェックしてください。 -- [p5js.org/examples](http://p5js.org/examples)ページには、p5.jsを学ぶのに役立つより長い例が含まれています。貢献するには、まず[adding_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md)をチェックしてください。 +- [p5js.org/examples](https://p5js.org/examples)ページには、p5.jsを学ぶのに役立つより長い例が含まれています。貢献するには、まず[adding_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md)をチェックしてください。 - [p5js.org/tutorials](https://p5js.org/tutorials)ページには、p5.jsやプログラミングの概念を学ぶのに役立つチュートリアルが含まれています。貢献するには、まず[p5.js tutorial guide](https://p5js.org/learn/tutorial-guide.html)をチェックしてください。 - p5.jsウェブサイトが現在いくつかの異なる言語をサポートしていることに気付くかもしれません。これは国際化(i18n)と呼ばれます。[i18n_contribution](https://github.com/processing/p5.js-website/blob/main/contributor_docs/i18n_contribution.md)ページで詳細を学ぶことができます。 diff --git a/contributor_docs/ja/contributing_to_the_p5.js_reference.md b/contributor_docs/ja/contributing_to_the_p5.js_reference.md index 741c39d63c..8e606b1b96 100644 --- a/contributor_docs/ja/contributing_to_the_p5.js_reference.md +++ b/contributor_docs/ja/contributing_to_the_p5.js_reference.md @@ -68,11 +68,11 @@ p5.jsのソースコードを見るとき、ライブラリ内の多くの行が 実際のJavaScriptコードで関数が定義されているのは、そのコメントの直後です。参考コメントは常に `/**` で始まり、`*/` で終わります。その間の各行は `*` で始まります。 -この形式のコードブロックに含まれるすべての内容は参考文献として解釈されます。あなたはおそらく [JSDoc](https://jsdoc.app/) を通じてこのスタイルのコードコメントに慣れているでしょう。p5.jsはJSDocを使用していませんが、非常に似たツールである [YUIDoc](https://yui.github.io/yuidoc/) を使用しており、参照構文も非常に似ています。このスタイルの参考コメントブロックでは、各コメントブロックがさらに個々の要素に分かれています。以下では、`sin()` 関数の参考コメントブロックを解析し、各部分の役割について見ていきます。参照ページの [`sin()`](https://p5js.org/reference/#/p5/sin) と比較することができます。 +この形式のコードブロックに含まれるすべての内容は参考文献として解釈されます。あなたはおそらく [JSDoc](https://jsdoc.app/) を通じてこのスタイルのコードコメントに慣れているでしょう。p5.jsはJSDocを使用していませんが、非常に似たツールである [YUIDoc](https://yui.github.io/yuidoc/) を使用しており、参照構文も非常に似ています。このスタイルの参考コメントブロックでは、各コメントブロックがさらに個々の要素に分かれています。以下では、`sin()` 関数の参考コメントブロックを解析し、各部分の役割について見ていきます。参照ページの [`sin()`](https://p5js.org/reference/p5/sin) と比較することができます。 ## 参考コメントブロック -上記の `sin()` 関数の参考コメントブロックを解析し、各部分の役割を見ていきましょう。このコメントを参照ページ上の [`sin()`](https://p5js.org/reference/#/p5/sin) と比較することができます。 +上記の `sin()` 関数の参考コメントブロックを解析し、各部分の役割を見ていきましょう。このコメントを参照ページ上の [`sin()`](https://p5js.org/reference/p5/sin) と比較することができます。 ``` /** @@ -143,7 +143,7 @@ p5.jsのソースコードを見るとき、ライブラリ内の多くの行が ## 其他签名 -如果一个函数有多个可能的参数选项,则可以分别指定每个参数。例如,[`background()`](http://p5js.org/reference/#p5/background) 函数有许多不同的参数选项(请参阅参考页面上的“语法”部分)。选择一个版本以使用上面的模板列出作为第一个签名。在第一个参考注释块的末尾,你可以添加额外的签名,每个签名都在自己的块中,仅使用以下示例中的 `@method` 和 `@param` 标签。 +如果一个函数有多个可能的参数选项,则可以分别指定每个参数。例如,[`background()`](https://p5js.org/reference/#p5/background) 函数有许多不同的参数选项(请参阅参考页面上的“语法”部分)。选择一个版本以使用上面的模板列出作为第一个签名。在第一个参考注释块的末尾,你可以添加额外的签名,每个签名都在自己的块中,仅使用以下示例中的 `@method` 和 `@param` 标签。 ``` /** @@ -270,7 +270,7 @@ p5.jsのソースコードを見るとき、ライブラリ内の多くの行が * ``` -サンプルで外部アセット ファイルを使用する場合は、それらを [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5 -theme/assets) に配置してください。 フォルダー (またはそこにある既存のファイルを再利用) を作成し、「assets/filename.ext」を使用してコード内でそれらにリンクします。 参考例については、[tint()](http://p5js.org/reference/#/p5/tint) を参照してください。 +サンプルで外部アセット ファイルを使用する場合は、それらを [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5 -theme/assets) に配置してください。 フォルダー (またはそこにある既存のファイルを再利用) を作成し、「assets/filename.ext」を使用してコード内でそれらにリンクします。 参考例については、[tint()](https://p5js.org/reference/p5/tint) を参照してください。 ### `describe()` を使用してキャンバスの説明を追加します diff --git a/contributor_docs/ja/creating_libraries.md b/contributor_docs/ja/creating_libraries.md index 3935fd9693..fad4b085cc 100644 --- a/contributor_docs/ja/creating_libraries.md +++ b/contributor_docs/ja/creating_libraries.md @@ -120,8 +120,8 @@ https://github.com/processing/processing/wiki/Library-Basics#library-methods * **貢献ライブラリは、作成者によってホスト、文書化、およびメンテナンスされます。** これはGitHub、個別のウェブサイト、またはその他の場所で行われる可能性があります。 -* **ドキュメントは非常に重要です!** ライブラリのドキュメントは、ダウンロードしてライブラリを使用するユーザーが簡単に見つけられる場所に配置してください。貢献ライブラリのドキュメントは、p5.jsの主要なリファレンスドキュメントには含まれませんが、類似の形式に従うことを検討してください。以下の例を参照してください:[ライブラリ概要ページ](http://p5js.org/reference/#/libraries/p5.sound)、[クラス概要ページ](http://p5js.org/reference/#/p5.Vector)、[メソッドページ](http://p5js.org/reference/#/p5/arc)。 +* **ドキュメントは非常に重要です!** ライブラリのドキュメントは、ダウンロードしてライブラリを使用するユーザーが簡単に見つけられる場所に配置してください。貢献ライブラリのドキュメントは、p5.jsの主要なリファレンスドキュメントには含まれませんが、類似の形式に従うことを検討してください。以下の例を参照してください:[ライブラリ概要ページ](https://p5js.org/reference/libraries/p5.sound)、[クラス概要ページ](https://p5js.org/reference/p5.Vector)、[メソッドページ](https://p5js.org/reference/p5/arc)。 * **例も素晴らしいです!** それらは人々にあなたのライブラリが何ができるかを示します。これはすべてJavaScriptなので、ダウンロードする前にオンラインで実行することができます。[jsfiddle](http://jsfiddle.net/)と[codepen](http://codepen.io)は、例をホストするための2つの良いシンプルなオプションです。 -* **お知らせください!** ライブラリがリリース準備が整ったら、[hello@p5js.org](mailto:hello@p5js.org)にリンクといくつかの情報を添えてメールを送ってください。[ライブラリページ](http://p5js.org/libraries/)に掲載されます! +* **お知らせください!** ライブラリがリリース準備が整ったら、[hello@p5js.org](mailto:hello@p5js.org)にリンクといくつかの情報を添えてメールを送ってください。[ライブラリページ](https://p5js.org/libraries/)に掲載されます! diff --git a/contributor_docs/ja/fes_reference_dev_notes.md b/contributor_docs/ja/fes_reference_dev_notes.md index 8b77378e1f..60ebdbcfef 100644 --- a/contributor_docs/ja/fes_reference_dev_notes.md +++ b/contributor_docs/ja/fes_reference_dev_notes.md @@ -213,16 +213,16 @@ _validateParameters(func, args) arc(1, 1, 10.5, 10); ``` FESはコンソールに以下のメッセージを生成します: -> 🌸 p5.jsが言うには、arc()は位置#4(ゼロベースのインデックス)で空の変数を受け取ったようです。これが意図的でない場合、通常はスコープの問題です:[https://p5js.org/examples/data-variable-scope.html]。[http://p5js.org/reference/#p5/arc] +> 🌸 p5.jsが言うには、arc()は位置#4(ゼロベースのインデックス)で空の変数を受け取ったようです。これが意図的でない場合、通常はスコープの問題です:[https://p5js.org/examples/data-variable-scope.html]。[https://p5js.org/reference/#p5/arc] -> 🌸 p5.jsが言うには、arc()は位置#5(ゼロベースのインデックス)で空の変数を受け取ったようです。これが意図的でない場合、通常はスコープの問題です:[https://p5js.org/examples/data-variable-scope.html]。[http://p5js.org/reference/#p5/arc] +> 🌸 p5.jsが言うには、arc()は位置#5(ゼロベースのインデックス)で空の変数を受け取ったようです。これが意図的でない場合、通常はスコープの問題です:[https://p5js.org/examples/data-variable-scope.html]。[https://p5js.org/reference/#p5/arc] 型の不一致の例 ```javascript arc('1', 1, 10.5, 10, 0, Math.PI, 'pie'); ``` FESはコンソールに以下のメッセージを生成します: -> 🌸 p5.jsが言うには、arc()はパラメータ#0(ゼロベースのインデックス)でNumberを期待していましたが、文字列を受け取りました。[http://p5js.org/reference/#/p5/arc] +> 🌸 p5.jsが言うには、arc()はパラメータ#0(ゼロベースのインデックス)でNumberを期待していましたが、文字列を受け取りました。[https://p5js.org/reference/p5/arc] ##### 位置 core/friendly_errors/validate_params.js @@ -276,7 +276,7 @@ function preload() { } ``` FES将在控制台中生成以下消息: -> 🌸 p5.jsが言うには、backgroundを呼び出したとき(sketch.jsの4行目[http://localhost:8000/lib/empty-example/sketch.js:4:3])、p5jsライブラリ内部でエラーが発生しました。エラーメッセージは「未定義のプロパティ'background'を読み取れません」です。(特に説明がない限り、これはpreloadからbackgroundが呼び出されたためかもしれません。preload関数内にはload関数(loadImage、loadJSON、loadFont、loadStringsなど)以外は含まれていないべきです。)(http://p5js.org/reference/#/p5/preload) +> 🌸 p5.jsが言うには、backgroundを呼び出したとき(sketch.jsの4行目[http://localhost:8000/lib/empty-example/sketch.js:4:3])、p5jsライブラリ内部でエラーが発生しました。エラーメッセージは「未定義のプロパティ'background'を読み取れません」です。(特に説明がない限り、これはpreloadからbackgroundが呼び出されたためかもしれません。preload関数内にはload関数(loadImage、loadJSON、loadFont、loadStringsなど)以外は含まれていないべきです。)(https://p5js.org/reference/p5/preload) 内部エラーの例 2 ```javascript @@ -286,7 +286,7 @@ function setup() { } ``` FES将在控制台中生成以下消息: -> 🌸 p5.jsが言うには、mouseClickedを呼び出したとき(sketch.jsの3行目[http://localhost:8000/lib/empty-example/sketch.js:3:7])、p5jsライブラリ内部でエラーが発生しました。エラーメッセージは「未定義のプロパティ'bind'を読み取れません」です。(特に説明がない限り、これはmouseClickedへの引数に問題がある可能性があります。)(http://p5js.org/reference/#/p5/mouseClicked) +> 🌸 p5.jsが言うには、mouseClickedを呼び出したとき(sketch.jsの3行目[http://localhost:8000/lib/empty-example/sketch.js:3:7])、p5jsライブラリ内部でエラーが発生しました。エラーメッセージは「未定義のプロパティ'bind'を読み取れません」です。(特に説明がない限り、これはmouseClickedへの引数に問題がある可能性があります。)(https://p5js.org/reference/p5/mouseClicked) ユーザー例のスコープエラーの例 ```javascript @@ -306,7 +306,7 @@ function setup() { } ``` FESはコンソールに以下のメッセージを生成します: -> 🌸 p5.jsが言うには、「colour」を誤って「color」と書いてしまった可能性があります(sketch.jsの2行目[http://localhost:8000/lib/empty-example/sketch.js:2:3])。p5.jsの関数を使用する場合は、それをcolorに修正してください(http://p5js.org/reference/#/p5/color)。 +> 🌸 p5.jsが言うには、「colour」を誤って「color」と書いてしまった可能性があります(sketch.jsの2行目[http://localhost:8000/lib/empty-example/sketch.js:2:3])。p5.jsの関数を使用する場合は、それをcolorに修正してください(https://p5js.org/reference/p5/color)。 ##### 位置 core/friendly_errors/fes_core.js @@ -334,7 +334,7 @@ function setup() { } ``` FESはコンソールに以下のメッセージを生成します: -> 🌸 p5.jsのヒント:p5.jsの予約された変数「PI」を使用しています。変数名を他の名前に変更してください。(https://p5js.org/reference/#/p5/PI) +> 🌸 p5.jsのヒント:p5.jsの予約された変数「PI」を使用しています。変数名を他の名前に変更してください。(https://p5js.org/reference/p5/PI) p5.j​​sの予約関数の再定義例 ```javascript @@ -372,7 +372,7 @@ function preLoad() { } ``` FESはコンソールに以下のメッセージを生成します: -> 🌸 p5.jsのヒント:preLoadと書くべきところをpreloadと誤って書いているようです。これが意図していない場合は、訂正してください。(http://p5js.org/reference/#/p5/preload) +> 🌸 p5.jsのヒント:preLoadと書くべきところをpreloadと誤って書いているようです。これが意図していない場合は、訂正してください。(https://p5js.org/reference/p5/preload) ##### 位置 core/friendly_errors/fes_core.js diff --git a/contributor_docs/ko/README.md b/contributor_docs/ko/README.md index bf770b4736..90ff0c357a 100644 --- a/contributor_docs/ko/README.md +++ b/contributor_docs/ko/README.md @@ -13,7 +13,7 @@ p5.js에 기여하는데에 관심을 가져주셔서 감사합니다! 우리 p5.js 프로젝트의 핵심적인 저장소들은 아래와 같습니다: - [p5.js](https://github.com/processing/p5.js): 본 저장소에는 p5.js 라이브러리의 소스 코드가 보관되어 있습니다. [유저들이 보게 되는 p5.js의 레퍼런스 매뉴얼](https://p5js.org/reference/) 또한 이 소스 코드에 포함되어 있는 [JSDoc](http://usejsdoc.org/) 각주에서 생성됩니다. 본 저장소는 [로렌 리 맥카시(Lauren Lee McCarthy)](https://github.com/lmccart)가 관리합니다. -- [p5.js-website](https://github.com/processing/p5.js-website): 본 저장소에는 레퍼런스 매뉴얼을 제외한 [p5.js 웹사이트](http://p5js.org)의 코드가 전부 보관되어 있습니다. 본 저장소는 [로렌 리 맥카시(Lauren Lee McCarthy)](https://github.com/lmccart)가 관리합니다. +- [p5.js-website](https://github.com/processing/p5.js-website): 본 저장소에는 레퍼런스 매뉴얼을 제외한 [p5.js 웹사이트](https://p5js.org)의 코드가 전부 보관되어 있습니다. 본 저장소는 [로렌 리 맥카시(Lauren Lee McCarthy)](https://github.com/lmccart)가 관리합니다. - [p5.js-sound](https://github.com/processing/p5.js-sound): 본 저장소에는 p5.sound.js 라이브러리가 보관되어 있습니다. 본 저장소는 [제이슨 시갈(Jason Sigal)](https://github.com/therewasaguy)이 관리합니다. - [p5.js-web-editor](https://github.com/processing/p5.js-web-editor): 본 저장소에는 [p5.js 웹 에디터](https://editor.p5js.org)의 소스 코드가 보관되어 있습니다. 본 저장소는 [캐시 타라케지언(Cassie Tarakajian)](https://github.com/catarak)이 관리합니다. 예전의 [p5.js 에디터](https://github.com/processing/p5.js-editor)는 이제 더 이상 사용되지 않다는 점을 참고하십시오. - [p5.accessibility](https://github.com/processing/p5.accessibility): 맹인 및 시각 장애인들이 조금 더 쉽게 p5 캔버스를 사용할 수 있도록 하는 라이브러리입니다. @@ -39,7 +39,7 @@ p5.js 프로젝트의 핵심적인 저장소들은 아래와 같습니다: 문서화는 본 프로젝트의 가장 중요한 부분입니다. 낮은 품질의 문서화는 새로운 이용자와 컨트리뷰터들의 진입 장벽을 높여 프로젝트 참여도를 저하시킵니다. [contributing_documentation.md](./contributing_documentation.md) 페이지는 문서화를 시작하는 데에 깊이 있는 개요를 제시합니다. p5.js를 위한 문서화는 아래와 같은 곳들에서 주로 찾아볼 수 있습니다: - [p5js.org/reference](https://p5js.org/reference/)는 소스 코드의 [인라인 도큐멘테이션](./inline_documentation.md)으로부터 생성됩니다. 이는 텍스트 설명, 파라미터, 코드 스니펫 예시 등을 포함합니다. 우리는 코드와 인라인 도큐멘테이션을 긴밀히 연결시키고, 문서화에 기여하는 게 코드에 기여하는 것 만큼이나 중요하다는 생각을 강화하기 위해 인라인 도큐멘테이션을 활용하는 것입니다. 라이브러리가 빌드 되면 라이브러리와 코드가 작동하는 방식 사이에 문제가 없음을 확실히 하기 위해 인라인 도큐멘테이션과 예시를 확인합니다. 이에 기여하기 위해선 [inline_documentation.md](./inline_documentation.md) 페이지를 살펴보는 걸로 시작하시기 바랍니다. -- [p5js.org/examples](http://p5js.org/examples)페이지는 p5.js를 학습하는 데에 유용할 수 있는 길이가 긴 예시들을 담고 있습니다. 컨트리뷰션을 위해서는 [adding_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) 페이지를 살펴보시기 바랍니다. +- [p5js.org/examples](https://p5js.org/examples)페이지는 p5.js를 학습하는 데에 유용할 수 있는 길이가 긴 예시들을 담고 있습니다. 컨트리뷰션을 위해서는 [adding_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) 페이지를 살펴보시기 바랍니다. - [p5js.org/tutorials](https://p5js.org/tutorials)페이지는 p5.js와 프로그래밍의 개념을 배울 수 있도록 도와주는 튜토리얼들을 담고 있습니다. 기여하기 위해서는 [p5.js 웹사이트의 튜토리얼에 대한 튜토리얼](https://p5js.org/learn/tutorial-guide.html)을 살펴보시기 바랍니다! - p5.js 웹사이트는 현재 몇 가지 다른 언어들을 지원하고 있음을 확인하실 수 있습니다. 이는 국제화(혹은 줄여서 i18n)라고 불립니다. 이에 대한 문서는 [i18n_contribution](https://github.com/processing/p5.js-website/blob/main/contributor_docs/i18n_contribution.md) 페이지에서 더 자세히 보실 수 있습니다. diff --git a/contributor_docs/ko/contributing_to_the_p5js_reference.md b/contributor_docs/ko/contributing_to_the_p5js_reference.md index 139492a247..3648254c45 100644 --- a/contributor_docs/ko/contributing_to_the_p5js_reference.md +++ b/contributor_docs/ko/contributing_to_the_p5js_reference.md @@ -71,7 +71,7 @@ p5.js 소스 코드를 보면 많은 라인이 레퍼런스 주석으로 작성 ## 레퍼런스 주석 블록 -앞서 보았던 `sin()` 함수의 레퍼런스 주석 블록을 조금 더 자세히 살펴보고, 각 섹션이 어떤 역할을 하는지 알아봅시다. 주석으로 작성한 내용이 실제 [`sin()`](https://p5js.org/reference/#/p5/sin) 레퍼런스 페이지에서는 어떻게 보여지는지 비교해보세요. +앞서 보았던 `sin()` 함수의 레퍼런스 주석 블록을 조금 더 자세히 살펴보고, 각 섹션이 어떤 역할을 하는지 알아봅시다. 주석으로 작성한 내용이 실제 [`sin()`](https://p5js.org/reference/p5/sin) 레퍼런스 페이지에서는 어떻게 보여지는지 비교해보세요. ``` /** @@ -138,7 +138,7 @@ p5.js 소스 코드를 보면 많은 라인이 레퍼런스 주석으로 작성 ## 추가 시그니처 -만약 함수가 여러 개의 매개변수 옵션을 가지고 있다면, 각각을 개별적으로 명시할 수 있습니다. 예를 들어, [`background()`](http://p5js.org/reference/#p5/background) 함수는 다양한 매개변수 옵션을 지원하고 있습니다(background() 레퍼런스 페이지에서 "문법" 섹션을 확인해 보세요). 먼저 여러 옵션 중 하나를 선택하여, 앞서 살펴본 형식에 따라 첫 번째 시그니처에 관한 주석을 작성합니다. 첫 번째 주석 블록이 끝나면, 뒤이어 다른 시그니처를 추가 작성할 수 있습니다. 각각의 추가 시그니처는 ’@method’와 ‘@param’ 태그만 사용하여 작성할 수 있으며, 각자의 블록 범위 내에 작성되어야 합니다. 아래 예시를 참고해 주세요. +만약 함수가 여러 개의 매개변수 옵션을 가지고 있다면, 각각을 개별적으로 명시할 수 있습니다. 예를 들어, [`background()`](https://p5js.org/reference/#p5/background) 함수는 다양한 매개변수 옵션을 지원하고 있습니다(background() 레퍼런스 페이지에서 "문법" 섹션을 확인해 보세요). 먼저 여러 옵션 중 하나를 선택하여, 앞서 살펴본 형식에 따라 첫 번째 시그니처에 관한 주석을 작성합니다. 첫 번째 주석 블록이 끝나면, 뒤이어 다른 시그니처를 추가 작성할 수 있습니다. 각각의 추가 시그니처는 ’@method’와 ‘@param’ 태그만 사용하여 작성할 수 있으며, 각자의 블록 범위 내에 작성되어야 합니다. 아래 예시를 참고해 주세요. ``` /** @@ -262,7 +262,7 @@ p5.js 소스 코드를 보면 많은 라인이 레퍼런스 주석으로 작성 * ``` -만약, 예제 코드가 외부 애셋 파일을 사용해야 한다면, 필요한 파일들을 [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) 폴더에 넣어두세요(이미 해당 폴더에 존재하는 파일을 재사용해도 됩니다). 그리고 코드에서 "assets/filename.ext" 경로로 파일을 불러와 사용하면 됩니다. [tint()](http://p5js.org/reference/#/p5/tint) 레퍼런스를 참고하세요. +만약, 예제 코드가 외부 애셋 파일을 사용해야 한다면, 필요한 파일들을 [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) 폴더에 넣어두세요(이미 해당 폴더에 존재하는 파일을 재사용해도 됩니다). 그리고 코드에서 "assets/filename.ext" 경로로 파일을 불러와 사용하면 됩니다. [tint()](https://p5js.org/reference/p5/tint) 레퍼런스를 참고하세요. ### `describe()`로 캔버스 설명 추가하기 diff --git a/contributor_docs/ko/creating_libraries.md b/contributor_docs/ko/creating_libraries.md index b9229f7767..fb94963e0b 100644 --- a/contributor_docs/ko/creating_libraries.md +++ b/contributor_docs/ko/creating_libraries.md @@ -124,9 +124,9 @@ https://GitHub.com/processing/processing/wiki/Library-Basics#library-methods * **기여된 라이브러리는 제작자가 호스팅, 문서화 및 유지 관리합니다.** 라이브러리들은 GitHub, 별도의 웹 사이트 또는 어딘가에 있을 수 있습니다. -* **문서가 핵심입니다!** 라이브러리 문서는 사용자가 쉽게 찾아보고 다운로드 하여 사용할 수 있는 곳에 있어야 합니다. 기여된 라이브러리에 대한 문서는 기본 p5.js 레퍼런스에 포함되지 않지만 여러분이 유사한 형식을 따르고 싶을 수도 있습니다. [라이브러리 개요 페이지](http://p5js.org/reference/#/libraries/p5.sound), [클래스 개요 페이지](http://p5js.org/reference/#/p5.Vector) 및 [메소드 페이지](http://p5js.org/reference/#/p5/arc) 의 예제를 참조하세요. +* **문서가 핵심입니다!** 라이브러리 문서는 사용자가 쉽게 찾아보고 다운로드 하여 사용할 수 있는 곳에 있어야 합니다. 기여된 라이브러리에 대한 문서는 기본 p5.js 레퍼런스에 포함되지 않지만 여러분이 유사한 형식을 따르고 싶을 수도 있습니다. [라이브러리 개요 페이지](https://p5js.org/reference/libraries/p5.sound), [클래스 개요 페이지](https://p5js.org/reference/p5.Vector) 및 [메소드 페이지](https://p5js.org/reference/p5/arc) 의 예제를 참조하세요. * **예제가 좋습니다!** 사람들에게 라이브러리가 할 수 있는 일을 보여주세요. 모두 자바스크립트이므로 사람들은 라이브러리를 다운로드하기 전 온라인에서 실행 되는 것을 볼 수 있습니다. 예제들을 호스팅하기 쉬운 [jsfiddle](http://jsfiddle.net/) 및 [codepen](http://codepen.io)이라는 두가지 좋은 옵션이 있습니다. -* **알려주세요!** 라이브러리를 배포 할 준비가 되면 [hello@p5js.org](mailto:hello@p5js.org)로 링크와 몇 가지 정보와 함께 보내주세요. [라이브러리 페이지](http://p5js.org/libraries/)에 추가 할 것입니다. +* **알려주세요!** 라이브러리를 배포 할 준비가 되면 [hello@p5js.org](mailto:hello@p5js.org)로 링크와 몇 가지 정보와 함께 보내주세요. [라이브러리 페이지](https://p5js.org/libraries/)에 추가 할 것입니다. diff --git a/contributor_docs/ko/friendly_error_system.md b/contributor_docs/ko/friendly_error_system.md index 2f8a06ba6d..eaef49262e 100644 --- a/contributor_docs/ko/friendly_error_system.md +++ b/contributor_docs/ko/friendly_error_system.md @@ -54,15 +54,15 @@ function draw() {}; ```javascript arc(1, 1, 10.5, 10); /// 콘솔에 다음의 메시지가 생성됩니다.: -/// > pt.js: arc() 함수의 입력 파라미터 중 4번째 자리(인덱스는 0부터 시작)에 빈 값이 들어온 것 같습니다. 의도한 것이 아니라면, 이것은 종종 범위의 문제입니다.: [https://p5js.org/examples/data-variable-scope.html]. [http://p5js.org/reference/#p5/arc] -/// > pt.js: arc() 함수의 입력 파라미터 중 5번째 자리(인덱스는 0부터 시작)에 빈 값이 들어온 것 같습니다. 의도한 것이 아니라면, 이것은 종종 범위의 문제입니다.: [https://p5js.org/examples/data-variable-scope.html]. [http://p5js.org/reference/#p5/arc] +/// > pt.js: arc() 함수의 입력 파라미터 중 4번째 자리(인덱스는 0부터 시작)에 빈 값이 들어온 것 같습니다. 의도한 것이 아니라면, 이것은 종종 범위의 문제입니다.: [https://p5js.org/examples/data-variable-scope.html]. [https://p5js.org/reference/#p5/arc] +/// > pt.js: arc() 함수의 입력 파라미터 중 5번째 자리(인덱스는 0부터 시작)에 빈 값이 들어온 것 같습니다. 의도한 것이 아니라면, 이것은 종종 범위의 문제입니다.: [https://p5js.org/examples/data-variable-scope.html]. [https://p5js.org/reference/#p5/arc] ``` * 자료형 오류 예시: ```javascript arc('1', 1, 10.5, 10, 0, Math.PI, 'pie'); /// 콘솔에 다음의 메시지가 생성됩니다.: -/// > p5.js:arc() 함수의 입력 파라미터 중 0번째 자리에는(인덱스는 0부터 시작)에는 숫자가 들어와야 하는데 문자열이 들어왔습니다. [http://p5js.org/reference/#p5/arc] +/// > p5.js:arc() 함수의 입력 파라미터 중 0번째 자리에는(인덱스는 0부터 시작)에는 숫자가 들어와야 하는데 문자열이 들어왔습니다. [https://p5js.org/reference/#p5/arc] ``` * 이것은 다음과 같이 호출할 수 있습니다.: `p5._validateParameters(FUNCT_NAME, ARGUMENTS)` 또는 `p5.prototype._validateParameters(FUNCT_NAME, ARGUMENTS)` 는 파라미터 검증이 필요한 함수 내부에서 씁니다. 일반적인 목적으로는 `p5._validateParameters` 를 사용하는 것이 좋습니다. `p5.prototype._validateParameters(FUNCT_NAME, ARGUMENTS)` 은 주로 디버깅이나 단위 테스트 목적으로 사용합니다. * `color/creating_reading`, `core/2d_primitives`, `core/curves`, 그리고 `utilities/string_functions` 의 함수로 구현되어 있습니다. diff --git a/contributor_docs/project_wrapups/orenshoham_gsoc_2019.md b/contributor_docs/project_wrapups/orenshoham_gsoc_2019.md index c9332e44a2..a5008a83d5 100644 --- a/contributor_docs/project_wrapups/orenshoham_gsoc_2019.md +++ b/contributor_docs/project_wrapups/orenshoham_gsoc_2019.md @@ -8,9 +8,9 @@ The AudioWorklet API consists of two classes: [AudioWorkletProcessor](https://de AudioWorklet replaces [ScriptProcessorNode](https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode), a now-deprecated Web Audio node that runs audio code in the browser's main thread. p5.js-sound used ScriptProcessorNode internally in three classes: -- [p5.SoundFile](https://p5js.org/reference/#/p5.SoundFile), which used a ScriptProcessorNode to keep track of a SoundFile's current playback position. -- [p5.Amplitude](https://p5js.org/reference/#/p5.Amplitude), which used a ScriptProcessorNode to perform amplitude analysis. -- [p5.SoundRecorder](https://p5js.org/reference/#/p5.SoundRecorder), which used a ScriptProcessorNode to concatenate audio buffers together during the recording process. +- [p5.SoundFile](https://p5js.org/reference/p5.SoundFile), which used a ScriptProcessorNode to keep track of a SoundFile's current playback position. +- [p5.Amplitude](https://p5js.org/reference/p5.Amplitude), which used a ScriptProcessorNode to perform amplitude analysis. +- [p5.SoundRecorder](https://p5js.org/reference/p5.SoundRecorder), which used a ScriptProcessorNode to concatenate audio buffers together during the recording process. For each of these classes, I created new AudioWorkletProcessors for [p5.SoundFile](https://github.com/processing/p5.js-sound/blob/4d3a3833de4d30f6770740052a82586444a4482a/src/audioWorklet/soundFileProcessor.js), [p5.Amplitude](https://github.com/processing/p5.js-sound/blob/4d3a3833de4d30f6770740052a82586444a4482a/src/audioWorklet/amplitudeProcessor.js), and [p5.SoundRecorder](https://github.com/processing/p5.js-sound/blob/4d3a3833de4d30f6770740052a82586444a4482a/src/audioWorklet/recorderProcessor.js) that replicated the corresponding ScriptProcessorNode's [onaudioprocess](https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode/onaudioprocess) function. diff --git a/contributor_docs/project_wrapups/sanket_gsoc_2019.md b/contributor_docs/project_wrapups/sanket_gsoc_2019.md index 5dab51a5b9..f90e435b76 100644 --- a/contributor_docs/project_wrapups/sanket_gsoc_2019.md +++ b/contributor_docs/project_wrapups/sanket_gsoc_2019.md @@ -18,7 +18,7 @@ Apart from implementing these functions, I also added unit tests, manual tests, Before and during the Summer of Code, I fixed minor bugs unrelated to my project, which helped me immensely to understand and get around the codebase and the workflow of p5.js. They are listed [here](https://github.com/processing/p5.js/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3Asanketsingh24). -### [lightFalloff()](https://p5js.org/reference/#/p5/lightFalloff) +### [lightFalloff()](https://p5js.org/reference/p5/lightFalloff) This function allows the user to set the attenuation values, which are used in shaders to restrict the spread of light. Earlier, this was a constant value. Now, the artists can use this function to set the value themselves. Implementing this function required me to add three new uniforms, as well as modifying the light shader and light.js. The default was set to 1. ### [emissiveMaterial()](https://github.com/processing/p5.js/pull/3820) diff --git a/contributor_docs/project_wrapups/wong_gsoc_2023.md b/contributor_docs/project_wrapups/wong_gsoc_2023.md index 248e27b5c0..def485d24a 100644 --- a/contributor_docs/project_wrapups/wong_gsoc_2023.md +++ b/contributor_docs/project_wrapups/wong_gsoc_2023.md @@ -31,9 +31,9 @@ Many thanks to my mentors for all their support: Adam Ferriss, Austin Slominski, - [Third pull request](https://github.com/processing/p5.js/pull/6324), replacing the old filters with new shader filters. Status: merged ### Public documentation pages: -- [WEBGL](https://p5js.org/reference/#/p5/WEBGL) - Status: merged, page created -- [filter()](https://p5js.org/reference/#/p5/filter) - Status: merged, page not updated yet -- [createFilterShader()](https://p5js.org/reference/#/p5/createFilterShader) - Status: merged, page not created yet +- [WEBGL](https://p5js.org/reference/p5/WEBGL) - Status: merged, page created +- [filter()](https://p5js.org/reference/p5/filter) - Status: merged, page not updated yet +- [createFilterShader()](https://p5js.org/reference/p5/createFilterShader) - Status: merged, page not created yet ### Performance measuring helpers: diff --git a/contributor_docs/pt-br/README.md b/contributor_docs/pt-br/README.md index acadbccc4d..b57af5778b 100644 --- a/contributor_docs/pt-br/README.md +++ b/contributor_docs/pt-br/README.md @@ -29,7 +29,7 @@ Além do código em si, também pode ser necessário fornecer alguma combinaçã ## Exemplos -O site p5.js. inclui [exemplos integrados](http://p5js.org/examples/). Você pode [adicionar mais](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) e há uma issue que lista alguns [exemplos desejados](https://github.com/processing/p5.js/issues/1954). +O site p5.js. inclui [exemplos integrados](https://p5js.org/examples/). Você pode [adicionar mais](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) e há uma issue que lista alguns [exemplos desejados](https://github.com/processing/p5.js/issues/1954). ## ES6 diff --git a/contributor_docs/sk/README.md b/contributor_docs/sk/README.md index 76e92d8396..b3bc16aedb 100644 --- a/contributor_docs/sk/README.md +++ b/contributor_docs/sk/README.md @@ -29,7 +29,7 @@ Mimo samotného kódu je potrebné aby si dodal aj kombináciu z nasledovných. ## Príklady -Stránka p5.js obsahujé [integrované príklady](http://p5js.org/examples/). Môžeš [pridať ďalšie](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) a zároveň si pozrieť problém, ktorý obsahuje list [požadovaných príkladov](https://github.com/processing/p5.js/issues/1954). +Stránka p5.js obsahujé [integrované príklady](https://p5js.org/examples/). Môžeš [pridať ďalšie](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md) a zároveň si pozrieť problém, ktorý obsahuje list [požadovaných príkladov](https://github.com/processing/p5.js/issues/1954). ## ES6 p5.js nedávno migrovalo na [ES6](https://en.wikipedia.org/wiki/ECMAScript#6th_Edition_-_ECMAScript_2015). Ak chceš vidieť ako táto zmena ovplyňuje tvoj príspevok, navštív prosím stránku [adaptácia ES6](./es6-adoption.md). @@ -154,7 +154,7 @@ $ npm run docs:dev Zastršujúci projekt p5.js zahŕňa aj iné repozitáre ako tento. - [p5.js](https://github.com/processing/p5.js): Tento repozitár obsahuje zdrojový kód knižnice p5.js. [Používateľská referečná príručka p5.js](https://p5js.org/reference/) je generovaná z [JSDoc](http://usejsdoc.org/) komentárov zahrnutých v tomto zdrojovom kóde. Spravuje ho [Lauren McCarthy](https://github.com/lmccart). -- [website](https://github.com/processing/p5.js-website) Tento repozitár obsahuje väčšinu kódu [stránky p5.js](http://p5js.org) s výnimkou referenčnej príručky. Spravuje ho [Lauren McCarthy](https://github.com/lmccart). +- [website](https://github.com/processing/p5.js-website) Tento repozitár obsahuje väčšinu kódu [stránky p5.js](https://p5js.org) s výnimkou referenčnej príručky. Spravuje ho [Lauren McCarthy](https://github.com/lmccart). - [sound](https://github.com/processing/p5.js-sound) Tento repozitár obsahuje knižnicu p5.sound.js. Spravuje ho [Jason Sigal](https://github.com/therewasaguy). - [web editor](https://github.com/processing/p5.js-web-editor): Tento repozitár obsahuje zdrojový kód pre [p5.js web editor](https://editor.p5js.org). Spravuje ho [Cassie Tarakajian](https://github.com/catarak). Všimni si však, že [p5.js editor](https://github.com/processing/p5.js-editor) je už zastaraný. diff --git a/contributor_docs/zh-Hans/README.md b/contributor_docs/zh-Hans/README.md index 1e5661d141..0df766e81b 100644 --- a/contributor_docs/zh-Hans/README.md +++ b/contributor_docs/zh-Hans/README.md @@ -11,7 +11,7 @@ p5.js 项目除了这个代码库外还包括了以下几个其他的代码库: - [p5.js](https://github.com/processing/p5.js):包括了 p5.js 源代码。[面向用户的 p5.js 参考文献](https://p5js.org/reference/)也是由包含在此源代码中的 [JSDoc](http://usejsdoc.org/) 注解生成的。[Lauren Lee McCarthy](https://github.com/lmccart) 为维持者。 -- [p5.js-website](https://github.com/processing/p5.js-website):此源代码包含了 [p5.js website](http://p5js.org )的大多数代码(除参考文献外)。[Lauren Lee McCarthy](https://github.com/lmccart) 为维持者。 +- [p5.js-website](https://github.com/processing/p5.js-website):此源代码包含了 [p5.js website](https://p5js.org )的大多数代码(除参考文献外)。[Lauren Lee McCarthy](https://github.com/lmccart) 为维持者。 - [p5.js-sound](https://github.com/processing/p5.js-sound):包括了 p5.sound.js 程式库。[Jason Sigal](https://github.com/therewasaguy) 为维持者。 - [p5.js-web-editor](https://github.com/processing/p5.js-web-editor):包含了 [p5.js web editor](https://editor.p5js.org) 的源代码。[Cassie Tarakajian](https://github.com/catarak) 为维持者。请注意,旧版 [p5.js editor](https://github.com/processing/p5.js-editor) 已不再受支持。 - [p5.accessibility](https://github.com/processing/p5.accessibility):使 p5.js 更适合盲人和视障人士使用的程式库。 @@ -34,7 +34,7 @@ p5.js 项目除了这个代码库外还包括了以下几个其他的代码库 我们意识到参考文献是这个项目中最重要的部分。不好的参考文献是新用户与新贡献者的最大屏障,让项目不具有包容性。[contributing_documentation.md](./contributing_documentation.md) 页面为开始修改参考文献给出了一个深入的导览。p5.js 的参考文献可以在以下几个地方找到: - [p5js.org/reference](https://p5js.org/reference/):由 [inline documentation](./inline_documentation.md) 的源代码生成。它包括了文本描述和参数以及随附的代码片段示例。我们将所有这些内联文献和代码放在一起,以使代码和参考文献保持紧密的联系,并强化这样的思想,贡献参考文献与贡献代码至少同等重要。构建库后,它将检查内联参考文献和示例,以确保它们与代码的行为方式匹配。 要做出贡献,您可以先查看 [inline_documentation.md](./inline_documentation.md) 页面。 -- [p5js.org/examples](http://p5js.org/examples) 页面包含更长的示例,这些示例对于学习 p5.js 可能有用。要做出贡献,您可以先查看 [adding_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md)。 +- [p5js.org/examples](https://p5js.org/examples) 页面包含更长的示例,这些示例对于学习 p5.js 可能有用。要做出贡献,您可以先查看 [adding_examples.md](https://github.com/processing/p5.js-website/blob/main/contributor_docs/Adding_examples.md)。 - [p5js.org/tutorials](https://p5js.org/tutorials) 页面包含可帮助您学习 p5.js 和编程概念的教程。 要做出贡献,您可以先查看 [p5.js guide to contributing to tutorials](https://p5js.org/learn/tutorial-guide.html)。 - 您可能会注意到 p5.js 网站目前支持几种不同的语言。这称为国际化(i18n)。您可以在 [i18n_contribution](https://github.com/processing/p5.js-website/blob/main/contributor_docs/i18n_contribution.md)页面了解更多。 diff --git a/contributor_docs/zh-Hans/contributing_to_the_p5js_reference.md b/contributor_docs/zh-Hans/contributing_to_the_p5js_reference.md index 73933f0d75..612fd0ab7e 100644 --- a/contributor_docs/zh-Hans/contributing_to_the_p5js_reference.md +++ b/contributor_docs/zh-Hans/contributing_to_the_p5js_reference.md @@ -72,7 +72,7 @@ ## 参考注释块 -让我们解析上面 `sin()` 函数的参考注释块,并查看每个部分的作用。你可以将此处的注释与参考页面上的[`sin()`](https://p5js.org/reference/#/p5/sin)进行比较。 +让我们解析上面 `sin()` 函数的参考注释块,并查看每个部分的作用。你可以将此处的注释与参考页面上的[`sin()`](https://p5js.org/reference/p5/sin)进行比较。 ``` /** @@ -142,7 +142,7 @@ ## 其他签名 -如果一个函数有多个可能的参数选项,则可以分别指定每个参数。例如,[`background()`](http://p5js.org/reference/#p5/background) 函数有许多不同的参数选项(请参阅参考页面上的“语法”部分)。选择一个版本以使用上面的模板列出作为第一个签名。在第一个参考注释块的末尾,你可以添加额外的签名,每个签名都在自己的块中,仅使用以下示例中的 `@method` 和 `@param` 标签。 +如果一个函数有多个可能的参数选项,则可以分别指定每个参数。例如,[`background()`](https://p5js.org/reference/#p5/background) 函数有许多不同的参数选项(请参阅参考页面上的“语法”部分)。选择一个版本以使用上面的模板列出作为第一个签名。在第一个参考注释块的末尾,你可以添加额外的签名,每个签名都在自己的块中,仅使用以下示例中的 `@method` 和 `@param` 标签。 ``` /** @@ -269,7 +269,7 @@ * ``` -如果你的示例使用外部素材文件,请将它们放入 [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) 文件夹中(或者重用其中已有的文件),然后在代码中使用 "assets/filename.ext" 链接到它们。请参阅 [tint()](http://p5js.org/reference/#/p5/tint) 参考示例。 +如果你的示例使用外部素材文件,请将它们放入 [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) 文件夹中(或者重用其中已有的文件),然后在代码中使用 "assets/filename.ext" 链接到它们。请参阅 [tint()](https://p5js.org/reference/p5/tint) 参考示例。 ### 使用 `describe()` 添加画布描述 diff --git a/contributor_docs/zh-Hans/creating_libraries.md b/contributor_docs/zh-Hans/creating_libraries.md index 173eb7a176..8e3479aedb 100644 --- a/contributor_docs/zh-Hans/creating_libraries.md +++ b/contributor_docs/zh-Hans/creating_libraries.md @@ -118,8 +118,8 @@ https://github.com/processing/processing/wiki/Library-Basics#library-methods * **贡献的库由创建者托管、文档化和维护。** 这可以在GitHub、一个单独的网站或其他地方进行。 -* **文档至关重要!** 您的库的文档应该放在某个易于找到的位置,供下载和使用您的库的用户使用。贡献的库的文档将不会包含在主要的p5.js参考文档中,但您可能希望遵循类似的格式。请参阅这些示例:[库概述页面](http://p5js.org/reference/#/libraries/p5.sound)、[类概述页面](http://p5js.org/reference/#/p5.Vector)和[方法页面](http://p5js.org/reference/#/p5/arc)。 +* **文档至关重要!** 您的库的文档应该放在某个易于找到的位置,供下载和使用您的库的用户使用。贡献的库的文档将不会包含在主要的p5.js参考文档中,但您可能希望遵循类似的格式。请参阅这些示例:[库概述页面](https://p5js.org/reference/libraries/p5.sound)、[类概述页面](https://p5js.org/reference/p5.Vector)和[方法页面](https://p5js.org/reference/p5/arc)。 * **示例也很棒!** 它们向人们展示了您的库能做什么。由于这全部是JavaScript,人们可以在下载之前在线运行它们。[jsfiddle](http://jsfiddle.net/)和[codepen](http://codepen.io)是两个很好的简单选项,可以用来托管示例。 -* **告诉我们吧!** 一旦您的库准备好发布,发送一封电子邮件至[hello@p5js.org](mailto:hello@p5js.org),附上链接和一些信息。我们将在[libraries page](http://p5js.org/libraries/)上包含它! +* **告诉我们吧!** 一旦您的库准备好发布,发送一封电子邮件至[hello@p5js.org](mailto:hello@p5js.org),附上链接和一些信息。我们将在[libraries page](https://p5js.org/libraries/)上包含它! diff --git a/contributor_docs/zh-Hans/fes_reference_dev_notes.md b/contributor_docs/zh-Hans/fes_reference_dev_notes.md index 5ec46036b9..8dd1e6af92 100644 --- a/contributor_docs/zh-Hans/fes_reference_dev_notes.md +++ b/contributor_docs/zh-Hans/fes_reference_dev_notes.md @@ -209,16 +209,16 @@ _validateParameters(func, args) arc(1, 1, 10.5, 10); ``` FES将在控制台生成以下消息: -> 🌸 p5.js 说:看起来arc()在位置#4(从零开始的索引)收到了一个空变量。如果不是故意的,这通常是作用域问题:[https://p5js.org/examples/data-variable-scope.html]。[http://p5js.org/reference/#p5/arc] +> 🌸 p5.js 说:看起来arc()在位置#4(从零开始的索引)收到了一个空变量。如果不是故意的,这通常是作用域问题:[https://p5js.org/examples/data-variable-scope.html]。[https://p5js.org/reference/#p5/arc] -> 🌸 p5.js 说:看起来arc()在位置#5(从零开始的索引)收到了一个空变量。如果不是故意的,这通常是作用域问题:[https://p5js.org/examples/data-variable-scope.html]。[http://p5js.org/reference/#p5/arc] +> 🌸 p5.js 说:看起来arc()在位置#5(从零开始的索引)收到了一个空变量。如果不是故意的,这通常是作用域问题:[https://p5js.org/examples/data-variable-scope.html]。[https://p5js.org/reference/#p5/arc] 类型不匹配的示例 ```javascript arc('1', 1, 10.5, 10, 0, Math.PI, 'pie'); ``` FES将在控制台生成以下消息: -> 🌸 p5.js 说:arc()在参数#0(从零开始的索引)处期望接收Number,但收到了字符串。[http://p5js.org/reference/#/p5/arc] +> 🌸 p5.js 说:arc()在参数#0(从零开始的索引)处期望接收Number,但收到了字符串。[https://p5js.org/reference/p5/arc] ##### 位置 core/friendly_errors/validate_params.js @@ -272,7 +272,7 @@ function preload() { } ``` FES将在控制台中生成以下消息: -> 🌸 p5.js说:当调用background时(位于sketch.js的第4行[http://localhost:8000/lib/empty-example/sketch.js:4:3]),在p5js库内部发生了一个错误,错误消息为“无法读取未定义的属性'background'”。(如果没有另外说明,这可能是由于从preload中调用了background。preload函数中除了load函数(loadImage、loadJSON、loadFont、loadStrings等)之外不应该有其他内容。)(http://p5js.org/reference/#/p5/preload) +> 🌸 p5.js说:当调用background时(位于sketch.js的第4行[http://localhost:8000/lib/empty-example/sketch.js:4:3]),在p5js库内部发生了一个错误,错误消息为“无法读取未定义的属性'background'”。(如果没有另外说明,这可能是由于从preload中调用了background。preload函数中除了load函数(loadImage、loadJSON、loadFont、loadStrings等)之外不应该有其他内容。)(https://p5js.org/reference/p5/preload) 内部错误示例 2 ```javascript @@ -282,7 +282,7 @@ function setup() { } ``` FES将在控制台中生成以下消息: -> 🌸 p5.js说:当调用mouseClicked时(位于sketch.js的第3行[http://localhost:8000/lib/empty-example/sketch.js:3:7]),在p5js库内部发生了一个错误,错误消息为“无法读取未定义的属性'bind'”。(如果没有另外说明,这可能是由于传递给mouseClicked的参数存在问题。)(http://p5js.org/reference/#/p5/mouseClicked) +> 🌸 p5.js说:当调用mouseClicked时(位于sketch.js的第3行[http://localhost:8000/lib/empty-example/sketch.js:3:7]),在p5js库内部发生了一个错误,错误消息为“无法读取未定义的属性'bind'”。(如果没有另外说明,这可能是由于传递给mouseClicked的参数存在问题。)(https://p5js.org/reference/p5/mouseClicked) 用户示例中的作用域错误示例 ```javascript @@ -303,7 +303,7 @@ function setup() { } ``` FES将在控制台中生成以下消息: -> 🌸 p5.js说:您可能错误地将“colour”写成了“color”(位于sketch.js的第2行[http://localhost:8000/lib/empty-example/sketch.js:2:3])。如果希望使用p5.js中的函数,请将其更正为color(http://p5js.org/reference/#/p5/color)。 +> 🌸 p5.js说:您可能错误地将“colour”写成了“color”(位于sketch.js的第2行[http://localhost:8000/lib/empty-example/sketch.js:2:3])。如果希望使用p5.js中的函数,请将其更正为color(https://p5js.org/reference/p5/color)。 ##### 位置 core/friendly_errors/fes_core.js @@ -331,7 +331,7 @@ function setup() { } ``` FES 将在控制台生成以下消息: -> 🌸 p5.js 提示:您使用了 p5.js 的保留变量 "PI",请确保将变量名更改为其他名称。(https://p5js.org/reference/#/p5/PI) +> 🌸 p5.js 提示:您使用了 p5.js 的保留变量 "PI",请确保将变量名更改为其他名称。(https://p5js.org/reference/p5/PI) 重新定义 p5.js 保留函数的示例 ```javascript @@ -369,7 +369,7 @@ function preLoad() { } ``` FES 将在控制台生成以下消息: -> 🌸 p5.js 提示:似乎您可能误写了 preLoad,应该是 preload。如果这不是您的意图,请进行更正。(http://p5js.org/reference/#/p5/preload) +> 🌸 p5.js 提示:似乎您可能误写了 preLoad,应该是 preload。如果这不是您的意图,请进行更正。(https://p5js.org/reference/p5/preload) ##### 位置 core/friendly_errors/fes_core.js diff --git a/src/core/constants.js b/src/core/constants.js index bf28b50164..ece1333037 100644 --- a/src/core/constants.js +++ b/src/core/constants.js @@ -24,7 +24,7 @@ export const P2D = 'p2d'; /** * One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders. * - * `WEBGL` differs from the default `P2D` renderer in the following ways: + * `WEBGL` differs from the default `P2D` renderer in the following ways: * * - **Coordinate System** - When drawing in `WEBGL` mode, the origin point (0,0,0) is located at the center of the screen, not the top-left corner. See the tutorial page about coordinates and transformations. * - **3D Shapes** - `WEBGL` mode can be used to draw 3-dimensional shapes like box(), sphere(), cone(), and more. See the tutorial page about custom geometry to make more complex objects. @@ -810,7 +810,7 @@ export const HSL = 'hsl'; /** * AUTO allows us to automatically set the width or height of an element (but not both), * based on the current height and width of the element. Only one parameter can - * be passed to the size function as AUTO, at a time. + * be passed to the size function as AUTO, at a time. * * @property {String} AUTO * @final diff --git a/src/core/environment.js b/src/core/environment.js index 4d15491948..d6efe67841 100644 --- a/src/core/environment.js +++ b/src/core/environment.js @@ -1211,7 +1211,7 @@ p5.prototype.getURLPath = () => * in an `Object`. * * For example, calling `getURLParams()` in a sketch hosted at the URL - * `http://p5js.org?year=2014&month=May&day=15` returns + * `https://p5js.org?year=2014&month=May&day=15` returns * `{ year: 2014, month: 'May', day: 15 }`. * * @method getURLParams diff --git a/src/core/friendly_errors/fes_core.js b/src/core/friendly_errors/fes_core.js index f78fd957ce..caf08772b8 100644 --- a/src/core/friendly_errors/fes_core.js +++ b/src/core/friendly_errors/fes_core.js @@ -145,8 +145,8 @@ if (typeof IS_MINIFIED !== 'undefined') { //Whenever func having p5.[Class] is encountered, we need to have the error link as mentioned below else different link funcName.startsWith('p5.') ? - msgWithReference = `${message} (http://p5js.org/reference/${referenceSection}.${funcName})` : - msgWithReference = `${message} (http://p5js.org/reference/${referenceSection}/${funcName})`; + msgWithReference = `${message} (https://p5js.org/reference/${referenceSection}.${funcName})` : + msgWithReference = `${message} (https://p5js.org/reference/${referenceSection}/${funcName})`; } return msgWithReference; }; diff --git a/src/core/p5.Renderer2D.js b/src/core/p5.Renderer2D.js index ac41b13411..85d3ac7009 100644 --- a/src/core/p5.Renderer2D.js +++ b/src/core/p5.Renderer2D.js @@ -1052,6 +1052,7 @@ class Renderer2D extends p5.Renderer { } } this._doFillStrokeClose(closeShape); + this.drawingContext.closePath(); } } isCurve = false; diff --git a/src/dom/dom.js b/src/dom/dom.js index 2f04be1ef2..6bafb5bae4 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -541,7 +541,7 @@ p5.prototype.createDiv = function (html = '') { }; /** - * Creates a `<p></p>` element. + * Creates a paragraph element. * * `<p></p>` elements are commonly used for paragraph-length text. * @@ -752,7 +752,7 @@ p5.prototype.createImg = function () { * background(200); * * // Create an anchor element that links to p5js.org. - * let a = createA('http://p5js.org/', 'p5*js'); + * let a = createA('https://p5js.org/', 'p5*js'); * a.position(25, 35); * * describe('The text "p5*js" written at the center of a gray square.'); @@ -767,7 +767,7 @@ p5.prototype.createImg = function () { * * // Create an anchor tag that links to p5js.org. * // Open the link in a new tab. - * let a = createA('http://p5js.org/', 'p5*js', '_blank'); + * let a = createA('https://p5js.org/', 'p5*js', '_blank'); * a.position(25, 35); * * describe('The text "p5*js" written at the center of a gray square.'); diff --git a/src/io/files.js b/src/io/files.js index 64c82d3171..88d627b25a 100644 --- a/src/io/files.js +++ b/src/io/files.js @@ -549,7 +549,7 @@ p5.prototype.loadStrings = function(...args) { * //and has a header specifying the columns labels * table = loadTable('assets/mammals.csv', 'csv', 'header'); * //the file can be remote - * //table = loadTable("http://p5js.org/reference/assets/mammals.csv", + * //table = loadTable("https://p5js.org/reference/assets/mammals.csv", * // "csv", "header"); * } * diff --git a/src/webgl/p5.Camera.js b/src/webgl/p5.Camera.js index 1fb6c5012d..44be60d048 100644 --- a/src/webgl/p5.Camera.js +++ b/src/webgl/p5.Camera.js @@ -2435,6 +2435,7 @@ p5.Camera = class Camera { const rotation = p5.Matrix.identity(this._renderer._pInst); rotation.rotate(this._renderer._pInst._toRadians(a), x, y, z); + // Apply the rotation matrix to the center vector /* eslint-disable max-len */ const rotatedCenter = [ centerX * rotation.mat4[0] + centerY * rotation.mat4[4] + centerZ * rotation.mat4[8], @@ -2443,11 +2444,18 @@ p5.Camera = class Camera { ]; /* eslint-enable max-len */ - // add eye position back into center + // Translate the rotated center back to world coordinates rotatedCenter[0] += this.eyeX; rotatedCenter[1] += this.eyeY; rotatedCenter[2] += this.eyeZ; + // Rotate the up vector to keep the correct camera orientation + /* eslint-disable max-len */ + const upX = this.upX * rotation.mat4[0] + this.upY * rotation.mat4[4] + this.upZ * rotation.mat4[8]; + const upY = this.upX * rotation.mat4[1] + this.upY * rotation.mat4[5] + this.upZ * rotation.mat4[9]; + const upZ = this.upX * rotation.mat4[2] + this.upY * rotation.mat4[6] + this.upZ * rotation.mat4[10]; + /* eslint-enable max-len */ + this.camera( this.eyeX, this.eyeY, @@ -2455,9 +2463,9 @@ p5.Camera = class Camera { rotatedCenter[0], rotatedCenter[1], rotatedCenter[2], - this.upX, - this.upY, - this.upZ + upX, + upY, + upZ ); } diff --git a/test/unit/webgl/p5.Camera.js b/test/unit/webgl/p5.Camera.js index b746a5053e..1047b6d4e1 100644 --- a/test/unit/webgl/p5.Camera.js +++ b/test/unit/webgl/p5.Camera.js @@ -277,6 +277,61 @@ suite('p5.Camera', function() { assert.strictEqual(myCam.upY, orig.uy, 'up Y pos changed'); assert.strictEqual(myCam.upZ, orig.uz, 'up Z pos changed'); }); + + suite('Camera Tilt and Up Vector', function() { + test('Tilt() correctly updates the up vector', function() { + var orig = getVals(myCam); // Store original camera values + + // Apply tilt to the camera + myCam.tilt(30); // Tilt by 30 degrees + + // Compute expected up vector (normalized) + let forward = myp5.createVector( + myCam.centerX - myCam.eyeX, + myCam.centerY - myCam.eyeY, + myCam.centerZ - myCam.eyeZ + ); + let up = myp5.createVector(orig.ux, orig.uy, orig.uz); + let right = p5.Vector.cross(forward, up); + let expectedUp = p5.Vector.cross(right, forward).normalize(); + + // Verify that the up vector has changed + assert.notStrictEqual(myCam.upX, orig.ux, 'upX should be updated'); + assert.notStrictEqual(myCam.upY, orig.uy, 'upY should be updated'); + assert.notStrictEqual(myCam.upZ, orig.uz, 'upZ should be updated'); + + // Verify up vector matches expected values within a small margin of error + assert.closeTo(myCam.upX, expectedUp.x, 0.001, 'upX mismatch'); + assert.closeTo(myCam.upY, expectedUp.y, 0.001, 'upY mismatch'); + assert.closeTo(myCam.upZ, expectedUp.z, 0.001, 'upZ mismatch'); + }); + + test('Tilt() with negative angle correctly updates the up vector', function() { + var orig = getVals(myCam); // Store original camera values + + myCam.tilt(-30); // Tilt by -30 degrees + + // Compute expected up vector (normalized) + let forward = myp5.createVector( + myCam.centerX - myCam.eyeX, + myCam.centerY - myCam.eyeY, + myCam.centerZ - myCam.eyeZ + ); + let up = myp5.createVector(orig.ux, orig.uy, orig.uz); + let right = p5.Vector.cross(forward, up); + let expectedUp = p5.Vector.cross(right, forward).normalize(); + + // Verify that the up vector has changed + assert.notStrictEqual(myCam.upX, orig.ux, 'upX should be updated'); + assert.notStrictEqual(myCam.upY, orig.uy, 'upY should be updated'); + assert.notStrictEqual(myCam.upZ, orig.uz, 'upZ should be updated'); + + // Verify up vector matches expected values within a small margin of error + assert.closeTo(myCam.upX, expectedUp.x, 0.001, 'upX mismatch'); + assert.closeTo(myCam.upY, expectedUp.y, 0.001, 'upY mismatch'); + assert.closeTo(myCam.upZ, expectedUp.z, 0.001, 'upZ mismatch'); + }); + }); }); suite('Rotation with angleMode(DEGREES)', function() {