Skip to content

Commit

Permalink
version 4.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymovin committed Aug 7, 2017
1 parent 82b5ef9 commit 49e4c71
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 12 deletions.
3 changes: 3 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## V 4.10.2
- AVD fixes

## V 4.10.1
- Expression fix

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# bodymovin
After Effects plugin for exporting animations to svg/canvas/html + js or natively on Android and iOS through [Lottie](https://medium.com/airbnb-engineering/introducing-lottie-4ff4a0afac0e)

## V 4.10.2
- AVD fixes

## V 4.10.1
- Expression fix

Expand Down
Binary file modified build/extension/bodymovin.zxp
Binary file not shown.
179 changes: 176 additions & 3 deletions build/player/bodymovin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
var window=(typeof window === "undefined")?{}:window;(function (root, factory) { if(typeof define === "function" && define.amd) { define( factory); } else if(typeof module === "object" && module.exports) { module.exports = factory(); } else { root.bodymovin = factory(); } }(window, function() {var svgNS = "http://www.w3.org/2000/svg";
var window = (typeof window === "undefined") ? {} : window;
(function(root, factory) {
if (typeof define === "function" && define.amd) {
define(factory);
} else if (typeof module === "object" && module.exports) {
module.exports = factory();
} else {
root.bodymovin = factory();
}
}(window, function() {
var svgNS = "http://www.w3.org/2000/svg";
var subframeEnabled = true;
var expressionsPlugin;
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
Expand Down Expand Up @@ -8327,7 +8337,6 @@ AnimationItem.prototype.setData = function (wrapper, animationData) {
if(prerender === 'false'){
params.prerender = false;
}
console.log('animElements:', params)
this.setParams(params);
};

Expand Down Expand Up @@ -13807,4 +13816,168 @@ GroupEffect.prototype.init = function(data,element,dynamicProperties){
break;
}
}
};var bodymovinjs = {}; function play(animation){ animationManager.play(animation); } function pause(animation){ animationManager.pause(animation); } function togglePause(animation){ animationManager.togglePause(animation); } function setSpeed(value,animation){ animationManager.setSpeed(value, animation); } function setDirection(value,animation){ animationManager.setDirection(value, animation); } function stop(animation){ animationManager.stop(animation); } function moveFrame(value){ animationManager.moveFrame(value); } function searchAnimations(){ if(standalone === true){ animationManager.searchAnimations(animationData,standalone, renderer); }else{ animationManager.searchAnimations(); } } function registerAnimation(elem){ return animationManager.registerAnimation(elem); } function resize(){ animationManager.resize(); } function start(){ animationManager.start(); } function goToAndStop(val,isFrame, animation){ animationManager.goToAndStop(val,isFrame, animation); } function setSubframeRendering(flag){ subframeEnabled = flag; } function loadAnimation(params){ if(standalone === true){ params.animationData = JSON.parse(animationData); } return animationManager.loadAnimation(params); } function destroy(animation){ return animationManager.destroy(animation); } function setQuality(value){ if(typeof value === 'string'){ switch(value){ case 'high': defaultCurveSegments = 200; break; case 'medium': defaultCurveSegments = 50; break; case 'low': defaultCurveSegments = 10; break; } }else if(!isNaN(value) && value > 1){ defaultCurveSegments = value; } if(defaultCurveSegments >= 50){ roundValues(false); }else{ roundValues(true); } } function inBrowser() { return typeof navigator !== 'undefined'; } function installPlugin(type,plugin){ if(type==='expressions'){ expressionsPlugin = plugin; } } function getFactory(name){ switch(name){ case "propertyFactory": return PropertyFactory;case "shapePropertyFactory": return ShapePropertyFactory; case "matrix": return Matrix; } } bodymovinjs.play = play; bodymovinjs.pause = pause; bodymovinjs.togglePause = togglePause; bodymovinjs.setSpeed = setSpeed; bodymovinjs.setDirection = setDirection; bodymovinjs.stop = stop; bodymovinjs.moveFrame = moveFrame; bodymovinjs.searchAnimations = searchAnimations; bodymovinjs.registerAnimation = registerAnimation; bodymovinjs.loadAnimation = loadAnimation; bodymovinjs.setSubframeRendering = setSubframeRendering; bodymovinjs.resize = resize; bodymovinjs.start = start; bodymovinjs.goToAndStop = goToAndStop; bodymovinjs.destroy = destroy; bodymovinjs.setQuality = setQuality; bodymovinjs.inBrowser = inBrowser; bodymovinjs.installPlugin = installPlugin; bodymovinjs.__getFactory = getFactory; bodymovinjs.version = '4.10.1'; function checkReady(){ if (document.readyState === "complete") { clearInterval(readyStateCheckInterval); searchAnimations(); } } function getQueryVariable(variable) { var vars = queryString.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); if (decodeURIComponent(pair[0]) == variable) { return decodeURIComponent(pair[1]); } } } var standalone = '__[STANDALONE]__'; var animationData = '__[ANIMATIONDATA]__'; var renderer = ''; if(standalone) { var scripts = document.getElementsByTagName('script'); var index = scripts.length - 1; var myScript = scripts[index] || { src: '' }; var queryString = myScript.src.replace(/^[^\?]+\??/,''); renderer = getQueryVariable('renderer'); } var readyStateCheckInterval = setInterval(checkReady, 100); return bodymovinjs; }));
};
var bodymovinjs = {};

