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 jd = { | |
name: "J.D. Zamfirescu", | |
food: "宫保鸡丁", | |
color: "blue" | |
}; | |
textAlign(CENTER); | |
fill(0); | |
textSize(15); |
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 people = [ | |
{ | |
name: "J.D. Zamfirescu", | |
food: "宫保鸡丁", | |
color: "blue" | |
}, | |
{ | |
name: "Adam Smith", | |
food: "小笼包", | |
color: "red" |
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
// dropping circles, phase 1 | |
// the circles array! | |
var circles = []; | |
function setup() { | |
createCanvas(340, 340); | |
// add three circles | |
for (var i = 0; i < 3; i += 1) { |
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
// Just a few circles | |
var circles = [ | |
{ x: 30, y: 40, vx: 3, vy: 2, h: 10 }, | |
{ x: 90, y: 120, vx: 2, vy: 3, h: 120 }, | |
{ x: 300, y: 240, vx: -2, vy: -1, h: 300 } | |
]; | |
var DIAMETER = 30; |
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
// A few more circles | |
var circles = []; | |
var DIAMETER = 30; | |
function setup() { | |
createCanvas(340, 340); | |
for (var i = 0; i < 10; i += 1) { |
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
// A few more circles | |
var circles = []; | |
// feel free to add more blank lines here to see the table better! | |
var DIAMETER = 30; | |
function setup() { | |
createCanvas(340, 340); | |
for (var x = 50; x <= width-50; x += DIAMETER*2) { |
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
// Falling circles | |
var circles = []; | |
// feel free to add more blank lines here to see the table better! | |
var DIAMETER = 10; | |
function setup() { | |
createCanvas(340, 340); | |
} |
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
import React, { Component } from "react"; | |
import "./styles.css"; | |
class StartPage extends Component { | |
render() { | |
return <div> | |
<p>Welcome, traveler! How would you like to get to your destination?</p> | |
<button onClick={() => this.props.goToPage(TrainPage)}>Train</button> | |
<button onClick={() => this.props.goToPage()}>Ship</button> |
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
import React, { Component } from "react"; | |
import "./styles.css"; | |
class StartPage extends Component { | |
render() { | |
return ( | |
<div> | |
<p>Welcome, traveler! What is your name?</p> | |
<input |
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
import p5 from "p5"; | |
import React, { Component } from "react"; | |
import "./styles.css"; | |
class StartPage extends Component { | |
render() { | |
return ( | |
<div> | |
<p>Welcome! What is your favorite color?</p> |