5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

three.jsでr70になったらテクスチャマッピングが動かなくなった #solved

Last updated at Posted at 2015-01-18

原因

new THREE.UVMapping()

r70以前は、THREE.UVMappingをnewしてインスタンス化出来たが、
r70から廃止された。

r70以前はOKなコード

texture = new THREE.Texture(canvasScaled, new THREE.UVMapping(), THREE.ClampToEdgeWrapping, THREE.ClampToEdgeWrapping);

解決方法

THREE.UVMappingという定数を使う。

r70で動くコード

texture = new THREE.Texture(canvasScaled, THREE.UVMapping, THREE.ClampToEdgeWrapping, THREE.ClampToEdgeWrapping);

さらに

r70以前からかもだが、以下のように指定しないと2のn乗のサイズと
なっていないテクスチャは警告を受けるようになった。

texture.minFilter=THREE.LinearFilter;
texture.magFilter=THREE.LinearFilter;

関連投稿

関連記事

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?