Exemplo n.º 1
0
 protected override void SerializeMembers(UniGLTF.JsonFormatter f)
 {
     f.KeyValue(() => blendShapeGroups);
 }
Exemplo n.º 2
0
 protected override void SerializeMembers(UniGLTF.JsonFormatter f)
 {
     f.KeyValue(() => mesh);
     f.KeyValue(() => index);
     f.KeyValue(() => weight);
 }
Exemplo n.º 3
0
 protected override void SerializeMembers(JsonFormatter f)
 {
     f.KeyValue(() => nodes);
 }
Exemplo n.º 4
0
        protected override void SerializeMembers(JsonFormatter f)
        {
            f.KeyValue(() => asset);

            // buffer
            if (buffers.Any())
            {
                f.KeyValue(() => buffers);
            }
            if (bufferViews.Any())
            {
                f.Key("bufferViews"); f.Value(bufferViews);
            }
            if (accessors.Any())
            {
                f.Key("accessors"); f.Value(accessors);
            }

            // materials
            if (images.Any())
            {
                f.Key("images"); f.Value(images);
                if (samplers.Count == 0)
                {
                    samplers.Add(new glTFTextureSampler());
                }
            }

            if (samplers.Any())
            {
                f.Key("samplers"); f.Value(samplers);
            }

            if (textures.Any())
            {
                f.Key("textures"); f.Value(textures);
            }
            if (materials.Any())
            {
                f.Key("materials"); f.Value(materials);
            }

            // meshes
            if (meshes.Any())
            {
                f.KeyValue(() => meshes);
            }
            if (skins.Any())
            {
                f.KeyValue(() => skins);
            }

            // scene
            if (nodes.Any())
            {
                f.KeyValue(() => nodes);
            }
            if (scenes.Any())
            {
                f.KeyValue(() => scenes);
            }

            // animations
            if (animations.Any())
            {
                f.Key("animations"); f.Value(animations);
            }
        }
Exemplo n.º 5
0
 protected abstract void SerializeMembers(JsonFormatter f);
Exemplo n.º 6
0
 public void Dump(JsonFormatter f)
 {
     f.Dump(Dump());
 }
Exemplo n.º 7
0
 protected override void SerializeMembers(JsonFormatter f)
 {
     f.KeyValue(() => sampler);
     f.KeyValue(() => source);
 }