|
@@ -10864,6 +10864,7 @@ function WebGLBindingStates(gl, extensions, attributes, capabilities) {
|
|
|
const bindingStates = {};
|
|
|
const defaultState = createBindingState(null);
|
|
|
let currentState = defaultState;
|
|
|
+ let forceUpdate = false;
|
|
|
|
|
|
function setup(object, material, program, geometry, index) {
|
|
|
let updateBuffers = false;
|
|
@@ -10897,7 +10898,8 @@ function WebGLBindingStates(gl, extensions, attributes, capabilities) {
|
|
|
attributes.update(index, gl.ELEMENT_ARRAY_BUFFER);
|
|
|
}
|
|
|
|
|
|
- if (updateBuffers) {
|
|
|
+ if (updateBuffers || forceUpdate) {
|
|
|
+ forceUpdate = false;
|
|
|
setupVertexAttributes(object, material, program, geometry);
|
|
|
|
|
|
if (index !== null) {
|
|
@@ -11224,6 +11226,7 @@ function WebGLBindingStates(gl, extensions, attributes, capabilities) {
|
|
|
|
|
|
function reset() {
|
|
|
resetDefaultState();
|
|
|
+ forceUpdate = true;
|
|
|
if (currentState === defaultState) return;
|
|
|
currentState = defaultState;
|
|
|
bindVertexArrayObject(currentState.object);
|
|
@@ -11788,8 +11791,7 @@ class PMREMGenerator {
|
|
|
}
|
|
|
|
|
|
_dispose() {
|
|
|
- this._blurMaterial.dispose();
|
|
|
-
|
|
|
+ if (this._blurMaterial !== null) this._blurMaterial.dispose();
|
|
|
if (this._pingPongRenderTarget !== null) this._pingPongRenderTarget.dispose();
|
|
|
|
|
|
for (let i = 0; i < this._lodPlanes.length; i++) {
|
|
@@ -31211,6 +31213,11 @@ class PositionalAudio extends Audio {
|
|
|
this.panner.connect(this.gain);
|
|
|
}
|
|
|
|
|
|
+ disconnect() {
|
|
|
+ super.disconnect();
|
|
|
+ this.panner.disconnect(this.gain);
|
|
|
+ }
|
|
|
+
|
|
|
getOutput() {
|
|
|
return this.panner;
|
|
|
}
|