@onjmin/dtm 0.1.59 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6606,7 +6606,7 @@ var findZone = (ctx, fontName, zones, pitchs = []) => {
6606
6606
  for (let i = zones.length - 1; i >= 0; i--)
6607
6607
  for (const v of set) {
6608
6608
  const zone = zones[i];
6609
- if (v < zone.keyRangeLow || v > zone.keyRangeHigh + 1) continue;
6609
+ if (v < zone.keyRangeLow || v > zone.keyRangeHigh) continue;
6610
6610
  set.delete(v);
6611
6611
  map.set(v, { ...zone });
6612
6612
  }
@@ -6704,7 +6704,7 @@ var adjustZone = async (ctx, fontName, zone) => {
6704
6704
  const oldData = oldBuf.getChannelData(ch);
6705
6705
  const newData = newBuf.getChannelData(ch);
6706
6706
  for (let i = 0; i < attackLength; i++) {
6707
- const ratio = attackLength > 0 ? i / attackLength : 0;
6707
+ const ratio = attackLength > 1 ? i / (attackLength - 1) : 0;
6708
6708
  const m = 1 + (gainMultiplier - 1) * ratio;
6709
6709
  newData[i] = oldData[i] * m;
6710
6710
  }
@@ -9029,6 +9029,7 @@ var init = (mountTarget, width = 800, height = 450, config) => {
9029
9029
  gridCanvas.style.left = `${KEYBOARD_WIDTH}px`;
9030
9030
  gridCanvas.style.top = `${HEADER_HEIGHT}px`;
9031
9031
  gridCanvas.style.touchAction = "none";
9032
+ gridCanvas.style.userSelect = "none";
9032
9033
  const gridCtx = gridCanvas.getContext("2d", { willReadFrequently: true });
9033
9034
  if (!gridCtx) throw new Error("Failed to get 2D rendering context for grid.");
9034
9035
  g_grid_ctx = gridCtx;
package/dist/index.mjs CHANGED
@@ -6484,7 +6484,7 @@ var findZone = (ctx, fontName, zones, pitchs = []) => {
6484
6484
  for (let i = zones.length - 1; i >= 0; i--)
6485
6485
  for (const v of set) {
6486
6486
  const zone = zones[i];
6487
- if (v < zone.keyRangeLow || v > zone.keyRangeHigh + 1) continue;
6487
+ if (v < zone.keyRangeLow || v > zone.keyRangeHigh) continue;
6488
6488
  set.delete(v);
6489
6489
  map.set(v, { ...zone });
6490
6490
  }
@@ -6582,7 +6582,7 @@ var adjustZone = async (ctx, fontName, zone) => {
6582
6582
  const oldData = oldBuf.getChannelData(ch);
6583
6583
  const newData = newBuf.getChannelData(ch);
6584
6584
  for (let i = 0; i < attackLength; i++) {
6585
- const ratio = attackLength > 0 ? i / attackLength : 0;
6585
+ const ratio = attackLength > 1 ? i / (attackLength - 1) : 0;
6586
6586
  const m = 1 + (gainMultiplier - 1) * ratio;
6587
6587
  newData[i] = oldData[i] * m;
6588
6588
  }
@@ -8907,6 +8907,7 @@ var init = (mountTarget, width = 800, height = 450, config) => {
8907
8907
  gridCanvas.style.left = `${KEYBOARD_WIDTH}px`;
8908
8908
  gridCanvas.style.top = `${HEADER_HEIGHT}px`;
8909
8909
  gridCanvas.style.touchAction = "none";
8910
+ gridCanvas.style.userSelect = "none";
8910
8911
  const gridCtx = gridCanvas.getContext("2d", { willReadFrequently: true });
8911
8912
  if (!gridCtx) throw new Error("Failed to get 2D rendering context for grid.");
8912
8913
  g_grid_ctx = gridCtx;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "onjmin",
3
3
  "license": "MIT",
4
4
  "name": "@onjmin/dtm",
5
- "version": "0.1.59",
5
+ "version": "0.1.60",
6
6
  "description": "MMLを中間言語に用いた、モバイルファーストなDAW / ピアノロール打ち込みコンポーネント",
7
7
  "homepage": "https://onjmin.github.io/dtm",
8
8
  "repository": {