This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "Sparrow.h" | |
/// An SXGauge displays a texture, trimmed to its left side, depending on a ratio. | |
/// This can be used to display a progress bar or a time gauge. | |
@interface SXGauge : SPSprite | |
/// Indicates how much of the texture is displayed. Range: 0.0f - 1.0f | |
@property (nonatomic, assign) float ratio; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package starling.extensions | |
{ | |
import starling.display.Image; | |
import starling.display.Sprite; | |
import starling.textures.Texture; | |
import starling.utils.MathUtil; | |
public class Gauge extends Sprite | |
{ | |
private var _image:Image; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
{ | |
import com.adobe.utils.AGALMiniAssembler; | |
import flash.display3D.*; | |
import flash.geom.*; | |
import starling.core.RenderSupport; | |
import starling.core.Starling; | |
import starling.display.DisplayObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package starling.extensions | |
{ | |
import flash.display3D.Context3D; | |
import flash.geom.Point; | |
import flash.geom.Rectangle; | |
import starling.core.RenderSupport; | |
import starling.core.Starling; | |
import starling.display.DisplayObject; | |
import starling.display.Sprite; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tab:String = " "; | |
for each (var tinted:Boolean in [true, false]) | |
{ | |
trace(tinted ? "if (tinted)" : "else"); | |
trace("{"); | |
for each (var mipMap:Boolean in [true, false]) | |
{ | |
trace(tab, mipMap ? "if (mipMap)" : "else"); | |
trace(tab, "{"); | |
for each (var repeat:Boolean in [true, false]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SPDisplayObject.h" | |
@interface Polygon : SPDisplayObject | |
- (id)initWithRadius:(float)radius numEdges:(int)numEdges color:(uint)color; | |
- (id)initWithRadius:(float)radius numEdges:(int)numEdges; | |
@property (nonatomic, assign) int numEdges; | |
@property (nonatomic, assign) float radius; | |
@property (nonatomic, assign) uint color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
air_sdk="/path/to/air_sdk" | |
adb="$air_sdk/lib/android/bin/adb" | |
adt="$air_sdk/bin/adt" | |
if [ ${1: -4} == ".ipa" ] | |
then | |
"$adt" -installApp -platform ios -package $1 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SPDisplayObject.h" | |
@interface TexturedPolygon : SPDisplayObject | |
- (id)initWithRadius:(float)radius numEdges:(int)numEdges texture:(SPTexture *)texture; | |
@property (nonatomic, assign) int numEdges; | |
@property (nonatomic, assign) float radius; | |
@property (nonatomic, strong) SPTexture *texture; | |
@property (nonatomic, assign) uint color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function addDistortionTo(target:DisplayObject):void | |
{ | |
var offset:Number = 0; | |
var scale:Number = Starling.contentScaleFactor; | |
var width:int = target.width; | |
var height:int = target.height; | |
var perlinData:BitmapData = new BitmapData(width * scale, height * scale, false); | |
perlinData.perlinNoise(200*scale, 20*scale, 2, 5, true, true, 0, true); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gamua.flox.utils | |
{ | |
import flash.utils.describeType; | |
import flash.utils.getQualifiedClassName; | |
/** Creates a deep copy of the object. | |
* Beware: all complex data types will become mere 'Object' instances. Supported are only | |
* primitive data types, arrays and objects. Any properties marked with "NonSerialized" | |
* meta data will be ignored by this method. | |
* |
OlderNewer