View raymarch.hlsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2023 Tomasz Stachowiak | |
// | |
// This contribution is dual licensed under EITHER OF | |
// | |
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0) | |
// MIT license (http://opensource.org/licenses/MIT) | |
// | |
// at your option. | |
#include "/inc/frame_constants.hlsl" |
View DrawUtils.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Object | |
class_name DrawUtils | |
# Extracted from graph_node.cpp | |
static func draw_cos_line(node : Node, from_position : Vector2, to_position : Vector2, from_color : Color, to_color : Color, bezier_len_pos : int, bezier_len_neg : int, line_width : float = 1.0, shadow : bool = false) -> void: | |
var diff = to_position.x - from_position.x | |
var cp_offset | |
var cp_len = bezier_len_pos | |
var cp_neg_len = bezier_len_neg | |
View NodeUtils.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Object | |
class_name NodeUtils | |
static func get_child_by_class(node : Node, child_class : String, counter : int = 1) -> Node: | |
var match_counter = 0 | |
var node_children = node.get_children() | |
for child in node_children: | |
if (child.get_class() == child_class): | |
match_counter += 1 |