diff --git a/APIHeartBeat/APIHeartBeat.js b/APIHeartBeat/APIHeartBeat.js index 7f91e985e8..6236647bd0 100644 --- a/APIHeartBeat/APIHeartBeat.js +++ b/APIHeartBeat/APIHeartBeat.js @@ -5,22 +5,22 @@ var APIHeartBeat = APIHeartBeat || (function() { 'use strict'; - var version = 0.1, + var version = 0.2, schemaVersion = 0.1, beatInterval = false, - beatPeriod = 400, - beatCycle = (beatPeriod * 8), + beatPeriod = 200, + beatCycle = 3000, animateHeartBeat = function() { - var x = (Date.now()%beatCycle)*12.5, - scale = Math.max(0, ( Math.sin( (x-1)/2) - Math.sin(x-(1+(Math.PI/2))))), - beatColor = Math.round(0xff*scale).toString(16)+'0000'; + var x = ((Date.now()%beatCycle)/beatCycle)*Math.PI*2, + scale = (Math.sin(x)+1)/2, + beatColor = '#'+Math.round(0xff*scale).toString(16)+'0000'; _.chain(state.APIHeartBeat.heartBeaters) .map(function(pid){ return getObj('player',pid); }) - .filter(_.isUndefined) + .reject(_.isUndefined) .each(function(p){ p.set({ color: beatColor @@ -84,13 +84,6 @@ var APIHeartBeat = APIHeartBeat || (function() { on('ready',function() { 'use strict'; - if("undefined" !== typeof isGM && _.isFunction(isGM)) { - APIHeartBeat.CheckInstall(); - APIHeartBeat.RegisterEventHandlers(); - } else { - log('--------------------------------------------------------------'); - log('APIHeartBeat requires the isGM module to work.'); - log('isGM GIST: https://gist.github.com/shdwjk/8d5bb062abab18463625'); - log('--------------------------------------------------------------'); - } + APIHeartBeat.CheckInstall(); + APIHeartBeat.RegisterEventHandlers(); }); diff --git a/APIHeartBeat/pacakge.json b/APIHeartBeat/package.json similarity index 79% rename from APIHeartBeat/pacakge.json rename to APIHeartBeat/package.json index 209e7e4fb7..96b6c52f3c 100644 --- a/APIHeartBeat/pacakge.json +++ b/APIHeartBeat/package.json @@ -1,6 +1,6 @@ { "name": "APIHeartBeat", - "version": "0.1", + "version": "0.2", "description": "Provides an API Heartbeat by setting the requesting player's color continuously.", "authors": "The Aaron", "roll20userid": "104025", @@ -8,6 +8,8 @@ }, "modifies": { "state.APIHeartBeat": "read,write", + "player.color": "write", + "player.id": "read" }, "conflicts": [ ] diff --git a/ManualAttribute/pacakge.json b/ManualAttribute/pacakge.json deleted file mode 100644 index 2d7340f355..0000000000 --- a/ManualAttribute/pacakge.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "ManualAttribute", - "version": "0.1", - "description": "Creates a manual copy of an autocalculated field, and assigns it to the bar of a token.", - "authors": "The Aaron", - "roll20userid": "104025", - "dependencies": { - }, - "modifies": { - }, - "conflicts": [ - ] -} diff --git a/SpellLevel5e/pacakge.json b/SpellLevel5e/pacakge.json deleted file mode 100644 index 4e49072915..0000000000 --- a/SpellLevel5e/pacakge.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "SpellLevel5e", - "version": "0.1", - "description": "", - "authors": "The Aaron", - "roll20userid": "104025", - "dependencies": { - "isGMModule": "0.x" - }, - "modifies": { - "state.SpellLevel5e": "read,write", - }, - "conflicts": [ - ] -}