Skip to content

Commit

Permalink
add init color
Browse files Browse the repository at this point in the history
  • Loading branch information
lilpacy committed Nov 15, 2024
1 parent 0e6abcc commit c79d618
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ class ColorVisualizerApp {

// アニメーションの開始
this.animate();

// 初期値の設定と表示
const initialR = 1;
const initialG = 1;
const initialB = 1;
this.updateRGBSliders(initialR, initialG, initialB);
this.rgbCube.updateMarkerPosition(initialR, initialG, initialB);
const [h, s, v] = rgbToHsv(initialR * 255, initialG * 255, initialB * 255);
this.updateHSVSliders(h, s, v);
const color = new THREE.Color(initialR, initialG, initialB);
this.hsvCone.updateMarkerPosition(h, s, v, color);
this.updateColorDisplay(initialR, initialG, initialB);
}

setupRenderers() {
Expand Down

0 comments on commit c79d618

Please sign in to comment.