From 1e4fd28231f89ae0a18ebced14cddd914d6ff580 Mon Sep 17 00:00:00 2001 From: "Raoul v. R." Date: Mon, 15 Jul 2024 02:50:22 +0200 Subject: [PATCH] Use Object.assign --- src/shader-chunks/ShaderChunkExtensions.ts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/shader-chunks/ShaderChunkExtensions.ts b/src/shader-chunks/ShaderChunkExtensions.ts index 4453447e0..63c5e934a 100644 --- a/src/shader-chunks/ShaderChunkExtensions.ts +++ b/src/shader-chunks/ShaderChunkExtensions.ts @@ -43,21 +43,21 @@ export class ShaderChunkExtensions { } - Object.defineProperties(ShaderChunk, { - "pp_extensions": { value: null }, // Serves as a registration indicator. - "pp_camera_pars_fragment": { value: cameraParsFragment }, - "pp_colorspace_pars_fragment": { value: colorspaceParsFragment }, - "pp_colorspace_conversion_pars_fragment": { value: colorspaceConversionParsFragment }, - "pp_default_output_pars_fragment": { value: defaultOutputParsFragment }, - "pp_default_output_fragment": { value: gbufferDefaultOutputFragment }, - "pp_depth_buffer_pars_fragment": { value: depthBufferParsFragment }, - "pp_depth_buffer_precision_pars_fragment": { value: depthBufferPrecisionParsFragment }, - "pp_depth_utils_pars_fragment": { value: depthUtilsParsFragment }, - "pp_frame_buffer_precision_pars_fragment": { value: frameBufferPrecisionParsFragment }, - "pp_input_buffer_pars_fragment": { value: inputBufferParsFragment }, - "pp_precision_fragment": { value: precisionFragment }, - "pp_resolution_pars_fragment": { value: resolutionParsFragment }, - "pp_world_utils_pars_fragment": { value: worldUtilsParsFragment } + Object.assign(ShaderChunk, { + "pp_extensions": null, // Serves as a registration indicator. + "pp_camera_pars_fragment": cameraParsFragment, + "pp_colorspace_pars_fragment": colorspaceParsFragment, + "pp_colorspace_conversion_pars_fragment": colorspaceConversionParsFragment, + "pp_default_output_pars_fragment": defaultOutputParsFragment, + "pp_default_output_fragment": gbufferDefaultOutputFragment, + "pp_depth_buffer_pars_fragment": depthBufferParsFragment, + "pp_depth_buffer_precision_pars_fragment": depthBufferPrecisionParsFragment, + "pp_depth_utils_pars_fragment": depthUtilsParsFragment, + "pp_frame_buffer_precision_pars_fragment": frameBufferPrecisionParsFragment, + "pp_input_buffer_pars_fragment": inputBufferParsFragment, + "pp_precision_fragment": precisionFragment, + "pp_resolution_pars_fragment": resolutionParsFragment, + "pp_world_utils_pars_fragment": worldUtilsParsFragment }); ShaderChunk.normal_fragment_maps += "\n" + gbufferNormalFragment;