Exemple #1
0
        public ResourcesStore(Types.Gltf gltf, Glb.StoredBuffer buffer, IResourceLoader loader)
        {
            Gltf   = gltf;
            Buffer = buffer;

            Loader = loader;
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public static void WriteWithoutValidation(Stream s, Types.Gltf gltf)
        {
            var js = new JsonSerializer(typeof(Types.Gltf));

            js.Serialize(s, gltf);
        }