This commit is contained in:
Nicky Case 2018-04-27 08:24:33 -04:00
parent 110d0a0e1f
commit afd4ff7f2a
17 changed files with 329 additions and 349 deletions

Binary file not shown.

Binary file not shown.

View File

@ -75,7 +75,7 @@ a:hover{
top: -10px; top: -10px;
width: 300px; width: 300px;
height: 20px; height: 20px;
padding: 40px 0; padding: 37px 0 43px 0;
background-image: url(../sprites/button_large.png); background-image: url(../sprites/button_large.png);
background-size: 100% auto; background-size: 100% auto;
text-align: center; text-align: center;
@ -135,6 +135,20 @@ a:hover{
transform: scale(1.2); transform: scale(1.2);
} }
/* Right & Down Arrows */
.rarr, .darr{
display: inline-block;
width: 1em;
height: 1em;
background: url(../sprites/ui/arrow.png);
background-size: 100% auto;
position: relative;
top: 3px;
}
.darr{
transform: rotate(90deg);
}
/* Sim UI */ /* Sim UI */
.sim_ui{ .sim_ui{
position: absolute; position: absolute;
@ -499,18 +513,41 @@ words, bonus, reference{
/* BONUS BOX */ /* BONUS BOX */
bon{ bon{
margin: 0.75em 0; margin: 0.75em auto;
display: block; display: block;
background: #ccc; background: #ccc;
color: #444; color: #444;
padding: 15px 20px; text-align: left;
width: 280px;
line-height: 1.1em; width: 300px;
height: 56px;
padding: 23px 20px 17px 80px;
border-bottom: 4px solid rgba(0,0,0,0.25); border-bottom: 4px solid rgba(0,0,0,0.25);
border-radius: 5px;
line-height: 1.1em;
background-size: 400px auto;
position: relative;
transition: top 0.1s ease-in-out;
top:0;
}
bon:before{
content: '';
display: block;
position: absolute;
left: 25px;
top: 14px;
width: 35px;
height: 70px;
background: url(../sprites/ui/bonus.png);
background-size: 100% 100%;
} }
bon:hover{ bon:hover{
background: #ddd; top:-3px;
color: #666;
} }
/* REFERENCES */ /* REFERENCES */

File diff suppressed because it is too large Load Diff

View File

@ -168,12 +168,18 @@ SLIDES.push(
type:"box", type:"box",
id:"networks_pre_puzzle", id:"networks_pre_puzzle",
text:"networks_pre_puzzle", x:60, y:0, w:400, text:"networks_pre_puzzle", x:60, y:0, w:400,
lineHeight:1.3 lineHeight:"1.3em"
},
{
type:"box",
id:"networks_pre_puzzle_2",
text:"networks_pre_puzzle_2", x:60, y:107, w:400,
lineHeight:"1.3em"
}, },
{ {
type:"box", type:"box",
text:"optional_reading", x:60, y:220, w:400, h:30, text:"optional_reading", x:60, y:220, w:400, h:30,
fontSize:17, color:"#bbb" fontSize:"17px", color:"#bbb"
} }
] ]
}, },

View File

@ -84,13 +84,6 @@ SLIDES.push(
text:"complex_complex_3", text:"complex_complex_3",
x:480, y:0, w:480, h:540 x:480, y:0, w:480, h:540
}, },
{
id:"end",
type:"box",
text:"complex_complex_3_end",
x:480, y:0, w:480, h:540,
hidden:true
},
// Sim // Sim
{ {
@ -129,12 +122,11 @@ SLIDES.push(
}); });
if(peepCount==sim.peeps.length){ if(peepCount==sim.peeps.length){
var boxes = slideshow.boxes; var boxes = slideshow.boxes;
boxes.removeChildByID("complex_complex_3", true);
boxes.showChildByID("end", true);
state.ended = true; state.ended = true;
sim.win({ sim.win({
small:true small:true
}); });
slideshow.next();
} }
} }
@ -142,6 +134,20 @@ SLIDES.push(
}, },
{
remove:[
{type:"box", id:"complex_complex_3"}
],
add:[
{
id:"end",
type:"box",
text:"complex_complex_3_end",
x:480, y:0, w:480, h:540
}
]
},
{ {
chapter: "Complex-Cascade", chapter: "Complex-Cascade",
clear:true, clear:true,

View File

@ -14,7 +14,7 @@ SLIDES.push(
// CREDITS // CREDITS
{ {
type:"box", type:"box",
text:"credits", x:280, y:0, w:400, h:70, align:"center", color:"#fff" text:"credits", x:0, y:0, w:960, h:540
} }
] ]

View File

@ -27,21 +27,17 @@ SLIDES.push(
// Simulation UI // Simulation UI
{ {
type:"box", type:"box",
x:35, y:375, x:35, y:385,
sim_ui:"red" sim_ui:"red"
}, },
// Words // Words
/*{
type:"box",
text:"sandbox_caption",
x:70, y:470, w:550, h:70
},
{ {
type:"box", type:"box",
text:"sandbox_next", text:"sandbox_caption",
x:605, y:455, w:300, h:100 x:660, y:500, w:300, h:40,
},*/ align:"right"
}
] ]

View File

