SenY commited on
Commit
8f9ad04
·
1 Parent(s): 1e8da4e

Hueを実装

Browse files
Files changed (1) hide show
  1. index.js +12 -1
index.js CHANGED
@@ -1,5 +1,6 @@
1
  import { applyEffect, getAvailableEffects } from './effects.js';
2
  import { InvertPostProcess } from './postprocess/invert.js';
 
3
  import { BasePostProcess } from './postprocess/base.js';
4
 
5
  const tagDisplayNames = {
@@ -227,7 +228,8 @@ function debounceRender(callback, delay = 200) {
227
 
228
  // ポストプロセス処理のインスタンスを作成
229
  const postProcessors = {
230
- invert: new InvertPostProcess()
 
231
  };
232
 
233
  /**
@@ -266,6 +268,15 @@ function initializePostProcessUI() {
266
  const card = createPostProcessCard(processor);
267
  container.appendChild(card);
268
  });
 
 
 
 
 
 
 
 
 
269
  }
270
 
271
  /**
 
1
  import { applyEffect, getAvailableEffects } from './effects.js';
2
  import { InvertPostProcess } from './postprocess/invert.js';
3
+ import { HuePostProcess } from './postprocess/hue.js';
4
  import { BasePostProcess } from './postprocess/base.js';
5
 
6
  const tagDisplayNames = {
 
228
 
229
  // ポストプロセス処理のインスタンスを作成
230
  const postProcessors = {
231
+ invert: new InvertPostProcess(),
232
+ hue: new HuePostProcess()
233
  };
234
 
235
  /**
 
268
  const card = createPostProcessCard(processor);
269
  container.appendChild(card);
270
  });
271
+
272
+ // スライダーの値変更時のイベントハンドラを設定
273
+ const hueRotate = document.getElementById('hueRotate');
274
+ if (hueRotate) {
275
+ hueRotate.addEventListener('input', (e) => {
276
+ document.getElementById('hueRotateValue').textContent = e.target.value;
277
+ debounceRender(renderAllPresets);
278
+ });
279
+ }
280
  }
281
 
282
  /**