Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/changhuixu/canvas-animation-demos
/ functions
Functions
27 in github.com/changhuixu/canvas-animation-demos
⨍
Functions
27
◇
Types & classes
20
↓ 2 callers
Method
animate
()
src/examples/candy-text.ts:105
↓ 2 callers
Method
drawBackground
()
src/examples/candy-text.ts:99
↓ 1 callers
Method
animate
()
src/examples/constellation.ts:77
↓ 1 callers
Method
bounce
* 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 callers
Method
calculateMouseRelativePositionInCanvas
(e: MouseEvent)
src/examples/candy-text.ts:123
↓ 1 callers
Method
draw
()
src/examples/clock.ts:9
↓ 1 callers
Method
draw
(ctx: CanvasRenderingContext2D)
src/examples/candy-text.ts:11
↓ 1 callers
Method
draw
(word: string = 'Candy')
src/examples/candy-text.ts:73
↓ 1 callers
Method
draw
()
src/examples/solar-system.ts:24
↓ 1 callers
Method
draw
* 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 callers
Method
draw
* Draw step of the animation
src/examples/bouncing-ball.ts:92
↓ 1 callers
Method
drawStars
(n: number)
src/examples/constellation.ts:65
↓ 1 callers
Method
flyAwayWhenMouseOver
(mousePosition: Position)
src/examples/candy-text.ts:23
↓ 1 callers
Method
isInCanvas
(canvasWidth: number, canvasHeight: number)
src/examples/candy-text.ts:33
↓ 1 callers
Function
main
()
src/main.ts:7
↓ 1 callers
Method
move
(canvasWidth: number, canvasHeight: number)
src/examples/constellation.ts:21
↓ 1 callers
Method
randomize
(canvasWidth: number, canvasHeight: number)
src/examples/constellation.ts:14
Method
constructor
(canvas: HTMLCanvasElement)
src/examples/clock.ts:4
Method
constructor
(public x: number, public y: number, public readonly radius = 4)
src/examples/candy-text.ts:7
Method
constructor
(public x: number, public y: number)
src/examples/candy-text.ts:44
Method
constructor
(private readonly canvas: HTMLCanvasElement)
src/examples/candy-text.ts:57
Method
constructor
(canvas: HTMLCanvasElement)
src/examples/solar-system.ts:14
Method
constructor
(config: Config)
src/examples/constellation.ts:8
Method
constructor
( public starVelocity: number = 0.1, public starRadius: number = 1, public starColor: string = 'rg
src/examples/constellation.ts:36
Method
constructor
( private readonly canvas: HTMLCanvasElement, private readonly config: Config = new Config() )
src/examples/constellation.ts:57
Method
constructor
* 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
Method
constructor
* 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