public ResourcesStore(Types.Gltf gltf, Glb.StoredBuffer buffer, IResourceLoader loader) { Gltf = gltf; Buffer = buffer; Loader = loader; }
public static void Write(Stream s, Types.Gltf gltf) { var schema = JsonSchemaAttribute.CreateFromClass <Types.Gltf>(); var ex = schema.Validate(gltf); if (ex != null) { throw ex; } WriteWithoutValidation(s, gltf); }
public static void WriteWithoutValidation(Stream s, Types.Gltf gltf) { var js = new JsonSerializer(typeof(Types.Gltf)); js.Serialize(s, gltf); }