auto-git:
[change] src/app/App.tsx [change] src/viewport-three/viewport-host.ts
This commit is contained in:
@@ -10342,6 +10342,19 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const applySceneShowCelestialBodies = (enabled: boolean) => {
|
||||||
|
applyWorldSettings(
|
||||||
|
{
|
||||||
|
...editorState.document.world,
|
||||||
|
showCelestialBodies: enabled
|
||||||
|
},
|
||||||
|
enabled ? "Enable celestial body overlay" : "Disable celestial body overlay",
|
||||||
|
enabled
|
||||||
|
? "Sun and moon overlays now render in the sky."
|
||||||
|
: "Sun and moon overlays are now hidden."
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const applyAdvancedRenderingSettings = (
|
const applyAdvancedRenderingSettings = (
|
||||||
label: string,
|
label: string,
|
||||||
successMessage: string,
|
successMessage: string,
|
||||||
@@ -13900,6 +13913,27 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="form-section">
|
||||||
|
<label className="form-field form-field--toggle">
|
||||||
|
<span className="label">Show Sun & Moon</span>
|
||||||
|
<input
|
||||||
|
data-testid="world-show-celestial-bodies"
|
||||||
|
type="checkbox"
|
||||||
|
checked={editorState.document.world.showCelestialBodies}
|
||||||
|
onChange={(event) =>
|
||||||
|
applySceneShowCelestialBodies(
|
||||||
|
event.currentTarget.checked
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<div className="material-summary">
|
||||||
|
Draws shader-based sun and moon overlays at the current
|
||||||
|
resolved light directions in both the editor viewport and
|
||||||
|
the runner.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Panel title="Day Environment">
|
<Panel title="Day Environment">
|
||||||
<div className="stat-card">
|
<div className="stat-card">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -298,6 +298,11 @@ interface TerrainBrushHit {
|
|||||||
point: Vec3;
|
point: Vec3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface LightVolumeRenderObjects {
|
||||||
|
group: Group;
|
||||||
|
lights: PointLight[];
|
||||||
|
}
|
||||||
|
|
||||||
interface ActiveTerrainBrushStroke {
|
interface ActiveTerrainBrushStroke {
|
||||||
pointerId: number;
|
pointerId: number;
|
||||||
previewTerrain: Terrain;
|
previewTerrain: Terrain;
|
||||||
|
|||||||
Reference in New Issue
Block a user