hyperframes 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,8 +31,8 @@
31
31
 
32
32
  <style>
33
33
  [data-composition-id="graphics"] {
34
- font-family: 'Helvetica', Arial, sans-serif;
35
- color: #0A1E3D;
34
+ font-family: "Helvetica", Arial, sans-serif;
35
+ color: #0a1e3d;
36
36
  background: transparent;
37
37
  width: 1920px;
38
38
  height: 1080px;
@@ -56,9 +56,9 @@
56
56
  flex-direction: column;
57
57
  justify-content: flex-start;
58
58
  align-items: flex-start;
59
- background: #F2F2F2;
59
+ background: #f2f2f2;
60
60
  padding: 40px;
61
- border-left: 10px solid #D4A017;
61
+ border-left: 10px solid #d4a017;
62
62
  box-shadow: 20px 20px 0px rgba(10, 30, 61, 0.1);
63
63
  }
64
64
 
@@ -81,7 +81,7 @@
81
81
  [data-composition-id="graphics"] .stat-value {
82
82
  font-size: 140px;
83
83
  font-weight: 900;
84
- color: #D4A017;
84
+ color: #d4a017;
85
85
  line-height: 0.8;
86
86
  margin-bottom: 15px;
87
87
  }
@@ -89,7 +89,7 @@
89
89
  [data-composition-id="graphics"] .stat-label {
90
90
  font-size: 24px;
91
91
  font-weight: 300; /* Lighter weight */
92
- color: #0A1E3D;
92
+ color: #0a1e3d;
93
93
  letter-spacing: 2px;
94
94
  text-transform: uppercase;
95
95
  }
@@ -98,16 +98,16 @@
98
98
  [data-composition-id="graphics"] .progress-container {
99
99
  width: 100%;
100
100
  height: 24px;
101
- background: #E0E0E0;
101
+ background: #e0e0e0;
102
102
  margin-top: 30px;
103
- border: 2px solid #0A1E3D;
103
+ border: 2px solid #0a1e3d;
104
104
  position: relative;
105
105
  }
106
106
 
107
107
  [data-composition-id="graphics"] .progress-bar {
108
108
  width: 0%;
109
109
  height: 100%;
110
- background: #D4A017;
110
+ background: #d4a017;
111
111
  }
112
112
 
113
113
  /* Grid Blocks for Stat 3 */
@@ -120,23 +120,23 @@
120
120
  [data-composition-id="graphics"] .block {
121
121
  width: 80px;
122
122
  height: 80px;
123
- border: 3px solid #0A1E3D;
123
+ border: 3px solid #0a1e3d;
124
124
  }
125
125
 
126
126
  [data-composition-id="graphics"] .block.gold {
127
- background: #D4A017;
127
+ background: #d4a017;
128
128
  }
129
129
 
130
130
  [data-composition-id="graphics"] .block.navy {
131
- background: #0A1E3D;
131
+ background: #0a1e3d;
132
132
  }
133
133
  </style>
134
134
 
135
135
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
136
136
  <script>
