-
Notifications
You must be signed in to change notification settings - Fork 40
/
index.html
115 lines (101 loc) · 4.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>rgbKinetciSlider | Demo 1</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
<!--script src="//tympanus.net/codrops/adpacks/analytics.js"></script-->
</head>
<body class="demo-1 loading">
<main>
<div class="message">Some message for mobile (if needed).</div>
<div class="frame">
<div class="frame__title-wrap">
<h1 class="frame__title">rgbKineticSlider</h1>
<p class="frame__tagline">Demo 1</a></p>
</div>
<div class="frame__links">
<a href="https://github.com/hmongouachon/rgbKineticSlider">GitHub</a>
</div>
<div class="frame__demos">
<a href="index.html" class="frame__demo frame__demo--current">demo 1</a>
<a href="index2.html" class="frame__demo">demo 2</a>
<a href="index3.html" class="frame__demo">demo 3</a>
</div>
</div>
<div class="content">
<div id="rgbKineticSlider" class="rgbKineticSlider"></div>
<nav>
<a href="#" class="main-nav prev" data-nav="previous">Prev <span></span></a>
<a href="#" class="main-nav next" data-nav="next">Next <span></span></a>
</nav>
<span class="notice">Swipe left... or right</span>
</div>
</main>
<script src="js/libs/imagesLoaded.pkgd.min.js"></script>
<script src="js/libs/pixi.min.js"></script>
<script src="js/libs/pixi-filters.min.js"></script>
<script src="js/libs/TweenMax.min.js"></script>
<script src="js/rgbKineticSlider.js"></script>
<script>
// images setup
const images = [
"img/nature-01.jpg",
"img/nature-02.jpg",
"img/nature-03.jpg",
];
// content setup
const texts = [
["Earth", "Surface gravity: 9.807 m/s²"],
["Mars", "Surface gravity: 3.711 m/s²"],
["Venus", "Surface gravity: 8.87 m/s²"],
]
rgbKineticSlider = new rgbKineticSlider({
slideImages: images, // array of images > must be 1920 x 1080
itemsTitles: texts, // array of titles / subtitles
backgroundDisplacementSprite: 'img/map-9.jpg', // slide displacement image
cursorDisplacementSprite: 'img/displace-circle.png', // cursor displacement image
cursorImgEffect : true, // enable cursor effect
cursorTextEffect : false, // enable cursor text effect
cursorScaleIntensity : 0.65, // cursor effect intensity
cursorMomentum : 0.14, // lower is slower
swipe: true, // enable swipe
swipeDistance : window.innerWidth * 0.4, // swipe distance - ex : 580
swipeScaleIntensity: 2, // scale intensity during swipping
slideTransitionDuration : 1, // transition duration
transitionScaleIntensity : 30, // scale intensity during transition
transitionScaleAmplitude : 160, // scale amplitude during transition
nav: true, // enable navigation
navElement: '.main-nav', // set nav class
imagesRgbEffect : false, // enable img rgb effect
imagesRgbIntensity : 0.9, // set img rgb intensity
navImagesRgbIntensity : 80, // set img rgb intensity for regular nav
textsDisplay : true, // show title
textsSubTitleDisplay : true, // show subtitles
textsTiltEffect : true, // enable text tilt
googleFonts : ['Playfair Display:700', 'Roboto:400'], // select google font to use
buttonMode : false, // enable button mode for title
textsRgbEffect : true, // enable text rgb effect
textsRgbIntensity : 0.03, // set text rgb intensity
navTextsRgbIntensity : 15, // set text rgb intensity for regular nav
textTitleColor : 'white', // title color
textTitleSize : 125, // title size
mobileTextTitleSize : 125, // title size
textTitleLetterspacing : 3, // title letterspacing
textSubTitleColor : 'white', // subtitle color ex : 0x000000
textSubTitleSize : 21, // subtitle size
mobileTextSubTitleSize : 21, // mobile subtitle size
textSubTitleLetterspacing : 2, // subtitle letter spacing
textSubTitleOffsetTop : 90, // subtitle offset top
mobileTextSubTitleOffsetTop : 90, // mobile subtitle offset top
});
</script>
</body>
</html>