Skip to content

Commit 5fc0467

Browse files
committed
finish documenting
1 parent 4f0e199 commit 5fc0467

File tree

1 file changed

+94
-3
lines changed

1 file changed

+94
-3
lines changed

src/index.ts

Lines changed: 94 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ export interface MarkerParam {
5050
* Composition or Layer marker objects
5151
*/
5252
export class MarkerKey {
53-
readonly time: number = 0;
54-
readonly index: number = 1;
5553
/**
5654
* Duration, in seconds, of marker.
5755
*/
@@ -900,26 +898,92 @@ export class Layer {
900898
* The project color depth value. For example, colorDepth returns 16 when the project color depth is 16 bits per channel.
901899
*/
902900
readonly colorDepth: number = 8;
901+
/**
902+
* The name of the layer
903+
*/
903904
readonly name: string = "Layer name";
905+
/**
906+
* The source Comp or source Footage object for the layer. Default time is adjusted to the time in the source
907+
*/
904908
readonly source?: Comp | Footage = thisComp;
909+
/**
910+
* The width of the layer in pixels, same as `source.width`
911+
*/
905912
readonly width: number = 1920;
913+
/**
914+
* The height of the layer in pixels, same as `source.height`
915+
*/
906916
readonly height: number = 1080;
917+
/**
918+
* The index number of the layer in the composition
919+
*/
907920
readonly index: number = 0;
921+
/**
922+
* The parent Layer object of the layer, if it has one
923+
*/
908924
readonly parent?: Layer | Light | Camera = thisLayer;
925+
/**
926+
* Whether the layer has a parent layer
927+
*/
909928
readonly hasParent: boolean = true;
929+
/**
930+
* The in point of the layer, in seconds
931+
*/
910932
readonly inPoint: number = 0;
933+
/**
934+
* The out point of the layer in seconds
935+
*/
911936
readonly outPoint: number = 1;
937+
/**
938+
* The start time of the layer in seconds
939+
*/
912940
readonly startTime: number = 0;
941+
/**
942+
* Whether the layer has video data
943+
*/
913944
readonly hasVideo: boolean = true;
945+
/**
946+
* Whether the layer has audio data
947+
*/
914948
readonly hasAudio: boolean = true;
949+
/**
950+
* Whether the video switch is enabled, and the current time is between in the `inPoint` and `outPoint` of the layer
951+
*/
915952
readonly active: boolean = true;
953+
/**
954+
* Whether the video switch for the layer is enabled
955+
*/
916956
readonly enabled: boolean = true;
957+
/**
958+
* Whether the audio switch is enabled, and the current time is in between the `inPoint` and `outPoint` of the layer
959+
*/
917960
readonly audioActive?: boolean = true;
918-
readonly audioLevels?: Property<number> = new Property(0, "Audio Levels");
961+
/**
962+
* The value of the Audio Levels property of the layer, in decibels. This value is a 2D value; the first value represents the left audio channel, and the second value represents the right. The value is not the amplitude of the audio track of the source material. Instead, it is the value of the Audio Levels property, which may be affected by keyframes.
963+
*/
964+
readonly audioLevels?: Property<Vector2D> = new Property(
965+
[0, 0],
966+
"Audio Levels"
967+
);
968+
/**
969+
* The value of the Time Remap property, in seconds, if Time Remap is enabled.
970+
*/
919971
readonly timeRemap?: Property<number> = new Property(0, "Time Remap");
972+
/**
973+
* The marker property group object
974+
*/
920975
readonly marker?: MarkerProperty = new MarkerProperty();
976+
/**
977+
* The transform property group object
978+
*/
921979
readonly transform?: Transform = new Transform();
980+
/**
981+
* The text property group object
982+
*/
922983
readonly text?: Text = new Text();
984+
/**
985+
* The material options property group object
986+
*/
923987
readonly materialOption?: MaterialOptions = new MaterialOptions();
924988
/**
925989
* Transforms a given vector from the layer's space to the composition space
@@ -1352,14 +1416,41 @@ export class Layer {
13521416
const thisLayer = new Layer();
13531417

13541418
export class Footage {
1419+
/**
1420+
* The name of the footage item as shown in the project panel
1421+
*/
13551422
readonly name: string = "Layer Name";
1423+
/**
1424+
* The width of the footage item, in pixels
1425+
*/
13561426
readonly width?: number = 500;
1427+
/**
1428+
* The height of the footage item, in pixels
1429+
*/
13571430
readonly height?: number = 500;
1431+
/**
1432+
* The duration of the footage item, in seconds
1433+
*/
13581434
readonly duration?: number = 10;
1435+
/**
1436+
* The duration of a frame in the footage item, in seconds
1437+
*/
13591438
readonly frameDuration?: number = 0.04;
1439+
/**
1440+
* Whether the timecode is in NTSC drop-frame format
1441+
*/
13601442
readonly ntscDropFrame?: boolean = false;
1443+
/**
1444+
* The pixel aspect ratio of the footage
1445+
*/
13611446
readonly pixelAspect?: number = 1;
1447+
/**
1448+
* The contents of a JSON file as a string
1449+
*/
13621450
readonly sourceText?: string = "Source Text";
1451+
/**
1452+
* The data of a JSON file as an array of `sourceData` objects
1453+
*/
13631454
readonly sourceData?: SourceData[] = [["source data"]];
13641455
/**
13651456
* @returns The value of specified static or dynamic data stream in a .mgJSON file

0 commit comments

Comments
 (0)