UNPKG

@polygonjs/polygonjs

Version:

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

52 lines (51 loc) 2.67 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 { SopType } from '../../poly/registers/nodes/types/Sop'; 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("../../index_all").ParamType.INTEGER>; /** @param the url to fetch the data from */ url: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").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("../../index_all").ParamType.STRING>; /** @param which entries are skipped */ skipEntries: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>; /** @param sets if some attributes should be converted */ convert: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param sets which attributes should be converted from string to numeric */ convertToNumeric: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").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("../../index_all").ParamType.BOOLEAN>; /** @param list of attributes names when fetching from a csv */ attribNames: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>; /** @param reload the url */ reload: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BUTTON>; } export declare class DataUrlSopNode extends TypedSopNode<DataUrlSopParamsConfig> { paramsConfig: DataUrlSopParamsConfig; static type(): SopType; cook(): Promise<void>; private _load; dispose(): void; private _url; private _loadJSON; private _onLoad; private _onError; private _loadCSV; static PARAM_CALLBACK_reload(node: DataUrlSopNode, param: BaseParamType): void; param_callback_reload(): void; } export {};