From 86b6128a54f85def9d383d47202829db3a440bc1 Mon Sep 17 00:00:00 2001 From: Ian Purvis Date: Sat, 20 Feb 2021 16:08:15 -0700 Subject: [PATCH] PropertyBinding: Avoid Object.assign --- src/animation/PropertyBinding.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/animation/PropertyBinding.js b/src/animation/PropertyBinding.js index 160211fe8a4409..6021d74569aa88 100644 --- a/src/animation/PropertyBinding.js +++ b/src/animation/PropertyBinding.js @@ -641,24 +641,22 @@ class PropertyBinding { } -Object.assign( PropertyBinding, { - Composite -} ); +PropertyBinding.Composite = Composite; -const BindingType = { +PropertyBinding.prototype.BindingType = { Direct: 0, EntireArray: 1, ArrayElement: 2, HasFromToArray: 3 }; -const Versioning = { +PropertyBinding.prototype.Versioning = { None: 0, NeedsUpdate: 1, MatrixWorldNeedsUpdate: 2 }; -const GetterByBindingType = [ +PropertyBinding.prototype.GetterByBindingType = [ PropertyBinding.prototype._getValue_direct, PropertyBinding.prototype._getValue_array, @@ -667,7 +665,7 @@ const GetterByBindingType = [ ]; -const SetterByBindingTypeAndVersioning = [ +PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [ [ // Direct @@ -701,13 +699,5 @@ const SetterByBindingTypeAndVersioning = [ ]; -Object.assign( PropertyBinding.prototype, { - - BindingType, - Versioning, - GetterByBindingType, - SetterByBindingTypeAndVersioning, - -} ); export { PropertyBinding };