fastled 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastled-1.2.6 → fastled-1.2.7}/PKG-INFO +10 -1
- {fastled-1.2.6 → fastled-1.2.7}/README.md +9 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/__init__.py +25 -5
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/docker_manager.py +17 -5
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/keyboard.py +8 -12
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/open_browser.py +2 -1
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/site/build.py +46 -14
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled.egg-info/PKG-INFO +10 -1
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_ino/bad/bad.ino +9 -9
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_ino/embedded/wasm.ino +9 -9
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_ino/wasm/wasm.ino +9 -9
- {fastled-1.2.6 → fastled-1.2.7}/.aiderignore +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/build_multi_docker_image.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/build_webpage.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/lint.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/publish_release.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/test_build_exe.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/test_macos.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/test_ubuntu.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.github/workflows/test_win.yml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.gitignore +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.pylintrc +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.vscode/launch.json +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.vscode/settings.json +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/.vscode/tasks.json +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/LICENSE +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/MANIFEST.in +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/RELEASE.md +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/TODO.md +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/build_exe.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/build_site.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/clean +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/install +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/lint +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/pyproject.toml +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/requirements.testing.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/setup.cfg +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/setup.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/app.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/assets/example.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/cli.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/client_server.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/compile_server.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/compile_server_impl.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/filewatcher.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/live_client.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/parse_args.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/paths.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/project_init.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/select_sketch_directory.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/settings.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/sketch.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/spinner.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/string_diff.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/test/can_run_local_docker_tests.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/test/examples.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/types.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/util.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled/web_compile.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled.egg-info/SOURCES.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled.egg-info/dependency_links.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled.egg-info/entry_points.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled.egg-info/requires.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/src/fastled.egg-info/top_level.txt +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/test +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_api.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_bad_ino.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_build.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_build_examples.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_cli.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_compile_server.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_docker_linux_on_windows.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_embedded_data.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_examples.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_filechanger.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_ino/embedded/data/bigdata.dat +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_project_init.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_server_and_client_seperatly.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/tests/test_webcompile.py +0 -0
- {fastled-1.2.6 → fastled-1.2.7}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.7
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -186,6 +186,14 @@ with Api.server() as server:
|
|
186
186
|
client.stop()
|
187
187
|
```
|
188
188
|
|
189
|
+
**Build Docker Image from a local copy of the FastLED repo**
|
190
|
+
```python
|
191
|
+
from fastapi import Docker, Api
|
192
|
+
container_name: str = Docker.build_from_fastled_repo()
|
193
|
+
with Api.server(container_name=container_name) as server:
|
194
|
+
...
|
195
|
+
```
|
196
|
+
|
189
197
|
# Features
|
190
198
|
|
191
199
|
## Hot reload by default
|
@@ -266,6 +274,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
|
|
266
274
|
|
267
275
|
# Revisions
|
268
276
|
|
277
|
+
* 1.2.7 - A bunch of fixes for MacOS and probably linux.
|
269
278
|
* 1.2.6 - Now builds image from the project root of FastLED.
|
270
279
|
* 1.1.25 - Fix up paths for `--init`
|
271
280
|
* 1.1.24 - Mac/Linux now properly responds to ctrl-c when waiting for a key event.
|
@@ -163,6 +163,14 @@ with Api.server() as server:
|
|
163
163
|
client.stop()
|
164
164
|
```
|
165
165
|
|
166
|
+
**Build Docker Image from a local copy of the FastLED repo**
|
167
|
+
```python
|
168
|
+
from fastapi import Docker, Api
|
169
|
+
container_name: str = Docker.build_from_fastled_repo()
|
170
|
+
with Api.server(container_name=container_name) as server:
|
171
|
+
...
|
172
|
+
```
|
173
|
+
|
166
174
|
# Features
|
167
175
|
|
168
176
|
## Hot reload by default
|
@@ -243,6 +251,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
|
|
243
251
|
|
244
252
|
# Revisions
|
245
253
|
|
254
|
+
* 1.2.7 - A bunch of fixes for MacOS and probably linux.
|
246
255
|
* 1.2.6 - Now builds image from the project root of FastLED.
|
247
256
|
* 1.1.25 - Fix up paths for `--init`
|
248
257
|
* 1.1.24 - Mac/Linux now properly responds to ctrl-c when waiting for a key event.
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"""FastLED Wasm Compiler package."""
|
2
2
|
|
3
3
|
# context
|
4
|
+
import subprocess
|
4
5
|
from contextlib import contextmanager
|
5
6
|
from pathlib import Path
|
6
7
|
from typing import Generator
|
@@ -13,7 +14,7 @@ from .types import BuildMode, CompileResult, CompileServerError
|
|
13
14
|
# IMPORTANT! There's a bug in github which will REJECT any version update
|
14
15
|
# that has any other change in the repo. Please bump the version as the
|
15
16
|
# ONLY change in a commit, or else the pypi update and the release will fail.
|
16
|
-
__version__ = "1.2.
|
17
|
+
__version__ = "1.2.7"
|
17
18
|
|
18
19
|
|
19
20
|
class Api:
|
@@ -138,10 +139,10 @@ class Docker:
|
|
138
139
|
@staticmethod
|
139
140
|
def purge() -> None:
|
140
141
|
from fastled.docker_manager import DockerManager
|
141
|
-
from fastled.settings import
|
142
|
+
from fastled.settings import IMAGE_NAME
|
142
143
|
|
143
144
|
docker_mgr = DockerManager()
|
144
|
-
docker_mgr.purge(
|
145
|
+
docker_mgr.purge(image_name=IMAGE_NAME)
|
145
146
|
|
146
147
|
@staticmethod
|
147
148
|
def build_from_github(
|
@@ -157,7 +158,6 @@ class Docker:
|
|
157
158
|
Returns:
|
158
159
|
Container name.
|
159
160
|
"""
|
160
|
-
import subprocess
|
161
161
|
|
162
162
|
from fastled.docker_manager import DockerManager
|
163
163
|
from fastled.settings import CONTAINER_NAME, IMAGE_NAME
|
@@ -197,6 +197,14 @@ class Docker:
|
|
197
197
|
|
198
198
|
docker_mgr = DockerManager()
|
199
199
|
|
200
|
+
platform_tag = ""
|
201
|
+
# if "arm" in docker_mgr.architecture():
|
202
|
+
if (
|
203
|
+
"arm"
|
204
|
+
in subprocess.run(["uname", "-m"], capture_output=True).stdout.decode()
|
205
|
+
):
|
206
|
+
platform_tag = "-arm64"
|
207
|
+
|
200
208
|
# Build the image
|
201
209
|
docker_mgr.build_image(
|
202
210
|
image_name=IMAGE_NAME,
|
@@ -204,6 +212,7 @@ class Docker:
|
|
204
212
|
dockerfile_path=dockerfile_path,
|
205
213
|
build_context=output_dir,
|
206
214
|
build_args={"NO_PREWARM": "1"},
|
215
|
+
platform_tag=platform_tag,
|
207
216
|
)
|
208
217
|
|
209
218
|
# Run the container and return it
|
@@ -223,7 +232,7 @@ class Docker:
|
|
223
232
|
def build_from_fastled_repo(
|
224
233
|
project_root: Path | str = Path("."), platform_tag: str = ""
|
225
234
|
) -> str:
|
226
|
-
"""Build the FastLED WASM compiler Docker image, which will be tagged as "
|
235
|
+
"""Build the FastLED WASM compiler Docker image, which will be tagged as "main".
|
227
236
|
|
228
237
|
Args:
|
229
238
|
project_root: Path to the FastLED project root directory
|
@@ -244,6 +253,17 @@ class Docker:
|
|
244
253
|
|
245
254
|
docker_mgr = DockerManager()
|
246
255
|
|
256
|
+
platform_tag = ""
|
257
|
+
# if "arm" in docker_mgr.architecture():
|
258
|
+
if (
|
259
|
+
"arm"
|
260
|
+
in subprocess.run(["uname", "-m"], capture_output=True).stdout.decode()
|
261
|
+
):
|
262
|
+
platform_tag = "-arm64"
|
263
|
+
|
264
|
+
# if image exists, remove it
|
265
|
+
docker_mgr.purge(image_name=IMAGE_NAME)
|
266
|
+
|
247
267
|
# Build the image
|
248
268
|
docker_mgr.build_image(
|
249
269
|
image_name=IMAGE_NAME,
|
@@ -4,6 +4,7 @@ New abstraction for Docker management with improved Ctrl+C handling.
|
|
4
4
|
|
5
5
|
import _thread
|
6
6
|
import os
|
7
|
+
import platform
|
7
8
|
import subprocess
|
8
9
|
import sys
|
9
10
|
import threading
|
@@ -477,7 +478,7 @@ class DockerManager:
|
|
477
478
|
print(
|
478
479
|
f"Container {container_name} did not restart within {timeout} seconds."
|
479
480
|
)
|
480
|
-
container.stop()
|
481
|
+
container.stop(timeout=0)
|
481
482
|
print(f"Container {container_name} has been stopped.")
|
482
483
|
container.start()
|
483
484
|
elif container.status == "paused":
|
@@ -503,6 +504,7 @@ class DockerManager:
|
|
503
504
|
tty=True,
|
504
505
|
volumes=volumes,
|
505
506
|
ports=ports,
|
507
|
+
remove=True,
|
506
508
|
)
|
507
509
|
return container
|
508
510
|
|
@@ -554,6 +556,8 @@ class DockerManager:
|
|
554
556
|
if isinstance(container, str):
|
555
557
|
container = self.get_container(container)
|
556
558
|
|
559
|
+
assert container is not None, "Container not found."
|
560
|
+
|
557
561
|
print(f"Attaching to container {container.name}...")
|
558
562
|
|
559
563
|
first_run = self.first_run
|
@@ -572,7 +576,11 @@ class DockerManager:
|
|
572
576
|
print(f"Could not put container {container_name} to sleep.")
|
573
577
|
return
|
574
578
|
try:
|
575
|
-
|
579
|
+
if platform.system() == "Windows":
|
580
|
+
container.pause()
|
581
|
+
else:
|
582
|
+
container.stop()
|
583
|
+
container.remove()
|
576
584
|
print(f"Container {container.name} has been suspended.")
|
577
585
|
except KeyboardInterrupt:
|
578
586
|
print(f"Container {container.name} interrupted by keyboard interrupt.")
|
@@ -585,21 +593,23 @@ class DockerManager:
|
|
585
593
|
"""
|
586
594
|
if isinstance(container, str):
|
587
595
|
container = self.get_container(container)
|
596
|
+
if not container:
|
597
|
+
print(f"Could not resume container {container}.")
|
598
|
+
return
|
588
599
|
try:
|
589
600
|
container.unpause()
|
590
601
|
print(f"Container {container.name} has been resumed.")
|
591
602
|
except Exception as e:
|
592
603
|
print(f"Failed to resume container {container.name}: {e}")
|
593
604
|
|
594
|
-
def get_container(self, container_name: str) -> Container:
|
605
|
+
def get_container(self, container_name: str) -> Container | None:
|
595
606
|
"""
|
596
607
|
Get a container by name.
|
597
608
|
"""
|
598
609
|
try:
|
599
610
|
return self.client.containers.get(container_name)
|
600
611
|
except docker.errors.NotFound:
|
601
|
-
|
602
|
-
raise
|
612
|
+
return None
|
603
613
|
|
604
614
|
def is_container_running(self, container_name: str) -> bool:
|
605
615
|
"""
|
@@ -689,11 +699,13 @@ class DockerManager:
|
|
689
699
|
if any(image_name in tag for tag in container.image.tags):
|
690
700
|
print(f"Removing container {container.name}")
|
691
701
|
container.remove(force=True)
|
702
|
+
|
692
703
|
except Exception as e:
|
693
704
|
print(f"Error removing containers: {e}")
|
694
705
|
|
695
706
|
# Remove all images with this name
|
696
707
|
try:
|
708
|
+
self.client.images.prune(filters={"dangling": False})
|
697
709
|
images = self.client.images.list()
|
698
710
|
for image in images:
|
699
711
|
if any(image_name in tag for tag in image.tags):
|
@@ -6,12 +6,10 @@ import time
|
|
6
6
|
from queue import Empty, Queue
|
7
7
|
from threading import Thread
|
8
8
|
|
9
|
-
_WHITE_SPACE =
|
9
|
+
_WHITE_SPACE = {" ", "\n", "\r"} # Including Enter key as whitespace
|
10
10
|
|
11
11
|
|
12
|
-
# Original space bar, but now also enter key.
|
13
12
|
class SpaceBarWatcher:
|
14
|
-
|
15
13
|
@classmethod
|
16
14
|
def watch_space_bar_pressed(cls, timeout: float = 0) -> bool:
|
17
15
|
watcher = cls()
|
@@ -32,9 +30,7 @@ class SpaceBarWatcher:
|
|
32
30
|
self.process.start()
|
33
31
|
|
34
32
|
def _watch_for_space(self) -> None:
|
35
|
-
# Set stdin to non-blocking mode
|
36
33
|
fd = sys.stdin.fileno()
|
37
|
-
|
38
34
|
if os.name == "nt": # Windows
|
39
35
|
import msvcrt
|
40
36
|
|
@@ -51,14 +47,13 @@ class SpaceBarWatcher:
|
|
51
47
|
char = msvcrt.getch().decode() # type: ignore
|
52
48
|
if char in _WHITE_SPACE:
|
53
49
|
self.queue.put(ord(" "))
|
54
|
-
|
55
50
|
else: # Unix-like systems
|
56
51
|
import termios
|
57
52
|
import tty
|
58
53
|
|
59
54
|
old_settings = termios.tcgetattr(fd) # type: ignore
|
60
55
|
try:
|
61
|
-
tty.
|
56
|
+
tty.setcbreak(fd) # Use cbreak mode to avoid console issues
|
62
57
|
while True:
|
63
58
|
# Check for cancel signal
|
64
59
|
try:
|
@@ -70,21 +65,22 @@ class SpaceBarWatcher:
|
|
70
65
|
# Check if there's input ready
|
71
66
|
if select.select([sys.stdin], [], [], 0.1)[0]:
|
72
67
|
char = sys.stdin.read(1)
|
73
|
-
if ord(char) == 3: #
|
68
|
+
if ord(char) == 3: # Ctrl+C
|
74
69
|
_thread.interrupt_main()
|
75
70
|
break
|
76
|
-
|
77
71
|
if char in _WHITE_SPACE:
|
78
72
|
self.queue.put(ord(" "))
|
79
73
|
finally:
|
80
|
-
termios.tcsetattr(
|
74
|
+
termios.tcsetattr(
|
75
|
+
fd, termios.TCSADRAIN, old_settings
|
76
|
+
) # Restore terminal settings
|
81
77
|
|
82
78
|
def space_bar_pressed(self) -> bool:
|
83
79
|
found = False
|
84
80
|
while not self.queue.empty():
|
85
81
|
try:
|
86
|
-
key = self.queue.get(block=False
|
87
|
-
if key == ord(" "):
|
82
|
+
key = self.queue.get(block=False)
|
83
|
+
if key == ord(" "): # Spacebar
|
88
84
|
found = True
|
89
85
|
self.queue.task_done()
|
90
86
|
except Empty:
|
@@ -17,7 +17,8 @@ def _open_browser_python(fastled_js: Path) -> None:
|
|
17
17
|
subprocess.run(
|
18
18
|
[sys.executable, "-m", "nodejs.npm", "install", "-g", "live-server"]
|
19
19
|
)
|
20
|
-
|
20
|
+
proc = subprocess.Popen(["cd", fastled_js, "&&", "live-server"])
|
21
|
+
proc.wait()
|
21
22
|
|
22
23
|
|
23
24
|
def _find_open_port(start_port: int) -> int:
|
@@ -189,21 +189,53 @@ INDEX_TEMPLATE = """<!DOCTYPE html>
|
|
189
189
|
const splashScreen = document.querySelector('.splash-screen');
|
190
190
|
const splashText = document.querySelector('.splash-text');
|
191
191
|
|
192
|
-
//
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
192
|
+
// Ensure splash screen always gets removed
|
193
|
+
const removeSplashScreen = () => {{
|
194
|
+
splashScreen.style.opacity = '0';
|
195
|
+
setTimeout(() => {{
|
196
|
+
splashScreen.style.display = 'none';
|
197
|
+
}}, 500);
|
198
|
+
}};
|
199
|
+
|
200
|
+
// Set a maximum time the splash screen can stay
|
201
|
+
const maxSplashTime = setTimeout(removeSplashScreen, 2000); // Reduced from 5000ms to 2000ms
|
202
|
+
|
203
|
+
// Try to do nice fade-in/fade-out when possible
|
204
|
+
try {{
|
205
|
+
// Add a fallback timer in case font loading fails silently
|
206
|
+
const fontTimeout = setTimeout(() => {{
|
207
|
+
splashText.style.opacity = '1';
|
208
|
+
setTimeout(removeSplashScreen, 1000);
|
209
|
+
}}, 1000);
|
210
|
+
|
211
|
+
Promise.all([
|
212
|
+
// Wrap font loading in a timeout promise
|
213
|
+
Promise.race([
|
214
|
+
document.fonts.ready,
|
215
|
+
new Promise((_, reject) => setTimeout(reject, 1500))
|
216
|
+
]),
|
217
|
+
new Promise(resolve => {{
|
218
|
+
if (document.readyState === 'complete') {{
|
219
|
+
resolve();
|
220
|
+
}} else {{
|
221
|
+
window.addEventListener('load', resolve);
|
222
|
+
}}
|
223
|
+
}})
|
224
|
+
]).then(() => {{
|
225
|
+
clearTimeout(maxSplashTime);
|
226
|
+
clearTimeout(fontTimeout);
|
227
|
+
splashText.style.opacity = '1';
|
228
|
+
setTimeout(removeSplashScreen, 1500);
|
229
|
+
}}).catch(() => {{
|
230
|
+
// If either promise fails, ensure splash screen is removed
|
231
|
+
clearTimeout(maxSplashTime);
|
232
|
+
removeSplashScreen();
|
205
233
|
}});
|
206
|
-
}})
|
234
|
+
}} catch (e) {{
|
235
|
+
// Final fallback if anything goes wrong
|
236
|
+
console.warn('Splash screen error:', e);
|
237
|
+
removeSplashScreen();
|
238
|
+
}}
|
207
239
|
const links = document.querySelectorAll('.example-link');
|
208
240
|
const iframe = document.getElementById('example-frame');
|
209
241
|
const navPane = document.querySelector('.nav-pane');
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.7
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -186,6 +186,14 @@ with Api.server() as server:
|
|
186
186
|
client.stop()
|
187
187
|
```
|
188
188
|
|
189
|
+
**Build Docker Image from a local copy of the FastLED repo**
|
190
|
+
```python
|
191
|
+
from fastapi import Docker, Api
|
192
|
+
container_name: str = Docker.build_from_fastled_repo()
|
193
|
+
with Api.server(container_name=container_name) as server:
|
194
|
+
...
|
195
|
+
```
|
196
|
+
|
189
197
|
# Features
|
190
198
|
|
191
199
|
## Hot reload by default
|
@@ -266,6 +274,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
|
|
266
274
|
|
267
275
|
# Revisions
|
268
276
|
|
277
|
+
* 1.2.7 - A bunch of fixes for MacOS and probably linux.
|
269
278
|
* 1.2.6 - Now builds image from the project root of FastLED.
|
270
279
|
* 1.1.25 - Fix up paths for `--init`
|
271
280
|
* 1.1.24 - Mac/Linux now properly responds to ctrl-c when waiting for a key event.
|
@@ -75,15 +75,15 @@ XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT);
|
|
75
75
|
NoisePalette noisePalette = NoisePalette(xyMap);
|
76
76
|
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
78
|
+
UISlider brightness("Brightness", 255, 0, 255);
|
79
|
+
UISlider speed("Speed", 15, 1, 50);
|
80
|
+
UICheckbox isOff("Set Black", false);
|
81
|
+
UICheckbox changePallete("Auto Next", true);
|
82
|
+
UISlider changePalletTime("Change Palette Time", 5, 1, 100);
|
83
|
+
UISlider scale( "Scale", 20, 1, 100);
|
84
|
+
UIButton changePalette("Next Palette");
|
85
|
+
UIButton changeFx("Next Fx");
|
86
|
+
UINumberField fxIndex("Fx index", 0, 0, NUM_ANIMATIONS);
|
87
87
|
|
88
88
|
Animartrix animartrix(xyMap, POLAR_WAVES);
|
89
89
|
FxEngine fxEngine(NUM_LEDS);
|
@@ -73,15 +73,15 @@ XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT);
|
|
73
73
|
NoisePalette noisePalette = NoisePalette(xyMap);
|
74
74
|
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
76
|
+
UISlider brightness("Brightness", 255, 0, 255);
|
77
|
+
UISlider speed("Speed", 15, 1, 50);
|
78
|
+
UICheckbox isOff("Set Black", false);
|
79
|
+
UICheckbox changePallete("Auto Next", true);
|
80
|
+
UISlider changePalletTime("Change Palette Time", 5, 1, 100);
|
81
|
+
UISlider scale( "Scale", 20, 1, 100);
|
82
|
+
UIButton changePalette("Next Palette");
|
83
|
+
UIButton changeFx("Next Fx");
|
84
|
+
UINumberField fxIndex("Fx index", 0, 0, NUM_ANIMATIONS);
|
85
85
|
|
86
86
|
Animartrix animartrix(xyMap, POLAR_WAVES);
|
87
87
|
FxEngine fxEngine(NUM_LEDS);
|
@@ -73,15 +73,15 @@ XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT);
|
|
73
73
|
NoisePalette noisePalette = NoisePalette(xyMap);
|
74
74
|
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
76
|
+
UISlider brightness("Brightness", 255, 0, 255);
|
77
|
+
UISlider speed("Speed", 15, 1, 50);
|
78
|
+
UICheckbox isOff("Set Black", false);
|
79
|
+
UICheckbox changePallete("Auto Next", true);
|
80
|
+
UISlider changePalletTime("Change Palette Time", 5, 1, 100);
|
81
|
+
UISlider scale( "Scale", 20, 1, 100);
|
82
|
+
UIButton changePalette("Next Palette");
|
83
|
+
UIButton changeFx("Next Fx");
|
84
|
+
UINumberField fxIndex("Fx index", 0, 0, NUM_ANIMATIONS);
|
85
85
|
|
86
86
|
Animartrix animartrix(xyMap, POLAR_WAVES);
|
87
87
|
FxEngine fxEngine(NUM_LEDS);
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|