mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: new lighting env
This commit is contained in:
1 parent
1944745902
commit
abc8acb6ed
3 files changed
+6
-6
No files matched your search
@@ -4,8 +4,8 @@ import * as Duel from '../../../../../stores/duel';
|
|||||||
import * as TankopediaPersistent from '../../../../../stores/tankopediaPersistent';
|
import * as TankopediaPersistent from '../../../../../stores/tankopediaPersistent';
|
||||||
|
|
||||||
export const ENVIRONMENTS = [
|
export const ENVIRONMENTS = [
|
||||||
'lobby',
|
|
||||||
'apartment',
|
'apartment',
|
||||||
|
'lobby',
|
||||||
'warehouse',
|
'warehouse',
|
||||||
'dawn',
|
'dawn',
|
||||||
'sunset',
|
'sunset',
|
||||||
@@ -18,7 +18,7 @@ export function Lighting() {
|
|||||||
(state) => state.model.visual.showEnvironment,
|
(state) => state.model.visual.showEnvironment,
|
||||||
);
|
);
|
||||||
const environment = TankopediaPersistent.use(
|
const environment = TankopediaPersistent.use(
|
||||||
(state) => state.model.visual.environment,
|
(state) => state.model.visual.environmentV2,
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export function Options({ thicknessRange }: OptionsProps) {
|
|||||||
const opaque = TankopediaPersistent.use((state) => state.model.visual.opaque);
|
const opaque = TankopediaPersistent.use((state) => state.model.visual.opaque);
|
||||||
const fullScreenAvailable = useFullscreenAvailability();
|
const fullScreenAvailable = useFullscreenAvailability();
|
||||||
const environment = TankopediaPersistent.use(
|
const environment = TankopediaPersistent.use(
|
||||||
(state) => state.model.visual.environment,
|
(state) => state.model.visual.environmentV2,
|
||||||
);
|
);
|
||||||
const developerMode = App.use((state) => state.developerMode);
|
const developerMode = App.use((state) => state.developerMode);
|
||||||
const antagonistGun = Duel.use((state) => state.antagonist.gun);
|
const antagonistGun = Duel.use((state) => state.antagonist.gun);
|
||||||
@@ -610,7 +610,7 @@ export function Options({ thicknessRange }: OptionsProps) {
|
|||||||
value={environment}
|
value={environment}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
mutateTankopediaPersistent((draft) => {
|
mutateTankopediaPersistent((draft) => {
|
||||||
draft.model.visual.environment = environment;
|
draft.model.visual.environmentV2 = environment;
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export interface TankopediaPersistent {
|
|||||||
visual: {
|
visual: {
|
||||||
wireframe: boolean;
|
wireframe: boolean;
|
||||||
opaque: boolean;
|
opaque: boolean;
|
||||||
environment: (typeof ENVIRONMENTS)[number];
|
environmentV2: (typeof ENVIRONMENTS)[number];
|
||||||
showGrid: boolean;
|
showGrid: boolean;
|
||||||
greenPenetration: boolean;
|
greenPenetration: boolean;
|
||||||
showEnvironment: boolean;
|
showEnvironment: boolean;
|
||||||
@@ -53,7 +53,7 @@ export const { Provider, use, useMutation, useStore } = createNextSafeStore(
|
|||||||
showPrimaryArmor: true,
|
showPrimaryArmor: true,
|
||||||
wireframe: false,
|
wireframe: false,
|
||||||
opaque: false,
|
opaque: false,
|
||||||
environment: ENVIRONMENTS[0],
|
environmentV2: ENVIRONMENTS[0],
|
||||||
showGrid: true,
|
showGrid: true,
|
||||||
greenPenetration: false,
|
greenPenetration: false,
|
||||||
showEnvironment: false,
|
showEnvironment: false,
|
||||||
|
|||||||
Reference in new issue
Block a user