Fragments



<script>document.documentElement.style.overflow = 'hidden'; // For Firefox and Chrome
document.body.scroll = 'no'; // For IE
generateditem = document.createElement("div");
;generateditem.id = `background`;;generateditem.style = `width:` + `100%` + `;height:` + `100%` + `;position:` + `absolute` + `;left:` + `0` + `;top:` + `0` + `;background-color:` + `white` + `;user-select: none` + `;`;generateditem.addEventListener('click', function (e) {});try {
document.getElementById().appendChild(generateditem);
} catch (error) {
document.body.appendChild(generateditem); }
;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([],{duration: 10000,
}
);
;generateditem.contentEditable=`false`;
;if (`variablelist` in window) {

}else{

variablelist = {};
};
variablelist[`Numelements2`]= 1
if ("loop_name_here" in window) {
PriorLoopName = loop_name_here
} else {
PriorLoopName = ``
}

loop_name_here = `SpawnLoop2`
try{loop_counter[loop_name_here] = 1}catch(err){var loop_counter = {}
loop_counter[loop_name_here] = 1
}
for (loop_counter[loop_name_here] = 0; loop_counter[loop_name_here] < variablelist[`Numelements2`]; loop_counter[loop_name_here]++) {generateditem = document.createElement("div");
;generateditem.id = [`X`,loop_counter[`SpawnLoop2`]+1,].join('');;generateditem.innerHTML = `X`;;generateditem.style = `width:` + `7.5vw` + `;height:` + `7.5vh` + `;position:` + `absolute` + `;left:` + [Math.floor(Math.random()*(50 + 1 - 45) + 45),`vw`,].join('') + `;top:` + [Math.floor(Math.random()*(50 + 1 - 45) + 45),`vh`,].join('') + `;color:` + `red` + `;font-size:` + `7.5vw` + `;user-select: none` + `;transform-style:preserve-3d;`;generateditem.addEventListener('click', function (e) {});try {
document.getElementById().appendChild(generateditem);
} catch (error) {
document.body.appendChild(generateditem); }
;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([{transform: '' + `rotate3d(` + 1 + ',' + 1 + ',' + 1+ ',' + `360deg` + `) `,},],{duration: 10000,
iterations:Infinity,}
);
;generateditem.contentEditable=`false`;// Make the DIV element draggable:


// find the element that you want to drag.
var box =generateditem

/* listen to the touchMove event,
every time it fires, grab the location
of touch and assign it to box */

box.addEventListener('touchmove', function(e) {
// grab the location of touch
var touchLocation = e.targetTouches[0];

// assign box new coordinates based on the touch.
box.style.left = touchLocation.pageX -box.offsetWidth/2 + 'px';
box.style.top = touchLocation.pageY -box.offsetHeight/2 + 'px';
})

/* record the position of the touch
when released using touchend event.
This will be the drop position. */

box.addEventListener('touchend', function(e) {
// current box position.
var x = parseInt(box.style.left);
var y = parseInt(box.style.top);
})




//begin nonmobile
dragElement(generateditem);

function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;

// otherwise, move the DIV from anywhere inside the DIV:
elmnt.onmousedown = dragMouseDown;


function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}

function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}

function closeDragElement() {
// stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
}
;if (typeof array_counter == 'undefined') {
var array_counter = {} };
array_name_here = `precollisionlistB`;;if (array_name_here in variablelist){}else{variablelist[array_name_here] = []};
variablelist[array_name_here].push([`X`,loop_counter[`SpawnLoop2`]+1,].join(''));

};loop_name_here = PriorLoopName;
;if (`variablelist` in window) {

}else{

variablelist = {};
};
variablelist[`Numelements`]= 10
if ("loop_name_here" in window) {
PriorLoopName = loop_name_here
} else {
PriorLoopName = ``
}

loop_name_here = `SpawnLoop`
try{loop_counter[loop_name_here] = 1}catch(err){var loop_counter = {}
loop_counter[loop_name_here] = 1
}
for (loop_counter[loop_name_here] = 0; loop_counter[loop_name_here] < variablelist[`Numelements`]; loop_counter[loop_name_here]++) {generateditem = document.createElement("div");
;generateditem.id = [`Rock`,loop_counter[`SpawnLoop`]+1,].join('');;generateditem.innerHTML = `🪨`;;generateditem.style = `width:` + `7.5vw` + `;height:` + `7.5vh` + `;position:` + `absolute` + `;left:` + [Math.floor(Math.random()*(110 + 1 - -20) + -20),`vw`,].join('') + `;top:` + [Math.floor(Math.random()*(110 + 1 - -20) + -20),`vh`,].join('') + `;color:` + `red` + `;font-size:` + `7.5vw` + `;user-select: none` + `;`;generateditem.addEventListener('click', function (e) {});try {
document.getElementById().appendChild(generateditem);
} catch (error) {
document.body.appendChild(generateditem); }
;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([],{duration: 10000,
}
);
;generateditem.contentEditable=`false`;
;if (typeof array_counter == 'undefined') {
var array_counter = {} };
array_name_here = `precollisionlistA`;;if (array_name_here in variablelist){}else{variablelist[array_name_here] = []};
variablelist[array_name_here].push([`Rock`,loop_counter[`SpawnLoop`]+1,].join(''));

};loop_name_here = PriorLoopName;
;if (`variablelist` in window) {

}else{

variablelist = {};
};
variablelist[`SpawnRate`]= 200
;if (`variablelist` in window) {

}else{

variablelist = {};
};
variablelist[`Active`]= 1
;if (`timercounter` in window) {

}else{

timercounter = {};timerexpire = {}
}

