├── docs ├── _config.yml ├── code-doodle-1 │ └── doodle │ │ └── index.html ├── boids-1 │ └── index.html ├── index.html ├── doodle.e64970db.js ├── funwithcode.6e2ac991.js ├── doodle.e64970db.js.map └── funwithcode.6e2ac991.js.map ├── README.md ├── index.js ├── code-doodle-1 ├── slides │ ├── test │ │ ├── assets │ │ │ ├── external-script-a.js │ │ │ ├── external-script-b.js │ │ │ ├── external-script-c.js │ │ │ └── external-script-d.js │ │ ├── examples │ │ │ ├── assets │ │ │ │ ├── beeping.txt │ │ │ │ ├── beeping.wav │ │ │ │ ├── image1.png │ │ │ │ └── image2.png │ │ │ ├── barebones.html │ │ │ ├── embedded-media.html │ │ │ ├── slide-transitions.html │ │ │ ├── slide-backgrounds.html │ │ │ └── math.html │ │ ├── simple.md │ │ ├── test-markdown.js │ │ ├── test-pdf.js │ │ ├── test-markdown-options.js │ │ ├── test-markdown-external.js │ │ ├── test-markdown-options.html │ │ ├── test-markdown-external.html │ │ ├── test-dependencies.html │ │ ├── test-markdown.html │ │ ├── test-pdf.html │ │ ├── test-grid-navigation.html │ │ ├── test.html │ │ ├── test-dependencies-async.html │ │ ├── test-markdown-element-attributes.js │ │ ├── test-plugins.html │ │ ├── test-markdown-slide-attributes.js │ │ ├── test-markdown-slide-attributes.html │ │ ├── test-iframes.html │ │ ├── test-markdown-element-attributes.html │ │ └── test-state.html │ ├── css │ │ ├── my │ │ │ └── main.css │ │ ├── reset.css │ │ ├── theme │ │ │ ├── source │ │ │ │ ├── night.scss │ │ │ │ ├── serif.scss │ │ │ │ ├── league.scss │ │ │ │ ├── sky.scss │ │ │ │ ├── white.scss │ │ │ │ ├── beige.scss │ │ │ │ ├── black.scss │ │ │ │ ├── simple.scss │ │ │ │ ├── moon.scss │ │ │ │ ├── solarized.scss │ │ │ │ └── blood.scss │ │ │ ├── template │ │ │ │ ├── settings.scss │ │ │ │ └── mixins.scss │ │ │ └── README.md │ │ └── print │ │ │ ├── pdf.css │ │ │ └── paper.css │ ├── .travis.yml │ ├── lib │ │ ├── font │ │ │ ├── league-gothic │ │ │ │ ├── LICENSE │ │ │ │ ├── league-gothic.eot │ │ │ │ ├── league-gothic.ttf │ │ │ │ ├── league-gothic.woff │ │ │ │ └── league-gothic.css │ │ │ └── source-sans-pro │ │ │ │ ├── source-sans-pro-italic.eot │ │ │ │ ├── source-sans-pro-italic.ttf │ │ │ │ ├── source-sans-pro-italic.woff │ │ │ │ ├── source-sans-pro-regular.eot │ │ │ │ ├── source-sans-pro-regular.ttf │ │ │ │ ├── source-sans-pro-regular.woff │ │ │ │ ├── source-sans-pro-semibold.eot │ │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ │ ├── source-sans-pro-semibold.woff │ │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ │ ├── source-sans-pro.css │ │ │ │ └── LICENSE │ │ ├── js │ │ │ ├── html5shiv.js │ │ │ └── promise.js │ │ └── css │ │ │ ├── monokai.css │ │ │ └── zenburn.css │ ├── js │ │ └── my │ │ │ ├── 1.js │ │ │ ├── 2.js │ │ │ ├── index.js │ │ │ ├── 4.js │ │ │ ├── 3.js │ │ │ └── common.js │ ├── plugin │ │ ├── multiplex │ │ │ ├── client.js │ │ │ ├── package.json │ │ │ ├── master.js │ │ │ └── index.js │ │ ├── markdown │ │ │ ├── example.md │ │ │ └── example.html │ │ ├── notes-server │ │ │ ├── index.js │ │ │ └── client.js │ │ ├── print-pdf │ │ │ └── print-pdf.js │ │ ├── math │ │ │ └── math.js │ │ └── notes │ │ │ └── notes.js │ ├── bower.json │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── package.json │ ├── .gitignore │ ├── doodle.html │ └── gruntfile.js └── doodle │ ├── package.json │ ├── index.html │ └── index.js ├── boids-1 ├── research │ └── 10.1.1.103.7187.pdf ├── package.json ├── src │ ├── box.js │ ├── util.js │ └── boidManager.js ├── lib │ ├── shaders │ │ ├── CopyShader.js │ │ ├── DigitalGlitch.js │ │ ├── GlitchPass.js │ │ └── DepthLimitedBlurShader.js │ └── postprocessing │ │ ├── Pass.js │ │ ├── ShaderPass.js │ │ ├── RenderPass.js │ │ └── MaskPass.js ├── index.html └── index.js ├── Makefile ├── cachebust.sh ├── package.json ├── template.js ├── .gitignore ├── index.html └── template.html /docs/_config.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The code for "Fun With Code". 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import html1 from "./code-doodle-1/doodle/index.html"; -------------------------------------------------------------------------------- /code-doodle-1/slides/test/assets/external-script-a.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'A'; -------------------------------------------------------------------------------- /code-doodle-1/slides/test/assets/external-script-b.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'B'; -------------------------------------------------------------------------------- /code-doodle-1/slides/test/assets/external-script-c.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'C'; -------------------------------------------------------------------------------- /code-doodle-1/slides/test/assets/external-script-d.js: -------------------------------------------------------------------------------- 1 | window.externalScriptSequence += 'D'; -------------------------------------------------------------------------------- /code-doodle-1/slides/css/my/main.css: -------------------------------------------------------------------------------- 1 | .reveal pre code { 2 | max-height: 100% !important; 3 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 11 4 | after_script: 5 | - npm run build -- retire 6 | -------------------------------------------------------------------------------- /boids-1/research/10.1.1.103.7187.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/boids-1/research/10.1.1.103.7187.pdf -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/assets/beeping.txt: -------------------------------------------------------------------------------- 1 | Source: https://freesound.org/people/fennelliott/sounds/379419/ 2 | License: CC0 (public domain) -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/assets/beeping.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/test/examples/assets/beeping.wav -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/assets/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/test/examples/assets/image1.png -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/assets/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/test/examples/assets/image2.png -------------------------------------------------------------------------------- /code-doodle-1/slides/test/simple.md: -------------------------------------------------------------------------------- 1 | ## Slide 1.1 2 | 3 | ```js 4 | var a = 1; 5 | ``` 6 | 7 | 8 | ## Slide 1.2 9 | 10 | 11 | 12 | ## Slide 2 13 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: run dist 2 | 3 | dist: 4 | mkdir -p docs 5 | touch docs/_config.yml 6 | npm run dist 7 | ./cachebust.sh 8 | 9 | run: 10 | npm run start -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /cachebust.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | TS="$(date '+%s')" 4 | for asset in "js" "css"; do 5 | perl -pi -e 's/funwithcode.'$asset'.*?">/funwithcode.'$asset'?'$TS'">/g' docs/index.html 6 | done -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/funwithcode/master/code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | document.createElement('header'); 2 | document.createElement('nav'); 3 | document.createElement('section'); 4 | document.createElement('article'); 5 | document.createElement('aside'); 6 | document.createElement('footer'); 7 | document.createElement('hgroup'); -------------------------------------------------------------------------------- /code-doodle-1/doodle/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-doodle-1", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "parcel-bundler": "^1.12.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 7 | }); 8 | 9 | } ); 10 | 11 | Reveal.initialize(); 12 | -------------------------------------------------------------------------------- /code-doodle-1/slides/js/my/1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function start() { 4 | ctx.lineWidth = 10; 5 | ctx.strokeStyle = 'hsla(180, 100%, 50%, 1.0)'; 6 | ctx.beginPath(); 7 | 8 | var x = canvas.width / 2; 9 | var y = canvas.height / 2; 10 | 11 | // pen down 12 | ctx.moveTo(x - 100, y - 100); 13 | 14 | ctx.lineTo(x + 100, y + 100); 15 | 16 | ctx.stroke(); 17 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/js/my/2.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function start() { 4 | ctx.lineWidth = 10; 5 | ctx.strokeStyle = 'hsla(180, 100%, 50%, 1.0)'; 6 | ctx.beginPath(); 7 | 8 | var x = canvas.width / 2; 9 | var y = canvas.height / 2; 10 | 11 | ctx.moveTo(x - 200, y - 100); 12 | 13 | ctx.lineTo(x, y + 100); 14 | ctx.lineTo(x + 200, y); 15 | 16 | ctx.stroke(); 17 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-pdf.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | // Only one test for now, we're mainly ensuring that there 4 | // are no execution errors when running PDF mode 5 | 6 | QUnit.test( 'Reveal.isReady', function( assert ) { 7 | assert.strictEqual( Reveal.isReady(), true, 'returns true' ); 8 | }); 9 | 10 | } ); 11 | 12 | Reveal.initialize({ pdf: true }); 13 | -------------------------------------------------------------------------------- /boids-1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-doodle-2", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "parcel-bundler": "^1.12.3" 13 | }, 14 | "dependencies": { 15 | "three": "^0.108.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "funwithcode", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "parcel index.html", 9 | "dist": "parcel build index.html -d docs --public-url /funwithcode/" 10 | }, 11 | "author": "", 12 | "license": "MIT", 13 | "devDependencies": { 14 | "parcel-bundler": "^1.12.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://revealjs.com", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | 33 | 34 | ## External 3.3 35 | 36 | ![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png) 37 | -------------------------------------------------------------------------------- /code-doodle-1/slides/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.8.0", 4 | "main": [ 5 | "js/reveal.js", 6 | "css/reveal.css" 7 | ], 8 | "homepage": "http://revealjs.com", 9 | "license": "MIT", 10 | "description": "The HTML Presentation Framework", 11 | "authors": [ 12 | "Hakim El Hattab " 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/hakimel/reveal.js.git" 17 | }, 18 | "ignore": [ 19 | "**/.*", 20 | "node_modules", 21 | "bower_components", 22 | "test" 23 | ] 24 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/js/my/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Reveal.initialize({ 4 | controls: false, 5 | progress: false, 6 | hash: true, 7 | preloadIframes: false, 8 | transition: 'fade', 9 | center: false, 10 | dependencies: [ 11 | { src: 'plugin/markdown/marked.js' }, 12 | { src: 'plugin/markdown/markdown.js' }, 13 | { src: 'plugin/notes/notes.js', async: true }, 14 | { src: 'plugin/highlight/highlight.js', async: true } 15 | ], 16 | 17 | width: "100%", 18 | height: "100%", 19 | margin: 0, 20 | minScale: 1, 21 | maxScale: 1 22 | }); 23 | 24 | var animationInterval = null; 25 | var functions = {} -------------------------------------------------------------------------------- /boids-1/src/box.js: -------------------------------------------------------------------------------- 1 | var THREE = require('three') 2 | 3 | export default class Box { 4 | constructor(width = 100, height = 100, depth = 100, color = 0xffffff) { 5 | const geometry = new THREE.BoxGeometry(width, height, depth, 1, 1, 1); 6 | 7 | this.mesh = new THREE.Group(); 8 | var lineMaterial = new THREE.LineBasicMaterial({ color: 0xffffff, transparent: true, opacity: 0.05 }); 9 | const meshMaterial = new THREE.MeshLambertMaterial({ 10 | color, 11 | transparent: true, 12 | opacity: 0.9, 13 | wireframe: false, 14 | depthWrite: false, 15 | blending: THREE.NormalBlending 16 | }); 17 | this.mesh.add(new THREE.Mesh(geometry, meshMaterial)); 18 | this.mesh.add(new THREE.LineSegments(new THREE.WireframeGeometry(geometry), lineMaterial)); 19 | } 20 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-options.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Options are set', function( assert ) { 6 | assert.strictEqual( marked.defaults.smartypants, true ); 7 | }); 8 | 9 | QUnit.test( 'Smart quotes are activated', function( assert ) { 10 | var text = document.querySelector( '.reveal .slides>section>p' ).textContent; 11 | 12 | assert.strictEqual( /['"]/.test( text ), false ); 13 | assert.strictEqual( /[“”‘’]/.test( text ), true ); 14 | }); 15 | 16 | } ); 17 | 18 | Reveal.initialize({ 19 | dependencies: [ 20 | { src: '../plugin/markdown/marked.js' }, 21 | // Test loading JS files with query strings 22 | { src: '../plugin/markdown/markdown.js?query=string' }, 23 | ], 24 | markdown: { 25 | smartypants: true 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-external.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 7 | }); 8 | 9 | QUnit.test( 'Horizontal separator', function( assert ) { 10 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' ); 11 | }); 12 | 13 | QUnit.test( 'Language highlighter', function( assert ) { 14 | assert.strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' ); 15 | assert.strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' ); 16 | }); 17 | 18 | } ); 19 | 20 | Reveal.initialize(); 21 | -------------------------------------------------------------------------------- /code-doodle-1/slides/js/my/4.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function start() { 4 | animate = true; 5 | 6 | ctx.lineWidth = 10; 7 | ctx.font = '48px serif'; 8 | 9 | var count = 0; 10 | 11 | function step() { 12 | if (!animate) return; 13 | 14 | ctx.clearRect(0, 0, canvas.width, canvas.height); 15 | 16 | ctx.strokeStyle = 'hsla(' + count + ', 100%, 50%, 1.0)'; 17 | ctx.beginPath(); 18 | 19 | var x = canvas.width / 2; 20 | var y = canvas.height / 2; 21 | 22 | ctx.moveTo(x - 200, y - 100); 23 | 24 | var yCount = Math.sin((Math.PI / 180) * count) 25 | ctx.lineTo(x, y + yCount * 100); 26 | ctx.lineTo(x + 200, y); 27 | 28 | ctx.stroke(); 29 | 30 | count++; 31 | if (count === 361) { 32 | count = 0; 33 | } 34 | 35 | window.requestAnimationFrame(step); 36 | } 37 | 38 | window.requestAnimationFrame(step); 39 | } -------------------------------------------------------------------------------- /boids-1/lib/shaders/CopyShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Full-screen textured quad shader 5 | */ 6 | 7 | 8 | 9 | var CopyShader = { 10 | 11 | uniforms: { 12 | 13 | "tDiffuse": { value: null }, 14 | "opacity": { value: 1.0 } 15 | 16 | }, 17 | 18 | vertexShader: [ 19 | 20 | "varying vec2 vUv;", 21 | 22 | "void main() {", 23 | 24 | " vUv = uv;", 25 | " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 26 | 27 | "}" 28 | 29 | ].join( "\n" ), 30 | 31 | fragmentShader: [ 32 | 33 | "uniform float opacity;", 34 | 35 | "uniform sampler2D tDiffuse;", 36 | 37 | "varying vec2 vUv;", 38 | 39 | "void main() {", 40 | 41 | " vec4 texel = texture2D( tDiffuse, vUv );", 42 | " gl_FragColor = opacity * texel;", 43 | 44 | "}" 45 | 46 | ].join( "\n" ) 47 | 48 | }; 49 | 50 | export { CopyShader }; 51 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/barebones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Barebones 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |

Barebones Presentation

20 |

This example contains the bare minimum includes and markup required to run a reveal.js presentation.

21 |
22 | 23 |
24 |

No Theme

25 |

There's no theme included, so it will fall back on browser defaults.

26 |
27 | 28 |
29 | 30 |
31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /code-doodle-1/slides/js/my/3.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function start() { 4 | animate = true; 5 | 6 | ctx.lineWidth = 10; 7 | ctx.font = '48px serif'; 8 | 9 | var wait = 0; 10 | var count = 0; 11 | 12 | function step() { 13 | if (!animate) return; 14 | 15 | ctx.clearRect(0, 0, canvas.width, canvas.height); 16 | 17 | ctx.strokeStyle = 'hsla(' + count + ', 100%, 50%, 1.0)'; 18 | ctx.beginPath(); 19 | 20 | var x = canvas.width / 2; 21 | var y = canvas.height / 2; 22 | 23 | ctx.moveTo(x - 200, y - 100); 24 | 25 | ctx.lineTo(x, y + 100); 26 | ctx.lineTo(x + 200, y); 27 | 28 | ctx.stroke(); 29 | 30 | ctx.fillText(count, x, y); 31 | 32 | wait++; 33 | if (wait > 60) { 34 | count++; 35 | if (count === 360) { 36 | wait = 0; 37 | } 38 | } 39 | 40 | window.requestAnimationFrame(step); 41 | } 42 | 43 | window.requestAnimationFrame(step); 44 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Options 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v4.0 | 20180602 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | main, menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, main, menu, nav, section { 29 | display: block; 30 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // post once the page is loaded, so the client follows also on "open URL". 23 | window.addEventListener( 'load', post ); 24 | 25 | // Monitor events that trigger a change in state 26 | Reveal.addEventListener( 'slidechanged', post ); 27 | Reveal.addEventListener( 'fragmentshown', post ); 28 | Reveal.addEventListener( 'fragmenthidden', post ); 29 | Reveal.addEventListener( 'overviewhidden', post ); 30 | Reveal.addEventListener( 'overviewshown', post ); 31 | Reveal.addEventListener( 'paused', post ); 32 | Reveal.addEventListener( 'resumed', post ); 33 | 34 | }()); 35 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /docs/code-doodle-1/doodle/index.html: -------------------------------------------------------------------------------- 1 | A Code Doodle -------------------------------------------------------------------------------- /docs/boids-1/index.html: -------------------------------------------------------------------------------- 1 | A Code Doodle -------------------------------------------------------------------------------- /template.js: -------------------------------------------------------------------------------- 1 | var canvas = document.getElementById('canvas'); 2 | canvas.height = window.innerHeight; 3 | canvas.width = window.innerWidth; 4 | var ctx = canvas.getContext('webgl'); 5 | 6 | var animate = null; 7 | 8 | 9 | function isInViewport(elem) { 10 | var bounding = elem.getBoundingClientRect(); 11 | // If the bottom is in view but the top isn't then it's visible 12 | return bounding.bottom >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) || bounding.top >= 0 && bounding.top <= (window.innerHeight || document.documentElement.clientHeight); 13 | }; 14 | 15 | function stop() { 16 | animate = false; 17 | } 18 | 19 | function start() { 20 | animate = true; 21 | 22 | function step() { 23 | if (!animate) return; 24 | if (!isInViewport(canvas)) return; 25 | 26 | // code here 27 | 28 | window.requestAnimationFrame(step); 29 | } 30 | 31 | window.requestAnimationFrame(step); 32 | }; 33 | 34 | window.addEventListener('resize', function () { 35 | canvas.width = window.innerWidth; 36 | canvas.height = window.innerHeight; 37 | stop(); 38 | start(); 39 | }); 40 | 41 | start(); -------------------------------------------------------------------------------- /code-doodle-1/slides/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. 4 | 5 | 6 | ### Personal Support 7 | If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js). 8 | 9 | 10 | ### Bug Reports 11 | When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested. 12 | 13 | 14 | ### Pull Requests 15 | - Should follow the coding style of the file you work in, most importantly: 16 | - Tabs to indent 17 | - Single-quoted strings 18 | - Should be made towards the **dev branch** 19 | - Should be submitted from a feature/topic branch (not your master) 20 | 21 | 22 | ### Plugins 23 | Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines 24 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /code-doodle-1/slides/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | Fun With Code code doodle #1 boids -------------------------------------------------------------------------------- /code-doodle-1/slides/js/my/common.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | window.addEventListener("message", receiveMessage, false); 4 | 5 | function receiveMessage(event) { 6 | switch (event.data) { 7 | case "slide:start": { 8 | start() 9 | break 10 | } 11 | case "slide:stop": { 12 | stop() 13 | break 14 | } 15 | } 16 | } 17 | 18 | var isInViewport = function isInViewport(elem) { 19 | var bounding = elem.getBoundingClientRect(); 20 | // If the bottom is in view but the top isn't then it's visible 21 | return bounding.bottom >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) || bounding.top >= 0 && bounding.top <= (window.innerHeight || document.documentElement.clientHeight); 22 | }; 23 | 24 | var canvas = document.getElementById('doodle'); 25 | canvas.width = window.innerWidth; 26 | canvas.height = window.innerHeight; 27 | var ctx = canvas.getContext('2d'); 28 | 29 | var animate = null; 30 | 31 | function stop() { 32 | animate = false; 33 | } 34 | 35 | window.addEventListener('resize', function () { 36 | canvas.width = window.innerWidth; 37 | canvas.height = window.innerHeight; 38 | stop(); 39 | start(); 40 | }); -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/embedded-media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Embedded Media 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

Embedded Media Test

23 |
24 | 25 |
26 | 27 |
28 | 29 |
30 |

Empty Slide

31 |
32 | 33 |
34 |

Auto-playing audio

35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 | 43 | 44 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 40px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | $codeFont: monospace; 32 | 33 | // Links and actions 34 | $linkColor: #13DAEC; 35 | $linkColorHover: lighten( $linkColor, 20% ); 36 | 37 | // Text selection 38 | $selectionBackgroundColor: #FF5E99; 39 | $selectionColor: #fff; 40 | 41 | // Generates the presentation background, can be overridden 42 | // to return a background image or gradient 43 | @mixin bodyBackground() { 44 | background: $backgroundColor; 45 | } 46 | -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/css/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; 10 | color: #ddd; 11 | } 12 | 13 | .hljs-tag, 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-strong, 18 | .hljs-name { 19 | color: #f92672; 20 | } 21 | 22 | .hljs-code { 23 | color: #66d9ef; 24 | } 25 | 26 | .hljs-class .hljs-title { 27 | color: white; 28 | } 29 | 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-regexp, 33 | .hljs-link { 34 | color: #bf79db; 35 | } 36 | 37 | .hljs-string, 38 | .hljs-bullet, 39 | .hljs-subst, 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-emphasis, 43 | .hljs-type, 44 | .hljs-built_in, 45 | .hljs-builtin-name, 46 | .hljs-selector-attr, 47 | .hljs-selector-pseudo, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #a6e22e; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #75715e; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-doctag, 66 | .hljs-title, 67 | .hljs-section, 68 | .hljs-type, 69 | .hljs-selector-id { 70 | font-weight: bold; 71 | } 72 | -------------------------------------------------------------------------------- /code-doodle-1/slides/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.8.0", 4 | "description": "The HTML Presentation Framework", 5 | "homepage": "http://revealjs.com", 6 | "subdomain": "revealjs", 7 | "main": "js/reveal.js", 8 | "scripts": { 9 | "test": "grunt test", 10 | "start": "grunt serve", 11 | "build": "grunt" 12 | }, 13 | "author": { 14 | "name": "Hakim El Hattab", 15 | "email": "hakim.elhattab@gmail.com", 16 | "web": "http://hakim.se" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/hakimel/reveal.js.git" 21 | }, 22 | "engines": { 23 | "node": ">=9.0.0" 24 | }, 25 | "devDependencies": { 26 | "express": "^4.16.2", 27 | "grunt": "^1.0.4", 28 | "grunt-cli": "^1.3.2", 29 | "grunt-autoprefixer": "^3.0.4", 30 | "grunt-contrib-connect": "^2.0.0", 31 | "grunt-contrib-cssmin": "^3.0.0", 32 | "grunt-contrib-jshint": "^2.0.0", 33 | "grunt-contrib-qunit": "^3.1.0", 34 | "grunt-contrib-uglify": "^3.3.0", 35 | "grunt-contrib-watch": "^1.1.0", 36 | "grunt-sass": "^3.0.2", 37 | "grunt-zip": "~0.17.1", 38 | "load-grunt-tasks": "^4.0.0", 39 | "node-sass": "^4.11.0", 40 | "mustache": "^2.3.0", 41 | "socket.io": "^2.2.0" 42 | }, 43 | "license": "MIT" 44 | } 45 | -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-dependencies.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Dependencies 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 27 | 28 | 29 | 30 | 31 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #191919; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | section.has-dark-background { 35 | &, h1, h2, h3, h4, h5, h6 { 36 | color: #fff; 37 | } 38 | } 39 | 40 | 41 | // Theme template ------------------------------ 42 | @import "../template/theme"; 43 | // --------------------------------------------- -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /boids-1/src/util.js: -------------------------------------------------------------------------------- 1 | const THREE = require('three') 2 | import Box from './box' 3 | 4 | var sphereCastDirections = [] 5 | 6 | // from https://www.youtube.com/watch?v=bqtqltqcQhw 7 | function initSphereCast() { 8 | const numViewDirections = 300 9 | const goldenRatio = (1 + Math.sqrt(5)) / 2 10 | const angleIncrement = Math.PI * 2 * goldenRatio; 11 | 12 | for (var i = 0; i < numViewDirections; i++) { 13 | const t = i / numViewDirections 14 | const inclination = Math.acos(1 - 2 * t) 15 | const azimuth = angleIncrement * i 16 | 17 | const x = Math.sin (inclination) * Math.cos (azimuth) 18 | const y = Math.sin (inclination) * Math.sin (azimuth) 19 | const z = Math.cos (inclination) 20 | sphereCastDirections.push(new THREE.Vector3 (x, y, z)) 21 | } 22 | } 23 | 24 | initSphereCast() 25 | 26 | /** 27 | * Adds a simple box obstacle to the scene. 28 | * 29 | * @param {*} obstacles the array to push the obstacle to 30 | * @param {*} scene the scene to add the obstacle to 31 | * @param {*} w width of obstacle 32 | * @param {*} h height of obstacle 33 | * @param {*} d depth of obstacle 34 | * @param {*} c color of obstacle 35 | * @param {*} x coordinate of obstacle 36 | * @param {*} y coordinate of obstacle 37 | * @param {*} z coordinate of obstacle 38 | */ 39 | function addObstacle(obstacles, scene, w, h, d, c, x, y, z) { 40 | var obs1 = new Box(w, h, d, c); 41 | obs1.mesh.position.set(x, y, z) 42 | scene.add(obs1.mesh) 43 | obstacles.push(obs1) 44 | } 45 | 46 | export const utils = { 47 | sphereCastDirections, 48 | addObstacle 49 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`. 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /code-doodle-1/slides/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Optional REPL history 57 | .node_repl_history 58 | 59 | # Output of 'npm pack' 60 | *.tgz 61 | 62 | # Yarn Integrity file 63 | .yarn-integrity 64 | 65 | # dotenv environment variables file 66 | .env 67 | .env.test 68 | 69 | # parcel-bundler cache (https://parceljs.org/) 70 | .cache 71 | 72 | # next.js build output 73 | .next 74 | 75 | # nuxt.js build output 76 | .nuxt 77 | 78 | # vuepress build output 79 | .vuepress/dist 80 | 81 | # Serverless directories 82 | .serverless/ 83 | 84 | # FuseBox cache 85 | .fusebox/ 86 | 87 | # DynamoDB Local files 88 | .dynamodb/ 89 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Optional REPL history 57 | .node_repl_history 58 | 59 | # Output of 'npm pack' 60 | *.tgz 61 | 62 | # Yarn Integrity file 63 | .yarn-integrity 64 | 65 | # dotenv environment variables file 66 | .env 67 | .env.test 68 | 69 | # parcel-bundler cache (https://parceljs.org/) 70 | .cache 71 | 72 | # next.js build output 73 | .next 74 | 75 | # nuxt.js build output 76 | .nuxt 77 | 78 | # vuepress build output 79 | .vuepress/dist 80 | 81 | # Serverless directories 82 | .serverless/ 83 | 84 | # FuseBox cache 85 | .fusebox/ 86 | 87 | # DynamoDB Local files 88 | .dynamodb/ 89 | 90 | # custom 91 | dist 92 | reveal.min.css 93 | reveal.min.js 94 | -------------------------------------------------------------------------------- /boids-1/src/boidManager.js: -------------------------------------------------------------------------------- 1 | var THREE = require('three') 2 | import Boid from './boid'; 3 | 4 | export default class BoidManager { 5 | /** 6 | * 7 | * @param {*} numberOfBoids 8 | * @param {*} obstacles other obstacles in the world to consider when avoiding collisions 9 | * @param {*} target a target for all boids to move towards 10 | */ 11 | constructor(scene, numberOfBoids = 20, obstacles = [], target = null) { 12 | 13 | // create the boids 14 | this.initBoids(scene, numberOfBoids, target) 15 | 16 | // for each boid, add the other boids to its collidableMeshList, and also add 17 | // the meshes from the common collidableMeshList 18 | 19 | this.obstacles = obstacles 20 | } 21 | 22 | initBoids(scene, numberOfBoids, target) { 23 | this.boids = this.boids || []; 24 | 25 | var randomX, randomY, randomZ, colour, followTarget, quaternion 26 | 27 | for (let i = 0; i < numberOfBoids; i++) { 28 | randomX = Math.random() * 250 - 125 29 | randomY = Math.random() * 250 - 125 30 | randomZ = Math.random() * 250 - 125 31 | colour = null // will use default color in getBoid 32 | followTarget = false 33 | quaternion = null 34 | 35 | // reference boid 36 | if (i === 0) { 37 | randomX = 0 38 | randomY = 0 39 | randomZ = 0 40 | colour = 0xe56289 41 | // followTarget = true 42 | quaternion = null 43 | } 44 | 45 | var position = new THREE.Vector3(randomX, randomY, randomZ) 46 | 47 | var boid = new Boid(scene, target, position, quaternion, colour, followTarget); 48 | this.boids.push(boid) 49 | } 50 | } 51 | 52 | update(delta) { 53 | this.boids.forEach(boid => { 54 | boid.update(delta, this.boids, this.obstacles) 55 | }) 56 | } 57 | } -------------------------------------------------------------------------------- /boids-1/lib/postprocessing/Pass.js: -------------------------------------------------------------------------------- 1 | import { 2 | OrthographicCamera, 3 | PlaneBufferGeometry, 4 | Mesh 5 | } from "three"; 6 | 7 | function Pass() { 8 | 9 | // if set to true, the pass is processed by the composer 10 | this.enabled = true; 11 | 12 | // if set to true, the pass indicates to swap read and write buffer after rendering 13 | this.needsSwap = true; 14 | 15 | // if set to true, the pass clears its buffer before rendering 16 | this.clear = false; 17 | 18 | // if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer. 19 | this.renderToScreen = false; 20 | 21 | } 22 | 23 | Object.assign( Pass.prototype, { 24 | 25 | setSize: function ( /* width, height */ ) {}, 26 | 27 | render: function ( /* renderer, writeBuffer, readBuffer, deltaTime, maskActive */ ) { 28 | 29 | console.error( 'THREE.Pass: .render() must be implemented in derived pass.' ); 30 | 31 | } 32 | 33 | } ); 34 | 35 | // Helper for passes that need to fill the viewport with a single quad. 36 | 37 | Pass.FullScreenQuad = ( function () { 38 | 39 | var camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); 40 | var geometry = new PlaneBufferGeometry( 2, 2 ); 41 | 42 | var FullScreenQuad = function ( material ) { 43 | 44 | this._mesh = new Mesh( geometry, material ); 45 | 46 | }; 47 | 48 | Object.defineProperty( FullScreenQuad.prototype, 'material', { 49 | 50 | get: function () { 51 | 52 | return this._mesh.material; 53 | 54 | }, 55 | 56 | set: function ( value ) { 57 | 58 | this._mesh.material = value; 59 | 60 | } 61 | 62 | } ); 63 | 64 | Object.assign( FullScreenQuad.prototype, { 65 | 66 | render: function ( renderer ) { 67 | 68 | renderer.render( this._mesh, camera ); 69 | 70 | } 71 | 72 | } ); 73 | 74 | return FullScreenQuad; 75 | 76 | } )(); 77 | 78 | export { Pass }; 79 | -------------------------------------------------------------------------------- /boids-1/lib/postprocessing/ShaderPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | import { 6 | ShaderMaterial, 7 | UniformsUtils 8 | } from "three"; 9 | import { Pass } from "../postprocessing/Pass.js"; 10 | 11 | var ShaderPass = function ( shader, textureID ) { 12 | 13 | Pass.call( this ); 14 | 15 | this.textureID = ( textureID !== undefined ) ? textureID : "tDiffuse"; 16 | 17 | if ( shader instanceof ShaderMaterial ) { 18 | 19 | this.uniforms = shader.uniforms; 20 | 21 | this.material = shader; 22 | 23 | } else if ( shader ) { 24 | 25 | this.uniforms = UniformsUtils.clone( shader.uniforms ); 26 | 27 | this.material = new ShaderMaterial( { 28 | 29 | defines: Object.assign( {}, shader.defines ), 30 | uniforms: this.uniforms, 31 | vertexShader: shader.vertexShader, 32 | fragmentShader: shader.fragmentShader 33 | 34 | } ); 35 | 36 | } 37 | 38 | this.fsQuad = new Pass.FullScreenQuad( this.material ); 39 | 40 | }; 41 | 42 | ShaderPass.prototype = Object.assign( Object.create( Pass.prototype ), { 43 | 44 | constructor: ShaderPass, 45 | 46 | render: function ( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) { 47 | 48 | if ( this.uniforms[ this.textureID ] ) { 49 | 50 | this.uniforms[ this.textureID ].value = readBuffer.texture; 51 | 52 | } 53 | 54 | this.fsQuad.material = this.material; 55 | 56 | if ( this.renderToScreen ) { 57 | 58 | renderer.setRenderTarget( null ); 59 | this.fsQuad.render( renderer ); 60 | 61 | } else { 62 | 63 | renderer.setRenderTarget( writeBuffer ); 64 | // TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600 65 | if ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil ); 66 | this.fsQuad.render( renderer ); 67 | 68 | } 69 | 70 | } 71 | 72 | } ); 73 | 74 | export { ShaderPass }; 75 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-pdf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test PDF exports 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /boids-1/lib/postprocessing/RenderPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | 6 | import { Pass } from "../postprocessing/Pass.js"; 7 | 8 | var RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) { 9 | 10 | Pass.call( this ); 11 | 12 | this.scene = scene; 13 | this.camera = camera; 14 | 15 | this.overrideMaterial = overrideMaterial; 16 | 17 | this.clearColor = clearColor; 18 | this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0; 19 | 20 | this.clear = true; 21 | this.clearDepth = false; 22 | this.needsSwap = false; 23 | 24 | }; 25 | 26 | RenderPass.prototype = Object.assign( Object.create( Pass.prototype ), { 27 | 28 | constructor: RenderPass, 29 | 30 | render: function ( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) { 31 | 32 | var oldAutoClear = renderer.autoClear; 33 | renderer.autoClear = false; 34 | 35 | this.scene.overrideMaterial = this.overrideMaterial; 36 | 37 | var oldClearColor, oldClearAlpha; 38 | 39 | if ( this.clearColor ) { 40 | 41 | oldClearColor = renderer.getClearColor().getHex(); 42 | oldClearAlpha = renderer.getClearAlpha(); 43 | 44 | renderer.setClearColor( this.clearColor, this.clearAlpha ); 45 | 46 | } 47 | 48 | if ( this.clearDepth ) { 49 | 50 | renderer.clearDepth(); 51 | 52 | } 53 | 54 | renderer.setRenderTarget( this.renderToScreen ? null : readBuffer ); 55 | 56 | // TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600 57 | if ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil ); 58 | renderer.render( this.scene, this.camera ); 59 | 60 | if ( this.clearColor ) { 61 | 62 | renderer.setClearColor( oldClearColor, oldClearAlpha ); 63 | 64 | } 65 | 66 | this.scene.overrideMaterial = null; 67 | renderer.autoClear = oldAutoClear; 68 | 69 | } 70 | 71 | } ); 72 | 73 | export { RenderPass }; 74 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var crypto = require('crypto'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port: process.env.PORT || 1948, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | socket.on('multiplex-statechanged', function(data) { 20 | if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; 21 | if (createHash(data.secret) === data.socketId) { 22 | data.secret = null; 23 | socket.broadcast.emit(data.socketId, data); 24 | }; 25 | }); 26 | }); 27 | 28 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 29 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | 35 | var stream = fs.createReadStream(opts.baseDir + '/index.html'); 36 | stream.on('error', function( error ) { 37 | res.write('

reveal.js multiplex server.

Generate token'); 38 | res.end(); 39 | }); 40 | stream.on('readable', function() { 41 | stream.pipe(res); 42 | }); 43 | }); 44 | 45 | app.get("/token", function(req,res) { 46 | var ts = new Date().getTime(); 47 | var rand = Math.floor(Math.random()*9999999); 48 | var secret = ts.toString() + rand.toString(); 49 | res.send({secret: secret, socketId: createHash(secret)}); 50 | }); 51 | 52 | var createHash = function(secret) { 53 | var cipher = crypto.createCipher('blowfish', secret); 54 | return(cipher.final('hex')); 55 | }; 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /code-doodle-1/doodle/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | A Code Doodle 8 | 9 | 10 | 11 | 12 | 13 | 14 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-grid-navigation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Grid 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 39 | 40 | 41 | 42 | 43 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Fun With Code 8 | 9 | 10 | 11 | 12 | 13 | 14 | 68 | 69 | 70 | 71 | code doodle #1 72 | boids 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port : 1947, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | 20 | socket.on( 'new-subscriber', function( data ) { 21 | socket.broadcast.emit( 'new-subscriber', data ); 22 | }); 23 | 24 | socket.on( 'statechanged', function( data ) { 25 | delete data.state.overview; 26 | socket.broadcast.emit( 'statechanged', data ); 27 | }); 28 | 29 | socket.on( 'statechanged-speaker', function( data ) { 30 | delete data.state.overview; 31 | socket.broadcast.emit( 'statechanged-speaker', data ); 32 | }); 33 | 34 | }); 35 | 36 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 37 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 38 | }); 39 | 40 | app.get('/', function( req, res ) { 41 | 42 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 43 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 44 | 45 | }); 46 | 47 | app.get( '/notes/:socketId', function( req, res ) { 48 | 49 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 50 | res.send( Mustache.to_html( data.toString(), { 51 | socketId : req.params.socketId 52 | })); 53 | }); 54 | 55 | }); 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 65 | 66 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 67 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 68 | console.log( '2. Click on the link in your JS console to go to the notes page' ); 69 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 70 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainColor: #eee; 32 | 33 | // Headings 34 | $headingFont: Ubuntu, 'sans-serif'; 35 | $headingTextShadow: 2px 2px 2px $coal; 36 | 37 | // h1 shadow, borrowed humbly from 38 | // (c) Default theme by Hakim El Hattab 39 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 40 | 41 | // Links 42 | $linkColor: $blood; 43 | $linkColorHover: lighten( $linkColor, 20% ); 44 | 45 | // Text selection 46 | $selectionBackgroundColor: $blood; 47 | $selectionColor: #fff; 48 | 49 | 50 | // Theme template ------------------------------ 51 | @import "../template/theme"; 52 | // --------------------------------------------- 53 | 54 | // some overrides after theme template import 55 | 56 | .reveal p { 57 | font-weight: 300; 58 | text-shadow: 1px 1px $coal; 59 | } 60 | 61 | .reveal h1, 62 | .reveal h2, 63 | .reveal h3, 64 | .reveal h4, 65 | .reveal h5, 66 | .reveal h6 { 67 | font-weight: 700; 68 | } 69 | 70 | .reveal p code { 71 | background-color: $codeBackground; 72 | display: inline-block; 73 | border-radius: 7px; 74 | } 75 | 76 | .reveal small code { 77 | vertical-align: baseline; 78 | } -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'new-subscriber', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // When the state changes from inside of the speaker view 49 | socket.on( 'statechanged-speaker', function( data ) { 50 | Reveal.setState( data.state ); 51 | } ); 52 | 53 | // Monitor events that trigger a change in state 54 | Reveal.addEventListener( 'slidechanged', post ); 55 | Reveal.addEventListener( 'fragmentshown', post ); 56 | Reveal.addEventListener( 'fragmenthidden', post ); 57 | Reveal.addEventListener( 'overviewhidden', post ); 58 | Reveal.addEventListener( 'overviewshown', post ); 59 | Reveal.addEventListener( 'paused', post ); 60 | Reveal.addEventListener( 'resumed', post ); 61 | 62 | // Post the initial state 63 | post(); 64 | 65 | }()); 66 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf 6 | * 7 | * @author Manuel Bieh (https://github.com/manuelbieh) 8 | * @author Hakim El Hattab (https://github.com/hakimel) 9 | * @author Manuel Riezebosch (https://github.com/riezebosch) 10 | */ 11 | 12 | // html2pdf.js 13 | var system = require( 'system' ); 14 | 15 | var probePage = new WebPage(); 16 | var printPage = new WebPage(); 17 | 18 | var inputFile = system.args[1] || 'index.html?print-pdf'; 19 | var outputFile = system.args[2] || 'slides.pdf'; 20 | 21 | if( outputFile.match( /\.pdf$/gi ) === null ) { 22 | outputFile += '.pdf'; 23 | } 24 | 25 | console.log( 'Export PDF: Reading reveal.js config [1/4]' ); 26 | 27 | probePage.open( inputFile, function( status ) { 28 | 29 | console.log( 'Export PDF: Preparing print layout [2/4]' ); 30 | 31 | var config = probePage.evaluate( function() { 32 | return Reveal.getConfig(); 33 | } ); 34 | 35 | if( config ) { 36 | 37 | printPage.paperSize = { 38 | width: Math.floor( config.width * ( 1 + config.margin ) ), 39 | height: Math.floor( config.height * ( 1 + config.margin ) ), 40 | border: 0 41 | }; 42 | 43 | printPage.open( inputFile, function( status ) { 44 | console.log( 'Export PDF: Preparing pdf [3/4]') 45 | printPage.evaluate( function() { 46 | Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom ); 47 | } ); 48 | } ); 49 | 50 | printPage.onCallback = function( data ) { 51 | // For some reason we need to "jump the queue" for syntax highlighting to work. 52 | // See: http://stackoverflow.com/a/3580132/129269 53 | setTimeout( function() { 54 | console.log( 'Export PDF: Writing file [4/4]' ); 55 | printPage.render( outputFile ); 56 | console.log( 'Export PDF: Finished successfully!' ); 57 | phantom.exit(); 58 | }, 0 ); 59 | }; 60 | } 61 | else { 62 | 63 | console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); 64 | phantom.exit( 1 ); 65 | 66 | } 67 | } ); 68 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Tests 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | A Code Doodle 8 | 9 | 10 | 11 | 12 | 13 | 14 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /boids-1/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | A Code Doodle 8 | 9 | 10 | 11 | 12 | 13 | 14 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-dependencies-async.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Async Dependencies 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 27 | 28 | 29 | 30 | 31 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/doodle.e64970db.js: -------------------------------------------------------------------------------- 1 | parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)||n.top>=0&&n.top<=(window.innerHeight||document.documentElement.clientHeight)};function r(i,d,r){Math.random();for(var w=0;w 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Transitions 8 | 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |

Default

31 |
32 | 33 |
34 |

Default

35 |
36 | 37 |
38 |

data-transition: zoom

39 |
40 | 41 |
42 |

data-transition: zoom-in fade-out

43 |
44 | 45 |
46 |

Default

47 |
48 | 49 |
50 |

data-transition: convex

51 |
52 | 53 |
54 |

data-transition: convex-in concave-out

55 |
56 | 57 |
58 |
59 |

Default

60 |
61 |
62 |

data-transition: concave

63 |
64 |
65 |

data-transition: convex-in fade-out

66 |
67 |
68 |

Default

69 |
70 |
71 | 72 |
73 |

data-transition: none

74 |
75 | 76 |
77 |

Default

78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | 86 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | var mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'; 11 | var config = options.config || 'TeX-AMS_HTML-full'; 12 | var url = mathjax + '?config=' + config; 13 | 14 | var defaultOptions = { 15 | messageStyle: 'none', 16 | tex2jax: { 17 | inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ], 18 | skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ] 19 | }, 20 | skipStartupTypeset: true 21 | }; 22 | 23 | function defaults( options, defaultOptions ) { 24 | 25 | for ( var i in defaultOptions ) { 26 | if ( !options.hasOwnProperty( i ) ) { 27 | options[i] = defaultOptions[i]; 28 | } 29 | } 30 | 31 | } 32 | 33 | function loadScript( url, callback ) { 34 | 35 | var head = document.querySelector( 'head' ); 36 | var script = document.createElement( 'script' ); 37 | script.type = 'text/javascript'; 38 | script.src = url; 39 | 40 | // Wrapper for callback to make sure it only fires once 41 | var finish = function() { 42 | if( typeof callback === 'function' ) { 43 | callback.call(); 44 | callback = null; 45 | } 46 | } 47 | 48 | script.onload = finish; 49 | 50 | // IE 51 | script.onreadystatechange = function() { 52 | if ( this.readyState === 'loaded' ) { 53 | finish(); 54 | } 55 | } 56 | 57 | // Normal browsers 58 | head.appendChild( script ); 59 | 60 | } 61 | 62 | return { 63 | init: function() { 64 | 65 | defaults( options, defaultOptions ); 66 | defaults( options.tex2jax, defaultOptions.tex2jax ); 67 | options.mathjax = options.config = null; 68 | 69 | loadScript( url, function() { 70 | 71 | MathJax.Hub.Config( options ); 72 | 73 | // Typeset followed by an immediate reveal.js layout since 74 | // the typesetting process could affect slide height 75 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 76 | MathJax.Hub.Queue( Reveal.layout ); 77 | 78 | // Reprocess equations in slides when they turn visible 79 | Reveal.addEventListener( 'slidechanged', function( event ) { 80 | 81 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 82 | 83 | } ); 84 | 85 | } ); 86 | 87 | } 88 | } 89 | 90 | })(); 91 | 92 | Reveal.registerPlugin( 'math', RevealMath ); 93 | -------------------------------------------------------------------------------- /code-doodle-1/slides/doodle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Code Doodle Canvas 8 | 9 | 10 | 11 | 12 | 13 | 14 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 89 | 90 | -------------------------------------------------------------------------------- /boids-1/lib/postprocessing/MaskPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | 6 | import { Pass } from "../postprocessing/Pass.js"; 7 | 8 | var MaskPass = function ( scene, camera ) { 9 | 10 | Pass.call( this ); 11 | 12 | this.scene = scene; 13 | this.camera = camera; 14 | 15 | this.clear = true; 16 | this.needsSwap = false; 17 | 18 | this.inverse = false; 19 | 20 | }; 21 | 22 | MaskPass.prototype = Object.assign( Object.create( Pass.prototype ), { 23 | 24 | constructor: MaskPass, 25 | 26 | render: function ( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) { 27 | 28 | var context = renderer.getContext(); 29 | var state = renderer.state; 30 | 31 | // don't update color or depth 32 | 33 | state.buffers.color.setMask( false ); 34 | state.buffers.depth.setMask( false ); 35 | 36 | // lock buffers 37 | 38 | state.buffers.color.setLocked( true ); 39 | state.buffers.depth.setLocked( true ); 40 | 41 | // set up stencil 42 | 43 | var writeValue, clearValue; 44 | 45 | if ( this.inverse ) { 46 | 47 | writeValue = 0; 48 | clearValue = 1; 49 | 50 | } else { 51 | 52 | writeValue = 1; 53 | clearValue = 0; 54 | 55 | } 56 | 57 | state.buffers.stencil.setTest( true ); 58 | state.buffers.stencil.setOp( context.REPLACE, context.REPLACE, context.REPLACE ); 59 | state.buffers.stencil.setFunc( context.ALWAYS, writeValue, 0xffffffff ); 60 | state.buffers.stencil.setClear( clearValue ); 61 | state.buffers.stencil.setLocked( true ); 62 | 63 | // draw into the stencil buffer 64 | 65 | renderer.setRenderTarget( readBuffer ); 66 | if ( this.clear ) renderer.clear(); 67 | renderer.render( this.scene, this.camera ); 68 | 69 | renderer.setRenderTarget( writeBuffer ); 70 | if ( this.clear ) renderer.clear(); 71 | renderer.render( this.scene, this.camera ); 72 | 73 | // unlock color and depth buffer for subsequent rendering 74 | 75 | state.buffers.color.setLocked( false ); 76 | state.buffers.depth.setLocked( false ); 77 | 78 | // only render where stencil is set to 1 79 | 80 | state.buffers.stencil.setLocked( false ); 81 | state.buffers.stencil.setFunc( context.EQUAL, 1, 0xffffffff ); // draw if == 1 82 | state.buffers.stencil.setOp( context.KEEP, context.KEEP, context.KEEP ); 83 | state.buffers.stencil.setLocked( true ); 84 | 85 | } 86 | 87 | } ); 88 | 89 | 90 | var ClearMaskPass = function () { 91 | 92 | Pass.call( this ); 93 | 94 | this.needsSwap = false; 95 | 96 | }; 97 | 98 | ClearMaskPass.prototype = Object.create( Pass.prototype ); 99 | 100 | Object.assign( ClearMaskPass.prototype, { 101 | 102 | render: function ( renderer /*, writeBuffer, readBuffer, deltaTime, maskActive */ ) { 103 | 104 | renderer.state.buffers.stencil.setLocked( false ); 105 | renderer.state.buffers.stencil.setTest( false ); 106 | 107 | } 108 | 109 | } ); 110 | 111 | export { MaskPass, ClearMaskPass }; 112 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-element-attributes.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' ); 7 | }); 8 | 9 | QUnit.test( 'Attributes on element header in vertical slides', function( assert ) { 10 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' ); 11 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' ); 12 | }); 13 | 14 | QUnit.test( 'Attributes on element paragraphs in vertical slides', function( assert ) { 15 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' ); 16 | }); 17 | 18 | QUnit.test( 'Attributes on element list items in vertical slides', function( assert ) { 19 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' ); 20 | }); 21 | 22 | QUnit.test( 'Attributes on element paragraphs in horizontal slides', function( assert ) { 23 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' ); 24 | }); 25 | 26 | QUnit.test( 'Attributes on element list items in horizontal slides', function( assert ) { 27 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' ); 28 | }); 29 | 30 | QUnit.test( 'Attributes on element image in horizontal slides', function( assert ) { 31 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' ); 32 | }); 33 | 34 | QUnit.test( 'Attributes on elements in vertical slides with default element attribute separator', function( assert ) { 35 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' ); 36 | }); 37 | 38 | QUnit.test( 'Attributes on elements in single slides with default element attribute separator', function( assert ) { 39 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' ); 40 | }); 41 | 42 | } ); 43 | 44 | Reveal.initialize(); 45 | -------------------------------------------------------------------------------- /docs/funwithcode.6e2ac991.js: -------------------------------------------------------------------------------- 1 | parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;cn;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t}); -------------------------------------------------------------------------------- /code-doodle-1/doodle/index.js: -------------------------------------------------------------------------------- 1 | var canvas = document.getElementById('canvas'); 2 | canvas.height = window.innerHeight; 3 | canvas.width = window.innerWidth; 4 | var ctx = canvas.getContext('2d'); 5 | 6 | var animate = null; 7 | 8 | function stop() { 9 | animate = false; 10 | } 11 | 12 | function start() { 13 | animate = true; 14 | 15 | var spacing = 20; 16 | var numOfLines = canvas.height / spacing; 17 | 18 | var startOffset = spacing / 2; 19 | var quarter = (canvas.width - spacing) / 4; 20 | 21 | ctx.lineWidth = 10; 22 | 23 | var isInViewport = function isInViewport(elem) { 24 | var bounding = elem.getBoundingClientRect(); 25 | // If the bottom is in view but the top isn't then it's visible 26 | return bounding.bottom >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) || bounding.top >= 0 && bounding.top <= (window.innerHeight || document.documentElement.clientHeight); 27 | }; 28 | 29 | function line(diff, n, hue) { 30 | 31 | var p = Math.random() * 100 32 | 33 | for (let y = 0; y < numOfLines; y++) { 34 | 35 | // yDiv will be a value between 0 and 1 (from first row to last) 36 | var yDiv = y / numOfLines; 37 | 38 | // Math.sin((Math.PI / 180) * degrees) => 0,0 90,1 180,0 270,-1, 360,0 39 | // so we get a value which fluctuates between 1 and -1 40 | 41 | var firstYShift = Math.sin(yDiv * Math.PI * 6) * (Math.sin(diff * n * 2) * 31); 42 | var secondYShift = Math.sin(yDiv * Math.PI * 5) * (Math.sin(diff * n * 4) * 37); 43 | var thirdYShift = Math.sin(yDiv * Math.PI * 4) * (Math.sin(diff * n * 6) * 43); 44 | var firstXShift = Math.sin(yDiv * Math.PI * 3) * (Math.sin(diff * n * 8) * 77); 45 | var secondXShift = Math.sin(yDiv * Math.PI * 2) * (Math.sin(diff * n * 10) * 91); 46 | var thirdXShift = Math.sin(yDiv * Math.PI) * (Math.sin(diff * n * 12) * 101); 47 | 48 | ctx.strokeStyle = 'hsla(' + hue + ', 100%, 50%, 0.4)'; 49 | ctx.beginPath(); 50 | ctx.moveTo(startOffset, y * spacing + startOffset); 51 | ctx.lineTo(startOffset + quarter + firstXShift, y * spacing + startOffset + firstYShift); 52 | ctx.lineTo(startOffset + quarter * 2 + secondXShift, y * spacing + startOffset + secondYShift); 53 | ctx.lineTo(startOffset + quarter * 3 + thirdXShift, y * spacing + startOffset + thirdYShift); 54 | ctx.lineTo(canvas.width - startOffset, y * spacing + startOffset); 55 | ctx.stroke(); 56 | } 57 | } 58 | 59 | var counter = 0; 60 | var hue1 = 0; 61 | var hue2 = 0; 62 | 63 | function step() { 64 | if (!animate) return; 65 | if (!isInViewport(canvas)) return; 66 | ctx.clearRect(0, 0, canvas.width, canvas.height); 67 | 68 | counter++; 69 | 70 | line(counter, 0.001, hue1); 71 | 72 | line(counter * 2, 0.0001, hue2); 73 | 74 | hue1 += 1; 75 | hue2 += 0.1; 76 | 77 | window.requestAnimationFrame(step); 78 | } 79 | 80 | window.requestAnimationFrame(step); 81 | }; 82 | 83 | window.addEventListener('resize', function () { 84 | canvas.width = window.innerWidth; 85 | canvas.height = window.innerHeight; 86 | stop(); 87 | start(); 88 | }); 89 | 90 | start(); -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-plugins.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Plugins 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 27 | 28 | 29 | 30 | 31 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /boids-1/lib/shaders/DigitalGlitch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author felixturner / http://airtight.cc/ 3 | * 4 | * RGB Shift Shader 5 | * Shifts red and blue channels from center in opposite directions 6 | * Ported from http://kriss.cx/tom/2009/05/rgb-shift/ 7 | * by Tom Butterworth / http://kriss.cx/tom/ 8 | * 9 | * amount: shift distance (1 is width of input) 10 | * angle: shift angle in radians 11 | */ 12 | 13 | 14 | 15 | var DigitalGlitch = { 16 | 17 | uniforms: { 18 | 19 | "tDiffuse": { value: null }, //diffuse texture 20 | "tDisp": { value: null }, //displacement texture for digital glitch squares 21 | "byp": { value: 0 }, //apply the glitch ? 22 | "amount": { value: 0.08 }, 23 | "angle": { value: 0.02 }, 24 | "seed": { value: 0.02 }, 25 | "seed_x": { value: 0.02 }, //-1,1 26 | "seed_y": { value: 0.02 }, //-1,1 27 | "distortion_x": { value: 0.5 }, 28 | "distortion_y": { value: 0.6 }, 29 | "col_s": { value: 0.05 } 30 | }, 31 | 32 | vertexShader: [ 33 | 34 | "varying vec2 vUv;", 35 | "void main() {", 36 | " vUv = uv;", 37 | " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 38 | "}" 39 | ].join( "\n" ), 40 | 41 | fragmentShader: [ 42 | "uniform int byp;", //should we apply the glitch ? 43 | 44 | "uniform sampler2D tDiffuse;", 45 | "uniform sampler2D tDisp;", 46 | 47 | "uniform float amount;", 48 | "uniform float angle;", 49 | "uniform float seed;", 50 | "uniform float seed_x;", 51 | "uniform float seed_y;", 52 | "uniform float distortion_x;", 53 | "uniform float distortion_y;", 54 | "uniform float col_s;", 55 | 56 | "varying vec2 vUv;", 57 | 58 | 59 | "float rand(vec2 co){", 60 | " return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);", 61 | "}", 62 | 63 | "void main() {", 64 | " if(byp<1) {", 65 | " vec2 p = vUv;", 66 | " float xs = floor(gl_FragCoord.x / 0.5);", 67 | " float ys = floor(gl_FragCoord.y / 0.5);", 68 | //based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch 69 | " vec4 normal = texture2D (tDisp, p*seed*seed);", 70 | " if(p.ydistortion_x-col_s*seed) {", 71 | " if(seed_x>0.){", 72 | " p.y = 1. - (p.y + distortion_y);", 73 | " }", 74 | " else {", 75 | " p.y = distortion_y;", 76 | " }", 77 | " }", 78 | " if(p.xdistortion_y-col_s*seed) {", 79 | " if(seed_y>0.){", 80 | " p.x=distortion_x;", 81 | " }", 82 | " else {", 83 | " p.x = 1. - (p.x + distortion_x);", 84 | " }", 85 | " }", 86 | " p.x+=normal.x*seed_x*(seed/5.);", 87 | " p.y+=normal.y*seed_y*(seed/5.);", 88 | //base from RGB shift shader 89 | " vec2 offset = amount * vec2( cos(angle), sin(angle));", 90 | " vec4 cr = texture2D(tDiffuse, p + offset);", 91 | " vec4 cga = texture2D(tDiffuse, p);", 92 | " vec4 cb = texture2D(tDiffuse, p - offset);", 93 | " gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);", 94 | //add noise 95 | " vec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);", 96 | " gl_FragColor = gl_FragColor+ snow;", 97 | " }", 98 | " else {", 99 | " gl_FragColor=texture2D (tDiffuse, vUv);", 100 | " }", 101 | "}" 102 | 103 | ].join( "\n" ) 104 | 105 | }; 106 | 107 | export { DigitalGlitch }; 108 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-slide-attributes.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | QUnit.test( 'Vertical separator', function( assert ) { 6 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' ); 7 | }); 8 | 9 | QUnit.test( 'Id on slide', function( assert ) { 10 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' ); 11 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' ); 12 | }); 13 | 14 | QUnit.test( 'data-background attributes', function( assert ) { 15 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 16 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 17 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 18 | }); 19 | 20 | QUnit.test( 'data-transition attributes', function( assert ) { 21 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 22 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 23 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 24 | }); 25 | 26 | QUnit.test( 'data-background attributes with default separator', function( assert ) { 27 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 28 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 29 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 30 | }); 31 | 32 | QUnit.test( 'data-transition attributes with default separator', function( assert ) { 33 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 34 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 35 | assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 36 | }); 37 | 38 | QUnit.test( 'data-transition attributes with inline content', function( assert ) { 39 | assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' ); 40 | }); 41 | 42 | } ); 43 | 44 | Reveal.initialize(); 45 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-slide-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-iframes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Iframes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 32 | 33 | 34 | 35 | 36 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /boids-1/lib/shaders/GlitchPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | import { 6 | DataTexture, 7 | FloatType, 8 | Math as _Math, 9 | RGBFormat, 10 | ShaderMaterial, 11 | UniformsUtils 12 | } from "three"; 13 | import { Pass } from "../postprocessing/Pass.js"; 14 | import { DigitalGlitch } from "../shaders/DigitalGlitch.js"; 15 | 16 | var GlitchPass = function ( dt_size ) { 17 | 18 | Pass.call( this ); 19 | 20 | if ( DigitalGlitch === undefined ) console.error( "GlitchPass relies on DigitalGlitch" ); 21 | 22 | var shader = DigitalGlitch; 23 | this.uniforms = UniformsUtils.clone( shader.uniforms ); 24 | 25 | if ( dt_size == undefined ) dt_size = 64; 26 | 27 | 28 | this.uniforms[ "tDisp" ].value = this.generateHeightmap( dt_size ); 29 | 30 | 31 | this.material = new ShaderMaterial( { 32 | uniforms: this.uniforms, 33 | vertexShader: shader.vertexShader, 34 | fragmentShader: shader.fragmentShader 35 | } ); 36 | 37 | this.fsQuad = new Pass.FullScreenQuad( this.material ); 38 | 39 | this.goWild = false; 40 | this.curF = 0; 41 | this.generateTrigger(); 42 | 43 | }; 44 | 45 | GlitchPass.prototype = Object.assign( Object.create( Pass.prototype ), { 46 | 47 | constructor: GlitchPass, 48 | 49 | render: function ( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) { 50 | 51 | this.uniforms[ "tDiffuse" ].value = readBuffer.texture; 52 | this.uniforms[ 'seed' ].value = Math.random();//default seeding 53 | this.uniforms[ 'byp' ].value = 0; 54 | 55 | if ( this.curF % this.randX == 0 || this.goWild == true ) { 56 | 57 | this.uniforms[ 'amount' ].value = Math.random() / 30; 58 | this.uniforms[ 'angle' ].value = _Math.randFloat( - Math.PI, Math.PI ); 59 | this.uniforms[ 'seed_x' ].value = _Math.randFloat( - 1, 1 ); 60 | this.uniforms[ 'seed_y' ].value = _Math.randFloat( - 1, 1 ); 61 | this.uniforms[ 'distortion_x' ].value = _Math.randFloat( 0, 1 ); 62 | this.uniforms[ 'distortion_y' ].value = _Math.randFloat( 0, 1 ); 63 | this.curF = 0; 64 | this.generateTrigger(); 65 | 66 | } else if ( this.curF % this.randX < this.randX / 5 ) { 67 | 68 | this.uniforms[ 'amount' ].value = Math.random() / 90; 69 | this.uniforms[ 'angle' ].value = _Math.randFloat( - Math.PI, Math.PI ); 70 | this.uniforms[ 'distortion_x' ].value = _Math.randFloat( 0, 1 ); 71 | this.uniforms[ 'distortion_y' ].value = _Math.randFloat( 0, 1 ); 72 | this.uniforms[ 'seed_x' ].value = _Math.randFloat( - 0.3, 0.3 ); 73 | this.uniforms[ 'seed_y' ].value = _Math.randFloat( - 0.3, 0.3 ); 74 | 75 | } else if ( this.goWild == false ) { 76 | 77 | this.uniforms[ 'byp' ].value = 1; 78 | 79 | } 80 | 81 | this.curF ++; 82 | 83 | if ( this.renderToScreen ) { 84 | 85 | renderer.setRenderTarget( null ); 86 | this.fsQuad.render( renderer ); 87 | 88 | } else { 89 | 90 | renderer.setRenderTarget( writeBuffer ); 91 | if ( this.clear ) renderer.clear(); 92 | this.fsQuad.render( renderer ); 93 | 94 | } 95 | 96 | }, 97 | 98 | generateTrigger: function () { 99 | 100 | this.randX = _Math.randInt( 120, 240 ); 101 | 102 | }, 103 | 104 | generateHeightmap: function ( dt_size ) { 105 | 106 | var data_arr = new Float32Array( dt_size * dt_size * 3 ); 107 | var length = dt_size * dt_size; 108 | 109 | for ( var i = 0; i < length; i ++ ) { 110 | 111 | var val = _Math.randFloat( 0, 1 ); 112 | data_arr[ i * 3 + 0 ] = val; 113 | data_arr[ i * 3 + 1 ] = val; 114 | data_arr[ i * 3 + 2 ] = val; 115 | 116 | } 117 | 118 | return new DataTexture( data_arr, dt_size, dt_size, RGBFormat, FloatType ); 119 | 120 | } 121 | 122 | } ); 123 | 124 | export { GlitchPass }; 125 | -------------------------------------------------------------------------------- /code-doodle-1/slides/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This stylesheet is used to print reveal.js 3 | * presentations to PDF. 4 | * 5 | * https://github.com/hakimel/reveal.js#pdf-export 6 | */ 7 | 8 | * { 9 | -webkit-print-color-adjust: exact; 10 | } 11 | 12 | body { 13 | margin: 0 auto !important; 14 | border: 0; 15 | padding: 0; 16 | float: none !important; 17 | overflow: visible; 18 | } 19 | 20 | html { 21 | width: 100%; 22 | height: 100%; 23 | overflow: visible; 24 | } 25 | 26 | /* Remove any elements not needed in print. */ 27 | .nestedarrow, 28 | .reveal .controls, 29 | .reveal .progress, 30 | .reveal .playback, 31 | .reveal.overview, 32 | .fork-reveal, 33 | .share-reveal, 34 | .state-background { 35 | display: none !important; 36 | } 37 | 38 | h1, h2, h3, h4, h5, h6 { 39 | text-shadow: 0 0 0 #000 !important; 40 | } 41 | 42 | .reveal pre code { 43 | overflow: hidden !important; 44 | font-family: Courier, 'Courier New', monospace !important; 45 | } 46 | 47 | ul, ol, div, p { 48 | visibility: visible; 49 | position: static; 50 | width: auto; 51 | height: auto; 52 | display: block; 53 | overflow: visible; 54 | margin: auto; 55 | } 56 | .reveal { 57 | width: auto !important; 58 | height: auto !important; 59 | overflow: hidden !important; 60 | } 61 | .reveal .slides { 62 | position: static; 63 | width: 100% !important; 64 | height: auto !important; 65 | zoom: 1 !important; 66 | 67 | left: auto; 68 | top: auto; 69 | margin: 0 !important; 70 | padding: 0 !important; 71 | 72 | overflow: visible; 73 | display: block; 74 | 75 | perspective: none; 76 | perspective-origin: 50% 50%; 77 | } 78 | 79 | .reveal .slides .pdf-page { 80 | position: relative; 81 | overflow: hidden; 82 | z-index: 1; 83 | 84 | page-break-after: always; 85 | } 86 | 87 | .reveal .slides section { 88 | visibility: visible !important; 89 | display: block !important; 90 | position: absolute !important; 91 | 92 | margin: 0 !important; 93 | padding: 0 !important; 94 | box-sizing: border-box !important; 95 | min-height: 1px; 96 | 97 | opacity: 1 !important; 98 | 99 | transform-style: flat !important; 100 | transform: none !important; 101 | } 102 | 103 | .reveal section.stack { 104 | position: relative !important; 105 | margin: 0 !important; 106 | padding: 0 !important; 107 | page-break-after: avoid !important; 108 | height: auto !important; 109 | min-height: auto !important; 110 | } 111 | 112 | .reveal img { 113 | box-shadow: none; 114 | } 115 | 116 | .reveal .roll { 117 | overflow: visible; 118 | line-height: 1em; 119 | } 120 | 121 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 122 | .reveal .slide-background { 123 | display: block !important; 124 | position: absolute; 125 | top: 0; 126 | left: 0; 127 | width: 100%; 128 | height: 100%; 129 | z-index: auto !important; 130 | } 131 | 132 | /* Display slide speaker notes when 'showNotes' is enabled */ 133 | .reveal.show-notes { 134 | max-width: none; 135 | max-height: none; 136 | } 137 | .reveal .speaker-notes-pdf { 138 | display: block; 139 | width: 100%; 140 | height: auto; 141 | max-height: none; 142 | top: auto; 143 | right: auto; 144 | bottom: auto; 145 | left: auto; 146 | z-index: 100; 147 | } 148 | 149 | /* Layout option which makes notes appear on a separate page */ 150 | .reveal .speaker-notes-pdf[data-layout="separate-page"] { 151 | position: relative; 152 | color: inherit; 153 | background-color: transparent; 154 | padding: 20px; 155 | page-break-after: always; 156 | border: 0; 157 | } 158 | 159 | /* Display slide numbers when 'slideNumber' is enabled */ 160 | .reveal .slide-number-pdf { 161 | display: block; 162 | position: absolute; 163 | font-size: 14px; 164 | } 165 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-markdown-element-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Element Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/test-state.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test State 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 37 | 38 | 39 | 40 | 41 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /code-doodle-1/slides/gruntfile.js: -------------------------------------------------------------------------------- 1 | const sass = require('node-sass'); 2 | 3 | module.exports = grunt => { 4 | 5 | require('load-grunt-tasks')(grunt); 6 | 7 | let port = grunt.option('port') || 8000; 8 | let root = grunt.option('root') || '.'; 9 | 10 | if (!Array.isArray(root)) root = [root]; 11 | 12 | // Project configuration 13 | grunt.initConfig({ 14 | pkg: grunt.file.readJSON('package.json'), 15 | meta: { 16 | banner: 17 | '/*!\n' + 18 | ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + 19 | ' * http://revealjs.com\n' + 20 | ' * MIT licensed\n' + 21 | ' *\n' + 22 | ' * Copyright (C) 2019 Hakim El Hattab, http://hakim.se\n' + 23 | ' */' 24 | }, 25 | 26 | uglify: { 27 | options: { 28 | banner: '<%= meta.banner %>\n', 29 | ie8: true 30 | }, 31 | build: { 32 | src: 'js/reveal.js', 33 | dest: 'js/reveal.min.js' 34 | } 35 | }, 36 | 37 | sass: { 38 | options: { 39 | implementation: sass, 40 | sourceMap: false 41 | }, 42 | core: { 43 | src: 'css/reveal.scss', 44 | dest: 'css/reveal.css' 45 | }, 46 | themes: { 47 | expand: true, 48 | cwd: 'css/theme/source', 49 | src: ['*.sass', '*.scss'], 50 | dest: 'css/theme', 51 | ext: '.css' 52 | } 53 | }, 54 | 55 | autoprefixer: { 56 | core: { 57 | src: 'css/reveal.css' 58 | } 59 | }, 60 | 61 | cssmin: { 62 | options: { 63 | compatibility: 'ie9' 64 | }, 65 | compress: { 66 | src: 'css/reveal.css', 67 | dest: 'css/reveal.min.css' 68 | } 69 | }, 70 | 71 | jshint: { 72 | options: { 73 | curly: false, 74 | eqeqeq: true, 75 | immed: true, 76 | esnext: true, 77 | latedef: 'nofunc', 78 | newcap: true, 79 | noarg: true, 80 | sub: true, 81 | undef: true, 82 | eqnull: true, 83 | browser: true, 84 | expr: true, 85 | loopfunc: true, 86 | globals: { 87 | head: false, 88 | module: false, 89 | console: false, 90 | unescape: false, 91 | define: false, 92 | exports: false, 93 | require: false 94 | } 95 | }, 96 | files: [ 'gruntfile.js', 'js/reveal.js' ], 97 | }, 98 | 99 | connect: { 100 | server: { 101 | options: { 102 | port: port, 103 | base: root, 104 | livereload: true, 105 | open: true, 106 | useAvailablePort: true 107 | } 108 | } 109 | }, 110 | 111 | zip: { 112 | bundle: { 113 | src: [ 114 | 'index.html', 115 | 'css/**', 116 | 'js/**', 117 | 'lib/**', 118 | 'images/**', 119 | 'plugin/**', 120 | '**.md' 121 | ], 122 | dest: 'reveal-js-presentation.zip' 123 | } 124 | }, 125 | 126 | watch: { 127 | js: { 128 | files: [ 'gruntfile.js', 'js/reveal.js' ].concat(root.map(path => path + '/js/my/**/*.js')), 129 | tasks: 'js' 130 | }, 131 | theme: { 132 | files: [ 133 | 'css/theme/source/*.sass', 134 | 'css/theme/source/*.scss', 135 | 'css/theme/template/*.sass', 136 | 'css/theme/template/*.scss' 137 | ], 138 | tasks: 'css-themes' 139 | }, 140 | css: { 141 | files: [ 'css/reveal.scss' ], 142 | tasks: 'css-core' 143 | }, 144 | html: { 145 | files: root.map(path => path + '/*.html') 146 | }, 147 | markdown: { 148 | files: root.map(path => path + '/*.md') 149 | }, 150 | options: { 151 | livereload: true 152 | } 153 | } 154 | 155 | }); 156 | 157 | // Default task 158 | grunt.registerTask( 'default', [ 'css', 'js' ] ); 159 | 160 | // JS task 161 | grunt.registerTask( 'js', [ 'jshint', 'uglify' ] ); 162 | 163 | // Theme CSS 164 | grunt.registerTask( 'css-themes', [ 'sass:themes' ] ); 165 | 166 | // Core framework CSS 167 | grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] ); 168 | 169 | // All CSS 170 | grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] ); 171 | 172 | // Package presentation to archive 173 | grunt.registerTask( 'package', [ 'default', 'zip' ] ); 174 | 175 | // Serve presentation locally 176 | grunt.registerTask( 'serve', [ 'connect', 'watch' ] ); 177 | 178 | }; 179 | -------------------------------------------------------------------------------- /code-doodle-1/slides/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /boids-1/lib/shaders/DepthLimitedBlurShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * TODO 3 | */ 4 | 5 | import { 6 | Vector2 7 | } from "three"; 8 | 9 | var DepthLimitedBlurShader = { 10 | defines: { 11 | "KERNEL_RADIUS": 4, 12 | "DEPTH_PACKING": 1, 13 | "PERSPECTIVE_CAMERA": 1 14 | }, 15 | uniforms: { 16 | "tDiffuse": { value: null }, 17 | "size": { value: new Vector2( 512, 512 ) }, 18 | "sampleUvOffsets": { value: [ new Vector2( 0, 0 ) ] }, 19 | "sampleWeights": { value: [ 1.0 ] }, 20 | "tDepth": { value: null }, 21 | "cameraNear": { value: 10 }, 22 | "cameraFar": { value: 1000 }, 23 | "depthCutoff": { value: 10 }, 24 | }, 25 | vertexShader: [ 26 | "#include ", 27 | 28 | "uniform vec2 size;", 29 | 30 | "varying vec2 vUv;", 31 | "varying vec2 vInvSize;", 32 | 33 | "void main() {", 34 | " vUv = uv;", 35 | " vInvSize = 1.0 / size;", 36 | 37 | " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 38 | "}" 39 | 40 | ].join( "\n" ), 41 | fragmentShader: [ 42 | "#include ", 43 | "#include ", 44 | 45 | "uniform sampler2D tDiffuse;", 46 | "uniform sampler2D tDepth;", 47 | 48 | "uniform float cameraNear;", 49 | "uniform float cameraFar;", 50 | "uniform float depthCutoff;", 51 | 52 | "uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];", 53 | "uniform float sampleWeights[ KERNEL_RADIUS + 1 ];", 54 | 55 | "varying vec2 vUv;", 56 | "varying vec2 vInvSize;", 57 | 58 | "float getDepth( const in vec2 screenPosition ) {", 59 | " #if DEPTH_PACKING == 1", 60 | " return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );", 61 | " #else", 62 | " return texture2D( tDepth, screenPosition ).x;", 63 | " #endif", 64 | "}", 65 | 66 | "float getViewZ( const in float depth ) {", 67 | " #if PERSPECTIVE_CAMERA == 1", 68 | " return perspectiveDepthToViewZ( depth, cameraNear, cameraFar );", 69 | " #else", 70 | " return orthographicDepthToViewZ( depth, cameraNear, cameraFar );", 71 | " #endif", 72 | "}", 73 | 74 | "void main() {", 75 | " float depth = getDepth( vUv );", 76 | " if( depth >= ( 1.0 - EPSILON ) ) {", 77 | " discard;", 78 | " }", 79 | 80 | " float centerViewZ = -getViewZ( depth );", 81 | " bool rBreak = false, lBreak = false;", 82 | 83 | " float weightSum = sampleWeights[0];", 84 | " vec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;", 85 | 86 | " for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {", 87 | 88 | " float sampleWeight = sampleWeights[i];", 89 | " vec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;", 90 | 91 | " vec2 sampleUv = vUv + sampleUvOffset;", 92 | " float viewZ = -getViewZ( getDepth( sampleUv ) );", 93 | 94 | " if( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;", 95 | 96 | " if( ! rBreak ) {", 97 | " diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;", 98 | " weightSum += sampleWeight;", 99 | " }", 100 | 101 | " sampleUv = vUv - sampleUvOffset;", 102 | " viewZ = -getViewZ( getDepth( sampleUv ) );", 103 | 104 | " if( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;", 105 | 106 | " if( ! lBreak ) {", 107 | " diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;", 108 | " weightSum += sampleWeight;", 109 | " }", 110 | 111 | " }", 112 | 113 | " gl_FragColor = diffuseSum / weightSum;", 114 | "}" 115 | ].join( "\n" ) 116 | }; 117 | 118 | var BlurShaderUtils = { 119 | 120 | createSampleWeights: function ( kernelRadius, stdDev ) { 121 | 122 | var gaussian = function ( x, stdDev ) { 123 | 124 | return Math.exp( - ( x * x ) / ( 2.0 * ( stdDev * stdDev ) ) ) / ( Math.sqrt( 2.0 * Math.PI ) * stdDev ); 125 | 126 | }; 127 | 128 | var weights = []; 129 | 130 | for ( var i = 0; i <= kernelRadius; i ++ ) { 131 | 132 | weights.push( gaussian( i, stdDev ) ); 133 | 134 | } 135 | 136 | return weights; 137 | 138 | }, 139 | 140 | createSampleOffsets: function ( kernelRadius, uvIncrement ) { 141 | 142 | var offsets = []; 143 | 144 | for ( var i = 0; i <= kernelRadius; i ++ ) { 145 | 146 | offsets.push( uvIncrement.clone().multiplyScalar( i ) ); 147 | 148 | } 149 | 150 | return offsets; 151 | 152 | }, 153 | 154 | configure: function ( material, kernelRadius, stdDev, uvIncrement ) { 155 | 156 | material.defines[ "KERNEL_RADIUS" ] = kernelRadius; 157 | material.uniforms[ "sampleUvOffsets" ].value = BlurShaderUtils.createSampleOffsets( kernelRadius, uvIncrement ); 158 | material.uniforms[ "sampleWeights" ].value = BlurShaderUtils.createSampleWeights( kernelRadius, stdDev ); 159 | material.needsUpdate = true; 160 | 161 | } 162 | 163 | }; 164 | 165 | export { DepthLimitedBlurShader, BlurShaderUtils }; 166 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/slide-backgrounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Backgrounds 8 | 9 | 10 | 11 | 12 | 13 | 23 | 24 | 25 | 26 | 27 |
28 | 29 |
30 | 31 |
32 |

data-background: #00ffff

33 |
34 | 35 |
36 |

data-background: #bb00bb

37 |
38 | 39 |
40 |

data-background: lightblue

41 |
42 | 43 |
44 |
45 |

data-background: #ff0000

46 |
47 |
48 |

data-background: rgba(0, 0, 0, 0.2)

49 |
50 |
51 |

data-background: salmon

52 |
53 |
54 | 55 |
56 |
57 |

Background applied to stack

58 |
59 |
60 |

Background applied to stack

61 |
62 |
63 |

Background applied to slide inside of stack

64 |
65 |
66 | 67 |
68 |

Background image

69 |
70 | 71 |
72 |
73 |

Background image

74 |
75 |
76 |

Background image

77 |
78 |
79 | 80 |
81 |

Background image

82 |
data-background-size="100px" data-background-repeat="repeat" data-background-color="#111"
83 |
84 | 85 |
86 |

Same background twice (1/2)

87 |
88 |
89 |

Same background twice (2/2)

90 |
91 | 92 |
93 |

Video background

94 |
95 | 96 |
97 |

Iframe background

98 |
99 | 100 |
101 |
102 |

Same background twice vertical (1/2)

103 |
104 |
105 |

Same background twice vertical (2/2)

106 |
107 |
108 | 109 |
110 |

Same background from horizontal to vertical (1/3)

111 |
112 |
113 |
114 |

Same background from horizontal to vertical (2/3)

115 |
116 |
117 |

Same background from horizontal to vertical (3/3)

118 |
119 |
120 | 121 |
122 | 123 |
124 | 125 | 126 | 127 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/markdown/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 36 |
37 | 38 | 39 |
40 | 54 |
55 | 56 | 57 |
58 | 69 |
70 | 71 | 72 |
73 | 77 |
78 | 79 | 80 |
81 | 86 |
87 | 88 | 89 |
90 | 100 |
101 | 102 | 103 |
104 | 107 |
108 | 109 |
110 |
111 | 112 | 113 | 114 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /docs/doodle.e64970db.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["code-doodle-1/doodle/index.js"],"names":["canvas","document","getElementById","height","window","innerHeight","width","innerWidth","ctx","getContext","animate","stop","start","spacing","numOfLines","startOffset","quarter","lineWidth","isInViewport","elem","bounding","getBoundingClientRect","bottom","documentElement","clientHeight","top","line","diff","n","hue","Math","random","p","y","yDiv","firstYShift","sin","PI","secondYShift","thirdYShift","firstXShift","secondXShift","thirdXShift","strokeStyle","beginPath","moveTo","lineTo","stroke","counter","hue1","hue2","requestAnimationFrame","step","clearRect","addEventListener"],"mappings":";AAAA,IAAIA,EAASC,SAASC,eAAe,UACrCF,EAAOG,OAASC,OAAOC,YACvBL,EAAOM,MAAQF,OAAOG,WACtB,IAAIC,EAAMR,EAAOS,WAAW,MAExBC,EAAU,KAEd,SAASC,IACPD,GAAU,EAGZ,SAASE,IACPF,GAAU,EAENG,IAAAA,EAAU,GACVC,EAAad,EAAOG,OAASU,EAE7BE,EAAcF,EAAU,EACxBG,GAAWhB,EAAOM,MAAQO,GAAW,EAEzCL,EAAIS,UAAY,GAEZC,IAAAA,EAAe,SAAsBC,GACnCC,IAAAA,EAAWD,EAAKE,wBAEbD,OAAAA,EAASE,QAAU,GAAKF,EAASE,SAAWlB,OAAOC,aAAeJ,SAASsB,gBAAgBC,eAAiBJ,EAASK,KAAO,GAAKL,EAASK,MAAQrB,OAAOC,aAAeJ,SAASsB,gBAAgBC,eAGjME,SAAAA,EAAKC,EAAMC,EAAGC,GAEbC,KAAKC,SAER,IAFDC,IAEKC,EAAI,EAAGA,EAAInB,EAAYmB,IAAK,CAG/BC,IAAAA,EAAOD,EAAInB,EAKXqB,EAAcL,KAAKM,IAAIF,EAAOJ,KAAKO,GAAK,IAA+B,GAAzBP,KAAKM,IAAIT,EAAOC,EAAI,IAClEU,EAAeR,KAAKM,IAAIF,EAAOJ,KAAKO,GAAK,IAA+B,GAAzBP,KAAKM,IAAIT,EAAOC,EAAI,IACnEW,EAAcT,KAAKM,IAAIF,EAAOJ,KAAKO,GAAK,IAA+B,GAAzBP,KAAKM,IAAIT,EAAOC,EAAI,IAClEY,EAAcV,KAAKM,IAAIF,EAAOJ,KAAKO,GAAK,IAA+B,GAAzBP,KAAKM,IAAIT,EAAOC,EAAI,IAClEa,EAAeX,KAAKM,IAAIF,EAAOJ,KAAKO,GAAK,IAAgC,GAA1BP,KAAKM,IAAIT,EAAOC,EAAI,KACnEc,EAAcZ,KAAKM,IAAIF,EAAOJ,KAAKO,KAAiC,IAA1BP,KAAKM,IAAIT,EAAOC,EAAI,KAElEpB,EAAImC,YAAc,QAAUd,EAAM,oBAClCrB,EAAIoC,YACJpC,EAAIqC,OAAO9B,EAAakB,EAAIpB,EAAUE,GACtCP,EAAIsC,OAAO/B,EAAcC,EAAUwB,EAAaP,EAAIpB,EAAUE,EAAcoB,GAC5E3B,EAAIsC,OAAO/B,EAAwB,EAAVC,EAAcyB,EAAcR,EAAIpB,EAAUE,EAAcuB,GACjF9B,EAAIsC,OAAO/B,EAAwB,EAAVC,EAAc0B,EAAaT,EAAIpB,EAAUE,EAAcwB,GAChF/B,EAAIsC,OAAO9C,EAAOM,MAAQS,EAAakB,EAAIpB,EAAUE,GACrDP,EAAIuC,UAIJC,IAAAA,EAAU,EACVC,EAAO,EACPC,EAAO,EAmBX9C,OAAO+C,sBAjBEC,SAAAA,IACF1C,GACAQ,EAAalB,KAClBQ,EAAI6C,UAAU,EAAG,EAAGrD,EAAOM,MAAON,EAAOG,QAIzCuB,IAFAsB,EAEc,KAAOC,GAErBvB,EAAe,EAAVsB,EAAa,KAAQE,GAE1BD,GAAQ,EACRC,GAAQ,GAER9C,OAAO+C,sBAAsBC,MAMjChD,OAAOkD,iBAAiB,SAAU,WAChCtD,EAAOM,MAAQF,OAAOG,WACtBP,EAAOG,OAASC,OAAOC,YACvBM,IACAC,MAGFA","file":"doodle.e64970db.js","sourceRoot":"..","sourcesContent":["var canvas = document.getElementById('canvas');\ncanvas.height = window.innerHeight;\ncanvas.width = window.innerWidth;\nvar ctx = canvas.getContext('2d');\n\nvar animate = null;\n\nfunction stop() {\n animate = false;\n}\n\nfunction start() {\n animate = true;\n\n var spacing = 20;\n var numOfLines = canvas.height / spacing;\n\n var startOffset = spacing / 2;\n var quarter = (canvas.width - spacing) / 4;\n\n ctx.lineWidth = 10;\n\n var isInViewport = function isInViewport(elem) {\n var bounding = elem.getBoundingClientRect();\n // If the bottom is in view but the top isn't then it's visible\n return bounding.bottom >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) || bounding.top >= 0 && bounding.top <= (window.innerHeight || document.documentElement.clientHeight);\n };\n\n function line(diff, n, hue) {\n\n var p = Math.random() * 100\n\n for (let y = 0; y < numOfLines; y++) {\n\n // yDiv will be a value between 0 and 1 (from first row to last)\n var yDiv = y / numOfLines;\n\n // Math.sin((Math.PI / 180) * degrees) => 0,0 90,1 180,0 270,-1, 360,0\n // so we get a value which fluctuates between 1 and -1\n\n var firstYShift = Math.sin(yDiv * Math.PI * 6) * (Math.sin(diff * n * 2) * 31);\n var secondYShift = Math.sin(yDiv * Math.PI * 5) * (Math.sin(diff * n * 4) * 37);\n var thirdYShift = Math.sin(yDiv * Math.PI * 4) * (Math.sin(diff * n * 6) * 43);\n var firstXShift = Math.sin(yDiv * Math.PI * 3) * (Math.sin(diff * n * 8) * 77);\n var secondXShift = Math.sin(yDiv * Math.PI * 2) * (Math.sin(diff * n * 10) * 91);\n var thirdXShift = Math.sin(yDiv * Math.PI) * (Math.sin(diff * n * 12) * 101);\n\n ctx.strokeStyle = 'hsla(' + hue + ', 100%, 50%, 0.4)';\n ctx.beginPath();\n ctx.moveTo(startOffset, y * spacing + startOffset);\n ctx.lineTo(startOffset + quarter + firstXShift, y * spacing + startOffset + firstYShift);\n ctx.lineTo(startOffset + quarter * 2 + secondXShift, y * spacing + startOffset + secondYShift);\n ctx.lineTo(startOffset + quarter * 3 + thirdXShift, y * spacing + startOffset + thirdYShift);\n ctx.lineTo(canvas.width - startOffset, y * spacing + startOffset);\n ctx.stroke();\n }\n }\n\n var counter = 0;\n var hue1 = 0;\n var hue2 = 0;\n\n function step() {\n if (!animate) return;\n if (!isInViewport(canvas)) return;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n counter++;\n\n line(counter, 0.001, hue1);\n\n line(counter * 2, 0.0001, hue2);\n\n hue1 += 1;\n hue2 += 0.1;\n\n window.requestAnimationFrame(step);\n }\n\n window.requestAnimationFrame(step);\n};\n\nwindow.addEventListener('resize', function () {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n stop();\n start();\n});\n\nstart();"]} -------------------------------------------------------------------------------- /docs/funwithcode.6e2ac991.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.js","node_modules/parcel-bundler/src/builtins/bundle-url.js","node_modules/parcel-bundler/src/builtins/bundle-loader.js","node_modules/parcel-bundler/src/builtins/loaders/browser/html-loader.js"],"names":["bundleURL","getBundleURLCached","getBundleURL","Error","err","matches","stack","match","getBaseURL","url","replace","exports","require","loadBundlesLazy","bundles","Array","isArray","id","length","Promise","resolve","code","LazyPromise","reject","loadBundles","slice","then","all","map","loadBundle","bundleLoaders","registerBundleLoader","type","loader","module","load","register","bundle","substring","lastIndexOf","toLowerCase","bundleLoader","resolved","catch","e","executor","promise","prototype","onSuccess","onError","fetch","res","text"],"mappings":";AAAA,aAAA,IAAA,EAAA,EAAA,QAAA,sCAAA,SAAA,EAAA,GAAA,OAAA,GAAA,EAAA,WAAA,EAAA,CAAA,QAAA;;ACAA,IAAIA,EAAY,KAChB,SAASC,IAKAD,OAJFA,IACHA,EAAYE,KAGPF,EAGT,SAASE,IAEH,IACI,MAAA,IAAIC,MACV,MAAOC,GACHC,IAAAA,GAAW,GAAKD,EAAIE,OAAOC,MAAM,iEACjCF,GAAAA,EACKG,OAAAA,EAAWH,EAAQ,IAIvB,MAAA,IAGT,SAASG,EAAWC,GACX,OAAC,GAAKA,GAAKC,QAAQ,wEAAwE,MAAQ,IAG5GC,QAAQT,aAAeD,EACvBU,QAAQH,WAAaA;;AC5BrB,IAAIN,EAAeU,QAAQ,gBAAgBV,aAE3C,SAASW,EAAgBC,GAClBC,MAAMC,QAAQF,KACjBA,EAAU,CAACA,IAGTG,IAAAA,EAAKH,EAAQA,EAAQI,OAAS,GAE9B,IACKC,OAAAA,QAAQC,QAAQR,QAAQK,IAC/B,MAAOb,GACHA,GAAa,qBAAbA,EAAIiB,KACC,OAAA,IAAIC,EAAY,SAAUF,EAASG,GACxCC,EAAYV,EAAQW,MAAM,GAAI,IAC3BC,KAAK,WACGd,OAAAA,QAAQK,KAEhBS,KAAKN,EAASG,KAIfnB,MAAAA,GAIV,SAASoB,EAAYV,GACZK,OAAAA,QAAQQ,IAAIb,EAAQc,IAAIC,IAGjC,IAAIC,EAAgB,GACpB,SAASC,EAAqBC,EAAMC,GAClCH,EAAcE,GAAQC,EAGxBC,OAAOvB,QAAUA,QAAUE,EAC3BF,QAAQwB,KAAOX,EACfb,QAAQyB,SAAWL,EAEnB,IAAIjB,EAAU,GACd,SAASe,EAAWQ,GACdpB,IAAAA,EAMAH,GALAC,MAAMC,QAAQqB,KAChBpB,EAAKoB,EAAO,GACZA,EAASA,EAAO,IAGdvB,EAAQuB,GACHvB,OAAAA,EAAQuB,GAGbL,IAAAA,GAAQK,EAAOC,UAAUD,EAAOE,YAAY,KAAO,EAAGF,EAAOnB,SAAWmB,GAAQG,cAChFC,EAAeX,EAAcE,GAC7BS,OAAAA,EACK3B,EAAQuB,GAAUI,EAAavC,IAAiBmC,GACpDX,KAAK,SAAUgB,GAKPA,OAJHA,GACFR,OAAOG,OAAOD,SAASnB,EAAIyB,GAGtBA,IACNC,MAAM,SAASC,GAGVA,aAFC9B,EAAQuB,GAETO,SAXRH,EAgBN,SAASnB,EAAYuB,GACdA,KAAAA,SAAWA,EACXC,KAAAA,QAAU,KAGjBxB,EAAYyB,UAAUrB,KAAO,SAAUsB,EAAWC,GAEzC,OADc,OAAjB,KAAKH,UAAkB,KAAKA,QAAU,IAAI3B,QAAQ,KAAK0B,WACpD,KAAKC,QAAQpB,KAAKsB,EAAWC,IAGtC3B,EAAYyB,UAAUJ,MAAQ,SAAUM,GAE/B,OADc,OAAjB,KAAKH,UAAkB,KAAKA,QAAU,IAAI3B,QAAQ,KAAK0B,WACpD,KAAKC,QAAQH,MAAMM;;ACjF5Bf,OAAOvB,QAAU,SAAwB0B,GAChCa,OAAAA,MAAMb,GAAQX,KAAK,SAAUyB,GAC3BA,OAAAA,EAAIC","file":"funwithcode.6e2ac991.js","sourceRoot":"..","sourcesContent":["import html1 from \"./code-doodle-1/doodle/index.html\";","var bundleURL = null;\nfunction getBundleURLCached() {\n if (!bundleURL) {\n bundleURL = getBundleURL();\n }\n\n return bundleURL;\n}\n\nfunction getBundleURL() {\n // Attempt to find the URL of the current script and use that as the base URL\n try {\n throw new Error;\n } catch (err) {\n var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\\/\\/[^)\\n]+/g);\n if (matches) {\n return getBaseURL(matches[0]);\n }\n }\n\n return '/';\n}\n\nfunction getBaseURL(url) {\n return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\\/\\/.+)\\/[^/]+$/, '$1') + '/';\n}\n\nexports.getBundleURL = getBundleURLCached;\nexports.getBaseURL = getBaseURL;\n","var getBundleURL = require('./bundle-url').getBundleURL;\n\nfunction loadBundlesLazy(bundles) {\n if (!Array.isArray(bundles)) {\n bundles = [bundles]\n }\n\n var id = bundles[bundles.length - 1];\n\n try {\n return Promise.resolve(require(id));\n } catch (err) {\n if (err.code === 'MODULE_NOT_FOUND') {\n return new LazyPromise(function (resolve, reject) {\n loadBundles(bundles.slice(0, -1))\n .then(function () {\n return require(id);\n })\n .then(resolve, reject);\n });\n }\n\n throw err;\n }\n}\n\nfunction loadBundles(bundles) {\n return Promise.all(bundles.map(loadBundle));\n}\n\nvar bundleLoaders = {};\nfunction registerBundleLoader(type, loader) {\n bundleLoaders[type] = loader;\n}\n\nmodule.exports = exports = loadBundlesLazy;\nexports.load = loadBundles;\nexports.register = registerBundleLoader;\n\nvar bundles = {};\nfunction loadBundle(bundle) {\n var id;\n if (Array.isArray(bundle)) {\n id = bundle[1];\n bundle = bundle[0];\n }\n\n if (bundles[bundle]) {\n return bundles[bundle];\n }\n\n var type = (bundle.substring(bundle.lastIndexOf('.') + 1, bundle.length) || bundle).toLowerCase();\n var bundleLoader = bundleLoaders[type];\n if (bundleLoader) {\n return bundles[bundle] = bundleLoader(getBundleURL() + bundle)\n .then(function (resolved) {\n if (resolved) {\n module.bundle.register(id, resolved);\n }\n\n return resolved;\n }).catch(function(e) {\n delete bundles[bundle];\n \n throw e;\n });\n }\n}\n\nfunction LazyPromise(executor) {\n this.executor = executor;\n this.promise = null;\n}\n\nLazyPromise.prototype.then = function (onSuccess, onError) {\n if (this.promise === null) this.promise = new Promise(this.executor)\n return this.promise.then(onSuccess, onError)\n};\n\nLazyPromise.prototype.catch = function (onError) {\n if (this.promise === null) this.promise = new Promise(this.executor)\n return this.promise.catch(onError)\n};\n","module.exports = function loadHTMLBundle(bundle) {\n return fetch(bundle).then(function (res) {\n return res.text();\n });\n};\n"]} -------------------------------------------------------------------------------- /boids-1/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 1 unit = 1 cm 3 | */ 4 | 5 | var THREE = require('three') 6 | import { OrbitControls } from './lib/controls/OrbitControls'; 7 | import { RenderPass } from './lib/postprocessing/RenderPass'; 8 | import { ShaderPass } from './lib/postprocessing/ShaderPass'; 9 | import { EffectComposer } from './lib/postprocessing/EffectComposer'; 10 | import { DepthLimitedBlurShader } from './lib/shaders/DepthLimitedBlurShader'; 11 | import { GlitchPass } from './lib/shaders/GlitchPass'; 12 | import BoidManager from './src/boidManager'; 13 | import { utils } from './src/util' 14 | 15 | var scene, camera, renderer, controls, light, lure, boidManager, clock; 16 | var composer 17 | var obstacles = [] 18 | 19 | function init() { 20 | scene = new THREE.Scene(); 21 | camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 10000); 22 | camera.position.z = 500; 23 | 24 | renderer = new THREE.WebGLRenderer({ 25 | antialias: true 26 | }); 27 | 28 | renderer.setSize(window.innerWidth, window.innerHeight); 29 | document.body.appendChild(renderer.domElement); 30 | 31 | // CONTROLS 32 | controls = new OrbitControls(camera, renderer.domElement); 33 | controls.enableDamping = true; // an animation loop is required when either damping or auto-rotation are enabled 34 | controls.dampingFactor = 0.05; 35 | controls.screenSpacePanning = false; 36 | controls.minDistance = 100; 37 | controls.maxDistance = 1000; 38 | controls.maxPolarAngle = Math.PI / 2; 39 | 40 | // WORLD OBSTACLES 41 | var hasObstacles = true 42 | if (hasObstacles) { 43 | utils.addObstacle(obstacles, scene, 50, 50, 50, 0xFFFFFF, 200, 200, 200) 44 | utils.addObstacle(obstacles, scene, 50, 100, 50, 0xFFFFFF, 100, 100, -200) 45 | utils.addObstacle(obstacles, scene, 100, 50, 50, 0xFFFFFF, -200, 150, 200) 46 | utils.addObstacle(obstacles, scene, 50, 50, 50, 0xFFFFFF, -150, 150, -200) 47 | utils.addObstacle(obstacles, scene, 50, 100, 100, 0xA399EE, -20, 300, -20) 48 | utils.addObstacle(obstacles, scene, 50, 50, 50, 0x555555, 150, -200, 200) 49 | utils.addObstacle(obstacles, scene, 50, 100, 100, 0x555555, 80, -100, -180) 50 | utils.addObstacle(obstacles, scene, 100, 50, 100, 0x555555, -220, -150, 180) 51 | utils.addObstacle(obstacles, scene, 100, 50, 50, 0x555555, -150, -150, -150) 52 | utils.addObstacle(obstacles, scene, 100, 50, 100, 0x555555, 20, -300, -20) 53 | } 54 | 55 | // LIGHTS 56 | 57 | //ambient light 58 | scene.add(new THREE.AmbientLight(0xffffff, 0.5)); 59 | 60 | light = new THREE.PointLight(0xffffff, 0.5, 500); 61 | light.position.set(0, 100, 0); 62 | scene.add(light); 63 | 64 | // TARGET 65 | 66 | lure = null 67 | // lure = new THREE.PointLight(0xffffff, 3, 500); 68 | // lure.position.set(0, 50, 0); 69 | // scene.add(lure); 70 | // var lightHelper = new THREE.PointLightHelper(lure); 71 | // scene.add(lightHelper); 72 | 73 | // BOIDS 74 | const numberOfBoids = 300 75 | boidManager = new BoidManager(scene, numberOfBoids, obstacles, lure) 76 | boidManager.boids.forEach(boid => { 77 | scene.add(boid.mesh) 78 | }) 79 | 80 | // CLOCK 81 | clock = new THREE.Clock(); 82 | 83 | var axesHelper = new THREE.AxesHelper(50); 84 | scene.add(axesHelper); 85 | 86 | // COMPOSER + PASSES 87 | composer = new EffectComposer(renderer) 88 | 89 | var renderPass = new RenderPass(scene, camera) 90 | composer.addPass(renderPass) 91 | renderPass.renderToScreen = true; 92 | 93 | // var pass1 = new GlitchPass(64) 94 | // // pass1.goWild = true 95 | // composer.addPass(pass1) 96 | // pass1.renderToScreen = true 97 | } 98 | 99 | // loop vars 100 | var counter = 0; 101 | var paused = false 102 | var slowPanEnabled = false 103 | 104 | function update(delta) { 105 | counter += 0.001; 106 | 107 | boidManager.update(delta) 108 | 109 | if (slowPanEnabled) { 110 | camera.lookAt(light.position); 111 | camera.position.x = Math.sin(counter) * 500; 112 | camera.position.z = Math.cos(counter) * 500; 113 | } 114 | 115 | if (lure) { 116 | lure.position.x = Math.sin(counter * 5) * 400; 117 | lure.position.y = Math.cos(counter * 10) * 400; 118 | lure.position.z = Math.cos(counter * 15) * 400; 119 | } 120 | } 121 | 122 | function render() { 123 | var delta = clock.getDelta(); 124 | if (!paused) { 125 | update(delta) 126 | } 127 | 128 | // renderer.render(scene, camera); 129 | composer.render() 130 | } 131 | 132 | var animate = function () { 133 | requestAnimationFrame(animate); 134 | 135 | // only required if controls.enableDamping = true, or if controls.autoRotate = true 136 | controls.update(); 137 | 138 | render() 139 | }; 140 | 141 | window.addEventListener('resize', function () { 142 | const width = window.innerWidth; 143 | const height = window.innerHeight; 144 | renderer.setPixelRatio(window.devicePixelRatio); 145 | renderer.setSize(width, height); 146 | camera.aspect = width / height; 147 | camera.updateProjectionMatrix(); 148 | }); 149 | 150 | document.addEventListener("keydown", onDocumentKeyDown, false); 151 | function onDocumentKeyDown(event) { 152 | var keyCode = event.which; 153 | if (keyCode == 32) { 154 | paused = !paused; 155 | 156 | // disable slow-pan so when animation is resumed, the viewer has the controls. 157 | if (slowPanEnabled) { 158 | slowPanEnabled = false 159 | } 160 | } 161 | }; 162 | 163 | 164 | init() 165 | 166 | animate(); -------------------------------------------------------------------------------- /code-doodle-1/slides/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .nestedarrow, 36 | .controls, 37 | .fork-reveal, 38 | .share-reveal, 39 | .state-background, 40 | .reveal .progress, 41 | .reveal .backgrounds, 42 | .reveal .slide-number { 43 | display: none !important; 44 | } 45 | 46 | /* SECTION 3: Set body font face, size, and color. 47 | Consider using a serif font for readability. */ 48 | body, p, td, li, div { 49 | font-size: 20pt!important; 50 | font-family: Georgia, "Times New Roman", Times, serif !important; 51 | color: #000; 52 | } 53 | 54 | /* SECTION 4: Set heading font face, sizes, and color. 55 | Differentiate your headings from your body text. 56 | Perhaps use a large sans-serif for distinction. */ 57 | h1,h2,h3,h4,h5,h6 { 58 | color: #000!important; 59 | height: auto; 60 | line-height: normal; 61 | font-family: Georgia, "Times New Roman", Times, serif !important; 62 | text-shadow: 0 0 0 #000 !important; 63 | text-align: left; 64 | letter-spacing: normal; 65 | } 66 | /* Need to reduce the size of the fonts for printing */ 67 | h1 { font-size: 28pt !important; } 68 | h2 { font-size: 24pt !important; } 69 | h3 { font-size: 22pt !important; } 70 | h4 { font-size: 22pt !important; font-variant: small-caps; } 71 | h5 { font-size: 21pt !important; } 72 | h6 { font-size: 20pt !important; font-style: italic; } 73 | 74 | /* SECTION 5: Make hyperlinks more usable. 75 | Ensure links are underlined, and consider appending 76 | the URL to the end of the link for usability. */ 77 | a:link, 78 | a:visited { 79 | color: #000 !important; 80 | font-weight: bold; 81 | text-decoration: underline; 82 | } 83 | /* 84 | .reveal a:link:after, 85 | .reveal a:visited:after { 86 | content: " (" attr(href) ") "; 87 | color: #222 !important; 88 | font-size: 90%; 89 | } 90 | */ 91 | 92 | 93 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 94 | ul, ol, div, p { 95 | visibility: visible; 96 | position: static; 97 | width: auto; 98 | height: auto; 99 | display: block; 100 | overflow: visible; 101 | margin: 0; 102 | text-align: left !important; 103 | } 104 | .reveal pre, 105 | .reveal table { 106 | margin-left: 0; 107 | margin-right: 0; 108 | } 109 | .reveal pre code { 110 | padding: 20px; 111 | border: 1px solid #ddd; 112 | } 113 | .reveal blockquote { 114 | margin: 20px 0; 115 | } 116 | .reveal .slides { 117 | position: static !important; 118 | width: auto !important; 119 | height: auto !important; 120 | 121 | left: 0 !important; 122 | top: 0 !important; 123 | margin-left: 0 !important; 124 | margin-top: 0 !important; 125 | padding: 0 !important; 126 | zoom: 1 !important; 127 | 128 | overflow: visible !important; 129 | display: block !important; 130 | 131 | text-align: left !important; 132 | -webkit-perspective: none; 133 | -moz-perspective: none; 134 | -ms-perspective: none; 135 | perspective: none; 136 | 137 | -webkit-perspective-origin: 50% 50%; 138 | -moz-perspective-origin: 50% 50%; 139 | -ms-perspective-origin: 50% 50%; 140 | perspective-origin: 50% 50%; 141 | } 142 | .reveal .slides section { 143 | visibility: visible !important; 144 | position: static !important; 145 | width: auto !important; 146 | height: auto !important; 147 | display: block !important; 148 | overflow: visible !important; 149 | 150 | left: 0 !important; 151 | top: 0 !important; 152 | margin-left: 0 !important; 153 | margin-top: 0 !important; 154 | padding: 60px 20px !important; 155 | z-index: auto !important; 156 | 157 | opacity: 1 !important; 158 | 159 | page-break-after: always !important; 160 | 161 | -webkit-transform-style: flat !important; 162 | -moz-transform-style: flat !important; 163 | -ms-transform-style: flat !important; 164 | transform-style: flat !important; 165 | 166 | -webkit-transform: none !important; 167 | -moz-transform: none !important; 168 | -ms-transform: none !important; 169 | transform: none !important; 170 | 171 | -webkit-transition: none !important; 172 | -moz-transition: none !important; 173 | -ms-transition: none !important; 174 | transition: none !important; 175 | } 176 | .reveal .slides section.stack { 177 | padding: 0 !important; 178 | } 179 | .reveal section:last-of-type { 180 | page-break-after: avoid !important; 181 | } 182 | .reveal section .fragment { 183 | opacity: 1 !important; 184 | visibility: visible !important; 185 | 186 | -webkit-transform: none !important; 187 | -moz-transform: none !important; 188 | -ms-transform: none !important; 189 | transform: none !important; 190 | } 191 | .reveal section img { 192 | display: block; 193 | margin: 15px 0px; 194 | background: rgba(255,255,255,1); 195 | border: 1px solid #666; 196 | box-shadow: none; 197 | } 198 | 199 | .reveal section small { 200 | font-size: 0.8em; 201 | } 202 | 203 | } 204 | -------------------------------------------------------------------------------- /code-doodle-1/slides/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | * 5 | * Handshake process: 6 | * 1. This window posts 'connect' to notes window 7 | * - Includes URL of presentation to show 8 | * 2. Notes window responds with 'connected' when it is available 9 | * 3. This window proceeds to send the current presentation state 10 | * to the notes window 11 | */ 12 | var RevealNotes = (function() { 13 | 14 | var notesPopup = null; 15 | 16 | function openNotes( notesFilePath ) { 17 | 18 | if (notesPopup && !notesPopup.closed) { 19 | notesPopup.focus(); 20 | return; 21 | } 22 | 23 | if( !notesFilePath ) { 24 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 25 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 26 | notesFilePath = jsFileLocation + 'notes.html'; 27 | } 28 | 29 | notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' ); 30 | 31 | if( !notesPopup ) { 32 | alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' ); 33 | return; 34 | } 35 | 36 | /** 37 | * Connect to the notes window through a postmessage handshake. 38 | * Using postmessage enables us to work in situations where the 39 | * origins differ, such as a presentation being opened from the 40 | * file system. 41 | */ 42 | function connect() { 43 | // Keep trying to connect until we get a 'connected' message back 44 | var connectInterval = setInterval( function() { 45 | notesPopup.postMessage( JSON.stringify( { 46 | namespace: 'reveal-notes', 47 | type: 'connect', 48 | url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, 49 | state: Reveal.getState() 50 | } ), '*' ); 51 | }, 500 ); 52 | 53 | window.addEventListener( 'message', function( event ) { 54 | var data = JSON.parse( event.data ); 55 | if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) { 56 | clearInterval( connectInterval ); 57 | onConnected(); 58 | } 59 | if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) { 60 | callRevealApi( data.methodName, data.arguments, data.callId ); 61 | } 62 | } ); 63 | } 64 | 65 | /** 66 | * Calls the specified Reveal.js method with the provided argument 67 | * and then pushes the result to the notes frame. 68 | */ 69 | function callRevealApi( methodName, methodArguments, callId ) { 70 | 71 | var result = Reveal[methodName].apply( Reveal, methodArguments ); 72 | notesPopup.postMessage( JSON.stringify( { 73 | namespace: 'reveal-notes', 74 | type: 'return', 75 | result: result, 76 | callId: callId 77 | } ), '*' ); 78 | 79 | } 80 | 81 | /** 82 | * Posts the current slide data to the notes window 83 | */ 84 | function post( event ) { 85 | 86 | var slideElement = Reveal.getCurrentSlide(), 87 | notesElement = slideElement.querySelector( 'aside.notes' ), 88 | fragmentElement = slideElement.querySelector( '.current-fragment' ); 89 | 90 | var messageData = { 91 | namespace: 'reveal-notes', 92 | type: 'state', 93 | notes: '', 94 | markdown: false, 95 | whitespace: 'normal', 96 | state: Reveal.getState() 97 | }; 98 | 99 | // Look for notes defined in a slide attribute 100 | if( slideElement.hasAttribute( 'data-notes' ) ) { 101 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 102 | messageData.whitespace = 'pre-wrap'; 103 | } 104 | 105 | // Look for notes defined in a fragment 106 | if( fragmentElement ) { 107 | var fragmentNotes = fragmentElement.querySelector( 'aside.notes' ); 108 | if( fragmentNotes ) { 109 | notesElement = fragmentNotes; 110 | } 111 | else if( fragmentElement.hasAttribute( 'data-notes' ) ) { 112 | messageData.notes = fragmentElement.getAttribute( 'data-notes' ); 113 | messageData.whitespace = 'pre-wrap'; 114 | 115 | // In case there are slide notes 116 | notesElement = null; 117 | } 118 | } 119 | 120 | // Look for notes defined in an aside element 121 | if( notesElement ) { 122 | messageData.notes = notesElement.innerHTML; 123 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 124 | } 125 | 126 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 127 | 128 | } 129 | 130 | /** 131 | * Called once we have established a connection to the notes 132 | * window. 133 | */ 134 | function onConnected() { 135 | 136 | // Monitor events that trigger a change in state 137 | Reveal.addEventListener( 'slidechanged', post ); 138 | Reveal.addEventListener( 'fragmentshown', post ); 139 | Reveal.addEventListener( 'fragmenthidden', post ); 140 | Reveal.addEventListener( 'overviewhidden', post ); 141 | Reveal.addEventListener( 'overviewshown', post ); 142 | Reveal.addEventListener( 'paused', post ); 143 | Reveal.addEventListener( 'resumed', post ); 144 | 145 | // Post the initial state 146 | post(); 147 | 148 | } 149 | 150 | connect(); 151 | 152 | } 153 | 154 | return { 155 | init: function() { 156 | 157 | if( !/receiver/i.test( window.location.search ) ) { 158 | 159 | // If the there's a 'notes' query set, open directly 160 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 161 | openNotes(); 162 | } 163 | 164 | // Open the notes when the 's' key is hit 165 | Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() { 166 | openNotes(); 167 | } ); 168 | 169 | } 170 | 171 | }, 172 | 173 | open: openNotes 174 | }; 175 | 176 | })(); 177 | 178 | Reveal.registerPlugin( 'notes', RevealNotes ); 179 | -------------------------------------------------------------------------------- /code-doodle-1/slides/test/examples/math.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Math Plugin 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

