Public
Edited
Mar 20, 2023
1 star
Insert cell
Insert cell
Insert cell
md`# How could I explain this in language you could possibly understand?
https://observablehq.com/@sachavarria/gifts-from-in-the-fifth-dimension
`
Insert cell
{
showGroup('.intro');
$('.choice').click(function() {
let classes = $(this).attr('class');
let thisClass = classes.split(' ')[1];

$('.' + thisClass).addClass('notSelected');
$(this).removeClass('notSelected')
.addClass('selected');

// show To class
let toClass = $(this).data('title');
showGroup('.' + toClass);
});
}
Insert cell
function showGroup(group) {
$(group).each(function(index) {
let thisDelay = .53*index + .4;

$(this).addClass('show');
$(this).css('transition-delay', thisDelay+'s')
.css('-webkit-transition-duration', '2s')
.css('transition-duration', '2s');
});
}

// i changed the duration to 2 seconds from .6 //
Insert cell
Insert cell
data = [
{
block: "comments intro",
class: "comment",
text: "This is just the waiting room. If you want to progress any further, you need to prove yourself to me. I have the power to grant you rewards beyond your wildest dreams. But, you need to prove yourself worthy first."
},
{
block: "choices intro",
class: "choice askcoffee",
text: "Of course, I am very prepared.",
to: "yescoffee"
},
{
block: "choices intro",
class: "choice askcoffee",
text: "How do I do that?",
to: "nocoffee"
},
{
block: "comments yescoffee",
class: "comment",
text: "I would like a gift."
},

{
block: "choices yescoffee",
class: "choice coffeetype",
text: "I have alien technology! ",
to: "toamericano"
},
{
block: "choices yescoffee",
class: "choice coffeetype",
text: "I have the secret to immortality.",
to: "tolatte"
},
{
block: "comments toamericano ",
class: "comment",
text: "Alien technology? Ok...."
},
{
block: "comments toamericano ",
class: "comment",
text: "But I am looking for a way to make the Sun go faster."
},
{
block: "comments tolatte",
class: "comment",
text: "Perfect! but I would also like the cure for heterosexuality."
},
{
block: "comments nocoffee",
class: "comment",
text: "if you dont know, then you are not worthy."
},
{
block: "choices nocoffee",
class: "choice othertype",
text: "what does this mean",
to: "towater"
},
{
block: "choices nocoffee",
class: "choice othertype",
text: "I am scared",
to: "totea"
},
{
block: "comments towater totea",
class: "comment",
text: "How could I explain this in language you could possibly understand?"
}
]
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more