UNPKG

polygonjs-engine

Version:

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

50 lines (49 loc) 2.73 kB
/** * Create points from a an array of json dictionaries * * @remarks * This node is similar to the [Data SOP], but will fetch the data from a url. * */ import { TypedSopNode } from './_Base'; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; import { BaseParamType } from '../../params/_Base'; import { BufferGeometry } from 'three/src/core/BufferGeometry'; export declare enum DataType { JSON = "json", CSV = "csv" } export declare const DATA_TYPES: DataType[]; declare class DataUrlSopParamsConfig extends NodeParamsConfig { /** @param sets if the data is interpreted as json or csv */ dataType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param the url to fetch the data from */ url: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param if the data is inside the payload, defines the prefix to read it from here */ jsonDataKeysPrefix: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param which entries are skipped */ skipEntries: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param sets if some attributes should be converted */ convert: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param sets which attributes should be converted from string to numeric */ convertToNumeric: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param when fetching from a csv, the attribute names will not be present. Those can then be mentioned here */ readAttribNamesFromFile: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param list of attributes names when fetching from a csv */ attribNames: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param reload the url */ reload: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>; } export declare class DataUrlSopNode extends TypedSopNode<DataUrlSopParamsConfig> { params_config: DataUrlSopParamsConfig; static type(): string; cook(): Promise<void>; private _url; private _load_json; _on_load(geometry: BufferGeometry): void; _on_error(error: ErrorEvent): void; _load_csv(): Promise<void>; static PARAM_CALLBACK_reload(node: DataUrlSopNode, param: BaseParamType): void; param_callback_reload(): void; } export {};