Repository navigation
Expand file tree
/
Copy pathSpriteKit.d.ts
More file actions
2125 lines (1190 loc) · 64.3 KB
/
Copy pathSpriteKit.d.ts
File metadata and controls
2125 lines (1190 loc) · 64.3 KB
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
/// <reference types="@nativescript/objc-node-api" />
/// <reference path="./Runtime.d.ts" />
/// <reference path="./AppKit.d.ts" />
declare const SKTileSetType: {
Grid: 0,
Isometric: 1,
HexagonalFlat: 2,
HexagonalPointy: 3,
};
declare const SKTileDefinitionRotation: {
Rotation0: 0,
Rotation90: 1,
Rotation180: 2,
Rotation270: 3,
};
declare const SKAttributeType: {
None: 0,
Float: 1,
VectorFloat2: 2,
VectorFloat3: 3,
VectorFloat4: 4,
HalfFloat: 5,
VectorHalfFloat2: 6,
VectorHalfFloat3: 7,
VectorHalfFloat4: 8,
};
declare const SKTextureFilteringMode: {
Nearest: 0,
Linear: 1,
};
declare const SKLabelVerticalAlignmentMode: {
Baseline: 0,
Center: 1,
Top: 2,
Bottom: 3,
};
declare const SKActionTimingMode: {
Linear: 0,
EaseIn: 1,
EaseOut: 2,
EaseInEaseOut: 3,
};
declare const SKBlendMode: {
Alpha: 0,
Add: 1,
Subtract: 2,
Multiply: 3,
MultiplyX2: 4,
Screen: 5,
Replace: 6,
MultiplyAlpha: 7,
};
declare const SKParticleRenderOrder: {
OldestLast: 0,
OldestFirst: 1,
DontCare: 2,
};
declare const SKSceneScaleMode: {
Fill: 0,
AspectFill: 1,
AspectFit: 2,
ResizeFill: 3,
};
declare const SKTransitionDirection: {
Up: 0,
Down: 1,
Right: 2,
Left: 3,
};
declare const SKTileAdjacencyMask: {
AdjacencyUp: 1,
AdjacencyUpperRight: 2,
AdjacencyRight: 4,
AdjacencyLowerRight: 8,
AdjacencyDown: 16,
AdjacencyLowerLeft: 32,
AdjacencyLeft: 64,
AdjacencyUpperLeft: 128,
AdjacencyAll: 255,
HexFlatAdjacencyUp: 1,
HexFlatAdjacencyUpperRight: 2,
HexFlatAdjacencyLowerRight: 4,
HexFlatAdjacencyDown: 8,
HexFlatAdjacencyLowerLeft: 16,
HexFlatAdjacencyUpperLeft: 32,
HexFlatAdjacencyAll: 63,
HexPointyAdjacencyUpperLeft: 1,
HexPointyAdjacencyUpperRight: 2,
HexPointyAdjacencyRight: 4,
HexPointyAdjacencyLowerRight: 8,
HexPointyAdjacencyLowerLeft: 16,
HexPointyAdjacencyLeft: 32,
HexPointyAdjacencyAdd: 63,
AdjacencyUpEdge: 124,
AdjacencyUpperRightEdge: 112,
AdjacencyRightEdge: 241,
AdjacencyLowerRightEdge: 193,
AdjacencyDownEdge: 199,
AdjacencyLowerLeftEdge: 7,
AdjacencyLeftEdge: 31,
AdjacencyUpperLeftEdge: 28,
AdjacencyUpperRightCorner: 223,
AdjacencyLowerRightCorner: 127,
AdjacencyLowerLeftCorner: 253,
AdjacencyUpperLeftCorner: 247,
};
declare const SKInterpolationMode: {
Linear: 1,
Spline: 2,
Step: 3,
};
declare const SKUniformType: {
None: 0,
Float: 1,
FloatVector2: 2,
FloatVector3: 3,
FloatVector4: 4,
FloatMatrix2: 5,
FloatMatrix3: 6,
FloatMatrix4: 7,
Texture: 8,
};
declare const SKRepeatMode: {
Clamp: 1,
Loop: 2,
};
declare const SKLabelHorizontalAlignmentMode: {
Center: 0,
Left: 1,
Right: 2,
};
declare interface SKSceneDelegate extends NSObjectProtocol {
updateForScene?(currentTime: number, scene: SKScene): void;
didEvaluateActionsForScene?(scene: SKScene): void;
didSimulatePhysicsForScene?(scene: SKScene): void;
didApplyConstraintsForScene?(scene: SKScene): void;
didFinishUpdateForScene?(scene: SKScene): void;
}
declare class SKSceneDelegate extends NativeObject implements SKSceneDelegate {
}
declare interface SKWarpable extends NSObjectProtocol {
warpGeometry: SKWarpGeometry;
subdivisionLevels: number;
}
declare class SKWarpable extends NativeObject implements SKWarpable {
}
declare interface SKPhysicsContactDelegate extends NSObjectProtocol {
didBeginContact?(contact: SKPhysicsContact): void;
didEndContact?(contact: SKPhysicsContact): void;
}
declare class SKPhysicsContactDelegate extends NativeObject implements SKPhysicsContactDelegate {
}
declare interface SKViewDelegate extends NSObjectProtocol {
viewShouldRenderAtTime?(view: SKView, time: number): boolean;
}
declare class SKViewDelegate extends NativeObject implements SKViewDelegate {
}
declare class SKPhysicsJointLimit extends SKPhysicsJoint {
maxLength: number;
static jointWithBodyABodyBAnchorAAnchorB(bodyA: SKPhysicsBody, bodyB: SKPhysicsBody, anchorA: CGPoint, anchorB: CGPoint): SKPhysicsJointLimit;
}
declare class SKPhysicsJointSliding extends SKPhysicsJoint {
static jointWithBodyABodyBAnchorAxis(bodyA: SKPhysicsBody, bodyB: SKPhysicsBody, anchor: CGPoint, axis: CGVector): SKPhysicsJointSliding;
shouldEnableLimits: boolean;
lowerDistanceLimit: number;
upperDistanceLimit: number;
}
declare class SKPhysicsJointSpring extends SKPhysicsJoint {
static jointWithBodyABodyBAnchorAAnchorB(bodyA: SKPhysicsBody, bodyB: SKPhysicsBody, anchorA: CGPoint, anchorB: CGPoint): SKPhysicsJointSpring;
damping: number;
frequency: number;
}
declare class SKPhysicsJointPin extends SKPhysicsJoint {
static jointWithBodyABodyBAnchor(bodyA: SKPhysicsBody, bodyB: SKPhysicsBody, anchor: CGPoint): SKPhysicsJointPin;
shouldEnableLimits: boolean;
lowerAngleLimit: number;
upperAngleLimit: number;
frictionTorque: number;
rotationSpeed: number;
}
declare class SKReachConstraints extends NSObject implements NSSecureCoding {
lowerAngleLimit: number;
upperAngleLimit: number;
initWithLowerAngleLimitUpperAngleLimit(lowerAngleLimit: number, upperAngleLimit: number): this;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKConstraint extends NSObject implements NSSecureCoding, NSCopying {
enabled: boolean;
referenceNode: SKNode;
static positionX<This extends abstract new (...args: any) => any>(this: This, range: SKRange): InstanceType<This>;
static positionY<This extends abstract new (...args: any) => any>(this: This, range: SKRange): InstanceType<This>;
static positionXY<This extends abstract new (...args: any) => any>(this: This, xRange: SKRange, yRange: SKRange): InstanceType<This>;
static distanceToNode<This extends abstract new (...args: any) => any>(this: This, range: SKRange, node: SKNode): InstanceType<This>;
static distanceToPoint<This extends abstract new (...args: any) => any>(this: This, range: SKRange, point: CGPoint): InstanceType<This>;
static distanceToPointInNode<This extends abstract new (...args: any) => any>(this: This, range: SKRange, point: CGPoint, node: SKNode): InstanceType<This>;
static zRotation<This extends abstract new (...args: any) => any>(this: This, zRange: SKRange): InstanceType<This>;
static orientToNodeOffset<This extends abstract new (...args: any) => any>(this: This, node: SKNode, radians: SKRange): InstanceType<This>;
static orientToPointOffset<This extends abstract new (...args: any) => any>(this: This, point: CGPoint, radians: SKRange): InstanceType<This>;
static orientToPointInNodeOffset<This extends abstract new (...args: any) => any>(this: This, point: CGPoint, node: SKNode, radians: SKRange): InstanceType<This>;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class SKMutableTexture extends SKTexture {
initWithSize(size: CGSize): this;
static mutableTextureWithSize<This extends abstract new (...args: any) => any>(this: This, size: CGSize): InstanceType<This>;
initWithSizePixelFormat(size: CGSize, format: number): this;
modifyPixelDataWithBlock(block: (p1: interop.PointerConvertible, p2: number) => void): void;
}
declare class SKTileGroup extends NSObject implements NSCopying, NSSecureCoding {
static tileGroupWithTileDefinition<This extends abstract new (...args: any) => any>(this: This, tileDefinition: SKTileDefinition): InstanceType<This>;
static tileGroupWithRules<This extends abstract new (...args: any) => any>(this: This, rules: NSArray<interop.Object> | Array<interop.Object>): InstanceType<This>;
static emptyTileGroup<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>;
initWithTileDefinition(tileDefinition: SKTileDefinition): this;
initWithRules(rules: NSArray<interop.Object> | Array<interop.Object>): this;
get rules(): NSArray;
set rules(value: NSArray<interop.Object> | Array<interop.Object>);
name: string;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKTileSet extends NSObject implements NSCopying, NSSecureCoding {
static tileSetWithTileGroups<This extends abstract new (...args: any) => any>(this: This, tileGroups: NSArray<interop.Object> | Array<interop.Object>): InstanceType<This>;
static tileSetWithTileGroupsTileSetType<This extends abstract new (...args: any) => any>(this: This, tileGroups: NSArray<interop.Object> | Array<interop.Object>, tileSetType: interop.Enum<typeof SKTileSetType>): InstanceType<This>;
initWithTileGroups(tileGroups: NSArray<interop.Object> | Array<interop.Object>): this;
initWithTileGroupsTileSetType(tileGroups: NSArray<interop.Object> | Array<interop.Object>, tileSetType: interop.Enum<typeof SKTileSetType>): this;
static tileSetNamed<This extends abstract new (...args: any) => any>(this: This, name: string): InstanceType<This>;
static tileSetFromURL<This extends abstract new (...args: any) => any>(this: This, url: NSURL): InstanceType<This>;
get tileGroups(): NSArray;
set tileGroups(value: NSArray<interop.Object> | Array<interop.Object>);
name: string;
type: interop.Enum<typeof SKTileSetType>;
defaultTileGroup: SKTileGroup;
defaultTileSize: CGSize;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKTileDefinition extends NSObject implements NSCopying, NSSecureCoding {
static tileDefinitionWithTexture<This extends abstract new (...args: any) => any>(this: This, texture: SKTexture): InstanceType<This>;
static tileDefinitionWithTextureSize<This extends abstract new (...args: any) => any>(this: This, texture: SKTexture, size: CGSize): InstanceType<This>;
static tileDefinitionWithTextureNormalTextureSize<This extends abstract new (...args: any) => any>(this: This, texture: SKTexture, normalTexture: SKTexture, size: CGSize): InstanceType<This>;
static tileDefinitionWithTexturesSizeTimePerFrame<This extends abstract new (...args: any) => any>(this: This, textures: NSArray<interop.Object> | Array<interop.Object>, size: CGSize, timePerFrame: number): InstanceType<This>;
static tileDefinitionWithTexturesNormalTexturesSizeTimePerFrame<This extends abstract new (...args: any) => any>(this: This, textures: NSArray<interop.Object> | Array<interop.Object>, normalTextures: NSArray<interop.Object> | Array<interop.Object>, size: CGSize, timePerFrame: number): InstanceType<This>;
initWithTexture(texture: SKTexture): this;
initWithTextureSize(texture: SKTexture, size: CGSize): this;
initWithTextureNormalTextureSize(texture: SKTexture, normalTexture: SKTexture, size: CGSize): this;
initWithTexturesSizeTimePerFrame(textures: NSArray<interop.Object> | Array<interop.Object>, size: CGSize, timePerFrame: number): this;
initWithTexturesNormalTexturesSizeTimePerFrame(textures: NSArray<interop.Object> | Array<interop.Object>, normalTextures: NSArray<interop.Object> | Array<interop.Object>, size: CGSize, timePerFrame: number): this;
get textures(): NSArray;
set textures(value: NSArray<interop.Object> | Array<interop.Object>);
get normalTextures(): NSArray;
set normalTextures(value: NSArray<interop.Object> | Array<interop.Object>);
userData: NSMutableDictionary;
name: string;
size: CGSize;
timePerFrame: number;
placementWeight: number;
rotation: interop.Enum<typeof SKTileDefinitionRotation>;
flipVertically: boolean;
flipHorizontally: boolean;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKAttributeValue extends NSObject implements NSSecureCoding {
static valueWithFloat<This extends abstract new (...args: any) => any>(this: This, value: number): InstanceType<This>;
static valueWithVectorFloat2<This extends abstract new (...args: any) => any>(this: This, value: unknown /* ext vector */): InstanceType<This>;
static valueWithVectorFloat3<This extends abstract new (...args: any) => any>(this: This, value: unknown /* ext vector */): InstanceType<This>;
static valueWithVectorFloat4<This extends abstract new (...args: any) => any>(this: This, value: unknown /* ext vector */): InstanceType<This>;
init(): this;
floatValue: number;
vectorFloat2Value: unknown /* ext vector */;
vectorFloat3Value: unknown /* ext vector */;
vectorFloat4Value: unknown /* ext vector */;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKAttribute extends NSObject implements NSSecureCoding {
static attributeWithNameType<This extends abstract new (...args: any) => any>(this: This, name: string, type: interop.Enum<typeof SKAttributeType>): InstanceType<This>;
initWithNameType(name: string, type: interop.Enum<typeof SKAttributeType>): this;
readonly name: string;
readonly type: interop.Enum<typeof SKAttributeType>;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKTexture extends NSObject implements NSCopying, NSSecureCoding {
static textureWithImageNamed<This extends abstract new (...args: any) => any>(this: This, name: string): InstanceType<This>;
static textureWithRectInTexture<This extends abstract new (...args: any) => any>(this: This, rect: CGRect, texture: SKTexture): InstanceType<This>;
static textureVectorNoiseWithSmoothnessSize<This extends abstract new (...args: any) => any>(this: This, smoothness: number, size: CGSize): InstanceType<This>;
static textureNoiseWithSmoothnessSizeGrayscale<This extends abstract new (...args: any) => any>(this: This, smoothness: number, size: CGSize, grayscale: boolean): InstanceType<This>;
static textureWithCGImage<This extends abstract new (...args: any) => any>(this: This, image: interop.PointerConvertible): InstanceType<This>;
static textureWithImage<This extends abstract new (...args: any) => any>(this: This, image: NSImage): InstanceType<This>;
static textureWithDataSize<This extends abstract new (...args: any) => any>(this: This, pixelData: NSData, size: CGSize): InstanceType<This>;
static textureWithDataSizeFlipped<This extends abstract new (...args: any) => any>(this: This, pixelData: NSData, size: CGSize, flipped: boolean): InstanceType<This>;
static textureWithDataSizeRowLengthAlignment<This extends abstract new (...args: any) => any>(this: This, pixelData: NSData, size: CGSize, rowLength: number, alignment: number): InstanceType<This>;
textureByApplyingCIFilter(filter: CIFilter): this;
textureByGeneratingNormalMap(): this;
textureByGeneratingNormalMapWithSmoothnessContrast(smoothness: number, contrast: number): this;
textureRect(): CGRect;
size(): CGSize;
filteringMode: interop.Enum<typeof SKTextureFilteringMode>;
usesMipmaps: boolean;
CGImage(): interop.Pointer;
static preloadTexturesWithCompletionHandler(textures: NSArray<interop.Object> | Array<interop.Object>, completionHandler: () => void): void;
preloadWithCompletionHandler(completionHandler: () => void): void;
static textureWithNoiseMap<This extends abstract new (...args: any) => any>(this: This, noiseMap: GKNoiseMap): InstanceType<This>;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKView extends NSView implements NSSecureCoding {
isPaused: boolean;
showsFPS: boolean;
showsDrawCount: boolean;
showsNodeCount: boolean;
showsQuadCount: boolean;
showsPhysics: boolean;
showsFields: boolean;
isAsynchronous: boolean;
allowsTransparency: boolean;
ignoresSiblingOrder: boolean;
shouldCullNonVisibleNodes: boolean;
preferredFramesPerSecond: number;
disableDepthStencilBuffer: boolean;
delegate: NSObject;
frameInterval: number;
preferredFrameRate: number;
presentScene(scene: SKScene | null): void;
presentSceneTransition(scene: SKScene, transition: SKTransition): void;
readonly scene: SKScene;
textureFromNode(node: SKNode): SKTexture;
textureFromNodeCrop(node: SKNode, crop: CGRect): SKTexture;
convertPointToScene(point: CGPoint, scene: SKScene): CGPoint;
convertPointFromScene(point: CGPoint, scene: SKScene): CGPoint;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class SKCameraNode extends SKNode {
containsNode(node: SKNode): boolean;
containedNodeSet(): NSSet;
}
declare class SKTransformNode extends SKNode {
xRotation: number;
yRotation: number;
setEulerAngles(euler: unknown /* ext vector */): void;
eulerAngles(): unknown /* ext vector */;
setRotationMatrix(rotationMatrix: simd_float3x3): void;
rotationMatrix(): simd_float3x3;
setQuaternion(quaternion: simd_quatf): void;
quaternion(): simd_quatf;
}
// @ts-ignore ClassDecl.tsIgnore
declare class SK3DNode extends SKNode {
initWithViewportSize(viewportSize: CGSize): this;
// @ts-ignore MemberDecl.tsIgnore
initWithCoder(aDecoder: NSCoder): this;
static nodeWithViewportSize<This extends abstract new (...args: any) => any>(this: This, viewportSize: CGSize): InstanceType<This>;
viewportSize: CGSize;
scnScene: SCNScene;
sceneTime: number;
hitTestOptions(point: CGPoint, options: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object> | null): NSArray;
projectPoint(point: unknown /* ext vector */): unknown /* ext vector */;
unprojectPoint(point: unknown /* ext vector */): unknown /* ext vector */;
isPlaying: boolean;
loops: boolean;
pointOfView: SCNNode;
autoenablesDefaultLighting: boolean;
}
declare class SKCropNode extends SKNode {
maskNode: SKNode;
}
// @ts-ignore ClassDecl.tsIgnore
declare class SKVideoNode extends SKNode {
static videoNodeWithAVPlayer(player: AVPlayer): SKVideoNode;
static videoNodeWithVideoFileNamed(videoFile: string): SKVideoNode;
static videoNodeWithFileNamed(videoFile: string): SKVideoNode;
static videoNodeWithVideoURL(videoURL: NSURL): SKVideoNode;
static videoNodeWithURL(videoURL: NSURL): SKVideoNode;
initWithAVPlayer(player: AVPlayer): this;
initWithVideoFileNamed(videoFile: string): this;
initWithFileNamed(videoFile: string): this;
initWithVideoURL(url: NSURL): this;
initWithURL(url: NSURL): this;
// @ts-ignore MemberDecl.tsIgnore
initWithCoder(aDecoder: NSCoder): this;
play(): void;
pause(): void;
size: CGSize;
anchorPoint: CGPoint;
}
declare class SKShapeNode extends SKNode {
static shapeNodeWithPath<This extends abstract new (...args: any) => any>(this: This, path: interop.PointerConvertible): InstanceType<This>;
static shapeNodeWithPathCentered<This extends abstract new (...args: any) => any>(this: This, path: interop.PointerConvertible, centered: boolean): InstanceType<This>;
static shapeNodeWithRect<This extends abstract new (...args: any) => any>(this: This, rect: CGRect): InstanceType<This>;
static shapeNodeWithRectOfSize<This extends abstract new (...args: any) => any>(this: This, size: CGSize): InstanceType<This>;
static shapeNodeWithRectCornerRadius<This extends abstract new (...args: any) => any>(this: This, rect: CGRect, cornerRadius: number): InstanceType<This>;
static shapeNodeWithRectOfSizeCornerRadius<This extends abstract new (...args: any) => any>(this: This, size: CGSize, cornerRadius: number): InstanceType<This>;
static shapeNodeWithCircleOfRadius<This extends abstract new (...args: any) => any>(this: This, radius: number): InstanceType<This>;
static shapeNodeWithEllipseInRect<This extends abstract new (...args: any) => any>(this: This, rect: CGRect): InstanceType<This>;
static shapeNodeWithEllipseOfSize<This extends abstract new (...args: any) => any>(this: This, size: CGSize): InstanceType<This>;
static shapeNodeWithPointsCount<This extends abstract new (...args: any) => any>(this: This, points: interop.PointerConvertible, numPoints: number): InstanceType<This>;
static shapeNodeWithSplinePointsCount<This extends abstract new (...args: any) => any>(this: This, points: interop.PointerConvertible, numPoints: number): InstanceType<This>;
get path(): interop.Pointer;
set path(value: interop.PointerConvertible);
strokeColor: NSColor;
fillColor: NSColor;
blendMode: interop.Enum<typeof SKBlendMode>;
isAntialiased: boolean;
lineWidth: number;
glowWidth: number;
lineCap: interop.Enum<typeof CGLineCap>;
lineJoin: interop.Enum<typeof CGLineJoin>;
miterLimit: number;
readonly lineLength: number;
fillTexture: SKTexture;
fillShader: SKShader;
strokeTexture: SKTexture;
strokeShader: SKShader;
get attributeValues(): NSDictionary;
set attributeValues(value: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>);
valueForAttributeNamed(key: string): SKAttributeValue;
setValueForAttributeNamed(value: SKAttributeValue, key: string): void;
}
declare class SKScene extends SKEffectNode {
initWithSize(size: CGSize): this;
static sceneWithSize<This extends abstract new (...args: any) => any>(this: This, size: CGSize): InstanceType<This>;
sceneDidLoad(): void;
size: CGSize;
scaleMode: interop.Enum<typeof SKSceneScaleMode>;
camera: SKCameraNode;
listener: SKNode;
readonly audioEngine: AVAudioEngine;
backgroundColor: NSColor;
delegate: SKSceneDelegate;
anchorPoint: CGPoint;
readonly physicsWorld: SKPhysicsWorld;
readonly view: SKView;
convertPointFromView(point: CGPoint): CGPoint;
convertPointToView(point: CGPoint): CGPoint;
update(currentTime: number): void;
didEvaluateActions(): void;
didSimulatePhysics(): void;
didApplyConstraints(): void;
didFinishUpdate(): void;
didMoveToView(view: SKView): void;
willMoveFromView(view: SKView): void;
didChangeSize(oldSize: CGSize): void;
}
// @ts-ignore ClassDecl.tsIgnore
declare class SKWarpGeometryGrid extends SKWarpGeometry implements NSSecureCoding {
// @ts-ignore MemberDecl.tsIgnore
initWithCoder(aDecoder: NSCoder): this;
static grid<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>;
static gridWithColumnsRows<This extends abstract new (...args: any) => any>(this: This, cols: number, rows: number): InstanceType<This>;
static gridWithColumnsRowsSourcePositionsDestPositions<This extends abstract new (...args: any) => any>(this: This, cols: number, rows: number, sourcePositions: interop.PointerConvertible, destPositions: interop.PointerConvertible): InstanceType<This>;
initWithColumnsRowsSourcePositionsDestPositions(cols: number, rows: number, sourcePositions: interop.PointerConvertible, destPositions: interop.PointerConvertible): this;
readonly numberOfColumns: number;
readonly numberOfRows: number;
readonly vertexCount: number;
sourcePositionAtIndex(index: number): unknown /* ext vector */;
destPositionAtIndex(index: number): unknown /* ext vector */;
gridByReplacingSourcePositions(sourcePositions: interop.PointerConvertible): this;
gridByReplacingDestPositions(destPositions: interop.PointerConvertible): this;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
}
declare class SKWarpGeometry extends NSObject implements NSCopying, NSSecureCoding {
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
// @ts-ignore ClassDecl.tsIgnore
declare class SKNode extends NSResponder implements NSCopying, NSSecureCoding {
init(): this;
// @ts-ignore MemberDecl.tsIgnore
initWithCoder(aDecoder: NSCoder): this;
static node<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>;
static nodeWithFileNamed<This extends abstract new (...args: any) => any>(this: This, filename: string): InstanceType<This>;
static nodeWithFileNamedSecurelyWithClassesAndError<This extends abstract new (...args: any) => any>(this: This, filename: string, classes: NSSet, error: interop.PointerConvertible): InstanceType<This>;
readonly frame: CGRect;
calculateAccumulatedFrame(): CGRect;
position: CGPoint;
zPosition: number;
zRotation: number;
xScale: number;
yScale: number;
speed: number;
alpha: number;
isPaused: boolean;
isHidden: boolean;
isUserInteractionEnabled: boolean;
readonly parent: SKNode;
readonly children: NSArray;
name: string;
readonly scene: SKScene;
physicsBody: SKPhysicsBody;
userData: NSMutableDictionary;
reachConstraints: SKReachConstraints;
get constraints(): NSArray;
set constraints(value: NSArray<interop.Object> | Array<interop.Object>);
get attributeValues(): NSDictionary;
set attributeValues(value: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>);
valueForAttributeNamed(key: string): SKAttributeValue;
setValueForAttributeNamed(value: SKAttributeValue, key: string): void;
setScale(scale: number): void;
addChild(node: SKNode): void;
insertChildAtIndex(node: SKNode, index: number): void;
removeChildrenInArray(nodes: NSArray<interop.Object> | Array<interop.Object>): void;
removeAllChildren(): void;
removeFromParent(): void;
moveToParent(parent: SKNode): void;
childNodeWithName(name: string): SKNode;
enumerateChildNodesWithNameUsingBlock(name: string, block: (p1: SKNode, p2: interop.PointerConvertible) => void): void;
objectForKeyedSubscript(name: string): NSArray;
inParentHierarchy(parent: SKNode): boolean;
runAction(action: SKAction): void;
runActionCompletion(action: SKAction, block: () => void): void;
runActionWithKey(action: SKAction, key: string): void;
hasActions(): boolean;
actionForKey(key: string): SKAction;
removeActionForKey(key: string): void;
removeAllActions(): void;
containsPoint(p: CGPoint): boolean;
nodeAtPoint(p: CGPoint): SKNode;
nodesAtPoint(p: CGPoint): NSArray;
convertPointFromNode(point: CGPoint, node: SKNode): CGPoint;
convertPointToNode(point: CGPoint, node: SKNode): CGPoint;
intersectsNode(node: SKNode): boolean;
isEqualToNode(node: SKNode): boolean;
isAccessibilityElement: boolean;
accessibilityRole: string;
accessibilityRoleDescription: string;
accessibilitySubrole: string;
accessibilityFrame: CGRect;
accessibilityParent: interop.Object;
get accessibilityChildren(): NSArray;
set accessibilityChildren(value: NSArray<interop.Object> | Array<interop.Object>);
accessibilityHelp: string;
accessibilityLabel: string;
isAccessibilityEnabled: boolean;
accessibilityHitTest(point: CGPoint): interop.Object;
static obstaclesFromSpriteTexturesAccuracy(sprites: NSArray<interop.Object> | Array<interop.Object>, accuracy: number): NSArray;
static obstaclesFromNodeBounds(nodes: NSArray<interop.Object> | Array<interop.Object>): NSArray;
static obstaclesFromNodePhysicsBodies(nodes: NSArray<interop.Object> | Array<interop.Object>): NSArray;
entity: GKEntity;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
}
// @ts-ignore ClassDecl.tsIgnore
declare class SKSpriteNode extends SKNode implements SKWarpable {
static spriteNodeWithTextureSize<This extends abstract new (...args: any) => any>(this: This, texture: SKTexture | null, size: CGSize): InstanceType<This>;
static spriteNodeWithTexture<This extends abstract new (...args: any) => any>(this: This, texture: SKTexture | null): InstanceType<This>;
static spriteNodeWithTextureNormalMap<This extends abstract new (...args: any) => any>(this: This, texture: SKTexture | null, normalMap: SKTexture | null): InstanceType<This>;
static spriteNodeWithImageNamed<This extends abstract new (...args: any) => any>(this: This, name: string): InstanceType<This>;
static spriteNodeWithImageNamedNormalMapped<This extends abstract new (...args: any) => any>(this: This, name: string, generateNormalMap: boolean): InstanceType<This>;
static spriteNodeWithColorSize<This extends abstract new (...args: any) => any>(this: This, color: NSColor, size: CGSize): InstanceType<This>;
initWithTextureColorSize(texture: SKTexture | null, color: NSColor, size: CGSize): this;
initWithTexture(texture: SKTexture | null): this;
initWithImageNamed(name: string): this;
initWithColorSize(color: NSColor, size: CGSize): this;
// @ts-ignore MemberDecl.tsIgnore
initWithCoder(aDecoder: NSCoder): this;
texture: SKTexture;
normalTexture: SKTexture;
lightingBitMask: number;
shadowCastBitMask: number;
shadowedBitMask: number;
centerRect: CGRect;
colorBlendFactor: number;
color: NSColor;
blendMode: interop.Enum<typeof SKBlendMode>;
anchorPoint: CGPoint;
size: CGSize;
scaleToSize(size: CGSize): void;
shader: SKShader;
get attributeValues(): NSDictionary;
set attributeValues(value: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object>);
valueForAttributeNamed(key: string): SKAttributeValue;
setValueForAttributeNamed(value: SKAttributeValue, key: string): void;
warpGeometry: SKWarpGeometry;
subdivisionLevels: number;
isEqual(object: interop.Object): boolean;
readonly hash: number;
readonly superclass: interop.Object;