Skip to content

package render_graph_workspace

import "kaijuengine.com/editor/editor_workspace/render_graph_workspace"

Constants

ID

"renderGraph"

DisplayName

"Render Graph"

ActionRenderGraphShowCreateNodeMenu

editor_action

ActionRenderGraphCreateNode

editor_action

ActionRenderGraphCreateComment

editor_action

ActionRenderGraphCenterView

editor_action

ActionRenderGraphFocusSelection

editor_action

ActionRenderGraphSave

editor_action

ActionRenderGraphDeleteSelection

editor_action

Functions

CreateNodeActionVariants

func CreateNodeActionVariants() []editor_action.Variant

SerializeRenderGraphDocument

func SerializeRenderGraphDocument(document RenderGraphDocument) ([]byte, error)

Types

CreateCommentActionArgs

struct

type CreateCommentActionArgs struct {
    Label       string  `json:"label,omitempty"`
    X           float32 `json:"x,omitempty"`
    Y           float32 `json:"y,omitempty"`
    Width       float32 `json:"width,omitempty"`
    Height      float32 `json:"height,omitempty"`
    UsePosition bool    `json:"usePosition,omitempty"`
    UseSize     bool    `json:"useSize,omitempty"`
}

DefaultCreateCommentActionArgs

func DefaultCreateCommentActionArgs() CreateCommentActionArgs

CreateNodeActionArgs

struct

type CreateNodeActionArgs struct {
    NodeID            string  `json:"nodeId"`
    X                 float32 `json:"x,omitempty"`
    Y                 float32 `json:"y,omitempty"`
    UsePosition       bool    `json:"usePosition,omitempty"`
    UseConnection     bool    `json:"useConnection,omitempty"`
    ConnectFromNodeID string  `json:"connectFromNodeId,omitempty"`
    ConnectFromPort   int     `json:"connectFromPort,omitempty"`
    ConnectFromOutput bool    `json:"connectFromOutput,omitempty"`
    ConnectFromType   string  `json:"connectFromType,omitempty"`
}

DefaultCreateNodeActionArgs

func DefaultCreateNodeActionArgs() CreateNodeActionArgs

RenderGraphComment

struct

type RenderGraphComment struct {
    ID       string      `json:"id"`
    Label    string      `json:"label,omitempty"`
    Position matrix.Vec2 `json:"position"`
    Size     matrix.Vec2 `json:"size"`
}

RenderGraphConnection

struct

type RenderGraphConnection struct {
    Output RenderGraphPortRef `json:"output"`
    Input  RenderGraphPortRef `json:"input"`
}

RenderGraphDocument

struct

type RenderGraphDocument struct {
    Version     int                     `json:"version"`
    Name        string                  `json:"name,omitempty"`
    Pan         matrix.Vec2             `json:"pan,omitempty"`
    Zoom        matrix.Float            `json:"zoom,omitempty"`
    Generated   *RenderGraphGenerated   `json:"generated,omitempty"`
    Nodes       []RenderGraphNode       `json:"nodes"`
    Comments    []RenderGraphComment    `json:"comments,omitempty"`
    Connections []RenderGraphConnection `json:"connections,omitempty"`
}

DeserializeRenderGraphDocument

func DeserializeRenderGraphDocument(data []byte) (RenderGraphDocument, error)

RenderGraphFieldValue

struct

type RenderGraphFieldValue struct {
    Text   string        `json:"text,omitempty"`
    Parts  []string      `json:"parts,omitempty"`
    Bool   *bool         `json:"bool,omitempty"`
    Color  *matrix.Color `json:"color,omitempty"`
    Option string        `json:"option,omitempty"`
}

RenderGraphGenerated

struct

type RenderGraphGenerated struct {
    ShaderID           string `json:"shaderId,omitempty"`
    MaterialID         string `json:"materialId,omitempty"`
    VertexSpvID        string `json:"vertexSpvId,omitempty"`
    VertexSourcePath   string `json:"vertexSourcePath,omitempty"`
    FragmentSpvID      string `json:"fragmentSpvId,omitempty"`
    FragmentSourcePath string `json:"fragmentSourcePath,omitempty"`
}

