| 1 |
|
| 2 |
export class InnerStruct { |
| 3 |
constructor() { |
| 4 |
this.bb = null; |
| 5 |
this.bb_pos = 0; |
| 6 |
} |
| 7 |
__init(i, bb) { |
| 8 |
this.bb_pos = i; |
| 9 |
this.bb = bb; |
| 10 |
return this; |
| 11 |
} |
| 12 |
a() { |
| 13 |
return this.bb.readFloat64(this.bb_pos); |
| 14 |
} |
| 15 |
b(index) { |
| 16 |
return this.bb.readUint8(this.bb_pos + 8 + index); |
| 17 |
} |
| 18 |
c() { |
| 19 |
return this.bb.readInt8(this.bb_pos + 21); |
| 20 |
} |
| 21 |
dUnderscore() { |
| 22 |
return this.bb.readInt64(this.bb_pos + 24); |
| 23 |
} |
| 24 |
static getFullyQualifiedName() { |
| 25 |
return 'MyGame.Example.InnerStruct'; |
| 26 |
} |
| 27 |
static sizeOf() { |
| 28 |
return 32; |
| 29 |
} |
| 30 |
static createInnerStruct(builder, a, b, c, d_underscore) { |
| 31 |
builder.prep(8, 32); |
| 32 |
builder.writeInt64(BigInt(d_underscore ?? 0)); |
| 33 |
builder.pad(2); |
| 34 |
builder.writeInt8(c); |
| 35 |
for (let i = 12; i >= 0; --i) { |
| 36 |
builder.writeInt8((b?.[i] ?? 0)); |
| 37 |
} |
| 38 |
builder.writeFloat64(a); |
| 39 |
return builder.offset(); |
| 40 |
} |
| 41 |
unpack() { |
| 42 |
return new InnerStructT(this.a(), this.bb.createScalarList(this.b.bind(this), 13), this.c(), this.dUnderscore()); |
| 43 |
} |
| 44 |
unpackTo(_o) { |
| 45 |
_o.a = this.a(); |
| 46 |
_o.b = this.bb.createScalarList(this.b.bind(this), 13); |
| 47 |
_o.c = this.c(); |
| 48 |
_o.dUnderscore = this.dUnderscore(); |
| 49 |
} |
| 50 |
} |
| 51 |
export class InnerStructT { |
| 52 |
constructor(a = 0.0, b = [], c = 0, dUnderscore = BigInt('0')) { |
| 53 |
this.a = a; |
| 54 |
this.b = b; |
| 55 |
this.c = c; |
| 56 |
this.dUnderscore = dUnderscore; |
| 57 |
} |
| 58 |
pack(builder) { |
| 59 |
return InnerStruct.createInnerStruct(builder, this.a, this.b, this.c, this.dUnderscore); |
| 60 |
} |
| 61 |
} |