@ -13,9 +13,6 @@ function Sprite(config){
self.scaleY = 1; self.scaleY = 1;
self.rotation = 0; // radians self.rotation = 0; // radians
// The image!
self.image = IMAGES[config.img];
// Frames // Frames
self.currentFrame = 0; self.currentFrame = 0;
self.totalFrames = config.frames; self.totalFrames = config.frames;
@ -43,7 +40,8 @@ function Sprite(config){
ctx.scale(self.scaleX, self.scaleY); ctx.scale(self.scaleX, self.scaleY);
} }
ctx.translate(-self.pivotX, -self.pivotY); ctx.translate(-self.pivotX, -self.pivotY);
ctx.drawImage(self.image, sx, sy, sw, sh, 0, 0, sw, sh); var image = IMAGES[config.img];
ctx.drawImage(image, sx, sy, sw, sh, 0, 0, sw, sh);
ctx.restore(); ctx.restore();
}; };

View File

@ -40,9 +40,9 @@ subscribe("prepreload/done", function(){
window.requestAnimationFrame(update); window.requestAnimationFrame(update);
// Go to THE SPLASH // Go to THE SPLASH
slideshow.gotoChapter("Preloader"); //slideshow.gotoChapter("Preloader");
//slideshow.gotoChapter("Credits"); slideshow.gotoChapter("Credits");
//$("#navigation").style.display = "block"; $("#navigation").style.display = "block";
// HACK - MOBILE IS HORRIBLE // HACK - MOBILE IS HORRIBLE
$all("a").forEach(function(a){ $all("a").forEach(function(a){

View File

@ -107,7 +107,7 @@ function Boxes(){
// Bonus boxes... // Bonus boxes...
box.querySelectorAll("bon").forEach(function(bon){ box.querySelectorAll("bon").forEach(function(bon){
var title = $("bonus#"+bon.id+" > h3").innerHTML.trim(); var title = $("bonus#"+bon.id+" > h3").innerHTML.trim();
bon.innerHTML = "(?) "+title; bon.innerHTML = title;
bon.onclick = function(){ bon.onclick = function(){
publish("bonus/show", [bon.id]); publish("bonus/show", [bon.id]);
}; };
@ -118,7 +118,7 @@ function Boxes(){
box.querySelectorAll("icon").forEach(function(icon){ box.querySelectorAll("icon").forEach(function(icon){
// Create next button // Create next button
var name = icon.getAttributeNames()[0]; var name = icon.getAttribute("name");
var src = "sprites/icons/"+name+".png"; var src = "sprites/icons/"+name+".png";
var img = new Image(); var img = new Image();
img.src = src; img.src = src;

View File

@ -10,7 +10,7 @@ subscribe("bonus/show", function(bonus_id){
}); });
// SHOW REFERENCES // SHOW REFERENCES
var SHOWING_SUPPORTERS = false; //var SHOWING_SUPPORTERS = false;
subscribe("reference/show", function(ref_id){ subscribe("reference/show", function(ref_id){
publish("sound/button"); publish("sound/button");
@ -20,8 +20,7 @@ subscribe("reference/show", function(ref_id){
var noteLength = $("#modal_content").innerText.length; // innerTEXT, so no links var noteLength = $("#modal_content").innerText.length; // innerTEXT, so no links
// HACK: IF IT'S PATREON PEOPLE, *NOW* SHOW IFRAME // HACK: IF IT'S PATREON PEOPLE, *NOW* SHOW IFRAME
if(!SHOWING_SUPPORTERS && ref_id=="supporters"){ if(ref_id=="supporters"){
SHOWING_SUPPORTERS = true; // ONCE
$("#modal_content").innerHTML = footnote+'<br><br>'+ $("#modal_content").innerHTML = footnote+'<br><br>'+
'<iframe src="supporters" width="730" height="330" style="border:none; margin:0 auto; display:block"></iframe>'; '<iframe src="supporters" width="730" height="330" style="border:none; margin:0 auto; display:block"></iframe>';
} }

View File

@ -16,6 +16,10 @@ subscribe("prepreload", function(){
{id:"snip1", audio:"audio/snip1.mp3"}, {id:"snip1", audio:"audio/snip1.mp3"},
{id:"snip2", audio:"audio/snip2.mp3"}, {id:"snip2", audio:"audio/snip2.mp3"},
// UI
{id:"sound", image:"sprites/ui/sound.png"},
{id:"sharing", image:"sprites/ui/sharing.png"},
],function(progress){ ],function(progress){
if(progress==1){ if(progress==1){
publish("prepreload/done"); publish("prepreload/done");
@ -69,6 +73,10 @@ subscribe("preload", function(){
{id:"tutorial_connect", image:"sprites/tutorial_connect.png"}, {id:"tutorial_connect", image:"sprites/tutorial_connect.png"},
{id:"tutorial_disconnect", image:"sprites/tutorial_disconnect.png"}, {id:"tutorial_disconnect", image:"sprites/tutorial_disconnect.png"},
// UI
{id:"arrow", image:"sprites/ui/arrow.png"},
{id:"bonus", image:"sprites/ui/bonus.png"}
],function(progress){ ],function(progress){
window.PRELOAD_PROGRESS = progress; window.PRELOAD_PROGRESS = progress;
}); });

BIN
sprites/bonus/ee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

BIN
sprites/ui/arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
sprites/ui/bonus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB