Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. RegionAttachment.prototype.setRegion = function (region) {
  2.  
  3. if (region == undefined)
  4. return;
  5.  
  6. this.region = region;
  7. var uvs = this.uvs;
  8. if (region.rotate) {
  9. uvs[2] = region.u;
  10. uvs[3] = region.v2;
  11. uvs[4] = region.u;
  12. uvs[5] = region.v;
  13. uvs[6] = region.u2;
  14. uvs[7] = region.v;
  15. uvs[0] = region.u2;
  16. uvs[1] = region.v2;
  17. }
  18. else {
  19. uvs[0] = region.u;
  20. uvs[1] = region.v2;
  21. uvs[2] = region.u;
  22. uvs[3] = region.v;
  23. uvs[4] = region.u2;
  24. uvs[5] = region.v;
  25. uvs[6] = region.u2;
  26. uvs[7] = region.v2;
  27. }
  28. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement