You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made a simple example of the logic I'd like to use.
I'd like to make an output display Component that can both display a view in which you can perform operations on values and display them via canvas, for example, and a port to transmit these modified values to subsequent nodes. This was possible with version 1 of baklavaJS.
The problem is that as soon as I setPort(true) the Component display view disappears.
The text was updated successfully, but these errors were encountered:
erwanito12
changed the title
"Integration of setPort(true) Causes Disappearance of Display Component View in BaklavaJS v2
"Integration of setPort(true) Causes Disappearance of Display Component View in BaklavaJS v2 label:v2
Jul 24, 2023
erwanito12
changed the title
"Integration of setPort(true) Causes Disappearance of Display Component View in BaklavaJS v2 label:v2
"Integration of setPort(true) Causes Disappearance of Display Component View in BaklavaJS v2
Jul 24, 2023
erwanito12
changed the title
"Integration of setPort(true) Causes Disappearance of Display Component View in BaklavaJS v2
[v2]"Integration of setPort(true) Causes Disappearance of Display Component View in BaklavaJS v2
Jul 24, 2023
I have another problem, I used the example in the documentation. When the display component is in input, it's reactive: the value of modelValue increments when I click, but not in output. How can I make it reactive and send the new value to the output?
`
<button @click="add" >{{ modelValue }}
`import { markRaw } from "vue";
import { NodeInterface, setType } from "baklavajs";
import MyComponent from "./MyComponent.vue";
import { numberType } from "@/interfaceTypes";
export class MyComponentInterface extends NodeInterface {
type: any;
constructor(name: string, value: any) {
super(name, value);
this.setComponent(markRaw(MyComponent));
// this is just an example, the interface types plugin works a bit different
this.use(setType, numberType);
}
}
I've made a simple example of the logic I'd like to use.
I'd like to make an output display Component that can both display a view in which you can perform operations on values and display them via canvas, for example, and a port to transmit these modified values to subsequent nodes. This was possible with version 1 of baklavaJS.
The problem is that as soon as I setPort(true) the Component display view disappears.
export default defineNode({ type: "OutputNode2", inputs: { myCompIn: () => new MyComponentInterface("myComp", 10).setPort(true), text: () => new NodeInterface("Text", "").use(setType, stringType), boolean: () => new CheckboxInterface("Boolean", false).use(setType, booleanType), }, outputs: { myCompOut: () => new MyComponentInterface("myComp", 0).setPort(false), // myComp: () => new NodeInterface("myComp", 0).setPort(true), }, calculate(inputs: any) { console.log(inputs.myCompIn) return {myCompOut: inputs.myCompIn }; }, });
export default defineNode({ type: "OutputNode3", inputs: { // myCompIn: () => new MyComponentInterface("myComp", 10).setPort(true), text: () => new NodeInterface("Text", "").use(setType, stringType), boolean: () => new CheckboxInterface("Boolean", false).use(setType, booleanType), }, outputs: { myCompOut: () => new MyComponentInterface("myComp", 0).setPort(true), // myComp: () => new NodeInterface("myComp", 0).setPort(true), }, calculate(inputs) { console.log(inputs) return {myCompOut: inputs.text}; }, });
The text was updated successfully, but these errors were encountered: