naver / egjs-flicking-plugins

Plugins for @egjs/flicking
https://naver.github.io/egjs-flicking/Plugins
MIT License
60 stars 11 forks source link

How to create Custom Plugins #57

Open moda20 opened 2 weeks ago

moda20 commented 2 weeks ago

Description

How to create custom plugins, like a scaling only plugin rather than perspective + scaling

malangfox commented 2 weeks ago

Hello @moda20.

You can check the existing code and create a new plugin that extends the Plugin interface such as class MyPlugin implements Plugin { ... } It will be able to use the new plugin as if you are using an existing one.

If you have any trouble with this implementation, please feel free to leave a comment.

moda20 commented 2 weeks ago

@malangfox I am using JS for this, and I couldn't get the Plugin class to extend from. i am also using vue3Js' version of the library

malangfox commented 4 days ago

@moda20

Perhaps you're looking for how to create a new plugin in a vanilla JavaScript environment? Or maybe you're looking for how to create a new plugin in a Vue3 environment? I would like to know this for sure.