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.1428
JAVASCRIPTV Telegram 1428
πŸ–₯ 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/1428
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/1428

View MORE
Open in Telegram


Telegram News

Date: |

Telegram channels enable users to broadcast messages to multiple users simultaneously. Like on social media, users need to subscribe to your channel to get access to your content published by one or more administrators. Just as the Bitcoin turmoil continues, crypto traders have taken to Telegram to voice their feelings. Crypto investors can reduce their anxiety about losses by joining the β€œBear Market Screaming Therapy Group” on Telegram. bank east asia october 20 kowloon The SUCK Channel on Telegram, with a message saying some content has been removed by the police. Photo: Telegram screenshot. The court said the defendant had also incited people to commit public nuisance, with messages calling on them to take part in rallies and demonstrations including at Hong Kong International Airport, to block roads and to paralyse the public transportation system. Various forms of protest promoted on the messaging platform included general strikes, lunchtime protests and silent sit-ins.
from us


Telegram Javascript
FROM American