CapsuleShape型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A thick segment, from (ax, ay) to (bx, by) with a radius, placed in the body's own frame.
インポート
import type { CapsuleShape } from "@johnmorrisdotca/karakuri/physics";
定義
interface CapsuleShape {
kind: "capsule";
ax: number;
ay: number;
bx: number;
by: number;
r: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kind | "capsule" | |
ax | number | |
ay | number | |
bx | number | |
by | number | |
r | number |
例
import type { CapsuleShape } from "@johnmorrisdotca/karakuri/physics";
const value: CapsuleShape = {kind:"capsule",ax:0,ay:0,bx:10,by:0,r:2};
console.log(value);{ kind: 'capsule', ax: 0, ay: 0, bx: 10, by: 0, r: 2 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。