Skip to content

Commit

Permalink
feat(web): Add flag for displaying scene
Browse files Browse the repository at this point in the history
Hides 3D scene behind flag.
  • Loading branch information
langri-sha committed Jun 16, 2024
1 parent 1332357 commit f0b21f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/pages/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const Landing = () => (
<Root>
<Root>
<Header />
<Scene />
{process.env.EXPERIMENTAL_SCENE ? <Scene /> : null}
<Drone />
</Root>
</Root>
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/web.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/// <reference types="@types/gtag.js" />

declare type WebEnv = {
NODE_ENV?: 'development' | 'production'
NODE_ENV: 'development' | 'production'
/** Add experimental scene to landing page, when set. */
EXPERIMENTAL_SCENE: string | null
}

declare global {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="./src/web.d.ts" />
import path from 'node:path'

import {
Expand Down Expand Up @@ -91,6 +92,7 @@ export default env(({ development, production }) => ({
}),
new EnvironmentPlugin({
NODE_ENV: development ? 'development' : 'production',
}),
EXPERIMENTAL_SCENE: null,
} satisfies WebEnv),
],
}))

0 comments on commit f0b21f2

Please sign in to comment.