UNPKG

@spearwolf/twopoint5d

Version:

a library to create 2.5d realtime graphics and pixelart with three.js

25 lines 1.05 kB
export type DependencyKey = string; export type EqualityCallback<T = any> = (a: T, b: T) => boolean; export type CloneCallback<T> = (source: T) => T; export type CopyCallback<T> = (source: T, target: T) => void; export interface DependencyCallbacks<T = any> { equals: EqualityCallback<T>; clone?: CloneCallback<T>; copy?: CopyCallback<T>; } export type DependencyProp<T = any> = DependencyKey | [name: DependencyKey, equals: EqualityCallback<T>] | [name: DependencyKey, callbacks: DependencyCallbacks]; export declare class Dependencies { #private; static cloneable: <D extends { equals: (x: D) => boolean; clone: () => D; copy: (x: D) => D; }>(name: DependencyKey) => DependencyProp<D>; constructor(props: DependencyProp[]); update(nextProps: Record<DependencyKey, any>): void; equals(nextProps: Record<DependencyKey, any>): boolean; changed(nextProps: Record<DependencyKey, any>): boolean; clear(): void; value(key: DependencyKey): any; } //# sourceMappingURL=Dependencies.d.ts.map