Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
phucbm committed Jan 23, 2022
1 parent 8cb8108 commit 7a62733
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/css-blended-color/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h1 class="test">🦄 Cursor.js ~ CSS Blended Color</h1>
</footer>

<script src="../../src/dat.gui.min.js"></script>
<script src="../../src/custom-cursor.js"></script>
<script src="../../src/cursor.js"></script>
<script src="../../src/gsap.js"></script>
<script>
// init Cursor.js
Expand All @@ -66,7 +66,7 @@ <h1 class="test">🦄 Cursor.js ~ CSS Blended Color</h1>
mixBlendMode: 'difference'
}
};
const cursor = new CustomCursor(config);
const cursor = new Cursor(config);


// GUI
Expand Down
6 changes: 3 additions & 3 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>🦄 Cursor.js</h1>
targets. This library relies on <a href="https://greensock.com/" target="_blank">GreenSock</a> to handle the
frame update and animation.</p>
<p>In this page, you're seeing the default cursor style that achieves by running:</p>
<code>new CustomCursor();</code>
<code>new Cursor();</code>
<p>Plus, you can adjust the cursor directly from the panel in the top right corner of this page ↗️</p>
<p>And here's some more style that I've made:</p>
<ul>
Expand Down Expand Up @@ -48,11 +48,11 @@ <h1>🦄 Cursor.js</h1>
</footer>

<script src="../src/dat.gui.min.js"></script>
<script src="../src/custom-cursor.js"></script>
<script src="../src/cursor.js"></script>
<script src="../src/gsap.js"></script>
<script>
// init Cursor.js
const cursor = new CustomCursor();
const cursor = new Cursor();

// GUI
const config = {
Expand Down
4 changes: 2 additions & 2 deletions examples/ipad/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ <h1 class="test">🦄 Cursor.js ~ iPad style</h1>

</footer>

<script src="../../src/custom-cursor.js"></script>
<script src="../../src/cursor.js"></script>
<script src="../../src/gsap.js"></script>
<script>
new CustomCursor({
new Cursor({
style: {
width: '23px',
height: '23px',
Expand Down
6 changes: 3 additions & 3 deletions examples/ring/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3>Support Flickity dragging</h3>
</footer>

<script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script>
<script src="../../src/custom-cursor.js"></script>
<script src="../../src/cursor.js"></script>
<script src="../../src/gsap.js"></script>
<script>
// init Flickity
Expand All @@ -105,7 +105,7 @@ <h3>Support Flickity dragging</h3>
});

// init Cursor.js
const outer = new CustomCursor({
const outer = new Cursor({
speed: .2,
style: {
width: '40px',
Expand Down Expand Up @@ -134,7 +134,7 @@ <h3>Support Flickity dragging</h3>

]
});
const inner = new CustomCursor({
const inner = new Cursor({
style: {
width: '5px',
height: '5px',
Expand Down
2 changes: 1 addition & 1 deletion src/custom-cursor.js → src/cursor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CustomCursor{
class Cursor{
constructor(options){
// config
this.config = {
Expand Down

1 comment on commit 7a62733

@vercel
Copy link

@vercel vercel bot commented on 7a62733 Jan 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.