Пример #1
0
        public static Animation FromGltf(this GltfAnimation src,
                                         GltfSerialization.GltfStorage storage, List <Node> nodes)
        {
            var animation = new Animation(src.name);

            foreach (var ch in src.channels)
            {
                var sampler = src.samplers[ch.sampler];
                var target  = ch.target;
                var node    = nodes[target.node];
                animation.AddCurve(storage, node, (AnimationPathType)target.path, sampler);
            }

            return(animation);
        }