@margoengine/shader 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +1919 -2
- package/dist/attribute.d.ts +28 -0
- package/dist/black-hole.d.ts +246 -0
- package/dist/black-hole.js +445 -0
- package/dist/clock-BLGNexlt.js +52 -0
- package/dist/clock.d.ts +42 -0
- package/dist/compute-CXGG9qvI.js +360 -0
- package/dist/compute-texture.d.ts +100 -0
- package/dist/compute-texture.js +131 -0
- package/dist/compute-volume.d.ts +57 -0
- package/dist/compute-volume.js +130 -0
- package/dist/compute.d.ts +200 -0
- package/dist/control-CFjkGPBk.js +201 -0
- package/dist/control.d.ts +93 -0
- package/dist/deform.d.ts +111 -0
- package/dist/deform.js +89 -0
- package/dist/display-BrJM_Qkd.js +5 -0
- package/dist/editor-model.d.ts +192 -0
- package/dist/editor-pass.d.ts +71 -0
- package/dist/editor-pass.js +216 -0
- package/dist/editor.d.ts +150 -0
- package/dist/editor.js +1071 -0
- package/dist/effects.d.ts +150 -0
- package/dist/effects.js +87 -0
- package/dist/errors-CsQwshHA.js +7 -0
- package/dist/glsl/emit.d.ts +43 -0
- package/dist/glsl/host.d.ts +55 -0
- package/dist/glsl/material.d.ts +173 -0
- package/dist/glsl/parser.d.ts +76 -0
- package/dist/glsl/preprocess.d.ts +9 -0
- package/dist/glsl/presets.d.ts +33 -0
- package/dist/glsl/program.d.ts +210 -0
- package/dist/glsl/scene.d.ts +9 -0
- package/dist/glsl-material.d.ts +82 -0
- package/dist/glsl-material.js +288 -0
- package/dist/glsl-pass.d.ts +93 -0
- package/dist/glsl-pass.js +186 -0
- package/dist/glsl.d.ts +94 -0
- package/dist/glsl.js +170 -0
- package/dist/gpu-DQJk2xAv.js +55 -0
- package/dist/graph.d.ts +82 -0
- package/dist/graph.js +365 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +103 -0
- package/dist/lighting-JU9yQPfM.js +77 -0
- package/dist/lighting.d.ts +62 -0
- package/dist/lighting.js +1 -0
- package/dist/material-C6bpqlnE.js +1184 -0
- package/dist/material-CZ8V1FeA.js +299 -0
- package/dist/material.d.ts +79 -0
- package/dist/node-B6yoIC9V.js +590 -0
- package/dist/node.d.ts +433 -0
- package/dist/noise.d.ts +38 -0
- package/dist/noise.js +107 -0
- package/dist/own-stack-D1XnXrrz.js +11 -0
- package/dist/own-stack.d.ts +12 -0
- package/dist/pass.d.ts +109 -0
- package/dist/pass.js +239 -0
- package/dist/post-DLpZ110L.js +113 -0
- package/dist/post.d.ts +69 -0
- package/dist/preprocess-CWGWlBWQ.js +1195 -0
- package/dist/raw-0AYej3Ak.js +1500 -0
- package/dist/raw.d.ts +744 -0
- package/dist/raw.js +1 -0
- package/dist/readback.d.ts +42 -0
- package/dist/readback.js +85 -0
- package/dist/scope.d.ts +21 -0
- package/dist/serialization.d.ts +11 -0
- package/dist/serialization.js +192 -0
- package/dist/shadertoy/sound.d.ts +48 -0
- package/dist/shadertoy.d.ts +249 -0
- package/dist/shadertoy.js +909 -0
- package/dist/shared/caster.d.ts +159 -0
- package/dist/shared/fog.d.ts +33 -0
- package/dist/shared/fractal.d.ts +9 -0
- package/dist/shared/msaa.d.ts +30 -0
- package/dist/shared/stack.d.ts +22 -0
- package/dist/sound-CF_dzP41.js +78 -0
- package/dist/storage-format-DWaiSxmq.js +25 -0
- package/dist/storage-format.d.ts +7 -0
- package/dist/subgroups.d.ts +97 -0
- package/dist/subgroups.js +95 -0
- package/dist/texture-BawKO_h9.js +62 -0
- package/dist/texture-array.d.ts +7 -0
- package/dist/texture-array.js +11 -0
- package/dist/texture.d.ts +16 -0
- package/dist/utils.d.ts +106 -0
- package/dist/utils.js +90 -0
- package/dist/view-rect-Bm1ac-TK.js +16 -0
- package/package.json +149 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { MaterialMeshData, MeshGeometry, VertexAttributeType } from '@margoengine/materials';
|
|
2
|
+
import { Node, type Host, type Resource } from './node.js';
|
|
3
|
+
/** @internal The attributes one program reads, in first-read order: its one storage binding. */
|
|
4
|
+
export declare class AttributeReads implements Resource {
|
|
5
|
+
readonly prefix = "ndat";
|
|
6
|
+
readonly bindings = 1;
|
|
7
|
+
private readonly list;
|
|
8
|
+
/** Words a vertex takes: one per component of every attribute read. */
|
|
9
|
+
private stride;
|
|
10
|
+
/** The word offset of `name` in a vertex, adding it on first read. */
|
|
11
|
+
add(name: string, t: VertexAttributeType): void;
|
|
12
|
+
declare(name: string, group: number, binding: number): string;
|
|
13
|
+
entries(_device: GPUDevice, host: Host): GPUBindingResource[];
|
|
14
|
+
/** The data of one mesh: `geometry`'s attributes, checked and interleaved. */
|
|
15
|
+
read(geometry: MeshGeometry): MaterialMeshData;
|
|
16
|
+
/** Vertices `from` to `from + count` of `geometry` as this program's interleaved words; throws when they do not fit. */
|
|
17
|
+
pack(geometry: MeshGeometry, from: number, count: number): Uint32Array;
|
|
18
|
+
/** The words one vertex takes. */
|
|
19
|
+
get words(): number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A per-vertex value of the mesh being drawn, by name: `createMesh(engine, {positions, normals, attributes: {heat:
|
|
23
|
+
* {data, type: 'f32'}}}, new NodeMaterial({colorNode: mix(vec3(0, 0, 1), vec3(1, 0, 0), attribute('heat', 'f32'))}))`.
|
|
24
|
+
* In `positionNode` and `normalNode`'s vertex work it reads the vertex; in the other slots it is interpolated across the
|
|
25
|
+
* triangle (integer types take the first vertex's value). Every pass that draws the material reads it, shadows included,
|
|
26
|
+
* and `mesh.setGeometry` updates it. NodeMaterial nodes only.
|
|
27
|
+
*/
|
|
28
|
+
export declare function attribute<T extends VertexAttributeType>(name: string, as: T): Node<T>;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import type { EngineKernel } from '@margoengine/core';
|
|
2
|
+
import { RawMesh, RawShaderMaterial, RawShaders } from './raw.js';
|
|
3
|
+
/** What the shader draws: the picture, or one of the maps that explain it. */
|
|
4
|
+
export type BlackHoleView = 'beauty' | 'redshift' | 'beaming' | 'temperature' | 'orders';
|
|
5
|
+
/** Options of {@link BlackHole}: the hole, its disk, jet and sky, and how they are drawn; every one can change later. */
|
|
6
|
+
export interface BlackHoleOptions {
|
|
7
|
+
/** Spin a = J / M^2, 0 to 0.998 (Thorne's limit). Default 0.9. */
|
|
8
|
+
spin?: number;
|
|
9
|
+
/** Disk brightness, a multiple of the default accretion rate; 0 hides the disk. Default 1. */
|
|
10
|
+
accretion?: number;
|
|
11
|
+
/** Disk temperature at its flux peak, kelvin, before redshift. Default 4500. */
|
|
12
|
+
peakTemperature?: number;
|
|
13
|
+
/** Outer disk radius in r_s. Default 6. */
|
|
14
|
+
diskOuter?: number;
|
|
15
|
+
/** Strength of the disk's turbulence, 0 (a smooth Page-Thorne disk) to 1. Default 0.6. */
|
|
16
|
+
turbulence?: number;
|
|
17
|
+
/** Jet brightness, 0 (none) to 1. Default 0.5. */
|
|
18
|
+
jet?: number;
|
|
19
|
+
/** The jet's bulk Lorentz factor, 1 to 20. Default 5. */
|
|
20
|
+
jetLorentz?: number;
|
|
21
|
+
/** Star field brightness, 0 hides it. Default 1. */
|
|
22
|
+
stars?: number;
|
|
23
|
+
/** Milky Way band brightness, 0 hides it. Default 1. */
|
|
24
|
+
galaxy?: number;
|
|
25
|
+
/** Disk time scale: units of M of orbital time per second of the shader clock. Default 6. */
|
|
26
|
+
timeScale?: number;
|
|
27
|
+
/** External disk clock in seconds for deterministic playback. Default null uses the camera clock. */
|
|
28
|
+
diskTime?: number | null;
|
|
29
|
+
/** Inward drift in M per unit of orbital time. Default 0.002. */
|
|
30
|
+
diskInflow?: number;
|
|
31
|
+
/** Linear exposure multiplier of the output. Default 1. */
|
|
32
|
+
exposure?: number;
|
|
33
|
+
/** Shading view. Default 'beauty'. */
|
|
34
|
+
view?: BlackHoleView;
|
|
35
|
+
/**
|
|
36
|
+
* Filter the disk texture and the stars by each pixel's footprint (ray differentials). Default true. False draws them
|
|
37
|
+
* point sampled, the way a plain per-ray march does: fine banding in the disk and stars stretched into dashes.
|
|
38
|
+
*/
|
|
39
|
+
prefilter?: boolean;
|
|
40
|
+
/** Most integration steps per ray, 32 to 1024. Default 260. */
|
|
41
|
+
steps?: number;
|
|
42
|
+
}
|
|
43
|
+
/** Event horizon radius r_+ = M (1 + sqrt(1 - a^2)), in M. */
|
|
44
|
+
export declare function kerrHorizon(spin: number): number;
|
|
45
|
+
/** Prograde innermost stable circular orbit (Bardeen, Press, Teukolsky 1972, eq. 2.21), in M. */
|
|
46
|
+
export declare function kerrIsco(spin: number): number;
|
|
47
|
+
/** Prograde circular photon orbit r = 2M (1 + cos(2/3 acos(-a))) (Bardeen, Press, Teukolsky 1972, eq. 2.18), in M. */
|
|
48
|
+
export declare function kerrPhotonOrbit(spin: number): number;
|
|
49
|
+
/**
|
|
50
|
+
* Traces a disk emitter backward along a constant radial drift.
|
|
51
|
+
* Returns its earlier radius in M and the prograde phase difference in radians.
|
|
52
|
+
*/
|
|
53
|
+
export declare function kerrDiskAdvection(radius: number, age: number, spin: number, inward: number): readonly [radius: number, phase: number];
|
|
54
|
+
/**
|
|
55
|
+
* Flux radiated from each face of a thin Kerr disk at radius `r` (in M), for M = 1 and accretion rate 1: Page and
|
|
56
|
+
* Thorne (1974) eq. 15n. Zero at and inside the ISCO; tends to the Newtonian 3 / (8 pi r^3) far out.
|
|
57
|
+
*/
|
|
58
|
+
export declare function novikovThorneFlux(r: number, spin: number): number;
|
|
59
|
+
/**
|
|
60
|
+
* Redshift factor g = E_observed / E_emitted of a photon from a prograde circular orbit at radius `r` (in M) that reaches
|
|
61
|
+
* a distant observer with angular momentum per energy `lambda` (in M) about the spin axis: g = 1 / (u^t (1 - Omega
|
|
62
|
+
* lambda)), u^t and Omega from Bardeen, Press, Teukolsky (1972).
|
|
63
|
+
*/
|
|
64
|
+
export declare function diskRedshift(r: number, spin: number, lambda: number): number;
|
|
65
|
+
/**
|
|
66
|
+
* Lapse of the zero-angular-momentum frame, alpha = rho sqrt(Delta) / Sigma (Bardeen, Press, Teukolsky 1972), at
|
|
67
|
+
* Boyer-Lindquist radius `r` (M) and polar angle `theta`: the gravitational redshift of light emitted there and seen far
|
|
68
|
+
* away, 0 at the horizon and 1 far out. The jet's light is shifted by lapse times Doppler factor.
|
|
69
|
+
*/
|
|
70
|
+
export declare function kerrLapse(r: number, theta: number, spin: number): number;
|
|
71
|
+
/** Doppler factor D = 1 / (Gamma (1 - beta cos theta)) of jet plasma at bulk Lorentz factor `gamma`. */
|
|
72
|
+
export declare function jetDoppler(gamma: number, cosTheta: number): number;
|
|
73
|
+
/**
|
|
74
|
+
* Linear sRGB colour of a black body at `kelvin` (clamped to 1667 to 25000 K), luminance 1: the Planckian locus fits of
|
|
75
|
+
* Kim et al. (2002) taken to XYZ with Y = 1, then to linear sRGB (IEC 61966-2-1), negative parts clamped.
|
|
76
|
+
*/
|
|
77
|
+
export declare function blackbodyColor(kelvin: number): [number, number, number];
|
|
78
|
+
/** Options of {@link traceGeodesic}. */
|
|
79
|
+
export interface GeodesicOptions {
|
|
80
|
+
/** Spin, as BlackHoleOptions.spin. Default 0.9. */
|
|
81
|
+
spin?: number;
|
|
82
|
+
/** Most steps. Default 260. */
|
|
83
|
+
steps?: number;
|
|
84
|
+
/** Outer disk radius in r_s, where crossings are recorded. Default 6. */
|
|
85
|
+
diskOuter?: number;
|
|
86
|
+
}
|
|
87
|
+
/** One ray traced by {@link traceGeodesic}: its path, its fate and where it crossed the disk. */
|
|
88
|
+
export interface Geodesic {
|
|
89
|
+
/** Points along the path, xyz in r_s, the camera first (the ray is traced back in time from it). */
|
|
90
|
+
points: Float32Array;
|
|
91
|
+
/** 'horizon' when the hole took it, 'escape' when it left, 'steps' when the step limit ended it. */
|
|
92
|
+
fate: 'horizon' | 'escape' | 'steps';
|
|
93
|
+
/** Boyer-Lindquist radii (r_s) where it crossed the disk plane inside the disk, in order: image orders 0, 1, 2, ... */
|
|
94
|
+
disk: number[];
|
|
95
|
+
/** Where the light came from at the end (the backward ray's direction), unit length. */
|
|
96
|
+
direction: [number, number, number];
|
|
97
|
+
/** Constants of the motion per unit energy: axial angular momentum b (M) and Carter's q (M^2). */
|
|
98
|
+
b: number;
|
|
99
|
+
q: number;
|
|
100
|
+
/** Largest |H| (the null condition, 0 for light) met along the path: the integration error. */
|
|
101
|
+
drift: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* True when a step from polar angle `before` to `after` crosses the disk plane theta = pi / 2. Half open: the plane
|
|
105
|
+
* itself counts with the side theta >= pi / 2, so a path through a step end exactly on the plane is counted once (a
|
|
106
|
+
* product test misses it: 0 is not below 0).
|
|
107
|
+
*/
|
|
108
|
+
export declare function crossesEquator(before: number, after: number): boolean;
|
|
109
|
+
/** The step (r_s) at radius r (r_s): small near the horizon, growing with r^2 and at most a fifth of r far out. */
|
|
110
|
+
export declare function geodesicStep(r: number, horizon: number): number;
|
|
111
|
+
/** Escape radius (r_s): a ray moving outward past it is done. */
|
|
112
|
+
export declare const ESCAPE_RADIUS = 80;
|
|
113
|
+
/**
|
|
114
|
+
* Scene point (r_s, spin on +y) to Boyer-Lindquist [r (M), theta, phi], where x = sqrt(r^2 + a^2) sin(theta) cos(phi),
|
|
115
|
+
* y = r cos(theta), z = -sqrt(r^2 + a^2) sin(theta) sin(phi) (in M), so phi grows the way the hole turns.
|
|
116
|
+
*/
|
|
117
|
+
export declare function toBoyerLindquist(p: readonly number[], spin: number): [number, number, number];
|
|
118
|
+
/** Boyer-Lindquist r (M), theta, phi to a scene point (r_s). */
|
|
119
|
+
export declare function fromBoyerLindquist(r: number, theta: number, phi: number, spin: number): [number, number, number];
|
|
120
|
+
/**
|
|
121
|
+
* Right-hand side of the Kerr null geodesic equations in Boyer-Lindquist coordinates, M = 1, p_t = -1 (James et al.
|
|
122
|
+
* 2015, eq. A.15): y = [r, theta, p_r, p_theta]; returns [dr, dtheta, dp_r, dp_theta, dphi] per unit affine parameter.
|
|
123
|
+
*/
|
|
124
|
+
export declare function kerrRhs(y: readonly number[], a: number, b: number, q: number): number[];
|
|
125
|
+
/**
|
|
126
|
+
* Half-width, as sin(theta), of the band round the spin axis where Boyer-Lindquist coordinates are singular. An axial
|
|
127
|
+
* ray (kerrAxial) goes straight over the axis inside it (kerrRhs, kerrHamiltonian and the shader) and its phi turns by
|
|
128
|
+
* kerrAxisTurn at the reflection; its path moves by at most r * POLE_BAND / 3. Without this, rays a hundredth of a
|
|
129
|
+
* pixel apart near the axis went to different places (a dashed seam over the pole, regression in
|
|
130
|
+
* test/black-hole.test.js).
|
|
131
|
+
*/
|
|
132
|
+
export declare const POLE_BAND = 0.001;
|
|
133
|
+
/**
|
|
134
|
+
* True for an axial ray: one whose turning point near the spin axis, sin(theta_min) = |b| / sqrt(q + a^2), lies within
|
|
135
|
+
* a third of POLE_BAND. Such a ray is taken over the axis; outside the band the barrier it meets is at most a ninth of
|
|
136
|
+
* q, and its path moves by at most r * POLE_BAND / 3.
|
|
137
|
+
*/
|
|
138
|
+
export declare function kerrAxial(a: number, b: number, q: number): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* The turn in phi at a reflection over the spin axis. An axial ray crosses the band in a straight line (the band is
|
|
141
|
+
* a thousandth of a radian wide, where space is flat to that order), whose azimuth about the axis turns by
|
|
142
|
+
* 2 acos(theta_min / POLE_BAND), in the sense of b in the backward-traced ray; any other ray goes half a turn.
|
|
143
|
+
*/
|
|
144
|
+
export declare function kerrAxisTurn(a: number, b: number, q: number): number;
|
|
145
|
+
/**
|
|
146
|
+
* Step limit near the spin axis: a ray of axial angular momentum b turns at sin(theta_min) = |b| / sqrt(q + a^2) (theta
|
|
147
|
+
* moves at most sqrt(q + a^2) / rho^2 per unit affine parameter). Within sin(theta) < 0.2 each step covers at most a
|
|
148
|
+
* quarter of the way left to theta_min, and a tenth of theta_min near it, so the turn and the half-turn in phi round
|
|
149
|
+
* it are resolved: about 5 log2(0.2 / theta_min) steps, under 0.2 px of error where half-way steps left 2 px. An
|
|
150
|
+
* axial ray steps the same way to the band's edge, then at most half the band at a time across it. Returns the step
|
|
151
|
+
* `h` (affine parameter, M), limited.
|
|
152
|
+
*/
|
|
153
|
+
export declare function kerrAxisStep(h: number, r: number, theta: number, a: number, b: number, q: number): number;
|
|
154
|
+
/** The null condition H of a state (James et al. 2015, eq. A.15's Hamiltonian): 0 for light; its size is the error. */
|
|
155
|
+
export declare function kerrHamiltonian(y: readonly number[], a: number, b: number, q: number): number;
|
|
156
|
+
/**
|
|
157
|
+
* Initial state of the ray seen by a camera at rest in the zero-angular-momentum frame at `origin`, looking along
|
|
158
|
+
* `direction` (scene units): James et al. 2015, eqs. A.9 to A.12, the light travelling against `direction`.
|
|
159
|
+
*/
|
|
160
|
+
export declare function kerrInitial(origin: readonly number[], direction: readonly number[], spin: number): {
|
|
161
|
+
y: number[];
|
|
162
|
+
phi: number;
|
|
163
|
+
b: number;
|
|
164
|
+
q: number;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* True when a ray at radius r (M) moving inward meets no turning point before the horizon: R(r') = P^2 - Delta ((b - a)^2
|
|
168
|
+
* + q) stays positive at 32 radii from r_+ to r (a turning point is a root of R). The shader stops such rays at once.
|
|
169
|
+
*/
|
|
170
|
+
export declare function kerrCaptured(r: number, a: number, b: number, q: number): boolean;
|
|
171
|
+
/** Step factor near the horizon, where Boyer-Lindquist momenta grow as 1 / Delta: clamp(4 Delta / r^2, 0.1, 1). */
|
|
172
|
+
export declare function kerrStepScale(r: number, a: number): number;
|
|
173
|
+
/**
|
|
174
|
+
* Traces the ray the shader traces from `origin` along `direction` (scene units, r_s = 1) back in time through Kerr
|
|
175
|
+
* spacetime: the CPU twin of the WGSL integrator, step for step (classic fourth-order Runge-Kutta, the same step size).
|
|
176
|
+
*/
|
|
177
|
+
export declare function traceGeodesic(origin: readonly [number, number, number], direction: readonly [number, number, number], options?: GeodesicOptions): Geodesic;
|
|
178
|
+
/** The shader source the material compiles (the full-screen vertex and fragment stages). */
|
|
179
|
+
export declare const blackHoleShader: string;
|
|
180
|
+
/**
|
|
181
|
+
* A black hole drawn behind everything else by a full-screen pass of a {@link RawShaders}: the lensed disk (Page-Thorne
|
|
182
|
+
* flux, redshift and beaming), its jet and a lensed sky. Change any property between frames; nothing recompiles.
|
|
183
|
+
*/
|
|
184
|
+
export declare class BlackHole {
|
|
185
|
+
readonly material: RawShaderMaterial;
|
|
186
|
+
readonly mesh: RawMesh;
|
|
187
|
+
readonly raw: RawShaders;
|
|
188
|
+
private readonly owned;
|
|
189
|
+
private paths;
|
|
190
|
+
private pathMaterial;
|
|
191
|
+
private disposed;
|
|
192
|
+
private diskSeconds;
|
|
193
|
+
/** Adds a RawShaders to `engine` and a BlackHole to it. */
|
|
194
|
+
static attach(engine: EngineKernel, options?: BlackHoleOptions): BlackHole;
|
|
195
|
+
constructor(raw: RawShaders, options?: BlackHoleOptions, ownsRaw?: boolean);
|
|
196
|
+
private u;
|
|
197
|
+
private g;
|
|
198
|
+
get spin(): number;
|
|
199
|
+
set spin(a: number);
|
|
200
|
+
/** Event horizon radius in r_s. */
|
|
201
|
+
get horizon(): number;
|
|
202
|
+
/** ISCO radius in r_s, where the disk starts. */
|
|
203
|
+
get isco(): number;
|
|
204
|
+
get accretion(): number;
|
|
205
|
+
set accretion(v: number);
|
|
206
|
+
get peakTemperature(): number;
|
|
207
|
+
set peakTemperature(v: number);
|
|
208
|
+
get diskOuter(): number;
|
|
209
|
+
set diskOuter(v: number);
|
|
210
|
+
get turbulence(): number;
|
|
211
|
+
set turbulence(v: number);
|
|
212
|
+
get jet(): number;
|
|
213
|
+
set jet(v: number);
|
|
214
|
+
get jetLorentz(): number;
|
|
215
|
+
set jetLorentz(v: number);
|
|
216
|
+
get stars(): number;
|
|
217
|
+
set stars(v: number);
|
|
218
|
+
get galaxy(): number;
|
|
219
|
+
set galaxy(v: number);
|
|
220
|
+
get timeScale(): number;
|
|
221
|
+
set timeScale(v: number);
|
|
222
|
+
/** Explicit time for disk texture advection, or null to follow the camera clock. */
|
|
223
|
+
get diskTime(): number | null;
|
|
224
|
+
set diskTime(seconds: number | null);
|
|
225
|
+
/** Inward radial speed in M per simulated time unit. */
|
|
226
|
+
get diskInflow(): number;
|
|
227
|
+
set diskInflow(speed: number);
|
|
228
|
+
get exposure(): number;
|
|
229
|
+
set exposure(v: number);
|
|
230
|
+
get view(): BlackHoleView;
|
|
231
|
+
set view(v: BlackHoleView);
|
|
232
|
+
get prefilter(): boolean;
|
|
233
|
+
set prefilter(on: boolean);
|
|
234
|
+
get steps(): number;
|
|
235
|
+
set steps(n: number);
|
|
236
|
+
/** Starts a hot spot at the disk's outer part that spirals in over 8 s; `start` is the shader clock (camera.time). */
|
|
237
|
+
flare(start: number): void;
|
|
238
|
+
/**
|
|
239
|
+
* Draws the paths of `rays` (from {@link traceGeodesic}) as lines over the picture, coloured by fate: amber for rays
|
|
240
|
+
* that cross the disk, blue for rays that escape, red for rays the hole takes. An empty list removes them.
|
|
241
|
+
*/
|
|
242
|
+
showGeodesics(rays: readonly Geodesic[]): void;
|
|
243
|
+
/** Removes the meshes (and the RawShaders when {@link BlackHole.attach} made it). */
|
|
244
|
+
dispose(): void;
|
|
245
|
+
[Symbol.dispose](): void;
|
|
246
|
+
}
|