Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
slmjkdbtl committed Nov 15, 2023
1 parent 543c373 commit fef5ad9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4249,7 +4249,17 @@ export interface Collision {

export interface AreaCompOpt {
/**
* The shape of the area.
* The shape of the area (currently only Rect and Polygon is supported).
*
* @example
* ```js
* add([
* sprite("butterfly"),
* pos(100, 200),
* // a triangle shape!
* area({ shape: new Polygon([vec2(0), vec2(100), vec2(-100, 100)]) }),
* ])
* ```
*/
shape?: Shape,
/**
Expand Down

0 comments on commit fef5ad9

Please sign in to comment.