protected override void SerializeMembers(GLTFJsonFormatter f) { if (!String.IsNullOrEmpty(name)) { f.Key("name"); f.Value(name); } if (pbrMetallicRoughness != null) { f.Key("pbrMetallicRoughness"); f.GLTFValue(pbrMetallicRoughness); } if (normalTexture != null) { f.Key("normalTexture"); f.GLTFValue(normalTexture); } if (occlusionTexture != null) { f.Key("occlusionTexture"); f.GLTFValue(occlusionTexture); } if (emissiveTexture != null) { f.Key("emissiveTexture"); f.GLTFValue(emissiveTexture); } if (emissiveFactor != null) { f.Key("emissiveFactor"); f.Value(emissiveFactor); } f.KeyValue(() => doubleSided); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.Key("magFilter"); f.Value((int)magFilter); f.Key("minFilter"); f.Value((int)minFilter); f.Key("wrapS"); f.Value((int)wrapS); f.Key("wrapT"); f.Value((int)wrapT); }
void PrimitiveMembers(GLTFJsonFormatter f) { if (targetNames.Count > 0) { f.Key("targetNames"); f.BeginList(); foreach (var x in targetNames) { f.Value(x); } f.EndList(); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { if (children != null && children.Any()) { f.Key("children"); f.BeginList(); foreach (var child in children) { f.Value(child); } f.EndList(); } if (!string.IsNullOrEmpty(name)) { f.KeyValue(() => name); } if (matrix != null) { f.KeyValue(() => matrix); } if (translation != null) { f.KeyValue(() => translation); } if (rotation != null) { f.KeyValue(() => rotation); } if (scale != null) { f.KeyValue(() => scale); } if (mesh >= 0) { f.KeyValue(() => mesh); } if (camera >= 0) { f.KeyValue(() => camera); } if (skin >= 0) { f.KeyValue(() => skin); if (extras.__count > 0) { f.KeyValue(() => extras); } } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => buffer); f.KeyValue(() => byteOffset); f.KeyValue(() => byteLength); if (target != glBufferTarget.NONE) { f.Key("target"); f.Value((int)target); } if (byteStride >= 4) { f.KeyValue(() => byteStride); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => buffer); f.KeyValue(() => byteOffset); f.KeyValue(() => byteLength); if (target != glBufferTarget.NONE) { f.Key("target"); f.Value((int)target); } /* When this is not defined, data is tightly packed. When two or more accessors use the same bufferView, this field must be defined. * if (byteStride >= 4) * { * f.KeyValue(() => byteStride); * } */ }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => bufferView); f.KeyValue(() => byteOffset); f.KeyValue(() => type); f.Key("componentType"); f.Value((int)componentType); f.KeyValue(() => count); if (max != null && max.Any()) { f.KeyValue(() => max); } if (min != null && min.Any()) { f.KeyValue(() => min); } if (sparse != null && sparse.count > 0) { f.KeyValue(() => sparse); } f.KeyValue(() => normalized); f.KeyValue(() => name); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => bufferView); f.KeyValue(() => byteOffset); f.Key("componentType"); f.Value((int)componentType); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.Key("generator"); f.Value(generator); f.Key("version"); f.Value(version); }