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 ...
随机推荐
- CodeForces ZeptoLab Code Rush 2015
拖了好久的题解,想想还是补一下吧. A. King of Thieves 直接枚举起点和5个点之间的间距,进行判断即可. #include <bits/stdc++.h> using na ...
- HDU 2144 (最长连续公共子列 + 并查集) Evolution
我发现我一直理解错题意了,这里的子序列指的是连续子序列,怪不得我写的LCS一直WA 顺便复习一下并查集 //#define LOCAL #include <iostream> #inclu ...
- 戏(细)说Executor框架线程池任务执行全过程(上)
一.前言 1.5后引入的Executor框架的最大优点是把任务的提交和执行解耦.要执行任务的人只需把Task描述清楚,然后提交即可.这个Task是怎么被执行的,被谁执行的,什么时候执行的,提交的人就不 ...
- HDU 2544 最短路【Bellman_Ford 】
题意:给出n个节点,m条边,问从起点到终点的最短距离 用bellman_ford,注意是无向图 初学bellman_ford= =一点点理解 因为dijkstra是每次用集合里面的点去更新它们所连接的 ...
- VBScript - CUD registry key and value
http://msdn.microsoft.com/en-us/library/aa384906(v=vs.85).aspx HKEY_LOCAL_MACHINE = &H80000002 s ...
- HDU 5316 Magician (线段树,单值修改,微变形)
题意:给一个初始序列A[1,n],第j个数字代表精灵j的power值,有两种操作:(1)查询区间[L,R] (2)修改某个精灵的power值. 但,查询的是区间[L,R]中一个美丽子序列sub[l,r ...
- BPMN这点事-BPMN扩展元素
什么是BPMN扩展元素?我们为什么要从BPMN元素中界定出一个扩展元素的子集?BPMN扩展元素是我们平时使用频率不高的BPMN元素,这些元素更多的面向开发人员而不是业务人员,它们强调流程执行的细节,例 ...
- (二)win7下用Intelij IDEA 远程调试spark standalone 集群
关于这个spark的环境搭建了好久,踩了一堆坑,今天 环境: WIN7笔记本 spark 集群(4个虚拟机搭建的) Intelij IDEA15 scala-2.10.4 java-1.7.0 版本 ...
- SeuRain的归来
不知不觉二十载寒窗苦读要结束了,还没有到回顾过去的时候.马上进入研三了,现在要努力加油了.还记得曾经的那个在凌晨两点奋战的宇么?归来吧!
- ORACLE 常用SQL查询
一.ORACLE的启动和关闭 1 .在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle > sv ...