[ Launch: choices ] 6567392 by gelicia
-
-
Save gelicia/6567392 to your computer and use it in GitHub Desktop.
choices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"choices","endpoint":"","display":"div","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"story.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/oInbIvj.png"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var story={passages:[], links:[]}; | |
var display = d3.select("#display"); | |
var controls = display.append('div').classed("info", true); | |
var svg = display.append('svg').attr({ | |
height: 200, | |
width: 600 | |
}); | |
controls.append('button').text('Add Passage') | |
.on('click', function(){ | |
var passsage = {}; | |
story.passages.push(); | |
}); | |
svg.insert('rect').attr({ | |
x: 50, | |
y: 50, | |
height: 50, | |
width: 50 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"passages": [ | |
{"meta": {"tags": [], "notes": "Intro", "author": "Kristina"}, "text": "You are a cat."}, | |
{"meta": {"tags": [], "notes": "doesn't do anything - loops"}, "text": "You sleep a while."}, | |
{"meta": {"tags": [], "notes": "doesn't do anything - loops"}, "text": "You lick yourself a lot. You are clean now."}, | |
{"meta": {"tags": [], "notes": "continue"}, "text": "It is dark out."}, | |
{"meta": {"tags": [], "notes": "lose"}, "text": "You tear around the house like you are insane, crying at the top of your lungs. Your owner gets out of bed and turns you into a hat. You are now a hat. You lose."}, | |
{"meta": {"tags": [], "notes": "winnar!"}, "text": "You find crime and fight it. You are an amazing cat! You win!"} | |
], | |
"links": [ | |
{"passageID" : 0, "choices": [{"text": "Sleep?", "passageID": 1}, {"text": "Clean yourself?", "passageID": 2}, {"text": "Look out the window?", "passageID": 3}]}, | |
{"passageID" : 1, "choices": [{"text": "Wake up", "passageID": 0}]}, | |
{"passageID" : 2, "choices": [{"text": "Stop cleaning yourself.", "passageID": 0}]}, | |
{"passageID" : 3, "choices": [{"text": "Run around the house for no reason and yowl.", "passageID": 4}, {"text": "Fight crime.", "passageID": 5}]} | |
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.info { | |
margin-left: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment