From c79278bfe6c27ba89f7fcdfe7c71bc40cefbaa6e Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Mon, 24 Jul 2023 22:15:03 -0400 Subject: [PATCH] rename IGraphAPI to IGraph --- packages/core/src/Graphs/Graph.ts | 6 +++--- .../core/src/Graphs/IO/readGraphFromJSON.ts | 4 ++-- packages/core/src/Nodes/AsyncNode.ts | 6 +++--- packages/core/src/Nodes/EventNode.ts | 6 +++--- packages/core/src/Nodes/FlowNode.ts | 6 +++--- packages/core/src/Nodes/FunctionNode.ts | 4 ++-- packages/core/src/Nodes/Node.ts | 4 ++-- packages/core/src/Nodes/NodeDefinitions.ts | 17 +++++++---------- packages/core/src/Nodes/NodeInstance.ts | 4 ++-- .../core/src/Nodes/Registry/NodeDescription.ts | 4 ++-- packages/core/src/Nodes/nodeFactory.ts | 8 ++++---- packages/core/src/Nodes/testUtils.ts | 10 +++++----- .../Profiles/Core/CustomEvents/OnCustomEvent.ts | 4 ++-- .../Core/CustomEvents/TriggerCustomEvent.ts | 4 ++-- .../src/Profiles/Core/Debug/AssertExpectTrue.ts | 4 ++-- .../core/src/Profiles/Core/Flow/Debounce.ts | 4 ++-- .../core/src/Profiles/Core/Flow/Throttle.ts | 4 ++-- packages/core/src/Profiles/Core/Flow/WaitAll.ts | 4 ++-- packages/core/src/Profiles/Core/Time/Delay.ts | 4 ++-- .../src/Nodes/Actions/EaseSceneProperty.ts | 4 ++-- packages/scene/src/Nodes/Logic/VecElements.ts | 4 ++-- .../generate-pages-from-registry.ts | 4 ++-- 22 files changed, 58 insertions(+), 61 deletions(-) diff --git a/packages/core/src/Graphs/Graph.ts b/packages/core/src/Graphs/Graph.ts index 7ca529cf..7c894dbe 100644 --- a/packages/core/src/Graphs/Graph.ts +++ b/packages/core/src/Graphs/Graph.ts @@ -12,7 +12,7 @@ import { Variable } from '../Values/Variables/Variable.js'; // Purpose: // - stores the node graph -export interface IGraphApi { +export interface IGraph { readonly variables: { [id: string]: Variable }; readonly customEvents: { [id: string]: CustomEvent }; readonly values: ValueTypeMap; @@ -37,7 +37,7 @@ export const createNode = ({ nodeTypeName, nodeConfiguration = {} }: { - graph: IGraphApi; + graph: IGraph; registry: IRegistry; nodeTypeName: string; nodeConfiguration?: NodeConfiguration; @@ -74,7 +74,7 @@ export const makeGraphApi = ({ variables?: GraphVariables; values: ValueTypeMap; dependencies: Dependencies; -}): IGraphApi => ({ +}): IGraph => ({ variables, customEvents, values, diff --git a/packages/core/src/Graphs/IO/readGraphFromJSON.ts b/packages/core/src/Graphs/IO/readGraphFromJSON.ts index 4c0fddae..d81cb5df 100644 --- a/packages/core/src/Graphs/IO/readGraphFromJSON.ts +++ b/packages/core/src/Graphs/IO/readGraphFromJSON.ts @@ -13,7 +13,7 @@ import { GraphInstance, GraphNodes, GraphVariables, - IGraphApi, + IGraph, makeGraphApi } from '../Graph.js'; import { @@ -167,7 +167,7 @@ function readNodeJSON({ registry, nodeJson }: { - graph: IGraphApi; + graph: IGraph; registry: IRegistry; nodeJson: NodeJSON; }) { diff --git a/packages/core/src/Nodes/AsyncNode.ts b/packages/core/src/Nodes/AsyncNode.ts index c8c51373..e5144fa1 100644 --- a/packages/core/src/Nodes/AsyncNode.ts +++ b/packages/core/src/Nodes/AsyncNode.ts @@ -1,6 +1,6 @@ import { Assert } from '../Diagnostics/Assert.js'; import { Engine } from '../Execution/Engine.js'; -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { Node, NodeConfiguration } from './Node.js'; import { IAsyncNodeDefinition, NodeCategory } from './NodeDefinitions.js'; @@ -11,7 +11,7 @@ import { NodeDescription } from './Registry/NodeDescription.js'; export class AsyncNode extends Node { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, inputs: Socket[] = [], outputs: Socket[] = [], configuration: NodeConfiguration = {} @@ -56,7 +56,7 @@ export class AsyncNode extends Node { export class AsyncNode2 extends AsyncNode { constructor(props: { description: NodeDescription; - graph: IGraphApi; + graph: IGraph; inputs?: Socket[]; outputs?: Socket[]; }) { diff --git a/packages/core/src/Nodes/EventNode.ts b/packages/core/src/Nodes/EventNode.ts index bfe718b2..87c68639 100644 --- a/packages/core/src/Nodes/EventNode.ts +++ b/packages/core/src/Nodes/EventNode.ts @@ -1,6 +1,6 @@ import { Assert } from '../Diagnostics/Assert.js'; import { Engine } from '../Execution/Engine.js'; -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { Node, NodeConfiguration } from './Node.js'; import { IEventNodeDefinition, NodeCategory } from './NodeDefinitions.js'; @@ -11,7 +11,7 @@ import { NodeDescription } from './Registry/NodeDescription.js'; export class EventNode extends Node implements IEventNode { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, inputs: Socket[] = [], outputs: Socket[] = [], configuration: NodeConfiguration = {} @@ -53,7 +53,7 @@ export class EventNode extends Node implements IEventNode { export class EventNode2 extends EventNode { constructor(props: { description: NodeDescription; - graph: IGraphApi; + graph: IGraph; inputs?: Socket[]; outputs?: Socket[]; configuration?: NodeConfiguration; diff --git a/packages/core/src/Nodes/FlowNode.ts b/packages/core/src/Nodes/FlowNode.ts index af07b4dd..a74e3775 100644 --- a/packages/core/src/Nodes/FlowNode.ts +++ b/packages/core/src/Nodes/FlowNode.ts @@ -1,6 +1,6 @@ import { Assert } from '../Diagnostics/Assert.js'; import { Fiber } from '../Execution/Fiber.js'; -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { Node, NodeConfiguration } from './Node.js'; import { IFlowNodeDefinition, NodeCategory } from './NodeDefinitions.js'; @@ -10,7 +10,7 @@ import { NodeDescription } from './Registry/NodeDescription.js'; export class FlowNode extends Node implements IFlowNode { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, inputs: Socket[] = [], outputs: Socket[] = [], configuration: NodeConfiguration = {} @@ -43,7 +43,7 @@ export class FlowNode extends Node implements IFlowNode { export class FlowNode2 extends FlowNode { constructor(props: { description: NodeDescription; - graph: IGraphApi; + graph: IGraph; inputs?: Socket[]; outputs?: Socket[]; configuration?: NodeConfiguration; diff --git a/packages/core/src/Nodes/FunctionNode.ts b/packages/core/src/Nodes/FunctionNode.ts index 54e076f9..960379a8 100644 --- a/packages/core/src/Nodes/FunctionNode.ts +++ b/packages/core/src/Nodes/FunctionNode.ts @@ -1,5 +1,5 @@ import { Assert } from '../Diagnostics/Assert.js'; -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { Node, NodeConfiguration } from './Node.js'; import { @@ -19,7 +19,7 @@ export abstract class FunctionNode { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, inputs: Socket[] = [], outputs: Socket[] = [], public readonly exec: (node: INode) => void, diff --git a/packages/core/src/Nodes/Node.ts b/packages/core/src/Nodes/Node.ts index 13bcd0aa..cf097e2a 100644 --- a/packages/core/src/Nodes/Node.ts +++ b/packages/core/src/Nodes/Node.ts @@ -1,4 +1,4 @@ -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { INode, NodeType } from './NodeInstance.js'; import { readInputFromSockets, writeOutputsToSocket } from './NodeSockets.js'; @@ -15,7 +15,7 @@ export abstract class Node implements INode { // public typeName: string; public nodeType: TNodeType; public readonly otherTypeNames: string[] | undefined; - public graph: IGraphApi; + public graph: IGraph; public label?: string; public metadata: any; public readonly configuration: NodeConfiguration; diff --git a/packages/core/src/Nodes/NodeDefinitions.ts b/packages/core/src/Nodes/NodeDefinitions.ts index 2c260de3..795ea9fe 100644 --- a/packages/core/src/Nodes/NodeDefinitions.ts +++ b/packages/core/src/Nodes/NodeDefinitions.ts @@ -1,4 +1,4 @@ -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Choices } from '../Sockets/Socket.js'; import { AsyncNodeInstance } from './AsyncNode.js'; import { EventNodeInstance } from './EventNode.js'; @@ -21,22 +21,19 @@ export type SocketsMap = Record< string, | SocketDefinition | string - | ((nodeConfig: NodeConfiguration, graph: IGraphApi) => SocketDefinition) + | ((nodeConfig: NodeConfiguration, graph: IGraph) => SocketDefinition) >; export type SocketListDefinition = SocketDefinition & { key: string }; export type SocketsList = SocketListDefinition[]; export type SocketsGeneratorFromConfig = ( nodeConfig: NodeConfiguration, - graph: IGraphApi + graph: IGraph ) => SocketsList; export type SocketsDefinition = SocketsMap | SocketsGeneratorFromConfig; -export type NodeFactory = ( - graph: IGraphApi, - config: NodeConfiguration -) => INode; +export type NodeFactory = (graph: IGraph, config: NodeConfiguration) => INode; export interface IHasNodeFactory { readonly nodeFactory: NodeFactory; @@ -81,7 +78,7 @@ export type TriggeredFn< // state of the node. state: TState; - graph: IGraphApi; + graph: IGraph; configuration: NodeConfiguration; finished?: () => void; }) => StateReturn; @@ -124,7 +121,7 @@ export interface IHasInit< } export interface IHasDispose { - dispose: (params: { state: TState; graph: IGraphApi }) => StateReturn; + dispose: (params: { state: TState; graph: IGraph }) => StateReturn; } export interface IFlowNodeDefinition< @@ -161,7 +158,7 @@ export interface FunctionNodeExecParams< // write and commit only allows keys from the output type write(outValueName: SocketNames, value: T): void; - graph: IGraphApi; + graph: IGraph; configuration: NodeConfiguration; } diff --git a/packages/core/src/Nodes/NodeInstance.ts b/packages/core/src/Nodes/NodeInstance.ts index 6c3227f9..5b50a564 100644 --- a/packages/core/src/Nodes/NodeInstance.ts +++ b/packages/core/src/Nodes/NodeInstance.ts @@ -1,6 +1,6 @@ import { Engine } from '../Execution/Engine.js'; import { Fiber } from '../Execution/Fiber.js'; -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { NodeConfiguration } from './Node.js'; import { readInputFromSockets, writeOutputsToSocket } from './NodeSockets.js'; @@ -16,7 +16,7 @@ export enum NodeType { export interface INode { readonly inputs: Socket[]; readonly outputs: Socket[]; - readonly graph: IGraphApi; + readonly graph: IGraph; description: INodeDescription; configuration: NodeConfiguration; nodeType: NodeType; diff --git a/packages/core/src/Nodes/Registry/NodeDescription.ts b/packages/core/src/Nodes/Registry/NodeDescription.ts index 7c8acabf..19c9316e 100644 --- a/packages/core/src/Nodes/Registry/NodeDescription.ts +++ b/packages/core/src/Nodes/Registry/NodeDescription.ts @@ -1,4 +1,4 @@ -import { IGraphApi } from '../../Graphs/Graph.js'; +import { IGraph } from '../../Graphs/Graph.js'; import { IHasNodeFactory, INodeDefinition, @@ -32,7 +32,7 @@ export interface INodeDescription { export type NodeFactoryWithDescription = ( entry: NodeDescription, - graph: IGraphApi, + graph: IGraph, config: NodeConfiguration ) => INode; diff --git a/packages/core/src/Nodes/nodeFactory.ts b/packages/core/src/Nodes/nodeFactory.ts index e6e7bcb3..053823a1 100644 --- a/packages/core/src/Nodes/nodeFactory.ts +++ b/packages/core/src/Nodes/nodeFactory.ts @@ -1,4 +1,4 @@ -import { IGraphApi } from '../Graphs/Graph.js'; +import { IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { NodeConfiguration } from './Node.js'; import { @@ -20,7 +20,7 @@ const makeSocketsFromMap = ( socketConfig: TSockets, keys: (keyof TSockets)[], configuration: NodeConfiguration, - graphApi: IGraphApi + graphApi: IGraph ): Socket[] => { return keys.map((key) => { const definition = socketConfig[key]; @@ -50,7 +50,7 @@ const makeSocketsFromArray = (sockets: SocketsList) => export function makeOrGenerateSockets( socketConfigOrFactory: SocketsDefinition, nodeConfig: NodeConfiguration, - graph: IGraphApi + graph: IGraph ): Socket[] { // if sockets definition is dynamic, then use the node config to generate it; // otherwise, use the static definition @@ -91,7 +91,7 @@ export const makeCommonProps = ( | 'label' >, configuration: NodeConfiguration, - graph: IGraphApi + graph: IGraph ): INode => ({ description: { typeName: typeName, diff --git a/packages/core/src/Nodes/testUtils.ts b/packages/core/src/Nodes/testUtils.ts index 3c1bd345..2593d83e 100644 --- a/packages/core/src/Nodes/testUtils.ts +++ b/packages/core/src/Nodes/testUtils.ts @@ -1,4 +1,4 @@ -import { IGraphApi, makeGraphApi } from '../Graphs/Graph.js'; +import { IGraph, makeGraphApi } from '../Graphs/Graph.js'; import { NodeConfiguration } from './Node.js'; import { IFunctionNodeDefinition, @@ -9,7 +9,7 @@ import { import { makeOrGenerateSockets } from './nodeFactory.js'; import { NodeConfigurationDescription } from './Registry/NodeDescription.js'; -const makeEmptyGraph = (): IGraphApi => { +const makeEmptyGraph = (): IGraph => { return makeGraphApi({ dependencies: {}, values: {} @@ -39,7 +39,7 @@ export const testExec = < configuration?: NodeConfiguration; /** Simulated input values the input sockets have */ nodeInputVals?: SocketValues; - makeGraph?: () => IGraphApi; + makeGraph?: () => IGraph; }): SocketValues => { const outputs: SocketValues = {}; @@ -91,7 +91,7 @@ export const generateTriggerTester = < /** Triggered function from the node defintion */ /** Runtime configuration of the node */ configuration?: NodeConfiguration; - makeGraph?: () => IGraphApi; + makeGraph?: () => IGraph; } & Pick< IHasTriggered, 'initialState' | 'triggered' @@ -167,7 +167,7 @@ function getOutputSocketKeys({ }: { outputs: TSockets; config: NodeConfiguration; - graph: IGraphApi; + graph: IGraph; }): SocketNames[] { const sockets = makeOrGenerateSockets(outputs, config, graph); diff --git a/packages/core/src/Profiles/Core/CustomEvents/OnCustomEvent.ts b/packages/core/src/Profiles/Core/CustomEvents/OnCustomEvent.ts index 31a82a72..85dea1e1 100644 --- a/packages/core/src/Profiles/Core/CustomEvents/OnCustomEvent.ts +++ b/packages/core/src/Profiles/Core/CustomEvents/OnCustomEvent.ts @@ -1,7 +1,7 @@ import { Assert } from '../../../Diagnostics/Assert.js'; import { CustomEvent } from '../../../Events/CustomEvent.js'; import { Engine } from '../../../Execution/Engine.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { EventNode2 } from '../../../Nodes/EventNode.js'; import { NodeConfiguration } from '../../../Nodes/Node.js'; import { @@ -29,7 +29,7 @@ export class OnCustomEvent extends EventNode2 { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, configuration: NodeConfiguration ) { const customEvent = diff --git a/packages/core/src/Profiles/Core/CustomEvents/TriggerCustomEvent.ts b/packages/core/src/Profiles/Core/CustomEvents/TriggerCustomEvent.ts index 1d5acaa1..c7c12347 100644 --- a/packages/core/src/Profiles/Core/CustomEvents/TriggerCustomEvent.ts +++ b/packages/core/src/Profiles/Core/CustomEvents/TriggerCustomEvent.ts @@ -1,6 +1,6 @@ import { CustomEvent } from '../../../Events/CustomEvent.js'; import { Fiber } from '../../../Execution/Fiber.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { FlowNode2 } from '../../../Nodes/FlowNode.js'; import { NodeConfiguration } from '../../../Nodes/Node.js'; import { @@ -28,7 +28,7 @@ export class TriggerCustomEvent extends FlowNode2 { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, configuration: NodeConfiguration ) { const customEvent = diff --git a/packages/core/src/Profiles/Core/Debug/AssertExpectTrue.ts b/packages/core/src/Profiles/Core/Debug/AssertExpectTrue.ts index f0bb110b..5d720338 100644 --- a/packages/core/src/Profiles/Core/Debug/AssertExpectTrue.ts +++ b/packages/core/src/Profiles/Core/Debug/AssertExpectTrue.ts @@ -1,6 +1,6 @@ import { Assert } from '../../../Diagnostics/Assert.js'; import { Fiber } from '../../../Execution/Fiber.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { FlowNode } from '../../../Nodes/FlowNode.js'; import { NodeDescription } from '../../../Nodes/Registry/NodeDescription.js'; import { Socket } from '../../../Sockets/Socket.js'; @@ -13,7 +13,7 @@ export class ExpectTrue extends FlowNode { (description, graph) => new ExpectTrue(description, graph) ); - constructor(description: NodeDescription, graph: IGraphApi) { + constructor(description: NodeDescription, graph: IGraph) { super( description, graph, diff --git a/packages/core/src/Profiles/Core/Flow/Debounce.ts b/packages/core/src/Profiles/Core/Flow/Debounce.ts index e4c53b22..def42214 100644 --- a/packages/core/src/Profiles/Core/Flow/Debounce.ts +++ b/packages/core/src/Profiles/Core/Flow/Debounce.ts @@ -1,5 +1,5 @@ import { Engine } from '../../../Execution/Engine.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { AsyncNode } from '../../../Nodes/AsyncNode.js'; import { NodeDescription } from '../../../Nodes/Registry/NodeDescription.js'; import { Socket } from '../../../Sockets/Socket.js'; @@ -15,7 +15,7 @@ export class Debounce extends AsyncNode { (description, graph) => new Debounce(description, graph) ); - constructor(description: NodeDescription, graph: IGraphApi) { + constructor(description: NodeDescription, graph: IGraph) { super( description, graph, diff --git a/packages/core/src/Profiles/Core/Flow/Throttle.ts b/packages/core/src/Profiles/Core/Flow/Throttle.ts index 24c1f80b..bfe56983 100644 --- a/packages/core/src/Profiles/Core/Flow/Throttle.ts +++ b/packages/core/src/Profiles/Core/Flow/Throttle.ts @@ -1,6 +1,6 @@ import { Assert } from '../../../Diagnostics/Assert.js'; import { Engine } from '../../../Execution/Engine.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { AsyncNode } from '../../../Nodes/AsyncNode.js'; import { NodeDescription } from '../../../Nodes/Registry/NodeDescription.js'; import { Socket } from '../../../Sockets/Socket.js'; @@ -15,7 +15,7 @@ export class Throttle extends AsyncNode { (description, graph) => new Throttle(description, graph) ); - constructor(description: NodeDescription, graph: IGraphApi) { + constructor(description: NodeDescription, graph: IGraph) { super( description, graph, diff --git a/packages/core/src/Profiles/Core/Flow/WaitAll.ts b/packages/core/src/Profiles/Core/Flow/WaitAll.ts index c867f145..a209682b 100644 --- a/packages/core/src/Profiles/Core/Flow/WaitAll.ts +++ b/packages/core/src/Profiles/Core/Flow/WaitAll.ts @@ -1,5 +1,5 @@ import { Fiber } from '../../../Execution/Fiber.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { FlowNode } from '../../../Nodes/FlowNode.js'; import { NodeDescription, @@ -27,7 +27,7 @@ export class WaitAll extends FlowNode { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, private numInputs: number ) { const inputs: Socket[] = []; diff --git a/packages/core/src/Profiles/Core/Time/Delay.ts b/packages/core/src/Profiles/Core/Time/Delay.ts index 6f659af6..960c6661 100644 --- a/packages/core/src/Profiles/Core/Time/Delay.ts +++ b/packages/core/src/Profiles/Core/Time/Delay.ts @@ -1,5 +1,5 @@ import { Engine } from '../../../Execution/Engine.js'; -import { IGraphApi } from '../../../Graphs/Graph.js'; +import { IGraph } from '../../../Graphs/Graph.js'; import { AsyncNode } from '../../../Nodes/AsyncNode.js'; import { NodeDescription, @@ -19,7 +19,7 @@ export class Delay extends AsyncNode { factory: (description, graph) => new Delay(description, graph) }); - constructor(description: NodeDescription, graph: IGraphApi) { + constructor(description: NodeDescription, graph: IGraph) { super( description, graph, diff --git a/packages/scene/src/Nodes/Actions/EaseSceneProperty.ts b/packages/scene/src/Nodes/Actions/EaseSceneProperty.ts index 2ea71c7b..8f8ddbf5 100644 --- a/packages/scene/src/Nodes/Actions/EaseSceneProperty.ts +++ b/packages/scene/src/Nodes/Actions/EaseSceneProperty.ts @@ -4,7 +4,7 @@ import { EasingFunctions, EasingModes, Engine, - IGraphApi, + IGraph, ILifecycleEventEmitter, NodeDescription, Socket, @@ -39,7 +39,7 @@ export class EaseSceneProperty extends AsyncNode { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, public readonly valueTypeName: string, private readonly scene: IScene, private readonly lifecycleEventEmitter: ILifecycleEventEmitter diff --git a/packages/scene/src/Nodes/Logic/VecElements.ts b/packages/scene/src/Nodes/Logic/VecElements.ts index 605c649f..7bad3a56 100644 --- a/packages/scene/src/Nodes/Logic/VecElements.ts +++ b/packages/scene/src/Nodes/Logic/VecElements.ts @@ -1,6 +1,6 @@ import { FunctionNode, - IGraphApi, + IGraph, NodeDescription, Socket } from '@behave-graph/core'; @@ -8,7 +8,7 @@ import { export class VecElements extends FunctionNode { constructor( description: NodeDescription, - graph: IGraphApi, + graph: IGraph, valueTypeName: string, elementNames: string[] = ['x', 'y', 'z', 'w'], toArray: (value: T, array: number[], offset: number) => void diff --git a/website/scripts/generate-dynamic-pages/generate-pages-from-registry.ts b/website/scripts/generate-dynamic-pages/generate-pages-from-registry.ts index cc5348fb..5ae331d5 100644 --- a/website/scripts/generate-dynamic-pages/generate-pages-from-registry.ts +++ b/website/scripts/generate-dynamic-pages/generate-pages-from-registry.ts @@ -3,7 +3,7 @@ import { dirname, join } from 'node:path'; import { Graph, - IGraphApi, + IGraph, NodeDefinition, NodeSpecJSON, Registry, @@ -72,7 +72,7 @@ const generateNodePages = ( nodes: NodeDefinition[], baseDir: string, nodeSpecJson: NodeSpecJSON[], - graph: IGraphApi + graph: IGraph ) => { const nodesDir = join(baseDir, 'Nodes'); if (!existsSync(nodesDir)) {