Comments (3)
目前找到了一个解决办法官方中e.stageY似乎是e.touches[0].clientY坐标乘以2倍,但有做了自己的一套计算方法,最简单的办法就是直接使用e.touches[0].clientY坐标乘以2倍来计算,可以解决ios诗stageY坐标偏移问题
from hilo.
stageX和stageY是在stage坐标系下的,距顶部你应该拿stage.width和stage.height来做对比。
ios和android不同应该是你设置了stage的scale不同吧
from hilo.
是只在在stage上监听 的POINTER_MOVE事件,scale安卓和苹果是一致的,理论上只要我的手指直接在stage上滑动,那坐标stageY和stageX坐标是和我的手指一致的,但stageY坐标没有跟随我的手指,而且距离屏幕越远的位置向上移动,到顶部的误差越大```
this.stage.on(Hilo.event.POINTER_MOVE, function (e) {
e.stopImmediatePropagation && e.stopImmediatePropagation();
console.log('hilo',e.stageY)
}.bind(this))
这个事件中是直接获取,手指已经滑倒屏幕之外,但stageY的值却没有到0
from hilo.
Related Issues (20)
- 边框透明度 这个支持吗
- 想做个塔防,怎么做判断攻击范围?
- 【BUG】Hilo.Text创建的文本在IOS/安卓下展示不一致 HOT 1
- 中心点pivotXY导致文字、绘图偏移
- 竟然没有控制View depth(z-index)的方法。 HOT 1
- 如何让一个bitmap对象,垂直翻转,比如翻翻卡游戏
- 【BUG】Hilo.Tween.to在设置reverse为true的情况下onComplete回调无效 HOT 2
- 如何适配微信小游戏?
- 加载队列error "isTrusted": true
- Camera3d类的sortZ函数中的compareFn返回值问题
- 看来hilo 是阿里私有引擎 连微信小游戏都没适配 HOT 1
- Assertion failed: Moment of Inertia must be positive and non-zero. at assert (physics.js?e0ea:51)
- 求助:怎么换Sprite中Frame,setFrame没用
- canvas模式下Container的属性clipChildren失效
- 有支持dragonbones的mesh动画的计划吗?
- 不打算支持自定义shader吗?
- 停止维护了吗
- 凉了吗?我还想用这个开发个棋牌游戏,现在遇到个View的depth不生效的问题。
- 现在还有人在维护吗,使用standalone,在stage下面使用addChild的话会报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hilo.