Skip to content

Commit 0e317c0

Browse files
authored
Examples: Fix memory leak in FBX demo. (#31068)
1 parent 8c66673 commit 0e317c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/webgl_loader_fbx.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@
128128

129129
object.traverse( function ( child ) {
130130

131+
if ( child.isSkinnedMesh ) {
132+
133+
child.skeleton.dispose();
134+
135+
}
136+
131137
if ( child.material ) {
132138

133139
const materials = Array.isArray( child.material ) ? child.material : [ child.material ];

0 commit comments

Comments
 (0)