proyecto26 / phaser-kinetic-scrolling-plugin Goto Github PK
View Code? Open in Web Editor NEWKinetic Scrolling plugin for Canvas using Phaser Framework
Home Page: https://proyecto26.github.io/Phaser-Kinetic-Scrolling-Plugin/
License: MIT License
Kinetic Scrolling plugin for Canvas using Phaser Framework
Home Page: https://proyecto26.github.io/Phaser-Kinetic-Scrolling-Plugin/
License: MIT License
It's a rare case I guess. Chrome 46 on Mac.
Stopping plugin in inputDown event won't clean up plugin state. When plugin is started again, it start with dragging = true and things will move with cursor.
Hi guys!
This beautiful project needs collaborators, Do you want to apply?
Let me know your JS projects to check your code, if you want to be a Phaser developer to help the community with this amazing project! ๐ฏ
Best regards, Nicholls
Hi,
I faced a bug I guess. When I enter a state and activate the kinematic scrolling plugin for the first time, everything is fine. When I leave the state and reenter it, the scrolling is activated which means the camera is scrolling although I haven't clicked yet.
Of course I call this.game.kineticScrolling.stop();
when I shutdown the state.
I know it's probably outside the scope of this project right now, but supporting multidirectional scrolling would be a nice feature to have. Currently scrollwheel support is enabled by setting either verticalWheel
or horizontalWheel
to true
. However, setting both to true
has some pretty unexpected behaviour, especially using a Macbook touchpad.
my code where my game starts looks like this
`///
///
class SimpleGame
{
game:Phaser.Game;
constructor()
{
//setup the game
// load scroll plugin
//
this.game = new Phaser.Game(800, 600, Phaser.AUTO, 'content');
this.game.state.add("MenuScreenState", MenuScreenState , false);
this.game.state.add("RunningState", RunningState , false);
this.game.state.add("ShopState", ShopState , false);
this.game.state.start("RunningState",true,true);
}
}
// when the page has finished loading, create our game
window.onload = () => {
var game = new SimpleGame();
};
`
and it does not allow
this.game.kineticScrolling = this.game.plugins.add(Phaser.Plugin.KineticScrolling);
ive got no idea how to proper load your plugin..
Body is always following sprite in phaser. At low speed of map dragging it is not visible, but at higher speed body get compertely seperate from sprite. Sometimes body collided with game objects and false collision occures. So is it possible to disable body when I drag map?
(I can record video if issue is not clear from my description)
I am wondering if this plugin would work for this use case.
I have a panel I made, say:
// Tall panel
var panelTall = this.game.add.bitmapData(250, 500);
panelTall.ctx.fillStyle = '#5a6772';
panelTall.ctx.strokeStyle = '#31363a';
panelTall.ctx.lineWidth = 5;
panelTall.ctx.fillRect(0, 0, 250, 500);
panelTall.ctx.strokeRect(0, 0, 250, 500);
this.game.cache.addBitmapData('panel', panelTall);
And then I instantiate it in a group:
this.stableGroup = this.game.add.group();
this.stableGroup.position.setTo(25, 250);
this.stableBody = this.stableGroup.addChild(this.game.add.image(0, 0, this.game.cache.getBitmapData('panel')));
Now within this I want to populate it with text objects vertically, and have it scrollable vertically at the borders roughly of the panel. Every comment thread seems to have you posting this library as an example but I can't seem to figure out how it would work like this.
Since Phaser2 is no longer being maintained, the production dependency should be switched from phaser to phaser-ce
The example isn't clear to me. How would I scroll a specific object?
I just ran npm install phaser-kinetic-scrolling-plugin
and version 1.0.2 was installed
Can't download plugin with npm.
Getting error:
Hostname/IP doesn't match certificate's altnames:
"Host: registry.npmjs.org. is not in the cert's
altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net"
don't want to use brew only for one library and would be nice to keep track of versions so getting directly from github is also not the best solution
Thanks
hello,
can i stop slide effect after mouse click?
thank and sry, for my english.
Hey, I am using kinetic scroll in my project, but it breaks when more than one finger is used to scroll.
Hello,
Nice plugin, but I'm encountering some troubles to select an element.
Say I wanna select a rectangle in your example, how can I achieve that ?
Thanks :)
Resolved : I did that by storing the mouse position when it's down, so when it's up I compare the new value with the old one, if it's the same position, I fire up the click event..
I I love the scrolling effect and find that it works really well in mobile. However I am limited in scrolling to whatever the size of the world may be. Is it possible to wrap the scrolling so that when the end of the world is reached scrolling can continue at the beginning of the world?
Hi, could you publish this package to npm please?
I am using npm as a dependency manager and this would help me a lot.
It's really easy since you already have a package.json :) More info here.
Great plugin by the way!
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.