Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #584 #591

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
202 changes: 202 additions & 0 deletions public/images/by-nc-sa.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
featuredImageAlt: A random series of words related to p5.js scattered on a maroon background.
title: Random Poetry
oneLineDescription: Generate a poem with words randomly selected from a bank.
---
Using the
<a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a>
and
<a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a>
functions, you can randomly select a series of items from an array
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
featuredImageAlt: A random series of words related to p5.js scattered on a maroon background.
title: Random Poetry
oneLineDescription: Generate a poem with words randomly selected from a bank.
---

Using the
<a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a>
and
<a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a>
functions, you can randomly select a series of items from an array
and draw them at different sizes and positions on the canvas.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: Poema Aleatorio
oneLineDescription: Genera un poema con palabras seleccionadas al azar de un banco de palabras.
---
Usando las funciones <a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a> y
<a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a>, puedes seleccionar
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: Poema Aleatorio
oneLineDescription: Genera un poema con palabras seleccionadas al azar de un banco de palabras.
---

Usando las funciones <a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a> y
<a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a>, puedes seleccionar
aleatoriamente una serie de elementos de un arreglo y dibujarlos en diferentes tamaños y posiciones en el lienzo.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: यादृच्छिक कविता
oneLineDescription: बैंक से यादृच्छिक रूप से चुने गए शब्दों से एक कविता तैयार करें।
---
<a href='https://p5js.org/reference/#/p5/floor' target='_blank'>floor()</a>
और
<a href='https://p5js.org/reference/#/p5/random' target='_blank'>random()</a>
फ़ंक्शंस, का उपयोग
आप किसी सरणी से यादृच्छिक रूप से आइटमों की एक श्रृंखला का चयन कर सकते हैं
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: यादृच्छिक कविता
oneLineDescription: बैंक से यादृच्छिक रूप से चुने गए शब्दों से एक कविता तैयार करें।
---

<a href='https://p5js.org/reference/#/p5/floor' target='_blank'>floor()</a>
और
<a href='https://p5js.org/reference/#/p5/random' target='_blank'>random()</a>
फ़ंक्शंस, का उपयोग
आप किसी सरणी से यादृच्छिक रूप से आइटमों की एक श्रृंखला का चयन कर सकते हैं
और उन्हें कैनवास पर विभिन्न आकारों और स्थानों पर बनाएं।
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: 랜덤 시
oneLineDescription: 단어 모음집으로부터 무작위로 선택된 단어들로 시를 생성합니다.
---
<a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a>와
<a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a> 함수를 사용하여 배열에서 일련의 항목을 무작위로 선택하고 캔버스의 다양한 크기와 위치에 그릴 수 있습니다.
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: 랜덤 시
oneLineDescription: 단어 모음집으로부터 무작위로 선택된 단어들로 시를 생성합니다.
---

<a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a>와
<a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a> 함수를 사용하여 배열에서 일련의 항목을 무작위로 선택하고 캔버스의 다양한 크기와 위치에 그릴 수 있습니다.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: 随机诗歌
oneLineDescription: 从一个词库中随机选择单词生成一首诗。
---
使用 <a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a> 和 <a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a> 函数,你可以从数组中随机选择一系列项目,并在画布上以不同的大小和位置绘制它们。
---
featuredImage: "../../../images/featured/08_Listing_Data_with_Arrays-00_Random_Poetry-thumbnail.png"
title: 随机诗歌
oneLineDescription: 从一个词库中随机选择单词生成一首诗。
---

使用 <a href="https://p5js.org/reference/#/p5/floor" target="_blank">floor()</a> 和 <a href="https://p5js.org/reference/#/p5/random" target="_blank">random()</a> 函数,你可以从数组中随机选择一系列项目,并在画布上以不同的大小和位置绘制它们。
3 changes: 2 additions & 1 deletion src/content/ui/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ exampleCategories:
Transformation: "Transformation"
Calculating Values: "Calculating Values"
Repetition: "Repetition"
Listing Data With Arrays: "Listing Data With Arrays"
Listing Data With Arrays: "Listing Data With Arrays"
# Renamed the file and made some small changes
Angles And Motion: "Angles And Motion"
Games: "Games"
3D: "3D"
Expand Down
6 changes: 6 additions & 0 deletions src/layouts/ExampleLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ const { Content } = await example.render();
</div>
<EditableSketch code={code} />
<p>{example.data.arialabel}</p>
<div class="rendered-markdown">
<p>
<a href={Astro.url.pathname}>{example.data.title}</a> by <a href="https://p5js.org/people">p5.js Contributors</a> and the <a href="https://processingfoundation.org/people">Processing Foundation</a> is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a>.
</p>
<img src="/images/by-nc-sa.svg" />
</div>
</div>
<div class="grid gap-y-4xl lg:gap-y-mb-3xl mt-2xl">
{
Expand Down