Another example here. Simple 2D bumpmap effect. There is just a problem with my environment map. I think it has to do with the accuracy of Number because the following returns NaN in most cases:
[as]
for ( var x: int = -0×80; x < 0x80; x++ )
{
for ( var y: int = -0x80; y < 0x80; y++ )
{
nx = x / 0x80;
ny = y / 0x80;
nz = max( 1 - sqrt(nx * nx + ny * ny) , 0 );
trace( nz );
}
}
[/as]
3 Trackbacks
[...] (example) AS3 oldschool fire (source + example) AS3 oldschool tunnel (source + example) AS3 Bumbmaps (source + example) How to use Sockets in Actionscript3? (source) Lightning particlesAn [...]
ActionScript 3.0 站点集合
转自(http://bbs.javascript.com.cn/read.p…=1604&fpage=1)ActionScript 3.0 collection 68 sitesActionScript…
[...] AS3 Bumbmaps (mapa de profundidad) [...]