RoundPlace型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Text wrapped on a hull of revolution round the spine (the Y axis, or the line through axis): y is the height of the middle of the capitals and az the azimuth of the anchor, in radians round Y from +Z
towards +X, as everywhere else in the kit. radius is the hull's radius, one number or a function of the height for a cone. run is the way the text reads: around the hull, left to right seen from outside
(the default); up the spine, towards the bow, for lettering along a ship's length; or down.
インポート
import type { RoundPlace } from "@johnmorrisdotca/uchusen-rockets";
定義
interface RoundPlace extends PlaceBase {
radius: number | ((y: number) => number);
y: number;
az: number;
run?: "around" | "up" | "down";
axis?: readonly [
number,
number
];
sides?: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
radius | number | ((y: number) => number) | |
y | number | |
az | number | |
run (省略可) | "around" | "up" | "down" | undefined | |
axis (省略可) | readonly [number, number] | undefined | The x, z of the spine, when it is not the Y axis. |
sides (省略可) | number | undefined | How many sides the hull's own mesh has (the kit's drums have 56), so the lettering clears the flats between them. |
height | number | The height of a capital letter, in metres. |
align (省略可) | "start" | "middle" | "end" | undefined | Which end of the text is on the anchor: |
例
import type { RoundPlace } from "@johnmorrisdotca/uchusen-rockets";
const hull: RoundPlace = { radius: 6.7, y: 12, az: 0, height: 1.2, align: "middle", run: "around" };
console.log(hull.radius);6.7出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。