@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
37 lines (36 loc) • 1.96 kB
TypeScript
import type { Material, ShaderMaterial } from 'three';
import { Constructor } from '../../../../types/GlobalTypes';
import { BaseController } from './_BaseController';
import { TypedMatNode } from '../_Base';
import { MeshPhysicalMaterial, MeshToonMaterial, MeshStandardMaterial, MeshPhongMaterial, MeshMatcapMaterial, MeshLambertMaterial, MeshBasicMaterial } from 'three';
import { NodeParamsConfig } from '../../utils/params/ParamsConfig';
export interface FogControllers {
fog: FogController;
}
export declare function FogParamConfig<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
/** @param toggle on if you have a fog in the scene and the material should be affected by it */
useFog: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>;
};
} & TBase;
type FoggableMaterial = ShaderMaterial | MeshToonMaterial | MeshStandardMaterial | MeshPhysicalMaterial | MeshPhongMaterial | MeshMatcapMaterial | MeshLambertMaterial | MeshBasicMaterial;
export declare function isValidMaterial(material?: Material): material is FoggableMaterial;
declare const FogParamsConfig_base: {
new (...args: any[]): {
/** @param toggle on if you have a fog in the scene and the material should be affected by it */
useFog: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>;
};
} & typeof NodeParamsConfig;
declare class FogParamsConfig extends FogParamsConfig_base {
}
declare abstract class FogMatNode extends TypedMatNode<FoggableMaterial, FogParamsConfig> {
controllers: FogControllers;
material(): Promise<FoggableMaterial | undefined>;
}
export declare class FogController extends BaseController {
protected node: FogMatNode;
constructor(node: FogMatNode);
static update(node: FogMatNode): Promise<void>;
updateMaterial(material: FoggableMaterial): void;
}
export {};