24 lines
481 B
TypeScript
24 lines
481 B
TypeScript
import { Material, Object3D } from 'three';
|
|
|
|
export interface PropertyDefinition {
|
|
name?: string;
|
|
type?: any;
|
|
description?: string;
|
|
exposed?: boolean;
|
|
validators?: Function[];
|
|
postChange?(obj: Object3D | Material): void;
|
|
}
|
|
|
|
export class Property {
|
|
public definition!: PropertyDefinition;
|
|
constructor(definition: PropertyDefinition) {
|
|
this.definition = Object.assign(
|
|
{
|
|
exposed: true,
|
|
validators: [],
|
|
},
|
|
definition
|
|
);
|
|
}
|
|
}
|