Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
Combing two different ScrollMagic scenes

I'm trying to use different ScrollMagic scenes into one file.

The first one controls a split screen scrolling effect and the second one animates iPhone images. The Split Screen is throughout the whole page and then there is one scene where I need to use the iPhone images.

I'm not sure how to combine the two so they work together.

Any help would be appreciated.

Cheers!

 const controller = new ScrollMagic.Controller();

new ScrollMagic.Scene({
  duration: '100%',
  triggerElement: '.about',
  triggerHook: 0
})

.setPin('.about-title')
// .addIndicators()
.addTo(controller);

new ScrollMagic.Scene({
  duration: '200%',
  triggerElement: '.albums-title',
  triggerHook: 0
})

.setPin('.albums-title')
.addTo(controller)

splitScroll();

and

const controller = new ScrollMagic.Controller();
const tlFirstScroll = new TimelineMax();
const tlSecondScroll = new TimelineMax();

//First scroll scene
tlFirstScroll
.set('.iphone-image-wrapper', {scale: 4, transformOrigin: 'center top'})
.to('.iphone-image-wrapper', 3, {
    scale: 2.2,
    y: '-50%'
})
.to('.iphone-image-wrapper', 3, {
    scale: 1,
    y: '0%'
})

//Second scroll scene
tlSecondScroll
.to('.iphone1', 3, {x: '-50%'})
.to('.iphone2', 3, {x: '50%'}, '-=3')
.from('.iphone1-text', 0.3, {autoAlpha: 0}, '-=3')
.from('.iphone2-text', 0.3, {autoAlpha: 0}, '-=3')
.to('.iphone1-text', 3, {x: '-30%'}, '-=3')
.to('.iphone2-text', 3, {x: '30%'}, '-=3')

.set('.iphone-stick', {display: 'block'})
.to('.iphone1-img-behind', 3, {x: '-50%'})
.to('.iphone2-img-behind', 3, {x: '50%'}, '-=3')
.to('.iphone1-img', 0.3, {autoAlpha: 0}, '-=3')
.to('.iphone2-img', 0.3, {autoAlpha: 0}, '-=3')
.to('.iphone1-text', 1, {autoAlpha: 0}, '-=3')
.to('.iphone2-text', 1, {autoAlpha: 0}, '-=3')



//Scene 1
const sceneOne = new ScrollMagic.Scene({
    triggerElement: '.trigger1',
    triggerHook: 0,
    duration: '100%'
})
.setTween(tlFirstScroll)
.addTo(controller)


const sceneTwo = new ScrollMagic.Scene({
    triggerElement: '.trigger2',
    triggerHook: 0,
    duration: '100%'
})
.setTween(tlSecondScroll)
.setPin('.trigger2')
.addTo(controller)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!