Skip to content

Commit 4b648e2

Browse files
Mugen87abernier
authored andcommitted
Docs: Mentioned the need for ImageBitmap.close(). (mrdoob#23959)
1 parent 924d841 commit 4b648e2

File tree

7 files changed

+37
-2
lines changed

7 files changed

+37
-2
lines changed

docs/examples/en/loaders/GLTFLoader.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ <h1>[name]</h1>
2020
textures, skins, skeletons, morph targets, animations, lights, and/or cameras.
2121
</p>
2222

23+
<p>
24+
[name] uses [page:ImageBitmapLoader] whenever possible. Be advised that image bitmaps are not automatically GC-collected when they are no longer referenced,
25+
and they require special handling during the disposal process. More information in the [link:https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects How to dispose of objects] guide.
26+
</p>
27+
2328
<h2>Extensions</h2>
2429

2530
<p>

docs/examples/zh/loaders/GLTFLoader.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ <h1>GLTF加载器([name])</h1>
1919
包括网格、材质、贴图、蒙皮、骨架、变形目标、动画、灯光以及摄像机。
2020
</p>
2121

22+
<p>
23+
[name] uses [page:ImageBitmapLoader] whenever possible. Be advised that image bitmaps are not automatically GC-collected when they are no longer referenced,
24+
and they require special handling during the disposal process. More information in the [link:https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects How to dispose of objects] guide.
25+
</p>
26+
2227
<h2>扩展</h2>
2328

2429
<p>

docs/manual/ar/introduction/How-to-dispose-of-objects.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ <h2>الأنسجة (Textures)</h2>
3737
على غرار المخازن المؤقتة ، لا يمكن حذف هذا الكائن إلا عن طريق استدعاء [page:Texture.dispose]().
3838
</p>
3939

40+
<p>
41+
If you use an *ImageBitmap* as the texture's data source, you have to call [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close ImageBitmap.close]() at the application level to dispose of all CPU-side resources.
42+
An automated call of *ImageBitmap.close()* in [page:Texture.dispose]() is not possible, since the image bitmap becomes unusable, and the engine has no way of knowing if the image bitmap is used elsewhere.
43+
</p>
44+
4045
<h2>أهداف العرض</h2>
4146

4247
<p>

docs/manual/en/introduction/How-to-dispose-of-objects.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ <h2>Textures</h2>
4444
Similar to buffers, this object can only be deleted by calling [page:Texture.dispose]().
4545
</p>
4646

47+
<p>
48+
If you use an *ImageBitmap* as the texture's data source, you have to call [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close ImageBitmap.close]() at the application level to dispose of all CPU-side resources.
49+
An automated call of *ImageBitmap.close()* in [page:Texture.dispose]() is not possible, since the image bitmap becomes unusable, and the engine has no way of knowing if the image bitmap is used elsewhere.
50+
</p>
51+
4752
<h2>Render Targets</h2>
4853

4954
<p>

docs/manual/ja/introduction/How-to-dispose-of-objects.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ <h2>Textures</h2>
5050
バッファと同様に、このオブジェクトは[page:Texture.dispose]()を呼ぶことでしか削除できません。
5151
</p>
5252

53+
<p>
54+
If you use an *ImageBitmap* as the texture's data source, you have to call [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close ImageBitmap.close]() at the application level to dispose of all CPU-side resources.
55+
An automated call of *ImageBitmap.close()* in [page:Texture.dispose]() is not possible, since the image bitmap becomes unusable, and the engine has no way of knowing if the image bitmap is used elsewhere.
56+
</p>
57+
5358
<h2>Render Targets</h2>
5459

5560
<p>
@@ -127,4 +132,4 @@ <h2>Examples that demonstrate the usage of dispose()</h2>
127132

128133
</body>
129134

130-
</html>
135+
</html>

docs/manual/ko/introduction/How-to-dispose-of-objects.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ <h2>텍스쳐</h2>
4242
buffer와 비슷하게, 이 오브젝트는 [page:Texture.dispose]() 호출로만 삭제가 가능합니다.
4343
</p>
4444

45+
<p>
46+
If you use an *ImageBitmap* as the texture's data source, you have to call [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close ImageBitmap.close]() at the application level to dispose of all CPU-side resources.
47+
An automated call of *ImageBitmap.close()* in [page:Texture.dispose]() is not possible, since the image bitmap becomes unusable, and the engine has no way of knowing if the image bitmap is used elsewhere.
48+
</p>
49+
4550
<h2>렌더링 대상</h2>
4651

4752
<p>
@@ -112,4 +117,4 @@ <h2>dispose() 사용법 예제</h2>
112117

113118
</body>
114119

115-
</html>
120+
</html>

docs/manual/zh/introduction/How-to-dispose-of-objects.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ <h2>纹理</h2>
4444
和buffer相似,该对象只能通过调用[page:Texture.dispose]()来删除。
4545
</p>
4646

47+
<p>
48+
If you use an *ImageBitmap* as the texture's data source, you have to call [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close ImageBitmap.close]() at the application level to dispose of all CPU-side resources.
49+
An automated call of *ImageBitmap.close()* in [page:Texture.dispose]() is not possible, since the image bitmap becomes unusable, and the engine has no way of knowing if the image bitmap is used elsewhere.
50+
</p>
51+
4752
<h2>渲染目标</h2>
4853

4954
<p>

0 commit comments

Comments
 (0)