function play(animation) {
animationManager.play(animation);
}

function pause(animation) {
animationManager.pause(animation);
}

function togglePause(animation) {
animationManager.togglePause(animation);
}

function setSpeed(value, animation) {
animationManager.setSpeed(value, animation);
}

function setDirection(value, animation) {
animationManager.setDirection(value, animation);
}

function stop(animation) {
animationManager.stop(animation);
}

function moveFrame(value) {
animationManager.moveFrame(value);
}

function searchAnimations() {
if (standalone === true) {
animationManager.searchAnimations(animationData, standalone, renderer);
} else {
animationManager.searchAnimations();
}
}

function registerAnimation(elem) {
return animationManager.registerAnimation(elem);
}

function resize() {
animationManager.resize();
}

function start() {
animationManager.start();
}

function goToAndStop(val, isFrame, animation) {
animationManager.goToAndStop(val, isFrame, animation);
}

function setSubframeRendering(flag) {
subframeEnabled = flag;
}

function loadAnimation(params) {
if (standalone === true) {
params.animationData = JSON.parse(animationData);
}
return animationManager.loadAnimation(params);
}

function destroy(animation) {
return animationManager.destroy(animation);
}

function setQuality(value) {
if (typeof value === 'string') {
switch (value) {
case 'high':
defaultCurveSegments = 200;
break;
case 'medium':
defaultCurveSegments = 50;
break;
case 'low':
defaultCurveSegments = 10;
break;
}
} else if (!isNaN(value) && value > 1) {
defaultCurveSegments = value;
}
if (defaultCurveSegments >= 50) {
roundValues(false);
} else {
roundValues(true);
}
}

function inBrowser() {
return typeof navigator !== 'undefined';
}

function installPlugin(type, plugin) {
if (type === 'expressions') {
expressionsPlugin = plugin;
}
}

function getFactory(name) {
switch (name) {
case "propertyFactory":
return PropertyFactory;
case "shapePropertyFactory":
return ShapePropertyFactory;
case "matrix":
return Matrix;
}
}
bodymovinjs.play = play;
bodymovinjs.pause = pause;
bodymovinjs.togglePause = togglePause;
bodymovinjs.setSpeed = setSpeed;
bodymovinjs.setDirection = setDirection;
bodymovinjs.stop = stop;
bodymovinjs.moveFrame = moveFrame;
bodymovinjs.searchAnimations = searchAnimations;
bodymovinjs.registerAnimation = registerAnimation;
bodymovinjs.loadAnimation = loadAnimation;
bodymovinjs.setSubframeRendering = setSubframeRendering;
bodymovinjs.resize = resize;
bodymovinjs.start = start;
bodymovinjs.goToAndStop = goToAndStop;
bodymovinjs.destroy = destroy;
bodymovinjs.setQuality = setQuality;
bodymovinjs.inBrowser = inBrowser;
bodymovinjs.installPlugin = installPlugin;
bodymovinjs.__getFactory = getFactory;
bodymovinjs.version = '4.10.2';

function checkReady() {
if (document.readyState === "complete") {
clearInterval(readyStateCheckInterval);
searchAnimations();
}
}

function getQueryVariable(variable) {
var vars = queryString.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
}
var standalone = '__[STANDALONE]__';
var animationData = '__[ANIMATIONDATA]__';
var renderer = '';
if (standalone) {
var scripts = document.getElementsByTagName('script');
var index = scripts.length - 1;
var myScript = scripts[index] || {
src: ''
};
var queryString = myScript.src.replace(/^[^\?]+\??/, '');
renderer = getQueryVariable('renderer');
}
var readyStateCheckInterval = setInterval(checkReady, 100);
return bodymovinjs;
}));
4 changes: 2 additions & 2 deletions build/player/bodymovin.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 49e4c71

Please sign in to comment.