Scene builder: прилипание добавляемого объекта к сетке и другим объектам

This commit is contained in:
IDONTSUDO 2024-02-19 11:48:08 +00:00 committed by Igor Brylyov
parent 6732d5a98f
commit 40b9b116c1
31 changed files with 1193 additions and 46 deletions

View file

@ -1,9 +1,11 @@
import { ArrayExtensions } from "./array";
import { MapExtensions } from "./map";
import { NumberExtensions } from "./number";
import { StringExtensions } from "./string";
export type CallBackVoidFunction = <T>(value: T) => void;
export type CallBackStringVoidFunction = (value: string) => void;
export type CallBackEventTarget = (value: EventTarget) => void;
declare global {
interface Array<T> {
@ -14,6 +16,9 @@ declare global {
isNotEmpty(): boolean;
hasIncludeElement(element: T): boolean;
}
interface Number {
fromArray(): number[];
}
interface String {
isEmpty(): boolean;
isNotEmpty(): boolean;
@ -21,9 +26,11 @@ declare global {
interface Map<K, V> {
addValueOrMakeCallback(key: K, value: V, callBack: CallBackVoidFunction): void;
}
interface Vector3 {}
}
export const extensions = () => {
ArrayExtensions();
StringExtensions();
NumberExtensions();
MapExtensions();
};