Skip to content

Commit 992d190

Browse files
committed
UNIFICATION WITH TRASH MAGIC! CYBERMAGIC!
1 parent 0527c92 commit 992d190

File tree

6 files changed

+343
-3
lines changed

6 files changed

+343
-3
lines changed

board.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VIRTUAL CARDBOARD!

scrolls/COPYTHISBOOK

+23-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,26 @@ cd html
4343
php replicator.php
4444
sudo chmod -R 0777 *
4545

46-
```
46+
```
47+
48+
SCROLL SET SOURCE URL FOR GEOMETRON MAGIC:
49+
50+
```
51+
https://gm.trashrobot.org/
52+
```
53+
54+
SCROLL SET SOURCE SERVER FOR ALICE IN WONDERLAND(PUBLIC DOMAIN FROM [PROJECT GUTENBERG](https://www.gutenberg.org/)):
55+
```
56+
https://raw.githubusercontent.com/LafeLabs/pibrary/main/gutenberg/aliceinwonderland/
57+
```
58+
SCROLL SET SOURCE SERVER FOR ALICE IN THROUGH THE LOOKING GLASS(PUBLIC DOMAIN FROM [PROJECT GUTENBERG](https://www.gutenberg.org/)):
59+
```
60+
https://raw.githubusercontent.com/LafeLabs/pibrary/main/gutenberg/alicethroughthelookinglass/
61+
```
62+
63+
SCROLL SET SOURCE SERVER FOR CHAOS BIBLE, A SELF-REPLICATING FREELY EVOLVING COPY OF THE KJV BIBLE FROM PROJECT GUTENBERG:
64+
```
65+
https://raw.githubusercontent.com/LafeLabs/pibrary/main/gutenberg/chaosbible/
66+
```
67+
68+

scrolls/cybermagic

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ IT INCLUDES HTML, MARKDOWN, JAVASCRIPT, PHP, JSON, CSS, AND GEOMETRON!
99

1010
IT CAN INCLUDE PYTHON AS NEEDED FOR SCIENTIFIC COMPUTING AND MACHINE LEARNING!
1111

12-
1312

1413
- [editor.php](editor.php)
14+
- [webeditor.html](webeditor.html)
1515
- [dnagenerator.php](dnagenerator.php)
1616
- [data/dna.txt](data/dna.txt)
1717
- [php/replicator.txt](php/replicator.txt)

trashmagic.css

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
body{
2+
background-color:black;
3+
}
4+
#mainscroll{
5+
position:absolute;
6+
left:0px;
7+
right:0px;
8+
bottom:0px;
9+
top:0px;
10+
overflow:scroll;
11+
color:#00ff00;
12+
font-family:courier;
13+
z-index:0;
14+
}
15+
pre{
16+
font-family:courier;
17+
}
18+
h1{
19+
text-align:center;
20+
font-size:4em;
21+
font-family:helvetica;
22+
}
23+
p{
24+
text-align:justify;
25+
padding:1em 1em 1em 1em;
26+
font-size:1.5em;
27+
border:solid;
28+
display:block;
29+
border-color:white;
30+
border-width:10px;
31+
border-radius:1em;
32+
background-color:#0000ff;
33+
color:white;
34+
width:80%;
35+
margin:auto;
36+
margin-top:1em;
37+
38+
}
39+
a{
40+
text-align:center;
41+
font-family:helvetica;
42+
font-size:3em;
43+
width:80%;
44+
margin:auto;
45+
display:block;
46+
border:solid;
47+
border-radius:0.5em;
48+
border-width:0.5em;
49+
color:black;
50+
margin-top:1em;
51+
margin-bottom:0.5em;
52+
overflow-x:scroll;
53+
}
54+
img{
55+
display:block;
56+
max-width:50%;
57+
margin:auto;
58+
margin-top:2em;
59+
margin-bottom:2em;
60+
background-color:#B0916E;
61+
}
62+
#qrcode{
63+
display:block;
64+
margin:auto;
65+
margin-top:2em;
66+
margin-bottom:2em;
67+
margin-left:30%;
68+
text-align:center;
69+
background-color:white;
70+
border-color:white;
71+
border:solid;
72+
}

trashmagic.js

+246
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
function listfiles(domelement,folder){
2+
files = [];
3+
var httpcimages = new XMLHttpRequest();
4+
httpcimages.onreadystatechange = function() {
5+
if (this.readyState == 4 && this.status == 200) {
6+
files = JSON.parse(this.responseText);
7+
var locallinks = [];
8+
var oldlinks = domelement.getElementsByTagName("A");
9+
for(var index = 0;index < oldlinks.length;index++){
10+
locallinks.push(oldlinks[index]);
11+
}
12+
for(var index = 0;index < files.length;index++){
13+
var newa = document.createElement("A");
14+
newa.href = folder + "/" + files[index];
15+
newa.innerHTML = files[index];
16+
domelement.appendChild(newa);
17+
locallinks.push(newa);
18+
}
19+
rainbow(locallinks);
20+
}
21+
};
22+
httpcimages.open("GET", "dir.php?filename=" + folder, true);
23+
httpcimages.send();
24+
25+
}
26+
27+
function rlistfiles(domelement,folder){
28+
files = [];
29+
var httpcimages = new XMLHttpRequest();
30+
httpcimages.onreadystatechange = function() {
31+
if (this.readyState == 4 && this.status == 200) {
32+
files = JSON.parse(this.responseText);
33+
var locallinks = [];
34+
var oldlinks = domelement.getElementsByTagName("A");
35+
for(var index = 0;index < oldlinks.length;index++){
36+
locallinks.push(oldlinks[index]);
37+
}
38+
for(var index = 0;index < files.length;index++){
39+
var newa = document.createElement("A");
40+
newa.href = files[index];
41+
newa.innerHTML = files[index];
42+
domelement.appendChild(newa);
43+
locallinks.push(newa);
44+
}
45+
rainbow(locallinks);
46+
}
47+
};
48+
httpcimages.open("GET", "rdir.php?filename=" + folder, true);
49+
httpcimages.send();
50+
51+
}
52+
53+
function googleyeyes(n){
54+
var square = 1;
55+
if(innerWidth > innerHeight){
56+
square = innerHeight;
57+
}
58+
else{
59+
square = innerWidth;
60+
}
61+
for(var index = 0;index < n;index++){
62+
var eye = document.createElement("DIV");
63+
eye.style.position = "absolute";
64+
eye.style.borderRadius = "50%";
65+
eye.style.border = "solid";
66+
eye.style.backgroundColor = "white";
67+
eye.style.zIndex = "-1";
68+
var pupil = document.createElement("DIV");
69+
pupil.style.position = "absolute";
70+
pupil.style.borderRadius = "50%";
71+
pupil.style.border = "solid";
72+
pupil.style.backgroundColor = "black";
73+
pupil.style.zIndex = "0";
74+
eyesize = Math.round(0.2*Math.random()*square);
75+
if(eyesize < 20){
76+
eyesize = 20;
77+
}
78+
eyeleft = Math.round(Math.random()*innerWidth);
79+
eyetop = Math.round(Math.random()*innerHeight);
80+
81+
eye.style.width = eyesize.toString() + "px";
82+
eye.style.height = eyesize.toString() + "px";
83+
if(eyetop > innerHeight - eyesize - 30){
84+
eyetop = innerHeight - eyesize - 30;
85+
}
86+
if(eyeleft > innerWidth - eyesize - 30){
87+
eyeleft = innerWidth - eyesize - 30;
88+
}
89+
90+
eye.style.top = eyetop.toString() + "px";
91+
eye.style.left = eyeleft.toString() + "px";
92+
93+
94+
pupil.style.width = (0.3*eyesize).toString() + "px";
95+
pupil.style.height = (0.3*eyesize).toString() + "px";
96+
97+
pupilleft = Math.round(0.7*Math.random()*eyesize);
98+
pupiltop = Math.round(0.7*Math.random()*eyesize);
99+
pupil.style.left = pupilleft.toString() + "px";
100+
pupil.style.top = pupiltop.toString() + "px";
101+
102+
eye.appendChild(pupil);
103+
104+
document.body.appendChild(eye);
105+
106+
}
107+
}
108+
109+
function listimages(domelement,folder){
110+
111+
images = [];
112+
var httpcimages = new XMLHttpRequest();
113+
httpcimages.onreadystatechange = function() {
114+
if (this.readyState == 4 && this.status == 200) {
115+
images = JSON.parse(this.responseText);
116+
for(var index = 0;index < images.length;index++){
117+
var newimg = document.createElement("IMG");
118+
newimg.src = folder + "/" + images[index];
119+
domelement.appendChild(newimg);
120+
}
121+
}
122+
};
123+
httpcimages.open("GET", "dir.php?filename=" + folder, true);
124+
httpcimages.send();
125+
126+
}
127+
128+
129+
function rainbowstring(localelement){
130+
text = localelement.innerHTML;
131+
localelement.innerHTML = "";
132+
n = text.length;
133+
for(var index = 0; index < n; index++){
134+
var newspan = document.createElement("SPAN");
135+
newspan.innerHTML = text.charAt(index);
136+
137+
H = index*360/n;
138+
z = 255*(1 - Math.abs((H/60)%2 - 1));
139+
140+
if(H < 60){
141+
red = 255;
142+
green = Math.round(z);
143+
blue = 0;
144+
}
145+
if(H >= 60 && H < 120){
146+
red = Math.round(z);
147+
green = 255;
148+
blue = 0;
149+
}
150+
if(H >= 120 && H < 180){
151+
red = 0;
152+
green = 255;
153+
blue = Math.round(z);
154+
}
155+
if(H >= 180 && H < 240){
156+
red = 0;
157+
green = Math.round(z);
158+
blue = 255;
159+
}
160+
if(H >= 240 && H < 300){
161+
red = Math.round(z);
162+
green = 0;
163+
blue = 255;
164+
}
165+
if(H >= 300 && H < 360){
166+
red = 255;
167+
green = 0;
168+
blue = Math.round(z);
169+
}
170+
171+
redstring = red.toString(16);
172+
if(redstring.length < 2){
173+
redstring = "0" + redstring;
174+
}
175+
greenstring = green.toString(16);
176+
if(greenstring.length < 2){
177+
greenstring = "0" + greenstring;
178+
}
179+
bluestring = blue.toString(16);
180+
if(bluestring.length < 2){
181+
bluestring = "0" + bluestring;
182+
}
183+
color = "#" + redstring + greenstring + bluestring;
184+
newspan.style.color = color;
185+
localelement.appendChild(newspan);
186+
}
187+
188+
189+
}
190+
function rainbow(localarray){
191+
n = localarray.length;
192+
theta = 0;
193+
for(var index = 0;index < n;index++){
194+
195+
H = index*360/n;
196+
z = 255*(1 - Math.abs((H/60)%2 - 1));
197+
198+
if(H < 60){
199+
red = 255;
200+
green = Math.round(z);
201+
blue = 0;
202+
}
203+
if(H >= 60 && H < 120){
204+
red = Math.round(z);
205+
green = 255;
206+
blue = 0;
207+
}
208+
if(H >= 120 && H < 180){
209+
red = 0;
210+
green = 255;
211+
blue = Math.round(z);
212+
}
213+
if(H >= 180 && H < 240){
214+
red = 0;
215+
green = Math.round(z);
216+
blue = 255;
217+
}
218+
if(H >= 240 && H < 300){
219+
red = Math.round(z);
220+
green = 0;
221+
blue = 255;
222+
}
223+
if(H >= 300 && H < 360){
224+
red = 255;
225+
green = 0;
226+
blue = Math.round(z);
227+
}
228+
229+
redstring = red.toString(16);
230+
if(redstring.length < 2){
231+
redstring = "0" + redstring;
232+
}
233+
greenstring = green.toString(16);
234+
if(greenstring.length < 2){
235+
greenstring = "0" + greenstring;
236+
}
237+
bluestring = blue.toString(16);
238+
if(bluestring.length < 2){
239+
bluestring = "0" + bluestring;
240+
}
241+
color = "#" + redstring + greenstring + bluestring;
242+
//console.log(color);
243+
localarray[index].style.backgroundColor = color;// + "80";
244+
localarray[index].style.borderColor = color;
245+
}
246+
}

webeditor.html

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
</head>
3030
<body>
31-
<a href= "dnagenerator.php" style = "position:absolute;right:5px;top:0em;font-size:2em">DNAGENERATOR</a>
3231
<a href= "index.html" style = "position:absolute;right:5px;top:1.5em;font-size:2em">HOME</a>
3332
<a href = "webdestroyer.html" style = "display:none;position:absolute;right:5px;top:3em;font-size:2em">DESTROYER</a>
3433
<a href = "editor.php" style = "position:absolute;right:5px;top:3em;font-size:2em">EDITOR.PHP</a>

0 commit comments

Comments
 (0)