Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/api/en/loaders/ImageBitmapLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ <h1>[name]</h1>
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>
Expand All @@ -26,6 +33,9 @@ <h2>Example</h2>
// instantiate a loader
var loader = new THREE.ImageBitmapLoader();

// set options if needed
loader.setOptions( { imageOrientation: 'flipY' } );

// load a image resource
loader.load(
// resource URL
Expand Down
10 changes: 10 additions & 0 deletions docs/api/zh/loaders/ImageBitmapLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ <h1>[name]</h1>
不像[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>
Expand All @@ -26,6 +33,9 @@ <h2>例子</h2>
// 初始化一个加载器
var loader = new THREE.ImageBitmapLoader();

// set options if needed
loader.setOptions( { imageOrientation: 'flipY' } );

// 加载一个图片资源
loader.load(
// 资源的URL
Expand Down