diff --git a/README.md b/README.md index 9b76abe..4250e77 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@
-241 pieces for React, Next.js, Astro or plain HTML.
+242 pieces for React, Next.js, Astro or plain HTML.
The banner above is drawn by ascii.rest: [make your own](https://ascii.rest/banner/). [ascii.rest](https://ascii.rest) · [docs](https://ascii.rest/docs/) · [install](#install) · [make your own](#make-your-own) · [pieces](#pieces) · [contributing](CONTRIBUTING.md) @@ -38,7 +38,7 @@ The banner above is drawn by ascii.rest: [make your own](https://ascii.rest/bann
-Written in TypeScript by [@bas3line](https://github.com/bas3line). 241 pieces, from full-colour scenes to loaders, charts, language logos, Linux distros, spinning shapes and physics. The donut above turns on a page with one tag: ``. See them all at [ascii.rest](https://ascii.rest). +Written in TypeScript by [@bas3line](https://github.com/bas3line). 242 pieces, from full-colour scenes to loaders, charts, language logos, Linux distros, spinning shapes and physics. The donut above turns on a page with one tag: ``. See them all at [ascii.rest](https://ascii.rest).

night coast @@ -345,7 +345,7 @@ pre.art { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberatio | physics | [bouncing balls](https://ascii.rest/bouncing-balls/), [chladni plate](https://ascii.rest/chladni/), [double pendulum](https://ascii.rest/double-pendulum/), [falling sand](https://ascii.rest/falling-sand/), [flag](https://ascii.rest/flag/), [fountain](https://ascii.rest/fountain/), [harmonograph](https://ascii.rest/harmonograph/), [lorenz attractor](https://ascii.rest/lorenz/), [newton's cradle](https://ascii.rest/newtons-cradle/), [pendulum wave](https://ascii.rest/pendulum-wave/), [plucked string](https://ascii.rest/plucked-string/), [pond ripples](https://ascii.rest/pond-ripples/), [smoke](https://ascii.rest/smoke/), [wave interference](https://ascii.rest/wave-interference/) | | nature | [aurora](https://ascii.rest/aurora/), [bonsai](https://ascii.rest/bonsai/), [campfire](https://ascii.rest/campfire/), [cherry blossom](https://ascii.rest/cherry-blossom/), [contour map](https://ascii.rest/contour-map/), [fern](https://ascii.rest/fern/), [fireflies](https://ascii.rest/fireflies/), [fractal tree](https://ascii.rest/fractal-tree/), [landscape](https://ascii.rest/landscape/), [lightning](https://ascii.rest/lightning/), [rain](https://ascii.rest/rain/), [ruled mountains](https://ascii.rest/ruled-mountains/), [sea swell](https://ascii.rest/sea-swell/), [snowfall](https://ascii.rest/snowfall/), [sunrise](https://ascii.rest/sunrise/), [wind](https://ascii.rest/wind/) | | creatures | [aquarium](https://ascii.rest/aquarium/), [butterfly](https://ascii.rest/butterfly/), [cat](https://ascii.rest/cat/), [fox](https://ascii.rest/fox/), [jellyfish](https://ascii.rest/jellyfish/), [owl](https://ascii.rest/owl/), [snake](https://ascii.rest/snake/), [spider](https://ascii.rest/spider/), [starlings](https://ascii.rest/starlings/), [whale](https://ascii.rest/whale/) | -| objects | [analog clock](https://ascii.rest/analog-clock/), [candle](https://ascii.rest/candle/), [coffee](https://ascii.rest/coffee/), [ferris wheel](https://ascii.rest/ferris-wheel/), [hawa mahal](https://ascii.rest/hawa-mahal/), [hourglass](https://ascii.rest/hourglass/), [kite](https://ascii.rest/kite/), [lava lamp](https://ascii.rest/lava-lamp/), [lighthouse](https://ascii.rest/lighthouse/), [skyline](https://ascii.rest/skyline/), [sundial](https://ascii.rest/sundial/), [train](https://ascii.rest/train/), [vinyl](https://ascii.rest/vinyl/), [windmill](https://ascii.rest/windmill/) | +| objects | [analog clock](https://ascii.rest/analog-clock/), [basketball](https://ascii.rest/basketball/), [candle](https://ascii.rest/candle/), [coffee](https://ascii.rest/coffee/), [ferris wheel](https://ascii.rest/ferris-wheel/), [hawa mahal](https://ascii.rest/hawa-mahal/), [hourglass](https://ascii.rest/hourglass/), [kite](https://ascii.rest/kite/), [lava lamp](https://ascii.rest/lava-lamp/), [lighthouse](https://ascii.rest/lighthouse/), [skyline](https://ascii.rest/skyline/), [sundial](https://ascii.rest/sundial/), [train](https://ascii.rest/train/), [vinyl](https://ascii.rest/vinyl/), [windmill](https://ascii.rest/windmill/) | | generative | [epicycles](https://ascii.rest/epicycles/), [flow field](https://ascii.rest/flow-field/), [glider gun](https://ascii.rest/glider-gun/), [hilbert curve](https://ascii.rest/hilbert-curve/), [julia set](https://ascii.rest/julia-set/), [langton's ant](https://ascii.rest/langtons-ant/), [mandelbrot](https://ascii.rest/mandelbrot/), [maze](https://ascii.rest/maze/), [plasma](https://ascii.rest/plasma/), [reaction diffusion](https://ascii.rest/reaction-diffusion/), [rule 30](https://ascii.rest/rule-30/), [sierpinski](https://ascii.rest/sierpinski/), [voronoi](https://ascii.rest/voronoi/) | | effects | [doom fire](https://ascii.rest/doom-fire/), [fireworks](https://ascii.rest/fireworks/), [matrix rain](https://ascii.rest/matrix-rain/), [rotozoomer](https://ascii.rest/rotozoomer/), [sparks](https://ascii.rest/sparks/), [synthwave](https://ascii.rest/synthwave/), [tunnel](https://ascii.rest/tunnel/), [tv static](https://ascii.rest/tv-static/) | diff --git a/skills/ascii-rest/SKILL.md b/skills/ascii-rest/SKILL.md index 55204f2..11cab3a 100644 --- a/skills/ascii-rest/SKILL.md +++ b/skills/ascii-rest/SKILL.md @@ -1,13 +1,13 @@ --- name: ascii-rest -description: Add animated ascii art with ascii.rest to web pages, GitHub READMEs and terminals. 241 ready pieces (scenes, spinners, charts, language, company and Linux distro logos, 3D shapes, weather, creatures), text in big block-letter banners, any image or logo turned to ascii, and a kit for making new ones. Use when the user wants ascii art, a retro or terminal look, a text animation or loader, an animated README banner or logo, a CLI splash screen, or names ascii.rest, in React, Next.js, Astro, Vue, Svelte, plain HTML, a README or a terminal. +description: Add animated ascii art with ascii.rest to web pages, GitHub READMEs and terminals. 242 ready pieces (scenes, spinners, charts, language, company and Linux distro logos, 3D shapes, weather, creatures), text in big block-letter banners, any image or logo turned to ascii, and a kit for making new ones. Use when the user wants ascii art, a retro or terminal look, a text animation or loader, an animated README banner or logo, a CLI splash screen, or names ascii.rest, in React, Next.js, Astro, Vue, Svelte, plain HTML, a README or a terminal. --- # ascii.rest -ascii.rest is an npm package, `ascii.rest`, with no dependencies: 241 animated pieces of ascii art, each one a small TypeScript module, plus banners (any text in block letters) and a kit to make more. Every piece plays only while it is on screen and holds one still frame for readers who prefer reduced motion, so it needs no extra code for either. +ascii.rest is an npm package, `ascii.rest`, with no dependencies: 242 animated pieces of ascii art, each one a small TypeScript module, plus banners (any text in block letters) and a kit to make more. Every piece plays only while it is on screen and holds one still frame for readers who prefer reduced motion, so it needs no extra code for either. ## Work in this order diff --git a/skills/ascii-rest/references/pieces.md b/skills/ascii-rest/references/pieces.md index 04f9b7b..a24047b 100644 --- a/skills/ascii-rest/references/pieces.md +++ b/skills/ascii-rest/references/pieces.md @@ -1,7 +1,7 @@ # Every piece -241 pieces. The name is what ``, ``, and `npx ascii.rest …` take; the export is what `import { … } from "ascii.rest/pieces"` gives. A **canvas** piece has colours of its own and draws on a ``: size it with `width`. A **text** piece draws in a `

` in the page's colour: size it with `font-size`. Options are the piece's own, with their defaults; pass them as `options`. Each piece plays at https://ascii.rest//. Only logos, companies and distros have hosted README SVGs, at https://ascii.rest/svg/.svg and .dark.svg; any other piece needs `svg()` from `ascii.rest/svg` and a committed file.
+242 pieces. The name is what ``, ``, and `npx ascii.rest …` take; the export is what `import { … } from "ascii.rest/pieces"` gives. A **canvas** piece has colours of its own and draws on a ``: size it with `width`. A **text** piece draws in a `
` in the page's colour: size it with `font-size`. Options are the piece's own, with their defaults; pass them as `options`. Each piece plays at https://ascii.rest//. Only logos, companies and distros have hosted README SVGs, at https://ascii.rest/svg/.svg and .dark.svg; any other piece needs `svg()` from `ascii.rest/svg` and a committed file.
 
 ## scenes (34)
 
@@ -269,11 +269,12 @@
 | `starlings` | `starlings` | text | 64×16 | 30 | a murmuration wheeling about, split by a passing falcon |  |
 | `whale` | `whale` | text | 72×18 | 15 | a whale blows, arches its back and dives, fluke last |  |
 
-## objects (14)
+## objects (15)
 
 | name | export | draws | size | fps | what you see | options |
 | --- | --- | --- | --- | --- | --- | --- |
 | `analog-clock` | `analogClock` | text | 47×23 | 8 | a round clock face showing the local time, seconds ticking | `{"numerals":true,"seconds":true}` |
+| `basketball` | `basketball` | text | 64×32 | 30 | a basketball spinning and bouncing lower with each landing | `{"radius":11.5,"gravity":47,"launchSpeed":23,"restitution":0.74,"restSeconds":0.65,"maxSpread":0.055,"maxSquash":0.08,"ramp":" .:-=+*#%@"}` |
 | `candle` | `candle` | text | 40×30 | 15 | a flickering candle burning down in its holder, then renewed |  |
 | `coffee` | `coffee` | text | 52×24 | 20 | steam curling up from a cup of coffee on its saucer |  |
 | `ferris-wheel` | `ferrisWheel` | text | 64×26 | 10 | a wheel turning on its a-frame, cabins hanging upright |  |
diff --git a/src/basketball.test.ts b/src/basketball.test.ts
new file mode 100644
index 0000000..115c30f
--- /dev/null
+++ b/src/basketball.test.ts
@@ -0,0 +1,23 @@
+import assert from "node:assert/strict";
+import { test } from "node:test";
+import * as basketball from "./pieces/basketball.ts";
+import { loopOf, svg } from "./svg.ts";
+
+test("basketball SVG uses the effective loop without changing configured defaults", () => {
+  const { createBasketball } = basketball;
+  const piece = createBasketball({ gravity: 60, restSeconds: 1 });
+  const overrides = { restSeconds: 5 };
+  const original = piece.meta.loop;
+  const expected = createBasketball({ gravity: 60, ...overrides }).meta.loop;
+
+  assert.equal(loopOf(piece, overrides).every, expected);
+  assert(svg(piece, { options: overrides, fps: 2 }).includes(`animation:${expected}s `));
+  assert(svg(piece, { options: overrides, seconds: 2, fps: 2 }).includes("animation:2s "));
+  assert.equal(loopOf(piece).every, original);
+  assert.equal(piece.meta.options?.restSeconds, 1);
+  assert.equal(loopOf(basketball, overrides).every, createBasketball(overrides).meta.loop);
+  assert.throws(
+    () => svg(piece, { options: { gravity: 1, launchSpeed: 60, restitution: 0.95 } }),
+    /at most 30 seconds/,
+  );
+});
diff --git a/src/library.ts b/src/library.ts
index d94e00b..0e1aeee 100644
--- a/src/library.ts
+++ b/src/library.ts
@@ -18,6 +18,7 @@ export const load = {
   "aurora-fjord": () => import("./pieces/aurora-fjord.ts"),
   "autumn": () => import("./pieces/autumn.ts"),
   "bar-chart": () => import("./pieces/bar-chart.ts"),
+  "basketball": () => import("./pieces/basketball.ts"),
   "big-text": () => import("./pieces/big-text.ts"),
   "black-hole": () => import("./pieces/black-hole.ts"),
   "black-prism": () => import("./pieces/black-prism.ts"),
diff --git a/src/pieces/basketball.ts b/src/pieces/basketball.ts
new file mode 100644
index 0000000..35b698b
--- /dev/null
+++ b/src/pieces/basketball.ts
@@ -0,0 +1,187 @@
+/*
+ * basketball: a spinning ball that bounces lower each time and squashes
+ * against the floor, with seams drawn on the rotating surface.
+ */
+import type { Frame, Meta, Piece } from "../types.ts";
+
+/** The bounces and final rest must fit within a 30-second loop. */
+export interface BasketballOptions {
+  [key: string]: unknown;
+  /** Uncompressed radius in character rows (1 to 15), fitted to the frame. */
+  radius: number;
+  /** Downward acceleration in rows per second squared (1 to 300). */
+  gravity: number;
+  /** First takeoff speed in rows per second (1 to 60). */
+  launchSpeed: number;
+  /** Fraction of takeoff speed retained for the next bounce (0 to 0.95). */
+  restitution: number;
+  /** Seconds on the floor after the final bounce (0 to 10). */
+  restSeconds: number;
+  /** Maximum horizontal expansion as a fraction of the radius (0 to 1). */
+  maxSpread: number;
+  /** Maximum vertical compression as a fraction of the radius (0 to 0.9). */
+  maxSquash: number;
+  /** Shading glyphs from lightest to densest, starting with a space. */
+  ramp: string;
+}
+
+const DEFAULTS = {
+  radius: 11.5,
+  gravity: 47,
+  launchSpeed: 23,
+  restitution: 0.74,
+  restSeconds: 0.65,
+  maxSpread: 0.055,
+  maxSquash: 0.08,
+  ramp: " .:-=+*#%@",
+} satisfies BasketballOptions;
+
+const MAX_LOOP_SECONDS = 30;
+const TAU = 2 * Math.PI;
+const SAMPLE_X = [-0.125, 0.125];
+const SAMPLE_Y = [-0.25, 0.25];
+// Fixed seam orientation: screen-plane tilt and pitch, in radians.
+const TILT_COS = Math.cos(0.35), TILT_SIN = Math.sin(0.35);
+const PITCH_COS = Math.cos(0.245), PITCH_SIN = Math.sin(0.245);
+
+function bounceSchedule({ gravity, launchSpeed, restitution, restSeconds }: BasketballOptions) {
+  const bounces: { start: number; land: number; end: number; speed: number }[] = [];
+  let end = 0;
+  let speed = launchSpeed;
+  // The first bounce always runs; later bounces stop below 4 rows per second.
+  do {
+    const start = end;
+    const land = start + (2 * speed) / gravity;
+    // Ground contact lasts 0.10 to 0.18 seconds, depending on impact speed.
+    end = land + 0.1 + 0.08 * (speed / launchSpeed);
+    bounces.push({ start, land, end, speed });
+    speed *= restitution;
+  } while (speed >= 4);
+  const loop = end + restSeconds;
+  // SVG export samples the whole loop before checking its byte budget.
+  if (loop > MAX_LOOP_SECONDS) {
+    throw new RangeError(`basketball: the bounce and rest loop must be at most ${MAX_LOOP_SECONDS} seconds`);
+  }
+  return { bounces, loop };
+}
+
+export const meta = {
+  name: "basketball",
+  category: "objects",
+  note: "a basketball spinning and bouncing lower with each landing",
+  cols: 64,
+  rows: 32,
+  fps: 30,
+  loop: bounceSchedule(DEFAULTS).loop,
+  options: DEFAULTS,
+} satisfies Meta;
+
+function bounded(value: unknown, fallback: number, min: number, max: number): number {
+  return typeof value === "number" && Number.isFinite(value)
+    ? Math.min(max, Math.max(min, value))
+    : fallback;
+}
+
+function settings(options: Partial, defaults = DEFAULTS): BasketballOptions {
+  const ramp = options.ramp;
+  const validRamp = typeof ramp === "string" && ramp.startsWith(" ") && ramp.trimEnd().length > 0
+    && !/[^\x20-\x7e·°\u2500-\u259f]/u.test(ramp);
+  return {
+    radius: bounded(options.radius, defaults.radius, 1, meta.rows / 2 - 1),
+    gravity: bounded(options.gravity, defaults.gravity, 1, 300),
+    launchSpeed: bounded(options.launchSpeed, defaults.launchSpeed, 1, 60),
+    restitution: bounded(options.restitution, defaults.restitution, 0, 0.95),
+    restSeconds: bounded(options.restSeconds, defaults.restSeconds, 0, 10),
+    maxSpread: bounded(options.maxSpread, defaults.maxSpread, 0, 1),
+    maxSquash: bounded(options.maxSquash, defaults.maxSquash, 0, 0.9),
+    ramp: validRamp ? ramp : defaults.ramp,
+  };
+}
+
+export default function basketball(options: Partial = {}): Frame {
+  return drawBasketball(settings(options));
+}
+
+/** Compute the same loop that the renderer uses for these options. */
+export function loopDuration(options: Partial = {}): number {
+  return bounceSchedule(settings(options)).loop;
+}
+
+/** Configure a piece with its own defaults for playback and SVG export. */
+export function createBasketball(options: Partial = {}): Piece {
+  const config = settings(options);
+  return {
+    meta: { ...meta, loop: bounceSchedule(config).loop, options: config },
+    loopDuration: (overrides = {}) => bounceSchedule(settings(overrides, config)).loop,
+    default: (overrides = {}) => drawBasketball(settings(overrides, config)),
+  };
+}
+
+function drawBasketball(config: BasketballOptions): Frame {
+  const { bounces, loop } = bounceSchedule(config);
+  const { cols, rows } = meta;
+  const { gravity, launchSpeed, maxSpread, maxSquash, ramp } = config;
+  const floor = rows - 1;
+  // Reserve room for the first jump and the widest landing. Scale the
+  // trajectory uniformly if its peak exceeds the available vertical space.
+  const radius = Math.min(config.radius, cols / (4 * (1 + maxSpread)));
+  const heightScale = Math.min(1, (floor - 2 * radius) / (launchSpeed ** 2 / (2 * gravity)));
+  const left = Array.from({ length: cols }, (_, c) => (c + 0.5 - cols / 2) / 2);
+  const output = new Array(rows);
+
+  return (t, { paper = false } = {}) => {
+    const elapsed = ((t % loop) + loop) % loop;
+    const bounce = bounces.find(({ end }) => elapsed < end);
+    let height = 0;
+    let squash = 0;
+    if (bounce) {
+      if (elapsed < bounce.land) {
+        const air = elapsed - bounce.start;
+        height = air * (bounce.speed - gravity * air / 2) * heightScale;
+      } else {
+        const contact = (elapsed - bounce.land) / (bounce.end - bounce.land);
+        squash = (bounce.speed / launchSpeed) * Math.sin(Math.PI * contact);
+      }
+    }
+
+    // Keep the bottom of the ellipse on the floor throughout contact.
+    const rx = radius * (1 + maxSpread * squash);
+    const ry = radius * (1 - maxSquash * squash);
+    const cy = floor - height - ry;
+    // Start with a visible seam and complete one turn per motion period.
+    const angle = 0.55 + (TAU * elapsed) / loop;
+    const sin = Math.sin(angle), cos = Math.cos(angle);
+
+    for (let r = 0; r < rows; r++) {
+      let line = "";
+      for (const x of left) {
+        let ink = 0;
+        // Four subcell samples keep the silhouette and narrow seams legible.
+        for (const dy of SAMPLE_Y) {
+          const v = (cy - r - 0.5 - dy) / ry;
+          for (const dx of SAMPLE_X) {
+            const u = (x + dx) / rx;
+            const depth = 1 - u * u - v * v;
+            if (depth <= 0) continue;
+            const w = Math.sqrt(depth);
+
+            // Undo the tilt and spin before measuring distance to the seams.
+            const tiltedX = TILT_COS * u + TILT_SIN * v;
+            const tiltedY = TILT_COS * v - TILT_SIN * u;
+            const seamX = tiltedX * cos - w * sin;
+            const seamY = PITCH_COS * tiltedY - PITCH_SIN * (tiltedX * sin + w * cos);
+            const distance = Math.min(Math.abs(seamX), Math.abs(seamY), Math.abs(Math.abs(seamX) - 0.69));
+            const seam = Math.min(1, Math.max(0, (distance - 0.018) / 0.048));
+            const light = Math.max(0, -0.45 * u + 0.5 * v + 0.74 * w);
+            const tone = 0.24 + 0.72 * light;
+            const surface = tone * (0.36 + 0.64 * seam);
+            ink += paper ? 1.05 - surface : surface;
+          }
+        }
+        line += ramp[Math.round(ink * (ramp.length - 1) / 4)];
+      }
+      output[r] = line;
+    }
+    return output.join("\n");
+  };
+}
diff --git a/src/pieces/index.ts b/src/pieces/index.ts
index a4c307d..2a6a83e 100644
--- a/src/pieces/index.ts
+++ b/src/pieces/index.ts
@@ -16,6 +16,7 @@ export * as aurora from "./aurora.ts";
 export * as auroraFjord from "./aurora-fjord.ts";
 export * as autumn from "./autumn.ts";
 export * as barChart from "./bar-chart.ts";
+export * as basketball from "./basketball.ts";
 export * as bigText from "./big-text.ts";
 export * as blackHole from "./black-hole.ts";
 export * as blackPrism from "./black-prism.ts";
diff --git a/src/svg.ts b/src/svg.ts
index af6cf6b..41ddbd7 100644
--- a/src/svg.ts
+++ b/src/svg.ts
@@ -182,14 +182,17 @@ export function inkOf({ css, body }: Part): string | null {
 const LOOPS: Record = { logos: "shine", companies: "shine", distros: "scan" };
 
 /**
- * The loop a piece's SVG plays: a banner's own motion, its `loop`, a logo's glint or a distro's scan, or 4 seconds; 0 for
- * a still. `once` when it plays once and stays, as a typed banner does.
+ * The loop a piece's SVG plays: a banner's own motion, the piece's option-dependent or fixed loop,
+ * a logo's glint or a distro's scan, or 4 seconds. Still pieces use 0 seconds.
+ * `once` means the animation plays once and holds its last frame.
  */
 export function loopOf(piece: Piece, options: Options = {}): { every: number; from: number; once?: boolean } {
   const { meta } = piece;
   const motion = (piece as Partial).motion;
   if (motion) return { every: motion.seconds, from: motion.from, once: motion.once };
   if (!meta.fps) return { every: 0, from: 0 };
+  const configuredLoop = piece.loopDuration?.({ ...meta.options, ...options });
+  if (configuredLoop !== undefined) return { every: configuredLoop, from: 0 };
   if (meta.loop) return { every: meta.loop, from: 0 };
   const key = LOOPS[meta.category];
   const every = key ? ({ ...meta.options, ...options } as Record)[key] : undefined;
@@ -314,7 +317,7 @@ export function svg(piece: Piece, options: SvgOptions = {}): string {
   // README's SVG isn't left to jump without anyone knowing why.
   const { meta } = piece;
   const key = LOOPS[meta.category];
-  const guessed = meta.fps > 0 && !meta.loop && !(piece as Partial).motion && !(key && typeof { ...meta.options, ...options.options }[key] === "number");
+  const guessed = meta.fps > 0 && !meta.loop && !piece.loopDuration && !(piece as Partial).motion && !(key && typeof { ...meta.options, ...options.options }[key] === "number");
   if (guessed && options.seconds === undefined && !warned.has(meta.name)) {
     warned.add(meta.name);
     console.warn(`ascii.rest: ${meta.name} moves but has no loop, so its SVG plays its first 4 seconds and jumps back: give it one (a recipe's period, row(), column() or grid()'s loop, or repeat()), or svg's seconds`);
diff --git a/src/types.ts b/src/types.ts
index 133e715..58b965c 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -66,6 +66,8 @@ export type Frame = (t: number, env?: Env) => string;
 /** A piece module, as `import * as donut from ".../donut"` gives it. */
 export interface Piece {
   meta: Meta;
+  /** Full loop in seconds when its length depends on the piece options. */
+  loopDuration?(options?: Partial): number;
   // A method, so a piece whose options are { text: string } still counts as a Piece.
   default(options?: Partial): Frame;
 }