3D deforming Fix


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //ONE
  2.  
  3. // save transformation matrix
  4. var mt:Matrix = plane.transform.matrix;
  5.  
  6. //do your 3d
  7.  
  8. //apply 2d transformation matrix
  9. plane.transform.matrix = mat:Matrix;
  10.  
  11.  
  12.  
  13.  
  14. //MULTIPLE
  15. for()
  16. {
  17. matrixArr[i] = contQArray[i].transform.matrix;
  18.  
  19. Tweener.addTween(x, {time:x, onComplete:fix3D, onCompleteParams:[i]});
  20. }
  21.  
  22. //3D fix
  23. function fix3D( i:Number )
  24. {
  25. contQArray[i].transform.matrix = matrixArr[i];
  26. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.