;intrafrag_var = `rockspawner`;
if('timerexpire' in window){}else{timerexpire = {} }
if('timercounter' in window){}else{timercounter = {} }
timerexpire[intrafrag_var] = -1;
timercounter[intrafrag_var] = setInterval(function() {timerexpire[`rockspawner`] =timerexpire[`rockspawner`] +1;
;if (variablelist[`Active`]==1){generateditem = document.createElement("div");
;generateditem.id = [`Rock`,timerexpire[`rockspawner`],].join('');;generateditem.innerHTML = `🪨`;;generateditem.style = `width:` + `7.5vw` + `;height:` + `7.5vh` + `;position:` + `absolute` + `;left:` + [Math.floor(Math.random()*(110 + 1 - -20) + -20),`vw`,].join('') + `;top:` + [Math.floor(Math.random()*(110 + 1 - -20) + -20),`vh`,].join('') + `;color:` + `red` + `;font-size:` + `7.5vw` + `;user-select: none` + `;`;generateditem.addEventListener('click', function (e) {});try {
document.getElementById().appendChild(generateditem);
} catch (error) {
document.body.appendChild(generateditem); }
;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([],{duration: 10000,
}
);
;generateditem.contentEditable=`false`;
;if (typeof array_counter == 'undefined') {
var array_counter = {} };
array_name_here = `precollisionlistA`;;if (array_name_here in variablelist){}else{variablelist[array_name_here] = []};
variablelist[array_name_here].push([`Rock`,timerexpire[`rockspawner`],].join(''));

}
else{};
}
,variablelist[`SpawnRate`]);

;if (`timercounter` in window) {

}else{

timercounter = {};timerexpire = {}
}

