SKNode的渲染顺序
【SKNode的渲染顺序】
SKNode的zPosition属性,指定相对于其父视图的z轴坐标。
The default value is 0.0. The positive z axis is projected toward the viewer so that nodes with larger z values are closer to the viewer.
zPosition越大,则越接近用户,即zPosition值大者会把小的给覆盖掉。
When a node tree is rendered, the height of each node (in absolute coordinates) is calculated and then all nodes in the tree are rendered from smallest z value to largest z value. If multiple nodes share the same z position, those nodes are sorted so that parent nodes are drawn before their children, and siblings are rendered in the order that they appear in their parent’s children array. Hit-testing is processed in the opposite order.
当一棵树被渲染。1)会计算每个结点zPosition的绝对高度。2)按zPosition绝对值从小到大排序,然后从小到大依次渲染。3)如果2个node的zPosition相等,则优先绘制父类,再绘制子类;或按结果在children array中的次序绘制。
The SKView class’s ignoresSiblingOrder property controls whether node sorting is enabled for nodes at the same z position.
最新文章
- POJ 题目3280 Cheapest Palindrome(区间DP)
- delphi SPCOMM串口控件
- Java核心技术点之注解
- Android BaseAdapter的使用
- [Effective JavaScript 笔记]第61条:不要阻塞I/O事件队列
- json-encode()怎么进行解码呢?
- null和";";的区别
- git指令
- zigbee智能家居基础扫盲
- InstallShield 工程类型installscript,如何覆盖安装?
- mac下和windows下清空DNS缓存
- SSMS2008插件开发(2)--Microsoft Visual Studio 2008插件开发介绍
- php基础知识掌握——四种界定符
- Json 工具介绍 fastjson gson jackson
- 微信小程序(有始有终,全部代码)开发--- 新增模块: 图片选取以及拍照功能
- [转载]C header files matching your running
- Shell命令-线上查询及帮助之man、help
- Confluence 6 配置文件和key
- 产品激活 比如Windows激活 , office激活 等激活的原理是什么? KMS等激活工具安全吗?
- Centos7修改系统时区timezone