MCPcopy Create free account

hub / github.com/changhuixu/canvas-animation-demos / functions

Functions27 in github.com/changhuixu/canvas-animation-demos

↓ 2 callersMethodanimate
()
src/examples/candy-text.ts:105
↓ 2 callersMethoddrawBackground
()
src/examples/candy-text.ts:99
↓ 1 callersMethodanimate
()
src/examples/constellation.ts:77
↓ 1 callersMethodbounce
* Recalculates the trajectory of the ball when it bounces. * * @param canvasWidth width of the HTML Canvas * @param canvasHeight height of t
src/examples/bouncing-ball.ts:49
↓ 1 callersMethodcalculateMouseRelativePositionInCanvas
(e: MouseEvent)
src/examples/candy-text.ts:123
↓ 1 callersMethoddraw
()
src/examples/clock.ts:9
↓ 1 callersMethoddraw
(ctx: CanvasRenderingContext2D)
src/examples/candy-text.ts:11
↓ 1 callersMethoddraw
(word: string = 'Candy')
src/examples/candy-text.ts:73
↓ 1 callersMethoddraw
()
src/examples/solar-system.ts:24
↓ 1 callersMethoddraw
* Draws, colors, and fills a ball using the parameters given in the constructor * @param ctx the HTML Canvas's 2D rendering context
src/examples/bouncing-ball.ts:24
↓ 1 callersMethoddraw
* Draw step of the animation
src/examples/bouncing-ball.ts:92
↓ 1 callersMethoddrawStars
(n: number)
src/examples/constellation.ts:65
↓ 1 callersMethodflyAwayWhenMouseOver
(mousePosition: Position)
src/examples/candy-text.ts:23
↓ 1 callersMethodisInCanvas
(canvasWidth: number, canvasHeight: number)
src/examples/candy-text.ts:33
↓ 1 callersFunctionmain
()
src/main.ts:7
↓ 1 callersMethodmove
(canvasWidth: number, canvasHeight: number)
src/examples/constellation.ts:21
↓ 1 callersMethodrandomize
(canvasWidth: number, canvasHeight: number)
src/examples/constellation.ts:14
Methodconstructor
(canvas: HTMLCanvasElement)
src/examples/clock.ts:4
Methodconstructor
(public x: number, public y: number, public readonly radius = 4)
src/examples/candy-text.ts:7
Methodconstructor
(public x: number, public y: number)
src/examples/candy-text.ts:44
Methodconstructor
(private readonly canvas: HTMLCanvasElement)
src/examples/candy-text.ts:57
Methodconstructor
(canvas: HTMLCanvasElement)
src/examples/solar-system.ts:14
Methodconstructor
(config: Config)
src/examples/constellation.ts:8
Methodconstructor
( public starVelocity: number = 0.1, public starRadius: number = 1, public starColor: string = 'rg
src/examples/constellation.ts:36
Methodconstructor
( private readonly canvas: HTMLCanvasElement, private readonly config: Config = new Config() )
src/examples/constellation.ts:57
Methodconstructor
* Creates a new Ball object * @param x the initial x position of the ball (relative to the top left corner of the Canvas). Default 100 * @param
src/examples/bouncing-ball.ts:11
Methodconstructor
* Creates a new animation and sets properties of the animation * @param canvas the HTML Canvas on which to draw
src/examples/bouncing-ball.ts:82