CodingTrain / CodingTrain/Suggestion-Box
[Quantum Continuum]: Challenge - how to enable fill good function?
- 主要言語
- 言語のデータがありません
- スター
- 570
- フォーク
- 85
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
 
### Good morning, Dear @shiffman! Good morning, Dear P5JS-citizens!
Let me ask some different alternatives regarding `"How to enable fill good function?"`
Here's my trial to solve it:
- [Live example of "fill good" function - https://gvitalie.github.io/demolution/hello/](https://gvitalie.github.io/demolution/hello/)
- [Code on GitHub - https://github.com/gvitalie/demolution/tree/gh-pages](https://github.com/gvitalie/demolution/tree/gh-pages)
> see line of code with `fill(good);`
```javascript
# sketch.js
function setup() {
createCanvas(windowWidth, windowHeight);
// frameRate(3);
rectMode(CENTER);
// noLoop();
}
function draw() {
background(127);
let step = 30;
for (let i = 0; i <= width; i += step){
for (let j = 0; j <= height; j += step){
// Enable fill(good) function.
let good = hups();
fill(good);
(round(random(0,1))) ? ellipse(i, j, step)
: rect(i, j, step, step);
}
}
}
// Fill good environment.
function hups(){
let c = [random(0, 255), random(0, 255), random(0, 255)];
return c
}
```
## The rezult:
_NOTE: Clicking on image below will open a Google Photos Shared Album_
[](https://photos.app.goo.gl/k99UV77J3uyXZvCX2)
# Fill good - Picasso stylus
[Live demo example @ https://gvitalie.github.io/demolution/fillgood/](https://gvitalie.github.io/demolution/fillgood/)
```javascript
# sketch.js
function setup() {
createCanvas(windowWidth, windowHeight);
frameRate(5);
rectMode(CENTER);
// noLoop();
}
function draw() {
background(127);
let step = 30;
for (let i = 0; i <= width; i += step){
for (let j = 0; j <= height; j += step){
let good = hups();
stroke(good);
strokeWeight(random(10, 30));
(round(random(0, 1))) ? line(i, j, i + step, j + step)
: line(i, j + step, i + step, j);
}
}
}
function hups(){
let c = [random(0, 255), random(0, 255), random(0, 255)];
return c
}
```

コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
リンクされているsketch.jsの例とライブデモから始め、次にp5.jsのfill()呼び出しがhups()によって返される配列をどのように処理することが想定されているかを確認してください。これがバグ報告、チュートリアルのトピック、新機能のいずれなのかを明確にし、実装前に期待される視覚的な結果と再現可能なテストを定義してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100