Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source: Add dataReady flag. #794

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion types/three/src/textures/Source.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Loading