Skip to content

Commit e9b1e09

Browse files
committed
Logo sketch: restore background, fix html
1 parent 7d324b7 commit e9b1e09

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

assets/logo_sketch.html

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
<!DOCTYPE html>
22
<html><head>
3-
<style>*{margin:0;padding:0;overflow:hidden}body{background:transparent}canvas{display:block}</style>
3+
<style>*{margin:0;padding:0;overflow:hidden}body{background:#fff}canvas{display:block}</style>
44
</head><body>
55
<canvas id="canvas"></canvas>
66
<script>
7-
var canvas = document.getElementById('canvas');
8-
// Enable alpha on WebGL context
9-
var _origGetContext = canvas.getContext.bind(canvas);
10-
canvas.getContext = function(type, attrs) {
11-
if (type === 'webgl' || type === 'webgl2') {
12-
attrs = Object.assign({}, attrs || {}, {alpha: true, premultipliedAlpha: false});
13-
}
14-
return _origGetContext(type, attrs);
15-
};
16-
window.Module = {
17-
canvas: canvas,
18-
print: console.log,
19-
printErr: console.warn
20-
};
7+
window.Module={canvas:document.getElementById('canvas'),print:console.log,printErr:console.warn};
218
window.addEventListener('message', function(e) {
22-
if (e.data === 'dark') document.body.style.background = '#1a1a2e';
23-
if (e.data === 'light') document.body.style.background = 'transparent';
9+
if (e.data === 'dark') document.body.style.background = '#1e1e2e';
10+
if (e.data === 'light') document.body.style.background = '#fff';
2411
});
2512
</script>
2613
<script src="logo_sketch.js"></script>

assets/logo_sketch.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIR
2929

3030
// --pre-jses are emitted after the Module integration code, so that they can
3131
// refer to Module (if they choose; they can also define Module)
32-
// include: /tmp/tmp6l0do3zl.js
32+
// include: /tmp/tmpemigrr3o.js
3333

3434
if (!Module['expectedDataFileDownloads']) Module['expectedDataFileDownloads'] = 0;
3535
Module['expectedDataFileDownloads']++;
@@ -48,7 +48,7 @@ var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIR
4848
// web worker
4949
PACKAGE_PATH = encodeURIComponent(location.pathname.substring(0, location.pathname.lastIndexOf('/')) + '/');
5050
}
51-
var PACKAGE_NAME = '/tmp/tmp8r5fs8s1/sketch.data';
51+
var PACKAGE_NAME = '/tmp/tmpgyfeo2w5/sketch.data';
5252
var REMOTE_PACKAGE_BASE = 'sketch.data';
5353
var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE;
5454
var REMOTE_PACKAGE_SIZE = metadata['remote_package_size'];
@@ -136,9 +136,9 @@ var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIR
136136
Module['FS_createDataFile'](name, null, data, true, true, true);
137137
Module['removeRunDependency'](`fp ${name}`);
138138
}
139-
Module['removeRunDependency']('datafile_/tmp/tmp8r5fs8s1/sketch.data');
139+
Module['removeRunDependency']('datafile_/tmp/tmpgyfeo2w5/sketch.data');
140140
}
141-
Module['addRunDependency']('datafile_/tmp/tmp8r5fs8s1/sketch.data');
141+
Module['addRunDependency']('datafile_/tmp/tmpgyfeo2w5/sketch.data');
142142

143143
if (!Module['preloadResults']) Module['preloadResults'] = {};
144144

@@ -161,7 +161,7 @@ var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIR
161161

162162
})();
163163

164-
// end include: /tmp/tmp6l0do3zl.js
164+
// end include: /tmp/tmpemigrr3o.js
165165

166166

167167
var arguments_ = [];

assets/logo_sketch.wasm

405 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)