-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca09944
commit 782809a
Showing
5 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script lang="ts"> | ||
import { AceEditor } from 'svelte-ace'; | ||
import 'brace/mode/glsl'; | ||
import 'brace/theme/pastel_on_dark'; | ||
// Module state. | ||
export let shaderSource: string; | ||
</script> | ||
|
||
<AceEditor | ||
width="100%" | ||
height="400px" | ||
lang="glsl" | ||
theme="pastel_on_dark" | ||
bind:value={shaderSource} | ||
/> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
<script lang="ts"> | ||
import { AceEditor } from 'svelte-ace'; | ||
import 'brace/mode/glsl'; | ||
import 'brace/theme/pastel_on_dark'; | ||
import CodeEditor from './CodeEditor.svelte'; | ||
import LLM from './LLM.svelte'; | ||
// TODO: | ||
// - Make the editor container collapsible to the left | ||
// - Add a reset button | ||
// - Move the revert logic here instead? | ||
// Needs to be matched with the messages though | ||
// Module state. | ||
export let shaderSource: string; | ||
</script> | ||
|
||
<AceEditor | ||
width="100%" | ||
height="400px" | ||
lang="glsl" | ||
theme="pastel_on_dark" | ||
bind:value={shaderSource} | ||
/> | ||
<div id="editor-container"> | ||
<CodeEditor bind:shaderSource /> | ||
<LLM bind:shaderSource /> | ||
</div> | ||
|
||
<style> | ||
#editor-container { | ||
display: block; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 25%; | ||
min-width: 300pt; | ||
z-index: 999; | ||
background-color: rgba(0, 0, 0, 0.5); | ||
} | ||
</style> |
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