未验证 提交 8829b971 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15945 from takahirox/ImageBitmapLoaderDocument

Add note about ignored texture properties for ImageBitmap to ImageBitmapLoader document
......@@ -16,6 +16,13 @@
Unlike [page:FileLoader], [name] does not avoid multiple concurrent requests to the same URL.
</p>
<p>
Note that [page:Texture.flipY] and [page:Texture.premultiplyAlpha] with [link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] are ignored.
[link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] needs these configuration on bitmap creation
unlike regular images need them on uploading to GPU. You need to set the equivalent options via [page:ImageBitmapLoader.setOptions]
instead. Refer to [link:https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.10 WebGL specification] for the detail.
</p>
<h2>Example</h2>
<p>
......@@ -26,6 +33,9 @@
// instantiate a loader
var loader = new THREE.ImageBitmapLoader();
// set options if needed
loader.setOptions( { imageOrientation: 'flipY' } );
// load a image resource
loader.load(
// resource URL
......
......@@ -16,6 +16,13 @@
不像[page:FileLoader], [name]无需避免对同一的URL进行多次请求。
</p>
<p>
Note that [page:Texture.flipY] and [page:Texture.premultiplyAlpha] with [link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] are ignored.
[link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] needs these configuration on bitmap creation
unlike regular images need them on uploading to GPU. You need to set the equivalent options via [page:ImageBitmapLoader.setOptions]
instead. Refer to [link:https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.10 WebGL specification] for the detail.
</p>
<h2>例子</h2>
<p>
......@@ -26,6 +33,9 @@
// 初始化一个加载器
var loader = new THREE.ImageBitmapLoader();
// set options if needed
loader.setOptions( { imageOrientation: 'flipY' } );
// 加载一个图片资源
loader.load(
// 资源的URL
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册