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

WebGPURenderer: Added sync render()/clear() #848

Merged
merged 1 commit into from
Feb 29, 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
26 changes: 12 additions & 14 deletions types/three/examples/jsm/renderers/common/Renderer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export default class Renderer {

renderAsync(scene: Scene, camera: Camera): Promise<void>;

render(scene: Scene, camera: Camera): void;

getMaxAnisotropy(): number;

getActiveCubeFace(): number;
Expand Down Expand Up @@ -222,22 +224,28 @@ export default class Renderer {
* Tells the renderer to clear its color, depth or stencil drawing buffer(s).
* Arguments default to true
*/
clearAsync(color?: boolean, depth?: boolean, stencil?: boolean): Promise<void>;
clear(color?: boolean, depth?: boolean, stencil?: boolean): void;

/**
* Clear the color buffer. Equivalent to calling .clear( true, false, false ).
*/
clearColorAsync(): Promise<void>;
clearColor(): void;

/**
* Clear the depth buffer. Equivalent to calling .clear( false, true, false ).
*/
clearDepthAsync(): Promise<void>;
clearDepth(): void;

/**
* Clear the stencil buffer. Equivalent to calling .clear( false, false, true ).
*/
clearStencilAsync(): Promise<void>;
clearStencil(): void;

/**
* Tells the renderer to clear its color, depth or stencil drawing buffer(s).
* Arguments default to true
*/
clearAsync(color?: boolean, depth?: boolean, stencil?: boolean): Promise<void>;

get currentColorSpace(): ColorSpace;

Expand Down Expand Up @@ -281,14 +289,4 @@ export default class Renderer {
get compute(): (computeNodes: ComputeNode | ComputeNode[]) => Promise<void>;

get compile(): (scene: Scene, camera: Camera, targetScene?: Scene | null) => Promise<void>;

get render(): (scene: Scene, camera: Camera) => Promise<void>;

get clear(): (color?: boolean, depth?: boolean, stencil?: boolean) => Promise<void>;

get clearColor(): () => Promise<void>;

get clearDepth(): () => Promise<void>;

get clearStencil(): () => Promise<void>;
}
Loading