home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Esportes
/
CrossingCup.swf
/
scripts
/
__Packages
/
sandy
/
skin
/
MixedSkin.as
< prev
next >
Wrap
Text File
|
2007-12-11
|
3KB
|
94 lines
class sandy.skin.MixedSkin extends sandy.skin.BasicSkin implements sandy.skin.Skin
{
function MixedSkin(cb, ab, cl, al, tl)
{
super();
this._colorLine = !isNaN(cl) ? cl : 0;
this._alphaLine = !isNaN(al) ? al : 100;
this._thickness = !isNaN(tl) ? tl : 2;
this._colorBkg = !isNaN(cb) ? cb : 15658734;
this._alphaBkg = !isNaN(ab) ? ab : 100;
this._useLight = false;
this.__set__filters([]);
}
function set alphaBkg(n)
{
this._alphaBkg = n;
this.broadcastEvent(this._eOnUpdate);
}
function set colorBkg(n)
{
this._colorBkg = n;
this.broadcastEvent(this._eOnUpdate);
}
function set thickness(n)
{
this._thickness = n;
this.broadcastEvent(this._eOnUpdate);
}
function set alphaLine(n)
{
this._alphaLine = n;
this.broadcastEvent(this._eOnUpdate);
}
function set colorLine(n)
{
this._colorLine = n;
this.broadcastEvent(this._eOnUpdate);
}
function get alphaBkg()
{
return this._alphaBkg;
}
function get colorBkg()
{
return this._colorBkg;
}
function get thickness()
{
return this._thickness;
}
function get alphaLine()
{
return this._alphaLine;
}
function get colorLine()
{
return this._colorLine;
}
function getType(Void)
{
return sandy.skin.SkinType.__get__MIXED();
}
function begin(face, mc)
{
mc.filters = this._filters;
var _loc2_ = this._colorBkg;
if(this._useLight)
{
var _loc8_ = sandy.core.World3D.getInstance().getLight();
var _loc10_ = face.createNormale();
var _loc11_ = _loc8_.dir;
var _loc4_ = _loc8_.getPower() / 100;
var _loc5_ = _loc2_ >> 16 & 255;
var _loc7_ = _loc2_ >> 8 & 255;
var _loc3_ = _loc2_ & 255;
var _loc6_ = - sandy.math.VectorMath.dot(_loc11_,_loc10_);
_loc5_ = sandy.util.NumberUtil.constrain(_loc5_ * (_loc6_ + _loc4_),0,255);
_loc7_ = sandy.util.NumberUtil.constrain(_loc7_ * (_loc6_ + _loc4_),0,255);
_loc3_ = sandy.util.NumberUtil.constrain(_loc3_ * (_loc6_ + _loc4_),0,255);
_loc2_ = _loc5_ << 16 | _loc7_ << 8 | _loc3_;
}
mc.lineStyle(this._thickness,this._colorLine,this._alphaLine);
mc.beginFill(_loc2_,this._alphaBkg);
}
function end(f, mc)
{
mc.endFill();
}
function toString(Void)
{
return "sandy.skin.MixedSkin";
}
}