137
- (function() {
137
+ (function () {
138
138
  const tl = gsap.timeline({ paused: true });
139
-
139
+
140
140
  // Timing Constants
141
141
  const S1_START = 1.86;
142
142
  const S1_END = 4.5;
@@ -144,55 +144,63 @@
144
144
  const S2_END = 8.6;
145
145
  const S3_START = 8.88;
146
146
  const S3_END = 14.2;
147
-
147
+
148
148
  const SLIDE_DUR = 0.25; // 250ms
149
149
  const SHARP_EASE = "power2.out";
150
150
 
151
151
  // Stat 1 Animation
152
- tl.fromTo('#stat1',
153
- { x: -200, opacity: 0 },
154
- { x: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
155
- S1_START
152
+ tl.fromTo(
153
+ "#stat1",
154
+ { x: -200, opacity: 0 },
155
+ { x: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
156
+ S1_START,
156
157
  );
157
- tl.to('#stat1',
158
- { x: 200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
159
- S1_END - SLIDE_DUR
158
+ tl.to(
159
+ "#stat1",
160
+ { x: 200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
161
+ S1_END - SLIDE_DUR,
160
162
  );
161
163
 
162
164
  // Stat 2 Animation
163
- tl.fromTo('#stat2',
164
- { y: 200, opacity: 0 },
165
- { y: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
166
- S2_START
165
+ tl.fromTo(
166
+ "#stat2",
167
+ { y: 200, opacity: 0 },
168
+ { y: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
169
+ S2_START,
167
170
  );
168
171
  // Progress bar fill
169
- tl.to('#stat2 .progress-bar',
170
- { width: '62%', duration: S2_END - S2_START - (SLIDE_DUR * 2), ease: "none" },
171
- S2_START + SLIDE_DUR
172
+ tl.to(
173
+ "#stat2 .progress-bar",
174
+ { width: "62%", duration: S2_END - S2_START - SLIDE_DUR * 2, ease: "none" },
175
+ S2_START + SLIDE_DUR,
172
176
  );
173
- tl.to('#stat2',
174
- { y: -200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
175
- S2_END - SLIDE_DUR
177
+ tl.to(
178
+ "#stat2",
179
+ { y: -200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
180
+ S2_END - SLIDE_DUR,
176
181
  );
177
182
 
178
183
  // Stat 3 Animation
179
- tl.fromTo('#stat3',
180
- { x: 200, opacity: 0 },
181
- { x: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
182
- S3_START
184
+ tl.fromTo(
185
+ "#stat3",
186
+ { x: 200, opacity: 0 },
187
+ { x: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
188
+ S3_START,
183
189
  );
184
190
  // Stagger blocks
185
- tl.from('#stat3 .block',
186
- { scale: 0, duration: 0.3, stagger: 0.1, ease: "back.out(1.7)" },
187
- S3_START + SLIDE_DUR
191
+ tl.from(
192
+ "#stat3 .block",
193
+ { scale: 0, duration: 0.3, stagger: 0.1, ease: "back.out(1.7)" },
194
+ S3_START + SLIDE_DUR,
188
195
  );
189
- tl.to('#stat3',
190
- { x: -200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
191
- S3_END - SLIDE_DUR
196
+ tl.to(
197
+ "#stat3",
198
+ { x: -200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
199
+ S3_END - SLIDE_DUR,
192
200
  );
193
201
 
194
202
  window.__timelines["graphics"] = tl;
195
203
  })();
196
204
  </script>
197
205
  </div>
198
- </template>
206
+ </template>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <style>
12
12
  [data-composition-id="intro"] {
13
- background-color: #F5F5F5; /* Off-white */
13
+ background-color: #f5f5f5; /* Off-white */
14
14
  width: 1920px;
15
15
  height: 1080px;
16
16
  display: flex;
@@ -36,7 +36,7 @@
36
36
  top: 50%;
37
37
  width: 0px;
38
38
  height: 12px;
39
- background-color: #0A1E3D; /* Navy */
39
+ background-color: #0a1e3d; /* Navy */
40
40
  transform: translateY(-180px); /* Positioned above the text */
41
41
  }
42
42
 
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  [data-composition-id="intro"] .title {
51
- color: #0A1E3D;
51
+ color: #0a1e3d;
52
52
  font-size: 180px;
53
53
  font-weight: 900; /* Black weight */
54
54
  line-height: 0.9;
@@ -59,7 +59,7 @@
59
59
  }
60
60
 
61
61
  [data-composition-id="intro"] .subtitle {
62
- color: #0A1E3D;
62
+ color: #0a1e3d;
63
63
  font-size: 64px;
64
64
  font-weight: 300; /* Lighter weight for contrast */
65
65
  line-height: 1.2;
@@ -72,7 +72,7 @@
72
72
  </style>
73
73
 
74
74
  <script>
75
- (function() {
75
+ (function () {
76
76
  const tl = gsap.timeline({ paused: true });
77
77
 
78
78
  // Mechanical timing: 200ms (0.2s)
@@ -80,32 +80,48 @@
80
80
  const STAGGER = 0.1;
81
81
 
82
82
  // 1. Animate the grid line first
83
- tl.to('.grid-line', {
84
- width: '1200px',
85
- duration: 0.4,
86
- ease: 'power4.out'
87
- }, 0.2);
83
+ tl.to(
84
+ ".grid-line",
85
+ {
86
+ width: "1200px",
87
+ duration: 0.4,
88
+ ease: "power4.out",
89
+ },
90
+ 0.2,
91
+ );
88
92
 
89
93
  // 2. Slide in the title
90
- tl.to('.title', {
91
- x: 0,
92
- duration: MECHANICAL_DURATION,
93
- ease: 'power2.inOut'
94
- }, 0.5);
94
+ tl.to(
95
+ ".title",
96
+ {
97
+ x: 0,
98
+ duration: MECHANICAL_DURATION,
99
+ ease: "power2.inOut",
100
+ },
101
+ 0.5,
102
+ );
95
103
 
96
104
  // 3. Slide in the subtitle with a slight stagger
97
- tl.to('.subtitle', {
98
- x: 0,
99
- duration: MECHANICAL_DURATION,
100
- ease: 'power2.inOut'
101
- }, 0.5 + STAGGER);
105
+ tl.to(
106
+ ".subtitle",
107
+ {
108
+ x: 0,
109
+ duration: MECHANICAL_DURATION,
110
+ ease: "power2.inOut",
111
+ },
112
+ 0.5 + STAGGER,
113
+ );
102
114
 
103
115
  // 4. Subtle ambient motion (slow drift) to keep it alive
104
- tl.to('.text-wrapper', {
105
- x: 30,
106
- duration: 1.16, // Adjusted to fit 1.86s total
107
- ease: 'none'
108
- }, 0.7);
116
+ tl.to(
117
+ ".text-wrapper",
118
+ {
119
+ x: 30,
120
+ duration: 1.16, // Adjusted to fit 1.86s total
121
+ ease: "none",
122
+ },
123
+ 0.7,
124
+ );
109
125
 
110
126
  window.__timelines["intro"] = tl;
111
127
  })();