finish method

  1. @override
int finish(
  1. Builder fbBuilder
)
override

Finish building, and store into the fbBuilder.

Implementation

@override
int finish(fb.Builder fbBuilder) {
  fbBuilder.startTable(12);
  fbBuilder.addInt8(0, _type?.value);
  if (_baseColorFactor != null) {
    fbBuilder.addStruct(1, _baseColorFactor!.finish(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!.finish(fbBuilder));
  }
  fbBuilder.addInt32(9, _emissiveTexture);
  fbBuilder.addFloat32(10, _occlusionStrength);
  fbBuilder.addInt32(11, _occlusionTexture);
  return fbBuilder.endTable();
}