Giter Site home page Giter Site logo

Comments (13)

janpaepke avatar janpaepke commented on June 22, 2024

Hi Damon,

are you talking about pins or regular animations?
With pins it's possible, with animation not yet.

regards,
Jan

from superscrollorama.

damongolding avatar damongolding commented on June 22, 2024

Hi Jan,

Forgot to mention that, yes it's for a animation. I saw it was possible for pins. So by "not yet" I assume that you are going to include this in SuperScrollorama?

Damon

from superscrollorama.

janpaepke avatar janpaepke commented on June 22, 2024

Hi Damon,

yes, to my mind it is useful for the same reasons I included the updatePin method.
To be honest the reason why I didn't build an updateTween method yet is because I didn't need it ;-).
We'll see, when John or I get around to implementing this...

regards,
Jan

from superscrollorama.

damongolding avatar damongolding commented on June 22, 2024

With responsive sites becoming the norm I think it would be a good addition <= this being the reason I need it :p

Though I see it's not 'essential' as most people don't resize their browser, apart from inquisitive developers..

But all the same, I dont want my site to break if they choose to do so.

Thanx for replying,
Damon

from superscrollorama.

janpaepke avatar janpaepke commented on June 22, 2024

Hi Damon,

If It's solely a vertical positioning issue you should try to work with percentages as left position values.
I'll let you know once I got around to implement the updateTween method.

regards,
Jan

from superscrollorama.

jlevinsohn31 avatar jlevinsohn31 commented on June 22, 2024

+1 for this functionality. Running into the same thing and I'm already using percentages for top and left position values. Any update?

from superscrollorama.

janpaepke avatar janpaepke commented on June 22, 2024

Hi jlevinsohn,

actually I am sorry that I have made no progress in this regard. I just came back from my honeymoon and am quite busy now. I might get around to do it his month, but no promises. :-/

regards,
Jan

from superscrollorama.

jlevinsohn31 avatar jlevinsohn31 commented on June 22, 2024

Thanks for writing back, Jan. I really appreciate the update.

from superscrollorama.

janpaepke avatar janpaepke commented on June 22, 2024

Good news, everyone! :)

A solution might be near! Check it out: #94

regards,
Jan

from superscrollorama.

inamine avatar inamine commented on June 22, 2024

Hi Jan,

First of all, thanks for your amazing plugin. :)

You said above that's possible to Update scrollOffset and scrollDuration on the fly for pinned elements, could you please show some example?

Thanks!

from superscrollorama.

janpaepke avatar janpaepke commented on June 22, 2024

Hi inamine,

Do you mean for Superscrollorama or for ScrollMagic?
For Superscrollorama you can find an example on the Demo Page.
(see the updatePin method).
For ScrollMagic I didn't get around yet to make any examples or demos, because it is still in development.
But it's a lot more intuitive than Superscrollorama in regard to runtime updates.
Basically you initiate like this:

var controller = new ScrollMagic();
var scene = controller.addScene("#trigger", {duration: 400, offset: -200})
                      .pin("#pinelement");

and then at any point in time you can do this:

scene.duration(600);

or this:

scene.offset(-100);

hope this helps!
best regards,
J

from superscrollorama.

inamine avatar inamine commented on June 22, 2024

Thanks a lot!

Regards

from superscrollorama.

jcampbell05 avatar jcampbell05 commented on June 22, 2024

If you tweaked this function to accept an object and then to push that object to the array of tween like it sort of does under the hood. Then in theory if you kept a reference to that object around, you could change the offset on a resize and the tween would auto update.

I would imagine you would also need to invoke some sort of auto update function as well, nasty but it would work

// PUBLIC FUNCTIONS
superscrollorama.addTween = function(target, tween, dur, offset, reverse) {

    tween.pause();

    animObjects.push({
        target:target,
        tween: tween,
        offset: offset || 0,
        dur: dur || 0,
        reverse: (typeof reverse !== "undefined") ? reverse : superscrollorama.settings.reverse, // determine if reverse animation has been disabled
        state:'BEFORE'
    });

    return superscrollorama;
};

from superscrollorama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.