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 ...
随机推荐
- 随便谈谈alphago与人机大战
3月16日历时8天的人机大战终于落下帷幕,alphago以4:1的比分击败了当年如日中天的李世石.这个结果让我这个围棋爱好者+计算机爱好者百感交集…… ——一个时代落幕了,一个新的时代开启了. 这次人 ...
- CSS之剪切横幅
简述 clip-path属性指定一个应用到元素上的剪切路径.应用在SVG中<clipPath>元素上的属性值可以完全运用在clip-path属性上.还可以使用CSS Shapes模块中的基 ...
- 基于EasyUi的快速开发框架
先看图,下边这个简单的增.删.改.查,如果自己写代码实现,这两个页需要多少行代码? 如果再有类似的增.删.改.查,又需要多少行代码? 我最近搞的这个快速开发框架中,代码行数不超过100. 两页的代码如 ...
- 2016年4月TIOBE编程语言排行榜 Visual Basic正渐行渐远
COBOL, BASIC 和 FORTRAN 很长一段时间作为主力开发语言被使用.有很多软件使用这些语言来编写,并且发展的不亦乐乎.然而经过多年的发展,COBOL和FORTRAN逐渐被抛弃, 而得益于 ...
- bdyyservice.exe 系统错误
现象:开机出现 bdyyservice.exe 系统错误,说: 计算机中丢失log_report.dll 原因:安装百度影音,卸载后出现的问题 解决方法: 所有程序 -> 附件 -> 命令 ...
- 无线端通用的reset样式
@charset "utf-8"; html, body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, o ...
- Java多线程-工具篇-BlockingQueue
前言: 在新增的Concurrent包中,BlockingQueue很好的解决了多线程中,如何高效安全“传输”数据的问题.通过这些高效并且线程安全的队列 类,为我们快速搭建高质量的多线程程序带来极大的 ...
- 【转】Linux设备驱动之I/O端口与I/O内存
原文网址:http://www.cnblogs.com/geneil/archive/2011/12/08/2281367.html 一.统一编址与独立编址 该部分来自于:http://blog.ch ...
- ios ViewController 页面跳转
从一个Controller跳转到另一个Controller时,一般有以下2种: 1.利用UINavigationController,调用pushViewController,进行跳转:这种采用压栈和 ...
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.7. 配置资源与参数
2.7.配置资源与参数 2.7.1. 修改主机名称 [root@linuxrac1 ~]# cd /etc/sysconfig [root@linuxrac1 sysconfig]# vi netwo ...