-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ndorfin/insturmentation
Insturmentation overhaul
- Loading branch information
Showing
17 changed files
with
196 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
game-instruments { | ||
display: block; | ||
} | ||
|
||
.instrument { | ||
display: block; | ||
position: absolute; | ||
z-index: 20; | ||
border: 2px solid hsl(0, 0%, 50%); | ||
background-color: black; | ||
box-shadow: inset 0 0 0 2px hsla(0, 0%, 0%, 0.5); | ||
} | ||
|
||
.instrument::after { | ||
display: block; | ||
position: absolute; | ||
inset-block-start: calc(-1em - 6px); | ||
inset-inline-start: -2px; | ||
inset-inline-end: -2px; | ||
line-height: 1; | ||
text-align: center; | ||
content: attr(label); | ||
font-size: 0.875rem; | ||
font-weight: 700; | ||
text-transform: uppercase; | ||
color: black; | ||
border: 2px solid hsl(0, 0%, 50%); | ||
background-color: hsl(0, 0%, 50%); | ||
border-radius: 2px 2px 0 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
instrument-fuel { | ||
inset-block-end: calc(0.5 * var(--unit_root)); | ||
inset-inline-end: calc(5.5 * var(--unit_root)); | ||
inline-size: calc(2 * var(--unit_root)); | ||
block-size: calc(10 * var(--unit_root)); | ||
background-image: linear-gradient(hsl(198.74deg 100% 50%), hsl(218.79deg 100% 50%)); | ||
background-clip: content-box; | ||
} | ||
|
||
instrument-fuel-amount { | ||
display: block; | ||
position: absolute; | ||
inset: 0; | ||
inset-block-end: calc(var(--lander_fuel) * 1%); | ||
background-color: black; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
instrument-map { | ||
inset-block-end: calc(0.5 * var(--unit_root)); | ||
inset-inline-start: calc(0.5 * var(--unit_root)); | ||
inline-size: calc(7 * var(--unit_root)); | ||
block-size: calc(10 * var(--unit_root)); | ||
} | ||
|
||
instrument-map-lander { | ||
display: block; | ||
position: absolute; | ||
inline-size: calc(0.5 * var(--unit_root)); | ||
block-size: calc(0.5 * var(--unit_root)); | ||
inset-block-end: calc(var(--lander_position_y) * 1%); | ||
inset-inline-start: calc(var(--lander_position_x) * 1%); | ||
border-radius: calc(0.125 * var(--unit_root)); | ||
transition-property: inset-block-end, inset-inline-start; | ||
transition-duration: 0.05s; | ||
transition-timing-function: linear; | ||
transform: translateX(-50%); | ||
background-color: orange; | ||
} | ||
|
||
.notification { | ||
text-transform: uppercase; | ||
font-weight: 700; | ||
opacity: 0; | ||
} | ||
|
||
.notification.warning { | ||
color: gold; | ||
} | ||
|
||
.notification.error { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
instrument-rotation { | ||
inset-block-end: calc(0.5 * var(--unit_root)); | ||
inset-inline-start: 50%; | ||
transform: translateX(-50%); | ||
inline-size: calc(10 * var(--unit_root)); | ||
block-size: calc(2 * var(--unit_root)); | ||
background-color: white; | ||
} | ||
|
||
instrument-rotation-amount { | ||
/* | ||
The input `--lander_rotation` can be an integer between -100 (full-left rotation) and 100 (full-right rotation). | ||
The closer the value is 0, the better. | ||
*/ | ||
|
||
--rotation-indicator-position: calc(50 - (var(--lander_rotation) / 2)); | ||
|
||
/* | ||
We want to use hue degrees, where: | ||
-100 0 100 | ||
<-----------------------------------------------> | ||
0deg 120deg 0deg | ||
(Red) (Green) (Red) | ||
*/ | ||
|
||
/* First strip any negative sign from the rotation amount */ | ||
--rotation-normalised: calc( | ||
var(--lander_rotation) * var(--lander_rotation) / 10000 | ||
); | ||
|
||
--rotation-indicator-danger-level: calc( | ||
120 - (var(--rotation-normalised) * 120) | ||
); | ||
|
||
display: block; | ||
position: absolute; | ||
inset-block-start: 0; | ||
inset-block-end: 0; | ||
inset-inline-end: calc(var(--rotation-indicator-position) * 1%); | ||
inline-size: 6px; | ||
transition-property: inset-block-end; | ||
transition-duration: 0.05s; | ||
transition-timing-function: linear; | ||
background-color: grey; | ||
background-color: hsl(calc(var(--rotation-indicator-danger-level) * 1deg), 100%, 50%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
instrument-thruster { | ||
inset-block-end: calc(0.5 * var(--unit_root)); | ||
inset-inline-end: calc(0.5 * var(--unit_root)); | ||
inline-size: calc(4 * var(--unit_root)); | ||
block-size: calc(10 * var(--unit_root)); | ||
background-image: linear-gradient(hsl(0deg, 100%, 50%), hsl(40deg, 100%, 50%)); | ||
background-clip: content-box; | ||
} | ||
|
||
instrument-thruster-amount { | ||
display: block; | ||
position: absolute; | ||
inset: 0; | ||
inset-block-end: calc(var(--lander_thruster) * 1%); | ||
transition-property: inset-block-end; | ||
transition-duration: 0.05s; | ||
transition-timing-function: linear; | ||
background-color: black; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
lunar-surface { | ||
display: block; | ||
background-color: hsl(0, 0%, 20%); | ||
block-size: calc(10 * var(--unit_root)); | ||
position: absolute; | ||
inset-block-end: 0; | ||
inset-inline-start: 0; | ||
inset-inline-end: 0; | ||
background-color: hsl(0, 0%, 20%); | ||
background-image: linear-gradient(hsl(0, 0%, 20%), hsl(0, 0%, 10%) 50%); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.