Skip to content

Commit

Permalink
Merge branch 'main' into HomeAssistant
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed May 30, 2024
2 parents e8962cf + 9e838a1 commit 58a6ea3
Show file tree
Hide file tree
Showing 56 changed files with 4,613 additions and 3,653 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ jobs:
- name: Build PlatformIO Project
run: pio run -e ${{ matrix.environment }}
- name: Rename Bin
run: mv .pio/build/${{ matrix.environment }}/firmware.bin StarMod-${{ matrix.environment }}-${{env.git_ref}}-${{env.git_hash}}.bin
run: mv .pio/build/${{ matrix.environment }}/firmware.bin StarBase-${{ matrix.environment }}-${{env.git_ref}}-${{env.git_hash}}.bin
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
path: StarMod-${{ matrix.environment }}-${{env.git_ref}}-${{env.git_hash}}.bin
path: StarBase-${{ matrix.environment }}-${{env.git_ref}}-${{env.git_hash}}.bin
name: StarBase-${{ matrix.environment }}-${{env.git_ref}}-${{env.git_hash}}.bin
retention-days: 30

release:
Expand All @@ -84,4 +85,4 @@ jobs:
files: |
artifact/*.bin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# StarModLeds
# StarLeds

See [StarDocs](https://ewowi.github.io/StarDocs/)

Expand All @@ -10,7 +10,7 @@ See [StarDocs](https://ewowi.github.io/StarDocs/)
<img width="307" alt="image" src="https://github.com/ewowi/StarDocs/assets/138451817/5d4f0051-0e38-4d16-b81a-31fc8d2f7e1e">
<img width="344" alt="image" src="https://github.com/ewowi/StarDocs/assets/138451817/dff1090a-7af0-4cbb-83e1-7108021976e8">

Build using StarMod:
Build using StarBase:

* [ewowi/StarMod](https://github.com/ewowi/StarMod)
* [ewowi/StarBase](https://github.com/ewowi/StarBase)

40 changes: 25 additions & 15 deletions data/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @title StarMod
// @title StarBase
// @file app.js
// @date 20240411
// @repo https://github.com/ewowi/StarMod
// @Authors https://github.com/ewowi/StarMod/commits/main
// @Copyright © 2024 Github StarMod Commit Authors
// @repo https://github.com/ewowi/StarBase
// @Authors https://github.com/ewowi/StarBase/commits/main
// @Copyright © 2024 Github StarBase Commit Authors
// @license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
// @license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]

Expand Down Expand Up @@ -228,13 +228,21 @@ function preview3D(canvasNode, buffer) {
led.push(0);
if (led.length <= 2) //1D and 2D: maak 3D
led.push(0);
const geometry = new THREE.SphereGeometry( 0.2); //was 1/factor
const material = new THREE.MeshBasicMaterial({transparent: true, opacity: 0.7});

// ppf("size and shape", jsonValues.pview.ledSize, jsonValues.pview.shape);
if (!jsonValues.pview.ledSize) jsonValues.pview.ledSize = 7;

let geometry;
if (jsonValues.pview.shape == 1)
geometry = new THREE.TetrahedronGeometry(jsonValues.pview.ledSize / 30); //was 1/factor
else // default
geometry = new THREE.SphereGeometry(jsonValues.pview.ledSize / 30); //was 1/factor
const material = new THREE.MeshBasicMaterial({transparent: true, opacity: 1.0});
// material.color = new THREE.Color(`${x/mW}`, `${y/mH}`, `${z/mD}`);
const sphere = new THREE.Mesh( geometry, material );
sphere.position.set(offset_x + d*led[0]/factor, -offset_y - d*led[1]/factor, - offset_z - d*led[2]/factor);
sphere.name = outputsIndex + " - " + ledsIndex++;
scene.add( sphere );
const mesh = new THREE.Mesh( geometry, material );
mesh.position.set(offset_x + d*led[0]/factor, -offset_y - d*led[1]/factor, - offset_z - d*led[2]/factor);
mesh.name = outputsIndex + " - " + ledsIndex++;
scene.add( mesh );
}
}
else {
Expand All @@ -260,17 +268,19 @@ function preview3D(canvasNode, buffer) {
}

//light up the cube
let firstLed = 5;
var i = 1;
let headerBytes = 4;
var i = 0;
if (jsonValues.pview.outputs) {
// console.log("preview3D jsonValues", jsonValues.pview);
for (var output of jsonValues.pview.outputs) {
if (output.leds) {
for (var led of output.leds) {
if (i < scene.children.length) {
scene.children[i].visible = buffer[i*3 + firstLed] + buffer[i*3 + firstLed + 1] + buffer[i*3 + firstLed+2] > 10; //do not show blacks
if (scene.children[i].visible)
scene.children[i].material.color = new THREE.Color(`${buffer[i*3 + firstLed]/255}`, `${buffer[i*3 + firstLed + 1]/255}`, `${buffer[i*3 + firstLed + 2]/255}`);
// scene.children[i].visible = buffer[headerBytes + i*3] + buffer[headerBytes + i*3 + 1] + buffer[headerBytes + i*3 + 2] > 10; //do not show blacks
// if (scene.children[i].visible) {
scene.children[i].material.color = new THREE.Color(`${buffer[headerBytes + i*3]/255}`, `${buffer[headerBytes + i*3 + 1]/255}`, `${buffer[headerBytes + i*3 + 2]/255}`);
// scene.children[i].geometry.setAtttribute("radius", buffer[4] / 30);
// }
}
i++;
}
Expand Down
21 changes: 16 additions & 5 deletions data/index.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
/*
@title StarMod
@title StarBase
@file index.css
@date 20240411
@repo https://github.com/ewowi/StarMod, submit changes to this file as PRs to ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/ewowi/StarBase, submit changes to this file as PRs to ewowi/StarBase
@Authors https://github.com/ewowi/StarBase/commits/main
@Copyright © 2024 Github StarBase Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]
*/

