Skip to content

Commit

Permalink
temporary getters for levels & _array, compatability with old color A…
Browse files Browse the repository at this point in the history
…PI to work with WebGL mode on dev branch
  • Loading branch information
lukeplowden committed Sep 4, 2024
1 parent ffdbe29 commit 9a808ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/color/p5.Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,10 @@ p5.Color = class Color {
get levels() {
return [...this.color.coords, this.color.alpha].map(v => v * 255);
}

get _array(){
return [...this.color.coords, this.color.alpha];
}
};

export default p5.Color;

0 comments on commit 9a808ed

Please sign in to comment.