104 lines
1.8 KiB
TypeScript
104 lines
1.8 KiB
TypeScript
/**
|
|
* a feature from the menu
|
|
* @public
|
|
*/
|
|
declare class Feat {
|
|
|
|
/**
|
|
* only for testing,
|
|
*
|
|
* @param type "debug"
|
|
*
|
|
* @example
|
|
*
|
|
* new Feat("debug")
|
|
*
|
|
*/
|
|
constructor(type: "debug");
|
|
|
|
/**
|
|
* feature on/off boolean
|
|
*/
|
|
public get on(): boolean;
|
|
public set on(on: boolean);
|
|
|
|
readonly parent: Feat|null;
|
|
|
|
/**
|
|
* Only for parents
|
|
*/
|
|
readonly children: Feat[];
|
|
|
|
/**
|
|
* Only for parents
|
|
*/
|
|
readonly child_count: number;
|
|
|
|
readonly type: number;
|
|
|
|
/**
|
|
* Ids will be recycled after the feature is deleted
|
|
*/
|
|
readonly id: number;
|
|
|
|
/**
|
|
* value for integer features
|
|
*/
|
|
public get value_i(): integer;
|
|
public set value_i(value_i: integer);
|
|
|
|
/**
|
|
* min value
|
|
*/
|
|
public get min_1(): integer;
|
|
public set min_1(min_1: integer);
|
|
|
|
/**
|
|
* max value
|
|
*/
|
|
public get max_i(): integer;
|
|
public set max_i(max_i: integer);
|
|
|
|
/**
|
|
* step size
|
|
*/
|
|
public get mod_i(): integer;
|
|
public set mod_i(mod_i: integer);
|
|
|
|
/**
|
|
* deprecated
|
|
*
|
|
* @deprecated
|
|
*/
|
|
public get threaded(): boolean;
|
|
public set threaded(threaded: boolean);
|
|
|
|
public get name(): string;
|
|
public set name(name: string);
|
|
|
|
/**
|
|
* d3d handler
|
|
*
|
|
* @privateRemarks
|
|
*
|
|
* it's only defined as `any` because I don't understand the d3d handler function enough
|
|
*/
|
|
public get renderer(): any;
|
|
public set renderer(renderer: any);
|
|
|
|
/**
|
|
* show/hide feature
|
|
*/
|
|
public get hidden(): boolean;
|
|
public set hidden(hidden: boolean);
|
|
|
|
/**
|
|
* additional context passed to script handlers
|
|
*/
|
|
public get data(): any;
|
|
public set data(data: any);
|
|
|
|
public toggle(): Feat;
|
|
|
|
}
|