-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathindex.d.ts
1739 lines (1409 loc) · 42 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare module "@easylogic/editor" {
// gl-matrix
// prettier-ignore
export type mat2 =
| [number, number,
number, number]
| Float32Array;
// prettier-ignore
export type mat2d =
| [number, number,
number, number,
number, number]
| Float32Array;
// prettier-ignore
export type mat3 =
| [number, number, number,
number, number, number,
number, number, number]
| Float32Array;
// prettier-ignore
export type mat4 =
| [number, number, number, number,
number, number, number, number,
number, number, number, number,
number, number, number, number]
| Float32Array;
export type quat = [number, number, number, number] | Float32Array;
// prettier-ignore
export type quat2 =
| [number, number, number, number,
number, number, number, number]
| Float32Array;
export type vec2 = [number, number] | Float32Array;
export type vec3 = [number, number, number] | Float32Array;
export type vec4 = [number, number, number, number] | Float32Array;
// prettier-ignore
export type ReadonlyMat2 =
| readonly [
number, number,
number, number
]
| Float32Array;
// prettier-ignore
export type ReadonlyMat2d =
| readonly [
number, number,
number, number,
number, number
]
| Float32Array;
// prettier-ignore
export type ReadonlyMat3 =
| readonly [
number, number, number,
number, number, number,
number, number, number
]
| Float32Array;
// prettier-ignore
export type ReadonlyMat4 =
| readonly [
number, number, number, number,
number, number, number, number,
number, number, number, number,
number, number, number, number
]
| Float32Array;
export type ReadonlyQuat =
| readonly [number, number, number, number]
| Float32Array;
export type ReadonlyQuat2 =
| readonly [number, number, number, number, number, number, number, number]
| Float32Array;
export type ReadonlyVec2 = readonly [number, number] | Float32Array;
export type ReadonlyVec3 = readonly [number, number, number] | Float32Array;
export type ReadonlyVec4 =
| readonly [number, number, number, number]
| Float32Array;
// gl-matrix
export function makeEventChecker(value: string, split: string): string;
// event name regular expression
export type EVENT = (...args: string[]) => string;
export const COMMAND: EVENT;
export const ON: EVENT;
// Predefined CHECKER
export type CHECKER = (value: string, split: string) => string;
export type AFTER = (value: string, split: string) => string;
export type BEFORE = (value: string, split: string) => string;
export const IF: CHECKER;
export const KEY: CHECKER;
export const ARROW_UP: string;
export const ARROW_DOWN: string;
export const ARROW_LEFT: string;
export const ARROW_RIGHT: string;
export const ENTER: string;
export const SPACE: string;
export const ESCAPE: string;
export const ALT: string;
export const SHIFT: string;
export const META: string;
export const CONTROL: string;
export const SELF: string;
export const LEFT_BUTTON: string;
export const FIT: string;
export const PASSIVE: string;
/**
* LOAD 함수에서 domdiff 를 수행하는 플래그를 설정한다.
*/
export const DOMDIFF: string;
// event config method
export type TimeFunction = (time: number) => string;
export const DEBOUNCE: TimeFunction;
export const DELAY: TimeFunction;
export const D1000: string;
export const THROTTLE: TimeFunction;
export const CAPTURE: string;
// event config method
// before method
// after method
type MoveMethod = (method: string) => string;
export const MOVE: MoveMethod;
type MoveEndMethod = (method: string) => string;
export const END: MoveEndMethod;
export const PREVENT: string;
export const STOP: string;
type CallbackFunction = (...args: string[]) => string;
type DOM_EVENT_MAKE = (...keys: string[]) => CallbackFunction;
export const SUBSCRIBE: CallbackFunction;
export const SUBSCRIBE_ALL: CallbackFunction;
export const CUSTOM: DOM_EVENT_MAKE;
export const CLICK: CallbackFunction;
export const DOUBLECLICK: CallbackFunction;
export const MOUSEDOWN: CallbackFunction;
export const MOUSEUP: CallbackFunction;
export const MOUSEMOVE: CallbackFunction;
export const MOUSEOVER: CallbackFunction;
export const MOUSEOUT: CallbackFunction;
export const MOUSEENTER: CallbackFunction;
export const MOUSELEAVE: CallbackFunction;
export const TOUCHSTART: CallbackFunction;
export const TOUCHMOVE: CallbackFunction;
export const TOUCHEND: CallbackFunction;
export const KEYDOWN: CallbackFunction;
export const KEYUP: CallbackFunction;
export const KEYPRESS: CallbackFunction;
export const DRAG: CallbackFunction;
export const DRAGSTART: CallbackFunction;
export const DROP: CallbackFunction;
export const DRAGOVER: CallbackFunction;
export const DRAGENTER: CallbackFunction;
export const DRAGLEAVE: CallbackFunction;
export const DRAGEXIT: CallbackFunction;
export const DRAGOUT: CallbackFunction;
export const DRAGEND: CallbackFunction;
export const CONTEXTMENU: CallbackFunction;
export const CHANGE: CallbackFunction;
export const INPUT: CallbackFunction;
export const FOCUS: CallbackFunction;
export const FOCUSIN: CallbackFunction;
export const FOCUSOUT: CallbackFunction;
export const BLUR: CallbackFunction;
export const PASTE: CallbackFunction;
export const RESIZE: CallbackFunction;
export const SCROLL: CallbackFunction;
export const SUBMIT: CallbackFunction;
// pointerstart 의 경우 drag 를 위한 시작점이기 때문에 left button 만 허용한다.
// context 메뉴나 wheel 은 허용하지 않는다.
export const POINTERSTART: CallbackFunction;
//
export const POINTEROVER: CallbackFunction;
export const POINTERENTER: CallbackFunction;
export const POINTEROUT: CallbackFunction;
export const POINTERMOVE: CallbackFunction;
export const POINTEREND: CallbackFunction;
export const CHANGEINPUT: CallbackFunction;
export const WHEEL: CallbackFunction;
export const ANIMATIONSTART: CallbackFunction;
export const ANIMATIONEND: CallbackFunction;
export const ANIMATIONITERATION: CallbackFunction;
export const TRANSITIONSTART: CallbackFunction;
export const TRANSITIONEND: CallbackFunction;
export const TRANSITIONRUN: CallbackFunction;
export const TRANSITIONCANCEL: CallbackFunction;
export const DOUBLETAB: CallbackFunction;
// Predefined LOADER
/**
* 특정 영역의 html 을 만들기 위한 함수
*
* @param [refName=$el] 업데이트 되기 위한 refName
* @returns {string}
*/
export function LOAD(refName: string): string;
export function createRef(value: any): string;
export function getRef(id: string): any;
export function BIND(
value: string,
checkFieldOrCallback: string
): string;
export interface KeyValue {
[key: string]: any;
}
export interface ElementValue<T> {
[key: string]: T;
}
interface IComponentParams extends KeyValue {}
export class Length {
unit: string;
value: number;
}
export class Dom {
el: HTMLElement;
static create(
tag: string | HTMLElement | Dom | DocumentFragment,
className: string,
attr: KeyValue
): Dom;
static createByHTML(htmlString: string): Dom | null;
static body(): Dom;
find(selector: string): HTMLElement;
$(selector: string): Dom | null;
findAll(selector: string): HTMLElement[];
$$(selector: string): Dom[];
replaceChild(
oldElement: Dom | HTMLElement,
newElement: Dom | HTMLElement
): Dom;
checked(isChecked: boolean): Dom | boolean;
click(): Dom;
focus(): Dom;
select(): Dom;
blur(): Dom;
/* utility */
fullscreen(): void;
toggleFullscreen(): void;
}
export class BaseStore {}
export class Item {
getDefaultTitle(): string;
getIcon(): string;
isAttribute(): boolean;
isChanged(timestamp: number): boolean;
changed():void;
/**
* title 속성
*/
get title(): string;
/**
*
* @returns 자신을 포함안 하위 모든 자식을 조회
*/
get allLayers(): Item[];
/**
* get id
*/
get id(): string;
/**
* 자식 객체 리스트
*
* @returns {Item[]}
*/
get layers(): Item[];
/**
* @returns {Item}
*/
get parent(): Item;
setParent: (otherParent: Item) => void;
/**
* 객체 깊이를 동적으로 계산
*
* @returns {number}
*/
get depth(): number;
/**
* 최상위 컴포넌트 찾기
*
* @returns {Item}
*/
get top(): Item;
/**
* 최상위 project 구하기
*
* @returns {Project}
*/
get project(): Item;
/**
* 최상위 artboard 구하기
*
* @returns {ArtBoard}
*/
get artboard(): Item;
/**
* 상속 구조 안에서 instance 리스트
*
* @returns {Item[]}
*/
get path(): Item[];
/**
* 부모의 자식들 중 나의 위치 찾기
*
* @returns {number} 나이 위치 index
*/
get positionInParent(): number;
/**
* id 기반 문자열 id 생성
*
* @param {string} postfix
*/
getInnerId: (postfix: string) => string;
// selection 이후에
// 위치나 , width, height 등의 geometry 가 변경되었을 때 호출 하는 함수
recover: () => void;
setCache: () => void;
is(checkItemType: string): boolean;
isNot(checkItemType: string): boolean;
isSVG(): boolean;
/***********************************
*
* action
*
**********************************/
// 내부 아이템 리스트 설정
generateListNumber(): void;
/**
* when json is loaded, json object is be a new instance
*
* @param {*} json
*/
convert(json: KeyValue): KeyValue;
/**
* defence to set invalid key-value
*/
checkField(key: string, value: any): boolean;
toCloneObject(isDeep: boolean): KeyValue;
/**
* clone Item
*/
clone(isDeep: boolean): Item;
/**
* set json content
*
* @param {object} obj
*/
reset(obj: KeyValue): void;
hasChangedField(...args: string[]): boolean;
/**
* define default object for item
*
* @param {object} obj
*/
getDefaultObject(obj: KeyValue): KeyValue;
/**
* 지정된 필드의 값을 object 형태로 리턴한다.
*
* @param {...string} args 필드 리스트
*/
attrs(...args: string[]): any[];
/**
* 자식을 가지고 있는지 체크
*
* @returns {boolean}
*/
hasChildren(): boolean;
/**
* 자식으로 추가한다.
*
* @param {Item} layer
*/
appendChildItem(layer: Item): Item;
/**
* 자식중에 맨앞에 추가한다.
*
* @param {Item} layer
*/
prependChildItem(layer: Item): Item;
resetMatrix(item: Item): void;
/**
* 특정 index 에 자식을 추가한다.
*
* @param {Item} layer
* @param {number} index
*/
insertChildItem(layer: Item, index: number): Item;
/**
* 현재 Item 의 그 다음 순서로 추가한다.
*
* @param {Item} layer
*/
insertAfter(layer: Item): Item;
/**
* 현재 Item 의 이전 순서로 추가한다.
*
* @param {Item} layer
*/
insertBefore(layer: Item): Item;
/**
* 특정한 위치에 자식 객체로 Item 을 추가 한다.
* set position in layers
*
* @param {Number} position
* @param {Item} item
*/
setPositionInPlace(position: number, item: Item): void;
/**
* toggle item's attribute
*
* @param {*} field
* @param {*} toggleValue
*/
toggle(field: string, toggleValue: boolean | undefined): void;
isTreeItemHide(): boolean;
expectJSON(key: string): boolean;
/**
* convert to json
*
*/
toJSON(): KeyValue;
resize(): void;
/**
* Item 복사하기
*
* @param {number} dist
*/
copy(dist: number): Item;
findIndex(item: Item): number;
copyItem(childItem: Item, dist: number): Item;
/**
* 부모 객체에서 나를 지운다.
* remove self in parent
*/
remove(): void;
/**
* remote child item
*
* @param {Item} childItem
*/
removeItem(childItem: Item): void;
/**
* 부모 아이디를 가지고 있는지 체크 한다.
*
* @param {string} parentId
*/
hasParent(parentId: string): boolean;
/**
* 하위 자식 객체 중에 id를 가진 Item 을 리턴한다.
*
* @param {string} id
* @returns {Item|null} 검색된 Item 객체
*/
searchById(id: string): Item | null;
}
interface IKeyMat4Value {
[key: string]: mat4;
}
interface ICachedMatrix {
id: string;
x: number;
y: number;
width: number;
height: number;
transform: string;
originalTransformOrigin: string;
/**
* 변환되는 모든 vertext 를 기록
*/
verties: vec3[];
/**
* 회전되는 vertext 를 제외한 모든 vertext
* 회전 방식이 바뀌면 삭제 될 수 있음.
*/
rectVerties: vec3[];
xList: number[];
yList: number[];
directionMatrix: IKeyMat4Value;
parentMatrix: mat4;
parentMatrixInverse: mat4;
localMatrix: mat4; // 자기 자신의 matrix with translate offset(x,y)
localMatrixInverse: mat4;
itemMatrix: mat4; // 자기 자신의 matrix without translate offset(x,y)
itemMatrixInverse: mat4;
absoluteMatrix: mat4; // parentMatrix * offset translate * localMatrix , 축적된 matrix
absoluteMatrixInverse: mat4;
}
interface PathParser {}
interface ModelManager {}
export class BaseModel {
get manager(): ModelManager;
get timestamp(): number;
get id(): string;
get name(): string;
get itemType(): string;
get title(): string;
get children(): BaseModel[];
get parent(): BaseModel;
get parentId(): string;
get collapsed(): boolean;
get visibility(): boolean;
get locked(): boolean;
get allLayers(): BaseModel[];
get layers(): BaseModel[];
get depth(): number;
get top(): BaseModel;
get artboard(): ArtBoard;
get project(): BaseModel;
get path(): BaseModel[];
get pathIds(): string[];
get childrenLength(): number;
get index(): number;
get isFirst(): boolean;
get isLast(): boolean;
get first(): BaseModel;
get last(): BaseModel;
get prev(): BaseModel;
get next(): BaseModel;
get hierarchy(): Hierarchy;
get hasChangedHirachy(): boolean;
getInformationForHierarchy(): Hierarchy;
filterAllLayers(filter: (layer: BaseModel) => boolean): BaseModel[];
setParentId(parentId: string):void;
getInnerId(postfix?: string):string;
is(checkItemType: string): boolean;
isNot(checkItemType: string): boolean;
get(key: string): any;
removeField(key: string): void;
set(key: string, value: any): void;
isSVG(): boolean;
addCache(key: string, value: any): void;
getCache(key: string): any;
removeCache(key: string): void;
hasCache(key: string): boolean;
computed(key: string, newValueCallback: Function, isForce?: boolean): any;
computedValue(key: string): any;
editable(): boolean;
convert(json?: KeyValue): KeyValue;
setCache(): void;
toCloneObject(isDeep?: boolean): KeyValue;
clone(isDeep?: boolean): boolean;
reset(obj: KeyValue, context?: IContext): boolean;
hasChangedField(...args: any[]): boolean;
getDefaultObject(obj?: KeyValue): KeyValue;
attrs(...args: string[]): KeyValue;
attrsWithId(...args: string[]): KeyValueWithId;
hasChildren(): boolean;
appendChild(child: BaseModel): void;
/**
* 새로운 부모를 기준으로 childItem 의 transform 을 맞춘다.
*
* 1. childItem 의 absoluteMatrix 를 구한다.
* 2. 새로운 부모를 기준으로 좌표를 다시 맞춘다. parentItem.absoluteMatrixInverse
*
* childItem 의 좌표를 새로운 parent 로 맞출 때는
* itemMatrix (rotateZ) 를 먼저 구하고 offset 을 다시 구하는 순서로 간다.
*/
resetMatrix(childItem: BaseModel): void;
refreshMatrixCache(): void;
insertChild(child: BaseModel, index?: number): BaseModel;
insertAfter(child: BaseModel): BaseModel;
insertBefore(child: BaseModel): BaseModel;
toggle(field: string, toggleValue?: boolean): void;
isTreeItemHide(): boolean;
expectJSON(key: string): boolean;
toJSON(): KeyValue;
resize(): void;
copy(): BaseModel;
findIndex(child: BaseModel): number;
find(id: string): BaseModel;
copyItem(childItem: BaseModel, dist: number): BaseModel;
remove(): void;
removeChild(childId: string): BaseModel;
hasParent(findParentId: string): boolean;
hasPathOf(targetItems: BaseModel[]): boolean;
hasChild(childId: string): boolean;
sendBackward(targetId: string): void;
sendBack(targetId: string): void;
bringForward(targetId: string): void;
bringFront(targetId: string): void;
}
export interface KeyValueWithId {
[key: string]: KeyValue;
}
export interface IContext {
[key: string]: any;
origin?: string;
}
export interface Hierarchy {
id: string;
index: number;
parentId: string;
prev: BaseModel;
next: BaseModel;
attrs: KeyValue
}
interface OffsetProperty {
key: string;
value: any;
}
interface Offset {
offset: number;
properties: OffsetProperty[];
}
interface Keyframe {
id: string;
name: string;
offsets: Offset[];
}
export class BaseAssetModel extends BaseModel {
get keyframes(): Keyframe[];
}
export class MovableModel extends BaseAssetModel {
get isAbsolute(): boolean;
get isDragSelectable(): boolean;
get isBooleanItem(): boolean;
get resizableWitChildren(): boolean;
get perspective(): string;
get perspectiveOrigin(): string;
get transform(): string;
get localMatrix(): mat4;
get localMatrixInverse(): mat4;
get transformWithTranslate(): vec3[];
get transformWithTranslateToTranspose(): vec3[];
get transformWithTranslateInverse(): vec3[];
get itemMatrix(): mat4;
get itemMatrixInverse(): mat4;
get absoluteMatrix(): mat4;
get absoluteMatrixInverse(): mat4;
get relativeMatrix(): mat4;
get relativeMatrixInverse(): mat4;
get verties(): vec3[];
get contentVerties(): vec3[];
get originVerties(): vec3[];
get localVerties(): vec3[];
get guideVerties(): vec3[];
get xList(): number[];
get yList(): number[];
get areaPosition(): any[];
get screenX(): number;
get screenY(): number;
get offsetX(): number;
get offsetY(): number;
get screenWidth(): number;
get screenHeight(): number;
get y(): number;
set y(value: number);
get x(): number;
set x(value: number);
get width(): number;
set width(value: number);
get height(): number;
set height(value: number);
get angle(): number;
set angle(value: number);
get position(): string;
set position(value: string);
get transformOrigin(): string;
set transformOrigin(value: string);
/** translate vector */
get translate(): vec3;
/** scale vector */
get scale(): vec3;
/** rotate vector */
get rotate(): vec3;
/** origin vector */
get origin(): vec3;
/** absolute origin vector */
get absoluteOrigin():vec3;
/** quaternion(사원수) */
get quat(): quat;
toCloneObject(isDeep: boolean): KeyValue;
convert(json: KeyValue): KeyValue;
//////////////////////
//
// getters
//
///////////////////////
setScreenX(value: number): void;
setScreenY(value: number): void;
/**
* Item 이동하기
*
* @param {vec3} distVector
*/
move(distVector: vec3): void;
moveByCenter(newCenter: vec3): void;
/**
* 충돌 체크
*
* polygon : ploygon 형태로 충돌 체크를 한다.
*
* @param {*} areaVerties
*/
checkInArea(areaVerties: vec3[]): boolean;
/**
* 특정 위치가 객체를 가리키고 있는데 체크한다.
*
* @param {number} x
* @param {number} y
*/
hasPoint(x: number, y: number): boolean;
/**
* areaVerties 안에 Layer 가 포함된 경우
*
* @param {vec3[]} areaVerties
*/
isIncludeByArea(areaVerties: vec3[]): boolean;
getPerspectiveMatrix(): mat4 | undefined;
getItemTransformMatrix(): mat4;
getItemTransformMatrixInverse(): mat4;
/**
* refer to https://www.w3.org/TR/css-transforms-2/
*
* 1. Start with the identity matrix.
* 2. Translate by the computed X, Y and Z of transform-origin
* 3. Multiply by each of the transform functions in transform property from left to right
* 4. Translate by the negated computed X, Y and Z values of transform-origin
*/
getTransformMatrix(): mat4;
getTransformMatrixInverse(): mat4;
/**
* 방향에 따른 matrix 구하기
*
* @param {vec3} vertextOffset
*/
getDirectionTransformMatrix(
vertextOffset: vec3,
width: Length,
height: Length
): mat4;
getDirectionTopLeftMatrix(width: Length, height: Length): mat4;
getDirectionLeftMatrix(width: Length, height: Length): mat4;
getDirectionTopMatrix(width: Length, height: Length): mat4;
getDirectionBottomLeftMatrix(width: Length, height: Length): mat4;
getDirectionTopRightMatrix(width: Length, height: Length): mat4;
getDirectionRightMatrix(width: Length, height: Length): mat4;
getDirectionBottomRightMatrix(width: Length, height: Length): mat4;
getDirectionBottomMatrix(width: Length, height: Length): mat4;
getAbsoluteMatrix(): mat4;
getAbsoluteMatrixInverse(): mat4;
selectionVerties(): vec3[];
rectVerties(): vec3[];
get matrix(): ICachedMatrix;
/**
*
* @returns {vec3[]} 패스의 verties
*/
pathVerties(): vec3[];
/**
* 중첩된 matrix 적용한 path segment
*
* @returns {PathParser}
*/
absolutePath(pathString: string): PathParser;
// 전체 캔버스에 그려진 path 의 개별 verties 를
// svg container 의 matrix 의 inverse matrix 를 곱해서 재계산 한다.
invertPath(pathString: string): PathParser;
/**
* pathString 의 좌표를 기준 좌표로 돌린다.
*
* @param {string} pathString svg path string
*/
invertPathString(pathString: string): string;
/**
* 나를 포함한 모든 layer 에 대해서 체크한다.
*
* project, artboard 를 제외
*
* @param {vec3[]} areaVerties
*/
checkInAreaForAll(areaVerties: vec3[]): MovableItem[];
/**
* area 에 속하는지 충돌 체크,
*
* @param {vec3[]} areaVerties
* @returns {Item[]} 충돌 체크된 선택된 객체 리스트
*/
checkInAreaForLayers(areaVerties: vec3[]): MovableItem[];
getTransformOriginMatrix(): mat4;
getTransformOriginMatrixInverse(): mat4;
/** order by */
getIndex(): number;
setOrder(targetIndex: number): void;
/**
* 레이어를 현재의 다음으로 보낸다.
* 즉, 화면상에 렌더링 영역에서 올라온다.
*/
orderNext(): void;
/**
* 레이어를 현재의 이전으로 보낸다.
* 즉, 화면상에 렌더링 영역에서 내려간다.
*/
orderPrev(): void;
// 부모의 처음으로 보내기
orderFirst(): void;
// 부모의 마지막으로 보내기
orderLast(): void;
//TODO: 전체중에 처음으로 보내기
orderTop(): void;
//TODO: 전체중에 마지막으로 보내기
orderBottom(): void;
}
export class GroupModel extends MovableModel {
get isGroup(): boolean;
isLayoutItem(): boolean;
/**
*
* 레이아웃을 가지고 있는 container 인지 판별
*
* @returns {boolean}
*/
hasLayout(): boolean;
isInGrid(): boolean;
isInFlex(): boolean;
}
interface Transition {
name: string;
duration: string;
timingFunction: string;
delay: string;
}
interface BoxShadow {
offsetX: number;
offsetY: number;
blurRadius: number;
spreadRadius: number;
color: string;
}
interface TextShadow {
offsetX: number;
offsetY: number;
blurRadius: number;
color: string;
}
interface Pattern {
}