@hortonstudio/main 1.1.17 → 1.1.19
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.
- package/animations/hero.js +9 -15
- package/package.json +1 -1
package/animations/hero.js
CHANGED
@@ -259,29 +259,26 @@ export async function init() {
|
|
259
259
|
splitConfig = {
|
260
260
|
type: "words,chars",
|
261
261
|
mask: "chars",
|
262
|
-
charsClass: "char"
|
263
|
-
reduceWhiteSpace: false
|
262
|
+
charsClass: "char"
|
264
263
|
};
|
265
264
|
elementsClass = 'chars';
|
266
265
|
} else if (splitType === 'line') {
|
267
266
|
splitConfig = {
|
268
267
|
type: "lines",
|
269
268
|
mask: "lines",
|
270
|
-
linesClass: "line"
|
271
|
-
reduceWhiteSpace: false
|
269
|
+
linesClass: "line"
|
272
270
|
};
|
273
271
|
elementsClass = 'lines';
|
274
272
|
} else {
|
275
273
|
splitConfig = {
|
276
274
|
type: "words",
|
277
275
|
mask: "words",
|
278
|
-
wordsClass: "word"
|
279
|
-
reduceWhiteSpace: false
|
276
|
+
wordsClass: "word"
|
280
277
|
};
|
281
278
|
elementsClass = 'words';
|
282
279
|
}
|
283
280
|
|
284
|
-
const split =
|
281
|
+
const split = SplitText.create(textElement, splitConfig);
|
285
282
|
split.elementsClass = elementsClass;
|
286
283
|
headingSplits.push(split);
|
287
284
|
|
@@ -303,29 +300,26 @@ export async function init() {
|
|
303
300
|
splitConfig = {
|
304
301
|
type: "words,chars",
|
305
302
|
mask: "chars",
|
306
|
-
charsClass: "char"
|
307
|
-
reduceWhiteSpace: false
|
303
|
+
charsClass: "char"
|
308
304
|
};
|
309
305
|
elementsClass = 'chars';
|
310
306
|
} else if (splitType === 'line') {
|
311
307
|
splitConfig = {
|
312
308
|
type: "lines",
|
313
309
|
mask: "lines",
|
314
|
-
linesClass: "line"
|
315
|
-
reduceWhiteSpace: false
|
310
|
+
linesClass: "line"
|
316
311
|
};
|
317
312
|
elementsClass = 'lines';
|
318
313
|
} else {
|
319
314
|
splitConfig = {
|
320
315
|
type: "words",
|
321
316
|
mask: "words",
|
322
|
-
wordsClass: "word"
|
323
|
-
reduceWhiteSpace: false
|
317
|
+
wordsClass: "word"
|
324
318
|
};
|
325
319
|
elementsClass = 'words';
|
326
320
|
}
|
327
321
|
|
328
|
-
const split =
|
322
|
+
const split = SplitText.create(textElement, splitConfig);
|
329
323
|
split.elementsClass = elementsClass;
|
330
324
|
subheadingSplits.push(split);
|
331
325
|
|
@@ -405,7 +399,7 @@ export async function init() {
|
|
405
399
|
ease: config.headingSplit.ease,
|
406
400
|
onComplete: () => {
|
407
401
|
if (split && split.revert) {
|
408
|
-
|
402
|
+
split.revert();
|
409
403
|
}
|
410
404
|
}
|
411
405
|
},
|