Align practice visuals and keep Astral Projection open-ended
No files matched your search
@@ -76,7 +76,7 @@ AstralStart :: (app: *InnerBreeze) {
|
||||
return
|
||||
}
|
||||
mark_exercise_manual_seen(app, EXERCISE_ASTRAL_PROJECTION)
|
||||
astral_clock = AstralClock.{astral_course.duration, 0}
|
||||
astral_clock = AstralClock.{}
|
||||
astral_frame_carry = 0.0
|
||||
astral_scroll = 0
|
||||
astral_last_cue = -1
|
||||
@@ -89,15 +89,15 @@ AstralStart :: (app: *InnerBreeze) {
|
||||
}
|
||||
|
||||
AstralElapsed :: () -> s32 {
|
||||
return astral_course.duration - astral_clock.remaining
|
||||
return astral_clock.elapsed_seconds
|
||||
}
|
||||
|
||||
AstralDuration :: () -> s32 {
|
||||
return astral_course.duration
|
||||
return 0
|
||||
}
|
||||
|
||||
AstralRemaining :: () -> s32 {
|
||||
return astral_clock.remaining
|
||||
return 0
|
||||
}
|
||||
|
||||
AstralSave :: (app: *InnerBreeze, output: *u8, capacity: s64) {
|
||||
@@ -125,25 +125,11 @@ AstralEnd :: (app: *InnerBreeze) {
|
||||
app_switch_screen(app, ScreenStart)
|
||||
}
|
||||
|
||||
AstralFinish :: (app: *InnerBreeze) {
|
||||
result_path: [FS_PATH_MAX]u8
|
||||
result_path[0] = cast(u8)0
|
||||
AstralSave(app, *result_path[0], size_of(type_of(result_path)))
|
||||
send_session_complete(app)
|
||||
AstralStop(app)
|
||||
app_prepare_session_results(app, EXERCISE_ASTRAL_PROJECTION,
|
||||
AstralElapsed(), 0, null, null, 0, *result_path[0])
|
||||
app_switch_screen(app, ScreenResults)
|
||||
}
|
||||
|
||||
AstralAdvanceElapsed :: (app: *InnerBreeze, milliseconds: s32) {
|
||||
if AstralActive(app) == 0 {
|
||||
return
|
||||
}
|
||||
astral_clock = AstralAdvance(astral_clock, milliseconds, app.session_paused != 0)
|
||||
if astral_clock.remaining <= 0 {
|
||||
AstralFinish(app)
|
||||
}
|
||||
}
|
||||
|
||||
AstralCueKey :: () -> string {
|
||||
@@ -207,9 +193,9 @@ AstralCueText :: () -> string {
|
||||
AstralTimeText :: (output: []u8) -> string {
|
||||
cursor: s32 = 0
|
||||
output[0] = cast(u8)0
|
||||
unused TextBufferAppendNumber(output, *cursor, astral_clock.remaining / 60)
|
||||
unused TextBufferAppendNumber(output, *cursor, AstralElapsed() / 60)
|
||||
unused TextBufferAppendByte(output, *cursor, cast(u8)58)
|
||||
seconds := astral_clock.remaining % 60
|
||||
seconds := AstralElapsed() % 60
|
||||
if seconds < 10 {
|
||||
unused TextBufferAppendByte(output, *cursor, cast(u8)48)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Bounded downloadable guidance and the same clock used by Meditation.
|
||||
// Bounded downloadable guidance within an open-ended session.
|
||||
#import "json_scan"
|
||||
#import "byte_text_linux"
|
||||
#import, file "../../src/practices/meditation/meditation_timing.zi";
|
||||
|
||||
AstralCueCapacity :: 32
|
||||
|
||||
@@ -11,13 +10,14 @@ AstralCue :: struct {
|
||||
}
|
||||
|
||||
AstralCourse :: struct {
|
||||
// Length of the narrated introduction, never a session limit.
|
||||
duration: s32
|
||||
count: s32
|
||||
cues: [AstralCueCapacity]AstralCue
|
||||
}
|
||||
|
||||
AstralClock :: struct {
|
||||
remaining: s32
|
||||
elapsed_seconds: s32
|
||||
remainder_ms: s32
|
||||
}
|
||||
|
||||
@@ -89,9 +89,13 @@ AstralCueAt :: (course: *AstralCourse, elapsed: s32) -> s32 {
|
||||
}
|
||||
|
||||
AstralAdvance :: (clock: AstralClock, elapsed_ms: s32, paused: bool) -> AstralClock {
|
||||
if paused || clock.remaining <= 0 || elapsed_ms <= 0 {
|
||||
if paused || elapsed_ms <= 0 {
|
||||
return clock
|
||||
}
|
||||
step := AdvanceMeditationTime(clock.remaining, clock.remainder_ms, elapsed_ms)
|
||||
return AstralClock.{step.remaining_seconds, ifx step.completed then 0 else step.remainder_ms}
|
||||
total := cast(s64)clock.remainder_ms + cast(s64)elapsed_ms
|
||||
seconds := cast(s64)clock.elapsed_seconds + total / 1000
|
||||
if seconds >= 2147483647 {
|
||||
return AstralClock.{2147483647, 0}
|
||||
}
|
||||
return AstralClock.{cast(s32)seconds, cast(s32)(total % 1000)}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 78 B |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 148 KiB |
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"tool": "Built-in image_gen",
|
||||
"date": "2026-10-20",
|
||||
"prompts": {
|
||||
"workoutLight": "Use case: stylized-concept, style-transfer. Asset: replacement 2:1 landscape cover for Inner Breeze's 7 Minute Workout practice. Reference image 1 is the old workout cover, which needs a fresh composition; reference image 2 is the breathing practice banner and is the exact illustration style to match. Draw a single fit adult woman with dark hair in a bun, jade-green athletic top, deep blue trousers and dark trainers, doing a clearly readable bodyweight squat in three-quarter view on an earth-brown woodland exercise terrace. Hands naturally joined in front of chest, hips back, feet planted. A quiet blue mountain lake and pale misty hills in the distance, pine branches only at far edges. Calm handmade 2D storybook illustration with subtle paper grain, softly shaded forms, crisp restrained contours like reference 2. Cool jade green and lake blue palette, brown ground, tiny light orange accent. One focal figure, strong figure/background contrast, keep whole figure in central half, all body parts comfortably within central horizontal 2:1 band. Soft clear daylight. Fresh setting and pose distinct from the old jumping-jack artwork. No text, numbers, clocks, UI, logos, watermarks, extra people or exercise equipment. Wide 2:1 framing.",
|
||||
"astralLight": "Use case: stylized-concept, style-transfer. Asset: replacement 2:1 landscape cover for Inner Breeze Astral Projection guided relaxation. Reference 1 is its old cover; reference 2 is the Meditation night banner and sets the handmade storybook drawing style. Make a new beautiful tranquil scene: a person lying safely asleep on a low earth-brown wooden bed beside an open veranda, pale blue translucent dream-self gently rising just above them, connected by one fine curved silver thread. Treat the sleeping person and corresponding dream-self as one central focal motif, naturally readable anatomy and peaceful face. Beyond the veranda a spacious teal lake, layered soft blue-green mountains and a few stars, pine silhouettes framing the extreme sides, small crescent moon. Light version: pale blue dawn sky still carrying a few stars, cool jade and blue base, brown bed, just one tiny light-orange accent on the blanket. Richer depth from overlapping mountain layers, delicate paper grain, softly shaded painterly 2D storybook forms matching reference 2; no plastic, glossy, photorealistic or hard neon look. Keep both entire figures and bed comfortably inside central 2:1 crop, with clear foreground/background contrast. No text, labels, numbers, clocks, UI, logos or watermarks. Wide 2:1 framing.",
|
||||
"workoutDark": "Use case: lighting-weather. Edit the supplied 7 Minute Workout cover into its DARK THEME companion. Preserve precisely the same woman doing a squat, face, hands, body pose, clothing, shoes, landscape, camera, proportions, 2:1 composition and handmade storybook illustration style. Change only lighting/time: deep blue twilight sky with a few discreet stars and a small crescent, muted blue lake, jade pine shadows, softly moonlit figure and brown terrace. Keep the main figure clearly legible, pale skin and jade clothing distinct against the environment. Cool green-blue palette, no neon or glossy effects, no text, watermark or extra subjects.",
|
||||
"astralDark": "Use case: lighting-weather. Edit the supplied Astral Projection cover into its DARK THEME companion. Preserve precisely the same sleeping person on the bed, translucent floating dream-self, silver thread, veranda, composition, anatomy, clothing and handmade storybook illustration style. Change only the time and light to a tranquil deep midnight blue night, crescent moon and sparse stars over the dark teal lake and layered blue mountains. Faint cool illumination on face, wooden bed and veranda, small contained amber lantern accent. Dream-self remains softly pale blue and clearly readable. Calm cool green-blue base, brown wood, no huge glow, no neon, text, labels, watermarks or extra figures."
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# Flat Sun Salutation characters
|
||||
|
||||
The app now solves Sun Salutation on the articulated body shared with Tai Chi
|
||||
and the 7-Minute Workout. `sun_salutation_pose.zi` keeps the twelve yoga poses
|
||||
and alternates the leading leg each round; `sun_salutation_draw.zi` draws the
|
||||
same Jade woman and Indigo man from a fixed side view. The session, small
|
||||
window, previews and guide all use that renderer. The timing and breathing
|
||||
cues stay with `sun_salutation_rules.zi`.
|
||||
|
||||
The scripts below retain the earlier frame artwork for reference and exports.
|
||||
|
||||
`scripts/render-sun-salutation-flat.py` draws the Sun Salutation in a clean,
|
||||
flat vector style: flat colours, no textures or gradients, one darker tone
|
||||
for the far limbs and shades. It reuses the pose timeline, inverse
|
||||
|
||||
@@ -7221,7 +7221,7 @@ Astrální projekce
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Patnáctiminutová vedená vizualizace s uvolněním, představou vznášení a jemným návratem.
|
||||
Vedená relaxace a představa vznášení s hudbou na pozadí. Pokračujte, jak dlouho chcete, dokud cvičení sami neukončíte.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7401,9 +7401,17 @@ Trénink
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Lehni si na klidné místo, nejlépe před spaním, klidně se sluchátky. 40 minut tě klidný hlas provází hlubokým uvolněním, pomalým sestupem, pocitem vznášení a jemným návratem. Pokud usneš, nevadí to.
|
||||
Lehněte si na klidném místě, ideálně před spaním, případně se sluchátky. Klidný hlas vás provede hlubokým uvolněním a představou vznášení, pak utichne. Cvičení i hudba na pozadí pokračují, dokud je sami neukončíte. Pokud usnete, je to v pořádku.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
V nabídce Přizpůsobit vybereš hudbu v pozadí a její hlasitost, zapneš nebo vypneš hlasový doprovod a zvolíš jeho jazyk. Bez hlasového doprovodu se pokyny zobrazí jako text.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Cvičení
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Dokončete sedmiminutový trénink.
|
||||
---
|
||||
@@ -7215,7 +7215,7 @@ Astralprojektion
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Eine 15-minütige geführte Visualisierung mit Entspannung, vorgestelltem Schweben und sanfter Rückkehr.
|
||||
Geführte Entspannung und eine Schwebevisualisierung mit Hintergrundmusik. Mache so lange weiter, wie du möchtest, bis du selbst aufhörst.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7395,9 +7395,17 @@ Training
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Leg dich an einen ruhigen Ort, am besten vor dem Schlafen, gern mit Kopfhörern. 40 Minuten lang führt dich eine ruhige Stimme durch tiefe Entspannung, einen langsamen Abstieg, das Gefühl des Schwebens und eine sanfte Rückkehr. Wenn du dabei einschläfst, ist das in Ordnung.
|
||||
Lege dich an einen ruhigen Ort, am besten vor dem Einschlafen, gerne mit Kopfhörern. Eine ruhige Stimme führt dich durch tiefe Entspannung und vorgestelltes Schweben und verstummt dann. Die Sitzung und die Hintergrundmusik laufen weiter, bis du sie beendest. Wenn du einschläfst, ist das völlig in Ordnung.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
Unter „Anpassen“ wählst du die Hintergrundmusik und ihre Lautstärke, schaltest die Sprachausgabe ein oder aus und wählst ihre Sprache. Ohne Sprachausgabe erscheint die Anleitung als Text.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Bewegung
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Absolviere das 7-Minuten-Training.
|
||||
---
|
||||
@@ -7239,7 +7239,7 @@ Astral Projection
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
A 15-minute guided visualization with relaxation, imagined floating and a gentle return.
|
||||
A guided relaxation and floating visualization with background music. Continue for as long as you like, until you stop.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7419,9 +7419,17 @@ Workout
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Lie down somewhere quiet, ideally before sleep, with headphones if you like. For 40 minutes a calm voice guides you through deep relaxation, a slow descent, the feeling of floating and a gentle return. If you drift off to sleep, that is fine.
|
||||
Lie down somewhere quiet, ideally before sleep, with headphones if you like. A calm voice guides you through deep relaxation and imagined floating, then grows quiet. The session and background music continue until you stop them. If you drift off to sleep, that is fine.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
In Customize, choose the background music and its volume, turn the voice narration on or off and pick its language. Without narration the guidance shows as text.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Exercise
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Complete the 7 Minute Workout.
|
||||
---
|
||||
@@ -7215,7 +7215,7 @@ Proyección astral
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Una visualización guiada de 15 minutos con relajación, flotación imaginada y un regreso suave.
|
||||
Una relajación guiada con visualización de flotación y música de fondo. Continúa el tiempo que quieras, hasta que la detengas.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7395,9 +7395,17 @@ Entrenamiento
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Túmbate en un lugar tranquilo, mejor antes de dormir, con auriculares si quieres. Durante 40 minutos una voz serena te guía por una relajación profunda, un descenso lento, la sensación de flotar y un regreso suave. Si te quedas dormido, no pasa nada.
|
||||
Recuéstate en un lugar tranquilo, idealmente antes de dormir, con auriculares si quieres. Una voz serena te guía hacia una relajación profunda y una flotación imaginada, y luego guarda silencio. La sesión y la música de fondo continúan hasta que las detengas. Si te duermes, está bien.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
En Personalizar eliges la música de fondo y su volumen, activas o desactivas la narración de voz y eliges su idioma. Sin narración, la guía aparece como texto.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Ejercicio
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Completa el entrenamiento de 7 minutos.
|
||||
---
|
||||
@@ -7203,7 +7203,7 @@ Projection astrale
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Une visualisation guidée de 15 minutes avec détente, flottement imaginé et retour en douceur.
|
||||
Une relaxation guidée et une visualisation de flottement avec musique de fond. Continuez aussi longtemps que vous le souhaitez, jusqu’à votre arrêt.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7383,9 +7383,17 @@ Entraînement
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Allonge-toi dans un endroit calme, idéalement avant de dormir, avec un casque si tu veux. Pendant 40 minutes, une voix douce te guide vers une relaxation profonde, une lente descente, la sensation de flotter et un retour en douceur. Si tu t’endors, ce n’est pas grave.
|
||||
Allongez-vous dans un endroit calme, idéalement avant de dormir, avec un casque si vous le souhaitez. Une voix apaisante vous guide vers une relaxation profonde et un flottement imaginé, puis se tait. La séance et la musique de fond continuent jusqu’à ce que vous les arrêtiez. Si vous vous endormez, ce n’est pas un problème.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
Dans Personnaliser, choisis la musique de fond et son volume, active ou coupe la narration vocale et choisis sa langue. Sans narration, les consignes s’affichent en texte.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Exercice
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Terminez l’entraînement de 7 minutes.
|
||||
---
|
||||
@@ -7204,7 +7204,7 @@ Proyeksi Astral
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Visualisasi terpandu selama 15 menit dengan relaksasi, bayangan melayang, dan kembali dengan lembut.
|
||||
Relaksasi terpandu dan visualisasi melayang dengan musik latar. Lanjutkan selama yang Anda mau, hingga Anda menghentikannya.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7384,9 +7384,17 @@ Latihan fisik
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Berbaringlah di tempat yang tenang, sebaiknya sebelum tidur, pakai headphone jika mau. Selama 40 menit suara yang tenang memandumu melalui relaksasi dalam, turun perlahan, rasa melayang, dan kembali dengan lembut. Kalau kamu tertidur, tidak apa-apa.
|
||||
Berbaringlah di tempat tenang, sebaiknya sebelum tidur, dengan headphone jika Anda mau. Suara yang tenang memandu Anda melalui relaksasi mendalam dan bayangan melayang, lalu menjadi hening. Sesi dan musik latar terus berjalan sampai Anda menghentikannya. Tidak apa-apa jika Anda tertidur.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
Di Sesuaikan, pilih musik latar dan volumenya, nyalakan atau matikan narasi suara, dan pilih bahasanya. Tanpa narasi, panduannya tampil sebagai teks.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Olahraga
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Selesaikan latihan 7 menit.
|
||||
---
|
||||
@@ -7204,7 +7204,7 @@ Proiezione astrale
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Una visualizzazione guidata di 15 minuti con rilassamento, un galleggiamento immaginato e un dolce ritorno.
|
||||
Rilassamento guidato e visualizzazione di fluttuazione con musica di sottofondo. Continua quanto desideri, finché non interrompi la sessione.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7384,9 +7384,17 @@ Allenamento
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Sdraiati in un posto tranquillo, meglio prima di dormire, con le cuffie se vuoi. Per 40 minuti una voce calma ti guida in un rilassamento profondo, una lenta discesa, la sensazione di fluttuare e un dolce ritorno. Se ti addormenti, va bene così.
|
||||
Sdraiati in un luogo tranquillo, preferibilmente prima di dormire, con le cuffie se vuoi. Una voce calma ti guida nel rilassamento profondo e nella fluttuazione immaginata, poi lascia spazio al silenzio. La sessione e la musica di sottofondo continuano finché non le interrompi. Se ti addormenti, va benissimo.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
In Personalizza scegli la musica di sottofondo e il suo volume, attivi o disattivi la narrazione vocale e ne scegli la lingua. Senza narrazione, la guida appare come testo.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Esercizio
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Completa l’allenamento di 7 minuti.
|
||||
---
|
||||
@@ -7200,7 +7200,7 @@ Inner Breeze がバージョン %s に更新されました。
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
リラックスし、浮遊をイメージして、穏やかに意識を戻す15分間のガイド付き瞑想です。
|
||||
音声ガイドと背景音楽で、深いリラックスと浮遊のイメージを楽しみます。自分で止めるまで、好きなだけ続けられます。
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7380,9 +7380,17 @@ Inner Breeze がバージョン %s に更新されました。
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
静かな場所で横になりましょう。眠る前がおすすめで、ヘッドホンを使ってもかまいません。40分間、穏やかな声が深いリラックス、ゆっくりとした下降、浮かぶ感覚、そしてやさしい帰還へと導きます。途中で眠ってしまっても大丈夫です。
|
||||
静かな場所で横になりましょう。寝る前がおすすめです。お好みでヘッドホンを使ってください。穏やかな声が深いリラックスと浮遊のイメージへ導き、その後は静かになります。セッションと背景音楽は、自分で止めるまで続きます。途中で眠ってしまっても大丈夫です。
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
「カスタマイズ」では、背景音楽と音量を選び、音声ガイドのオン・オフと言語を設定できます。音声ガイドがオフのときは、案内が文字で表示されます。
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
運動
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
7分間ワークアウトを完了しましょう。
|
||||
---
|
||||
@@ -7210,7 +7210,7 @@ Inner Breeze가 %s 버전으로 업데이트되었어요.
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
이완하고 떠오르는 모습을 상상한 뒤 부드럽게 돌아오는 15분 안내 명상입니다.
|
||||
배경 음악과 함께하는 이완 및 떠오르는 느낌의 심상 안내입니다. 직접 멈출 때까지 원하는 만큼 계속하세요.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7390,9 +7390,17 @@ Inner Breeze가 %s 버전으로 업데이트되었어요.
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
조용한 곳에 누우세요. 잠들기 전이 가장 좋고, 원하면 헤드폰을 써도 돼요. 40분 동안 차분한 목소리가 깊은 이완, 천천히 내려가기, 떠오르는 느낌, 그리고 부드러운 돌아오기로 안내해요. 도중에 잠들어도 괜찮아요.
|
||||
조용한 곳에 누워 보세요. 잠들기 전이 좋으며, 원한다면 헤드폰을 사용하세요. 차분한 목소리가 깊은 이완과 떠오르는 상상을 안내한 뒤 조용해집니다. 세션과 배경 음악은 직접 멈출 때까지 계속됩니다. 도중에 잠들어도 괜찮습니다.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
맞춤 설정에서 배경 음악과 음량을 고르고, 음성 안내를 켜거나 끄고 언어를 선택하세요. 음성 안내가 꺼져 있으면 안내가 글로 표시돼요.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
운동
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
7분 운동을 완료하세요.
|
||||
---
|
||||
@@ -7213,7 +7213,7 @@ Projeção astral
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
Uma visualização guiada de 15 minutos com relaxamento, flutuação imaginada e um retorno suave.
|
||||
Relaxamento guiado e visualização de flutuação com música de fundo. Continue pelo tempo que quiser, até encerrar.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7393,9 +7393,17 @@ Treino
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Deite-se num lugar tranquilo, de preferência antes de dormir, com fones de ouvido se quiser. Durante 40 minutos uma voz calma guia você por um relaxamento profundo, uma descida lenta, a sensação de flutuar e um retorno suave. Se adormecer, tudo bem.
|
||||
Deite-se num lugar tranquilo, de preferência antes de dormir, com fones se quiser. Uma voz calma guia você pelo relaxamento profundo e pela sensação imaginada de flutuar, depois fica em silêncio. A sessão e a música de fundo continuam até você encerrar. Se adormecer, tudo bem.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
Em Personalizar você escolhe a música de fundo e o volume, liga ou desliga a narração por voz e escolhe o idioma. Sem narração, a orientação aparece como texto.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Exercício
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Conclua o treino de 7 minutos.
|
||||
---
|
||||
@@ -7209,7 +7209,7 @@ Inner Breeze обновлён до версии %s.
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
15 минут визуализации с голосовым сопровождением: расслабление, воображаемое парение и мягкое возвращение.
|
||||
Расслабление с голосовым сопровождением, визуализацией парения и фоновой музыкой. Продолжайте сколько хотите, пока сами не остановите сеанс.
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7389,9 +7389,17 @@ Inner Breeze обновлён до версии %s.
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
Ляг в тихом месте, лучше перед сном, можно в наушниках. 40 минут спокойный голос ведёт тебя через глубокое расслабление, медленное погружение, ощущение парения и мягкое возвращение. Если уснёшь, ничего страшного.
|
||||
Лягте в тихом месте, лучше перед сном; при желании наденьте наушники. Спокойный голос проведёт вас через глубокое расслабление и воображаемое парение, затем стихнет. Сеанс и фоновая музыка продолжатся, пока вы сами их не остановите. Если вы уснёте, это совершенно нормально.
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
В разделе «Настроить» выбери фоновую музыку и её громкость, включи или выключи голосовое сопровождение и выбери его язык. Без сопровождения инструкции показываются текстом.
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
Физическая активность
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
Выполните семиминутную тренировку.
|
||||
---
|
||||
@@ -7215,7 +7215,7 @@ Inner Breeze 已更新至 %s 版本。
|
||||
---
|
||||
|
||||
[practice_home_subtitle_astral_projection]
|
||||
15分钟引导想象练习,放松身心,想象漂浮,再温柔地回到当下。
|
||||
在背景音乐中跟随引导放松,想象轻盈漂浮。没有时间限制,直到你主动停止。
|
||||
---
|
||||
|
||||
[habit_difficulty_label]
|
||||
@@ -7395,9 +7395,17 @@ Inner Breeze 已更新至 %s 版本。
|
||||
---
|
||||
|
||||
[astral_manual_intro_text]
|
||||
找个安静的地方躺下,最好在睡前,也可以戴上耳机。在40分钟里,平静的声音会带你经历深度放松、缓慢下沉、漂浮的感觉,然后温和地回来。如果中途睡着了也没关系。
|
||||
在安静的地方躺下,最好是在睡前,也可以戴上耳机。平静的声音会引导你深度放松并想象漂浮,随后安静下来。练习和背景音乐会一直持续,直到你主动停止。如果中途睡着了,也完全没关系。
|
||||
---
|
||||
|
||||
[astral_manual_customize_text]
|
||||
在“自定义”中选择背景音乐和音量,开启或关闭语音讲解并选择语言。关闭语音讲解时,引导会以文字显示。
|
||||
---
|
||||
|
||||
[habit_default_exercise_name]
|
||||
锻炼
|
||||
---
|
||||
|
||||
[habit_default_exercise_description]
|
||||
完成7分钟锻炼。
|
||||
---
|
||||
@@ -37,6 +37,7 @@ patterns = (
|
||||
'assets/practices/meditation/1.png', 'assets/practices/*/banner-light.png',
|
||||
'assets/practices/*/banner-dark.png',
|
||||
'assets/practices/sunsalutation/characters/*/*.png',
|
||||
'assets/practices/sunsalutation/flat-edge.png',
|
||||
'assets/practices/sunsalutation/voice/**/*', 'assets/practices/sunsalutation/voice-male/**/*',
|
||||
'assets/practices/astral_projection/**/*',
|
||||
'assets/practices/workout/**/*',
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#import, file "../practices/meditation/meditation_practice.zi";
|
||||
#import, file "../practices/sun_salutation/sun_salutation_entry.zi";
|
||||
#import, file "../practices/sun_salutation/sun_salutation_rules.zi";
|
||||
#import, file "../../apps/practice/astral_projection.zi";
|
||||
#import, file "../practices/tai_chi/tai_chi_course.zi";
|
||||
#import, file "../practices/tai_chi/tai_chi_rules.zi";
|
||||
#import, file "../practices/tai_chi/tai_chi_entry.zi";
|
||||
@@ -472,7 +473,7 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
|
||||
app.ui_scale_tenths = request.ui_scale_tenths
|
||||
}
|
||||
if (scene_text.count >= 8 && scene_text[:8] == "tai_chi_") ||
|
||||
scene_text == "practice_config_tai_chi" {
|
||||
scene_text == "practice_config_tai_chi" {
|
||||
// Screenshot fixtures supply the same verified device cache as users,
|
||||
// shown as a buyer sees it; nothing is charged or granted.
|
||||
practice_owned = ScreenshotOwned
|
||||
@@ -480,6 +481,9 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
|
||||
app.tai_chi.voice = 0
|
||||
PracticeDownloadsPump(EXERCISE_TAI_CHI, app.voice_narration_enabled != 0, app.guide_narration_enabled != 0, true)
|
||||
}
|
||||
if scene_text == "astral_projection_session" {
|
||||
PracticeDownloadsPump(EXERCISE_ASTRAL_PROJECTION, false, false, true)
|
||||
}
|
||||
if scene_text == "lumi_chat" || scene_text == "lumi_customize" ||
|
||||
scene_text == "lumi_customize_light" || scene_text == "diary" ||
|
||||
scene_text == "apps_library" {
|
||||
@@ -705,14 +709,25 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE
|
||||
app.exercise_type = EXERCISE_SUN_SALUTATION
|
||||
sun_salutation_practice_start(app)
|
||||
} else if scene_text == "sun_salutation_pose" {
|
||||
} else if scene_text == "sun_salutation_pose" ||
|
||||
(scene_text.count > 20 && scene_text[:20] == "sun_salutation_pose_") {
|
||||
// A full-body pose for store pages, selected by the request's step.
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE
|
||||
app.exercise_type = EXERCISE_SUN_SALUTATION
|
||||
app.sun_salutation.character = SUN_SALUTATION_MAN
|
||||
sun_salutation_practice_start(app)
|
||||
app.sun_salutation.step = screenshot_pose_step
|
||||
if scene_text.count > 20 {
|
||||
app.sun_salutation.step = SalutationClamp(ScreenshotParseInt(scene_text[20:], 1), 0, 11)
|
||||
}
|
||||
app.sun_salutation.step_ticks = screenshot_pose_ticks
|
||||
app.session_paused = 1
|
||||
} else if scene_text == "astral_projection_session" {
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE
|
||||
app.exercise_type = EXERCISE_ASTRAL_PROJECTION
|
||||
AstralStart(app)
|
||||
AstralAdvanceElapsed(app, 2460000)
|
||||
app.session_paused = 1
|
||||
} else if scene_text == "tai_chi_session" {
|
||||
// Part the Wild Horse's Mane, paused in its first stride.
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE
|
||||
@@ -776,8 +791,16 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE
|
||||
app.practice_tab = PRACTICE_TAB_PLAY
|
||||
app.breathing.screen = ScreenStart
|
||||
} else if scene_text == "meditation_home" || scene_text == "sun_salutation_home" {
|
||||
app.exercise_type = ifx scene_text == "meditation_home" then (EXERCISE_MEDITATION) else (EXERCISE_SUN_SALUTATION)
|
||||
} else if scene_text == "meditation_home" || scene_text == "sun_salutation_home" ||
|
||||
scene_text == "astral_projection_home" || scene_text == "workout_home" {
|
||||
app.exercise_type = EXERCISE_SUN_SALUTATION
|
||||
if scene_text == "meditation_home" {
|
||||
app.exercise_type = EXERCISE_MEDITATION
|
||||
} else if scene_text == "astral_projection_home" {
|
||||
app.exercise_type = EXERCISE_ASTRAL_PROJECTION
|
||||
} else if scene_text == "workout_home" {
|
||||
app.exercise_type = EXERCISE_WORKOUT
|
||||
}
|
||||
app.main_tab = APP_MAIN_TAB_PRACTICE
|
||||
app.practice_tab = PRACTICE_TAB_PLAY
|
||||
app.breathing.screen = ScreenStart
|
||||
@@ -935,8 +958,8 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
|
||||
app.profile_tab = PROFILE_TAB_OVERVIEW
|
||||
app.breathing.screen = ScreenProfile
|
||||
} else if scene_text == "profile_dew" || scene_text == "storage_plans" ||
|
||||
scene_text == "storage_plans_1gb" || scene_text == "dew_top_up" ||
|
||||
scene_text == "dew_gift" {
|
||||
scene_text == "storage_plans_1gb" || scene_text == "dew_top_up" ||
|
||||
scene_text == "dew_gift" {
|
||||
// A fixture Dew account in the isolated data root; nothing is fetched.
|
||||
account: AccountKeys = .{}
|
||||
if sync_account_generate(*account) == 0 ||
|
||||
|
||||
@@ -349,6 +349,12 @@ habits_add_default_set :: (habits: *Habits) {
|
||||
LocaleText("habit_default_yoga_description"),
|
||||
Color.{.r = 239, .g = 178, .b = 102, .a = 255},
|
||||
habit_activity_mask_for(EXERCISE_SUN_SALUTATION))
|
||||
habits_add_seed(habits,
|
||||
"exercise",
|
||||
LocaleText("habit_default_exercise_name"),
|
||||
LocaleText("habit_default_exercise_description"),
|
||||
Color.{.r = 99, .g = 196, .b = 165, .a = 255},
|
||||
habit_activity_mask_for(EXERCISE_WORKOUT))
|
||||
habits.selected = -1
|
||||
habits.loaded = 1
|
||||
habits_save(habits)
|
||||
@@ -527,7 +533,7 @@ habits_move_active :: (habits: *Habits, index: s32, position: s32) -> s32 {
|
||||
return target
|
||||
}
|
||||
|
||||
habits_name_exists ::(habits: *Habits, name: string, exclude_index: s32) -> s32 {
|
||||
habits_name_exists :: (habits: *Habits, name: string, exclude_index: s32) -> s32 {
|
||||
if habits == null || name.count == 0 {
|
||||
return 0
|
||||
}
|
||||
@@ -636,12 +642,12 @@ habits_init_with_defaults :: (habits: *Habits, seed_defaults: s32) {
|
||||
return
|
||||
}
|
||||
if habits.count == 3 &&
|
||||
habit_model_text_equal(AppTextFromCString(
|
||||
*habits.items[0].id[0], 40), "mind") &&
|
||||
habit_model_text_equal(AppTextFromCString(
|
||||
*habits.items[1].id[0], 40), "yoga") &&
|
||||
habit_model_text_equal(AppTextFromCString(
|
||||
*habits.items[2].id[0], 40), "fitness") {
|
||||
habit_model_text_equal(AppTextFromCString(
|
||||
*habits.items[0].id[0], 40), "mind") &&
|
||||
habit_model_text_equal(AppTextFromCString(
|
||||
*habits.items[1].id[0], 40), "yoga") &&
|
||||
habit_model_text_equal(AppTextFromCString(
|
||||
*habits.items[2].id[0], 40), "fitness") {
|
||||
if seed_defaults != 0 {
|
||||
habits_add_default_set(habits)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#import "geometry"
|
||||
#import "session"
|
||||
#import, file "sun_salutation_pose.zi";
|
||||
#import, file "sun_salutation_rules.zi";
|
||||
#import, file "../../../apps/practice/workout_moves.zi";
|
||||
#import, file "../tai_chi/tai_chi_math.zi";
|
||||
#import, file "../tai_chi/tai_chi_solve.zi";
|
||||
#import, file "../tai_chi/tai_chi_flat.zi";
|
||||
#import, file "../tai_chi/tai_chi_draw.zi";
|
||||
#import, file "../tai_chi/tai_chi_rules.zi";
|
||||
#import, file "../tai_chi/tai_chi_view.zi";
|
||||
|
||||
SUN_SALUTATION_EDGE_PATH :: "assets/practices/sunsalutation/flat-edge.png"
|
||||
sun_salutation_figure: TaiChiFlatFrame;
|
||||
|
||||
SunSalutationDrawState :: (session: Session, state: SunSalutationPracticeState,
|
||||
area: Rectangle, key: u64, alt_text: string) {
|
||||
rig := WorkoutRig()
|
||||
pose := SunSalutationPoseAt(state, *rig)
|
||||
SunSalutationDrawPose(session, state.character, pose, area, key, alt_text)
|
||||
}
|
||||
|
||||
SunSalutationDrawHeld :: (session: Session, character: s32, step: s32,
|
||||
area: Rectangle, key: u64, alt_text: string) {
|
||||
SunSalutationDrawPose(session, character, SunSalutationPose(step, false),
|
||||
area, key, alt_text)
|
||||
}
|
||||
|
||||
SunSalutationDrawPose :: (session: Session, character: s32, pose: WorkoutPose,
|
||||
area: Rectangle, key: u64, alt_text: string) {
|
||||
if area.width <= 0.0 || area.height <= 0.0 {
|
||||
return
|
||||
}
|
||||
rig := WorkoutRig()
|
||||
solved := WorkoutSolve(*pose, *rig)
|
||||
framing: TaiChiFraming
|
||||
framing.camera.yaw = -78.0 * TAI_CHI_DEGREE
|
||||
framing.camera.tilt = 6.0 * TAI_CHI_DEGREE
|
||||
framing.camera.center = TaiChiV3(0.0, 0.0, -0.08)
|
||||
framing.view_height = 2.35
|
||||
framing.view_center = 1.02
|
||||
across := framing.view_height * cast(float64)area.width / cast(float64)area.height
|
||||
if across < 2.2 {
|
||||
framing.view_height *= 2.2 / across
|
||||
}
|
||||
look := TaiChiFlatLookNamed(ifx character == SUN_SALUTATION_MAN then "indigoMan" else "jadeWoman")
|
||||
TaiChiFlatPaintLook(*sun_salutation_figure, *solved, *rig, look, framing.camera)
|
||||
TaiChiPaintFlatEdge(session, *sun_salutation_figure, framing, false, area, key,
|
||||
alt_text, SUN_SALUTATION_EDGE_PATH)
|
||||
}
|
||||
@@ -31,6 +31,7 @@ app_start_practice_from_ui :: (app: *InnerBreeze, id: s32) -> bool #foreign manu
|
||||
#import, file "../../screens/manual_screen.zi";
|
||||
#import, file "../../screens/practice_manual_layout.zi";
|
||||
#import, file "sun_salutation_assets.zi";
|
||||
#import, file "sun_salutation_draw.zi";
|
||||
#import, file "sun_salutation_entry.zi";
|
||||
#import, file "sun_salutation_rules.zi";
|
||||
|
||||
@@ -87,14 +88,14 @@ SunManualParagraph :: (step: s32,
|
||||
SunManualContentHeight :: (step: s32, width: s32) -> s32 {
|
||||
paragraph := SunManualParagraph(step, width)
|
||||
return AppScale(178 + 18) + manual_screen_guide_header_height() + AppParagraphHeight(paragraph.text, paragraph.width,
|
||||
paragraph.font, paragraph.line_gap)
|
||||
paragraph.font, paragraph.line_gap)
|
||||
}
|
||||
|
||||
SunManualPose :: (app: *InnerBreeze, pose: s32,
|
||||
bounds: Rectangle) {
|
||||
picture := SunSalutationPoseImage(app.sun_salutation.character, pose, bounds)
|
||||
picture.alt_text = LocaleText("exercise_sun_salutation")
|
||||
Image(app.ui.session, picture)
|
||||
SunSalutationDrawHeld(app.ui.session, app.sun_salutation.character,
|
||||
pose, bounds, KeyHash("sun-salutation/manual"),
|
||||
LocaleText("exercise_sun_salutation"))
|
||||
}
|
||||
|
||||
SunManualNumber :: (app: *InnerBreeze, value: s32,
|
||||
@@ -114,7 +115,7 @@ SunManualStat :: (app: *InnerBreeze, label: string,
|
||||
left.bounds = Rectangle.{cast(float32)(x + AppScale(18)),
|
||||
cast(float32)y, cast(float32)(width - AppScale(100)),
|
||||
cast(float32)AppScale(32)
|
||||
}
|
||||
}
|
||||
Text(app.ui.session, left)
|
||||
right: TextProps
|
||||
right.text = value
|
||||
@@ -123,7 +124,7 @@ SunManualStat :: (app: *InnerBreeze, label: string,
|
||||
right.bounds = Rectangle.{cast(float32)(x + width - AppScale(70)),
|
||||
cast(float32)y, cast(float32)AppScale(54),
|
||||
cast(float32)AppScale(32)
|
||||
}
|
||||
}
|
||||
Text(app.ui.session, right)
|
||||
}
|
||||
|
||||
@@ -132,7 +133,7 @@ SunManualVisual :: (app: *InnerBreeze, x: s32, width: s32,
|
||||
height := AppScale(178)
|
||||
bounds := Rectangle.{cast(float32)x, cast(float32)y.*,
|
||||
cast(float32)width, cast(float32)height
|
||||
}
|
||||
}
|
||||
face := GuideFace(2)
|
||||
PaintRoundedFill(app.ui.session, -1, bounds,
|
||||
cast(float32)AppScale(16), 10,
|
||||
@@ -149,7 +150,7 @@ SunManualVisual :: (app: *InnerBreeze, x: s32, width: s32,
|
||||
cast(float32)(y.* + AppScale(24)),
|
||||
cast(float32)pose_width,
|
||||
cast(float32)AppScale(112)
|
||||
}
|
||||
}
|
||||
SunManualPose(app, pose, pose_bounds)
|
||||
radius := AppScale(4)
|
||||
dot := Rectangle.{
|
||||
@@ -157,7 +158,7 @@ SunManualVisual :: (app: *InnerBreeze, x: s32, width: s32,
|
||||
cast(float32)(y.* + AppScale(151) - radius),
|
||||
cast(float32)(radius * 2),
|
||||
cast(float32)(radius * 2)
|
||||
}
|
||||
}
|
||||
color := ColorFromPacked(face.value.border)
|
||||
if index == 1 {
|
||||
color = ColorFromPacked(face.value.foreground)
|
||||
@@ -171,17 +172,17 @@ SunManualVisual :: (app: *InnerBreeze, x: s32, width: s32,
|
||||
SunManualStat(app,
|
||||
LocaleText("sun_salutation_repetitions_label"),
|
||||
SunManualNumber(app, app.sun_salutation.repetitions,
|
||||
"%dx"), x, row_y, width)
|
||||
"%dx"), x, row_y, width)
|
||||
row_y += AppScale(45)
|
||||
SunManualStat(app,
|
||||
LocaleText("sun_salutation_start_speed_label"),
|
||||
SunManualNumber(app, app.sun_salutation.start_seconds,
|
||||
"%d s"), x, row_y, width)
|
||||
"%d s"), x, row_y, width)
|
||||
row_y += AppScale(45)
|
||||
SunManualStat(app,
|
||||
LocaleText("sun_salutation_end_speed_label"),
|
||||
SunManualNumber(app, app.sun_salutation.end_seconds,
|
||||
"%d s"), x, row_y, width)
|
||||
"%d s"), x, row_y, width)
|
||||
}
|
||||
y.* += height + AppScale(18)
|
||||
}
|
||||
@@ -212,7 +213,7 @@ sun_manual_draw :: (app: *InnerBreeze) {
|
||||
bounds := Rectangle.{0.0, cast(float32)layout.content_y,
|
||||
cast(float32)app.ui.view_width,
|
||||
cast(float32)layout.content_h
|
||||
}
|
||||
}
|
||||
key := KeyHash("sun/manual/scroll")
|
||||
props: ScrollProps
|
||||
props.key = key
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
// The classic sequence on the same articulated body as Tai Chi and Workout.
|
||||
// Positions preserve the original yoga choreography in metres, with +Y up
|
||||
// and +Z forward. The two lunges exchange legs on alternating rounds.
|
||||
#import, file "sun_salutation_rules.zi";
|
||||
#import, file "../../../apps/practice/workout_moves.zi";
|
||||
#import, file "../tai_chi/tai_chi_math.zi";
|
||||
#import, file "../tai_chi/tai_chi_solve.zi";
|
||||
|
||||
SunSalutationPose :: (step: s32, other_side: bool) -> WorkoutPose {
|
||||
step = SalutationClamp(step, 0, SUN_SALUTATION_STEP_COUNT - 1)
|
||||
pose := WorkoutStanding()
|
||||
pose.pelvis.z = 0.284
|
||||
WorkoutFeet(*pose, 0.075, 0.301, 0.0, 0.0, 0.0)
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_WORLD, 0.025, 1.32, 0.56)
|
||||
WorkoutElbows(*pose, 0.6, -0.3, 0.2)
|
||||
if step == 1 || step == 10 {
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_ARM, 178.0, 30.0, 0.985)
|
||||
pose.head = -8.0
|
||||
} else if step == 2 || step == 9 {
|
||||
WorkoutBody(*pose, 0.0, 0.899, 0.284, 0.0, 150.0, 0.0, 0.0, 0.0, -30.0)
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_WORLD, 0.17, 0.055, 0.447)
|
||||
WorkoutFlatHands(*pose, 1.0)
|
||||
} else if step == 3 || step == 8 {
|
||||
WorkoutBody(*pose, 0.0, 0.45, -0.086, 0.0, 63.0, 0.0, 0.0, 0.0, -70.0)
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_WORLD, 0.17, 0.055, 0.447)
|
||||
WorkoutFlatHands(*pose, 1.0)
|
||||
WorkoutFoot(*pose, 0, 0.075, 0.301, 0.0, 0.0, 0.0)
|
||||
WorkoutFoot(*pose, 1, -0.075, -0.783, 0.0, -75.0, 0.0)
|
||||
WorkoutKnees(*pose, 0.1, 0.0, 1.0)
|
||||
// The front knee rises over its planted foot; only the rear knee
|
||||
// lowers to the floor. Poles are expressed in the pelvis frame.
|
||||
pose.knees[0] = TaiChiV3(0.05, 1.0, 0.0)
|
||||
if (step == 8) != other_side {
|
||||
pose = WorkoutMirror(pose)
|
||||
}
|
||||
} else if step == 4 {
|
||||
pose = WorkoutPushUp(false)
|
||||
} else if step == 5 {
|
||||
WorkoutBody(*pose, 0.0, 0.36, -0.026, 0.0, 116.0, 0.0, 0.0, 0.0, -96.0)
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_WORLD, 0.17, 0.055, 0.447)
|
||||
WorkoutFlatHands(*pose, 1.0)
|
||||
WorkoutElbows(*pose, 0.25, 0.0, -1.0)
|
||||
WorkoutFeet(*pose, 0.075, -0.783, 0.0, -75.0, 0.0)
|
||||
WorkoutKnees(*pose, 0.05, 0.0, 1.0)
|
||||
} else if step == 6 {
|
||||
WorkoutBody(*pose, 0.0, 0.14, 0.082, 0.0, 58.0, 0.0, 0.0, 0.0, -60.0)
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_WORLD, 0.17, 0.055, 0.447)
|
||||
WorkoutFlatHands(*pose, 1.0)
|
||||
WorkoutElbows(*pose, 0.25, 0.0, -1.0)
|
||||
WorkoutFeet(*pose, 0.075, -0.774, 0.0, 0.0, 0.0)
|
||||
} else if step == 7 {
|
||||
WorkoutBody(*pose, 0.0, 0.744, -0.258, 0.0, 132.0, 0.0, 0.0, 0.0, -22.0)
|
||||
WorkoutHandsAt(*pose, WORKOUT_AT_WORLD, 0.17, 0.055, 0.447)
|
||||
WorkoutFlatHands(*pose, 1.0)
|
||||
WorkoutFeet(*pose, 0.075, -0.783, 0.0, -22.0, 0.0)
|
||||
}
|
||||
return pose
|
||||
}
|
||||
|
||||
SunSalutationPoseAt :: (state: SunSalutationPracticeState, rig: *TaiChiRig) -> WorkoutPose {
|
||||
other_side := SalutationOtherSide(state)
|
||||
to := SunSalutationPose(state.step, other_side)
|
||||
if state.step <= 0 {
|
||||
return to
|
||||
}
|
||||
from := SunSalutationPose(state.step - 1, other_side)
|
||||
transition := SUN_SALUTATION_TRANSITION_SECONDS * 60
|
||||
breath := SalutationBreathSeconds(state) * 60
|
||||
if transition > breath * 3 / 4 {
|
||||
transition = breath * 3 / 4
|
||||
}
|
||||
amount := TaiChiClamp(cast(float64)state.step_ticks / cast(float64)transition, 0.0, 1.0)
|
||||
return WorkoutBlend(*from, *to, TaiChiSmoothstep(amount), rig)
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
#import, file "../meditation/meditation_music.zi";
|
||||
#import, file "sun_salutation_rules.zi";
|
||||
#import, file "sun_salutation_assets.zi";
|
||||
#import, file "sun_salutation_draw.zi";
|
||||
#import, file "../practice_voice_settings.zi";
|
||||
|
||||
#import, file "../../screens/practice_screen_calls.zi";
|
||||
@@ -58,9 +59,10 @@ sun_salutation_practice_init :: (app: *InnerBreeze) {
|
||||
draw_preview_pose :: (step: s32, x: s32, y: s32, w: s32, h: s32) {
|
||||
inset := AppScale(3)
|
||||
app := CurrentApp()
|
||||
Image(app.ui.session, SunSalutationPoseImage(app.sun_salutation.character, step,
|
||||
SunSalutationDrawHeld(app.ui.session, app.sun_salutation.character, step,
|
||||
Rectangle.{cast(float32)(x + inset), cast(float32)(y + inset),
|
||||
cast(float32)(w - inset * 2), cast(float32)(h - inset * 2)}))
|
||||
cast(float32)(w - inset * 2), cast(float32)(h - inset * 2)},
|
||||
KeyHash("sun-salutation/preview") + cast(u64)step * cast(u64)4096, "")
|
||||
}
|
||||
|
||||
draw_character_picker :: (app: *InnerBreeze, x: s32, y: s32, width: s32) {
|
||||
|
||||
@@ -32,6 +32,7 @@ sync_habits_for_activity :: (app: *InnerBreeze, activity: s32) #foreign c3;
|
||||
#import, file "../../storage/data.zi";
|
||||
#import, file "sun_salutation_rules.zi";
|
||||
#import, file "sun_salutation_assets.zi";
|
||||
#import, file "sun_salutation_draw.zi";
|
||||
#import, file "sun_salutation_frames.zi";
|
||||
#import, file "sun_salutation_entry.zi";
|
||||
#import "control_props"
|
||||
@@ -202,15 +203,8 @@ draw_pose :: (app: *InnerBreeze, area: Rectangle) {
|
||||
if app == null || area.width <= 0.0 || area.height <= 0.0 {
|
||||
return
|
||||
}
|
||||
step := app.sun_salutation.step
|
||||
frame := SalutationFrameAt(app.sun_salutation.step_ticks, breath_ticks(app),
|
||||
SunSalutationFrameCount(step), SUN_SALUTATION_TRANSITION_FRAMES,
|
||||
SUN_SALUTATION_FRAME_FPS)
|
||||
set := SunSalutationFrameSet(app.sun_salutation.character,
|
||||
SalutationOtherSide(app.sun_salutation))
|
||||
picture := SunSalutationFrameImage(set, step, frame, SunSalutationStage(area))
|
||||
picture.alt_text = LocaleText("exercise_sun_salutation")
|
||||
Image(CurrentApp().ui.session, picture)
|
||||
SunSalutationDrawState(app.ui.session, app.sun_salutation, area,
|
||||
KeyHash("sun-salutation/figure"), LocaleText("exercise_sun_salutation"))
|
||||
}
|
||||
|
||||
// The moving figure in the practice's small window, with the breath and
|
||||
@@ -256,12 +250,12 @@ draw_centered_line :: (app: *InnerBreeze, text: string, y: s32, font: s32,
|
||||
width := AppTextWidth(text, font)
|
||||
emphasis := StrongWhole(text)
|
||||
Text(CurrentApp().ui.session, TextProps.{
|
||||
.bounds = Rectangle.{cast(float32)((app.ui.view_width - width) / 2),
|
||||
cast(float32)y, 0, 0},
|
||||
.text = text,
|
||||
.font = font,
|
||||
.strong = ifx strong then emphasis[:1] else emphasis[:0],
|
||||
.wrap = cast(TextWrap)TextWrapNone})
|
||||
.bounds = Rectangle.{cast(float32)((app.ui.view_width - width) / 2),
|
||||
cast(float32)y, 0, 0},
|
||||
.text = text,
|
||||
.font = font,
|
||||
.strong = ifx strong then emphasis[:1] else emphasis[:0],
|
||||
.wrap = cast(TextWrap)TextWrapNone})
|
||||
return y + AppTextLineHeight(font)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,23 +11,32 @@ Answer :: () -> s32 {
|
||||
AstralCueAt(*course, 90) != 1 || AstralCueAt(*course, 900) != 1 {
|
||||
return 2
|
||||
}
|
||||
clock := AstralAdvance(AstralClock.{900, 0}, 89999, false)
|
||||
if clock.remaining != 811 || clock.remainder_ms != 999 {
|
||||
clock := AstralAdvance(AstralClock.{}, 89999, false)
|
||||
if clock.elapsed_seconds != 89 || clock.remainder_ms != 999 {
|
||||
return 3
|
||||
}
|
||||
paused := AstralAdvance(clock, 100000, true)
|
||||
if paused.remaining != clock.remaining || paused.remainder_ms != clock.remainder_ms {
|
||||
if paused.elapsed_seconds != clock.elapsed_seconds || paused.remainder_ms != clock.remainder_ms {
|
||||
return 4
|
||||
}
|
||||
clock = AstralAdvance(paused, 1, false)
|
||||
if clock.remaining != 810 || clock.remainder_ms != 0 ||
|
||||
AstralCueAt(*course, 900 - clock.remaining) != 1 {
|
||||
if clock.elapsed_seconds != 90 || clock.remainder_ms != 0 ||
|
||||
AstralCueAt(*course, clock.elapsed_seconds) != 1 {
|
||||
return 5
|
||||
}
|
||||
clock = AstralAdvance(clock, 2147483647, false)
|
||||
if clock.remaining != 0 || clock.remainder_ms != 0 {
|
||||
clock = AstralAdvance(clock, 2400000, false)
|
||||
if clock.elapsed_seconds != 2490 || clock.remainder_ms != 0 ||
|
||||
AstralCueAt(*course, clock.elapsed_seconds) != 1 {
|
||||
return 6
|
||||
}
|
||||
clock = AstralAdvance(clock, 86400000, false)
|
||||
if clock.elapsed_seconds != 88890 || clock.remainder_ms != 0 {
|
||||
return 9
|
||||
}
|
||||
clock = AstralAdvance(AstralClock.{2147483646, 999}, 2147483647, false)
|
||||
if clock.elapsed_seconds != 2147483647 || clock.remainder_ms != 0 {
|
||||
return 10
|
||||
}
|
||||
broken: [6]string = .[
|
||||
"{\"schema\":2,\"duration\":900,\"cues\":[]}",
|
||||
"{\"schema\":1,\"duration\":0,\"cues\":[]}",
|
||||
|
||||
@@ -17,7 +17,7 @@ assert course['schema'] == 1 and course['duration'] == 2400
|
||||
assert course['cues'][0]['second'] == 0
|
||||
times = [cue['second'] for cue in course['cues']] + [course['duration']]
|
||||
assert all(a < b for a, b in zip(times, times[1:]))
|
||||
assert times[-1] - times[-2] >= 60, 'Allow time for the gentle return'
|
||||
assert times[-1] - times[-2] >= 60, 'Allow time for the final spoken cue'
|
||||
english = speech.entries(folder / 'text/en.txt')
|
||||
for code in speech.locale_codes():
|
||||
values = speech.entries(folder / 'text' / (code + '.txt'))
|
||||
@@ -26,7 +26,7 @@ for code in speech.locale_codes():
|
||||
if code != 'en':
|
||||
assert all(values[key] != english[key] for key in keys), code
|
||||
|
||||
# Already verified recordings must fit their cue, including the final return.
|
||||
# Already verified recordings must fit their cue, including the final line.
|
||||
receipt_path = ROOT / 'design/astral-projection/narration-receipt.json'
|
||||
if receipt_path.is_file():
|
||||
receipt = json.loads(receipt_path.read_text())
|
||||
@@ -34,4 +34,4 @@ if receipt_path.is_file():
|
||||
code, key = name.split('/')
|
||||
index = keys.index(key)
|
||||
assert clip['seconds'] + 1 < times[index + 1] - times[index], name
|
||||
print(f'All {len(keys)} guidance cues of the 40-minute session have complete translations in all 12 locales')
|
||||
print(f'All {len(keys)} introduction cues have complete translations in all 12 locales; the session continues afterward')
|
||||
@@ -16,7 +16,8 @@ binary = Path(sys.argv[1]).resolve()
|
||||
output = root / "build/practice-images-ui-test"
|
||||
output.mkdir(parents=True, exist_ok=True)
|
||||
WIDTH, HEIGHT = 390, 844
|
||||
PRACTICES = ("wim-hof", "patterns", "meditation", "sun-salutation")
|
||||
PRACTICES = ("wim-hof", "patterns", "meditation", "astral-projection",
|
||||
"sun-salutation", "tai-chi", "workout")
|
||||
|
||||
|
||||
def command(*args):
|
||||
@@ -91,10 +92,17 @@ with tempfile.TemporaryDirectory(prefix="inbe-practice-images-") as directory:
|
||||
try:
|
||||
missing = []
|
||||
for index, practice in enumerate(PRACTICES):
|
||||
if index > 0:
|
||||
click(window, 324, 620) # The next practice.
|
||||
if 0 < index < 4:
|
||||
click(window, 324, 620) # The next meditation practice.
|
||||
elif index == 4:
|
||||
click(window, 145, 24) # Yoga.
|
||||
elif index == 5:
|
||||
click(window, 235, 24) # Martial arts.
|
||||
elif index == 6:
|
||||
click(window, 325, 24) # Workout.
|
||||
if not pictured(capture(window, practice), (0, 40, WIDTH, 420)):
|
||||
missing.append(practice)
|
||||
click(window, 145, 24) # Yoga.
|
||||
click(window, 195, 678) # Start Sun Salutation.
|
||||
if not pictured(capture(window, "sun-salutation-running"), (100, 250, 290, 650)):
|
||||
missing.append("sun-salutation figure")
|
||||
@@ -102,4 +110,4 @@ with tempfile.TemporaryDirectory(prefix="inbe-practice-images-") as directory:
|
||||
assert app.poll() is None, (output / "practice.log").read_text()
|
||||
finally:
|
||||
stop(app)
|
||||
print("Practice pictures: Wim Hof, patterns, meditation and Sun Salutation, and the running figure passed")
|
||||
print("All seven practice covers and the running Sun Salutation figure passed")
|
||||
@@ -1,6 +1,7 @@
|
||||
#import "byte_text_linux"
|
||||
#import "text_buffer"
|
||||
#import "drawing_props"
|
||||
#import, file "../src/app/exercise_types.zi";
|
||||
#import, file "storage_test_support.zi";
|
||||
#import, file "../src/app/text_buffers.zi";
|
||||
#import, file "../src/storage/data.zi";
|
||||
@@ -29,6 +30,7 @@
|
||||
c :: #system_library "c";
|
||||
#import, file "../src/storage/import_types.zi";
|
||||
using StorageImportMode;
|
||||
using ExerciseType;
|
||||
|
||||
// Habit sets are large, so the tests keep theirs in globals.
|
||||
habits_a: Habits;
|
||||
@@ -131,7 +133,7 @@ test_habit_name_merge_import :: () {
|
||||
check_true("habit merge import", storage_import_zip(TextFromCString(*archive.bytes[0])) != 0)
|
||||
habits_b = Habits.{}
|
||||
check_true("habit merge load", storage_habits_load(cast(*void)*habits_b) != 0)
|
||||
check_int("habit merge count", habits_b.count, 4)
|
||||
check_int("habit merge count", habits_b.count, 5)
|
||||
meditation := find_habit(*habits_b, "Meditation")
|
||||
check_true("habit merge meditation exists", meditation != null)
|
||||
if meditation != null {
|
||||
@@ -198,7 +200,7 @@ test_delete_all_resets :: () {
|
||||
habits_free(*habits_a)
|
||||
habits_b = Habits.{}
|
||||
check_true("load default habit after delete all", storage_habits_load(cast(*void)*habits_b) != 0)
|
||||
check_int("default habit count after delete all", habits_b.count, 2)
|
||||
check_int("default habit count after delete all", habits_b.count, 3)
|
||||
check_true("default meditation", find_habit(*habits_b, "Meditation") != null)
|
||||
check_true("default yoga", find_habit(*habits_b, "Yoga") != null)
|
||||
check_true("old workout day removed", !has_day(find_habit(*habits_b, "Meditation"), 20260618))
|
||||
@@ -215,9 +217,17 @@ test_empty_initialized_seeds_meditation :: () {
|
||||
check_true("reopen db", storage_init(root) != 0)
|
||||
habits_a = Habits.{}
|
||||
habits_init(*habits_a)
|
||||
check_int("startup seeds default habits", habits_a.count, 2)
|
||||
check_int("startup seeds default habits", habits_a.count, 3)
|
||||
meditation := find_habit(*habits_a, "Meditation")
|
||||
yoga := find_habit(*habits_a, "Yoga")
|
||||
exercise := find_habit(*habits_a, "Exercise")
|
||||
check_true("seeds exercise", exercise != null)
|
||||
if exercise != null {
|
||||
check_int("exercise linked mode", exercise.sync_mode, 1)
|
||||
check_int("exercise linked to workout", exercise.sync_activity, habit_activity_mask_for(EXERCISE_WORKOUT))
|
||||
check_int("exercise excludes yoga", habit_matches_activity(exercise, EXERCISE_SUN_SALUTATION), 0)
|
||||
check_int("exercise counts workout", habit_matches_activity(exercise, EXERCISE_WORKOUT), 1)
|
||||
}
|
||||
check_true("seeds meditation", meditation != null)
|
||||
check_true("seeds yoga", yoga != null)
|
||||
if meditation != null {
|
||||
@@ -231,7 +241,7 @@ test_empty_initialized_seeds_meditation :: () {
|
||||
habits_free(*habits_a)
|
||||
habits_b = Habits.{}
|
||||
check_true("load seeded defaults", storage_habits_load(cast(*void)*habits_b) != 0)
|
||||
check_int("seeded defaults persisted", habits_b.count, 2)
|
||||
check_int("seeded defaults persisted", habits_b.count, 3)
|
||||
persisted := find_habit(*habits_b, "Meditation")
|
||||
check_true("persisted meditation", persisted != null)
|
||||
if persisted != null {
|
||||
@@ -251,14 +261,14 @@ test_defaults_wait_for_language :: () {
|
||||
habits_free(*habits_a)
|
||||
habits_a = Habits.{}
|
||||
check_true("seed defaults after language setup", habits_seed_default_set_if_needed(*habits_a) != 0)
|
||||
check_int("deferred defaults seeded", habits_a.count, 2)
|
||||
check_int("deferred defaults seeded", habits_a.count, 3)
|
||||
check_true("deferred meditation", find_habit(*habits_a, "Meditation") != null)
|
||||
check_true("deferred yoga", find_habit(*habits_a, "Yoga") != null)
|
||||
check_int("deferred habits initialized", storage_habits_initialized(), 1)
|
||||
habits_free(*habits_a)
|
||||
habits_b = Habits.{}
|
||||
check_true("load deferred seeded defaults", storage_habits_load(cast(*void)*habits_b) != 0)
|
||||
check_int("deferred persisted count", habits_b.count, 2)
|
||||
check_int("deferred persisted count", habits_b.count, 3)
|
||||
habits_free(*habits_b)
|
||||
storage_close()
|
||||
}
|
||||
@@ -884,7 +894,7 @@ synced_changes :: (entity_type: string, entity_id: string, array: string,
|
||||
storage_append_sync_op_payload(*json, entity_type, entity_id, 0)
|
||||
storage_json_builder_append_text(*json, "]}}")
|
||||
copied := json.ok != 0 && json.data != null &&
|
||||
AppCopyText(AppTextFromCString(json.data, cast(s32)(json.len + 1)), output)
|
||||
AppCopyText(AppTextFromCString(json.data, cast(s32)(json.len + 1)), output)
|
||||
storage_json_builder_free(*json)
|
||||
if !copied { return "" }
|
||||
return AppTextFromCString(*output[0], cast(s32)output.count)
|
||||
|
||||
@@ -46,7 +46,7 @@ TestSqliteColumnText :: (statement: *void, column: s32) -> *u8 #foreign c "sqlit
|
||||
TestSqliteFinalize :: (statement: *void) -> s32 #foreign c "sqlite3_finalize";
|
||||
|
||||
// The one embedded asset tests need: an English catalog for default habit names.
|
||||
english_catalog: string = "[habit_default_name_format]\nHabit %d\n---\n[habit_default_meditation_name]\nMeditation\n---\n[habit_default_meditation_description]\nBreathing and meditation sessions.\n---\n[habit_default_yoga_name]\nYoga\n---\n[habit_default_yoga_description]\nYoga practice sessions.\n---\n[habit_new_default_name]\nNew Habit\n---\n[exercise_wim_hof]\nWim Hof Breathing\n---\n[exercise_meditation]\nMeditation\n---\n[exercise_sun_salutation]\nSun Salutation\n---\n[review_complete]\nCompleted\n---\n[review_incomplete]\nNot completed\n---\n[review_unchanged]\nNo records change.\n---\n";
|
||||
english_catalog: string = "[habit_default_name_format]\nHabit %d\n---\n[habit_default_meditation_name]\nMeditation\n---\n[habit_default_meditation_description]\nBreathing and meditation sessions.\n---\n[habit_default_yoga_name]\nYoga\n---\n[habit_default_yoga_description]\nYoga practice sessions.\n---\n[habit_default_exercise_name]\nExercise\n---\n[habit_default_exercise_description]\nComplete the 7 Minute Workout.\n---\n[habit_new_default_name]\nNew Habit\n---\n[exercise_wim_hof]\nWim Hof Breathing\n---\n[exercise_meditation]\nMeditation\n---\n[exercise_sun_salutation]\nSun Salutation\n---\n[review_complete]\nCompleted\n---\n[review_incomplete]\nNot completed\n---\n[review_unchanged]\nNo records change.\n---\n";
|
||||
english_path: [16]u8;
|
||||
english_mime: [16]u8;
|
||||
english_entry: EmbeddedAssetEntry;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#import, file "../src/practices/tai_chi/tai_chi_solve.zi";
|
||||
#import, file "../src/practices/tai_chi/tai_chi_view.zi";
|
||||
#import, file "../src/practices/tai_chi/tai_chi_flat.zi";
|
||||
#import, file "../src/practices/sun_salutation/sun_salutation_pose.zi";
|
||||
#import, file "../src/practices/sun_salutation/sun_salutation_rules.zi";
|
||||
#import "math"
|
||||
#import "file_linux"
|
||||
#import "locale_parser"
|
||||
@@ -187,5 +189,31 @@ Answer :: () -> s32 {
|
||||
return 300 + index
|
||||
}
|
||||
}
|
||||
// Sun Salutation shares this rig: sample every move on both sides.
|
||||
for round: cast(s32)0..1 {
|
||||
for step: cast(s32)0..11 {
|
||||
state := SalutationInit(SunSalutationPracticeState.{})
|
||||
state.step = step
|
||||
state.repetition = round
|
||||
for ticks: cast(s32)0..240 {
|
||||
state.step_ticks = ticks
|
||||
pose := SunSalutationPoseAt(state, *rig)
|
||||
if !FigureSound(*pose, *rig, WORKOUT_PLANK) {
|
||||
return 400 + step
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
first_lunge := SunSalutationPose(3, false)
|
||||
other_lunge := SunSalutationPose(3, true)
|
||||
if first_lunge.feet[0].z == other_lunge.feet[0].z {
|
||||
return 412
|
||||
}
|
||||
first_solved := WorkoutSolve(*first_lunge, *rig)
|
||||
other_solved := WorkoutSolve(*other_lunge, *rig)
|
||||
if first_solved.knees[0].y < 0.25 || first_solved.knees[1].y > 0.12 ||
|
||||
other_solved.knees[1].y < 0.25 || other_solved.knees[0].y > 0.12 {
|
||||
return 413
|
||||
}
|
||||
return 42
|
||||
}
|
||||