freeblox/packages/engine/src/types/property.ts

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
);
}
}