Skip to content

Commit

Permalink
Initial implementation of missed notes on screen
Browse files Browse the repository at this point in the history
  • Loading branch information
DJDavid98 committed Jan 16, 2024
1 parent cc797c9 commit 8400bf5
Show file tree
Hide file tree
Showing 14 changed files with 340 additions and 42 deletions.
107 changes: 74 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"@parcel/transformer-sass": "^2.8.3",
"@types/intl-unofficial-duration-unit-format": "^3.1.0",
"@types/jest": "^29.4.0",
"@types/matter-js": "^0.19.6",
"@types/obs-studio": "^2.17.0",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/throttle-debounce": "^5.0.2",
"@types/tmi.js": "^1.8.3",
"@types/web-bluetooth": "^0.0.16",
"@typescript-eslint/eslint-plugin": "^6.7.5",
Expand Down Expand Up @@ -57,6 +59,8 @@
},
"private": true,
"dependencies": {
"socket.io-client": "^4.7.2"
"matter-js": "^0.19.0",
"socket.io-client": "^4.7.2",
"throttle-debounce": "^5.0.0"
}
}
16 changes: 13 additions & 3 deletions src/js/beat-saber/BeatSaber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import { useMockData } from '../hooks/use-mock-data';
import { useDisabledData } from '../hooks/use-disabled-data';
import { useSettings } from '../contexts/settings-context';
import { DEFAULT_BEAT_SABER_BASE_FONT_SIZE, SettingName, SettingsPage } from '../model/settings';
import { RemovableElement } from '../RemovableElement';
import { RemovableElementId } from '../model/removable-element-id';

// import { NotePile } from './NotePile';

export const enum BeatSaberDataSource {
BSDP = 'BSDP',
Expand Down Expand Up @@ -72,9 +76,15 @@ export const BeatSaber: FunctionComponent = () => {
const style = useMemo(() => ({ '--beat-saber-base-font-size': `${baseFontSize ?? DEFAULT_BEAT_SABER_BASE_FONT_SIZE}px` }) as CSSProperties, [baseFontSize]);

return (
<div id="beat-saber" style={style} onClick={openBeatSaberSettings}>
<DataDisplay {...dataSource} />
</div>
<>
<div id="beat-saber" style={style} onClick={openBeatSaberSettings}>
<DataDisplay {...dataSource} />
</div>
{enabledSources[BeatSaberDataSource.BSDP] &&
<RemovableElement id={RemovableElementId.BEAT_SABER_NOTE_PILE}>
{/* <NotePile dataSource={dataSource} /> */}
</RemovableElement>}
</>
);
};

Expand Down
2 changes: 2 additions & 0 deletions src/js/beat-saber/DataDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface DataDisplayProps {
mapData?: {
inLevel: boolean;
modifiers?: Modifiers;
leftSaberColor?: string;
rightSaberColor?: string;
} & SongInfoDisplayProps;
liveData?: LiveData;
readyState: ReadyState;
Expand Down
Loading

0 comments on commit 8400bf5

Please sign in to comment.