diff --git a/.gitea/graphics/nodes.svg b/.gitea/graphics/nodes.svg
index 5091291..9e22147 100644
--- a/.gitea/graphics/nodes.svg
+++ b/.gitea/graphics/nodes.svg
@@ -1 +1,472 @@
-
\ No newline at end of file
+
diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
index bfe901b..41d6b9a 100644
--- a/.gitea/workflows/deploy.yaml
+++ b/.gitea/workflows/deploy.yaml
@@ -23,7 +23,7 @@ jobs:
${{ runner.os }}-pnpm-
- name: 📦 Install Dependencies
run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }}
-
+
- name: 🗜️ Tar Workspace
run: tar -cf workspace.tar --exclude="${{ env.PNPM_CACHE_FOLDER }}" .
@@ -32,7 +32,7 @@ jobs:
with:
name: workspace-deps
path: workspace.tar
- compression-level: 0
+ compression-level: 0
lint:
needs: setup
diff --git a/Dockerfile b/Dockerfile
index 0be17d5..6360b6e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,8 +3,8 @@ FROM node:24-alpine
RUN apk add --no-cache --update curl rclone g++
ENV RUSTUP_HOME=/usr/local/rustup \
- CARGO_HOME=/usr/local/cargo \
- PATH=/usr/local/cargo/bin:$PATH
+ CARGO_HOME=/usr/local/cargo \
+ PATH=/usr/local/cargo/bin:$PATH
RUN curl --silent --show-error --location --fail --retry 3 \
--proto '=https' --tlsv1.2 \
diff --git a/README.md b/README.md
index 7bbf75b..8c18a00 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,11 @@ Nodarium
Nodarium
-
+
Nodarium is a WebAssembly based visual programming language.
-
+
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 0213bd8..c8b5e1b 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -8,15 +8,16 @@ The visual programming language consists of so called `Nodes` which are stored a
```typescript
type Node = {
- id: string,
- outputs: string[],
+ id: string;
+ outputs: string[];
inputs: {
- [key:string]: NodeInput
- }
-}
+ [key: string]: NodeInput;
+ };
+};
```
## How are the arguments defined?
+
To define which arguments a nodes accepts we use JSON. This json is embeded into the `.wasm` file of our node. An example `definition.json` file could look like this:
```json
diff --git a/docs/PLANTARIUM.md b/docs/PLANTARIUM.md
index 3b41294..441252a 100644
--- a/docs/PLANTARIUM.md
+++ b/docs/PLANTARIUM.md
@@ -5,21 +5,23 @@
Plantarium encodes different types of data differently. Right now we have three types of data:
### Path
+
[0, stem_depth, ... x,y,z,thickness, x,y,z,thickness...]
### Geometry
+
[1, vertex_amount, face_amount, ... faces in index_a, index_b, index_c ..., ... vertices in x,y,z,x,y,z ..., ... normals in x,y,z,x,y,z ...]
### Instances
-[
- 2,
- vertex_amount,
- face_amount,
- instance_amount,
- stem_depth,
- ...faces...,
- ...vertices...,
- ...normals...,
- ...4x4 matrices for instances...
-]
+[
+2,
+vertex_amount,
+face_amount,\
+instance_amount,
+stem_depth,
+...faces...,
+...vertices...,
+...normals...,
+...4x4 matrices for instances...
+]
diff --git a/nodes/max/plantarium/.template/Cargo.toml b/nodes/max/plantarium/.template/Cargo.toml
index 298ff9f..1629f37 100644
--- a/nodes/max/plantarium/.template/Cargo.toml
+++ b/nodes/max/plantarium/.template/Cargo.toml
@@ -11,8 +11,8 @@ crate-type = ["cdylib", "rlib"]
default = ["console_error_panic_hook"]
[dependencies]
-utils = { version = "0.1.0", path = "../../../../packages/utils" }
+console_error_panic_hook = { version = "0.1.7", optional = true }
macros = { version = "0.1.0", path = "../../../../packages/macros" }
serde = { version = "1.0", features = ["derive"] }
-console_error_panic_hook = { version = "0.1.7", optional = true }
+utils = { version = "0.1.0", path = "../../../../packages/utils" }
web-sys = { version = "0.3.69", features = ["console"] }
diff --git a/nodes/max/plantarium/branch/Cargo.toml b/nodes/max/plantarium/branch/Cargo.toml
index b38ac0e..1c9122b 100644
--- a/nodes/max/plantarium/branch/Cargo.toml
+++ b/nodes/max/plantarium/branch/Cargo.toml
@@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/float/Cargo.toml b/nodes/max/plantarium/float/Cargo.toml
index 4c570f6..7b24405 100644
--- a/nodes/max/plantarium/float/Cargo.toml
+++ b/nodes/max/plantarium/float/Cargo.toml
@@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/gravity/Cargo.toml b/nodes/max/plantarium/gravity/Cargo.toml
index a38ae47..d70cdd9 100644
--- a/nodes/max/plantarium/gravity/Cargo.toml
+++ b/nodes/max/plantarium/gravity/Cargo.toml
@@ -8,6 +8,6 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
-nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
glam = "0.30.10"
+nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/instance/Cargo.toml b/nodes/max/plantarium/instance/Cargo.toml
index 474eeab..ece0db6 100644
--- a/nodes/max/plantarium/instance/Cargo.toml
+++ b/nodes/max/plantarium/instance/Cargo.toml
@@ -8,6 +8,6 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
-nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
glam = "0.30.10"
+nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/instance/src/input.json b/nodes/max/plantarium/instance/src/input.json
index 6447c51..215946e 100644
--- a/nodes/max/plantarium/instance/src/input.json
+++ b/nodes/max/plantarium/instance/src/input.json
@@ -9,29 +9,29 @@
},
"geometry": {
"type": "geometry",
- "value": [0,0,0]
+ "value": [0, 0, 0]
},
"amount": {
"type": "integer"
},
"lowestInstance": {
"type": "float",
- "min":0,
- "max":1,
+ "min": 0,
+ "max": 1,
"value": 0.5,
"hidden": true
},
"highestInstance": {
"type": "float",
- "min":0,
- "max":1,
- "value":1,
+ "min": 0,
+ "max": 1,
+ "value": 1,
"hidden": true
},
"depth": {
- "type":"integer",
+ "type": "integer",
"min": 1,
- "max":10,
+ "max": 10,
"value": 1,
"hidden": true
}
diff --git a/nodes/max/plantarium/math/Cargo.toml b/nodes/max/plantarium/math/Cargo.toml
index 7424c08..9998837 100644
--- a/nodes/max/plantarium/math/Cargo.toml
+++ b/nodes/max/plantarium/math/Cargo.toml
@@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/noise/Cargo.toml b/nodes/max/plantarium/noise/Cargo.toml
index 478cb3c..4d18f71 100644
--- a/nodes/max/plantarium/noise/Cargo.toml
+++ b/nodes/max/plantarium/noise/Cargo.toml
@@ -8,7 +8,6 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
noise = "0.9.0"
-
diff --git a/nodes/max/plantarium/output/Cargo.toml b/nodes/max/plantarium/output/Cargo.toml
index 010948f..7b84464 100644
--- a/nodes/max/plantarium/output/Cargo.toml
+++ b/nodes/max/plantarium/output/Cargo.toml
@@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/random/Cargo.toml b/nodes/max/plantarium/random/Cargo.toml
index 7edb88d..ba41c88 100644
--- a/nodes/max/plantarium/random/Cargo.toml
+++ b/nodes/max/plantarium/random/Cargo.toml
@@ -7,7 +7,6 @@ edition = "2018"
[lib]
crate-type = ["cdylib", "rlib"]
-
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/rotate/Cargo.toml b/nodes/max/plantarium/rotate/Cargo.toml
index 9b7a219..fc4587c 100644
--- a/nodes/max/plantarium/rotate/Cargo.toml
+++ b/nodes/max/plantarium/rotate/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
-nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
-serde = { version = "1.0", features = ["derive"] }
glam = "0.30.10"
+nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
+serde = { version = "1.0", features = ["derive"] }
diff --git a/nodes/max/plantarium/stem/Cargo.toml b/nodes/max/plantarium/stem/Cargo.toml
index 6556dc9..af195db 100644
--- a/nodes/max/plantarium/stem/Cargo.toml
+++ b/nodes/max/plantarium/stem/Cargo.toml
@@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/triangle/Cargo.toml b/nodes/max/plantarium/triangle/Cargo.toml
index 07f78a9..bb0c95a 100644
--- a/nodes/max/plantarium/triangle/Cargo.toml
+++ b/nodes/max/plantarium/triangle/Cargo.toml
@@ -8,5 +8,5 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
diff --git a/nodes/max/plantarium/vec3/Cargo.toml b/nodes/max/plantarium/vec3/Cargo.toml
index ef8535e..fd730a6 100644
--- a/nodes/max/plantarium/vec3/Cargo.toml
+++ b/nodes/max/plantarium/vec3/Cargo.toml
@@ -8,7 +8,6 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
-nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
+nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
serde = { version = "1.0", features = ["derive"] }
-
diff --git a/package.json b/package.json
index d592f26..e0d3f00 100644
--- a/package.json
+++ b/package.json
@@ -3,8 +3,8 @@
"postinstall": "pnpm run -r --filter 'ui' build",
"build": "pnpm build:nodes && pnpm build:app",
"lint": "pnpm run -r --parallel lint",
- "format": "pnpm run -r format",
- "format:check": "pnpm run -r format:check",
+ "format": "pnpm dprint fmt",
+ "format:check": "pnpm dprint check",
"check": "pnpm run -r check",
"build:story": "pnpm -r --filter 'ui' story:build",
"build:app": "BASE_PATH=/ui pnpm -r --filter 'ui' build && pnpm -r --filter 'app' build",
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 116160b..30f8899 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -2,8 +2,8 @@ packages:
- app
- packages/*
- nodes/**
- - '!**/.template/**'
- - '!**/pkg/**'
+ - "!**/.template/**"
+ - "!**/pkg/**"
catalog:
chokidar-cli: github:open-cli-tools/chokidar-cli#semver:v4.0.0