Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions APIHeartBeat/APIHeartBeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
});
4 changes: 3 additions & 1 deletion APIHeartBeat/pacakge.json → APIHeartBeat/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"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",
"dependencies": {
},
"modifies": {
"state.APIHeartBeat": "read,write",
"player.color": "write",
"player.id": "read"
},
"conflicts": [
]
Expand Down
13 changes: 0 additions & 13 deletions ManualAttribute/pacakge.json

This file was deleted.

15 changes: 0 additions & 15 deletions SpellLevel5e/pacakge.json

This file was deleted.