Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploration missions #144

Merged
merged 177 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
9a1a63c
generate space stations after anomalies
BarthPaleologue Aug 9, 2024
3e7348f
Merge branch 'SpaceStationsV2' of https://github.com/BarthPaleologue/…
BarthPaleologue Aug 23, 2024
3868030
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Aug 23, 2024
21e9aec
added basic player data that can be carried over saves
BarthPaleologue Aug 23, 2024
c704773
added sound effect when pathfinding succeeds in starmap
BarthPaleologue Aug 23, 2024
4be7145
connect player to subsystems to display info at spacestations
BarthPaleologue Aug 23, 2024
c2d414d
transfer more space station data to the model
BarthPaleologue Aug 23, 2024
12c97a1
Save current itinerary to save file
BarthPaleologue Aug 23, 2024
4f69300
added inertia to starmap and default controls
BarthPaleologue Aug 23, 2024
10c9be9
fixed faction info not being in the right container in starmap
BarthPaleologue Aug 23, 2024
026d3ea
first attempt to generate missions
BarthPaleologue Aug 23, 2024
b9418c2
create helper method to get space station models from system model
BarthPaleologue Aug 23, 2024
3c4b9ef
automatic itinerary update on jump
BarthPaleologue Aug 25, 2024
610f02e
targeting system is now different than adding system target
BarthPaleologue Aug 25, 2024
763eaf3
player jump range is now tied to a proper setting
BarthPaleologue Aug 25, 2024
bc26a31
display all neighbor systems in star system view
BarthPaleologue Aug 25, 2024
6c2e110
don't display durations greater than 10 years
BarthPaleologue Aug 25, 2024
f09a6df
allow target cursors to be smaller
BarthPaleologue Aug 25, 2024
a4d5e31
added custom style to neighbor star systems
BarthPaleologue Aug 25, 2024
262c1d3
fix object cursors not being updated when rotating the spaceship
BarthPaleologue Aug 25, 2024
e521845
slightly bigger system targets
BarthPaleologue Aug 25, 2024
88c15ad
fix jump lock not being freed under certain conditions
BarthPaleologue Aug 25, 2024
523f8fd
set next system in itinerary as target after cursor init
BarthPaleologue Aug 25, 2024
7f7d508
small optimization:
BarthPaleologue Aug 25, 2024
4b66107
Fixes for starmap ui
BarthPaleologue Aug 25, 2024
652bd10
added basic sightseeing mission boilerplate
BarthPaleologue Aug 30, 2024
3142baa
Create missionSequenceNode.ts
BarthPaleologue Aug 30, 2024
d86fce0
added isMoon to telluricPlanetModel
BarthPaleologue Aug 30, 2024
554478e
refactor universe object ids
BarthPaleologue Aug 30, 2024
1d554fb
Actually generate sightseeing mission and display them in space stations
BarthPaleologue Aug 30, 2024
4315ecf
working on mission descriptions
BarthPaleologue Aug 30, 2024
ece6bff
added type name to orbital object model
BarthPaleologue Aug 30, 2024
aa1bd90
change anomaly bodyType to anomaly instead of Mandelbulb
BarthPaleologue Aug 30, 2024
f3a8c2c
align blackhole model constructor signature to star and neutron star
BarthPaleologue Aug 30, 2024
c25f8cf
Richer mission information thanks to new model retrieval utils
BarthPaleologue Aug 30, 2024
462851b
soft shadowing for rings
BarthPaleologue Aug 30, 2024
7fc5937
added some UI to accept missions
BarthPaleologue Sep 6, 2024
b1acc1b
added ability to accept quests
BarthPaleologue Sep 6, 2024
fdabb89
make mission container to separate component
BarthPaleologue Sep 6, 2024
16708ac
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Sep 6, 2024
4583ca6
some color adjustment
BarthPaleologue Sep 6, 2024
63b71d8
fix telluric moons not being updated
BarthPaleologue Sep 6, 2024
b193099
add very basic ui for mission display in ship ui layer
BarthPaleologue Sep 6, 2024
e09c7e5
fixed black hole demo
BarthPaleologue Sep 6, 2024
ac51e7d
better mission display logic
BarthPaleologue Sep 6, 2024
1c6f8c4
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Sep 6, 2024
a7054d8
fix blackhole warping
BarthPaleologue Sep 6, 2024
c5ea0ef
never compensate the rotation of a black hole
BarthPaleologue Sep 6, 2024
107b7e4
change naming scheme for satellites
BarthPaleologue Sep 6, 2024
fd7f935
fixed telluric satellites material not updating
BarthPaleologue Sep 6, 2024
9bd1063
fix war crime against the laws of physics
BarthPaleologue Sep 6, 2024
9e17fae
fix timewarp breaking lerps
BarthPaleologue Sep 6, 2024
79bbeb5
basic current mission display
BarthPaleologue Sep 6, 2024
5e8aede
added basic ability to bookmark systems
BarthPaleologue Sep 6, 2024
c91bf9a
at startup, default to showing the first mission if it exists
BarthPaleologue Sep 6, 2024
790a09b
added helper message in the default display of missions
BarthPaleologue Sep 6, 2024
d069fb9
disable system view ui in main menu
BarthPaleologue Sep 6, 2024
bc975a5
added basic mission icon in files
BarthPaleologue Sep 6, 2024
128c14e
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Sep 6, 2024
7e48c64
protect save data created near surfaces
BarthPaleologue Sep 6, 2024
fd17835
remove ambient light from surface pbr and space stations
BarthPaleologue Sep 6, 2024
6e0bc24
choose faster lens flare
BarthPaleologue Sep 6, 2024
16635b1
clamp neighbor system display to 20LY
BarthPaleologue Sep 7, 2024
8c6f6c0
Added naked singularity detection
BarthPaleologue Sep 14, 2024
06c6ae6
adjust default speed in black hole demo
BarthPaleologue Sep 14, 2024
aa06392
added notification when changing view to default
BarthPaleologue Sep 14, 2024
b045d5d
added normal smoothing when far from planets
BarthPaleologue Sep 14, 2024
7e3df8e
Update pnpm-lock.yaml
BarthPaleologue Sep 14, 2024
e8378d4
normal smoothing in vertex buffer
BarthPaleologue Sep 14, 2024
efc5a82
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Sep 14, 2024
79793e7
fix compilation error
BarthPaleologue Sep 14, 2024
a562483
remove default controls notification on main menu
BarthPaleologue Sep 14, 2024
7921dbe
fix incorrect normal smoothing
BarthPaleologue Sep 14, 2024
f78bbdc
Update starSystemController.ts
BarthPaleologue Sep 15, 2024
b258a8f
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Sep 15, 2024
3450a1b
hide space station ui when opening starmap
BarthPaleologue Sep 15, 2024
2ef0a23
fix potential memory leak
BarthPaleologue Sep 15, 2024
2f50482
terrain generation now uses a priority queue
BarthPaleologue Sep 15, 2024
6a4a04a
prevent sightseeing mission duplication
BarthPaleologue Sep 15, 2024
9e36bd3
working on memory leaks
BarthPaleologue Sep 15, 2024
fe094c0
Update blackHolePostProcess.ts
BarthPaleologue Sep 15, 2024
27e94dc
better memory management
BarthPaleologue Sep 15, 2024
9818323
fix more memory leaks
BarthPaleologue Sep 15, 2024
019b94b
fixing planetary excessive Lods
BarthPaleologue Sep 15, 2024
ba6bda7
better asteroid instance names
BarthPaleologue Sep 15, 2024
5370389
hide landing pad when too far away
BarthPaleologue Sep 15, 2024
6c62ba7
cleaning more arrays
BarthPaleologue Sep 16, 2024
a03d078
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Sep 16, 2024
73c497d
add missing awaits when calling switchToDefaultControls
BarthPaleologue Sep 16, 2024
a658622
remove useless qwerty mention
BarthPaleologue Sep 16, 2024
6dfbbe6
dispose more references
BarthPaleologue Sep 20, 2024
909b29f
reset space station layer
BarthPaleologue Sep 20, 2024
1d565b7
forgot to dispose solar panels
BarthPaleologue Sep 20, 2024
67e02b2
upgrade packages to support inspector
BarthPaleologue Sep 20, 2024
395788d
Remove greased lines materials when changing system
BarthPaleologue Sep 20, 2024
005cdef
integrate inspector layer to ui
BarthPaleologue Sep 20, 2024
1d7fc09
Update cosmosJourneyer.ts
BarthPaleologue Sep 20, 2024
c74f9ab
Update mainMenu.ts
BarthPaleologue Sep 20, 2024
b1417b0
Update inspectorLayer.scss
BarthPaleologue Sep 20, 2024
41838b7
basics for icon display in the starmap
BarthPaleologue Sep 20, 2024
9595255
display bookmarks and current missions
BarthPaleologue Sep 20, 2024
5025d57
better icon display in starmap
BarthPaleologue Sep 20, 2024
800adf5
Update starMapUI.scss
BarthPaleologue Sep 21, 2024
153fa34
remove useless always select as active mesh for asteroids
BarthPaleologue Sep 22, 2024
5083349
make thinner telluric planet material
BarthPaleologue Sep 22, 2024
70aa17c
Gas planet material does not need ref to transform
BarthPaleologue Sep 22, 2024
a53849a
star material does not need to hold ref to transform
BarthPaleologue Sep 22, 2024
bcd5fad
addOnce instead of add
BarthPaleologue Sep 22, 2024
a70e02b
formatting
BarthPaleologue Sep 22, 2024
1135b55
added orbital period information to space station infos
BarthPaleologue Oct 1, 2024
3d5f949
scale planet masses with radius
BarthPaleologue Oct 1, 2024
e8b366a
catch space stations from further away
BarthPaleologue Oct 1, 2024
b8f9e51
Update starSystemController.ts
BarthPaleologue Oct 1, 2024
ae2e38a
Update orbitalObject.ts
BarthPaleologue Oct 1, 2024
a9bc9af
simplify orbit structs
BarthPaleologue Oct 1, 2024
78054ee
fix orbit bug
BarthPaleologue Oct 1, 2024
6dcb157
Update physicalProperties.ts
BarthPaleologue Oct 1, 2024
108cada
Merge branch 'main' into SpaceStationsV2
BarthPaleologue Oct 1, 2024
e30c126
set target automatically if itinerary is defined when loading save
BarthPaleologue Oct 4, 2024
fa66bb7
added mission node describe methods
BarthPaleologue Oct 4, 2024
2fd8cc0
localize fly by missions
BarthPaleologue Oct 4, 2024
c7fc8ab
added mission complete sound
BarthPaleologue Oct 4, 2024
f1e89af
sound is no longer played from the interface
BarthPaleologue Oct 4, 2024
4885add
reward player on mission complete
BarthPaleologue Oct 4, 2024
6600708
localize asteroid field missions
BarthPaleologue Oct 4, 2024
404848d
introduce CanHaveRingsModel
BarthPaleologue Oct 4, 2024
820eefe
generate asteroid field sightseeing missions
BarthPaleologue Oct 4, 2024
a770469
custom distance display when mission is in same system
BarthPaleologue Oct 4, 2024
043aa13
adjust reward function for sightseeing missions
BarthPaleologue Oct 4, 2024
e5cba06
localize sightseeing mission titles
BarthPaleologue Oct 4, 2024
611d55e
disable not implemented buttons in space station ui
BarthPaleologue Oct 4, 2024
cef1125
fix icon display when multiple icons are needed
BarthPaleologue Oct 4, 2024
de77481
change blackhole bounding radius to account for accretion disk
BarthPaleologue Oct 4, 2024
f6ef3cb
make less planets habitable
BarthPaleologue Oct 4, 2024
7c0e48f
Update .gitignore
BarthPaleologue Oct 5, 2024
e3bb933
fix ocean level calculation
BarthPaleologue Oct 5, 2024
d84efe4
generate terminator landing missions
BarthPaleologue Oct 5, 2024
34069d9
localize terminator landings
BarthPaleologue Oct 5, 2024
50d2425
fix habitable planets not having clouds sometimes
BarthPaleologue Oct 5, 2024
dc389f3
remove reference to scene in planet chunk
BarthPaleologue Oct 7, 2024
1a3318a
fix landing missions detecting wrong mission complete
BarthPaleologue Oct 8, 2024
be62ff7
added ability to cancel landing
BarthPaleologue Oct 8, 2024
57a6717
added sound queue system to avoid overlapping voice lines
BarthPaleologue Oct 8, 2024
cd60089
added missing locale for landing cancellation
BarthPaleologue Oct 8, 2024
44895e3
Better communication around planetary landings
BarthPaleologue Oct 8, 2024
1a4f875
refactor bounding sphere to HasBoundingSphere
BarthPaleologue Oct 8, 2024
e598574
name refactor for mission nodes
BarthPaleologue Oct 8, 2024
83830de
Terminator missions will now be completed only near the terminator
BarthPaleologue Oct 8, 2024
677d45d
added starmap keybind to mission display
BarthPaleologue Oct 8, 2024
370bccb
max width for mission display
BarthPaleologue Oct 8, 2024
889f3b3
implement serialization / deserialization for missions
BarthPaleologue Oct 8, 2024
4eb8237
formatting
BarthPaleologue Oct 8, 2024
da55414
store completed missions
BarthPaleologue Oct 9, 2024
7dc5637
revert to anomaly being celestial bodies
BarthPaleologue Oct 9, 2024
bd4a530
better handling of isLoadingSystem lock
BarthPaleologue Oct 9, 2024
3120855
display both current finished missions
BarthPaleologue Oct 9, 2024
9c48068
refactor mission system
BarthPaleologue Oct 9, 2024
df789fd
mission describing is now at node level
BarthPaleologue Oct 9, 2024
5f45c91
implement equality at mission node level
BarthPaleologue Oct 9, 2024
8648a65
documentation
BarthPaleologue Oct 9, 2024
3edd50e
put mission deserialization code in mission
BarthPaleologue Oct 9, 2024
6cc087a
fix missing accent in french locale
BarthPaleologue Oct 9, 2024
a329d4b
Added mission description to current mission display
BarthPaleologue Oct 9, 2024
b2f029b
avoid generating missions already completed
BarthPaleologue Oct 9, 2024
b343e85
added visual buttons to cycle through missions
BarthPaleologue Oct 9, 2024
a900df5
added pop animation on mission buttons
BarthPaleologue Oct 9, 2024
672567a
Update currentMissionDisplay.scss
BarthPaleologue Oct 9, 2024
5e399a5
added sounds to mission display buttons
BarthPaleologue Oct 9, 2024
c52459f
choose unfinished mission by default
BarthPaleologue Oct 9, 2024
bb1c0d6
display mission indices
BarthPaleologue Oct 9, 2024
82015c6
Update currentMissionDisplay.ts
BarthPaleologue Oct 9, 2024
5ee2999
localize mission display and tutorial panel controls
BarthPaleologue Oct 10, 2024
7e65a60
remove mission control buttons when there are no missions
BarthPaleologue Oct 10, 2024
b66440e
more documentation for mission code
BarthPaleologue Oct 10, 2024
eb23360
Update spaceStationMissions.ts
BarthPaleologue Oct 10, 2024
d7adf79
Introduce StarSystemCoordinates
BarthPaleologue Oct 10, 2024
0c955ce
abstract system model retreival
BarthPaleologue Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"devDependencies": {
"@babylonjs/core": "^7.25.1",
"@babylonjs/gui": "^7.25.1",
"@babylonjs/core": "^7.26.0",
"@babylonjs/gui": "^7.26.0",
"@babylonjs/havok": "^1.3.8",
"@babylonjs/loaders": "^7.25.1",
"@babylonjs/inspector": "^7.26.0",
"@babylonjs/loaders": "^7.26.0",
"@brianchirls/game-input": "^0.1.1",
"@tauri-apps/cli": "^1.6.1",
"@tauri-apps/cli": "^1.6.2",
"@types/d3": "^7.4.3",
"@types/jest": "^29.5.13",
"@types/seedrandom": "^3.0.8",
"@types/webpack": "^5.28.5",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"@webpack-cli/generators": "^3.0.7",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"d3": "^7.9.0",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-plugin-import": "^2.30.0",
"extended-random": "^1.2.2",
"fast-simplex-noise": "^4.0.0",
Expand All @@ -30,7 +31,7 @@
"mini-css-extract-plugin": "^2.9.1",
"prettier": "^3.3.3",
"raw-loader": "^4.0.2",
"sass": "^1.78.0",
"sass": "^1.79.2",
"sass-loader": "^16.0.1",
"squirrel-noise": "^1.0.0",
"style-loader": "^4.0.0",
Expand Down
542 changes: 338 additions & 204 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/
/gen/schemas
Binary file added src/asset/icons/bookmark.webp
Binary file not shown.
Binary file added src/asset/icons/mission.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions src/html/helmetOverlay.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<section id="helmetOverlay">
<div id="bodyData">
<p id="bodyName"></p>
</div>
<div id="throttle">
<div id="throttleStripes"></div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<body>
<canvas id="renderer"></canvas>

<div id="inspectorLayer"></div>

<div id="loadSavePanel" class="sidePanel">
<div id="dropFileZone">
<p data-i18n="sidePanel:dropASaveFileHere">Drop a save file here</p>
Expand Down
13 changes: 7 additions & 6 deletions src/html/spaceStationUI.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
<section id="spaceStationUI">
<div id="spaceStationHeader">
<p>Hello!</p>
<p></p>
</div>

<div id="playerInfo">
<p>Balance: poor</p>
<h2 class="playerName"></h2>
<p class="playerBalance"></p>
</div>

<div class="mainContainer hidden">

</div>

<div id="spaceStationActions">
<div class="spaceStationAction">
<div class="spaceStationAction missionsButton">
<img src="../asset/icons/exploration.webp" alt="Mission icon" />
<h2>Missions</h2>
<p>Find your next destination</p>
</div>

<div class="spaceStationAction">
<div class="spaceStationAction disabled">
<img src="../asset/icons/exploration.webp" alt="Market icon" />
<h2>Market</h2>
<p>Trade commodities at the local market</p>
</div>

<div class="spaceStationAction">
<div class="spaceStationAction disabled">
<img src="../asset/icons/exploration.webp" alt="Exploration icon" />
<h2>Exploration center</h2>
<p>Sell your exploration data to the Encyclopedia</p>
</div>

<div class="spaceStationAction">
<div class="spaceStationAction disabled">
<img src="../asset/icons/exploration.webp" alt="Spaceship icon" />
<h2>Ship</h2>
<p>Take care of your ship before your next flight</p>
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en-US/common.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"loading": "Loading, please wait...",
"fullscreen": "Press F11 to enable fullscreen",
"or": "or"
"or": "or",
"and": "and"
}
3 changes: 3 additions & 0 deletions src/locales/en-US/missions/asteroidField.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"missionCompleted": "Mission completed. Careful with the asteroids CMDR!"
}
5 changes: 5 additions & 0 deletions src/locales/en-US/missions/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"travelToTargetSystem": "Travel to {{systemName}} ({{distance}}). Press {{starMapKey}} to open the Star Map.",
"getCloserToTarget": "Fly closer to {{objectName}}",
"here": "here"
}
3 changes: 3 additions & 0 deletions src/locales/en-US/missions/flyBy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"missionCompleted": "Mission completed. Enjoy the view CMDR!"
}
8 changes: 8 additions & 0 deletions src/locales/en-US/missions/sightseeing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"describeFlyBy": "Fly by the {{objectType}} in {{systemName}} ({{distance}})",
"describeTerminatorLanding": "Land near the terminator of {{objectName}} in {{systemName}} ({{distance}})",
"describeAsteroidFieldTrek": "Trek in the asteroid field of {{objectName}} in {{systemName}} ({{distance}})",
"flyBy": "Fly by",
"terminatorLanding": "Terminator landing",
"asteroidFieldTrek": "Asteroid field trek"
}
4 changes: 4 additions & 0 deletions src/locales/en-US/missions/terminatorLanding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"getCloserToTerminator": "Get closer to {{objectName}}'s terminator",
"missionCompleted": "Mission completed. Enjoy the view CMDR!"
}
1 change: 1 addition & 0 deletions src/locales/en-US/notifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"howToFly": "Your pointer controls the pitch and roll of your spaceship. The neutral position is at the center of the screen.",
"landingSequenceEngaged": "Landing sequence engaged",
"landingComplete": "Landing complete! Use {{bindingsString}} to disembark.",
"landingCancelled": "Landing cancelled",
"copiedToClipboard": "Copied to clipboard",
"howToLiftOff": "Hold {{bindingsString}} to lift off.",
"howToHyperSpace": "Align your ship with the system target using the target helper on the bottom right of your screen then press {{bindingsString}} to make a hyperspace jump."
Expand Down
1 change: 1 addition & 0 deletions src/locales/en-US/starMap.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"planets": "Planets",
"plotItinerary": "Plot Itinerary",
"bookmark": "Bookmark",
"bookmarked": "Bookmarked",
"distanceToSol": "Distance to Sol",
"distanceFromCurrent": "Distance",
"humanPresence": "Human Presence",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/fr-FR/common.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"loading": "Chargement...",
"fullscreen": "Appuyez sur F11 pour entrer en plein écran !",
"or": "ou"
"or": "ou",
"and": "et"
}
3 changes: 3 additions & 0 deletions src/locales/fr-FR/missions/asteroidField.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"missionCompleted": "Mission réussie. Attention aux astéroïdes CMDR !"
}
5 changes: 5 additions & 0 deletions src/locales/fr-FR/missions/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"travelToTargetSystem": "Voyagez jusqu'à {{systemName}} ({{distance}}). Appuyez sur {{starMapKey}} pour ouvrir la carte stellaire.",
"getCloserToTarget": "Approchez vous de {{objectName}}",
"here": "ici"
}
3 changes: 3 additions & 0 deletions src/locales/fr-FR/missions/flyBy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"missionCompleted": "Mission réussie. Profitez de la vue CMDR !"
}
8 changes: 8 additions & 0 deletions src/locales/fr-FR/missions/sightseeing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"describeFlyBy": "Survoler {{objectType}} dans {{systemName}} ({{distance}})",
"describeTerminatorLanding": "Attérir près du terminateur de {{objectName}} dans {{systemName}} ({{distance}})",
"describeAsteroidFieldTrek": "Excursion au sein du champ d'astéroïdes de {{objectName}} dans {{systemName}} ({{distance}})",
"flyBy": "Survol",
"terminatorLanding": "Atterrissage au terminateur",
"asteroidFieldTrek": "Excursion au champ d'astéroïdes"
}
4 changes: 4 additions & 0 deletions src/locales/fr-FR/missions/terminatorLanding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"getCloserToTerminator": "Approchez vous du terminateur de {{objectName}}",
"missionCompleted": "Mission réussie. Profitez de la vue CMDR !"
}
1 change: 1 addition & 0 deletions src/locales/fr-FR/notifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"howToFly": "La souris contrôle le tangage et le roulis du vaisseau. La position neutre se trouve au centre de l'écran.",
"landingSequenceEngaged": "Début de la séquence d'atterrissage.",
"landingComplete": "Atterrissage réussi ! Utilisez {{bindingsString}} pour sortir du vaisseau.",
"landingCancelled": "Atterrissage annulé.",
"copiedToClipboard": "Copié dans le presse-papiers.",
"howToLiftOff": "Maintenez {{bindingsString}} pour décoller.",
"howToHyperSpace": "Alignez votre vaisseau avec la cible du système de destination à l'aide du radar de cible en bas à droite de l'écran. Appuyez ensuite sur {{bindingsString}} pour enclencher le saut hyperspatial."
Expand Down
4 changes: 2 additions & 2 deletions src/locales/fr-FR/objectTypes.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"starSystem": "Système Solaire",
"star": "Etoile de type {{stellarType}}",
"neutronStar": "Etoile à Neutrons",
"star": "Étoile de type {{stellarType}}",
"neutronStar": "Étoile à Neutrons",
"blackHole": "Trou Noir",
"gasPlanet": "Planète Gazeuse",
"telluricPlanet": "Planète Tellurique",
Expand Down
1 change: 1 addition & 0 deletions src/locales/fr-FR/starMap.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"planets": "Planètes",
"plotItinerary": "Planifier l'itinéraire",
"bookmark": "Marquer",
"bookmarked": "Marqué",
"distanceToSol": "Distance à Sol",
"distanceFromCurrent": "Distance",
"humanPresence": "Présence humaine",
Expand Down
25 changes: 13 additions & 12 deletions src/shaders/blackhole.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ vec4 raymarchDisk(vec3 rayDir, vec3 initialPosition) {

vec3 samplePoint = initialPosition;
float distanceToCenter = length(samplePoint);// distance to the center of the disk
float relativeDistance = distanceToCenter / object_radius;
float relativeDiskRadius = accretionDiskRadius / object_radius;
float relativeDistance = distanceToCenter / schwarzschildRadius;
float relativeDiskRadius = accretionDiskRadius / schwarzschildRadius;

vec3 diskNormal = object_rotationAxis;

Expand Down Expand Up @@ -110,7 +110,7 @@ vec4 raymarchDisk(vec3 rayDir, vec3 initialPosition) {

float intensity = 1.0 - (i / DISK_STEPS);
distanceToCenter = length(samplePoint);
relativeDistance = distanceToCenter / object_radius;
relativeDistance = distanceToCenter / schwarzschildRadius;

float diskMask = 1.0;
diskMask *= smoothstep(1.5, 2.5, relativeDistance); // Fade the disk when too close to the event horizon. 1.5 is the IBCO (innermost bound circular orbit) for a Schwarzschild black hole. It is also called the photon sphere.
Expand Down Expand Up @@ -165,7 +165,7 @@ void main() {
// actual depth of the scene
float maximumDistance = length(pixelWorldPosition - camera_position) * remap(depth, 0.0, 1.0, camera_near, camera_far);

float maxBendDistance = max(accretionDiskRadius * 3.0, object_radius * 15.0);
float maxBendDistance = max(accretionDiskRadius * 3.0, schwarzschildRadius * 15.0);

float t0, t1;
if(!rayIntersectSphere(camera_position, rayDir, object_position, maxBendDistance, t0, t1)) {
Expand Down Expand Up @@ -211,7 +211,7 @@ void main() {

float stepSize = 0.92 * projectedDistance / rayDirProjectedDistance;//conservative distance to disk (y==0)
float farLimit = distanceToCenter * 0.5;//limit step size far from to BH
float closeLimit = distanceToCenter * 0.1 + 0.05 * distanceToCenter2 / object_radius;//limit step size close to BH
float closeLimit = distanceToCenter * 0.1 + 0.05 * distanceToCenter2 / schwarzschildRadius;//limit step size close to BH
stepSize = min(stepSize, min(farLimit, closeLimit));

// Frame dragging computation below: (see https://www.shadertoy.com/view/sdjcWm)
Expand All @@ -229,17 +229,17 @@ void main() {

if(hasAccretionDisk) {
// the distance in the unit of the schwarzschild radius
float relativeDistance = distanceToCenter / object_radius;
// the glow mask fades the glow when to close to the horizon (the photon sphere has a radius of 1.5 * schwarzschild, so 1.7 is slightly above for artistic reasons)
float glowMask = smoothstep(1.7, 2.5, relativeDistance);
col += 0.5 * vec4(1.0, 0.9, 0.6, 1.0) * (stepSize / object_radius) * glowMask / (relativeDistance * relativeDistance);
float relativeDistance = distanceToCenter / schwarzschildRadius;
// the glow mask fades the glow when to close to the horizon (the photon sphere has a radius of 1.5 * schwarzschild, so 1.0 is slightly below for artistic reasons: bloom leaks at the camera level)
float glowMask = smoothstep(1.0, 2.5, relativeDistance);
col += 0.5 * vec4(1.0, 0.9, 0.6, 1.0) * (stepSize / schwarzschildRadius) * glowMask / (relativeDistance * relativeDistance);
}
}

if (distanceToCenter < object_radius) {
if (distanceToCenter < schwarzschildRadius) {
suckedInBH = true;
break;
} else if (distanceToCenter > object_radius * 5000.0) {
} else if (distanceToCenter > schwarzschildRadius * 5000.0) {
escapedBH = true;
break;
} else if (projectedDistance <= accretionDiskHeight) {
Expand Down Expand Up @@ -274,10 +274,11 @@ void main() {
behindBH = behindBH && dot(closestPointEndRay - camera_position, object_position - camera_position) >= 0.0;

vec4 bg = vec4(0.0);
if(uv.x >= 0.0 && uv.x <= 1.0 && uv.y >= 0.0 && uv.y <= 1.0 && behindBH) {
if(uv.x > 0.0 && uv.x < 1.0 && uv.y > 0.0 && uv.y < 1.0 && behindBH) {
bg = texture2D(textureSampler, uv);
} else {
rayDir = vec3(starfieldRotation * vec4(rayDir, 1.0));
rayDir.z *= -1.0;
bg = texture(starfieldTexture, rayDir);
}

Expand Down
2 changes: 2 additions & 0 deletions src/shaders/lensflare.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ float getSun(vec2 uv){
return length(uv) < 0.009 ? 1.0 : 0.0;
}

#define CHEAP_FLARE

//from: https://www.shadertoy.com/view/XdfXRX
vec3 lensflares(vec2 uv, vec2 pos)
{
Expand Down
13 changes: 9 additions & 4 deletions src/shaders/ringsFragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,21 @@ void main() {

vec3 ringShadeColor = rings_color;

// hypothèse des rayons parallèles
int nbLightSources = nbStars;
float softShadowFactor = 1.0;
for (int i = 0; i < nbStars; i++) {
// hypothèse des rayons parallèles
vec3 rayToSun = normalize(star_positions[i] - object_position);
float t2, t3;
if (rayIntersectSphere(samplePoint, rayToSun, object_position, object_radius, t2, t3)) {
nbLightSources -= 1;
vec3 closestPointToPlanetCenter = samplePoint + rayToSun * (t2 + t3) * 0.5;
float closestDistanceToPlanetCenter = length(closestPointToPlanetCenter - object_position);
float r01 = remap(closestDistanceToPlanetCenter, 0.0, object_radius, 0.0, 1.0);
softShadowFactor = min(softShadowFactor, 0.2 + 0.8 * smoothstep(0.85, 1.0, r01));
} else {
softShadowFactor = 1.0;
}
}
if (nbLightSources == 0) ringShadeColor *= 0.1;
ringShadeColor *= softShadowFactor;

finalColor = vec4(mix(finalColor.rgb * (1.0 - ringDensity), ringShadeColor, ringDensity), 1.0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/shaders/telluricPlanetMaterial/fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void main() {

float metallic = steepFactor * steepMetallic + plainFactor * plainMetallic + (desertFactor+beachFactor) * desertMetallic + snowFactor * snowMetallic;

vec3 normalW = vec3(world * vec4(normal, 0.0));
vec3 normalW = vNormalW;

// pbr accumulation
vec3 Lo = vec3(0.0);
Expand Down
8 changes: 8 additions & 0 deletions src/shaders/telluricPlanetMaterial/vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ uniform mat4 worldViewProjection;
uniform vec3 chunkPositionPlanetSpace;

uniform mat4 planetWorldMatrix;
uniform float planetRadius;

uniform vec3 cameraPosition;

Expand All @@ -46,6 +47,13 @@ void main() {
vPositionW = vec3(world * vec4(position, 1.0));
vNormalW = vec3(world * vec4(normal, 0.0));

// smooth normal when far away from the planet
vec3 planetPosition = vec3(planetWorldMatrix[3]);
float distanceToPlanet = max(0.0, length(cameraPosition - planetPosition) - planetRadius);
vec3 planetNormalW = normalize(vPositionW - planetPosition);

vNormalW = mix(vNormalW, planetNormalW, 0.9 * smoothstep(20e3, 300e3, distanceToPlanet));

vPosition = chunkPositionPlanetSpace + position;

vUnitSamplePoint = normalize(vPosition);
Expand Down
3 changes: 1 addition & 2 deletions src/shaders/utils/pbr.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ vec3 calculateLight(vec3 albedo, vec3 normal, float roughness, float metallic, v

float NdotL = max(dot(normal, lightDir), 0.0);

vec3 ambient = vec3(0.005) * albedo * radiance;
vec3 diffuse = kD * (albedo)/ PI;
return (diffuse + specular) * radiance * NdotL + ambient;
return (diffuse + specular) * radiance * NdotL;
}
Loading