;intrafrag_var = `CollisionTimer`;
if('timerexpire' in window){}else{timerexpire = {} }
if('timercounter' in window){}else{timercounter = {} }
timerexpire[intrafrag_var] = -1;
timercounter[intrafrag_var] = setInterval(function() {timerexpire[`CollisionTimer`] =timerexpire[`CollisionTimer`] +1;
;array_name_here = `CollisionListA`;;if (`variablelist` in window) {

}else{

variablelist = {};
};


variablelist[array_name_here] = [];
;array_name_here = `CollisionListB`;;if (`variablelist` in window) {

}else{

variablelist = {};
};


variablelist[array_name_here] = [];
if ("loop_name_here" in window) {
PriorLoopName = loop_name_here
} else {
PriorLoopName = ``
}

loop_name_here = `precollisionALoop`
try{loop_counter[loop_name_here] = 1}catch(err){var loop_counter = {}
loop_counter[loop_name_here] = 1
}
for (loop_counter[loop_name_here] = 0; loop_counter[loop_name_here] < variablelist[`precollisionlistA`].length; loop_counter[loop_name_here]++) {if ("loop_name_here" in window) {
PriorLoopName = loop_name_here
} else {
PriorLoopName = ``
}

loop_name_here = `precollisionBLoop`
try{loop_counter[loop_name_here] = 1}catch(err){var loop_counter = {}
loop_counter[loop_name_here] = 1
}
for (loop_counter[loop_name_here] = 0; loop_counter[loop_name_here] < variablelist[`precollisionlistB`].length; loop_counter[loop_name_here]++) {;if (typeof array_counter == 'undefined') {
var array_counter = {} };
array_name_here = `CollisionListA`;;if (array_name_here in variablelist){}else{variablelist[array_name_here] = []};
variablelist[array_name_here].push(variablelist[`precollisionlistA`][loop_counter[`precollisionALoop`]]);

;if (typeof array_counter == 'undefined') {
var array_counter = {} };
array_name_here = `CollisionListB`;;if (array_name_here in variablelist){}else{variablelist[array_name_here] = []};
variablelist[array_name_here].push(variablelist[`precollisionlistB`][loop_counter[`precollisionBLoop`]]);

};loop_name_here = PriorLoopName;
};loop_name_here = PriorLoopName;
if ("loop_name_here" in window) {
PriorLoopName = loop_name_here
} else {
PriorLoopName = ``
}

loop_name_here = `CollisionLoop`
try{loop_counter[loop_name_here] = 1}catch(err){var loop_counter = {}
loop_counter[loop_name_here] = 1
}
for (loop_counter[loop_name_here] = 0; loop_counter[loop_name_here] < variablelist[`CollisionListA`].length; loop_counter[loop_name_here]++) {;Collision_ID =`AllCollisions`;;case_A =variablelist[`CollisionListA`][loop_counter[`CollisionLoop`]];;case_B=variablelist[`CollisionListB`][loop_counter[`CollisionLoop`]];aRect = document.getElementById(case_A).getBoundingClientRect();

bRect = document.getElementById(case_B).getBoundingClientRect();

if ( !(
((aRect.top + aRect.height) < (bRect.top)) ||
(aRect.top > (bRect.top + bRect.height)) ||
((aRect.left + aRect.width) < bRect.left) ||
(aRect.left > (bRect.left + bRect.width))
)){
try{collision_counter[Collision_ID] = collision_counter[Collision_ID] + 1} catch(err){ try{collision_counter[Collision_ID] = 0}catch(err) {collision_counter = {};collision_counter[Collision_ID] = 0} collision_counter[Collision_ID] = collision_counter[Collision_ID] + 1 }
;generateditem = document.getElementById(variablelist[`CollisionListA`][loop_counter[`CollisionLoop`]]);generateditem.src = `` ;;generateditem.addEventListener('click', function (e) {});;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([{transform: '' + 'translate3d(' + `-200vw` + ',' + `0`+ ',' + `0` + `) `,opacity:`0`,},],{duration: 500,
fill: `forwards`}
);
;generateditem.innerHTML = `🔥`;
;if (`variablelist` in window) {

}else{

variablelist = {};
};
variablelist[`NumelementsRock`]= 1
if ("loop_name_here" in window) {
PriorLoopName = loop_name_here
} else {
PriorLoopName = ``
}

loop_name_here = `SpawnMoreRocks`
try{loop_counter[loop_name_here] = 1}catch(err){var loop_counter = {}
loop_counter[loop_name_here] = 1
}
for (loop_counter[loop_name_here] = 0; loop_counter[loop_name_here] < variablelist[`NumelementsRock`]; loop_counter[loop_name_here]++) {generateditem = document.createElement("div");
;generateditem.id = [`BabyRocks`,loop_counter[`SpawnMoreRocks`]+1,].join('');;generateditem.innerHTML = [`&#`,Math.floor(Math.random()*(129455 + 1 - 129300) + 129300),`;`,].join('');;generateditem.style = `width:` + `2.5vw` + `;height:` + `2.5vh` + `;position:` + `absolute` + `;color:` + `red` + `;font-size:` + `2.5vw` + `;user-select: none` + `;`;generateditem.addEventListener('click', function (e) {});try {
document.getElementById(variablelist[`CollisionListB`][loop_counter[`CollisionLoop`]]).appendChild(generateditem);
} catch (error) {
document.body.appendChild(generateditem); }
;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([{transform: '' + `rotate3d(` + 1 + ',' + 1 + ',' + 1+ ',' + [Math.floor(Math.random()*(360 + 1 - 1) + 1),`deg`,].join('') + `) `+ 'translate3d(' + [Math.floor(Math.random()*(5 + 1 - -5) + -5),`vw`,].join('') + ',' + [Math.floor(Math.random()*(5 + 1 - -5) + -5),`vh`,].join('')+ ',' + [Math.floor(Math.random()*(5 + 1 - -5) + -5),`vw`,].join('') + `) `,},],{duration: 100,
fill: `forwards`}
);
;generateditem.contentEditable=`false`;
};loop_name_here = PriorLoopName;

}
};loop_name_here = PriorLoopName;
}
,200);

generateditem = document.createElement("div");
;generateditem.id = `go to game`;;generateditem.innerHTML = `get back to the game`;;generateditem.style = `width:` + `5em` + `;height:` + `5em` + `;position:` + `absolute` + `;left:` + `0` + `;top:` + `0` + `;color:` + `red` + `;`;;generateditem.addEventListener('click', function (e) {;window.location.replace(`https://FragmentCode.com/sharedFrame/jbshuteAT:gmailDOT:com_ProgramList:::jbshuteAT:gmailDOT:comWebDevelopmentwalking_ProgramData`)});try {
document.getElementById().appendChild(generateditem);
} catch (error) {
document.body.appendChild(generateditem); }
;generateditem.style.animation = 'none';
generateditem.offsetHeight; /* trigger reflow */
generateditem.style.animation = null;generateditem.animate([],{duration: 10000,
}
);
;generateditem.contentEditable=`false`;// Make the DIV element draggable:


// find the element that you want to drag.
var box =generateditem

/* listen to the touchMove event,
every time it fires, grab the location
of touch and assign it to box */

box.addEventListener('touchmove', function(e) {
// grab the location of touch
var touchLocation = e.targetTouches[0];

// assign box new coordinates based on the touch.
box.style.left = touchLocation.pageX -box.offsetWidth/2 + 'px';
box.style.top = touchLocation.pageY -box.offsetHeight/2 + 'px';
})

/* record the position of the touch
when released using touchend event.
This will be the drop position. */

box.addEventListener('touchend', function(e) {
// current box position.
var x = parseInt(box.style.left);
var y = parseInt(box.style.top);
})




//begin nonmobile
dragElement(generateditem);

function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;

// otherwise, move the DIV from anywhere inside the DIV:
elmnt.onmousedown = dragMouseDown;


function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}

function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}

function closeDragElement() {
// stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
}