This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Image Library | |
// @author Simon Buckingham | |
// @date 29th September, 2017 | |
// This uses a combination of techniques to: | |
// (i) create bitmaps from SVG vector files using the com.geraudbourdin.svgview native cross-platform module | |
// (ii) create a tinted image. | |
// Note: there is a weird effect that on iOS using Ti.UI.createMaskedImage it creates blobs that are vertically flipped and | |
// so we need to use a transform = Ti.UI.create2DMatrix().scale(1, -1) to flip the image back again. | |
// Copyright (c) 2017 Simon Buckingham. All Rights Reserved. | |
// Please see the LICENSE file included with this distribution for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alloy.Globals.animationFilenames = []; | |
function initAnimationFilenames() { | |
var filename; | |
for (var i = 1; i <= 118; i++) { | |
filename = '/images/animation/animation_' + padNumber(i, 3) + '.png'; | |
Alloy.Globals.animationFilenames.push(filename); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @author Simon Buckingham | |
// @date 27 September 2017 | |
// @description Uses a single imageView/view and just swaps image property according to a timer. Gives more control than using the usual imageView "images" property | |
// eg one can start at an arbitrary frame number (not implemented yet) and also better playback for Android. | |
// Copyright (c) 2017 Simon Buckingham. All Rights Reserved. | |
// Please see the LICENSE file included with this distribution for details. | |
module.exports = ManualAnimation; | |
//@_params Object - function parameters... |