(start xml.StartElement, la *LibraryAnimations)
| 119 | } |
| 120 | |
| 121 | func (d *Decoder) decAnimation(start xml.StartElement, la *LibraryAnimations) error { |
| 122 | |
| 123 | anim := new(Animation) |
| 124 | la.Animation = append(la.Animation, anim) |
| 125 | anim.Id = findAttrib(start, "id").Value |
| 126 | anim.Name = findAttrib(start, "name").Value |
| 127 | |
| 128 | for { |
| 129 | child, _, err := d.decNextChild(start) |
| 130 | if err != nil || child.Name.Local == "" { |
| 131 | return err |
| 132 | } |
| 133 | if child.Name.Local == "source" { |
| 134 | source, err := d.decSource(child) |
| 135 | if err != nil { |
| 136 | return err |
| 137 | } |
| 138 | anim.Source = append(anim.Source, source) |
| 139 | continue |
| 140 | } |
| 141 | if child.Name.Local == "sampler" { |
| 142 | err = d.decSampler(child, anim) |
| 143 | if err != nil { |
| 144 | return nil |
| 145 | } |
| 146 | continue |
| 147 | } |
| 148 | if child.Name.Local == "channel" { |
| 149 | err = d.decChannel(child, anim) |
| 150 | if err != nil { |
| 151 | return nil |
| 152 | } |
| 153 | continue |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | func (d *Decoder) decSampler(start xml.StartElement, anim *Animation) error { |
| 159 |
no test coverage detected