Free Motion Capture for Everyone πβ¨
TypeScript
/* =========================================
PLAYBACK CONTROLS STYLES
========================================= */
/* Timeline Scrubber Container */
.playback-timeline-scrubber {
min-height: 36px;
width: 100%;
}
/* =========================================
TIMELINE TRACK
========================================= */
.playback-timeline-track {
position: relative;
flex: 1;
height: 36px;
min-height: 36px;
background-color: var(--color-text-muted);
border-radius: 8px;
overflow: hidden;
cursor: pointer;
contain: layout paint;
}
/* =========================================
RANGE INPUT
========================================= */
.playback-timeline-input {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
appearance: none;
-webkit-appearance: none;
border: none;
border-radius: inherit;
cursor: pointer;
background:
linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--progress-percent), #212121 var(--progress-percent), #212121 100%)
}
/* =========================================
CHROME / SAFARI TRACK
========================================= */
.playback-timeline-input::-webkit-slider-runnable-track {
height: 100%;
background: transparent;
border-radius: inherit;
}
/* =========================================
CHROME / SAFARI THUMB
========================================= */
.playback-timeline-input::-webkit-slider-thumb {
cursor: grab;
}
.playback-timeline-input:active::-webkit-slider-thumb {
cursor: grabbing;
}
.playback-timeline-input::-moz-range-thumb {
cursor: grab;
}
.playback-timeline-input:active::-moz-range-thumb {
cursor: grabbing;
}
.playback-timeline-input::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 4px;
height: 18px;
margin-top: 9px;
border-radius: 2px;
border: none;
background: white;
/* cursor: pointer; */
transition:
height 0.12s ease,
margin-top 0.12s ease,
border-radius 0.12s ease;
}
/* Hover / active state */
.playback-timeline-input:hover::-webkit-slider-thumb,
.playback-timeline-input:active::-webkit-slider-thumb {
height: 40px;
margin-top: -2px;
border-radius: 999px;
}
/* =========================================
FIREFOX TRACK
========================================= */
.playback-timeline-input::-moz-range-track {
height: 100%;
background: transparent;
border-radius: inherit;
}
/* =========================================
FIREFOX THUMB
========================================= */
.playback-timeline-input::-moz-range-thumb {
width: 4px;
height: 18px;
border-radius: 2px;
border: none;
background: white;
cursor: pointer;
transition:
height 0.12s ease,
border-radius 0.12s ease;
}
/* Hover / active state */
.playback-timeline-input:hover::-moz-range-thumb,
.playback-timeline-input:active::-moz-range-thumb {
height: 40px;
border-radius: 999px;
}
/* =========================================
TIMELINE TEXT OVERLAYS
========================================= */
.playback-timeline-start-time,
.playback-timeline-end-time,
.playback-timeline-frame-counter {
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 2;
pointer-events: none;
user-select: none;
white-space: nowrap;
font-family: "Courier New", monospace;
font-weight: 600;
color: white;
}
/* Left timestamp */
.playback-timeline-start-time {
left: 10px;
text-align: left;
min-width: 48px;
}
/* Right timestamp */
.playback-timeline-end-time {
right: 10px;
text-align: right;
min-width: 48px;
}
/* Center frame counter */
.playback-timeline-frame-counter {
left: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
gap: 12px;
}
/* =========================================
PLAYBACK CONTROLS GROUPS
========================================= */
/* Play button special styling */
.playback-btn-play,
.playback-btn-play.playing {
min-width: 60px;
background-color: var(--color-surface-active);
}
/* =========================================
PLAYBACK SPEED SELECT
========================================= */
.playback-speed-select {
min-width: 50px;
height: 28px;
padding: 4px 8px;
background-color: var(--color-text-muted);
color: var(--color-text-primary);
border: 1px solid var(--color-surface-active);
border-radius: 3px;
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
transition: all 0.15s ease;
}
.playback-speed-select:hover {
background-color: var(--color-surface-active);
border-color: var(--color-text-disabled);
}
.playback-speed-select:focus {
outline: none;
border-color: var(--color-info-medium);
box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
}
.playback-speed-select:active {
background-color: var(--color-text-muted);
}
/* =========================================
PLAYBACK SYNC INFO PANEL
========================================= */
.playback-sync-info {
padding: 8px;
background-color: var(--color-text-muted);
border: 1px solid var(--color-surface-active);
border-radius: 4px;
animation: slideDown 0.2s ease;
}
.playback-sync-title {
color: var(--log-trace);
font-weight: 500;
margin-bottom: 4px;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* =========================================
PLAYBACK SETTINGS POPUP
========================================= */
.playback-settings-popup {
animation:
fadeIn 0.15s ease,
scaleIn 0.2s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes scaleIn {
from {
transform: scale(0.95);
}
to {
transform: scale(1);
}
}