mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-03 11:22:37 +02:00
fix build
This commit is contained in:
parent
aeb98e60cd
commit
06e5d19944
1 changed files with 6 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
|||
height: size + 'px',
|
||||
lineHeight: size + 'px',
|
||||
fontSize: (size/2) + 'px',
|
||||
backgroundColor: Background(),
|
||||
backgroundColor: Background(seed),
|
||||
}">
|
||||
{{ seed.substring(0, 2).toUpperCase() }}
|
||||
</div>
|
||||
|
@ -35,12 +35,12 @@
|
|||
@Prop(String) readonly seed: string | undefined;
|
||||
@Prop(Number) readonly size: number | undefined;
|
||||
|
||||
Background() {
|
||||
Background(seed: string) {
|
||||
let a = 0, b = 0, c = 0;
|
||||
for(let i = 0; i < this.seed.length; i++) {
|
||||
a += this.seed.charCodeAt(i) * 3;
|
||||
b += this.seed.charCodeAt(i) * 5;
|
||||
c += this.seed.charCodeAt(i) * 7;
|
||||
for(let i = 0; i < seed.length; i++) {
|
||||
a += seed.charCodeAt(i) * 3;
|
||||
b += seed.charCodeAt(i) * 5;
|
||||
c += seed.charCodeAt(i) * 7;
|
||||
}
|
||||
|
||||
let x = Math.floor(128 + (a % 128));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue