pack method
Serialize the object using the given builder, returning the offset.
Implementation
@override
int pack(fb.Builder fbBuilder) {
fbBuilder.startTable(12);
fbBuilder.addInt8(0, type.value);
if (baseColorFactor != null) {
fbBuilder.addStruct(1, baseColorFactor!.pack(fbBuilder));
}
fbBuilder.addInt32(2, baseColorTexture);
fbBuilder.addFloat32(3, metallicFactor);
fbBuilder.addFloat32(4, roughnessFactor);
fbBuilder.addInt32(5, metallicRoughnessTexture);
fbBuilder.addFloat32(6, normalScale);
fbBuilder.addInt32(7, normalTexture);
if (emissiveFactor != null) {
fbBuilder.addStruct(8, emissiveFactor!.pack(fbBuilder));
}
fbBuilder.addInt32(9, emissiveTexture);
fbBuilder.addFloat32(10, occlusionStrength);
fbBuilder.addInt32(11, occlusionTexture);
return fbBuilder.endTable();
}