Warning: file_put_contents(aCache/aDaily/post/javascriptv/-1425-1426-1427-1428-1429-1425-): Failed to open stream: No space left on device in /var/www/tgoop/post.php on line 50
Javascript@javascriptv P.1427
JAVASCRIPTV Telegram 1427
πŸ–₯ p5.js β€” open-source Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ° JavaScript, заточСнная ΠΏΠΎΠ΄ созданиС Π²ΠΈΠ·ΡƒΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΉ, Π°Π½ΠΈΠΌΠ°Ρ†ΠΈΠΉ ΠΈ Ρ‚.Π΄.

Π’ p5.js сдСлан ΡƒΠΏΠΎΡ€ Π½Π° простоту использования ΠΈ Π»Π°ΠΊΠΎΠ½ΠΈΡ‡Π½ΠΎΡΡ‚ΡŒ
К ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρƒ, Π²ΠΎΡ‚ ΠΊΠΎΠ΄ для Π²ΠΈΠ·ΡƒΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΏΡƒΠ·Ρ‹Ρ€ΡŒΠΊΠΎΠ²ΠΎΠΉ сортировки:
let values = [];
let i = 0;
let j = 0;

function setup() {
createCanvas(720, 400);
for(let i = 0;i<width/8;i++){
values.push(random(height));
}
}

function draw() {
background(220);
bubbleSort();
simulateSorting();
}

function bubbleSort() {
for(let k = 0;k<8;k++){
if(i<values.length){
let temp = values[j];
if(values[j] > values[j+1]){
values[j] = values[j+1];
values[j+1] = temp;
}
j++;

if(j>=values.length-i-1){
j = 0;
i++;
}
}
else{
noLoop();
}
}
}

function simulateSorting(){
for(let i = 0;i<values.length;i++){
stroke(100, 143, 143);
fill(50);
rect(i*8 , height, 8, -values[i],20);
}
}


πŸ–₯ GitHub
🟑 ΠŸΡ€ΠΈΠΌΠ΅Ρ€Ρ‹ использования p5.js

@javascriptv
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯12πŸ‘6❀5



tgoop.com/javascriptv/1427
Create:
Last Update:

πŸ–₯ p5.js β€” open-source Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ° JavaScript, заточСнная ΠΏΠΎΠ΄ созданиС Π²ΠΈΠ·ΡƒΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΉ, Π°Π½ΠΈΠΌΠ°Ρ†ΠΈΠΉ ΠΈ Ρ‚.Π΄.

Π’ p5.js сдСлан ΡƒΠΏΠΎΡ€ Π½Π° простоту использования ΠΈ Π»Π°ΠΊΠΎΠ½ΠΈΡ‡Π½ΠΎΡΡ‚ΡŒ
К ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρƒ, Π²ΠΎΡ‚ ΠΊΠΎΠ΄ для Π²ΠΈΠ·ΡƒΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΏΡƒΠ·Ρ‹Ρ€ΡŒΠΊΠΎΠ²ΠΎΠΉ сортировки:

let values = [];
let i = 0;
let j = 0;

function setup() {
createCanvas(720, 400);
for(let i = 0;i<width/8;i++){
values.push(random(height));
}
}

function draw() {
background(220);
bubbleSort();
simulateSorting();
}

function bubbleSort() {
for(let k = 0;k<8;k++){
if(i<values.length){
let temp = values[j];
if(values[j] > values[j+1]){
values[j] = values[j+1];
values[j+1] = temp;
}
j++;

if(j>=values.length-i-1){
j = 0;
i++;
}
}
else{
noLoop();
}
}
}

function simulateSorting(){
for(let i = 0;i<values.length;i++){
stroke(100, 143, 143);
fill(50);
rect(i*8 , height, 8, -values[i],20);
}
}


πŸ–₯ GitHub
🟑 ΠŸΡ€ΠΈΠΌΠ΅Ρ€Ρ‹ использования p5.js

@javascriptv

BY Javascript








Share with your friend now:
tgoop.com/javascriptv/1427

View MORE
Open in Telegram


Telegram News

Date: |

To upload a logo, click the Menu icon and select β€œManage Channel.” In a new window, hit the Camera icon. Today, we will address Telegram channels and how to use them for maximum benefit. While the character limit is 255, try to fit into 200 characters. This way, users will be able to take in your text fast and efficiently. Reveal the essence of your channel and provide contact information. For example, you can add a bot name, link to your pricing plans, etc. As five out of seven counts were serious, Hui sentenced Ng to six years and six months in jail. Members can post their voice notes of themselves screaming. Interestingly, the group doesn’t allow to post anything else which might lead to an instant ban. As of now, there are more than 330 members in the group.
from us


Telegram Javascript
FROM American