copper3d / Modules / Loader/fastSliceRepaint
Module: Loader/fastSliceRepaint
Table of contents
Functions
Functions
installFastSliceRepaint
▸ installFastSliceRepaint(rawSlice, exposure?): Promise<void>
Idempotent: patching an already-patched slice is a no-op.
exposure is a gamma exponent, normally from exposureExponent(); 1 leaves greyscale exactly as the original produced it.
CALL THIS BEFORE THE FIRST PAINT. The LUT lives in the patched method, so painting first draws one un-lifted frame and corrects it on the reader's first scrub -- a visible colour change.
Async only because PlaneGeometry is imported on demand, to keep three out of a consumer's initial chunk when nothing scrubs a slice.
Parameters
| Name | Type | Default value |
|---|---|---|
rawSlice | unknown | undefined |
exposure | number | 1 |
Returns
Promise<void>