Demos for the tutorial on how to achieve an interactive mouseover/hover effect

Overview

Interactive Hover Effects with Three.js

A simple tutorial on how to achieve an interactive mouseover/hover effect on images in some easy steps.

Image Title

Article on Codrops

Demo

Instructions

Install dependences:

npm install
# or
yarn add

HMR development:

npm run start1 # step1 hot module reload
# or
npm run start2 # step2 hot module reload
# or
npm run start3 # step3 hot module reload

Credits

Misc

Follow Yuriy: Twitter, Instagram, Facebook, GitHub

Follow Codrops: Twitter, Facebook, GitHub, Instagram

License

MIT

Made with đź’™ by Codrops

Comments
  • Bump three from 0.112.1 to 0.125.0

    Bump three from 0.112.1 to 0.125.0

    Bumps three from 0.112.1 to 0.125.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump elliptic from 6.5.2 to 6.5.3

    Bump elliptic from 6.5.2 to 6.5.3

    Bumps elliptic from 6.5.2 to 6.5.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump lodash from 4.17.15 to 4.17.19

    Bump lodash from 4.17.15 to 4.17.19

    Bumps lodash from 4.17.15 to 4.17.19.

    Release notes

    Sourced from lodash's releases.

    4.17.16

    Commits
    Maintainer changes

    This version was pushed to npm by mathias, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Implementing in React gives errors..

    Implementing in React gives errors..

    I wanted to use your code in react project, I changed somethings, but it ain't working....

    this is the changed scene.js :

    import * as THREE from "three"
    import * as dat from "dat.gui"
    import EffectComposer, {
        Pass,
        RenderPass,
        ShaderPass,
        TexturePass,
        ClearPass,
        MaskPass,
        ClearMaskPass,
        CopyShader,
    } from '@johh/three-effectcomposer'
    let OrbitControls = require("three-orbit-controls")(THREE)
    
    const createInputEvents = require('simple-input-events');
    const event = createInputEvents(window);
    
    const clamp = (min, max) => (value) =>
        value < min ? min : value > max ? max : value;
    
    export function Scene (container) {
    
      let scene = new THREE.Scene();
    
      let renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true})
      let width = window.innerWidth
      let height = window.innerHeight
      // this.renderer.setPixelRatio(window.devicePixelRatio);
      renderer.setPixelRatio(1)
      renderer.setSize(width, height)
      renderer.sortObjects = false
    
      renderer.outputEncoding = THREE.sRGBEncoding;
    
      container.appendChild(renderer.domElement)
    
      let camera = new THREE.PerspectiveCamera(
          70,
          width / height,
          100,
          1000
      )
    
      let cameraDistance = 400
      camera.position.set(0, 0, cameraDistance)
      camera.lookAt(0, 0, 0)
      let time = 0
      let speed = 0
      let targetSpeed = 0
      let mouse = new THREE.Vector2()
      let followMouse = new THREE.Vector2()
      let prevMouse = new THREE.Vector2()
    
      let paused = false
      let controls = new OrbitControls(camera, renderer.domElement)
    
      let that = this;
      let settings = {
        velo: 0,
        scale: 0,
        colorful: ()=>{
          // that.makeColorful()
          that.customPass.uniforms.uType.value = 0
        },
        zoom: ()=>{
          that.customPass.uniforms.uType.value = 1
        },
        random: ()=>{
          that.customPass.uniforms.uType.value = 2
        },
      };
      let gui = new dat.GUI()
      // this.gui.add(this.settings, "progress", -1, 2, 0.01);
      // this.gui.add(this.settings, "velo", 0, 1, 0.01);
      // this.gui.add(this.settings, "scale", 0, 1, 0.01);
      gui.add(settings, "colorful")
      gui.add(settings, "zoom")
      gui.add(settings, "random")
    
      window.addEventListener("resize", resize.bind(this))
    
      let composer = new EffectComposer(renderer)
      let renderPass = new RenderPass(scene, camera)
      composer.addPass(renderPass)
    
      //custom shader pass
      let counter = 0.0
      let myEffect = {
        uniforms: {
          "tDiffuse": { value: null },
          "distort": { value: 0 },
          "resolution": { value: new THREE.Vector2(1.,window.innerHeight/window.innerWidth) },
          "uMouse": { value: new THREE.Vector2(-10,-10) },
          "uVelo": { value: 0 },
          "uScale": { value: 0 },
          "uType": { value: 0 },
          "time": { value: 0 }
        },
        vertexShader: `
          uniform float time;
          uniform float progress;
          uniform vec2 resolution;
          varying vec2 vUv;
          uniform sampler2D texture1;
          
          const float pi = 3.1415925;
          
          void main() {
            vUv = uv;
            gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );
          }`,
        fragmentShader: `
          uniform float time;
          uniform float progress;
          uniform sampler2D tDiffuse;
          uniform vec2 resolution;
          varying vec2 vUv;
          uniform vec2 uMouse;
          uniform float uVelo;
          uniform int uType;
          
          
          float circle(vec2 uv, vec2 disc_center, float disc_radius, float border_size) {
          uv -= disc_center;
          uv*=resolution;
          float dist = sqrt(dot(uv, uv));
          return smoothstep(disc_radius+border_size, disc_radius-border_size, dist);
          }
          
          float map(float value, float min1, float max1, float min2, float max2) {
          return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
          }
          
          float remap(float value, float inMin, float inMax, float outMin, float outMax) {
            return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin);
          }
          
          float hash12(vec2 p) {
          float h = dot(p,vec2(127.1,311.7));
          return fract(sin(h)*43758.5453123);
          }
          
          // #define HASHSCALE3 vec3(.1031, .1030, .0973)
          vec2 hash2d(vec2 p)
          {
          vec3 p3 = fract(vec3(p.xyx) * vec3(.1031, .1030, .0973));
              p3 += dot(p3, p3.yzx+19.19);
              return fract((p3.xx+p3.yz)*p3.zy);
          }
          
          
          
          
          void main(){
          vec2 newUV = vUv;
          vec4 color = vec4(1.,0.,0.,1.);
          
          // colorful
          if(uType==0){
          float c = circle(newUV, uMouse, 0.0, 0.2);
          float r = texture2D(tDiffuse, newUV.xy += c * (uVelo * .5)).x;
          float g = texture2D(tDiffuse, newUV.xy += c * (uVelo * .525)).y;
          float b = texture2D(tDiffuse, newUV.xy += c * (uVelo * .55)).z;
          color = vec4(r, g, b, 1.);
          }
          
          // zoom
          if(uType==1){
          float c = circle(newUV, uMouse, 0.0, 0.1+uVelo*2.)*40.*uVelo;
          vec2 offsetVector = normalize(uMouse - vUv);
          vec2 warpedUV = mix(vUv, uMouse, c * 0.99); //power
          color = texture2D(tDiffuse,warpedUV) + texture2D(tDiffuse,warpedUV)*vec4(vec3(c),1.);
          }
          
          // zoom
          if(uType==2){
          float hash = hash12(vUv*10.);
          // float c = -circle(newUV, uMouse, 0.0, 0.1+uVelo*2.)*40.*uVelo;
          // vec2 offsetVector = -normalize(uMouse - vUv);
          // vec2 warpedUV = mix(vUv, uMouse, c * 0.6); //power
          // vec2 warpedUV1 = mix(vUv, uMouse, c * 0.3); //power
          // vec2 warpedUV2 = mix(vUv, uMouse, c * 0.1); //power
          // color = vec4(
          // texture2D(tDiffuse,warpedUV ).r,
          // texture2D(tDiffuse,warpedUV1 ).g,
          // texture2D(tDiffuse,warpedUV2 ).b,
          // 1.);
          // color = vec4(,0.,0.,1.);
          float c = circle(newUV, uMouse, 0.0, 0.1+uVelo*0.01)*10.*uVelo;
          vec2 offsetVector = normalize(uMouse - vUv);
          // vec2 warpedUV = mix(vUv, uMouse,  20.*hash*c); //power
          vec2 warpedUV = vUv + vec2(hash - 0.5)*c; //power
          color = texture2D(tDiffuse,warpedUV) + texture2D(tDiffuse,warpedUV)*vec4(vec3(c),1.);
          }
          
          gl_FragColor = color;
          }
        `
      }
    
      let customPass = new ShaderPass(myEffect)
      customPass.renderToScreen = true
      composer.addPass(customPass)
    
      event.on('move', ({ position, event, inside, dragging }) => {
        // mousemove / touchmove
        mouse.x = (position[0] / width)
        mouse.y = 1. - (position[1]/ height)
      })
    
      let geometry = new THREE.PlaneBufferGeometry(1, 1, 80, 80)
      let material = new THREE.ShaderMaterial({
        extensions: {
          derivatives: "#extension GL_OES_standard_derivatives : enable"
        },
        side: THREE.DoubleSide,
        uniforms: {
          time: { type: "f", value: 0 },
          progress: { type: "f", value: 0 },
          angle: { type: "f", value: 0 },
          texture1: { type: "t", value: null },
          texture2: { type: "t", value: null },
          resolution: { type: "v4", value: new THREE.Vector4() },
          uvRate1: {
            value: new THREE.Vector2(1, 1)
          }
        },
        // wireframe: true,
        transparent: true,
        vertexShader: `
          uniform float time;
          uniform float progress;
          uniform vec4 resolution;
          varying vec2 vUv;
          uniform sampler2D texture1;
          
          const float pi = 3.1415925;
          
          void main() {
            vUv = uv;
            gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );
          }`,
        fragmentShader: `
          uniform float time;
          uniform float progress;
          uniform sampler2D texture1;
          uniform vec4 resolution;
          varying vec2 vUv;
          
          void main(){
          vec2 newUV = (vUv - vec2(0.5))*resolution.zw + vec2(0.5);
          // newUV.x += 0.02*sin(newUV.y*20. + time);
          gl_FragColor = texture2D(texture1,newUV);
          }
        `
      })
    
      function resize() {
        renderer.setSize(width, height)
        camera.aspect = width / height
    
        camera.fov = 2 * Math.atan(width / camera.aspect / (2 * cameraDistance)) * (180 / Math.PI); // in degrees
        customPass.uniforms.resolution.value.y = height / width
        camera.updateProjectionMatrix();
      }
    
      resize()
    
    
      function render() {
        time+=0.05
        getSpeed()
        scene.children.forEach(m => {
          if (m.material.uniforms) {
            m.material.uniforms.angle.value = settings.angle
            m.material.uniforms.time.value = time
          }
        });
        customPass.uniforms.time.value = time
        customPass.uniforms.uMouse.value = followMouse
        // this.customPass.uniforms.uVelo.value = this.settings.velo;
        customPass.uniforms.uVelo.value = Math.min(targetSpeed, 0.05);
        targetSpeed *=0.999;
        // this.renderer.render(this.scene, this.camera);
        if(composer) composer.render()
      }
    
      render()
    
    
      function createMesh(o) {
        let material = this.material.clone()
        let texture = new THREE.Texture(o.image)
        texture.needsUpdate = true
        // image cover
        let imageAspect = o.iHeight / o.iWidth
        let a1
        let a2
        if (o.height / o.width > imageAspect) {
          a1 = (o.width / o.height) * imageAspect
          a2 = 1
        } else {
          a1 = 1
          a2 = o.height / o.width / imageAspect
        }
        texture.minFilter = THREE.LinearFilter
        material.uniforms.resolution.value.x = o.width
        material.uniforms.resolution.value.y = o.height
        material.uniforms.resolution.value.z = a1
        material.uniforms.resolution.value.w = a2
        material.uniforms.progress.value = 0
        material.uniforms.angle.value = 0.3
    
        material.uniforms.texture1.value = texture
        material.uniforms.texture1.value.needsUpdate = true
    
        let mesh = new THREE.Mesh(geometry, material)
    
        mesh.scale.set(o.width, o.height, o.width / 2)
    
        return mesh
      }
    
    
      function stop() {
        paused = true;
      }
    
      function play() {
        paused = false
        render()
      }
    
      function getSpeed(){
        speed = Math.sqrt( (prevMouse.x- mouse.x)**2 + (prevMouse.y- mouse.y)**2 );
    
        targetSpeed -= 0.1*(targetSpeed - this.speed);
        followMouse.x -= 0.1*(followMouse.x - mouse.x);
        followMouse.y -= 0.1*(followMouse.y - mouse.y);
    
    
        prevMouse.x = mouse.x;
        prevMouse.y = mouse.y;
      }
    
      return {
        createMesh: createMesh,
        scene: scene,
        render: render,
        targetSpeed: targetSpeed
      }
    }
    

    this is the changed app.js:

    import imagesLoaded from "imagesloaded"
    import {Scene} from "./scene"
    
    
    let scene
    // helper functions
    const MathUtils = {
      // map number x from range [a, b] to [c, d]
      map: (x, a, b, c, d) => ((x - a) * (d - c)) / (b - a) + c,
      // linear interpolation
      lerp: (a, b, n) => (1 - n) * a + n * b
    };
    
    // body element
    const wrapper = document.querySelector('.pic-wrapper')
    let IMAGES
    
    // calculate the viewport size
    let winsize;
    const calcWinsize = () =>
      (winsize = { width: window.innerWidth, height: window.innerHeight });
    calcWinsize();
    // and recalculate on resize
    window.addEventListener("resize", calcWinsize);
    
    window.onbeforeunload = function() {
      window.scrollTo(0, 0);
    };
    
    // scroll position and update function
    let docScroll;
    const getPageYScroll = () =>
      (docScroll = window.pageYOffset || document.documentElement.scrollTop)
    window.addEventListener("scroll", getPageYScroll)
    
    // Item
    function Item (el, scroll) {
      let DOM = { el: el.img }
      let currentScroll = docScroll
      let animated = false
      let isBeingAnimatedNow = false
      let shouldRollBack = false
      let shouldUnRoll = false
      let positions = []
    
      const bounds = DOM.el.getBoundingClientRect()
      const fromTop = bounds.top
      const windowHeight = window.innerHeight
      const withoutHeight = fromTop - windowHeight
      const withHeight = fromTop + bounds.height
      let insideTop = withoutHeight - docScroll
      let insideRealTop = fromTop + docScroll
      let insideBottom = withHeight - docScroll + 50
      let width = bounds.width
      let height = bounds.height
      let left = bounds.left
      let src = document.getElementById('picture')
    
      let mesh = scene.createMesh({
        width: width,
        height: height,
        src: src,
        image: DOM.el,
        iWidth: DOM.el.width,
        iHeight: DOM.el.height
      })
      scene.scene.add(mesh)
      // use the IntersectionObserver API to check when the element is inside the viewport
      // only then the element translation will be updated
      let options = {
        root: null,
        rootMargin: "0px",
        threshold: [0, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
      }
      let observer = new IntersectionObserver(entries => {
        entries.forEach(entry => {
          positions.push(entry.boundingClientRect.y)
          let compareArray = this.positions.slice(
              positions.length - 2,
              positions.length
          );
          let down = compareArray[0] > compareArray[1]
    
          let isVisible = entry.intersectionRatio > 0.0
    
          let shouldRollBack = false
          let shouldUnRoll = false
          if (
              entry.intersectionRatio < 0.5 &&
              entry.boundingClientRect.y > 0 &&
              isVisible &&
              !down
          ) {
            shouldRollBack = true
          }
    
          if (
              entry.intersectionRatio > 0.5 &&
              entry.boundingClientRect.y > 0 &&
              isVisible
          ) {
            shouldUnRoll = true
          }
          console.log(isVisible, 'vis')
          mesh.visible = isVisible
        })
      }, options)
      observer.observe(DOM.el)
    
      function resize() {
        // on resize rest sizes and update the translation value
        mesh.scale.set(width, height, 200)
        render(scroll.renderedStyles.translationY.current)
        scroll.shouldRender = true
      }
      // init/bind events
      window.addEventListener("resize", () => resize())
    
      function render(s) {
        currentScroll = s
        mesh.position.y = currentScroll + winsize.height / 2 - insideRealTop - height / 2
        mesh.position.x = 0 - winsize.width / 2 + left + width / 2
      }
      render(0)
    }
    
    function SmoothScroll() {
      let shouldRender = false
      // the <main> element
      let DOM = { main: document.querySelector(".pic-main") };
      // the scrollable element
      // we translate this element when scrolling (y-axis)
      DOM.scrollable = DOM.main.querySelector(".scrollable");
      // the items on the page
      let items = [];
    
    
      IMAGES.forEach(image => {
        if (image.img.classList.contains("js-image")) {
          items.push(new Item(image, this))
        }
      })
    
      document.addEventListener('mousemove',()=>{
        shouldRender = true
      })
    
      // here we define which property will change as we scroll the page
      // in this case we will be translating on the y-axis
      // we interpolate between the previous and current value to achieve the smooth scrolling effect
      let renderedStyles = {
        translationY: {
          // interpolated value
          previous: 0,
          // current value
          current: 0,
          // amount to interpolate
          ease: 0.1,
          // current value setter
          // in this case the value of the translation will be the same like the document scroll
          setValue: () => docScroll
        }
      }
      // set the body's height
      function setSize() {
        wrapper.style.height = `${DOM.scrollable.scrollHeight}px`
      }
      setSize()
      // set the initial values
      for (const key in renderedStyles) {
        renderedStyles[key].current = renderedStyles[key].previous = renderedStyles[key].setValue()
      }
      setPosition()
      shouldRender = true
    
      // translate the scrollable element
      function setPosition() {
        if (
            Math.round(renderedStyles.translationY.previous) !==
            Math.round(renderedStyles.translationY.current) ||
            renderedStyles.translationY.previous < 10
        ) {
          shouldRender = true;
          DOM.scrollable.style.transform = `translate3d(0,${-1 * renderedStyles.translationY.previous}px,0)`
    
          for (const item of items) {
            if (item.isVisible || item.isBeingAnimatedNow) {
              item.render(renderedStyles.translationY.previous);
            }
          }
        }
        if(scene.targetSpeed > 0.01) shouldRender = true
        if (shouldRender) {
          shouldRender = false
          scene.render()
        }
      }
      // the <main> element's style needs to be modified
      DOM.main.style.position = "fixed"
      DOM.main.style.width = DOM.main.style.height = "100%"
      DOM.main.style.top = DOM.main.style.left = 0
      DOM.main.style.overflow = "hidden"
      // init/bind events
      window.addEventListener("resize", () => setSize());
      // start the render loop
      requestAnimationFrame(() => render())
    
      function render() {
        // update the current and interpolated values
        for (const key in renderedStyles) {
          renderedStyles[key].current = renderedStyles[key].setValue()
          renderedStyles[key].previous = MathUtils.lerp(
              renderedStyles[key].previous,
              renderedStyles[key].current,
              renderedStyles[key].ease
          )
        }
        // and translate the scrollable element
        setPosition()
    
        // loop..
        requestAnimationFrame(() => render())
      }
    }
    
    
    /***********************************/
    /********** Preload stuff **********/
    
    export const pictureAnimation = () => {
    
      const preloadImages = new Promise((resolve, reject) => {
        imagesLoaded(document.getElementById("picture"), { background: true }, resolve);
      });
    
      preloadImages.then(images => {
        IMAGES = images.images
      })
    
      console.log(IMAGES)
    
      const preloadEverything = [preloadImages]
    
    // And then..
      Promise.all(preloadEverything).then(() => {
        // Remove the loader
        // Get the scroll position
        getPageYScroll()
        // Initialize the Smooth Scrolling
        let container = document.querySelector(".pic-container")
        scene = new Scene(container)
        new SmoothScroll()
      })
    }
    

    I don't know what to do

    opened by Arshazar 0
  • Bump json5 and parcel

    Bump json5 and parcel

    Bumps json5 to 2.2.3 and updates ancestor dependency parcel. These dependencies need to be updated together.

    Updates json5 from 1.0.1 to 2.2.3

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1

    • New: package.json and package.json5 include a module property so bundlers like webpack, rollup and parcel can take advantage of the ES Module build. (#208)
    • Fix: stringify outputs \0 as \\x00 when followed by a digit. (#210)
    • Fix: Spelling mistakes have been fixed. (#196)

    v2.1.0

    • New: The index.mjs and index.min.mjs browser builds in the dist directory support ES6 modules. (#187)

    v2.0.1

    • Fix: The browser builds in the dist directory support ES5. (#182)

    v2.0.0

    • Major: JSON5 officially supports Node.js v6 and later. Support for Node.js v4 has been dropped. Since Node.js v6 supports ES5 features, the code has been rewritten in native ES5, and the dependence on Babel has been eliminated.

    • New: Support for Unicode 10 has been added.

    • New: The test framework has been migrated from Mocha to Tap.

    • New: The browser build at dist/index.js is no longer minified by default. A minified version is available at dist/index.min.js. (#181)

    • Fix: The warning has been made clearer when line and paragraph separators are

    ... (truncated)

    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1 [code, [diff][d2.1.1]]

    ... (truncated)

    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Updates parcel from 1.12.4 to 2.8.2

    Release notes

    Sourced from parcel's releases.

    v2.8.2

    Fixed

    • Core
      • Ensure maxListeners for process.stdout accounts for workers – Details
    • JavaScript
      • Bump SWC to fix scoping issue with block-less loops – Details
      • Fix requires of external CommonJS SWC helpers – Details

    v2.8.1

    Fixed

    • Core
      • fix: remove @​parcel/utils dep in @​parcel/graph – Details
    • JavaScript
      • Don't retarget dependencies with * – Details
      • Fix overriding single export of a export * – Details
      • Add mjs and cjs to resolver extensions – Details
    • TypeScript
      • Make ts-types transformer work with TS >= 4.8 – Details
    • Web manifest
      • Parse shortcut icons in web app manifests – Details
    • SVG
      • Fix transformer-svg-react not finding .svgrrc – Details

    v2.8.0

    Blog post: https://parceljs.org/blog/v2-8-0/

    Added

    • Core
      • Code splitting across reexports using symbol data by splitting dependencies – Details
      • Update without bundling for non-dependency related changes – Details
      • Improve performance of incremental bundling – Details
      • Only serialize and send shared references to workers that need them – Details
      • Improve performance of HMR by not waiting for packaging – Details
    • JavaScript
      • Verify version when resolving Node builtin polyfills – Details
      • Add loadBundleConfig method to Packager plugins – Details
    • SVG
      • Generate typescript for SVGs when using svgr and typescript option – Details
    • Bundler
      • Move experimental bundler to default – Details

    Fixed

    • Core
      • Fix verbose warning: reexport all doesn't include default – Details
      • Support multiple edge types in Graph.hasEdge – Details
      • Ensure edge exists before removal in Graph.removeEdge – Details

    ... (truncated)

    Changelog

    Sourced from parcel's changelog.

    [2.8.2] - 2022-12-14

    • Core
      • Ensure maxListeners for process.stdout accounts for workers – Details
    • JavaScript
      • Bump SWC to fix scoping issue with block-less loops – Details
      • Fix requires of external CommonJS SWC helpers – Details

    [2.8.1] - 2022-12-07

    Fixed

    • Core
      • fix: remove @​parcel/utils dep in @​parcel/graph – Details
    • JavaScript
      • Don't retarget dependencies with * – Details
      • Fix overriding single export of a export * – Details
      • Add mjs and cjs to resolver extensions – Details
    • TypeScript
      • Make ts-types transformer work with TS >= 4.8 – Details
    • Web manifest
      • Parse shortcut icons in web app manifests – Details
    • SVG
      • Fix transformer-svg-react not finding .svgrrc – Details

    [2.8.0] - 2022-11-09

    Added

    • Core
      • Code splitting across reexports using symbol data by splitting dependencies – Details
      • Update without bundling for non-dependency related changes – Details
      • Improve performance of incremental bundling – Details
      • Only serialize and send shared references to workers that need them – Details
      • Improve performance of HMR by not waiting for packaging – Details
    • JavaScript
      • Verify version when resolving Node builtin polyfills – Details
      • Add loadBundleConfig method to Packager plugins – Details
    • SVG
      • Generate typescript for SVGs when using svgr and typescript option – Details
    • Bundler
      • Move experimental bundler to default – Details

    Fixed

    • Core
      • Fix verbose warning: reexport all doesn't include default – Details
      • Support multiple edge types in Graph.hasEdge – Details
      • Ensure edge exists before removal in Graph.removeEdge – Details
      • Disable splitting dependencies on symbols for non-scope hoisted bundles – Details

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3

    Bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Script is not modular

    Script is not modular

    Script is not modular

    I wanna use to in my other landing page. But script is not modular cause its have “scrollable container” and when I try add another html element its not looking normal. (screen shot in below)

    cant I use that script as a component or modular?

    ss https://www.linkpicture.com/q/issue_5.png

    opened by cengizilhan 1
  • Bump ajv from 6.12.0 to 6.12.6

    Bump ajv from 6.12.0 to 6.12.6

    Bumps ajv from 6.12.0 to 6.12.6.

    Release notes

    Sourced from ajv's releases.

    v6.12.6

    Fix performance issue of "url" format.

    v6.12.5

    Fix uri scheme validation (@​ChALkeR). Fix boolean schemas with strictKeywords option (#1270)

    v6.12.4

    Fix: coercion of one-item arrays to scalar that should fail validation (failing example).

    v6.12.3

    Pass schema object to processCode function Option for strictNumbers (@​issacgerges, #1128) Fixed vulnerability related to untrusted schemas (CVE-2020-15366)

    v6.12.2

    Removed post-install script

    v6.12.1

    Docs and dependency updates

    Commits
    • fe59143 6.12.6
    • d580d3e Merge pull request #1298 from ajv-validator/fix-url
    • fd36389 fix: regular expression for "url" format
    • 490e34c docs: link to v7-beta branch
    • 9cd93a1 docs: note about v7 in readme
    • 877d286 Merge pull request #1262 from b4h0-c4t/refactor-opt-object-type
    • f1c8e45 6.12.5
    • 764035e Merge branch 'ChALkeR-chalker/fix-comma'
    • 3798160 Merge branch 'chalker/fix-comma' of git://github.com/ChALkeR/ajv into ChALkeR...
    • a3c7eba Merge branch 'refactor-opt-object-type' of github.com:b4h0-c4t/ajv into refac...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump three from 0.112.1 to 0.137.0

    Bump three from 0.112.1 to 0.137.0

    Bumps three from 0.112.1 to 0.137.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Recreation of the background scale hover effect seen on the DDD Hotel website using CSS clip paths.

Background Scale Hover Effect Recreation of the background scale hover effect seen on the DDD Hotel menu using CSS clip paths. Article on Codrops Demo

Codrops 98 Dec 6, 2022
A motion hover effect for a background grid of images.

Image Grid Motion Effect A motion hover effect for a background grid of images. Article on Codrops Demo Installation Install dependencies: npm install

Codrops 118 Dec 31, 2022
magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet

magneticHover magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet. Examples https://codesandbox

Halo Lab 35 Nov 30, 2022
đź‘“ Parallax tilt hover effect for React JS - tilt.js

React.js - Tilt.js React version of tilt.js Demo https://vx-demo.now.sh/gallery Install yarn: yarn add react-tilt npm: npm install --save react-tilt U

Jon 340 Dec 23, 2022
Simple jQuery plugin for 3d Hover effect

jQuery Hover3d jQuery Hover3d is a simple hover script for creating 3d hover effect. It was my experiment on exploring CSS3 3d transform back in 2015

Rian Ariona 333 Jan 4, 2023
Pure CSS Image Hover Effect Library

imagehover.css A Scaleable & Light Image Hover CSS Library Imagehover.css is a lovingly crafted CSS library allowing you to easily implement scaleable

Ciaran Walsh 1.8k Dec 21, 2022
A set of buttons with a magnetic interaction and a hover effect.

Magnetic Buttons A small set of magnetic buttons with some fun hover animations. Inspired by the button animation seen on Cuberto. Article on Codrops

Codrops 405 Dec 24, 2022
A tutorial on how to create a thumbnail grid with an expanding image preview similar to the effect seen on Google Images.

Thumbnail Grid with Expanding Preview A tutorial on how to create a thumbnail grid with an expanding image preview similar to the effect seen on Googl

Codrops 353 Jan 4, 2023
A subtle tilt effect for images. The idea is to move and rotate semi-transparent copies with the same background image in order to create a subtle motion or depth effect.

Image Tilt Effect A subtle tilt effect for images. The idea is to move and rotate semi-transparent copies with the same background image in order to c

Codrops 571 Nov 21, 2022
Liquideffect - Javascript Library for creating liquid effect on image and RGB effect on mouse direction.

LiquidEffect Javascript Library for creating liquid effect on image and RGB effect on mouse direction. Demo https://liquideffect.netlify.app/ Dependen

Rohail 8 May 6, 2022
Warp drive is a lightweight jQuery plugin that helps you create a cool, interactive, configurable, HTML5 canvas based warp drive/starfield effect.

Warp drive jQuery plugin (jquery-warpdrive-plugin) Preview Description Warp drive is a lightweight jQuery plugin that helps you create a cool, interac

Niklas 51 Nov 15, 2022
Some shape morphing hover effects on images using SVG clipPath.

Organic Shape Animations with SVG clipPath Some shape morphing hover effects using SVG clipPath on an image. Article on Codrops Demo Credits Anime.js

Codrops 197 Oct 16, 2022
Javascript library to draw and animate images on hover

Hover effect Javascript library to draw and animate images on hover. If this project help you, you like this library or you just want to thank me, you

Robin Delaporte 1.5k Dec 23, 2022
Add a water ripple effect to your background using WebGL.

jQuery Ripples Plugin By the powers of WebGL, add a layer of water to your HTML elements which will ripple by cursor interaction! Important: this plug

Pim Schreurs 976 Dec 30, 2022
A decorative website background effect where SVG shapes morph and transform on scroll.

Morphing Background Shapes A decorative website background effect where SVG shapes morph and transform on scroll. Article on Codrops Demo This demo is

Codrops 351 Dec 26, 2022
Background image segment effect as seen on [Filippo Bello's Portfolio](http://www.filippobello.com/portfolio).

Segment Effect Background image segment effect as seen on Filippo Bello's Portfolio. Article on Codrops Demo License Integrate or build upon it for fr

Codrops 526 Nov 29, 2022
Switch the background-image with using effect.

jQuery.BgSwitcher Switch the background image with using effect. Demo http://rewish.github.io/jquery-bgswitcher/ Usage <div class="box"> <p>Lorem ip

rewish 195 Dec 30, 2022
fixed-background-effect

Fixed Background Effect A simple template that takes advantage of the background-attachment CSS property to create a fixed background effect. Article

CodyHouse 50 Oct 28, 2022
A mouse particle effect react component

react-mouse-particles A mouse particle effect react component A very fun react library that can be used to create mouse particle effects, which are as

lindelof 92 Dec 17, 2022