add gpl3 license, removal of unused input.js

This commit is contained in:
sandb 2009-12-28 20:07:55 +01:00
parent 6851a984c2
commit 3a8cc4d7d9
7 changed files with 97 additions and 162 deletions

View File

@ -1,16 +0,0 @@
[
"00:01:e8:04:99:be",
"00:0a:e4:2f:30:15",
"00:0a:e4:30:e3:49",
"00:0a:e4:3b:fa:33",
"00:0a:e4:3d:a4:fd",
"00:0b:5d:24:25:de",
"00:0d:29:04:49:c5",
"00:0d:56:74:45:ab",
"00:0d:56:b7:fd:ac",
"00:0d:60:12:a7:be",
"00:0d:60:5d:eb:c7",
"40:61:86:11:72:b2",
"90:e6:ba:1f:0b:75",
"90:e6:ba:62:2b:da",
]

View File

@ -1,4 +1,25 @@
<?php header("Content-type: application/pdf"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); ?> [ "00:01:e8:04:99:be",
<?php
/*
Copyright 2009 Pieter Iserbyt
This file is part of Pamela.
Pamela is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Pamela is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Pamela. If not, see <http://www.gnu.org/licenses/>.
*/
header("Content-type: application/pdf"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); ?> [ "00:01:e8:04:99:be",
"00:05:4e:40:1e:97",
"00:0c:f1:16:10:ba",
"00:0c:f1:1d:dc:70",

View File

@ -1,3 +1,22 @@
/*
Copyright 2009 Pieter Iserbyt
This file is part of Pamela.
Pamela is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Pamela is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Pamela. If not, see <http://www.gnu.org/licenses/>.
*/
// Class IFace button
function IFaceButton(x, y, width, height) {
this.width = width;

View File

@ -1,3 +1,22 @@
/*
Copyright 2009 Pieter Iserbyt
This file is part of Pamela.
Pamela is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Pamela is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Pamela. If not, see <http://www.gnu.org/licenses/>.
*/
// Class Vector
function Vector(x, y, z) {
this.x = x;

View File

@ -1,3 +1,22 @@
/*
Copyright 2009 Pieter Iserbyt
This file is part of Pamela.
Pamela is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Pamela is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Pamela. If not, see <http://www.gnu.org/licenses/>.
*/
// Class Node
function Node(name) {

View File

@ -1,144 +0,0 @@
// Class Node
function Node(name) {
this.name = name;
this.modeTime = (new Date).getTime();
this.setMode("newNode");
var size = Math.min(width, height);
this.color = [
Math.random() * 128,
Math.random() * 128,
Math.random() * 128];
this.position = new Vector(
(Math.random() * size) - (size / 2),
(Math.random() * size) - (size / 2),
(Math.random() * size) - (size / 2));
this.position.scale(0.5);
}
Node.prototype.setMode = function(mode) {
this.modeTime = (new Date).getTime();
if (mode == "newNode") {
jQuery.extend(this, Node.prototype.newNode);
} else if (mode == "dying") {
jQuery.extend(this, Node.prototype.dying);
} else if (mode == "dead") {
jQuery.extend(this, Node.prototype.dead);
this.isDead = true;
} else {
jQuery.extend(this, Node.prototype.normal);
}
};
Node.prototype.alphaForDepth = function(d, start, cutoff) {
d = d < cutoff ? cutoff : d > start ? start : d;
return 1 - (d - start) / (cutoff - start);
};
//Normal mode
Node.prototype.normal = {
project: function(m) {
this.projection = m.project(this.position);
this.alpha = 255 * this.alphaForDepth(this.projection.z, 0, -400);
},
draw: function() {
if (this.projection.z > -1) return;
var scale = width * 3 / -this.projection.z;
var alphaScale = this.alpha / 255;
var invAlphaScale = 1 - alphaScale;
var col =
/* [
Math.round(this.color[0]),
Math.round(this.color[1]),
Math.round(this.color[2]),
]; */
[
Math.round(128 * invAlphaScale + this.color[0] * alphaScale),
Math.round(128 * invAlphaScale + this.color[1] * alphaScale),
Math.round(128 * invAlphaScale + this.color[2] * alphaScale),
];
context.fillStyle = 'rgb(' + col[0] + ',' + col[1] + ',' + col[2] + ')';
context.globalAlpha = 128 + this.alpha / 512;
context.beginPath();
context.arc(this.projection.x, this.projection.y, scale, 0, Math.PI * 2, false);
context.fill();
context.font = scale + "pt sans-serif";
context.fillText(this.name, this.projection.x + (scale * 1.5), this.projection.y + (scale / 1.5));
context.closePath();
context.globalAlpha = 1;
}
};
//New mode
Node.prototype.newNode = {
project: function(m) {
var newTime = (new Date).getTime() - this.modeTime;
if (newTime > 1000) {
this.setMode("normal");
this.project(m);
return;
}
var scale = Math.sqrt(1000 / Math.max(newTime, 1));
this.projection = m.clone().scale(scale, scale, scale).project(this.position);
this.alpha = 255 * this.alphaForDepth(this.projection.z, 0, -500);
}
};
//Dying mode
Node.prototype.dying = {
project: function(m) {
var dyingTime = (new Date).getTime() - this.modeTime;
if (dyingTime > 1000) {
this.setMode("dead");
return;
}
var scale = Math.sqrt(1000 / Math.max(1000 - dyingTime, 1));
this.projection = m.clone().scale(scale, scale, scale).project(this.position);
this.alpha = 255 * this.alphaForDepth(this.projection.z, 0, -500);
}
};
//Dead mode
Node.prototype.dead = {
project: function(m) {
},
draw: function() {
}
};
// For inheriting classes
Node.prototype.project = Node.prototype.normal.project;
Node.prototype.draw = Node.prototype.normal.draw;
// Class NorbertNode
jQuery.extend(NorbertNode.prototype, Node.prototype);
function NorbertNode() {
this.norbert = new Image();
this.norbert.src = "img/ccc.png";
this.position = new Vector(0, 0, 0);
}
NorbertNode.prototype.draw = function() {
var s = Math.abs(this.projection.z / (width / 2));
s *= 2;
//var x = Math.floor(this.projection.x - (186 / s));
//var y = Math.floor(this.projection.y - (50 / s));
var x = Math.floor(this.projection.x - (250 / s));
var y = Math.floor(this.projection.y - (180 / s));
context.drawImage(this.norbert, x, y);
};

View File

@ -1,4 +1,21 @@
//http://192.168.42.53:5984/pamela/_design/pamela/_view/online
/*
Copyright 2009 Pieter Iserbyt
This file is part of Pamela.
Pamela is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Pamela is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Pamela. If not, see <http://www.gnu.org/licenses/>.
*/
var context;
var width;