Skip to content

Commit bf750e0

Browse files
committed
v4.0 - Configurable predefined scroll animations
1 parent 45ecadf commit bf750e0

File tree

11 files changed

+2972
-86
lines changed

11 files changed

+2972
-86
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# .gitattributes
2-
/index.html linguist-documentation
2+
/index.html linguist-documentation
3+
/animations.html linguist-documentation

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# .npmignore
22
index.html
3+
animations.html
34
logo.png
45
creative.gif
56
dist

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
![npm](https://img.shields.io/npm/dt/trig-js?logo=NPM) ![npm](https://img.shields.io/npm/dw/trig-js?logo=NPM) ![npm](https://img.shields.io/npm/dm/trig-js?logo=NPM) ![npm](https://img.shields.io/npm/dy/trig-js?logo=NPM) ![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/trig-js)
1818

19-
The easy way to create CSS scroll animations that react to the position of your HTML element on screen. Animate on scroll (AOS) your CSS.
19+
Trig.js makes it easy to create custom CSS scroll animations, while trig-animations.css provides a library of predefined animations out of the box for effortless animation. Whether you want full control or a quick setup, Trig.js has your AOS (animate on scroll) needs covered. Perfect for sites that tell a story.
2020

2121
<p align="center">
2222
<img src="https://github.com/iDev-Games/Trig-JS/raw/main/creative.gif">
@@ -53,7 +53,7 @@ Trig.js is the perfect solution for CSS scroll animations in any project by deve
5353
All you need to do is add the dist trig.js file into your projects JS folder and add the following code with your trig.js location as the src. Put this code in to your head HTML tags
5454

5555
```html
56-
<script src="/js/trig.js"></script>
56+
<script src="/js/trig.min.js"></script>
5757
```
5858

5959
Or just add a CDN instead

animations.html

Lines changed: 1933 additions & 53 deletions
Large diffs are not rendered by default.

dist/trig-animations.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/trig.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/trig.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,24 @@
213213
background-repeat: no-repeat;
214214
filter: blur(calc((var(--trig-px) / 5) - 10px));
215215
}
216+
.trig.background9{
217+
overflow:hidden;
218+
background: #111111;
219+
}
220+
.trig.background9:before{
221+
content: "";
222+
width: 100%;
223+
height: 100%;
224+
position: absolute;
225+
top: 0;
226+
left: 0px;
227+
background: #0b0a0a;
228+
background-size: 100vw 100vh;
229+
background-position: center top;
230+
background-repeat: no-repeat;
231+
transform: translateY(calc((var(--trig) * 2.5)));
232+
transition:transform ease-out 0.4s;
233+
}
216234
.pageContainer{
217235
max-width:100%;
218236
overflow:hidden;
@@ -253,7 +271,7 @@
253271
.alignCenter{
254272
text-align:center;
255273
}
256-
h1{
274+
h1, .trigText{
257275
font-family: 'Bebas Neue', cursive;
258276
color: #700c0c;
259277
text-shadow: 2px 2px 2px #000000;
@@ -369,7 +387,7 @@ <h1 id="logo" data-trig-min="30" data-trig>Trig.js</h1>
369387

370388
<hr id="headerLine" data-trig-min="20" data-trig />
371389

372-
<h2 id="documentation" data-trig-min="20" data-trig>Documentation <sup>v3.2</sup></h2>
390+
<h2 id="documentation" data-trig-min="20" data-trig>Documentation <sup>v4.0</sup></h2>
373391
</div>
374392
</div>
375393

@@ -388,21 +406,38 @@ <h2>What is Trig.js?</h2>
388406
Using nothing but the power of CSS, HTML and Trig.js. You can make the same effects as you see here! Not just that, Trig.js is really lightweight with a filesize of <img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/trig-js">! Trig.js is created with javascript and doesn't require any dependencies.
389407
</div>
390408
<div class="box fadeIn animdelay2" data-trig>
391-
Trig.js is really simple and quick to work with. You can use Trig.js even if you arn't familiar with javascript.
409+
Trig.js now includes customizable predefined scroll animations (trig-animations.css), making it easier than ever to create powerfully reactive websites.
392410
</div>
393411
</div>
394412
</div>
395413

414+
<hr/>
415+
416+
<div class="container alignCenter background9" data-trig data-trig-max="40" data-trig-var="true">
417+
<div class="box" id="animationsCSS" data-trig-min="20" data-trig-max="40" data-trig data-trig-var="true">
418+
<h2 class="trigText">Trig-Animations.css</h2>
419+
</div>
420+
<hr id="headerLine2" data-trig-min="10" data-trig data-trig-var="true"/>
421+
<div id="textBlock" data-trig-min="0" data-trig data-trig-var="true">
422+
<div class="box fadeIn" data-trig>
423+
Configurable predefined scroll animations for your projects
424+
</div>
425+
</div>
426+
<div id="examples" class="box" data-trig>
427+
<a class="moreExamples" href="animations.html" target="_Blank">View Documentation</a>
428+
</div>
429+
</div>
430+
396431
<hr/>
397432

398433
<div class="container alignCenter background3" data-trig data-trig-max="50" data-trig-pixels="true" data-trig-var="true">
399434
<div class="box boxBG title" id="install">
400435
<h2>How To Install?</h2>
401436
</div>
402437
<div class="box boxBG fadeIn" data-trig>
403-
<p>All you need to do is add the dist trig.js file into your projects JS folder and add the following code with your trig.js location as the src. Put this code in to your head HTML tags. Download Trig.js <a href="https://github.com/iDev-Games/Trig-JS" target="_Blank" style="color:#FFF;">here</a> or use <a href="https://www.npmjs.com/package/trig-js" target="_Blank" style="color:#FFF;">npm</a>.</p>
438+
<p>All you need to do is add the dist trig.min.js file into your projects JS folder and add the following code with your trig.js location as the src. Put this code in to your head HTML tags. Download Trig.js <a href="https://github.com/iDev-Games/Trig-JS" target="_Blank" style="color:#FFF;">here</a> or use <a href="https://www.npmjs.com/package/trig-js" target="_Blank" style="color:#FFF;">npm</a>.</p>
404439
<pre>
405-
&lt;script src="/js/trig.js"&gt;&lt;/script&gt;
440+
&lt;script src="/js/trig.min.js"&gt;&lt;/script&gt;
406441
</pre>
407442
<p>Or just add a CDN instead</p>
408443
<pre>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "trig-js",
3-
"version": "3.2.0",
4-
"description": "The easy way to create CSS scroll animations that react to the position of your HTML element on screen. Animate on scroll (AOS) your CSS.",
3+
"version": "4.0.0",
4+
"description": "Trig.js makes it easy to create custom CSS scroll animations, while trig-animations.css provides a library of predefined animations out of the box for effortless animation. Whether you want full control or a quick setup, Trig.js has your AOS (animate on scroll) needs covered. Perfect for sites that tell a story.",
55
"main": "src/trig.js",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)