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.

最新文章

  1. POJ 题目3280 Cheapest Palindrome(区间DP)
  2. delphi SPCOMM串口控件
  3. Java核心技术点之注解
  4. Android BaseAdapter的使用
  5. [Effective JavaScript 笔记]第61条:不要阻塞I/O事件队列
  6. json-encode()怎么进行解码呢?
  7. null和""的区别
  8. git指令
  9. zigbee智能家居基础扫盲
  10. InstallShield 工程类型installscript,如何覆盖安装?
  11. mac下和windows下清空DNS缓存
  12. SSMS2008插件开发(2)--Microsoft Visual Studio 2008插件开发介绍
  13. php基础知识掌握——四种界定符
  14. Json 工具介绍 fastjson gson jackson
  15. 微信小程序(有始有终,全部代码)开发--- 新增模块: 图片选取以及拍照功能
  16. [转载]C header files matching your running 
  17. Shell命令-线上查询及帮助之man、help
  18. Confluence 6 配置文件和key
  19. 产品激活 比如Windows激活 , office激活 等激活的原理是什么? KMS等激活工具安全吗?
  20. Centos7修改系统时区timezone

热门文章

  1. Android中从SD卡中获取歌词并与歌曲同步
  2. Thrift之c++实例
  3. OneDrive网页版打不开的解决办法
  4. ADO.Net入门(2)
  5. 前端之JavaScript再次补充(干死!!)
  6. verilog case 语句合并问题
  7. HTML5编写规范
  8. python学习之准备
  9. 关于this指向问题的总结【转自秘密花园】
  10. ActionContext介绍(在Struts2中)