@needle-tools/engine
Version:
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.
11 lines (10 loc) • 660 B
TypeScript
export type Prefix = (...args: any[]) => any;
export type Postfix = (...args: any[]) => any;
/**
* Use patcher for patching properties insteadof calling Object.defineProperty individually
* since this will cause conflicts if multiple patches need to be applied to the same property
*/
export declare function addPatch<T extends object>(prototype: T, fieldName: string, beforeCallback?: Prefix | null, afterCallback?: Postfix | null): void;
/** Removes prefix or postfix */
export declare function removePatch(prototype: object, fieldName: string, prefixOrPostfix: Prefix | Postfix): void;
export declare const NeedlePatchesKey = "Needle:Patches";