UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

51 lines (50 loc) 2.75 kB
import { Constructor } from '../../../../types/GlobalTypes'; import { TypedMatNode } from '../_Base'; import { BaseTextureMapController } from './_BaseTextureController'; import { NodeParamsConfig } from '../../utils/params/ParamsConfig'; import { MeshBasicMaterial } from 'three'; import { MeshLambertMaterial } from 'three'; import { MeshMatcapMaterial } from 'three'; import { MeshPhongMaterial } from 'three'; import { MeshPhysicalMaterial } from 'three'; import { MeshStandardMaterial } from 'three'; import { PointsMaterial } from 'three'; import { MeshToonMaterial } from 'three'; import { MaterialTexturesRecord, SetParamsTextureNodesRecord } from './_BaseController'; export declare function MapParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param toggle on to use a map affecting color */ useMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param texture map affecting color */ map: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; }; } & TBase; type TextureMapCurrentMaterial = MeshBasicMaterial | MeshLambertMaterial | MeshMatcapMaterial | MeshPhongMaterial | MeshStandardMaterial | MeshPhysicalMaterial | MeshToonMaterial | PointsMaterial; declare const TextureMapParamsConfig_base: { new (...args: any[]): { /** @param toggle on to use a map affecting color */ useMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param texture map affecting color */ map: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; }; } & typeof NodeParamsConfig; declare class TextureMapParamsConfig extends TextureMapParamsConfig_base { } export interface TextureMapControllers { map: TextureMapController; } declare abstract class TextureMapMatNode extends TypedMatNode<TextureMapCurrentMaterial, TextureMapParamsConfig> { controllers: TextureMapControllers; material(): Promise<TextureMapCurrentMaterial | undefined>; } export declare class TextureMapController extends BaseTextureMapController { protected node: TextureMapMatNode; constructor(node: TextureMapMatNode); initializeNode(): void; static update(node: TextureMapMatNode): Promise<void>; update(): Promise<void>; updateMaterial(material: TextureMapCurrentMaterial): Promise<void>; getTextures(material: TextureMapCurrentMaterial, record: MaterialTexturesRecord): void; setParamsFromMaterial(material: TextureMapCurrentMaterial, record: SetParamsTextureNodesRecord): void; } export {};