polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
31 lines (30 loc) • 1.32 kB
TypeScript
import { PolyDictionary, Vector2Like } from '../../../types/GlobalTypes';
import { PolyScene } from '../PolyScene';
import { Vector2 } from 'three/src/math/Vector2';
import { IUniform } from 'three/src/renderers/shaders/UniformsLib';
declare type IUniforms = PolyDictionary<IUniform>;
export interface IUniformsWithTime extends IUniforms {
time: IUniform;
}
export interface IUniformsWithResolution extends IUniforms {
resolution: {
value: Vector2Like;
};
}
export declare class UniformsController {
private scene;
constructor(scene: PolyScene);
private _time_dependent_uniform_owners;
private _time_dependent_uniform_owners_ids;
private _resolution;
private _resolution_dependent_uniform_owners;
private _resolution_dependent_uniform_owners_ids;
add_time_dependent_uniform_owner(id: string, uniforms: IUniformsWithTime): void;
remove_time_dependent_uniform_owner(id: string): void;
update_time_dependent_uniform_owners(): void;
add_resolution_dependent_uniform_owner(id: string, uniforms: IUniformsWithResolution): void;
remove_resolution_dependent_uniform_owner(id: string): void;
update_resolution_dependent_uniform_owners(resolution: Vector2): void;
update_resolution_dependent_uniforms(uniforms: IUniformsWithResolution): void;
}
export {};