auto-git:
[change] src/document/world-settings.ts
This commit is contained in:
@@ -126,6 +126,7 @@ export interface AdvancedRenderingSettings {
|
|||||||
|
|
||||||
export interface WorldSettings {
|
export interface WorldSettings {
|
||||||
projectTimeLightingEnabled: boolean;
|
projectTimeLightingEnabled: boolean;
|
||||||
|
showCelestialBodies: boolean;
|
||||||
background: WorldBackgroundSettings;
|
background: WorldBackgroundSettings;
|
||||||
ambientLight: WorldAmbientLightSettings;
|
ambientLight: WorldAmbientLightSettings;
|
||||||
sunLight: WorldSunLightSettings;
|
sunLight: WorldSunLightSettings;
|
||||||
@@ -291,6 +292,7 @@ export function createDefaultWorldTimeOfDaySettings(): WorldTimeOfDaySettings {
|
|||||||
export function createDefaultWorldSettings(): WorldSettings {
|
export function createDefaultWorldSettings(): WorldSettings {
|
||||||
return {
|
return {
|
||||||
projectTimeLightingEnabled: true,
|
projectTimeLightingEnabled: true,
|
||||||
|
showCelestialBodies: false,
|
||||||
background: {
|
background: {
|
||||||
mode: "solid",
|
mode: "solid",
|
||||||
colorHex: DEFAULT_SOLID_BACKGROUND_COLOR
|
colorHex: DEFAULT_SOLID_BACKGROUND_COLOR
|
||||||
@@ -381,6 +383,7 @@ export function cloneWorldTimeOfDaySettings(
|
|||||||
export function cloneWorldSettings(world: WorldSettings): WorldSettings {
|
export function cloneWorldSettings(world: WorldSettings): WorldSettings {
|
||||||
return {
|
return {
|
||||||
projectTimeLightingEnabled: world.projectTimeLightingEnabled,
|
projectTimeLightingEnabled: world.projectTimeLightingEnabled,
|
||||||
|
showCelestialBodies: world.showCelestialBodies,
|
||||||
background: cloneWorldBackgroundSettings(world.background),
|
background: cloneWorldBackgroundSettings(world.background),
|
||||||
ambientLight: {
|
ambientLight: {
|
||||||
...world.ambientLight
|
...world.ambientLight
|
||||||
@@ -481,6 +484,7 @@ export function areWorldTimeOfDaySettingsEqual(
|
|||||||
export function areWorldSettingsEqual(left: WorldSettings, right: WorldSettings): boolean {
|
export function areWorldSettingsEqual(left: WorldSettings, right: WorldSettings): boolean {
|
||||||
return (
|
return (
|
||||||
left.projectTimeLightingEnabled === right.projectTimeLightingEnabled &&
|
left.projectTimeLightingEnabled === right.projectTimeLightingEnabled &&
|
||||||
|
left.showCelestialBodies === right.showCelestialBodies &&
|
||||||
areWorldBackgroundSettingsEqual(left.background, right.background) &&
|
areWorldBackgroundSettingsEqual(left.background, right.background) &&
|
||||||
left.ambientLight.colorHex === right.ambientLight.colorHex &&
|
left.ambientLight.colorHex === right.ambientLight.colorHex &&
|
||||||
left.ambientLight.intensity === right.ambientLight.intensity &&
|
left.ambientLight.intensity === right.ambientLight.intensity &&
|
||||||
|
|||||||
Reference in New Issue
Block a user