reveal.js Math Plugin

23 |

A thin wrapper for MathJax

24 |
25 | 26 |
27 |

The Lorenz Equations

28 | 29 | \[\begin{aligned} 30 | \dot{x} & = \sigma(y-x) \\ 31 | \dot{y} & = \rho x - y - xz \\ 32 | \dot{z} & = -\beta z + xy 33 | \end{aligned} \] 34 |
35 | 36 |
37 |

The Cauchy-Schwarz Inequality

38 | 39 | 42 |
43 | 44 |
45 |

A Cross Product Formula

46 | 47 | \[\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} 48 | \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 49 | \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ 50 | \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 51 | \end{vmatrix} \] 52 |
53 | 54 |
55 |

The probability of getting \(k\) heads when flipping \(n\) coins is

56 | 57 | \[P(E) = {n \choose k} p^k (1-p)^{ n-k} \] 58 |
59 | 60 |
61 |

An Identity of Ramanujan

62 | 63 | \[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 64 | 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} 65 | {1+\frac{e^{-8\pi}} {1+\ldots} } } } \] 66 |
67 | 68 |
69 |

A Rogers-Ramanujan Identity

70 | 71 | \[ 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = 72 | \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}\] 73 |
74 | 75 |
76 |

Maxwell’s Equations

77 | 78 | \[ \begin{aligned} 79 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 80 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 81 | \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 82 | \] 83 |
84 | 85 |
86 |

