parseAnimationClip method
void
parseAnimationClip(
- XmlElement xml
Implementation
void parseAnimationClip(XmlElement xml ) {
final Map<String,dynamic> data = {
'name': xml.getAttribute( 'id' ) ?? 'default',
'start': double.parse( xml.getAttribute( 'start' ) ?? '0' ),
'end': double.parse( xml.getAttribute( 'end' ) ?? '0' ),
'animations': []
};
for (final child in xml.descendantElements) {
switch ( child.name.local ) {
case 'instance_animation':
data['animations'].add( parseId( child.getAttribute( 'url' )! ) );
break;
}
}
library['clips']![ xml.getAttribute( 'id' )! ] = data;
}