Experimenting with game dev, by making solitaire in phaser
nachtfunke / phaser-solitaire Goto Github PK
View Code? Open in Web Editor NEWExperimenting with game dev, by making solitaire in phaser
License: The Unlicense
Experimenting with game dev, by making solitaire in phaser
License: The Unlicense
When a card is being dragged, there are some thresholds that are supposed to make the interaction nicer and more natural. There is a dragThreshold
and a pointerThreshold
. The dragThreshold
decides how far the pointer must travel away from its original position, before actually handling the frag. When the drag is being handled, there is a calculation that determines, whether the pointer is within the middle of the card. And if not, it will play the snapToPointer
animation on the card, to really snap it right there.
It is these thresholds I'd like to visualise properly, to better be able to finetune them.
At the moment, dragging is handled by GameScene
, but I think it can all be moved into the card itself.
When a card is being dragged, I would like to see a little element that represents its original position, and see a line to that original position, as it is being dragged around.
The background for that, is that sometimes users will be draging cards onto a stack or another card that they cannot really place a card on. So if a card needs to snap back, there is a little indicator to show where it will snap back to.
And also because I think it may look fun.
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.