Skip to content

Commit b3f48ce

Browse files
author
aardgoose
committed
adjust delete binding to bindGroups
1 parent c9f7c39 commit b3f48ce

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/renderers/common/Bindings.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,15 @@ class Bindings extends DataMap {
202202

203203
delete ( renderObject ) {
204204

205-
const bindings = this.get( renderObject ).bindings;
205+
const bindings = renderObject.getBindings();
206+
207+
for ( const bindGroup of bindings ) {
206208

207-
for ( let i = 0, l = bindings.length; i < l; i ++ ) {
209+
for ( const binding of bindGroup.bindings ) {
208210

209-
const binding = bindings[ i ];
211+
if ( binding.isNodeUniformsGroup && binding._isCommon === true && ! binding.groupNode.shared ) binding.freeCommon();
210212

211-
if ( binding.isNodeUniformsGroup && binding._isCommon === true ) binding.freeCommon();
213+
}
212214

213215
}
214216

0 commit comments

Comments
 (0)