kamishibai: '4.0'

controls:
  keymaps:
    production:
      Space: rehearsal.skipPose
      ArrowRight: rehearsal.skipAction
      ArrowDown: rehearsal.skipScene

assets:
  Classroom:
    kind: backdrop
    file: classroom.svg
  StudentReady:
    kind: costume
    target: Student
    file: student-ready.svg
  EarthquakeClassroom:
    kind: backdrop
    file: earthquake-classroom.svg
  ProtectHead:
    kind: costume
    target: Student
    file: protect-head.svg
  SafetyPose:
    kind: poseModel
    file: safety-pose
    loading: lazy
  SuccessSound:
    kind: sound
    file: success.mp3

actors:
  Student: StudentReady

cover:
  backdrop: Classroom

poseRecognition:
  navigation:
    allowSkip: true
  preview:
    mirroring: mirrored
    overlay:
      visible: true
      jointStyles:
        leftWrist:
          color: '#ff00aa'
          opacity: 0.8
          radius: 6
        rightWrist:
          color: '#ff00aa'
          opacity: 0.8
          radius: 6
      boneStyle:
        color: '#00e5ff'
        opacity: 0.9
        width: 3
      minimumConfidence: 0.5
      confidenceScaling:
        jointOpacity: true
        boneOpacity: true

scenes:
  earthquake:
    - stage: Classroom
    - Student.show:
        skin: StudentReady
        x: -90
        y: -55
        scale: 58
    - Student.say:
        text: 地震だ！
        seconds: 2
  instruction:
    - stage: EarthquakeClassroom
    - Student.say:
        text: 自分の身を守るため、丈夫な机の下に入り、両手で頭を守ろう！
        seconds: 4
  protect:
    poseModel: SafetyPose
    actions:
      - stage: EarthquakeClassroom
      - Student.show:
          skin: ProtectHead
          x: 0
          y: -60
          scale: 65
      - Student.pose:
          steps:
            - pose: 頭を守る
              skin: ProtectHead
              sound: SuccessSound
  success:
    - stage: EarthquakeClassroom
    - Student.show:
        skin: ProtectHead
        x: 0
        y: -60
        scale: 65
    - Student.say:
        text: できた！ 頭を守れたね。揺れがおさまるまで、そのまま待とう。
        seconds: 5
    - wait: 1
