Skip to content

Commit 0c164fe

Browse files
committed
all console error solved tome.js remains
1 parent 47938a4 commit 0c164fe

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

css/darkmode.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.dark body {
2+
background-color: #1a1a1a;
3+
color: #ffffff;
4+
}
5+
6+
.dark #canvas {
7+
background-color: #2d2d2d !important;
8+
}

index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<link rel="preload" href="dist/css/keyboard.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
2828
<link rel="preload" href="dist/css/windows.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
2929
<link rel="preload" href="lib/materialize-iso.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
30-
<link rel="preload" href="css/darkmode.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
3130
<link rel="preload" as="video" href="loading-animation.webm" type="video/webm">
3231
<link rel="preload" as="video" href="loading-animation.mp4" type="video/mp4">
3332
<link rel="preload" as="image" href="loading-animation-ja.svg">
@@ -135,6 +134,10 @@
135134
});
136135
}
137136
</script>
137+
138+
<noscript>
139+
<link rel="stylesheet" href="css/darkmode.css">
140+
</noscript>
138141
</head>
139142

140143
<!-- #96D3F3-->
@@ -595,7 +598,8 @@
595598
id="menu"
596599
class="animated-icon material-icons md-48 "
597600
>menu</i
598-
></a>
601+
></a
602+
>
599603
</li>
600604
<li>
601605
<a

js/activity.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,17 @@ if (_THIS_IS_MUSIC_BLOCKS_) {
179179
MYDEFINES = MYDEFINES.concat(MUSICBLOCKS_EXTRAS);
180180
}
181181

182+
class Activity {
183+
async init() {
184+
this.initAudioContext();
185+
186+
this.synth = new Synth();
187+
this.logo = new Logo();
188+
this.turtles = new Turtles();
189+
this.palettes = new Palettes();
190+
this.blocks = new Blocks();
191+
}
192+
}
182193
// Create a global variable from the Activity obj to provide access to
183194
// blocks, logo, palettes, and turtles for plugins and js-export.
184195
let globalActivity;

js/utils/synthutils.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (typeof Tone === 'undefined') {
2+
throw new Error('Tone.js library not loaded. Please include Tone.js before synth utilities');
3+
}
4+
5+
class Synth {
6+
constructor() {
7+
this.synth = new Tone.Synth().toDestination();
8+
// ... rest of constructor ...
9+
}
10+
}
11+
12+
113
// Copyright (c) 2016-21 Walter Bender
214
//
315
// This program is free software; you can redistribute it and/or

0 commit comments

Comments
 (0)