| 272 | } |
| 273 | |
| 274 | requiredRawAnimations () { |
| 275 | const required = [] |
| 276 | const object = this.get('actions') |
| 277 | for (const name in object) { |
| 278 | const action = object[name] |
| 279 | if (name === 'portrait') { continue } |
| 280 | const allActions = [action].concat(_.values((action.relatedActions != null ? action.relatedActions : {}))) |
| 281 | for (const a of Array.from(allActions)) { |
| 282 | if (a.animation) { |
| 283 | const scale = name === 'portrait' ? a.scale || 1 : a.scale || this.get('scale') || 1 |
| 284 | const animation = { animation: a.animation, scale } |
| 285 | animation.portrait = name === 'portrait' |
| 286 | if (!_.find(required, r => _.isEqual(r, animation))) { |
| 287 | required.push(animation) |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | return required |
| 293 | } |
| 294 | |
| 295 | mapFrames (frames, frameOffset) { |
| 296 | if (!_.isString(frames)) { return frames } // don't accidentally do this again |