Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 26 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<meta name="twitter:title" content="WoofJS">
<meta name="twitter:description" content="WoofJS is a Scratch-inspired Javascript library for making games.">
<meta name="twitter:image" content="./images/qIgC8Ae.png">


<meta property="og:image" content="./images/qIgC8Ae.png">
<meta property="og:title" content="WoofJS">
<meta property="og:description" content="WoofJS is a Scratch-inspired Javascript library for making games.">
Expand Down Expand Up @@ -54,10 +54,10 @@
button {
width: 100% !important;
}

#start{display:none;}
}

#all {
margin: auto;
z-index: 100;
Expand All @@ -70,21 +70,21 @@
width: 60%;
background: rgba(255, 255, 255, 0.5);
}

.CodeMirror {
height: 100%;
background: rgba(255, 255, 255, 0.5);
font-size: 1.4em;
}

iframe {
width: 100%;
height: 97%;
border: none;
overflow: hidden;
z-index: -100;
}

button {
z-index: 200;
width: 375px;
Expand All @@ -98,15 +98,15 @@
color: white;
font-size: 150%;
}

#start {
background-color: #6FCF97;
}

#educator {
background-color: #56CCF2;
}

#click {
display: flex;
width: 100%;
Expand Down Expand Up @@ -135,39 +135,29 @@
autofocus: false,
readOnly: readOnly
});

cm.on("mousedown", function(e) {
if (readOnly) {
e.preventDefault()
e.preventDefault()
}
})

cm.on("touchstart", function(e) {
if (readOnly) {
e.preventDefault()
e.preventDefault()
}
})

var pos = 0
var code = "// Hey there, welcome to WoofJS! WoofJS is a Scratch-inspired JavaScript library for making games.\n" +
"\n" +
"// Want to code something together? :-)\n" +
"every(.001, 'seconds', () => {" +
" var circle = new Circle()\n" +
"\n" +
" // Go, little circles, go!\n" +
" forever(() => {\n" +
" circle.move(5)\n" +
" })\n\n" +
" // Let's randomize size\n" +
" circle.radius = random(5, 20)\n\n" +
" // Colors are fun!\n" +
" circle.color = randomColor()\n" +
"\n" +
" // I say scatter!\n" +
" circle.angle = random(0, 360)\n\n" +
" // Now it's your turn. Play with this code by changing any of the numbers above.";

var pos = 0
var code = `// Hey there, welcome to WoofJS! WoofJS is a Scratch-inspired JavaScript library for making games.\n\n
// Want to code something together? :-)\n
every(.001, 'seconds', () => { var circle = new Circle()\n\n //
Go, little circles, go!\n forever(() => {\n circle.move(5)\n })\n\n
// Let's randomize size\n circle.radius = random(5, 20)\n\n
// Colors are fun!\n circle.color = randomColor()\n\n
// I say scatter!\n
circle.angle = random(0, 360)\n\n
// Now it's your turn. Play with this code by changing any of the numbers above.`

function runCode() {
var iframe = document.getElementById('output');
Expand Down Expand Up @@ -242,8 +232,8 @@
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-82374072-1', 'auto');
ga('send', 'pageview');

</script>