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

Method decLibraryLights

loader/collada/library_lights.go:173–193  ·  view source on GitHub ↗
(start xml.StartElement, dom *Collada)

Source from the content-addressed store, hash-verified

171}
172
173func (d *Decoder) decLibraryLights(start xml.StartElement, dom *Collada) error {
174
175 ll := new(LibraryLights)
176 dom.LibraryLights = ll
177 ll.Id = findAttrib(start, "id").Value
178 ll.Name = findAttrib(start, "name").Value
179
180 for {
181 child, _, err := d.decNextChild(start)
182 if err != nil || child.Name.Local == "" {
183 return err
184 }
185 if child.Name.Local == "light" {
186 err := d.decLight(child, ll)
187 if err != nil {
188 return err
189 }
190 continue
191 }
192 }
193}
194
195func (d *Decoder) decLight(start xml.StartElement, ll *LibraryLights) error {
196

Callers 1

decColladaMethod · 0.95

Calls 3

decNextChildMethod · 0.95
decLightMethod · 0.95
findAttribFunction · 0.85

Tested by

no test coverage detected