feat: add portrait line art to flash screen
This commit is contained in:
@@ -61,7 +61,7 @@ fn check_transitions(repaint: RepaintBufferType, buffer_count: usize) {
|
|||||||
let instructions = frames.render(&ui, &window);
|
let instructions = frames.render(&ui, &window);
|
||||||
for _ in 0..2 {
|
for _ in 0..2 {
|
||||||
ui.set_countdown(3);
|
ui.set_countdown(3);
|
||||||
ui.set_flash_opacity(0.75);
|
ui.set_flash_opacity(0.95);
|
||||||
for _ in 0..3 {
|
for _ in 0..3 {
|
||||||
frames.render(&ui, &window);
|
frames.render(&ui, &window);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,35 @@ export component AppWindow inherits Window {
|
|||||||
active: root.hand-detected;
|
active: root.hand-detected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if root.flash-opacity > 0: Rectangle {
|
||||||
|
// Keep the portrait below the central countdown and most of the
|
||||||
|
// monitor white so it continues to provide light for the photo.
|
||||||
|
width: min(360px * root.ui-scale, root.width * 0.65, root.height * 0.36);
|
||||||
|
height: self.width * 200 / 360 + 40px * root.ui-scale;
|
||||||
|
x: (root.width - self.width) / 2;
|
||||||
|
y: root.height - self.height - root.inset - root.safe-area-insets.bottom;
|
||||||
|
background: transparent;
|
||||||
|
pose-label := Text {
|
||||||
|
x: 0px;
|
||||||
|
y: 0px;
|
||||||
|
width: parent.width;
|
||||||
|
height: 32px * root.ui-scale;
|
||||||
|
text: "Pose!";
|
||||||
|
color: #20302b77;
|
||||||
|
font-size: 26px * root.ui-scale;
|
||||||
|
font-weight: 600;
|
||||||
|
horizontal-alignment: center;
|
||||||
|
vertical-alignment: center;
|
||||||
|
}
|
||||||
|
Image {
|
||||||
|
x: 0px;
|
||||||
|
y: pose-label.y + pose-label.height + 8px * root.ui-scale;
|
||||||
|
width: parent.width;
|
||||||
|
height: parent.height - self.y;
|
||||||
|
source: @image-url("assets/photo-pose.svg");
|
||||||
|
image-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
if root.countdown > 0: Text {
|
if root.countdown > 0: Text {
|
||||||
width: root.width;
|
width: root.width;
|
||||||
height: root.height;
|
height: root.height;
|
||||||
|
|||||||
27
ui/assets/photo-pose.svg
Normal file
27
ui/assets/photo-pose.svg
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="200" viewBox="0 0 360 200" fill="none" stroke="#20302b" stroke-opacity="0.467" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<!-- Round portrait proportions: peace sign and hand on hip. -->
|
||||||
|
<ellipse cx="91" cy="48" rx="29" ry="31" transform="rotate(-12 91 48)"/>
|
||||||
|
<path d="M78 80C65 82 62 98 55 99S40 87 34 81M30 92C40 110 51 122 62 117L69 113C65 129 63 139 71 145C82 153 109 153 118 145C124 139 120 123 118 114L133 125L121 136C115 142 123 151 130 146L149 132C157 126 154 118 148 113L117 88Q109 82 105 82"/>
|
||||||
|
<path d="M34 81Q42 72 38 63L37 45C37 39 29 39 29 45L29 61L22 45C19 39 12 43 15 49L24 70C15 61 9 69 15 76L30 92M73 147L68 174Q50 175 51 184Q52 190 62 190L75 190Q82 190 84 182L92 158L103 174L98 180Q91 190 100 193Q105 195 110 190L124 179Q130 174 125 167L113 149"/>
|
||||||
|
<!-- A different pose: arms arched overhead and a leg kicked sideways. -->
|
||||||
|
<ellipse cx="267" cy="72" rx="30" ry="29" transform="rotate(15 267 72)"/>
|
||||||
|
<!-- A single body outline keeps the hips and kicked leg free of seams.
|
||||||
|
Both raised arms stay clear of the head. -->
|
||||||
|
<path d="M232 68
|
||||||
|
C229 61 225 45 230 35
|
||||||
|
Q235 27 229 23 Q223 19 218 27
|
||||||
|
C209 42 215 61 226 80
|
||||||
|
C233 93 245 103 255 104
|
||||||
|
C245 115 241 131 248 145
|
||||||
|
L244 173 Q227 175 229 183
|
||||||
|
Q230 190 240 189 L250 188
|
||||||
|
Q259 187 260 179 L266 155
|
||||||
|
L301 172 Q309 176 316 169
|
||||||
|
L337 149 Q344 142 338 137
|
||||||
|
Q332 132 326 139 L308 154
|
||||||
|
L287 134 C285 121 284 112 279 104
|
||||||
|
C289 100 301 89 309 75
|
||||||
|
C320 57 324 37 315 24
|
||||||
|
Q310 17 304 21 Q298 25 303 33
|
||||||
|
C308 44 306 57 303 64"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user