UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

44 lines 1.48 kB
/** * Allows you to declare resources for the pass, reading/writing/creating resources that will be used by the pass. * * @example * const pass_data = {}; * const pass_builder = graph.add("pass", pass_data, (data, resources, context) => { ... }); * pass_data.resource_a = pass_builder.create("A", {}); */ export class RenderPassBuilder { /** * * @param {RenderGraph} graph * @param {RenderPassNode} node */ init(graph: RenderGraph, node: RenderPassNode): void; /** * Create a new resource. * Creation implies writing as well. * @param {string} name * @param {ResourceDescriptor} descriptor * @returns {number} resource ID */ create(name: string, descriptor: ResourceDescriptor): number; /** * Read an existing resource * @param {number} resource * @returns {number} resource ID same as the input */ read(resource: number): number; /** * Write a resource * @param {number} resource * @returns {number} resource ID */ write(resource: number): number; /** * Indicate that this pass has side effects. * Will force the node to always be executed, regardless if it contributes to the final outputs of the graph or not. * Useful for debug purposes or cases where some of the resources written are not part of the graph. */ make_side_effect(): void; #private; } //# sourceMappingURL=RenderPassBuilder.d.ts.map