3D is only 3 lines away
Actionscript:
-
var p = new Vector3D();
-
-
renderLoop
-
{
-
var scaleFactor = focalDistance / p.z;
-
-
myAsset.x = p.x * scaleFactor;
-
myAsset.y = p.y * scaleFactor;
-
}
This is all you need to represent a point in a 3d-environment.
About this entry
You’re currently reading “3D is only 3 lines away,” an entry on Hannes Moser
- Published:
- 16.01.08 / 7pm
- Category:
- General










No comments
Jump to comment form | comments rss [?] | trackback uri [?]