Skip to content

Commit 393a472

Browse files
committed
feat: update algo for bubbles
1 parent 0ebc725 commit 393a472

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pwa/components/con/speakers/SpeakerImage2025.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ interface SpeakerImageProps {
1111
}
1212

1313
function nameToAngle(name: string): number {
14+
const nameToHash = name.substring(0, 12);
15+
console.log(nameToHash);
1416
let hash = 0;
15-
for (let i = 0; i < name.length; i++) {
16-
hash += name.charCodeAt(i);
17+
for (let i = 0; i < nameToHash.length; i++) {
18+
hash += nameToHash.charCodeAt(i);
1719
}
1820
let angle = hash % 360;
21+
console.log(nameToHash);
22+
console.log(angle);
1923

2024
const forbiddenZones: [number, number][] = [
2125
[60, 120],

0 commit comments

Comments
 (0)