RenderGraphGenerated.IsZero

func (g RenderGraphGenerated) IsZero() bool

RenderGraphNode

struct

type RenderGraphNode struct {
    ID       string                           `json:"id"`
    Type     string                           `json:"type"`
    Position matrix.Vec2                      `json:"position"`
    Values   map[string]RenderGraphFieldValue `json:"values,omitempty"`
}

RenderGraphPortRef

struct

type RenderGraphPortRef struct {
    Node string `json:"node"`
    Port int    `json:"port"`
}

RenderGraphWorkspace

struct

type RenderGraphWorkspace struct {
    common_workspace.CommonWorkspace

    // Has unexported fields.
}

RenderGraphWorkspace.CenterView

func (w *RenderGraphWorkspace) CenterView()

RenderGraphWorkspace.Close

func (w *RenderGraphWorkspace) Close()

RenderGraphWorkspace.CreateCommentFromAction

func (w *RenderGraphWorkspace) CreateCommentFromAction(args CreateCommentActionArgs) (*renderGraphComment, bool)

RenderGraphWorkspace.CreateNodeFromAction

func (w *RenderGraphWorkspace) CreateNodeFromAction(args CreateNodeActionArgs) (*renderGraphNode, bool)

RenderGraphWorkspace.DeleteSelectedNodes

func (w *RenderGraphWorkspace) DeleteSelectedNodes() bool

RenderGraphWorkspace.DeserializeGraph

func (w *RenderGraphWorkspace) DeserializeGraph(data []byte) error

RenderGraphWorkspace.DisplayName

func (w *RenderGraphWorkspace) DisplayName() string

RenderGraphWorkspace.FocusSelectedNodes

func (w *RenderGraphWorkspace) FocusSelectedNodes() bool

RenderGraphWorkspace.GraphDocument

func (w *RenderGraphWorkspace) GraphDocument() RenderGraphDocument

RenderGraphWorkspace.Hotkeys

func (w *RenderGraphWorkspace) Hotkeys() []common_workspace.HotKey

RenderGraphWorkspace.ID

func (w *RenderGraphWorkspace) ID() string

RenderGraphWorkspace.Initialize

func (w *RenderGraphWorkspace) Initialize(ed editor_workspace.WorkspaceEditorInterface) error

RenderGraphWorkspace.IsFocusedOnInput

func (w *RenderGraphWorkspace) IsFocusedOnInput() bool

RenderGraphWorkspace.IsRequired

func (w *RenderGraphWorkspace) IsRequired() bool

RenderGraphWorkspace.LoadRenderGraphID

func (w *RenderGraphWorkspace) LoadRenderGraphID(id string)

RenderGraphWorkspace.Open

func (w *RenderGraphWorkspace) Open()

RenderGraphWorkspace.SaveCurrentGraph

func (w *RenderGraphWorkspace) SaveCurrentGraph()

RenderGraphWorkspace.SerializeGraph

func (w *RenderGraphWorkspace) SerializeGraph() ([]byte, error)

RenderGraphWorkspace.ShowCreateNodeMenu

func (w *RenderGraphWorkspace) ShowCreateNodeMenu()

RenderGraphWorkspace.Shutdown

func (w *RenderGraphWorkspace) Shutdown()

RenderGraphWorkspace.Update

func (w *RenderGraphWorkspace) Update(deltaTime float64)

RenderGraphWorkspace.UpdateViewportTool

func (w *RenderGraphWorkspace) UpdateViewportTool(view *editor_stage_view.StageView) bool

RenderGraphWorkspaceUIData

struct

type RenderGraphWorkspaceUIData struct {
    CameraMode  string
    CreateNodes []renderGraphNodeMenuData
    GraphName   string
}