mrdoob/three.js — Issue #1227: CanvasRenderer bad image mapping.
Author: tedor
Created: 2012-02-01 12:07:49+00:00
State: open

Hi Mrdoob, firstly thanx for great library.

I try use library for flat cards, who should be rotate, so I have to use PlaneGeometry with > 1 polygons, currently it's:

```THREE.PlaneGeometry(img.width, img.height, 8, 8)```

and when added image texture, my flat card was rendered with white lines, after added "overdraw: true" for THREE.MeshBasicMaterial, flat card rendered much better, but still so bad for use in real project, like this:
http://tedor.kr.ua/project/html5-pageflip/index-overdraw.html

and I tried to fix it, and was got result like this:
http://tedor.kr.ua/project/html5-pageflip/index-fix.html

for fix it, I edited only CanvasRenderer script, you can take code here:
http://tedor.kr.ua/project/html5-pageflip/js/src/renderers/CanvasRenderer.js
my changes can be find by comments:
```// Fix positions for triangles ...```
and
```// Fix UV mapping...```

but still have problem with border flat card, if watch carefully You can see small dots around the card:
http://tedor.kr.ua/project/html5-pageflip/vertex_out.png

Do you have any idea how it can be fixed?