TeX Macros

87 | 88 | Here is a common vector space: 89 | \[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\] 90 | used in functional analysis. 91 |
92 | 93 |
94 |
95 |

The Lorenz Equations

96 | 97 |
98 | \[\begin{aligned} 99 | \dot{x} & = \sigma(y-x) \\ 100 | \dot{y} & = \rho x - y - xz \\ 101 | \dot{z} & = -\beta z + xy 102 | \end{aligned} \] 103 |
104 |
105 | 106 |
107 |

The Cauchy-Schwarz Inequality

108 | 109 |
110 | \[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] 111 |
112 |
113 | 114 |
115 |

A Cross Product Formula

116 | 117 |
118 | \[\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} 119 | \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 120 | \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ 121 | \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 122 | \end{vmatrix} \] 123 |
124 |
125 | 126 |
127 |

The probability of getting \(k\) heads when flipping \(n\) coins is

128 | 129 |
130 | \[P(E) = {n \choose k} p^k (1-p)^{ n-k} \] 131 |
132 |
133 | 134 |
135 |

An Identity of Ramanujan

136 | 137 |
138 | \[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 139 | 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} 140 | {1+\frac{e^{-8\pi}} {1+\ldots} } } } \] 141 |
142 |
143 | 144 |
145 |

A Rogers-Ramanujan Identity

146 | 147 |
148 | \[ 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = 149 | \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}\] 150 |
151 |
152 | 153 |
154 |

Maxwell’s Equations

155 | 156 |
157 | \[ \begin{aligned} 158 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 159 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 160 | \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 161 | \] 162 |
163 |
164 | 165 |
166 |

TeX Macros

167 | 168 | Here is a common vector space: 169 | \[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\] 170 | used in functional analysis. 171 |
172 |
173 | 174 |
175 | 176 |
177 | 178 | 179 | 180 | 203 | 204 | 205 | 206 | --------------------------------------------------------------------------------