Skip to content

Commit d0f91ae

Browse files
committed
cleanup
1 parent 1920b8b commit d0f91ae

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

apps/typegpu-docs/src/pages/translator/lib/translatorStore.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,23 @@ import {
99
import { compile, initializeWasm } from './wgslTool.ts';
1010
import { executeTgslCode, getErrorMessage } from './tgslExecutor.ts';
1111

12-
// Persisted state
1312
export const formatAtom = atomWithStorage('translator_format', 'glsl');
1413
export const modeAtom = atomWithStorage<TranslatorMode>(
1514
'translator_mode',
1615
TRANSLATOR_MODES.WGSL,
1716
);
1817

19-
// Basic state
2018
export const tgslCodeAtom = atom(DEFAULT_TGSL);
2119
export const wgslCodeAtom = atom(DEFAULT_WGSL);
2220
export const outputAtom = atom('');
2321
export const formatsAtom = atom<string[]>([]);
2422
export const editorLoadingAtom = atom(true);
2523

26-
// Combined status state
2724
export const statusAtom = atom<{
2825
state: 'initializing' | 'ready' | 'compiling' | 'success' | 'error';
2926
error?: string;
3027
}>({ state: 'initializing' });
3128

32-
// Simplified derived atoms
3329
export const canCompileAtom = atom((get) => {
3430
const { state } = get(statusAtom);
3531
const formats = get(formatsAtom);
@@ -54,7 +50,6 @@ export const canConvertTgslAtom = atom((get) => {
5450
state !== 'compiling';
5551
});
5652

57-
// Action atoms
5853
export const initializeAtom = atom(null, async (_, set) => {
5954
try {
6055
const formats = initializeWasm();
@@ -109,7 +104,6 @@ export const compileAtom = atom(null, async (get, set) => {
109104
}
110105
});
111106

112-
// Mode and format change handlers
113107
export const clearOutputOnModeChangeAtom = atom(
114108
null,
115109
(_, set, mode: TranslatorMode) => {

0 commit comments

Comments
 (0)