From c74aef99a24306f3aa68d4033ab9ab811180aede Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Tue, 30 Jan 2024 09:28:56 -0500 Subject: [PATCH] Source: Add dataReady flag. --- types/three/src/textures/Source.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/types/three/src/textures/Source.d.ts b/types/three/src/textures/Source.d.ts index 670aa51e0..f14b70555 100644 --- a/types/three/src/textures/Source.d.ts +++ b/types/three/src/textures/Source.d.ts @@ -26,7 +26,17 @@ export class Source { data: any; /** - * Set this to `true` to trigger a data upload to the GPU next time the {@link Source} is used. + * This property is only relevant when {@link .needsUpdate} is set to `true` and provides more control on how + * texture data should be processed. + * When `dataReady` is set to `false`, the engine performs the memory allocation (if necessary) but does not + * transfer the data into the GPU memory. + * @default true + */ + dataReady: boolean; + + /** + * When the property is set to `true`, the engine allocates the memory for the texture (if necessary) and triggers + * the actual texture upload to the GPU next time the source is used. */ set needsUpdate(value: boolean);