

balder是第一个基于Silverlight开发的3D引擎.使用了webGL进行加速。作者的Blog>>>
- Balder Demo Sample Browser
- Balder at github
- Get Balder Silverlight 3D Engine at Codeplex
- Einar Ingebrigtsen’s Post on Balder Release
一段示例代码:
using Balder.Core.Execution;
using Balder.Core.Objects.Geometries;
using System;
using Balder.Core.Lighting;
using Balder.Core;
using Colors=System.Windows.Media.Colors;
namespace Balder.Silverlight4.TestApp
{
public class MyGame : Game
{
public override void OnInitialize()
{
Camera.Position.X = 0;
Camera.Position.Y = 0;
Camera.Position.Z = -80;
var light = new OmniLight();
light.Diffuse = Color.FromSystemColor(Colors.Green);
light.Ambient = Color.FromSystemColor(Colors.Green);
light.Specular = Color.FromSystemColor(Colors.White);
light.Position.X = 0;
light.Position.Y = 0;
light.Position.Z = -130;
Scene.AddNode(light);
base.OnInitialize();
}
public override void OnLoadContent()
{
var teapot = ContentManager.Load("teapot.ase");
Scene.AddNode(teapot);
base.OnLoadContent();
}
private double _sin;
public override void OnUpdate()
{
Camera.Position.X = (float)(Math.Sin(_sin)*80);
Camera.Position.Y = 0;
Camera.Position.Z = (float)(Math.Cos(_sin) * 80);
_sin += 0.05;
base.OnUpdate();
}
}
}
支持时下热门的多点触摸和手势特性,内置一个全局错误句柄,允许开发者开发单一的句柄来处理运行时错误,此外它们开始全面支持本地麦克风,无需通过服务器来完成。
对于多点触摸的支持相关的事件
flash.ui.Multitouch
[static] inputMode:String
[static] maxTouchPoints:int
[static] supportedGestures:Vector
[static] supportsGestureEvents:Boolean
[static] supportsTouchEvents:Boolean
Touch Input mode
flash.events.MultitouchInputMode
Multitouch.inputMode
MultitouchInputMode.TOUCH_POINT
MultitouchInputMode.NONE
MultitouchInputMode.GESTURE
Mouse
MouseEvent.CLICK
MouseEvent.DOUBLE_CLICK
MouseEvent.MOUSE_DOWN
MouseEvent.MOUSE_UP
MouseEvent.MOUSE_MOVE
MouseEvent.MOUSE_OUT
MouseEvent.MOUSE_OVER
MouseEvent.ROLL_OUT
MouseEvent.ROLL_OVER
Touch
TouchEvent.TOUCH_BEGIN
TouchEvent.TOUCH_MOVE
TouchEvent.TOUCH_END
TouchEvent.TOUCH_TAP
TouchEvent.TOUCH_OUT
TouchEvent.TOUCH_OVER
TouchEvent.TOUCH_ROLL_OUT
TouchEvent.TOUCH_ROLL_OVER
TouchEvent.TOUCH_TAP
Touch management
Many multi-touch developers like to use an Object or Array of points to keep track of touch inputs (aka blobs) as well as an ID, and X/Y coordinatees for each point. It looks like Flash Player 10.1 will help you conform to these conventions, ActionScript-style.
flash.utils.Dictionary /* Used to track Arrays of Points */
flash.geom.Point /* One contact point */
TouchEvent.touchPointID /* Unique ID for each touch contact point */
TouchEvent.stageX
TouchEvent.stageY
TouchEvent.isPrimaryTouchPoint
Gestures
flash.events.GestureEvent;
flash.events.GesturePhase;
flash.events.GesturePhaseEvent;
flash.events.TransformGestureEvent;
/* GestureEvent */
GestureEvent.GESTURE_TWO_FINGER_TAP
GestureEvent.phase: String
GestureEvent.localX:Number
GestureEvent.localY:Number
GestureEvent.stageX:Number
GestureEvent.stageY:Number
/* GesturePhase */
GesturePhase.BEGIN
GesturePhase.END
GesturePhase.UPDATE
/* GesturePhaseEvent */
GesturePhaseEvent.GESTURE_PAN
GesturePhaseEvent.GESTURE_PRESS_AND_TAP
GesturePhaseEvent.GESTURE_ROTATE
GesturePhaseEvent.GESTURE_ZOOM //Is the same thing as 'pinch'
GesturePhaseEvent.offsetX:Number
GesturePhaseEvent.offsetY:Number
GesturePhaseEvent.rotation:Number
GesturePhaseEvent.scaleX:Number
GesturePhaseEvent.scaleY:Number
Orientation recognition
flash.display.StageOrientation;
/* e.g. StageOrientation.DEFAULT */
flash.display.StageDisplayState;
/* e.g. stage.displayState = FULL_SCREEN_INTERACTIVE; */
在内存方面几乎优化50%

全局设置管理器

很久前推荐过一个在线版编译工具:AS3在线编译IDE:Flash MiniBuilder
近期有一款基于AIR的桌面版Flash MiniBuilder放出.可以导入flashbuilder项目.具有高亮及自动提示等功能





Recent Comments