:root,
:root.starmod {
:root.starbase {
--bg-color: #121212;
--text-color: #cfd096;
--th-color: #c27e66;
--h-color:#c27e66;
--border-color: #cdad6a;
--select-color: #1a8aff; /*used for view buttons*/
--label-color: #83c5eb;
--comment-color: #598a43;
--font-size: 10px;
}
:root.starLeds {
--bg-color: linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%);
--text-color: #030303;
--th-color: #b60f6281;
Expand Down
32 changes: 21 additions & 11 deletions data/index.htm
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
<!--
@title StarMod
@title StarBase
@file index.htm
@date 20240411
@repo https://github.com/ewowi/StarMod, submit changes to this file as PRs to ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/ewowi/StarBase, submit changes to this file as PRs to StarBase
@Authors https://github.com/ewowi/StarBase/commits/main
@Copyright © 2024 Github StarBase Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]
*/
-->

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>StarMod💫 LEDs 🎨 by MoonModules 🌔</title>
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="author" content="MoonModules and its contributors">
<title>Star💫LEDs🎨 by MoonModules🌔</title>
<link rel="icon" href="https://ewowi.github.io/StarDocs/assets/images/ui/starbase/favicon-16x16.png">
<!-- <link rel="icon" type="image/x-icon" href="favicon-16x16.png"> currently only works in chrome -->
<!-- <link rel="mask-icon" type="image/x-icon" href="favicon-16x16.png"> for safari tabs? -->
<!-- <link rel="shortcut icon" href="https://ewowi.github.io/StarDocs/assets/images/ui/StarBase/favicon-16x16.png"> -->
<link rel="stylesheet" href="index.css">
<script src="app.js"></script>
<script src="index.js"></script>

<!-- tbd: add max-age=86400 to imports -->
<!-- favicon in safari not working. see: -->
<!-- https://stackoverflow.com/questions/68885882/favicon-not-displaying-on-safari -->
<!-- test: rm /Users/ewoudwijma/Library/Safari/Favicon\ Cache also from trash bin -->

<!-- tbd: add max-age=86400 to imports -->

<!-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules -->
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
Expand All @@ -35,7 +44,7 @@
<body onload="onLoad()">
<div class="module">
<hgroup>
<h1 style="float: left;">StarMod💫 LEDs 🎨 by MoonModules 🌔</h1>
<h1 style="float: left;">Star💫LEDs🎨 by MoonModules🌔</h1>
<a href="https://ewowi.github.io/StarDocs" style="float: right;"></a>
</hgroup>
<br>
Expand All @@ -50,12 +59,13 @@ <h2><div id="serverName"></div></h2>
<input type="button" value="Save" id="bSave" onclick="saveModel(this)">
<span> | </span>
<label>Theme</label> <select name="theme-select" id="theme-select" onchange="setTheme(this)">
<option value="starmod">StarMod</option>
<option value="starbase">StarBase</option>
<option value="starleds">StarLeds</option>
<option value="wled">WLED</option>
<option value="grayeen">Grayeen</option>
<option value="dev">Dev</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
<option value="dark">DeathStar</option>
<option value="blue">Blue</option>
<option value="pink">Pink</option>
<option value="space">Space</option>
Expand All @@ -75,7 +85,7 @@ <h2><div id="serverName"></div></h2>
</div>
<div id="connind">&#9790;</div>
<div id="modalView" class="modal"></div>
<p style="color:grey;"> © 2024 MoonModules ☾ - Licensed under GPL-v3</p>
<p style="color:grey;"> © 2024 MoonModules ☾ - StarMod, StarBase and StarLeds is licensed under GPL-v3</p>
<div id="canvasMenu" style="position:absolute;display:none"> <!--;background-color:#b60f62-->
<p><button id="canvasButton1"></button></p>
<p><button id="canvasButton2"></button></p>
Expand Down
Loading

0 comments on commit 58a6ea3

Please sign in to comment.