├── .babelrc ├── .gitignore ├── LICENSE ├── README.md ├── build.js ├── devServer.js ├── docs ├── first-version.jpg ├── snapwat-snapshot1.png ├── snapwat-snapshot2.png └── snapwat-snapshots.png ├── package.json ├── public ├── CNAME ├── build │ └── bundle.js ├── css │ └── styles.css ├── images │ ├── apple-touch-icon-precomposed.png │ ├── emoji │ │ ├── LICENCE │ │ ├── archive │ │ │ ├── 1f32a.svg │ │ │ ├── 1f32b.svg │ │ │ ├── 1f32f.svg │ │ │ ├── 1f332.svg │ │ │ ├── 1f333.svg │ │ │ ├── 1f334.svg │ │ │ ├── 1f336.svg │ │ │ ├── 1f337.svg │ │ │ ├── 1f339.svg │ │ │ ├── 1f33c.svg │ │ │ ├── 1f345.svg │ │ │ ├── 1f346.svg │ │ │ ├── 1f347.svg │ │ │ ├── 1f349.svg │ │ │ ├── 1f34a.svg │ │ │ ├── 1f34b.svg │ │ │ ├── 1f34d.svg │ │ │ ├── 1f34e.svg │ │ │ ├── 1f350.svg │ │ │ ├── 1f352.svg │ │ │ ├── 1f35e.svg │ │ │ ├── 1f363.svg │ │ │ ├── 1f364.svg │ │ │ ├── 1f366.svg │ │ │ ├── 1f367.svg │ │ │ ├── 1f368.svg │ │ │ ├── 1f36b.svg │ │ │ ├── 1f36d.svg │ │ │ ├── 1f36f.svg │ │ │ ├── 1f373.svg │ │ │ ├── 1f37f.svg │ │ │ ├── 1f380.svg │ │ │ ├── 1f385.svg │ │ │ ├── 1f386.svg │ │ │ ├── 1f392.svg │ │ │ ├── 1f393.svg │ │ │ ├── 1f396.svg │ │ │ ├── 1f399.svg │ │ │ ├── 1f3a3.svg │ │ │ ├── 1f3a7.svg │ │ │ ├── 1f3a8.svg │ │ │ ├── 1f3ac.svg │ │ │ ├── 1f3ad.svg │ │ │ ├── 1f3ae.svg │ │ │ ├── 1f3b3.svg │ │ │ ├── 1f3b5.svg │ │ │ ├── 1f3bd.svg │ │ │ ├── 1f3be.svg │ │ │ ├── 1f3c0.svg │ │ │ ├── 1f3c8.svg │ │ │ ├── 1f3d3.svg │ │ │ ├── 1f3f9.svg │ │ │ ├── 1f400.svg │ │ │ ├── 1f401.svg │ │ │ ├── 1f402.svg │ │ │ ├── 1f403.svg │ │ │ ├── 1f404.svg │ │ │ ├── 1f405.svg │ │ │ ├── 1f406.svg │ │ │ ├── 1f407.svg │ │ │ ├── 1f408.svg │ │ │ ├── 1f409.svg │ │ │ ├── 1f40a.svg │ │ │ ├── 1f40b.svg │ │ │ ├── 1f40c.svg │ │ │ ├── 1f40d.svg │ │ │ ├── 1f40e.svg │ │ │ ├── 1f40f.svg │ │ │ ├── 1f410.svg │ │ │ ├── 1f411.svg │ │ │ ├── 1f412.svg │ │ │ ├── 1f413.svg │ │ │ ├── 1f414.svg │ │ │ ├── 1f415.svg │ │ │ ├── 1f416.svg │ │ │ ├── 1f417.svg │ │ │ ├── 1f418.svg │ │ │ ├── 1f419.svg │ │ │ ├── 1f41b.svg │ │ │ ├── 1f41c.svg │ │ │ ├── 1f41d.svg │ │ │ ├── 1f41e.svg │ │ │ ├── 1f41f.svg │ │ │ ├── 1f421.svg │ │ │ ├── 1f422.svg │ │ │ ├── 1f423.svg │ │ │ ├── 1f424.svg │ │ │ ├── 1f425.svg │ │ │ ├── 1f427.svg │ │ │ ├── 1f428.svg │ │ │ ├── 1f429.svg │ │ │ ├── 1f42b.svg │ │ │ ├── 1f431.svg │ │ │ ├── 1f432.svg │ │ │ ├── 1f433.svg │ │ │ ├── 1f438.svg │ │ │ ├── 1f439.svg │ │ │ ├── 1f43f.svg │ │ │ ├── 1f442.svg │ │ │ ├── 1f453.svg │ │ │ ├── 1f459.svg │ │ │ ├── 1f45a.svg │ │ │ ├── 1f462.svg │ │ │ ├── 1f466.svg │ │ │ ├── 1f467.svg │ │ │ ├── 1f468.svg │ │ │ ├── 1f469.svg │ │ │ ├── 1f470.svg │ │ │ ├── 1f471.svg │ │ │ ├── 1f472.svg │ │ │ ├── 1f473.svg │ │ │ ├── 1f474.svg │ │ │ ├── 1f475.svg │ │ │ ├── 1f476.svg │ │ │ ├── 1f477.svg │ │ │ ├── 1f478.svg │ │ │ ├── 1f479.svg │ │ │ ├── 1f480.svg │ │ │ ├── 1f482.svg │ │ │ ├── 1f489.svg │ │ │ ├── 1f48d.svg │ │ │ ├── 1f48e.svg │ │ │ ├── 1f493.svg │ │ │ ├── 1f494.svg │ │ │ ├── 1f498.svg │ │ │ ├── 1f49a.svg │ │ │ ├── 1f49b.svg │ │ │ ├── 1f49c.svg │ │ │ ├── 1f4a7.svg │ │ │ ├── 1f4a8.svg │ │ │ ├── 1f4ad.svg │ │ │ ├── 1f4b5.svg │ │ │ ├── 1f4cb.svg │ │ │ ├── 1f4cc.svg │ │ │ ├── 1f4ce.svg │ │ │ ├── 1f4cf.svg │ │ │ ├── 1f4db.svg │ │ │ ├── 1f4de.svg │ │ │ ├── 1f4e2.svg │ │ │ ├── 1f4e3.svg │ │ │ ├── 1f4ef.svg │ │ │ ├── 1f4f1.svg │ │ │ ├── 1f4f7.svg │ │ │ ├── 1f4fa.svg │ │ │ ├── 1f506.svg │ │ │ ├── 1f50e.svg │ │ │ ├── 1f512.svg │ │ │ ├── 1f514.svg │ │ │ ├── 1f526.svg │ │ │ ├── 1f528.svg │ │ │ ├── 1f576.svg │ │ │ ├── 1f578.svg │ │ │ ├── 1f579.svg │ │ │ ├── 1f58a.svg │ │ │ ├── 1f58b.svg │ │ │ ├── 1f58c.svg │ │ │ ├── 1f58d.svg │ │ │ ├── 1f590.svg │ │ │ ├── 1f596.svg │ │ │ ├── 1f5ef.svg │ │ │ ├── 1f600.svg │ │ │ ├── 1f601.svg │ │ │ ├── 1f603.svg │ │ │ ├── 1f604.svg │ │ │ ├── 1f606.svg │ │ │ ├── 1f610.svg │ │ │ ├── 1f611.svg │ │ │ ├── 1f612.svg │ │ │ ├── 1f613.svg │ │ │ ├── 1f614.svg │ │ │ ├── 1f615.svg │ │ │ ├── 1f616.svg │ │ │ ├── 1f617.svg │ │ │ ├── 1f619.svg │ │ │ ├── 1f620.svg │ │ │ ├── 1f622.svg │ │ │ ├── 1f623.svg │ │ │ ├── 1f624.svg │ │ │ ├── 1f625.svg │ │ │ ├── 1f626.svg │ │ │ ├── 1f627.svg │ │ │ ├── 1f629.svg │ │ │ ├── 1f630.svg │ │ │ ├── 1f633.svg │ │ │ ├── 1f634.svg │ │ │ ├── 1f636.svg │ │ │ ├── 1f63d.svg │ │ │ ├── 1f643.svg │ │ │ ├── 1f648.svg │ │ │ ├── 1f649.svg │ │ │ ├── 1f64a.svg │ │ │ ├── 1f682.svg │ │ │ ├── 1f6a8.svg │ │ │ ├── 1f910.svg │ │ │ ├── 1f914.svg │ │ │ ├── 1f917.svg │ │ │ ├── 1f919.svg │ │ │ ├── 1f91a.svg │ │ │ ├── 1f91b.svg │ │ │ ├── 1f91c.svg │ │ │ ├── 1f923.svg │ │ │ ├── 1f925.svg │ │ │ ├── 1f926.svg │ │ │ ├── 1f934.svg │ │ │ ├── 1f936.svg │ │ │ ├── 1f947.svg │ │ │ ├── 1f948.svg │ │ │ ├── 1f949.svg │ │ │ ├── 1f950.svg │ │ │ ├── 1f951.svg │ │ │ ├── 1f953.svg │ │ │ ├── 1f954.svg │ │ │ ├── 1f955.svg │ │ │ ├── 1f956.svg │ │ │ ├── 1f957.svg │ │ │ ├── 1f958.svg │ │ │ ├── 1f959.svg │ │ │ ├── 1f960.svg │ │ │ ├── 1f980.svg │ │ │ ├── 1f982.svg │ │ │ ├── 1f983.svg │ │ │ ├── 1f985.svg │ │ │ ├── 1f986.svg │ │ │ ├── 1f987.svg │ │ │ ├── 1f988.svg │ │ │ ├── 1f989.svg │ │ │ ├── 1f98c.svg │ │ │ ├── 1f98e.svg │ │ │ ├── 1f98f.svg │ │ │ ├── 1f990.svg │ │ │ ├── 1f991.svg │ │ │ ├── 2049.svg │ │ │ ├── 23f0.svg │ │ │ ├── 23f1.svg │ │ │ ├── 23f3.svg │ │ │ ├── 2601.svg │ │ │ ├── 2603.svg │ │ │ ├── 2604.svg │ │ │ ├── 260e.svg │ │ │ ├── 2614.svg │ │ │ ├── 2639.svg │ │ │ ├── 2692.svg │ │ │ ├── 2693.svg │ │ │ ├── 2694.svg │ │ │ ├── 2696.svg │ │ │ ├── 26a1.svg │ │ │ ├── 26bd.svg │ │ │ ├── 26c5.svg │ │ │ ├── 26d1.svg │ │ │ ├── 26d4.svg │ │ │ ├── 2702.svg │ │ │ ├── 2708.svg │ │ │ ├── 270d.svg │ │ │ ├── 270f.svg │ │ │ ├── 274c.svg │ │ │ ├── 2753.svg │ │ │ └── 2757.svg │ │ ├── f1.svg │ │ ├── f10.svg │ │ ├── f11.svg │ │ ├── f12.svg │ │ ├── f13.svg │ │ ├── f14.svg │ │ ├── f15.svg │ │ ├── f16.svg │ │ ├── f17.svg │ │ ├── f18.svg │ │ ├── f19.svg │ │ ├── f2.svg │ │ ├── f20.svg │ │ ├── f21.svg │ │ ├── f22.svg │ │ ├── f23.svg │ │ ├── f24.svg │ │ ├── f25.svg │ │ ├── f26.svg │ │ ├── f27.svg │ │ ├── f28.svg │ │ ├── f29.svg │ │ ├── f3.svg │ │ ├── f30.svg │ │ ├── f31.svg │ │ ├── f32.svg │ │ ├── f33.svg │ │ ├── f34.svg │ │ ├── f35.svg │ │ ├── f36.svg │ │ ├── f37.svg │ │ ├── f38.svg │ │ ├── f39.svg │ │ ├── f4.svg │ │ ├── f40.svg │ │ ├── f41svg │ │ ├── f5.svg │ │ ├── f6.svg │ │ ├── f7.svg │ │ ├── f8.svg │ │ ├── f9.svg │ │ ├── g1.svg │ │ ├── g10.svg │ │ ├── g11.svg │ │ ├── g12.svg │ │ ├── g13.svg │ │ ├── g14.svg │ │ ├── g2.svg │ │ ├── g3.svg │ │ ├── g4.svg │ │ ├── g5.svg │ │ ├── g6.svg │ │ ├── g7.svg │ │ ├── g8.svg │ │ ├── g9.svg │ │ ├── h1.svg │ │ ├── h10.svg │ │ ├── h11.svg │ │ ├── h12.svg │ │ ├── h13.svg │ │ ├── h14.svg │ │ ├── h15.svg │ │ ├── h16.svg │ │ ├── h17.svg │ │ ├── h18.svg │ │ ├── h19.svg │ │ ├── h2.svg │ │ ├── h20.svg │ │ ├── h21.svg │ │ ├── h22.svg │ │ ├── h23.svg │ │ ├── h24.svg │ │ ├── h3.svg │ │ ├── h4.svg │ │ ├── h5.svg │ │ ├── h6.svg │ │ ├── h7.svg │ │ ├── h8.svg │ │ ├── h9.svg │ │ ├── i0.svg │ │ ├── i1.svg │ │ ├── i10.svg │ │ ├── i11.svg │ │ ├── i12.svg │ │ ├── i13.svg │ │ ├── i14.svg │ │ ├── i2.svg │ │ ├── i3.svg │ │ ├── i4.svg │ │ ├── i5.svg │ │ ├── i6.svg │ │ ├── i7.svg │ │ ├── i8.svg │ │ ├── k1.svg │ │ ├── k10.svg │ │ ├── k11.svg │ │ ├── k12.svg │ │ ├── k13_diego.svg │ │ ├── k14.svg │ │ ├── k15.svg │ │ ├── k16.svg │ │ ├── k17.svg │ │ ├── k18.svg │ │ ├── k19.svg │ │ ├── k2.svg │ │ ├── k20.svg │ │ ├── k3.svg │ │ ├── k3b.svg │ │ ├── k4.svg │ │ ├── k5.svg │ │ ├── k6.svg │ │ ├── k7.svg │ │ ├── k8.svg │ │ ├── k9.svg │ │ ├── l1.svg │ │ ├── l2.svg │ │ ├── l3.svg │ │ ├── l4.svg │ │ ├── n1.svg │ │ ├── n10.svg │ │ ├── n11.svg │ │ ├── n12.svg │ │ ├── n2.svg │ │ ├── n3.svg │ │ ├── n4.svg │ │ ├── n5.svg │ │ ├── n6.svg │ │ ├── n7.svg │ │ ├── n8.svg │ │ ├── n9.svg │ │ ├── o1.svg │ │ ├── o2.svg │ │ ├── o3.svg │ │ ├── o4.svg │ │ ├── o5.svg │ │ ├── o6.svg │ │ ├── o7.svg │ │ ├── o8.svg │ │ ├── p1.svg │ │ ├── p2.svg │ │ ├── q1.svg │ │ ├── q2.svg │ │ ├── q3.svg │ │ ├── q4.svg │ │ ├── q5.svg │ │ ├── q6.svg │ │ ├── q7.svg │ │ ├── s1.svg │ │ ├── s2.svg │ │ ├── s3.svg │ │ ├── s4.svg │ │ ├── s5.svg │ │ ├── s6.svg │ │ ├── u1.svg │ │ ├── u2.svg │ │ ├── u3.svg │ │ ├── u4.svg │ │ ├── u5.svg │ │ ├── u6.svg │ │ ├── u7.svg │ │ ├── v1.svg │ │ ├── v2.svg │ │ ├── w1.svg │ │ ├── w2.svg │ │ ├── w3.svg │ │ ├── w4.svg │ │ ├── w5.svg │ │ ├── w6.svg │ │ └── w7.svg │ ├── favicon.png │ ├── homescreen │ │ ├── 192.png │ │ └── 512.png │ ├── iconic │ │ ├── LICENCE │ │ ├── action-redo.svg │ │ ├── action-undo.svg │ │ ├── arrow-left.svg │ │ ├── arrow-right.svg │ │ ├── brush.svg │ │ ├── camera-slr.svg │ │ ├── cog.svg │ │ ├── data-transfer-download.svg │ │ ├── grid-two-up.svg │ │ ├── home.svg │ │ ├── pencil.svg │ │ ├── trash.svg │ │ └── wrench.svg │ ├── snapwat-icon-purple.svg │ ├── snapwat-icon-white.svg │ └── twitter-logo.svg ├── index.html ├── manifest.json ├── redirect.html ├── sounds │ └── camera.wav ├── sw.js └── vendor │ ├── hello.min.js │ └── hello.polyfill.js └── src ├── index.js ├── pages ├── about.js ├── annotate │ ├── draw.js │ ├── index.js │ └── liveCamera.js ├── home.js ├── index.js ├── share.js └── snapshot.js ├── shared ├── audio.js ├── bufferLoader.js ├── config.js ├── constants.js ├── helpers.js ├── inputColourShim.js └── webrtcShim.js └── swRegister.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | presets: "es2015-rollup" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Samsung Internet Dev Rel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const babel = require('rollup-plugin-babel'); 4 | const rollup = require('rollup'); 5 | const commonjs = require('rollup-plugin-commonjs'); 6 | const nodeResolve = require('rollup-plugin-node-resolve'); 7 | const glob = require('glob-all'); 8 | 9 | function generateFileList(options) { 10 | return { 11 | resolveId(id) { 12 | if (id === options.id) { 13 | return id; 14 | } 15 | }, 16 | load(id) { 17 | if (id === options.id) { 18 | // Pass in relative filepaths to glob, then convert to appropriate URLs 19 | const files = glob.sync(options.patterns) 20 | .map(file => file.replace('public/', '/')); 21 | return `export default ${JSON.stringify(files)};`; 22 | } 23 | } 24 | } 25 | } 26 | 27 | rollup.rollup({ 28 | entry: 'src/index.js', 29 | plugins: [ 30 | nodeResolve({ jsnext: true, main: true }), 31 | commonjs({ 32 | include: 'node_modules/**' 33 | }), 34 | babel({ 35 | exclude: 'node_modules/**' 36 | }), 37 | generateFileList({ 38 | id: '\0emoji-images', 39 | patterns: [ 40 | 'public/images/emoji/*.svg' 41 | ] 42 | }) 43 | ] 44 | }).then(bundle => { 45 | bundle.write({ 46 | format: 'umd', 47 | dest: 'public/build/bundle.js' 48 | }) 49 | }).catch(err => { 50 | console.error(err); 51 | }); 52 | -------------------------------------------------------------------------------- /devServer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Server just used to serve our static front-end for local development. 3 | */ 4 | 5 | 'use strict'; 6 | 7 | const express = require('express'); 8 | const PORT = process.env.PORT || 8000; 9 | 10 | let app = express(); 11 | 12 | app.use('/', express.static('public') ); 13 | 14 | app.get('/', (req, res) => { 15 | res.sendFile(__dirname + '/public/index.html'); 16 | }); 17 | 18 | app.use((req, res) => { 19 | res.status(404).send('Page not found'); 20 | }); 21 | 22 | app.listen(PORT); 23 | 24 | console.log('Dev server started', PORT); 25 | -------------------------------------------------------------------------------- /docs/first-version.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/docs/first-version.jpg -------------------------------------------------------------------------------- /docs/snapwat-snapshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/docs/snapwat-snapshot1.png -------------------------------------------------------------------------------- /docs/snapwat-snapshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/docs/snapwat-snapshot2.png -------------------------------------------------------------------------------- /docs/snapwat-snapshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/docs/snapwat-snapshots.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "snapwat", 3 | "version": "1.0.0", 4 | "description": "A image/video doodling app for the web. A progressive web app demo.", 5 | "scripts": { 6 | "start": "node devServer", 7 | "watch": "watch 'npm run build' ./src", 8 | "build": "node build && echo 'Build complete'", 9 | "test": "echo \"Error: no test specified\" && exit 1", 10 | "deploy": "git subtree push --prefix public origin gh-pages" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/samsunginternet/snapwat.git" 15 | }, 16 | "author": "Peter O'Shaughnessy, Samsung Internet", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/samsunginternet/snapwat/issues" 20 | }, 21 | "homepage": "https://github.com/samsunginternet/snapwat#readme", 22 | "devDependencies": { 23 | "babel-preset-es2015": "6.9.0", 24 | "babel-preset-es2015-rollup": "^1.1.1", 25 | "express": "^4.14.0", 26 | "glob-all": "^3.1.0", 27 | "rollup": "^0.34.7", 28 | "rollup-plugin-babel": "^2.6.1", 29 | "rollup-plugin-commonjs": "^3.3.1", 30 | "rollup-plugin-node-resolve": "^2.0.0", 31 | "rollup-plugin-replace": "^1.1.1", 32 | "watch": "^0.19.1" 33 | }, 34 | "dependencies": { 35 | "blueimp-load-image": "^2.13.1", 36 | "hellojs": "^1.13.4" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/CNAME: -------------------------------------------------------------------------------- 1 | snapw.at -------------------------------------------------------------------------------- /public/images/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/public/images/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /public/images/emoji/LICENCE: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution 4.0 (CC-BY 4.0) 2 | 3 | All emojis by Emoji One (see: http://emojione.com/licensing/) except for: 4 | 5 | * k13_diego - by Diego González 6 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f32b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f332.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f336.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f337.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f339.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f33c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f345.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f346.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f347.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f349.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f34b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f34e.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f350.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f352.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f36f.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f373.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f380.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f393.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f396.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3a7.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3a8.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3ae.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3b5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3bd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3c8.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f3d3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f410.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f417.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f41f.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f427.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f438.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f453.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f45a.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f462.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f466.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f467.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f468.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f469.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f471.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f472.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f473.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f474.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f475.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f476.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f477.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f480.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f489.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f48d.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f48e.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f494.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f498.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f49a.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f49b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f49c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4a7.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4ad.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4b5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4cb.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4cc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4ce.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4e2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4f7.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f4fa.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f506.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f50e.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f512.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f526.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f528.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f576.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f579.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f58a.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f58b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f58c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f58d.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f590.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f596.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f5ef.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f600.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f601.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f603.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f606.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f610.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f611.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f612.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f613.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f614.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f615.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f616.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f617.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f619.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f620.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f622.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f623.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f625.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f626.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f627.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f629.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f630.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f633.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f634.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f636.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f643.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f649.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f6a8.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f910.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f925.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f926.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f947.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/1f948.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2049.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/23f0.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/23f1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2601.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2604.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2614.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2639.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2692.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2693.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2696.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/26a1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/26d1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/26d4.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2702.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2708.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/270f.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/274c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2753.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/archive/2757.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/f15.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/f16.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/f17.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/f24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/f41svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/emoji/h21.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /public/images/emoji/h23.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/h24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /public/images/emoji/i1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/images/emoji/i13.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/i14.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /public/images/emoji/i2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /public/images/emoji/w1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /public/images/emoji/w2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/images/emoji/w3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/images/emoji/w5.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/emoji/w6.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/public/images/favicon.png -------------------------------------------------------------------------------- /public/images/homescreen/192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/public/images/homescreen/192.png -------------------------------------------------------------------------------- /public/images/homescreen/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/public/images/homescreen/512.png -------------------------------------------------------------------------------- /public/images/iconic/LICENCE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /public/images/iconic/action-redo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/action-undo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/arrow-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/images/iconic/brush.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/iconic/camera-slr.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/iconic/cog.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/iconic/data-transfer-download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/images/iconic/grid-two-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/pencil.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/trash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/iconic/wrench.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /public/images/snapwat-icon-purple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/images/snapwat-icon-white.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Snapwat", 3 | "short_name": "Snapwat", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#987fff", 7 | "theme_color": "#987fff", 8 | "description": "A doodling app for the web. A Progressive Web App demo.", 9 | "icons": [ 10 | { 11 | "src": "images/homescreen/192.png", 12 | "sizes": "192x192", 13 | "type": "image/png" 14 | }, 15 | { 16 | "src": "images/homescreen/512.png", 17 | "sizes": "512x512", 18 | "type": "image/png" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /public/redirect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | snapwat 7 | 8 | 9 | 21 | 22 | 23 | 24 |
25 |

snapwat

26 |
27 | 28 |
29 |

Redirecting you back... If this takes more than a couple of seconds, please close this tab.

30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /public/sounds/camera.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamsungInternet/snapwat/85ebd8e3ad00c3151049eab86dd6dd4fdc0f51a3/public/sounds/camera.wav -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import SWRegister from './swRegister'; 2 | import InputColourShim from './shared/inputColourShim'; 3 | import WebRTCShim from './shared/webrtcShim'; 4 | import Audio from './shared/audio'; 5 | 6 | import Pages from './pages'; 7 | import HomePage from './pages/home'; 8 | 9 | function initApp() { 10 | SWRegister(); 11 | InputColourShim(); 12 | WebRTCShim(); 13 | Audio(); 14 | } 15 | 16 | function initPages(pages) { 17 | for (let page of pages) { 18 | page.init(); 19 | } 20 | } 21 | 22 | initApp(); 23 | initPages(Pages); 24 | HomePage.show(); 25 | -------------------------------------------------------------------------------- /src/pages/about.js: -------------------------------------------------------------------------------- 1 | import {PAGES} from '../shared/constants'; 2 | import {showPage} from '../shared/helpers'; 3 | import HomePage from './home'; 4 | 5 | const PAGE_NAME = PAGES.ABOUT; 6 | 7 | let homeLink = document.getElementById('link-home'); 8 | 9 | function initControls() { 10 | homeLink.addEventListener('click', function() { 11 | HomePage.show(); 12 | }); 13 | } 14 | 15 | export default { 16 | 17 | init: function() { 18 | initControls(); 19 | }, 20 | 21 | show: function() { 22 | showPage(PAGE_NAME); 23 | } 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /src/pages/annotate/index.js: -------------------------------------------------------------------------------- 1 | import LiveCamera from './liveCamera'; 2 | import Draw from './draw'; 3 | import SnapshotPage from '../snapshot'; 4 | import {PAGES} from '../../shared/constants'; 5 | import {isLiveCamera} from '../../shared/config'; 6 | import {showPage} from '../../shared/helpers'; 7 | 8 | const PAGE_NAME = PAGES.ANNOTATE; 9 | 10 | let snapshotBtn = document.getElementById('btn-snapshot'); 11 | 12 | function initControls() { 13 | 14 | snapshotBtn.addEventListener('click', () => { 15 | Draw.snapshot(); 16 | SnapshotPage.show(); 17 | }); 18 | 19 | } 20 | 21 | export default { 22 | 23 | init: function() { 24 | Draw.init(); 25 | initControls(); 26 | }, 27 | 28 | show: function() { 29 | 30 | showPage(PAGE_NAME); 31 | 32 | if (isLiveCamera()) { 33 | LiveCamera(); 34 | } 35 | 36 | Draw.show(); 37 | 38 | } 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /src/pages/index.js: -------------------------------------------------------------------------------- 1 | import HomePage from './home'; 2 | import AnnotatePage from './annotate'; 3 | import AboutPage from './about'; 4 | import SharePage from './share'; 5 | import SnapshotPage from './snapshot'; 6 | 7 | const Pages = [HomePage, AnnotatePage, AboutPage, SharePage, SnapshotPage]; 8 | 9 | export default Pages; 10 | -------------------------------------------------------------------------------- /src/shared/audio.js: -------------------------------------------------------------------------------- 1 | import BufferLoader from './bufferLoader'; 2 | 3 | let context; 4 | let bufferLoader; 5 | let bufferList = null; 6 | 7 | export function playCameraSound() { 8 | 9 | if (!bufferList || bufferList.length < 1) { 10 | // Not ready to play yet 11 | return false; 12 | } 13 | 14 | try { 15 | 16 | let source = context.createBufferSource(); 17 | source.buffer = bufferList[0]; 18 | source.connect(context.destination); 19 | source.start(0); 20 | 21 | } catch(ex) { 22 | console.warn('Unable to play camera sound', ex); 23 | return false; 24 | } 25 | 26 | return true; 27 | 28 | } 29 | 30 | export default function init() { 31 | window.AudioContext = window.AudioContext || window.webkitAudioContext; 32 | try { 33 | context = new AudioContext(); 34 | bufferLoader = new BufferLoader(context, ['/sounds/camera.wav'], (list) => { 35 | bufferList = list;}); 36 | bufferLoader.load(); 37 | } catch(ex) { 38 | console.warn('Unable to initialise audio bufferLoader', ex); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/shared/bufferLoader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * By Boris Smus. 3 | * From: http://www.html5rocks.com/en/tutorials/webaudio/intro/ 4 | */ 5 | function BufferLoader(context, urlList, callback) { 6 | this.context = context; 7 | this.urlList = urlList; 8 | this.onload = callback; 9 | this.bufferList = new Array(); 10 | this.loadCount = 0; 11 | } 12 | 13 | BufferLoader.prototype.loadBuffer = function(url, index) { 14 | // Load buffer asynchronously 15 | var request = new XMLHttpRequest(); 16 | request.open('GET', url, true); 17 | request.responseType = 'arraybuffer'; 18 | 19 | var loader = this; 20 | 21 | request.onload = function() { 22 | // Asynchronously decode the audio file data in request.response 23 | loader.context.decodeAudioData( 24 | request.response, 25 | function(buffer) { 26 | if (!buffer) { 27 | alert('error decoding file data: ' + url); 28 | return; 29 | } 30 | loader.bufferList[index] = buffer; 31 | if (++loader.loadCount == loader.urlList.length) 32 | loader.onload(loader.bufferList); 33 | }, 34 | function(error) { 35 | console.error('decodeAudioData error', error); 36 | } 37 | ); 38 | } 39 | 40 | request.onerror = function() { 41 | alert('BufferLoader: XHR error'); 42 | } 43 | 44 | request.send(); 45 | } 46 | 47 | BufferLoader.prototype.load = function() { 48 | for (var i = 0; i < this.urlList.length; ++i) 49 | this.loadBuffer(this.urlList[i], i); 50 | } 51 | 52 | export default BufferLoader; 53 | -------------------------------------------------------------------------------- /src/shared/config.js: -------------------------------------------------------------------------------- 1 | let liveCamera = false; 2 | 3 | export function isLiveCamera() { 4 | return liveCamera; 5 | } 6 | 7 | export function setLiveCamera(isLiveCamera) { 8 | liveCamera = isLiveCamera; 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const HEADER_HEIGHT = 72; 2 | 3 | export const PAGES = { 4 | HOME: 'home', 5 | ANNOTATE: 'annotate', 6 | SNAPSHOT: 'snapshot', 7 | SHARE: 'share', 8 | ABOUT: 'about' 9 | }; 10 | -------------------------------------------------------------------------------- /src/shared/helpers.js: -------------------------------------------------------------------------------- 1 | const DEFAULT_POPUP_SHOW_TIME = 5000; 2 | 3 | let toolbars = document.getElementsByClassName('toolbar'); 4 | let pages = document.getElementsByClassName('page'); 5 | let prompts = document.getElementsByClassName('prompt'); 6 | 7 | /** 8 | * Thanks to: http://gorigins.com/posting-a-canvas-image-to-facebook-and-twitter/ 9 | */ 10 | export function dataURItoBlob(dataURI) { 11 | const byteString = atob(dataURI.split(',')[1]); 12 | const ab = new ArrayBuffer(byteString.length); 13 | let ia = new Uint8Array(ab); 14 | for (let i = 0; i < byteString.length; i++) { 15 | ia[i] = byteString.charCodeAt(i); 16 | } 17 | return new Blob([ab], {type: 'image/png'}); 18 | } 19 | 20 | function hide(elements) { 21 | for (let i=0; i < elements.length; i++) { 22 | elements[i].style.display = 'none'; 23 | } 24 | } 25 | 26 | function updateToolbarVisibility(pageRef) { 27 | hide(toolbars); 28 | let toolbar = document.getElementById(`toolbar-${pageRef}`); 29 | if (toolbar) { 30 | toolbar.style.display = 'flex'; 31 | } 32 | } 33 | 34 | function updatePageVisibility(pageRef) { 35 | hide(pages); 36 | let page = document.getElementById(`page-${pageRef}`); 37 | if (page) { 38 | page.style.display = 'block'; 39 | } 40 | } 41 | 42 | export function showPrompt(ref) { 43 | 44 | hide(prompts); 45 | 46 | let prompt = document.getElementById(`prompt-${ref}`); 47 | 48 | if (prompt) { 49 | prompt.classList.remove('fade-out'); 50 | prompt.style.display = 'block'; 51 | 52 | setTimeout(() => { 53 | prompt.classList.add('fade-out'); 54 | }, DEFAULT_POPUP_SHOW_TIME); 55 | } 56 | 57 | } 58 | 59 | export function showPage(pageRef) { 60 | updateToolbarVisibility(pageRef); 61 | updatePageVisibility(pageRef); 62 | showPrompt(pageRef); 63 | } 64 | -------------------------------------------------------------------------------- /src/shared/inputColourShim.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Show the colour input element if is supported. 3 | * There does not appear to be a good polyfill for it right now. 4 | * (Not vanilla JS anyway. The recommended one from html5please.com is a JQuery plugin). 5 | * For now, browsers without support will just get a placeholder and be limited to black. 6 | */ 7 | export default function() { 8 | 9 | let input = document.getElementById('input-colour'); 10 | let substitute = document.getElementById('input-colour-substitute'); 11 | 12 | // Unsupported browsers e.g. iOS Safari revert type to 'text' 13 | if (input.type === 'color') { 14 | input.style.display = 'block'; 15 | substitute.style.display = 'none'; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/shared/webrtcShim.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Previously I was using webrtc-adapter, but this was using up nearly half the JS bundle size! 3 | * This is a more lightweight shim based on the version here: 4 | * https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia 5 | */ 6 | export default function() { 7 | 8 | // Some browsers partially implement mediaDevices. We can't just assign an object 9 | // with getUserMedia as it would overwrite existing properties. 10 | if (navigator.mediaDevices === undefined || navigator.mediaDevices.getUserMedia === undefined) { 11 | 12 | // First get hold of the legacy getUserMedia, if present 13 | var getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia; 14 | 15 | // If there is no legacy getUserMedia either, do not attempt to shim, we'll check if 16 | // navigator.mediaDevices.getUserMedia exists in order to display the button or not. 17 | if (getUserMedia) { 18 | 19 | if (navigator.mediaDevices === undefined) { 20 | navigator.mediaDevices = {}; 21 | } 22 | 23 | navigator.mediaDevices.getUserMedia = function (constraints) { 24 | // Wrap the call to the old navigator.getUserMedia with a Promise 25 | return new Promise(function (resolve, reject) { 26 | getUserMedia.call(navigator, constraints, resolve, reject); 27 | }); 28 | } 29 | 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/swRegister.js: -------------------------------------------------------------------------------- 1 | export default function() { 2 | 3 | if ('serviceWorker' in navigator) { 4 | 5 | navigator.serviceWorker.register('/sw.js') 6 | .then(() => { 7 | console.log('Service worker successfully registered'); 8 | }) 9 | .catch((err) => { 10 | console.error('Service worker failed to register', err); 11 | }); 12 | 13 | } else { 14 | console.log('Service workers not supported'); 15 | } 16 | 17 | } 18 | --------------------------------------------------------------------------------