UNPKG

@polygonjs/polygonjs

Version:

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

35 lines (34 loc) 1.35 kB
import { PolyDictionary } from '../../../types/GlobalTypes'; import { BaseNodeType } from '../_Base'; import { ShaderMaterialWithCustomMaterials } from '../../../core/geometry/Material'; import { Material } from 'three'; import { VelocityColliderFunctionBody } from '../js/code/assemblers/_Base'; interface MaterialData { color?: boolean; lights?: boolean; } interface ToJsonOptions { node: BaseNodeType; suffix: string; } interface DataObjectWithoutShaders { } export interface PersistedConfigWithShaders extends DataObjectWithoutShaders { shaders?: PolyDictionary<string>; functionBody?: string | VelocityColliderFunctionBody; } export declare abstract class BasePersistedConfig { protected node: BaseNodeType; constructor(node: BaseNodeType); abstract toData(): Promise<PersistedConfigWithShaders | void>; load(data: object): void; toDataWithoutShaders(): Promise<DataObjectWithoutShaders | void>; protected _materialToJson(material: Material, options: ToJsonOptions): object | undefined; private _withPreparedMaterial; private _withUnassignedOnBeforeCompileData; private _withUnassignedUniformTextures; private _withUnassignedBasePropertyTextures; protected _loadMaterial(data: MaterialData): ShaderMaterialWithCustomMaterials | undefined; private mat4ToMat3; } export {};