Optionalgenerator: MaterialPreviewGenerator
the generator to render with. Default a new one, disposed with the plugin
Protected_Protected Optional_Protected_While a material changes continuously (a drag, an animation, a transition), the minimum time in ms between two previews of the material. Other changes render in the next frame. 0: one preview per frame.
While it is disabled, requests wait and nothing renders.
ReadonlygeneratorA change of a material that does not change its look: it does not count as a change, so the cached previews stay
and no preview renders. Default: a rename (change or key 'name', or the name field of the material's UI).
Set a function to skip other changes, from the change and key of setDirty.
Number of previews kept in the cache (the least recently used is removed first).
Maximum number of previews rendered in one frame. Cached previews do not count.
Clock in ms, for dragInterval.
The previews are made on request; their settings are not saved with the viewer.
Default size of the previews in pixels.
OptionaluiStatic Optional ReadonlyOldStatic ReadonlyPluginNumber of requests waiting for a render.
Protected_Protected_Optionalprefix: stringOptionalmeta: SerializationMetaTypeRemoves the cached previews of the material (all of them without a material), so that the next requests render again. Changes of the material, the environment map and the tone mapping are detected without it.
Optionalmaterial: IMaterial<IMaterialEventMap>Requests a preview of the material. The callback is called once, in a later preFrame of the viewer
(in the next one when a preview of the unchanged material is cached).
shape, geometry and size, see MaterialPreviewRequestOptions
called with the preview
a handle to cancel the request
OptionalsetOptionalmeta: SerializationMetaType
Makes material previews for an inspector: request a preview on every material change, and the plugin renders it in the viewer's next
preFrame, at most maxPerFrame per frame. Its settings are in its UI (Material Previews).viewer.setDirty()and does not restart the progressive rendering.materialUpdatehaslast: false(uiconfig sends it while a slider moves), or when it comes less than dragInterval ms after the previous change and has nolast(an animation or a material transition changes the material in every frame). Other changes, and a change withlast: true(the release of a slider), render in the next frame. See https://threepipe.org/notes/frame-updates.html