Big Updated, added some tests, added comments for all functions, I forgot the rest
This commit is contained in:
parent
d77271e4b7
commit
90a1059cc8
59 changed files with 1816 additions and 203 deletions
|
|
@ -9,6 +9,11 @@ type ScreenProps = {
|
|||
fullscreen?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Executes Screen.
|
||||
* @param props Parameter props.
|
||||
* @returns unknown.
|
||||
*/
|
||||
export default function Screen(props: ScreenProps) {
|
||||
const [displayProgress, setDisplayProgress] = React.useState(0);
|
||||
const displayProgressRef = React.useRef(0);
|
||||
|
|
@ -30,6 +35,11 @@ export default function Screen(props: ScreenProps) {
|
|||
const startTime = performance.now();
|
||||
let frameId = 0;
|
||||
|
||||
/**
|
||||
* Executes animate.
|
||||
* @param now Parameter now.
|
||||
* @returns unknown.
|
||||
*/
|
||||
function animate(now: number) {
|
||||
const elapsed = now - startTime;
|
||||
const t = Math.min(elapsed / duration, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue