Skip to content

Commit

Permalink
refactor: improve venus code
Browse files Browse the repository at this point in the history
  • Loading branch information
jsulpis committed Nov 20, 2023
1 parent 5802a48 commit 30d327b
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/pages/venus.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ import Layout from "../layouts/Layout.astro";
import { useGlslCanvas } from "../webgl/renderer";
import vertexShader from "../webgl/shaders/vertex.glsl";
import fragmentShader from "../webgl/shaders/planet.fragment.glsl";
import { addPlanetControls } from "../controls/planet.controls";
import { addLightControls } from "../controls/light.controls";
import { addMonitor } from "../controls/monitor.controls";
import { addRotationControls } from "../controls/rotation.controls";
import { loadTextures } from "../webgl/loaders/texture.loader";
import { defaultUniforms } from "../webgl/settings/uniforms";
import type { TextureData } from "../webgl/loaders/texture.types";
import { setupControls } from "../controls/setup";

const textures: TextureData[] = [
{
Expand Down Expand Up @@ -48,18 +45,7 @@ import Layout from "../layouts/Layout.astro";
},
});

const { Pane } = await import("tweakpane");

const pane = new Pane({ title: "Controls", expanded: false });

addRotationControls(pane, uniforms, canvas);
addPlanetControls(pane, uniforms, {
geometry: false,
terrain: false,
clouds: false,
});
addLightControls(pane, uniforms);
addMonitor(pane);
setupControls({ canvas, uniforms });
</script>

<Layout title="Venus" description="An artistic view of Venus from space.">
Expand Down

0 comments on commit 30d327b

Please sign in to comment.