Reference · Deterministic 2D physics
CircleShapetype
A disc, placed in the body's own frame (its origin is the body's centre of mass for a dynamic body).
Import it
import type { CircleShape } from "@johnmorrisdotca/karakuri/physics";
Definition
interface CircleShape {
kind: "circle";
x: number;
y: number;
r: number;
}
Members
| Name | Type | Description |
|---|---|---|
kind | "circle" | |
x | number | |
y | number | |
r | number |
Examples
import type { CircleShape } from "@johnmorrisdotca/karakuri/physics";
const value: CircleShape = {kind:"circle",x:0,y:0,r:3};
console.log(value);{ kind: 'circle', x: 0, y: 0, r: 3 }What it prints (run when this page was built)