repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/GameOverlay/helpers/getPlayerScoreData.test.ts | src/routes/Game/Singing/GameOverlay/helpers/getPlayerScoreData.test.ts | import getPlayerScoreData from 'routes/Game/Singing/GameOverlay/helpers/getPlayerScoreData';
describe('getPlayerScoreData', () => {
it('should return isFirst = true if the player has the biggest score', () => {
const scores: [0 | 1 | 2 | 3, number][] = [
[3, 1],
[2, 5],
[1, 3],
[0, 10],
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/PostGame.tsx | src/routes/Game/Singing/PostGame/PostGame.tsx | import { SingSetup, Song } from 'interfaces';
import PlayersManager from 'modules/Players/PlayersManager';
import { useMemo } from 'react';
import PostGameView from 'routes/Game/Singing/PostGame/PostGameView';
import useHighScores from 'routes/Game/Singing/PostGame/hooks/useHighScores';
import LayoutGame from 'routes/L... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/PostGameView.tsx | src/routes/Game/Singing/PostGame/PostGameView.tsx | import styled from '@emotion/styled';
import { DetailedScore, SingSetup, Song } from 'interfaces';
import { GameTip } from 'modules/Elements/GameTip';
import { typography } from 'modules/Elements/cssMixins';
import useBackgroundMusic from 'modules/hooks/useBackgroundMusic';
import { useState } from 'react';
import Resu... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/hooks/useHighScores.ts | src/routes/Game/Singing/PostGame/hooks/useHighScores.ts | import { HighScoreEntity, SingSetup, Song } from 'interfaces';
import { useSongStats } from 'modules/Songs/stats/hooks';
import isE2E from 'modules/utils/isE2E';
import seededRandom from 'modules/utils/seededRandom';
import { useMemo } from 'react';
const fakePlayerNames = [
'Lysa Arryn',
'Peter Parker',
'Zordon... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/HighScoreRename.tsx | src/routes/Game/Singing/PostGame/Views/HighScoreRename.tsx | import { HighScoreEntity } from 'interfaces';
import { Autocomplete } from 'modules/Elements/Autocomplete';
import useRecentPlayerNames from 'modules/hooks/players/useRecentPlayerNames';
import useKeyboardNav from 'modules/hooks/useKeyboardNav';
import { ComponentRef, useRef, useState } from 'react';
interface Props {... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/Results.tsx | src/routes/Game/Singing/PostGame/Views/Results.tsx | import styled from '@emotion/styled';
import { GAME_MODE, HighScoreEntity, SingSetup } from 'interfaces';
import CameraManager from 'modules/Camera/CameraManager';
import { Button } from 'modules/Elements/Button';
import { sumDetailedScore } from 'modules/GameEngine/GameState/Helpers/calculateScore';
import useKeyboard... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/HighScores.tsx | src/routes/Game/Singing/PostGame/Views/HighScores.tsx | import styled from '@emotion/styled';
import dayjs from 'dayjs';
import { HighScoreEntity, SingSetup, Song } from 'interfaces';
import { Button } from 'modules/Elements/Button';
import { typography } from 'modules/Elements/cssMixins';
import styles from 'modules/GameEngine/Drawing/styles';
import { useEditScore } from ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/Results/PlayerScore.tsx | src/routes/Game/Singing/PostGame/Views/Results/PlayerScore.tsx | import styled from '@emotion/styled';
import { HighScoreEntity, SingSetup } from 'interfaces';
import { Badge } from 'modules/Elements/Badge';
import { buttonFocused } from 'modules/Elements/Button';
import styles from 'modules/GameEngine/Drawing/styles';
import CountUp from 'react-countup';
import { formatter } from '... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/Results/ScoreBar.tsx | src/routes/Game/Singing/PostGame/Views/Results/ScoreBar.tsx | import styled from '@emotion/styled';
interface Props {
score: number;
maxScore: number;
color: string;
}
function easeOutCubic(x: number): number {
return 1 - Math.pow(1 - x, 3);
}
function easing(x: number): number {
return easeOutCubic(x);
}
function ScoreBar({ color, maxScore, score }: Props) {
retu... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/Results/CameraRoll.tsx | src/routes/Game/Singing/PostGame/Views/Results/CameraRoll.tsx | import styled from '@emotion/styled';
import { captureException } from '@sentry/react';
import CameraManager from 'modules/Camera/CameraManager';
import Typography from 'modules/Elements/AKUI/Primitives/Typography';
import { useEffect, useRef, useState } from 'react';
function CameraRoll() {
const [videoSrc, setVide... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/Results/CameraRollPlaceholder.tsx | src/routes/Game/Singing/PostGame/Views/Results/CameraRollPlaceholder.tsx | import CameraManager from 'modules/Camera/CameraManager';
import { Button } from 'modules/Elements/AKUI/Button';
import Typography from 'modules/Elements/AKUI/Primitives/Typography';
import { RegisterFunc } from 'modules/hooks/useKeyboardNav';
import { useEffect, useRef } from 'react';
import timelapse from './timelaps... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Game/Singing/PostGame/Views/Results/PlayerDetailedScore.tsx | src/routes/Game/Singing/PostGame/Views/Results/PlayerDetailedScore.tsx | import styled from '@emotion/styled';
import { typography } from 'modules/Elements/cssMixins';
import styles from 'modules/GameEngine/Drawing/styles';
import { PlayerScore } from 'routes/Game/Singing/PostGame/PostGameView';
import ScoreBar from 'routes/Game/Singing/PostGame/Views/Results/ScoreBar';
import Typewriter fr... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Convert.tsx | src/routes/Convert/Convert.tsx | import { Paper } from '@mui/material';
import PageLoader from 'modules/Elements/PageLoader';
import { ComponentProps, lazy, Suspense } from 'react';
import { Helmet } from 'react-helmet';
export const LazyConvert = lazy(() =>
import('routes/ManageSongs/SongManagement').then((modules) => {
return { default: modul... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/importUltrastarEsSong.ts | src/routes/Convert/importUltrastarEsSong.ts | import { AuthorAndVidEntity } from 'routes/Convert/Steps/AuthorAndVideo';
export default async function importSongFromSource(url: string) {
try {
const urlObj = new URL(url);
if (urlObj.host === 'usdb.animux.de') {
return importUsDbAnimuxSong(url, urlObj);
} else if (urlObj.host === 'ultrastar-es.... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/ConvertView.tsx | src/routes/Convert/ConvertView.tsx | import { Alert, AlertTitle, Button, Grid, Paper, Step, StepButton, StyledEngineProvider } from '@mui/material';
import Stepper from '@mui/material/Stepper';
import { Song } from 'interfaces';
import { useBackground } from 'modules/Elements/BackgroundContext';
import NormalizeFontSize from 'modules/Elements/NormalizeFon... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/calculateProperBpm.ts | src/routes/Convert/calculateProperBpm.ts | import { Song } from 'interfaces';
import isNotesSection from 'modules/Songs/utils/isNotesSection';
export default function calculateProperBPM(desiredEndMs: number, song: Song) {
const notesSections = song.tracks[0].sections.filter(isNotesSection);
const lastNote = notesSections.at(-1)?.notes.at(-1)!;
const de... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Elements.tsx | src/routes/Convert/Elements.tsx | import { Search } from '@mui/icons-material';
import { Button, Tooltip } from '@mui/material';
import { ComponentProps } from 'react';
import { twc } from 'react-twc';
export const Pre = twc.span`font-mono`;
// eslint-disable-next-line react-refresh/only-export-components
export const inputAction = (action: Component... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo.tsx | src/routes/Convert/Steps/SyncLyricsToVideo.tsx | import { Box } from '@mui/material';
import { Song } from 'interfaces';
import EditSong from 'routes/Convert/Steps/SyncLyricsToVideo/EditSong';
interface Props {
onChange: (data: Song) => void;
data?: Song;
visible: boolean;
}
export default function SyncLyricsToVideo(props: Props) {
return (
<Box data-te... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/AuthorAndVideo.tsx | src/routes/Convert/Steps/AuthorAndVideo.tsx | import { Box, TextField } from '@mui/material';
import { getVideoId } from 'modules/Songs/utils/convertTxtToSong';
import YouTube from 'react-youtube';
import { inputAction } from 'routes/Convert/Elements';
export interface AuthorAndVidEntity {
author: string;
authorUrl: string;
video: string;
}
interface Props... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SongMetadata.tsx | src/routes/Convert/Steps/SongMetadata.tsx | import styled from '@emotion/styled';
import {
Autocomplete,
FormControl,
FormHelperText,
Grid,
InputLabel,
MenuItem,
Select,
TextField,
} from '@mui/material';
import { Flag } from 'modules/Elements/Flag';
import useSongIndex from 'modules/Songs/hooks/useSongIndex';
import { countryMap } from 'modules/... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/PreviewAndVolumeAdjustment.tsx | src/routes/Convert/Steps/PreviewAndVolumeAdjustment.tsx | import { Box, Slider } from '@mui/material';
import backgroundMusic from 'assets/Funk Cool Groove (No Copyright Music) By Anwar Amr.ogg';
import { useEffect, useRef, useState } from 'react';
import YouTube from 'react-youtube';
import { SongMetadataEntity } from 'routes/Convert/Steps/SongMetadata';
import { msec } from... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/BasicData.tsx | src/routes/Convert/Steps/BasicData.tsx | import { Box, Button, TextField } from '@mui/material';
import { Song } from 'interfaces';
import isNotesSection from 'modules/Songs/utils/isNotesSection';
import { getSectionStartInMs } from 'modules/Songs/utils/notesSelectors';
import { ChangeEventHandler, useMemo } from 'react';
import importUltrastarEsSong from 'ro... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/EditSong.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/EditSong.tsx | import { Box, Button, Grid, Typography } from '@mui/material';
import { cloneDeep } from 'es-toolkit';
import { GAME_MODE, Note, seconds, SingSetup, Song } from 'interfaces';
import getCurrentBeat from 'modules/GameEngine/GameState/Helpers/getCurrentBeat';
import getSongBeatLength from 'modules/Songs/utils/getSongBeatL... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Helpers/formatMs.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Helpers/formatMs.tsx | import { Button, Tooltip } from '@mui/material';
import { seconds } from 'interfaces';
import GameState from 'modules/GameEngine/GameState/GameState';
import { YouTubePlayer } from 'react-youtube';
import { Pre } from 'routes/Convert/Elements';
import { PlayerRef } from 'routes/Game/Singing/Player';
const formatMs = (... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Components/ManipulateBpm.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Components/ManipulateBpm.tsx | import { Button, TextField } from '@mui/material';
import { Song } from 'interfaces';
import beatToMs from 'modules/GameEngine/GameState/Helpers/beatToMs';
import { getLastNoteEndFromSections } from 'modules/Songs/utils/notesSelectors';
import { useState } from 'react';
import { Pre } from 'routes/Convert/Elements';
im... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Components/ShiftVideoGap.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Components/ShiftVideoGap.tsx | import { Box, Button, ButtonGroup, TextField, Typography } from '@mui/material';
import { seconds } from 'interfaces';
import { msec } from 'routes/Convert/Steps/SyncLyricsToVideo/Helpers/formatMs';
import { PlayerRef } from 'routes/Game/Singing/Player';
interface Props {
onChange: (shift: seconds) => void;
curren... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Components/ShortcutIndicator.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Components/ShortcutIndicator.tsx | import { Tooltip, useMediaQuery } from '@mui/material';
import React from 'react';
interface Props {
shortcutKey: string;
children: React.ReactElement<unknown, any>;
}
export default function ShortcutIndicator({ shortcutKey, children }: Props) {
const hidden = useMediaQuery((theme) => theme.breakpoints.down('sm... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Components/EditSection.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Components/EditSection.tsx | import styled from '@emotion/styled';
import {
Box,
Button,
ButtonGroup,
List,
ListItem,
ListItemButton,
ListItemText,
Stack,
TextField,
Typography,
} from '@mui/material';
import { Song } from 'interfaces';
import GameState from 'modules/GameEngine/GameState/GameState';
import isNotesSection from '... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Components/ShiftGap.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Components/ShiftGap.tsx | import { Box, Button, ButtonGroup, TextField, Typography } from '@mui/material';
import { milliseconds } from 'interfaces';
import { msec } from 'routes/Convert/Steps/SyncLyricsToVideo/Helpers/formatMs';
import { PlayerRef } from 'routes/Game/Singing/Player';
import ShortcutIndicator from './ShortcutIndicator';
interf... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/SyncLyricsToVideo/Components/AdjustPlayback.tsx | src/routes/Convert/Steps/SyncLyricsToVideo/Components/AdjustPlayback.tsx | import { Box, Button, ButtonGroup, Divider, Typography } from '@mui/material';
import { useEffect, useRef } from 'react';
import { Pre } from 'routes/Convert/Elements';
import ShortcutIndicator from 'routes/Convert/Steps/SyncLyricsToVideo/Components/ShortcutIndicator';
import formatMs from 'routes/Convert/Steps/SyncLyr... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/utils/fixDiacritics.ts | src/routes/Convert/Steps/utils/fixDiacritics.ts | const accents = {
polish: {
È: 'é',
í: "'",
'¥': "'",
'¯': 'Ż',
'¹': 'ą',
π: 'ą',
ê: 'ę',
Í: 'ę',
Œ: 'Ś',
å: 'Ś',
œ: 'ś',
ú: 'ś',
æ: 'ć',
Ê: 'ć',
'¿': 'ż',
ø: 'ż',
Ø: 'Ż',
ñ: 'ń',
Ò: 'ń',
'³': 'ł',
'≥': 'ł',
'£': 'Ł',
Û: 'ó',
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Convert/Steps/utils/validateUltrastar.ts | src/routes/Convert/Steps/utils/validateUltrastar.ts | import convertTxtToSong from 'modules/Songs/utils/convertTxtToSong';
export default function isValidUltrastarTxtFormat(songTxt: string) {
const lines = songTxt.split('\n');
const requiredTags = ['#TITLE', '#ARTIST', '#BPM'];
for (const tag of requiredTags) {
if (!lines.some((line) => line.startsWith(tag))) ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Settings/InputLag.tsx | src/routes/Settings/InputLag.tsx | import styled from '@emotion/styled';
import { Input } from 'modules/Elements/Input';
import { ComponentRef, Ref, useImperativeHandle, useRef } from 'react';
import { InputLagSetting, useSettingValue } from 'routes/Settings/SettingsState';
interface Props {
focused: boolean;
ref?: Ref<ComponentRef<typeof Input>>;
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Settings/Calibration.tsx | src/routes/Settings/Calibration.tsx | import { Calibration } from 'modules/Calibration/Calibration';
import MenuWithLogo from 'modules/Elements/MenuWithLogo';
import useSmoothNavigate from 'modules/hooks/useSmoothNavigate';
export const CalibrationSettings = () => {
const navigate = useSmoothNavigate();
return (
<MenuWithLogo>
<Calibration o... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Settings/RemoteMicSettings.tsx | src/routes/Settings/RemoteMicSettings.tsx | import styled from '@emotion/styled';
import { MenuButton } from 'modules/Elements/Menu';
import MenuWithLogo from 'modules/Elements/MenuWithLogo';
import { Switcher } from 'modules/Elements/Switcher';
import events from 'modules/GameEvents/GameEvents';
import { useEventListenerSelector } from 'modules/GameEvents/hooks... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Settings/Settings.tsx | src/routes/Settings/Settings.tsx | import CameraManager from 'modules/Camera/CameraManager';
import { Menu } from 'modules/Elements/AKUI/Menu';
import Typography from 'modules/Elements/AKUI/Primitives/Typography';
import Loader from 'modules/Elements/Loader';
import { MenuButton } from 'modules/Elements/Menu';
import MenuWithLogo from 'modules/Elements/... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/routes/Settings/SettingsState.ts | src/routes/Settings/SettingsState.ts | import { milliseconds } from 'interfaces';
import { backgroundTheme } from 'modules/Elements/LayoutWithBackground';
import { ServerTransport } from 'modules/RemoteMic/Network/Server/Transport/interface';
import Listener from 'modules/utils/Listener';
import { FeatureFlags } from 'modules/utils/featureFlags';
import sto... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/SoundManager.ts | src/modules/SoundManager.ts | import christmasBackgroundMusicSound from 'assets/2020-12-16_-_Christmas_Rock_-_www.FesliyanStudios.com_Steve_Oxen.ogg';
import waitFinishedSound from 'assets/376817__original_sound__impact-cinematic.ogg';
import waitForReadinessSound from 'assets/459342__papaninkasettratat__cinematic-music-short.ogg';
import wooshSoun... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Helpers/getPlayerNoteDistance.ts | src/modules/GameEngine/Helpers/getPlayerNoteDistance.ts | import { noDistanceNoteTypes } from 'consts';
import { PlayerNote } from 'interfaces';
export default function getPlayerNoteDistance(note: PlayerNote) {
return noDistanceNoteTypes.includes(note.note.type) ? 0 : note.distance;
}
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/GameState.ts | src/modules/GameEngine/GameState/GameState.ts | import { GAME_MODE, milliseconds, seconds, SingSetup, Song, songBeat } from 'interfaces';
import {
addDetailedScores,
beatsToPoints,
divideDetailedScores,
} from 'modules/GameEngine/GameState/Helpers/calculateScore';
import getCurrentBeat from 'modules/GameEngine/GameState/Helpers/getCurrentBeat';
import PlayerSt... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/PlayerState.ts | src/modules/GameEngine/GameState/PlayerState.ts | import { FrequencyRecord, NotesSection, PlayerNote, songBeat } from 'interfaces';
import { GameStateClass } from 'modules/GameEngine/GameState/GameState';
import { appendFrequencyToPlayerNotes } from 'modules/GameEngine/GameState/Helpers/appendFrequencyToPlayerNotes';
import calculateScore, { calculateDetailedScoreData... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/calcDistance.tsx | src/modules/GameEngine/GameState/Helpers/calcDistance.tsx | import { MIDDLEA, SEMITONE } from 'consts';
import GameState from 'modules/GameEngine/GameState/GameState';
import pitchToFrequency from 'modules/utils/pitchToFrequency';
export const pitchFromFrequency = (freq: number) =>
Math.round(12 * (Math.log(freq / MIDDLEA) / Math.log(2))) + SEMITONE;
const getDistanceInCent... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/getCurrentBeat.ts | src/modules/GameEngine/GameState/Helpers/getCurrentBeat.ts | import { milliseconds, songBeat } from '../../../../interfaces';
export default function getCurrentBeat(
currentTime: milliseconds,
beatLength: number,
gap: milliseconds,
round = true,
): songBeat {
const currentBeat = (currentTime - gap) / beatLength;
return round ? Math.floor(currentBeat) : currentBeat;
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/calculateScore.ts | src/modules/GameEngine/GameState/Helpers/calculateScore.ts | import { noPointsNoteTypes } from 'consts';
import { memoize } from 'es-toolkit';
import { DetailedScore, PlayerNote, Song } from 'interfaces';
import getPlayerNoteDistance from 'modules/GameEngine/Helpers/getPlayerNoteDistance';
import isNotesSection from 'modules/Songs/utils/isNotesSection';
import tuple from 'module... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/calcDistance.test.ts | src/modules/GameEngine/GameState/Helpers/calcDistance.test.ts | import { calcDistanceBetweenPitches } from 'modules/GameEngine/GameState/Helpers/calcDistance';
describe('calcDistanceBetweenPitches', () => {
it.each`
detectedPitch | targetPitch | tolerance | expectedDistance
${7} | ${-3 * 12} | ${2} | ${-5}
${5} | ${-3 * 12} | ${2} ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/appendFrequencyToPlayerNotes.ts | src/modules/GameEngine/GameState/Helpers/appendFrequencyToPlayerNotes.ts | import { noDistanceNoteTypes } from 'consts';
import { FrequencyRecord, Note, PlayerNote } from 'interfaces';
import { calcDistance } from 'modules/GameEngine/GameState/Helpers/calcDistance';
import detectVibrato from 'modules/GameEngine/GameState/Helpers/detectVibrato';
const SINGING_BREAK_TOLERANCE_MS = 100;
export... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/beatToMs.ts | src/modules/GameEngine/GameState/Helpers/beatToMs.ts | import { milliseconds, Song, SongPreview } from 'interfaces';
import getSongBeatLength from 'modules/Songs/utils/getSongBeatLength';
export default function beatToMs(beat: number, song: Song | SongPreview): milliseconds {
return getSongBeatLength(song) * beat;
}
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/detectVibrato.ts | src/modules/GameEngine/GameState/Helpers/detectVibrato.ts | import { FrequencyRecord } from 'interfaces';
const WINDOW_SIZE = 6;
export default function detectVibrato(data: FrequencyRecord[]): boolean {
const opChangePoints: Array<FrequencyRecord & { change: '>' | '<'; interval: number }> = [];
for (let i = 1; i < data.length; i++) {
if (Math.round(data[i].frequency ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/detectVibrato.test.ts | src/modules/GameEngine/GameState/Helpers/detectVibrato.test.ts | import detectVibrato from 'modules/GameEngine/GameState/Helpers/detectVibrato';
import { createDataSequence, generateFrequencyRecords } from 'modules/utils/testUtils';
const data = [
{
timestamp: 43997.08410299683,
frequency: 5478.03076171875,
},
{
timestamp: 44019.083938964846,
frequency: 5478.0... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/calculateScore.test.ts | src/modules/GameEngine/GameState/Helpers/calculateScore.test.ts | import { PlayerNote } from 'interfaces';
import calculateScore, { MAX_POINTS } from 'modules/GameEngine/GameState/Helpers/calculateScore';
import { generateNote, generatePlayerNote, generateSong } from 'modules/utils/testUtils';
describe('calculateScore', () => {
const note1 = generateNote(0, 5, { type: 'normal' });... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/GameState/Helpers/appendFrequencyToPlayerNotes.test.ts | src/modules/GameEngine/GameState/Helpers/appendFrequencyToPlayerNotes.test.ts | import { FrequencyRecord, Note, PlayerNote } from 'interfaces';
import { appendFrequencyToPlayerNotes } from 'modules/GameEngine/GameState/Helpers/appendFrequencyToPlayerNotes';
import { generateNote } from 'modules/utils/testUtils';
describe('appendFrequencyToPlayerNotes', () => {
it('should create a new note if th... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/InputManager.ts | src/modules/GameEngine/Input/InputManager.ts | import DrawingTestInput from 'modules/GameEngine/Input/DrawingTestInput';
import dummyInput from 'modules/GameEngine/Input/DummyInput';
import InputInterface from 'modules/GameEngine/Input/Interface';
import MicInput from 'modules/GameEngine/Input/MultiMicInput';
import RemoteMicInput from 'modules/GameEngine/Input/Rem... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MultiMicInput.tsx | src/modules/GameEngine/Input/MultiMicInput.tsx | import InputInterface from 'modules/GameEngine/Input/Interface';
import { MicInput } from 'modules/GameEngine/Input/MicInput';
import { SelectedPlayerInput } from 'modules/Players/PlayersManager';
const isDeviceSelectedForMultipleChannels = (allInputs: SelectedPlayerInput[] = [], deviceId: string | undefined) => {
c... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MicInput.ct-story.tsx | src/modules/GameEngine/Input/MicInput.ct-story.tsx | import { useEffect } from 'react';
import MicInput from './MicInput';
declare global {
var micInput: typeof MicInput;
}
export const MicInputCtStory = () => {
useEffect(() => {
global.micInput = MicInput;
}, []);
return (
<div>
<h1>Just adding MicInput to the window</h1>
</div>
);
};
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/DrawingTestInput.tsx | src/modules/GameEngine/Input/DrawingTestInput.tsx | import InputInterface from 'modules/GameEngine/Input/Interface';
class DrawingTestInput implements InputInterface {
private frequencies: [number, number] = [440, 410];
private volumes: [number, number] = [1, 1];
public startMonitoring = async () => {};
public getFrequencies = () => this.frequencies;
public... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MicInput.spec.tsx | src/modules/GameEngine/Input/MicInput.spec.tsx | import { expect, test } from '@playwright/experimental-ct-react';
import { MicInputCtStory } from '../Input/MicInput.ct-story';
test('Mic input should properly return frequencies', async ({ mount, page }) => {
await mount(<MicInputCtStory />);
const frequencies = await page.evaluate(async () => {
const { micI... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/DummyInput.tsx | src/modules/GameEngine/Input/DummyInput.tsx | import InputInterface from 'modules/GameEngine/Input/Interface';
class DummyInput implements InputInterface {
private frequencies: [number, number] = [410, 210];
private volumes: [number, number] = [1, 1];
private timestamp = 0;
private interval: ReturnType<typeof global.setInterval> | null = null;
private ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/SimplifiedMic.tsx | src/modules/GameEngine/Input/SimplifiedMic.tsx | import { captureException } from '@sentry/react';
import InputInterface from 'modules/GameEngine/Input/Interface';
import AubioStrategy from 'modules/GameEngine/Input/MicStrategies/Aubio';
import events from 'modules/GameEvents/GameEvents';
import userMediaService from 'modules/UserMedia/userMediaService';
import Liste... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/Interface.ts | src/modules/GameEngine/Input/Interface.ts | import { SelectedPlayerInput } from 'modules/Players/PlayersManager';
export default interface InputInterface {
startMonitoring: (deviceId?: string, allInputs?: SelectedPlayerInput[]) => Promise<void>;
stopMonitoring: (deviceId?: string) => Promise<void>;
getInputLag: (deviceId?: string) => number;
getFrequenc... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MicInput.tsx | src/modules/GameEngine/Input/MicInput.tsx | import { captureException } from '@sentry/react';
import InputInterface from 'modules/GameEngine/Input/Interface';
import AubioStrategy from 'modules/GameEngine/Input/MicStrategies/Aubio';
import events from 'modules/GameEvents/GameEvents';
import userMediaService from 'modules/UserMedia/userMediaService';
export clas... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/RemoteMicInput.tsx | src/modules/GameEngine/Input/RemoteMicInput.tsx | import InputInterface from 'modules/GameEngine/Input/Interface';
import RemoteMicManager from 'modules/RemoteMic/RemoteMicManager';
class RemoteMicInput implements InputInterface {
private frequencies: [number] = [0];
private volumes: [number] = [1];
public startMonitoring = async (remoteMicId?: string) => {
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MicStrategies/interfaces.ts | src/modules/GameEngine/Input/MicStrategies/interfaces.ts | export interface FrequencyDetectionStrategy {
getSampleSize(): number;
init(context: AudioContext, bufferSize: number): Promise<void>;
getFrequency(data: Float32Array): Promise<number>;
}
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MicStrategies/Yin.ts | src/modules/GameEngine/Input/MicStrategies/Yin.ts | import { FrequencyDetectionStrategy } from 'modules/GameEngine/Input/MicStrategies/interfaces';
export default class YinStrategy implements FrequencyDetectionStrategy {
private detector: ReturnType<typeof YIN> | undefined;
public init = async (context: AudioContext, _buffer: number): Promise<void> => {
this.d... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Input/MicStrategies/Aubio.ts | src/modules/GameEngine/Input/MicStrategies/Aubio.ts | import { FrequencyDetectionStrategy } from 'modules/GameEngine/Input/MicStrategies/interfaces';
export default class AubioStrategy implements FrequencyDetectionStrategy {
private detector: any;
public init = async (context: AudioContext, buffer: number): Promise<void> => {
const aubio = await import('aubiojs'... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/CanvasDrawing.spec.tsx | src/modules/GameEngine/Drawing/CanvasDrawing.spec.tsx | import { expect, test } from '@playwright/experimental-ct-react';
import { NotesSection } from '../../../interfaces';
import { mulitrack } from '../../Songs/utils/song-fixture';
import { TestCanvas } from '../../utils/TestCanvas';
import tuple from '../../utils/tuple';
test.use({ viewport: { width: 800, height: 650 } ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/applyColor.ts | src/modules/GameEngine/Drawing/applyColor.ts | export default function applyColor(
ctx: CanvasRenderingContext2D,
style: { fill: string; stroke: string; lineWidth: number },
) {
ctx.fillStyle = style.fill;
ctx.strokeStyle = style.stroke;
ctx.lineWidth = style.lineWidth;
}
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/calculateData.ts | src/modules/GameEngine/Drawing/calculateData.ts | import { FrequencyRecord, milliseconds, Note, PlayerNote, Section, Song, SongTrack } from 'interfaces';
import isNotesSection from 'modules/Songs/utils/isNotesSection';
export const pitchPadding = 6;
export const NOTE_HEIGHT = 30;
export const BIG_NOTE_HEIGHT = NOTE_HEIGHT + 6;
const getPlayerCanvas = (
drawingDat... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/interfaces.ts | src/modules/GameEngine/Drawing/interfaces.ts | export default interface Particle {
tick: (ctx: CanvasRenderingContext2D, canvas: HTMLCanvasElement, delta: number) => void;
finished: boolean;
}
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/CanvasDrawing.ts | src/modules/GameEngine/Drawing/CanvasDrawing.ts | import { captureException } from '@sentry/react';
import bezier from 'bezier-easing';
import { noDistanceNoteTypes } from 'consts';
import { Note, NotesSection, PlayerNote } from 'interfaces';
import { drawPlayerCanvas } from 'modules/GameEngine/Drawing/Elements/debugPlayerCanvas';
import getNoteColor from 'modules/Gam... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/ParticleManager.ts | src/modules/GameEngine/Drawing/ParticleManager.ts | import Particle from './interfaces';
class ParticleManager {
private particles: Particle[] = [];
private lastTick = Date.now();
private getTimeDelta = (timeShift: number) => {
const currentTick = Date.now() - timeShift;
const delta = currentTick - this.lastTick;
this.lastTick = currentTick;
ret... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/styles.ts | src/modules/GameEngine/Drawing/styles.ts | import { backgroundTheme } from 'modules/Elements/LayoutWithBackground';
import tinycolor from 'tinycolor2';
export const christmasGreenFillBase = tinycolor('rgb(52, 166, 95)');
export const christmasGreenStrokeBase = tinycolor('rgb(15, 138, 95)');
export const christmasRedFillBase = tinycolor('rgb(245, 98, 77)');
exp... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/index.ts | src/modules/GameEngine/Drawing/index.ts | import CanvasDrawing from './CanvasDrawing';
export default CanvasDrawing;
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/debris.ts | src/modules/GameEngine/Drawing/Elements/debris.ts | import ray from './ray';
export default function debris(
canvas: HTMLCanvasElement,
ctx: CanvasRenderingContext2D,
x: number,
y: number,
width: number,
height: number,
_angle: number,
color: string | CanvasGradient | CanvasPattern,
alpha: number = 1,
) {
if (width > 0) {
ray(canvas, ctx, x, y, ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/debugPitches.ts | src/modules/GameEngine/Drawing/Elements/debugPitches.ts | import { calcDistance } from 'modules/GameEngine/GameState/Helpers/calcDistance';
import isNotesSection from 'modules/Songs/utils/isNotesSection';
import calculateData, { DrawingData, pitchPadding } from '../calculateData';
export default function debugPitches(ctx: CanvasRenderingContext2D, data: DrawingData) {
cons... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/debugPlayerCanvas.ts | src/modules/GameEngine/Drawing/Elements/debugPlayerCanvas.ts | import calculateData, { DrawingData } from 'modules/GameEngine/Drawing/calculateData';
import styles from 'modules/GameEngine/Drawing/styles';
export const drawPlayerCanvas = (drawingData: DrawingData) => {
const ctx = drawingData.canvas.getContext('2d')!;
const { playerCanvas } = calculateData(drawingData);
ct... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/playerNote.spec.tsx | src/modules/GameEngine/Drawing/Elements/playerNote.spec.tsx | import { expect, test } from '@playwright/experimental-ct-react';
import { TestCanvas } from '../../../utils/TestCanvas';
import { generateNote, generatePlayerNote } from '../../../utils/testUtils';
import tuple from '../../../utils/tuple';
test.use({ viewport: { width: 220, height: 80 } });
test('Should draw a prope... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/ray.ts | src/modules/GameEngine/Drawing/Elements/ray.ts | import { randomInt } from 'modules/utils/randomValue';
import tinycolor from 'tinycolor2';
const cachedColors: Record<string, [string[], string[], string[]]> = {};
const getColors = (color: string) => {
if (!cachedColors[color]) {
const c = tinycolor(color);
cachedColors[color] = [
[c.setAlpha(0.8).to... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/roundRect.ts | src/modules/GameEngine/Drawing/Elements/roundRect.ts | function simpleRoundRect(
ctx: CanvasRenderingContext2D,
x: number,
y: number,
width: number,
height: number,
radius: number,
fill: boolean,
stroke: boolean,
) {
const actualWidth = Math.max(width, height / 2);
const actualRadius = Math.min(actualWidth / 2, height / 2, radius);
ctx.beginPath();
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/note.ts | src/modules/GameEngine/Drawing/Elements/note.ts | import { capitalize } from 'es-toolkit';
import { Note } from 'interfaces';
import { SpriteNames } from 'modules/GameEngine/Drawing/Elements/Cache/spriteMap';
import drawSpriteWithStartAndEnd from 'modules/GameEngine/Drawing/Elements/spriteWithStartAndEnd';
const getSpriteName = (noteType: Note['type'], playerNumber?:... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/playerFrequencyTrace.ts | src/modules/GameEngine/Drawing/Elements/playerFrequencyTrace.ts | import { PlayerNote } from 'interfaces';
import roundRect from './roundRect';
export default function drawPlayerFrequencyTrace(
ctx: CanvasRenderingContext2D,
x: number,
y: number,
width: number,
height: number,
playerNote: PlayerNote,
) {
ctx.save();
roundRect(ctx, x, y, width, height, 100, false, fal... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/playerNote.ts | src/modules/GameEngine/Drawing/Elements/playerNote.ts | import { Note, PlayerNote } from 'interfaces';
import { SpriteNames } from 'modules/GameEngine/Drawing/Elements/Cache/spriteMap';
import drawSpriteWithStartAndEnd from 'modules/GameEngine/Drawing/Elements/spriteWithStartAndEnd';
const getSpriteName = (playerNumber: 0 | 1 | 2 | 3, isHit: boolean, isPerfect: boolean, is... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/spriteWithStartAndEnd.ts | src/modules/GameEngine/Drawing/Elements/spriteWithStartAndEnd.ts | import { drawSprite, getSprite } from 'modules/GameEngine/Drawing/Elements/Cache/cachedSprites';
import { SpriteNames } from 'modules/GameEngine/Drawing/Elements/Cache/spriteMap';
export default function drawSpriteWithStartAndEnd(
ctx: CanvasRenderingContext2D,
spriteName: SpriteNames,
x: number,
y: number,
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/utils/getNoteColor.ts | src/modules/GameEngine/Drawing/Elements/utils/getNoteColor.ts | import { PlayerNote } from 'interfaces';
import styles from '../../styles';
export function getColor(
_ctx: CanvasRenderingContext2D,
playerNumber: 0 | 1 | 2 | 3,
isStar: boolean,
isHit: boolean,
isPerfect: boolean,
) {
if (isPerfect && isStar) {
return styles.colors.players[playerNumber].starPerfect;
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/Cache/cachedSprites.spec.tsx | src/modules/GameEngine/Drawing/Elements/Cache/cachedSprites.spec.tsx | import { expect, test } from '@playwright/experimental-ct-react';
import { TestCanvas } from '../../../../utils/TestCanvas';
test.use({ viewport: { width: 57, height: 872 } });
test('Should draw a proper sprite map', async ({ mount, page }) => {
const component = await mount(<TestCanvas width={1} height={1} />);
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/Cache/spriteMap.ts | src/modules/GameEngine/Drawing/Elements/Cache/spriteMap.ts | import { BIG_NOTE_HEIGHT, NOTE_HEIGHT } from 'modules/GameEngine/Drawing/calculateData';
import drawRawNote from 'modules/GameEngine/Drawing/Elements/Cache/Elements/note';
import drawRawPlayerNote from 'modules/GameEngine/Drawing/Elements/Cache/Elements/playerNote';
const SHADOW_PAD = 10;
export const smallNoteFragme... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/Cache/cachedSprites.ts | src/modules/GameEngine/Drawing/Elements/Cache/cachedSprites.ts | import spriteMap, { smallNoteFragments, SpriteNames } from 'modules/GameEngine/Drawing/Elements/Cache/spriteMap';
import createCanvas from 'modules/GameEngine/Drawing/Elements/Cache/utils/createCanvas';
import events from 'modules/GameEvents/GameEvents';
const maxWidth = Math.max(...Object.values(spriteMap).map((sprit... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/Cache/Elements/note.ts | src/modules/GameEngine/Drawing/Elements/Cache/Elements/note.ts | import { Note } from 'interfaces';
import roundRect from 'modules/GameEngine/Drawing/Elements/roundRect';
import applyColor from 'modules/GameEngine/Drawing/applyColor';
import styles from 'modules/GameEngine/Drawing/styles';
export default function drawRawNote(
ctx: CanvasRenderingContext2D,
x: number,
y: numbe... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/Cache/Elements/playerNote.ts | src/modules/GameEngine/Drawing/Elements/Cache/Elements/playerNote.ts | import applyColor from 'modules/GameEngine/Drawing/applyColor';
import roundRect from 'modules/GameEngine/Drawing/Elements/roundRect';
import * as test from 'modules/GameEngine/Drawing/Elements/utils/getNoteColor';
export default function drawRawPlayerNote(
ctx: CanvasRenderingContext2D,
x: number,
y: number,
... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Elements/Cache/utils/createCanvas.ts | src/modules/GameEngine/Drawing/Elements/Cache/utils/createCanvas.ts | export default function createCanvas(w: number, h: number) {
const canvas = document.createElement('canvas');
canvas.width = w;
canvas.height = h;
return canvas;
}
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Shaders/Shaders.ts | src/modules/GameEngine/Drawing/Shaders/Shaders.ts | import { Curtains, Plane, PlaneParams } from 'curtainsjs';
import GameState from 'modules/GameEngine/GameState/GameState';
export class Shaders {
private curtains: Curtains;
private plane: Plane | null = null;
public constructor(private canvas: HTMLCanvasElement) {
this.curtains = new Curtains({
pixelR... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/Triangle.ts | src/modules/GameEngine/Drawing/Particles/Triangle.ts | import debris from 'modules/GameEngine/Drawing/Elements/debris';
import spreadValue, { randomSign } from 'modules/GameEngine/Drawing/Particles/utils';
import Particle from '../interfaces';
const baseTtl = (50 / 60) * 1000;
const ttlSpread = (25 / 60) * 1000;
const initialWidth = 100;
const velocityModifier = 0.3;
e... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/GoldTriangle.ts | src/modules/GameEngine/Drawing/Particles/GoldTriangle.ts | import debris from 'modules/GameEngine/Drawing/Elements/debris';
import spreadValue from 'modules/GameEngine/Drawing/Particles/utils';
import Particle from '../interfaces';
const baseTtlMs = 700;
const ttlSpreadMs = 100;
const velocityModifier = 0.2;
export default class GoldTriangle implements Particle {
public f... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/GoldNote.ts | src/modules/GameEngine/Drawing/Particles/GoldNote.ts | import GoldTriangle from 'modules/GameEngine/Drawing/Particles/GoldTriangle';
import { randomInt } from 'modules/utils/randomValue';
import tinycolor from 'tinycolor2';
import ParticleManager from '../ParticleManager';
import Particle from '../interfaces';
import styles from '../styles';
export default class GoldNoteP... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/utils.ts | src/modules/GameEngine/Drawing/Particles/utils.ts | const spreadValue = (initial: number, spread: number) => initial - spread + Math.random() * spread * 2;
export default spreadValue;
export const randomSign = (weight = 0) => Math.sign(weight + Math.random() - 0.5);
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/FadeoutNote.ts | src/modules/GameEngine/Drawing/Particles/FadeoutNote.ts | import { Note } from 'interfaces';
import drawNote from '../Elements/note';
import Particle from '../interfaces';
const initialTtl = 400;
export default class FadeoutNote implements Particle {
public finished = false;
public ttl = initialTtl;
constructor(
private x: number,
private y: number,
priva... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/Ray.ts | src/modules/GameEngine/Drawing/Particles/Ray.ts | import ray from 'modules/GameEngine/Drawing/Elements/ray';
import Particle from '../interfaces';
const initialTtl = (50 / 60) * 1000;
const velocity = 0.05;
const WIDTH = 200;
const WIDTH_SPREAD = 4;
const pow = Math.pow;
function easeOutQuart(x: number): number {
return 1 - pow(1 - x, 2);
}
function interpolateC... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/SungTriangle.ts | src/modules/GameEngine/Drawing/Particles/SungTriangle.ts | import debris from 'modules/GameEngine/Drawing/Elements/debris';
import spreadValue from 'modules/GameEngine/Drawing/Particles/utils';
import Particle from '../interfaces';
const baseTtlMs = 300;
const ttlSpreadMs = 50;
const velocityModifier = 1.3;
export default class SungTriangle implements Particle {
public fi... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/Vibrato.ts | src/modules/GameEngine/Drawing/Particles/Vibrato.ts | import Particle from '../interfaces';
const INTERVAL_PX = 20;
export default class VibratoParticle implements Particle {
public finished = false;
public ttl = (2 / 60) * 1000;
constructor(
private x: number,
private y: number,
private w: number,
private h: number,
private seed: number,
) ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/GameEngine/Drawing/Particles/ExplodingNote.ts | src/modules/GameEngine/Drawing/Particles/ExplodingNote.ts | import { Note } from 'interfaces';
import tinycolor from 'tinycolor2';
import ParticleManager from '../ParticleManager';
import Particle from '../interfaces';
import styles from '../styles';
import TriangleParticle from './Triangle';
export default class ExplodingNoteParticle implements Particle {
public finished = ... | typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Asvarox/allkaraoke | https://github.com/Asvarox/allkaraoke/blob/2143688edab9de7166d87a6c703a394abc450293/src/modules/Camera/eventListeners.ts | src/modules/Camera/eventListeners.ts | import CameraManager from 'modules/Camera/CameraManager';
import events from 'modules/GameEvents/GameEvents';
events.songStarted.subscribe(() => {
CameraManager.clearData();
CameraManager.startRecord();
});
events.songEnded.subscribe(() => {
CameraManager.stopRecord();
});
| typescript | MIT | 2143688edab9de7166d87a6c703a394abc450293 | 2026-01-05T04:35:37.445262Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.