github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

tcha-tcho / EZFLAR

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 14
    • 8
  • Source
  • Commits
  • Network (8)
  • Issues (1)
  • Downloads (2)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (2)
    • v0.1
    • show
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

a little wrap to ez the augmented reality works — Read more

  cancel

http://www.ezflar.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixing readme 
tcha-tcho (author)
Mon Sep 28 22:59:09 -0700 2009
commit  4d2d7b0bf2cabd0cd98c368e012994e1d034a0a9
tree    4849194712d57c1e336a29b006ad29d9ac4b044b
parent  17b1114e5858aac73b72101cb31091b6decad8c3
EZFLAR /
name age
history
message
file .gitignore Thu Sep 17 10:05:04 -0700 2009 starting QRCode integration [tcha-tcho]
file README.textile Mon Sep 28 22:59:09 -0700 2009 Fixing readme [tcha-tcho]
directory src/ Mon Sep 28 14:46:16 -0700 2009 strange rotation problems fixed, readme file up... [tcha-tcho]
README.textile

The EZest way

Ok, download the package of thinks and put this on your frame:


import com.tchatcho.EZflar;//tcha-tcho.com
import com.transmote.flar.FLARMarkerEvent;
private var _ezflar:EZflar;
private var _symbols:Array = new Array();
_symbols.push([[“EZFLAR.pat”, “cube”]]);//0
_ezflar = new EZflar( _symbols );
_ezflar.initializer(stage);

A full complex case

initiate your code


import com.tchatcho.EZflar;
import com.transmote.flar.FLARMarkerEvent;
var _ezflar:EZflar;
var _symbols:Array = new Array();

_symbols will take all your markers and models and work with this in couples… ezflar can handle a lot of formats for you, so enjoy :) you can also create names for your models to group or to access this models for your names later. Look how to do that in “myoptionalname”. The markers will be access by your numbers, so remember that: begin with 0


_symbols.push([[“EZFLAR0.pat”, “swffilename.swf”],[“myoptionalname”]]);//0
_symbols.push([[“EZFLAR1.pat”, “flvfilename.flv”]]);//1
_symbols.push([[“EZFLAR2.pat”, “daefilename.dae”, “OPTIONALtexture.jpg”]]);//2
_symbols.push([[“EZFLAR3.pat”, “md2filename.md2”, “OPTIONALtexture.jpg”]]);//3
_symbols.push([[“EZFLAR4.pat”, “picturename.jpg”]]);//4
_symbols.push([[“EZFLAR5.pat”, “picturename.jpeg”]]);//5
_symbols.push([[“EZFLAR6.pat”, “picturename.png”]]);//6
_symbols.push([[“EZFLAR7.pat”, “picturename.gif”]]);//7
_symbols.push([[“EZFLAR8.pat”, “audioname.mp3”]]);//8
_symbols.push([[“EZFLAR9.pat”, “text”, “here goes my text up to 40 chars”]]);//9
_symbols.push([[“EZFLAR10.pat”, “twitter”, “nameoflogin”]]);//10
_symbols.push([[“EZFLAR11.pat”, “url”, “http//www.myexample.com”]]);//11
_symbols.push([[“EZFLAR12.pat”, “cube”, “OPTIONALtexture.jpg”]]);//12
_symbols.push([[“EZFLAR13.pat”, “wire”]]);//13
_symbols.push([[“EZFLAR14.pat”, “empty”]]);//14

Note about twitter: im a ruby developer, i dont know much about AS3. Connect Twitter from a external server need some adjustments in cross domain think. I made this by usin a rails server… someone can help me with this cross domain issues?

Now its time to build our AR
optionally you can give: size, framerate and etc.


ezflar = new EZflar(symbols);

lets begin! you can put your AR in any DisplayObject, like MovieClip or in this case “stage”
if your resources folder is in other place than your swf folder then you can give this
path in another argument in a string


_ezflar.initializer(stage);

when ezflar dont find a camera he gonna show a message :)
you can customize this message for your language and etc.
the second color is the font color, the last is the background


_ezflar.customizeNoCam(“Precisamos de uma webcam”, 0xFFFFFF, 0xCCCCCC);

checkout how your software are responding your changes with a framerate


_ezflar.viewFrameRate();

is a little annoying to play with AR with the webcam going to the wrong way
you can mirror the image, and de-mirror when you want


_ezflar.mirror();

this will make somethink when your app start


_ezflar.onStarted(function():void {
trace(“hey! im alive!”);

//you can work with more than one model for marker!!
//ez like that to add more thinks to some marker
_ezflar.addModelTo([1,“wire”]);//1 is the number of the _symbols remember?
_ezflar.addModelTo([0,“cube”, “OPTIONALtexture.jpg”], [“thecube”]);//here you can give names too
});

and you have methods ready to work when markers are showed to the cam


_ezflar.onAdded(function(marker:FLARMarkerEvent):void {
//hey! remember the names you gave?? you can pick models and change it!
_ezflar.getObject(0,“myoptionalname”).rotationX = 90;
_ezflar.getObject(0,“thecube”).rotationZ = 270;
_ezflar.getObject(3);//if you dont have a name he gonna take all without a name :P
});

this will be used in each frame rendered


_ezflar.onUpdated(function(marker:FLARMarkerEvent):void {
//he returns this marker that you can use to look where the markers are and etc.
trace(“[”+ marker.marker.patternId+"]>>" +
“X:” + marker.x() + " || " +
“Y:” + marker.y() + " || " +
“Z:” + marker.z() + " || " +
“RX:” + marker.rotationX() + " || " +
“RY:” + marker.rotationY() + " || " +
“RZ:” + marker.rotationZ() + " || "
);
});

play around with ezflar… we are in beta now and a lot of work to do.. pls help us :)

_ezflar.onRemoved(function(marker:FLARMarkerEvent):void {
});

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server