Skip to content

Commit

Permalink
Merged visual-programming into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lhalbritter-tu committed Sep 22, 2024
1 parent 5ba47c2 commit 2bb3a1c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 21 deletions.
13 changes: 2 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


fn evaluateImage(input2: vec2f) -> vec3f {
fn sampleObject(input2: vec2f) -> vec3f {
var PI = 3.14159265359;
var HALF_PI = 3.14159265359 / 2.0;
var TWO_PI = 3.14159265359 * 2.0;
Expand Down
2 changes: 1 addition & 1 deletion parametric-renderer-core/graphs/Heart.graph.wgsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


fn evaluateImage(input2: vec2f) -> vec3f {
fn sampleObject(input2: vec2f) -> vec3f {
var PI = 3.14159265359;
var HALF_PI = 3.14159265359 / 2.0;
var TWO_PI = 3.14159265359 * 2.0;
Expand Down
2 changes: 1 addition & 1 deletion parametric-renderer-core/graphs/HeartSphere.graph.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn Sphere(input2: vec2f) -> vec3f {
}


fn evaluateImage(input2: vec2f) -> vec3f {
fn sampleObject(input2: vec2f) -> vec3f {
var PI = 3.14159265359;
var HALF_PI = 3.14159265359 / 2.0;
var TWO_PI = 3.14159265359 * 2.0;
Expand Down
2 changes: 1 addition & 1 deletion parametric-renderer-core/graphs/Sphere.graph.wgsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


fn evaluateImage(input2: vec2f) -> vec3f {
fn sampleObject(input2: vec2f) -> vec3f {
var PI = 3.14159265359;
var HALF_PI = 3.14159265359 / 2.0;
var TWO_PI = 3.14159265359 * 2.0;
Expand Down
9 changes: 4 additions & 5 deletions src/components/EditorAndOutput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ watchEffect(() => {
const openFile = useOpenFile(
// Open the first .wgsl file if it exists
props.fs.listFiles().find((v) => v.endsWith(".wgsl")) ?? null,
props.fs
props.fs,
);
const canvasContainer = ref<HTMLDivElement | null>(null);
Expand All @@ -87,7 +87,7 @@ watchEffect(() => {
{
// TODO: Make the Rust side pull files instead of this
const referencedFiles = shallowRef(
new Map<FilePath, Readonly<Ref<string | null>>>()
new Map<FilePath, Readonly<Ref<string | null>>>(),
);
watchImmediate(
() => scene.state.value.models,
Expand All @@ -108,7 +108,7 @@ watchEffect(() => {
}
referencedFiles.value = newReferencedFiles;
}
},
);
watchEffect(() => {
Expand Down Expand Up @@ -153,7 +153,7 @@ const shadersDropdown = computed<SelectMixedOption[]>(() => {
(fileName): SelectMixedOption => ({
label: fileName,
value: fileName,
})
}),
)
.concat({
label: "New Shader...",
Expand Down Expand Up @@ -469,7 +469,6 @@ function saveGraphWgsl(filePath: FilePath, content: string) {
<template #2>
<n-split
direction="horizontal"
style="height: 80vh"
:max="0.75"
:min="0.15"
:default-size="0.5"
Expand Down
2 changes: 1 addition & 1 deletion src/components/visual-programming/CodeGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ async function logCode() {
let visited: string[] = [];
let fullCode =
(await orderedCode(customFunctionNodes, visited)) +
"\n\nfn evaluateImage(input2: vec2f) -> vec3f {\n" +
"\n\nfn sampleObject(input2: vec2f) -> vec3f {\n" +
(await orderedCode(allNodes, visited, "\t"));
// fullCode += (await getNodesCode(endNode, [], graph, "\t")) + "}";
Expand Down

0 comments on commit 2bb3a1c

Please sign in to comment.