リファレンス · 自分の three.js シーンに置く天体
PaintContext型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the caller gives the painter when it makes a body.
インポート
import type { PaintContext } from "@johnmorrisdotca/wakusei-planets/painter";
定義
interface PaintContext {
look?: string;
invalidate?(): void;
ratio?: number;
maxTexture?: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
look (省略可) | string | undefined |
|
invalidate (省略可) | (() => void) | undefined | Ask for a new draw: a sharper picture has arrived. |
ratio (省略可) | number | undefined | Device pixels to a CSS pixel; default 1. |
maxTexture (省略可) | number | undefined | The widest picture the GPU should be given, in pixels; default 2048. |
例
import type { PaintContext } from "@johnmorrisdotca/wakusei-planets/painter";
const context: PaintContext = { look: "painted", invalidate: () => undefined, ratio: 2 };
console.log(context.look);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。