forked from VOICEVOX/voicevox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CubicHermite補間とCatmullRom補間を実装、ポイントを描画する処理を実装
- Loading branch information
1 parent
fc0784e
commit 867e266
Showing
8 changed files
with
361 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* 色を表します。各値は0以上255以下です。 | ||
*/ | ||
export class Color { | ||
readonly r: number; | ||
readonly g: number; | ||
readonly b: number; | ||
readonly a: number; | ||
|
||
constructor(r: number, g: number, b: number, a: number) { | ||
this.r = r; | ||
this.g = g; | ||
this.b = b; | ||
this.a = a; | ||
} | ||
|
||
equals(color: Color) { | ||
return ( | ||
this.r === color.r && | ||
this.g === color.g && | ||
this.b === color.b && | ||
this.a === color.a | ||
); | ||
} | ||
|
||
toRgbaArray() { | ||
return [this.r, this.g, this.b, this.a]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.