MCPcopy
hub / github.com/g3n/engine / decAsset

Method decAsset

loader/collada/collada.go:332–359  ·  view source on GitHub ↗
(assetStart xml.StartElement, a *Asset)

Source from the content-addressed store, hash-verified

330}
331
332func (d *Decoder) decAsset(assetStart xml.StartElement, a *Asset) error {
333
334 for {
335 child, data, err := d.decNextChild(assetStart)
336 if err != nil || child.Name.Local == "" {
337 return err
338 }
339 if child.Name.Local == "contributor" {
340 err := d.decContributor(child, &a.Contributor)
341 if err != nil {
342 return err
343 }
344 continue
345 }
346 if child.Name.Local == "created" {
347 a.Created = string(data)
348 continue
349 }
350 if child.Name.Local == "modified" {
351 a.Modified = string(data)
352 continue
353 }
354 if child.Name.Local == "up_axis" {
355 a.UpAxis = string(data)
356 continue
357 }
358 }
359}
360
361func (d *Decoder) decScene(start xml.StartElement, dom *Collada) error {
362

Callers 2

decLibraryGeometriesMethod · 0.95
decColladaMethod · 0.95

Calls 2

decNextChildMethod · 0.95
decContributorMethod · 0.95

Tested by

no test coverage detected