summaryrefslogtreecommitdiff
path: root/webcam/com
diff options
context:
space:
mode:
authortim b <timb@camcompu.home>2010-05-25 01:00:30 -0700
committertim b <timb@camcompu.home>2010-05-25 01:00:30 -0700
commitd479c54031401f8e7388c423a33c6d007e1ead1f (patch)
tree28d8b212dacc8d06fb1ebb6bbfe80e9c2658a3f5 /webcam/com
parent64be2d5bfde815751bc152d0b49798865adbaf28 (diff)
make webcam bigger, change output filename
Diffstat (limited to 'webcam/com')
-rw-r--r--webcam/com/neave/media/NeaveCamera.as4
-rw-r--r--webcam/com/neave/webcam/effects/EffectType.as2
-rw-r--r--webcam/com/neave/webcam/effects/EffectsManager.as2
3 files changed, 4 insertions, 4 deletions
diff --git a/webcam/com/neave/media/NeaveCamera.as b/webcam/com/neave/media/NeaveCamera.as
index 2b68201..5104cd7 100644
--- a/webcam/com/neave/media/NeaveCamera.as
+++ b/webcam/com/neave/media/NeaveCamera.as
@@ -20,12 +20,12 @@ package com.neave.media
/**
* The requested width of the camera object
*/
- static public var CAMERA_WIDTH:int = 320;
+ static public var CAMERA_WIDTH:int = 480;
/**
* The requested height of the camera object
*/
- static public var CAMERA_HEIGHT:int = 240;
+ static public var CAMERA_HEIGHT:int = 360;
static private var cam:Camera;
diff --git a/webcam/com/neave/webcam/effects/EffectType.as b/webcam/com/neave/webcam/effects/EffectType.as
index 3c9967d..19e1f22 100644
--- a/webcam/com/neave/webcam/effects/EffectType.as
+++ b/webcam/com/neave/webcam/effects/EffectType.as
@@ -1 +1 @@
-/** * Neave Webcam // Effects Type * * Copyright (C) 2008 Paul Neave * http://www.neave.com/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation at http://www.gnu.org/licenses/gpl.html */ package com.neave.webcam.effects { final public class EffectType { /*static public const NORMAL :int = 0; static public const RAINBOW :int = 1; //static public const MIRROR_RIGHT :int = 2; //static public const MIRROR_TOP :int = 3; //static public const MIRROR_BOTTOM :int = 2; static public const MIRROR_INVERSE :int = 2; //static public const MIRROR_QUAD :int = 6; static public const UPSIDE_DOWN :int = 3; //static public const DIVIDE :int = 8; //static public const FILMSTRIP :int = 9; static public const FRAGMENT :int = 4; static public const SEPIA :int = 5; //static public const TRAIL :int = 12; //static public const BULGE :int = 13; //static public const FISHEYE :int = 14; //static public const FISHBOWL :int = 15; //static public const DENT :int = 16; ///static public const SQUEEZE :int = 17; static public const WATER :int = 6; static public const FIRE :int = 7; static public const SNOW :int = 8; //static public const STEAM :int = 21; static public const SWARM :int = 9; //static public const PIXELATE :int = 23; //static public const RGB :int = 24; //static public const HALFTONE :int = 25; static public const MONOCHROME :int = 10; static public const GHOST :int = 11; static public const MIRROR_LEFT :int = 12; //static public const ASCII :int = 14; //static public const X_RAY :int = 30; //static public const WARHOL :int = 31; static public const GLOW :int = 13; static public const SLIT_SCAN :int = 14;*/ static public const NORMAL :int = 0; static public const GLOW :int = 1; static public const WARHOL :int = 2; static public const HALFTONE :int = 3; static public const SEPIA :int = 4; static public const MONOCHROME :int = 5; static public const X_RAY :int = 6; static public const DIVIDE :int = 7; static public const SLIT_SCAN :int = 8; static public const MIRROR_INVERSE :int = 9; static public const MIRROR_TOP :int = 10; static public const UPSIDE_DOWN :int = 11; static public const MIRROR_LEFT :int = 12; static public const BULGE :int = 13; static public const SQUEEZE :int = 14; static public const FISHEYE :int = 15; static public const GHOST :int = 16; static public const TRAIL :int = 17; static public const WATER :int = 18; static public const SNOW :int = 19; static public const FIRE :int = 20; static public const SWARM :int = 21; static public const TOTAL_EFFECTS :int = 21; public function EffectType() { } } } \ No newline at end of file
+/** * Neave Webcam // Effects Type * * Copyright (C) 2008 Paul Neave * http://www.neave.com/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation at http://www.gnu.org/licenses/gpl.html */ package com.neave.webcam.effects { final public class EffectType { static public const NORMAL :int = 0; static public const RAINBOW :int = 1; static public const MIRROR_RIGHT :int = 2; static public const MIRROR_TOP :int = 3; static public const MIRROR_BOTTOM :int = 4; static public const MIRROR_INVERSE :int = 5; static public const MIRROR_QUAD :int = 6; static public const UPSIDE_DOWN :int = 7; static public const DIVIDE :int = 8; static public const FILMSTRIP :int = 9; static public const FRAGMENT :int = 10; static public const SEPIA :int = 11; static public const TRAIL :int = 12; static public const BULGE :int = 13; static public const FISHEYE :int = 14; static public const FISHBOWL :int = 15; static public const DENT :int = 16; static public const SQUEEZE :int = 17; static public const WATER :int = 18; static public const FIRE :int = 19; static public const SNOW :int = 20; static public const STEAM :int = 21; static public const SWARM :int = 22; static public const PIXELATE :int = 23; static public const RGB :int = 24; static public const HALFTONE :int = 25; static public const MONOCHROME :int = 26; static public const GHOST :int = 27; static public const MIRROR_LEFT :int = 28; static public const ASCII :int = 29; static public const X_RAY :int = 30; static public const WARHOL :int = 31; static public const GLOW :int = 32; static public const SLIT_SCAN :int = 33; static public const TOTAL_EFFECTS :int = 34; public function EffectType() { } } } \ No newline at end of file
diff --git a/webcam/com/neave/webcam/effects/EffectsManager.as b/webcam/com/neave/webcam/effects/EffectsManager.as
index 0c898c8..0c03cc7 100644
--- a/webcam/com/neave/webcam/effects/EffectsManager.as
+++ b/webcam/com/neave/webcam/effects/EffectsManager.as
@@ -1 +1 @@
-/** * Neave Webcam // Effects Manager * * Copyright (C) 2008 Paul Neave * http://www.neave.com/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation at http://www.gnu.org/licenses/gpl.html */ package com.neave.webcam.effects { import flash.display.*; import flash.events.*; import com.neave.webcam.effects.color.*; import com.neave.webcam.effects.delay.*; import com.neave.webcam.effects.displace.*; import com.neave.webcam.effects.mirror.*; import com.neave.webcam.effects.motion.*; import com.neave.webcam.effects.pixel.*; public class EffectsManager extends EventDispatcher { private var source:IBitmapDrawable; private var targetBitmap:BitmapData; private var effect:AbstractEffect; private var chosenEffect:int; /** * Manages all of the webcam effects * * @param source The source object to use for the effect * @param targetBitmap The target bitmap data to draw the resulting effect into */ public function EffectsManager(source:IBitmapDrawable, targetBitmap:BitmapData) { this.source = source; this.targetBitmap = targetBitmap; // Start with the normal effect effectType = EffectType.NORMAL; } /** * Sets the effect to the next effect in the EffectType class */ public function nextEffect():void { effectType = chosenEffect + 1; } /** * Sets the effect to the previous effect in the EffectType class */ public function previousEffect():void { effectType = chosenEffect - 1; } /** * An integer representing the current effect in the EffectType class */ public function set effectType(type:int):void { // Remove the previous effect if (effect != null) effect.destroy(); // Wrap the chosen effect within the total effects available if (type > EffectType.TOTAL_EFFECTS) type = 0; if (type < 0) type = EffectType.TOTAL_EFFECTS; // Set the effect switch (type) { case EffectType.GLOW: effect = new GlowEffect (source, targetBitmap); break; case EffectType.WARHOL: effect = new WarholEffect (source, targetBitmap); break; case EffectType.SEPIA: effect = new SepiaEffect (source, targetBitmap); break; case EffectType.MONOCHROME: effect = new MonochromeEffect (source, targetBitmap); break; case EffectType.X_RAY: effect = new XRayEffect (source, targetBitmap); break; case EffectType.DIVIDE: effect = new DivideEffect (source, targetBitmap); break; case EffectType.SLIT_SCAN: effect = new SlitScanEffect (source, targetBitmap); break; case EffectType.MIRROR_INVERSE: effect = new InverseMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_TOP: effect = new TopMirrorEffect (source, targetBitmap); break; case EffectType.UPSIDE_DOWN: effect = new UpsideDownEffect (source, targetBitmap); break; case EffectType.MIRROR_LEFT: effect = new LeftMirrorEffect (source, targetBitmap); break; case EffectType.BULGE: effect = new BulgeEffect (source, targetBitmap); break; case EffectType.SQUEEZE: effect = new SqueezeEffect (source, targetBitmap); break; case EffectType.FISHEYE: effect = new FisheyeEffect (source, targetBitmap); break; case EffectType.GHOST: effect = new GhostEffect (source, targetBitmap); break; case EffectType.TRAIL: effect = new TrailEffect (source, targetBitmap); break; case EffectType.WATER: effect = new WaterEffect (source, targetBitmap); break; case EffectType.SNOW: effect = new SnowEffect (source, targetBitmap); break; case EffectType.FIRE: effect = new FireEffect (source, targetBitmap); break; case EffectType.SWARM: effect = new SwarmEffect (source, targetBitmap); break; /*case EffectType.MIRROR_LEFT: effect = new LeftMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_RIGHT: effect = new RightMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_TOP: effect = new TopMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_BOTTOM: effect = new BottomMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_INVERSE: effect = new InverseMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_QUAD: effect = new QuadMirrorEffect (source, targetBitmap); break; case EffectType.UPSIDE_DOWN: effect = new UpsideDownEffect (source, targetBitmap); break; //case EffectType.DIVIDE: effect = new DivideEffect (source, targetBitmap); break; //case EffectType.FILMSTRIP: effect = new FilmstripEffect (source, targetBitmap); break; case EffectType.FRAGMENT: effect = new FragmentEffect (source, targetBitmap); break; case EffectType.GHOST: effect = new GhostEffect (source, targetBitmap); break; //case EffectType.TRAIL: effect = new TrailEffect (source, targetBitmap); break; //case EffectType.BULGE: effect = new BulgeEffect (source, targetBitmap); break; //case EffectType.FISHEYE: effect = new FisheyeEffect (source, targetBitmap); break; //case EffectType.FISHBOWL: effect = new FishbowlEffect (source, targetBitmap); break; //case EffectType.DENT: effect = new DentEffect (source, targetBitmap); break; //case EffectType.SQUEEZE: effect = new SqueezeEffect (source, targetBitmap); break; case EffectType.WATER: effect = new WaterEffect (source, targetBitmap); break; case EffectType.FIRE: effect = new FireEffect (source, targetBitmap); break; case EffectType.SNOW: effect = new SnowEffect (source, targetBitmap); break; //case EffectType.STEAM: effect = new SteamEffect (source, targetBitmap); break; case EffectType.SWARM: effect = new SwarmEffect (source, targetBitmap); break; //case EffectType.PIXELATE: effect = new PixelateEffect (source, targetBitmap); break; //case EffectType.RGB: effect = new RGBEffect (source, targetBitmap); break; //case EffectType.HALFTONE: effect = new HalftoneEffect (source, targetBitmap); break; case EffectType.MONOCHROME: effect = new MonochromeEffect (source, targetBitmap); break; case EffectType.SEPIA: effect = new SepiaEffect (source, targetBitmap); break; case EffectType.RAINBOW: effect = new RainbowEffect (source, targetBitmap); break; //case EffectType.ASCII: effect = new ASCIIEffect (source, targetBitmap); break; //case EffectType.X_RAY: effect = new XRayEffect (source, targetBitmap); break; //case EffectType.WARHOL: effect = new WarholEffect (source, targetBitmap); break; case EffectType.GLOW: effect = new GlowEffect (source, targetBitmap); break; case EffectType.SLIT_SCAN: effect = new SlitScanEffect (source, targetBitmap); break;*/ case EffectType.NORMAL: default: // Use a normal effect if the passed effect type is not valid type = EffectType.NORMAL; effect = new NormalEffect(source, targetBitmap); break; } // Remember the chosen effect chosenEffect = type; // Tell anything listening that a new effect has been chosen dispatchEvent(new EffectEvent(EffectEvent.NEW_EFFECT, false, false, chosenEffect)); } /** * An integer representing the current effect in the EffectType class */ public function get effectType():int { return chosenEffect; } /** * The proper name of the current effect */ public function get effectName():String { return effect.effectName; } /** * Updates the appearance of the current effect */ public function update():void { effect.draw(); } /** * Removes the current effect */ public function destroy():void { effect.destroy(); } } } \ No newline at end of file
+/** * Neave Webcam // Effects Manager * * Copyright (C) 2008 Paul Neave * http://www.neave.com/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation at http://www.gnu.org/licenses/gpl.html */ package com.neave.webcam.effects { import flash.display.*; import flash.events.*; import com.neave.webcam.effects.color.*; import com.neave.webcam.effects.delay.*; import com.neave.webcam.effects.displace.*; import com.neave.webcam.effects.mirror.*; import com.neave.webcam.effects.motion.*; import com.neave.webcam.effects.pixel.*; public class EffectsManager extends EventDispatcher { private var source:IBitmapDrawable; private var targetBitmap:BitmapData; private var effect:AbstractEffect; private var chosenEffect:int; /** * Manages all of the webcam effects * * @param source The source object to use for the effect * @param targetBitmap The target bitmap data to draw the resulting effect into */ public function EffectsManager(source:IBitmapDrawable, targetBitmap:BitmapData) { this.source = source; this.targetBitmap = targetBitmap; // Start with the normal effect effectType = EffectType.NORMAL; } /** * Sets the effect to the next effect in the EffectType class */ public function nextEffect():void { effectType = chosenEffect + 1; } /** * Sets the effect to the previous effect in the EffectType class */ public function previousEffect():void { effectType = chosenEffect - 1; } /** * An integer representing the current effect in the EffectType class */ public function set effectType(type:int):void { // Remove the previous effect if (effect != null) effect.destroy(); // Wrap the chosen effect within the total effects available if (type > EffectType.TOTAL_EFFECTS) type = 0; if (type < 0) type = EffectType.TOTAL_EFFECTS; // Set the effect switch (type) { case EffectType.MIRROR_LEFT: effect = new LeftMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_RIGHT: effect = new RightMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_TOP: effect = new TopMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_BOTTOM: effect = new BottomMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_INVERSE: effect = new InverseMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_QUAD: effect = new QuadMirrorEffect (source, targetBitmap); break; case EffectType.UPSIDE_DOWN: effect = new UpsideDownEffect (source, targetBitmap); break; case EffectType.DIVIDE: effect = new DivideEffect (source, targetBitmap); break; case EffectType.FILMSTRIP: effect = new FilmstripEffect (source, targetBitmap); break; case EffectType.FRAGMENT: effect = new FragmentEffect (source, targetBitmap); break; case EffectType.GHOST: effect = new GhostEffect (source, targetBitmap); break; case EffectType.TRAIL: effect = new TrailEffect (source, targetBitmap); break; case EffectType.BULGE: effect = new BulgeEffect (source, targetBitmap); break; case EffectType.FISHEYE: effect = new FisheyeEffect (source, targetBitmap); break; case EffectType.FISHBOWL: effect = new FishbowlEffect (source, targetBitmap); break; case EffectType.DENT: effect = new DentEffect (source, targetBitmap); break; case EffectType.SQUEEZE: effect = new SqueezeEffect (source, targetBitmap); break; case EffectType.WATER: effect = new WaterEffect (source, targetBitmap); break; case EffectType.FIRE: effect = new FireEffect (source, targetBitmap); break; case EffectType.SNOW: effect = new SnowEffect (source, targetBitmap); break; case EffectType.STEAM: effect = new SteamEffect (source, targetBitmap); break; case EffectType.SWARM: effect = new SwarmEffect (source, targetBitmap); break; case EffectType.PIXELATE: effect = new PixelateEffect (source, targetBitmap); break; case EffectType.RGB: effect = new RGBEffect (source, targetBitmap); break; case EffectType.HALFTONE: effect = new HalftoneEffect (source, targetBitmap); break; case EffectType.MONOCHROME: effect = new MonochromeEffect (source, targetBitmap); break; case EffectType.SEPIA: effect = new SepiaEffect (source, targetBitmap); break; case EffectType.RAINBOW: effect = new RainbowEffect (source, targetBitmap); break; case EffectType.ASCII: effect = new ASCIIEffect (source, targetBitmap); break; case EffectType.X_RAY: effect = new XRayEffect (source, targetBitmap); break; case EffectType.WARHOL: effect = new WarholEffect (source, targetBitmap); break; case EffectType.GLOW: effect = new GlowEffect (source, targetBitmap); break; case EffectType.SLIT_SCAN: effect = new SlitScanEffect (source, targetBitmap); break; case EffectType.NORMAL: default: // Use a normal effect if the passed effect type is not valid type = EffectType.NORMAL; effect = new NormalEffect(source, targetBitmap); break; } // Remember the chosen effect chosenEffect = type; // Tell anything listening that a new effect has been chosen dispatchEvent(new EffectEvent(EffectEvent.NEW_EFFECT, false, false, chosenEffect)); } /** * An integer representing the current effect in the EffectType class */ public function get effectType():int { return chosenEffect; } /** * The proper name of the current effect */ public function get effectName():String { return effect.effectName; } /** * Updates the appearance of the current effect */ public function update():void { effect.draw(); } /** * Removes the current effect */ public function destroy():void { effect.destroy(); } } } \ No newline at end of file