From 4a887c434cd67cc724baaeb65261172d32e82fe5 Mon Sep 17 00:00:00 2001 From: Tristan VALCKE Date: Sun, 22 Jan 2017 17:21:24 +0100 Subject: [PATCH] Protect Texture against the closure circular reference bug --- src/textures/Texture.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/textures/Texture.js b/src/textures/Texture.js index 6ba19df225..2b025adb37 100644 --- a/src/textures/Texture.js +++ b/src/textures/Texture.js @@ -59,7 +59,7 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty Texture.DEFAULT_IMAGE = undefined; Texture.DEFAULT_MAPPING = UVMapping; -Texture.prototype = { +Object.assign( Texture.prototype, EventDispatcher.prototype, { constructor: Texture, @@ -283,8 +283,7 @@ Texture.prototype = { } -}; +} ); -Object.assign( Texture.prototype, EventDispatcher.prototype ); export { Texture }; -- GitLab