protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => offset); f.KeyValue(() => rotation); f.KeyValue(() => scale); f.KeyValue(() => texCoord); }
protected override void SerializeMembers(GLTFJsonFormatter f) { if (!string.IsNullOrEmpty(uri)) { f.KeyValue(() => uri); } f.KeyValue(() => byteLength); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => node); if (!string.IsNullOrEmpty(path)) { f.KeyValue(() => path); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => name); f.Key("primitives"); f.GLTFValue(primitives); if (weights != null && weights.Length > 0) { f.KeyValue(() => weights); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => inverseBindMatrices); f.KeyValue(() => joints); if (skeleton >= 0) { f.KeyValue(() => skeleton); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => index); f.KeyValue(() => texCoord); if (extensions != null) { f.KeyValue(() => extensions); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => input); if (!string.IsNullOrEmpty(interpolation)) { f.KeyValue(() => interpolation); } f.KeyValue(() => output); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => POSITION); if (NORMAL >= 0) { f.KeyValue(() => NORMAL); } if (TANGENT >= 0) { f.KeyValue(() => TANGENT); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => name); if (!string.IsNullOrEmpty(uri)) { f.KeyValue(() => uri); } else { f.KeyValue(() => bufferView); f.KeyValue(() => mimeType); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => mode); f.KeyValue(() => indices); f.Key("attributes"); f.GLTFValue(attributes); f.KeyValue(() => material); if (targets != null && targets.Count > 0) { f.Key("targets"); f.GLTFValue(targets); } if (extras.targetNames.Count > 0) { f.Key("extras"); f.GLTFValue(extras); } }
void SerializeMembers_textureInfo(GLTFJsonFormatter f) { if (KHR_texture_transform != null) { f.KeyValue(() => KHR_texture_transform); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { if (baseColorTexture != null) { f.Key("baseColorTexture"); f.GLTFValue(baseColorTexture); } if (baseColorFactor != null) { f.KeyValue(() => baseColorFactor); } if (metallicRoughnessTexture != null) { f.Key("metallicRoughnessTexture"); f.GLTFValue(metallicRoughnessTexture); } f.KeyValue(() => metallicFactor); f.KeyValue(() => roughnessFactor); }
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(() => POSITION); if (NORMAL != -1) { f.KeyValue(() => NORMAL); } if (TANGENT != -1) { f.KeyValue(() => TANGENT); } if (TEXCOORD_0 != -1) { f.KeyValue(() => TEXCOORD_0); } if (COLOR_0 != -1) { f.KeyValue(() => COLOR_0); } if (JOINTS_0 != -1) { f.KeyValue(() => JOINTS_0); } if (WEIGHTS_0 != -1) { f.KeyValue(() => WEIGHTS_0); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { if (!string.IsNullOrEmpty(name)) { f.KeyValue(() => name); } f.Key("channels"); f.GLTFValue(channels); f.Key("samplers"); f.GLTFValue(samplers); }
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.Key("extras"); f.GLTFValue(extras); } } }
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.Serialize(emissiveFactor); } f.KeyValue(() => doubleSided); if (!string.IsNullOrEmpty(alphaMode)) { f.KeyValue(() => alphaMode); } if (extensions != null) { f.Key("extensions"); f.GLTFValue(extensions); } }
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.Key("sparse"); f.GLTFValue(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.KeyValue(() => nodes); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => strength); base.SerializeMembers(f); }
protected override void SerializeMembers(GLTFJsonFormatter f) { if (extensionsUsed.Count > 0) { f.Key("extensionsUsed"); f.GLTFValue(extensionsUsed); } if (extensions.__count > 0) { f.Key("extensions"); f.GLTFValue(extensions); } if (extras.__count > 0) { f.Key("extras"); f.GLTFValue(extras); } f.Key("asset"); f.GLTFValue(asset); // buffer if (buffers.Any()) { f.Key("buffers"); f.GLTFValue(buffers); } if (bufferViews.Any()) { f.Key("bufferViews"); f.GLTFValue(bufferViews); } if (accessors.Any()) { f.Key("accessors"); f.GLTFValue(accessors); } // materials if (images.Any()) { f.Key("images"); f.GLTFValue(images); if (samplers.Count == 0) { samplers.Add(new glTFTextureSampler()); } } if (samplers.Any()) { f.Key("samplers"); f.GLTFValue(samplers); } if (textures.Any()) { f.Key("textures"); f.GLTFValue(textures); } if (materials.Any()) { f.Key("materials"); f.GLTFValue(materials); } // meshes if (meshes.Any()) { f.Key("meshes"); f.GLTFValue(meshes); } if (skins.Any()) { f.Key("skins"); f.GLTFValue(skins); } // scene if (nodes.Any()) { f.Key("nodes"); f.GLTFValue(nodes); } if (scenes.Any()) { f.Key("scenes"); f.GLTFValue(scenes); if (scene >= 0) { f.KeyValue(() => scene); } } // animations if (animations.Any()) { f.Key("animations"); f.GLTFValue(animations); } }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => sampler); f.Key("target"); f.GLTFValue(target); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => count); f.Key("indices"); f.GLTFValue(indices); f.Key("values"); f.GLTFValue(values); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => bufferView); f.KeyValue(() => byteOffset); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => index); f.KeyValue(() => texCoord); }
protected override void SerializeMembers(GLTFJsonFormatter f) { f.KeyValue(() => sampler); f.KeyValue(() => source); }