MCPcopy Create free account
hub / github.com/g3n/engine / decEffectProfileCommon

Method decEffectProfileCommon

loader/collada/library_effects.go:362–389  ·  view source on GitHub ↗
(start xml.StartElement, e *Effect)

Source from the content-addressed store, hash-verified

360}
361
362func (d *Decoder) decEffectProfileCommon(start xml.StartElement, e *Effect) error {
363
364 pc := new(ProfileCOMMON)
365 pc.Id = findAttrib(start, "id").Value
366 e.Profile = append(e.Profile, pc)
367
368 for {
369 // Get next child element
370 child, _, err := d.decNextChild(start)
371 if err != nil || child.Name.Local == "" {
372 return err
373 }
374 if child.Name.Local == "newparam" {
375 err := d.decProfileCommonNewparam(child, pc)
376 if err != nil {
377 return err
378 }
379 continue
380 }
381 if child.Name.Local == "technique" {
382 err := d.decProfileCommonTechnique(child, pc)
383 if err != nil {
384 return err
385 }
386 continue
387 }
388 }
389}
390
391func (d *Decoder) decProfileCommonNewparam(start xml.StartElement, pc *ProfileCOMMON) error {
392

Callers 1

decEffectMethod · 0.95

Calls 4

decNextChildMethod · 0.95
findAttribFunction · 0.85

Tested by

no test coverage detected