UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

11 lines (10 loc) 345 B
"use strict"; export function monkeyPatchSpotLight(spotLight) { const previousCopy = spotLight.copy.bind(spotLight); spotLight.copy = function(source, recursive) { const clonedSpotLight = previousCopy(source, recursive); clonedSpotLight.map = source.map; monkeyPatchSpotLight(clonedSpotLight); return clonedSpotLight; }; }