Jump to content
Search Community

13characters

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by 13characters

  1. Hi! 

    Somehow my  TweenLite animation won't work in the production mode. It works without errors in development mode.

    Also: I have another TweenLite animation and this one works like it should.

    What am I doing wrong?

     

    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>

     

    const {gsap} = require('gsap/dist/gsap');
    import {TweenLite} from 'gsap';
    import 'gsap/CSSPlugin';
    gsap.registerPlugin(TweenLite);
    
    const nextInstruction = document.getElementById('nextInstruction');
    let instructionLevel = 0;
    const xTo = instructionsContainer.offsetWidth;
    
    nextInstruction.addEventListener(`click`, function () {
    	instructionLevel ++;
    	const instruction = document.querySelectorAll('.instruction');
    	TweenLite.to(instruction, 1, {
    		x: - (instructionLevel * xTo)
    	});
    }

     

×
×
  • Create New...