wip
This commit is contained in:
6
nodes/max/plantarium/shape/.gitignore
vendored
Normal file
6
nodes/max/plantarium/shape/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/target
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
bin/
|
||||
pkg/
|
||||
wasm-pack.log
|
||||
12
nodes/max/plantarium/shape/Cargo.toml
Normal file
12
nodes/max/plantarium/shape/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "shape"
|
||||
version = "0.1.0"
|
||||
authors = ["Max Richter <jim-x@web.de>"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
nodarium_macros = { version = "0.1.0", path = "../../../../packages/macros" }
|
||||
nodarium_utils = { version = "0.1.0", path = "../../../../packages/utils" }
|
||||
26
nodes/max/plantarium/shape/src/input.json
Normal file
26
nodes/max/plantarium/shape/src/input.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "max/plantarium/shape",
|
||||
"outputs": [
|
||||
"shape"
|
||||
],
|
||||
"inputs": {
|
||||
"shape": {
|
||||
"type": "shape",
|
||||
"value": [
|
||||
47.8,
|
||||
100,
|
||||
47.8,
|
||||
82.8,
|
||||
30.9,
|
||||
69.1,
|
||||
23.2,
|
||||
40.7,
|
||||
27.1,
|
||||
14.5,
|
||||
42.5,
|
||||
0
|
||||
],
|
||||
"label": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
13
nodes/max/plantarium/shape/src/lib.rs
Normal file
13
nodes/max/plantarium/shape/src/lib.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use nodarium_macros::nodarium_definition_file;
|
||||
use nodarium_macros::nodarium_execute;
|
||||
use nodarium_utils::{concat_args, log, split_args};
|
||||
|
||||
nodarium_definition_file!("src/input.json");
|
||||
|
||||
#[nodarium_execute]
|
||||
pub fn execute(input: &[i32]) -> Vec<i32> {
|
||||
let args = split_args(input);
|
||||
log!("vec3 input: {:?}", input);
|
||||
log!("vec3 args: {:?}", args);
|
||||
concat_args(args)
|
||||
}
|
||||
Reference in New Issue
Block a user