-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpart-data.ts
147 lines (118 loc) · 5.07 KB
/
part-data.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
// automatically generated by the FlatBuffers compiler, do not modify
import * as flatbuffers from 'flatbuffers';
import { SsPartType } from '../../ss/ssfb/ss-part-type.js';
export class PartData {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):PartData {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsPartData(bb:flatbuffers.ByteBuffer, obj?:PartData):PartData {
return (obj || new PartData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsPartData(bb:flatbuffers.ByteBuffer, obj?:PartData):PartData {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new PartData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
index():number {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
}
parentIndex():number {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
}
type():SsPartType {
const offset = this.bb!.__offset(this.bb_pos, 10);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : SsPartType.Nulltype;
}
boundsType():number {
const offset = this.bb!.__offset(this.bb_pos, 12);
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
}
alphaBlendType():number {
const offset = this.bb!.__offset(this.bb_pos, 14);
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
}
refname():string|null
refname(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
refname(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 16);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
effectfilename():string|null
effectfilename(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
effectfilename(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 18);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
colorLabel():string|null
colorLabel(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
colorLabel(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 20);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
maskInfluence():number {
const offset = this.bb!.__offset(this.bb_pos, 22);
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
}
static startPartData(builder:flatbuffers.Builder) {
builder.startObject(10);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static addIndex(builder:flatbuffers.Builder, index:number) {
builder.addFieldInt16(1, index, 0);
}
static addParentIndex(builder:flatbuffers.Builder, parentIndex:number) {
builder.addFieldInt16(2, parentIndex, 0);
}
static addType(builder:flatbuffers.Builder, type:SsPartType) {
builder.addFieldInt8(3, type, SsPartType.Nulltype);
}
static addBoundsType(builder:flatbuffers.Builder, boundsType:number) {
builder.addFieldInt16(4, boundsType, 0);
}
static addAlphaBlendType(builder:flatbuffers.Builder, alphaBlendType:number) {
builder.addFieldInt16(5, alphaBlendType, 0);
}
static addRefname(builder:flatbuffers.Builder, refnameOffset:flatbuffers.Offset) {
builder.addFieldOffset(6, refnameOffset, 0);
}
static addEffectfilename(builder:flatbuffers.Builder, effectfilenameOffset:flatbuffers.Offset) {
builder.addFieldOffset(7, effectfilenameOffset, 0);
}
static addColorLabel(builder:flatbuffers.Builder, colorLabelOffset:flatbuffers.Offset) {
builder.addFieldOffset(8, colorLabelOffset, 0);
}
static addMaskInfluence(builder:flatbuffers.Builder, maskInfluence:number) {
builder.addFieldInt16(9, maskInfluence, 0);
}
static endPartData(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createPartData(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, index:number, parentIndex:number, type:SsPartType, boundsType:number, alphaBlendType:number, refnameOffset:flatbuffers.Offset, effectfilenameOffset:flatbuffers.Offset, colorLabelOffset:flatbuffers.Offset, maskInfluence:number):flatbuffers.Offset {
PartData.startPartData(builder);
PartData.addName(builder, nameOffset);
PartData.addIndex(builder, index);
PartData.addParentIndex(builder, parentIndex);
PartData.addType(builder, type);
PartData.addBoundsType(builder, boundsType);
PartData.addAlphaBlendType(builder, alphaBlendType);
PartData.addRefname(builder, refnameOffset);
PartData.addEffectfilename(builder, effectfilenameOffset);
PartData.addColorLabel(builder, colorLabelOffset);
PartData.addMaskInfluence(builder, maskInfluence);
return PartData.endPartData(builder);
}
}