Working with Other Node Types
【Working with Other Node Types】

【Shape Nodes Draw Path-Based Shapes】
The SKShapeNode class draws a standard Core Graphics path.

You can see from the code that the shape has three essential elements:
- The interior of the shape is filled. The fillColor property specifies the color used to fill the interior.
- The outline of the shape is rendered as a line. The strokeColor and lineWidth properties define how the line is stroked.
- A glow extends from the outline. The glowWidth and strokeColor properties define the glow.
【A Video Node Plays a Movie】
The SKVideoNode class uses the AV Foundation framework to display movie content.

【Emitter Nodes Create Particle Effects】
When an SKEmitterNode object is placed in a scene, it automatically creates and renders new particles. You use emitter nodes to automatically create special effects, including rain, explosions, or fire.
A particle is similar to an SKSpriteNode object; it renders a textured or untextured image that is sized, colorized, and blended into the scene. However, particles differ from sprites in two important ways:
- A particle’s texture is always stretched uniformly.
- Particles are not represented by objects in Sprite Kit. This means you cannot perform node-related tasks on particles, nor can you associate physics bodies with particles to make them interact with other content.
Particles are purely visual objects, and their behavior is entirely defined by the emitter node that created them. The emitter node contains many properties to control the behavior of the particles it spawns, including:
- The birth rate and lifetime the particle. You can also specify the maximum number of particles that are spawned before the emitter turns itself off.
- The starting values of the particle, including its position, orientation, color, and size. These starting values are typically randomized.
- The changes to apply to the particle over its lifetime. Typically, these are specified as a rate-of-change over time. For example, you might specify that a particle rotates at a particular rate, in radians per second. The emitter automatically updates the particle data each frame. In most cases, you can also create more sophisticated behaviors using keyframe sequences. For example, you might specify a keyframe sequence for a particle so that it starts out small, scales up to a larger size, then shrinks before dying.
【Use the Particle Emitter Editor to Experiment with Emitters】
内置Particle模板,如下,通过File->Resource->SpriteKit Particle 来添加内置模板到应用程序。

Inspector中可以修改Particle效果,立即生效。

Particle Textrue用于修改粒子使用的texture,如下面两图使用了不同的ParticleTexture,


Setting the Number of Particles Created

Setting a Particle’s Life Expectancy

Working with Other Node Types的更多相关文章
- Working with Other Node Types II
[Working with Other Node Types II] An SKCropNode object does not directly render content, like a spr ...
- tbb flow graph node types
- XML DOM 节点类型(Node Types)
节点类型 下面的表格列出了不同的 W3C 节点类型,以及它们可拥有的子元素: 节点类型 描述 子元素 Document 表示整个文档(DOM 树的根节点) Element (max. one) Pro ...
- 创建Node.js TypeScript后端项目
1.安装Node.js扩展,支持TypeScript语法 npm install -g typescript npm install -g typings 2.创建项目目录project_fold ...
- union 类型(即sum types)在golang语言中的实现
http://www.jerf.org/iri/post/2917 Sum Types in Go posted Jun 02, 2013 in Programming, Golang, Haskel ...
- [转]XML中元素(Element)与节点(Node)的区别
前言: element是特殊的node 一段纯文本即text-node也是node 但不是element w3c的原话是 A node can be an element node, an attri ...
- 前端使用express+node实现接口模拟及websocket通讯
简述如何使用node+express实现接口连接及入门websocket通讯.使用技术栈:node + express + typescript + websocket. 1.接口实现 这里描述前端如 ...
- MongoDB 搭建Node.js开发环境
理解Mongoose Elegant MongoDB object modeling for Node.js 安装Mongoose $ cnpm install --save mongoose ...
- 搭建Node.js Redis开发环境
创建项目 初始化为node项目 $npm init 安装redis 安装@types/node, @types/redis, typescript 初始化TypeScript 配置ts ...
随机推荐
- Spring 运用 pointcut 和 advisor 对特定的方法进行切面编程
上一个例子演示了对特定的bean中的所有的方法进行面向切面编程,包括了 before , after , after throwing, around 几种形式: 如果想对一个bean中的特定方法进行 ...
- [ionic开源项目教程] - 第6讲 过滤器filter的使用
过滤器filter的使用 1.回顾 再熟悉一下tab1.html的代码: <div class="list"> <a ng-repeat="item i ...
- UVa 1595 (水题) Symmetry
颓废的一个下午,一直在切水题,(ˉ▽ ̄-) 首先如果这些点是对称的话,那么它们的对称轴就是x = m,m是横坐标的平均值. 把这些点放到一个集合里,然后扫描每个点,计算出它关于x = m的对称点,看这 ...
- UVa 11107 (后缀数组 二分) Life Forms
利用height值对后缀进行分组的方法很常用,好吧,那就先记下了. 题意: 给出n个字符串,求一个长度最大的字符串使得它在超过一半的字符串中出现. 多解的话,按字典序输出全部解. 分析: 在所有输入的 ...
- Codeforces Round #276 (Div. 2)
A. Factory 题意:给出a,m,第一天的总量为a,需要生产为a%m,第二天的总量为a+a%m,需要生产(a+a%m)%m 计算到哪一天a%m==0为止 自己做的时候,把i开到1000来循环就过 ...
- [转载]mysql的binlog安全删除
[转载]mysql的binlog安全删除 理论上,应该在配置文件/etc/my.cnf中加上binlog过期时间的配置项,expire_logs_days = 10 但是如果没有加这一项,随着产生越 ...
- Cython: 快速入门
1. Cython是什么? 它是一个用来快速生成Python扩展模块(extention module)的工具,语法是Python和c的混血.在Cython,C里的类型,如int,float,long ...
- 【英语】Bingo口语笔记(13) - Call系列
call off - call it off 取消它 call it a day / call it a night 今天到此结束吧/今晚到此结束吧
- linux上改变mysql数据文件的位置
用软连接改变了/var/lib/mysql的位置,并设置好mysql.mysql的权限,但是发现还是不能启动. 发现/var/log/mysqld.log 150308 16:16:02 [Warni ...
- JVM——垃圾收集算法
1.标记-清除算法 最基础的收集算法,如其名,算法为“标记”和“清除”两个阶段:首先标记出所有需要回收的对象,在标记完成后统一回收所有被标记的对象. 两个不足: 1)效率问题,标记和清除两个过程的效率 ...