feat: track images with git lfs
2579
Cargo.lock
generated
@ -1,12 +1,6 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"packages/runtime_executor_rust",
|
||||
"nodes/add",
|
||||
"nodes/subtract",
|
||||
"frontend/src-tauri",
|
||||
"packages/node_registry_rust", "nodes/multiply", "packages/node_registry_server",
|
||||
]
|
||||
members = ["app/src-tauri", "nodes/max/plantarium/*", "packages/plantarium"]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
0
frontend/.gitignore → app/.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"name": "@nodes/app",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
@ -13,6 +13,7 @@
|
||||
"story:preview": "histoire preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nodes/input-elements": "link:../packages/input-elements",
|
||||
"@sveltejs/kit": "^2.5.0",
|
||||
"@tauri-apps/api": "2.0.0-beta.2",
|
||||
"@tauri-apps/plugin-shell": "^2.0.0-beta.0",
|
||||
@ -20,13 +21,16 @@
|
||||
"@threlte/extras": "^8.7.5",
|
||||
"@threlte/flex": "^1.0.1",
|
||||
"@types/three": "^0.159.0",
|
||||
"input-elements": "link:../packages/input-elements",
|
||||
"jsondiffpatch": "^0.6.0",
|
||||
"meshline": "^3.2.0",
|
||||
"plantarium-nodes-math": "link:../nodes/math/pkg",
|
||||
"three": "^0.159.0",
|
||||
"three.meshline": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@histoire/plugin-svelte": "^0.17.9",
|
||||
"@nodes/types": "link:../packages/types",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||
"@tauri-apps/cli": "2.0.0-beta.3",
|
||||
@ -38,7 +42,8 @@
|
||||
"svelte-check": "^3.4.6",
|
||||
"tslib": "^2.6.0",
|
||||
"typescript": "^5.0.2",
|
||||
"vite": "^5.0.0",
|
||||
"vite-plugin-glsl": "^1.2.1"
|
||||
"vite": "^5.1.4",
|
||||
"vite-plugin-glsl": "^1.2.1",
|
||||
"vite-plugin-wasm": "^3.3.0"
|
||||
}
|
||||
}
|
@ -16,7 +16,6 @@ tauri-build = { version = "2.0.0-beta", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.0.0-beta", features = [] }
|
||||
runtime_executor_rust = { path = "../../packages/runtime_executor_rust" }
|
||||
tauri-plugin-shell = "2.0.0-beta"
|
||||
serde_json = "1.0"
|
||||
wasmtime = "18.0.1"
|
1
app/src-tauri/gen/schemas/acl-manifests.json
Normal file
@ -11,6 +11,13 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "A list of capabilities.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Capability"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A list of capabilities.",
|
||||
"type": "object",
|
||||
@ -34,8 +41,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"identifier",
|
||||
"permissions",
|
||||
"windows"
|
||||
"permissions"
|
||||
],
|
||||
"properties": {
|
||||
"identifier": {
|
||||
@ -85,15 +91,11 @@
|
||||
}
|
||||
},
|
||||
"platforms": {
|
||||
"description": "Target platforms this capability applies. By default all platforms applies.",
|
||||
"default": [
|
||||
"linux",
|
||||
"macOS",
|
||||
"windows",
|
||||
"android",
|
||||
"iOS"
|
||||
"description": "Target platforms this capability applies. By default all platforms are affected by this capability.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Target"
|
||||
}
|
||||
@ -108,7 +110,7 @@
|
||||
],
|
||||
"properties": {
|
||||
"urls": {
|
||||
"description": "Remote domains this capability refers to. Can use glob patterns.",
|
||||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
@ -139,6 +141,12 @@
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"shell:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -204,7 +212,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"args",
|
||||
"command",
|
||||
"cmd",
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
@ -217,7 +225,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"command": {
|
||||
"cmd": {
|
||||
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
},
|
||||
@ -239,7 +247,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"args",
|
||||
"command",
|
||||
"cmd",
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
@ -252,7 +260,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"command": {
|
||||
"cmd": {
|
||||
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
},
|
||||
@ -415,6 +423,83 @@
|
||||
"event:deny-unlisten"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:default -> Default permissions for the plugin.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-from-bytes -> Enables the from_bytes command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-from-bytes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-from-path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-new -> Enables the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-rgba -> Enables the rgba command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-rgba"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-size -> Enables the size command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-from-bytes -> Denies the from_bytes command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-from-bytes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-from-path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-new -> Denies the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-rgba -> Denies the rgba command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-rgba"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-size -> Denies the size command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "menu:default -> Default permissions for the plugin.",
|
||||
"type": "string",
|
||||
@ -870,6 +955,12 @@
|
||||
"resources:deny-close"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"shell:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -933,6 +1024,13 @@
|
||||
"tray:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-get-by-id -> Enables the get_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:allow-get-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-new -> Enables the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -940,6 +1038,13 @@
|
||||
"tray:allow-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-remove-by-id -> Enables the remove_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:allow-remove-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -996,6 +1101,13 @@
|
||||
"tray:allow-set-visible"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-get-by-id -> Denies the get_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:deny-get-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-new -> Denies the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -1003,6 +1115,13 @@
|
||||
"tray:deny-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-remove-by-id -> Denies the remove_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:deny-remove-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.",
|
||||
"type": "string",
|
@ -11,6 +11,13 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "A list of capabilities.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Capability"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A list of capabilities.",
|
||||
"type": "object",
|
||||
@ -34,8 +41,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"identifier",
|
||||
"permissions",
|
||||
"windows"
|
||||
"permissions"
|
||||
],
|
||||
"properties": {
|
||||
"identifier": {
|
||||
@ -85,15 +91,11 @@
|
||||
}
|
||||
},
|
||||
"platforms": {
|
||||
"description": "Target platforms this capability applies. By default all platforms applies.",
|
||||
"default": [
|
||||
"linux",
|
||||
"macOS",
|
||||
"windows",
|
||||
"android",
|
||||
"iOS"
|
||||
"description": "Target platforms this capability applies. By default all platforms are affected by this capability.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Target"
|
||||
}
|
||||
@ -108,7 +110,7 @@
|
||||
],
|
||||
"properties": {
|
||||
"urls": {
|
||||
"description": "Remote domains this capability refers to. Can use glob patterns.",
|
||||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
@ -139,6 +141,12 @@
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"shell:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -204,7 +212,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"args",
|
||||
"command",
|
||||
"cmd",
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
@ -217,7 +225,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"command": {
|
||||
"cmd": {
|
||||
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
},
|
||||
@ -239,7 +247,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"args",
|
||||
"command",
|
||||
"cmd",
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
@ -252,7 +260,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"command": {
|
||||
"cmd": {
|
||||
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
},
|
||||
@ -415,6 +423,83 @@
|
||||
"event:deny-unlisten"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:default -> Default permissions for the plugin.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-from-bytes -> Enables the from_bytes command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-from-bytes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-from-path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-new -> Enables the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-rgba -> Enables the rgba command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-rgba"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:allow-size -> Enables the size command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:allow-size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-from-bytes -> Denies the from_bytes command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-from-bytes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-from-path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-new -> Denies the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-rgba -> Denies the rgba command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-rgba"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "image:deny-size -> Denies the size command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image:deny-size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "menu:default -> Default permissions for the plugin.",
|
||||
"type": "string",
|
||||
@ -870,6 +955,12 @@
|
||||
"resources:deny-close"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"shell:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -933,6 +1024,13 @@
|
||||
"tray:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-get-by-id -> Enables the get_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:allow-get-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-new -> Enables the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -940,6 +1038,13 @@
|
||||
"tray:allow-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-remove-by-id -> Enables the remove_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:allow-remove-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -996,6 +1101,13 @@
|
||||
"tray:allow-set-visible"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-get-by-id -> Denies the get_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:deny-get-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-new -> Denies the new command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@ -1003,6 +1115,13 @@
|
||||
"tray:deny-new"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-remove-by-id -> Denies the remove_by_id command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"tray:deny-remove-by-id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.",
|
||||
"type": "string",
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 903 B After Width: | Height: | Size: 903 B |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -6,9 +6,8 @@
|
||||
import { onMount, setContext } from "svelte";
|
||||
import Camera from "../Camera.svelte";
|
||||
import GraphView from "./GraphView.svelte";
|
||||
import type { Node, Node as NodeType } from "$lib/types";
|
||||
import type { Node, Node as NodeType, Socket } from "@nodes/types";
|
||||
import FloatingEdge from "../edges/FloatingEdge.svelte";
|
||||
import type { Socket } from "$lib/types";
|
||||
import {
|
||||
activeNodeId,
|
||||
activeSocket,
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { Edge as EdgeType, Node as NodeType } from "$lib/types";
|
||||
import type { Edge as EdgeType, Node as NodeType } from "@nodes/types";
|
||||
import { HTML } from "@threlte/extras";
|
||||
import Edge from "../edges/Edge.svelte";
|
||||
import Node from "../node/Node.svelte";
|
@ -1,5 +1,5 @@
|
||||
import { browser } from "$app/environment";
|
||||
import type { Socket } from "$lib/types";
|
||||
import type { Socket } from "@nodes/types";
|
||||
import { writable, type Writable } from "svelte/store";
|
||||
import { Color } from "three/src/math/Color.js";
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { Node } from "$lib/types";
|
||||
import type { Node } from "@nodes/types";
|
||||
import { getContext, onMount } from "svelte";
|
||||
import NodeHeader from "./NodeHeader.svelte";
|
||||
import NodeParameter from "./NodeParameter.svelte";
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { createNodePath } from "$lib/helpers";
|
||||
import type { Node, Socket } from "$lib/types";
|
||||
import type { Node, Socket } from "@nodes/types";
|
||||
import { getContext } from "svelte";
|
||||
|
||||
export let node: Node;
|
21
app/src/lib/components/node/NodeInput.svelte
Normal file
@ -0,0 +1,21 @@
|
||||
<script lang="ts">
|
||||
import type { Node, NodeInput } from "@nodes/types";
|
||||
import { getGraphManager } from "../graph/context";
|
||||
import Input from "@nodes/input-elements";
|
||||
|
||||
export let node: Node;
|
||||
export let input: NodeInput;
|
||||
export let id: string;
|
||||
|
||||
const graph = getGraphManager();
|
||||
|
||||
let value = node?.props?.[id] ?? input.value;
|
||||
|
||||
$: if (node?.props?.[id] !== value) {
|
||||
node.props = { ...node.props, [id]: value };
|
||||
graph.execute();
|
||||
}
|
||||
</script>
|
||||
|
||||
<label for="asd">{id}</label>
|
||||
<Input {input} bind:value />
|
@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { NodeInput as NodeInputType, Socket } from "$lib/types";
|
||||
import type { Node } from "$lib/types";
|
||||
import type { NodeInput as NodeInputType, Socket, Node } from "@nodes/types";
|
||||
import { getContext } from "svelte";
|
||||
import { createNodePath } from "$lib/helpers";
|
||||
import { possibleSocketIds } from "../graph/stores";
|
@ -1,5 +1,5 @@
|
||||
import { writable, type Writable } from "svelte/store";
|
||||
import { type Graph, type Node, type Edge, type Socket, type NodeRegistry, type RuntimeExecutor, } from "./types";
|
||||
import type { Graph, Node, Edge, Socket, NodeRegistry, RuntimeExecutor, } from "@nodes/s";
|
||||
import { HistoryManager } from "./history-manager";
|
||||
import * as templates from "./graphs";
|
||||
import EventEmitter from "./helpers/EventEmitter";
|
@ -1,4 +1,4 @@
|
||||
import type { Graph } from "$lib/types";
|
||||
import type { Graph } from "@nodes/types";
|
||||
|
||||
export function grid(width: number, height: number) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Graph, Node } from "$lib/types";
|
||||
import type { Graph, Node } from "@nodes/types";
|
||||
|
||||
export function tree(depth: number): Graph {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { create, type Delta } from "jsondiffpatch";
|
||||
import type { Graph } from "./types";
|
||||
import type { Graph } from "@nodes/types";
|
||||
import { createLogger, clone } from "./helpers";
|
||||
|
||||
|
39
app/src/lib/node-registry.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import type { NodeRegistry, NodeType } from "@nodes/types";
|
||||
|
||||
import * as d from "plantarium-nodes-math";
|
||||
|
||||
const nodeTypes: NodeType[] = [
|
||||
{
|
||||
id: "input/float",
|
||||
inputs: {
|
||||
"value": { type: "float", value: 0.1, internal: true },
|
||||
},
|
||||
outputs: ["float"],
|
||||
execute: ({ value }) => { return value }
|
||||
},
|
||||
{
|
||||
id: d.get_id(),
|
||||
inputs: JSON.parse(d.get_input_types()),
|
||||
outputs: d.get_outputs(),
|
||||
execute: ({ op_type, a, b }) => {
|
||||
return d.execute(op_type, a, b);
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "output",
|
||||
inputs: {
|
||||
"input": { type: "float" },
|
||||
},
|
||||
outputs: [],
|
||||
}
|
||||
]
|
||||
|
||||
export class MemoryNodeRegistry implements NodeRegistry {
|
||||
getNode(id: string): NodeType | undefined {
|
||||
return nodeTypes.find((nodeType) => nodeType.id === id);
|
||||
}
|
||||
getAllNodes(): NodeType[] {
|
||||
return [...nodeTypes];
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
import type { Graph, NodeRegistry, NodeType, RuntimeExecutor } from "./types";
|
||||
import type { Graph, NodeRegistry, NodeType, RuntimeExecutor } from "@nodes/types";
|
||||
|
||||
export class MemoryRuntimeExecutor implements RuntimeExecutor {
|
||||
|
||||
constructor(private registry: NodeRegistry) { }
|
||||
|
||||
private getNodeTypes(graph: Graph) {
|
||||
|
||||
const typeMap = new Map<string, NodeType>();
|
||||
for (const node of graph.nodes) {
|
||||
if (!typeMap.has(node.type)) {
|
||||
@ -16,12 +15,9 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor {
|
||||
}
|
||||
}
|
||||
return typeMap;
|
||||
|
||||
|
||||
}
|
||||
|
||||
addMetaData(graph: Graph) {
|
||||
|
||||
private addMetaData(graph: Graph) {
|
||||
|
||||
// First, lets check if all nodes have a type
|
||||
const typeMap = this.getNodeTypes(graph);
|
@ -5,7 +5,7 @@
|
||||
import { MemoryRuntimeExecutor } from "$lib/runtime-executor";
|
||||
import { MemoryNodeRegistry } from "$lib/node-registry";
|
||||
import { LinearSRGBColorSpace } from "three";
|
||||
import Details from "$lib/elements/Details.svelte";
|
||||
import Details from "$lib/components/Details.svelte";
|
||||
import { JsonView } from "@zerodevx/svelte-json-view";
|
||||
|
||||
const nodeRegistry = new MemoryNodeRegistry();
|
||||
@ -37,7 +37,7 @@
|
||||
<br />
|
||||
<button
|
||||
on:click={() =>
|
||||
graphManager.load(graphManager.createTemplate("grid", 10, 10))}
|
||||
graphManager.load(graphManager.createTemplate("grid", 3, 3))}
|
||||
>load grid</button
|
||||
>
|
||||
<br />
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1,9 +1,10 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import glsl from "vite-plugin-glsl";
|
||||
import wasm from "vite-plugin-wasm";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [sveltekit(), glsl()],
|
||||
plugins: [sveltekit(), glsl(), wasm()],
|
||||
ssr: {
|
||||
noExternal: ['three'],
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{package.json,*.yml,*.cjson}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
@ -1,3 +0,0 @@
|
||||
dist
|
||||
.output
|
||||
node-modules
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"@nuxtjs/eslint-config-typescript"
|
||||
]
|
||||
}
|
7
backend/.gitignore
vendored
@ -1,7 +0,0 @@
|
||||
node_modules
|
||||
*.log*
|
||||
.nitro
|
||||
.cache
|
||||
.output
|
||||
.env
|
||||
dist
|
@ -1,2 +0,0 @@
|
||||
shamefully-hoist=true
|
||||
strict-peer-dependencies=false
|
@ -1,42 +0,0 @@
|
||||
# Nitro Minimal Starter
|
||||
|
||||
Look at the [Nitro documentation](https://nitro.unjs.io/) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install the dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on <http://localhost:3000>
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
npm run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nitro.unjs.io/deploy) for more information.
|
@ -1,2 +0,0 @@
|
||||
//https://nitro.unjs.io/config
|
||||
export default defineNitroConfig({});
|