הגרלה שווה + מדריך לאפקט שובל קסום

אז מה יש לנו כאן?

הגרלה של פעם בחיים

והסבר למה ועל מה יצאתי איתה

ועוד מדריך חמוד וקליל

לעכבר שמשאיר אחריו שובל קסום

בגווני האתר.

 

נתחיל בהגרלה –

קורס דיגיטלי "קסם ה GSAP"

או (לבחירתך)

שעת צילום עם הצלמת

ציפי צ'ולק המהממת

(אופס, יצא לי חרוז)

סיפרתי לך כבר שיצאתי

עם אתר מדליק וכייפי

למכירת עטיפות ללימודים?

יש שם אפשרות ליצור לבד עטיפות

או לקנות ממלאי מוכן.

לרגל ההשקה המרגשת שלו

אני רוצה שתעזרי לי

להפיץ את הבשורה.

בקשי ממני קישור אישי בשבילך

במייל office@appupgo.co.il

שלחי אותו לכל מי שאת מכירה

וכל רכישה שתתבצע דרך הקישור שלך

תזכה אותך בכרטיס להגרלה

שרשמתי למעלה

אם תזכי, את תבחרי

בין השתתפות בקורס GSAP הדיגיטלי

לבין סט צילומים מתוק מתוק.

ועכשיו להדרכה –

קוד קליל

שיוסיף לעכבר באתר שלך

שובל קסום

בגווני האתר.

הוסיפי באלמנטור -> ניהול קודים

קוד שאותו תגדירי שיהיה בתחילת ה BODY.

זה הקוד שתכניסי שם:

				
					<canvas id="pinterCanvas"></canvas>
<style>
#pinterCanvas {
    top: 0;
    left: 0;
    width: 100VW;
    height: 100VH;
    z-index: 999999;
    position: absolute;
}
</style>
<script>
const canvas = document.querySelector("#pinterCanvas");
const ctx = canvas.getContext('2d');


let mouseMoved = false;

const pointer = {
    x: .5 * window.innerWidth,
    y: .5 * window.innerHeight,
}
const params = {
    pointsNumber: 40,
    widthFactor: .9,
    mouseThreshold: .6,
    spring: .4,
    friction: .5
};

const trail = new Array(params.pointsNumber);
for (let i = 0; i < params.pointsNumber; i++) {
    trail[i] = {
        x: pointer.x,
        y: pointer.y,
        dx: 0,
        dy: 0,
    }
}

window.addEventListener("click", e => {
    updateMousePosition(e.pageX, e.pageY);
});
window.addEventListener("mousemove", e => {
    mouseMoved = true;
    updateMousePosition(e.pageX, e.pageY);
});
window.addEventListener("touchmove", e => {
    mouseMoved = true;
    updateMousePosition(e.targetTouches[0].pageX, e.targetTouches[0].pageY);
});

function updateMousePosition(eX, eY) {
    pointer.x = eX;
    pointer.y = eY;
}

setupCanvas();
update(0);
window.addEventListener("resize", setupCanvas);


function update(t) {

    // for intro motion
    if (!mouseMoved) {
        pointer.x = (.5 + .3 * Math.cos(.002 * t) * (Math.sin(.005 * t))) * window.innerWidth;
        pointer.y = (.5 + .2 * (Math.cos(.005 * t)) + .1 * Math.cos(.01 * t)) * window.innerHeight;
    }

    ctx.clearRect(0, 0, canvas.width, canvas.height);
    trail.forEach((p, pIdx) => {
        const prev = pIdx === 0 ? pointer : trail[pIdx - 1];
        const spring = pIdx === 0 ? .4 * params.spring : params.spring;
        p.dx += (prev.x - p.x) * spring;
        p.dy += (prev.y - p.y) * spring;
        p.dx *= params.friction;
        p.dy *= params.friction;
        p.x += p.dx;
        p.y += p.dy;
    });

    ctx.lineCap = "round";
	 ctx.beginPath();
    ctx.moveTo(trail[0].x, trail[0].y);

    for (let i = 1; i < trail.length - 1; i++) {
        const xc = .5 * (trail[i].x + trail[i + 1].x);
        const yc = .5 * (trail[i].y + trail[i + 1].y);
        ctx.quadraticCurveTo(trail[i].x, trail[i].y, xc, yc);
		ctx.strokeStyle = "#00E2C5";
        ctx.lineWidth = params.widthFactor * (params.pointsNumber - i);
        ctx.stroke();
    }
    ctx.lineTo(trail[trail.length - 1].x, trail[trail.length - 1].y);
    ctx.stroke();
    
    window.requestAnimationFrame(update);
}

function setupCanvas() {
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
}
</script>
				
			

את רואה ב שורה 81 מספר גוון?

שימי שם את המספר גוון המדוייק

של האתר שלך.

 

זהו!

נכון קלי קלות?

 

אני מחכה לשלוח לך את הקישור האישי

ועוד יותר מחכה להגרלה :)

קורס קסם ה GSAP

או שעת צילומים ממיסה

 

שלך,

רבקי

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

כניסה לאזור האישי

חייב להיות באנגלית