File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 444444 " size = 1024;" ,
445445 " break;" ,
446446 " }" ,
447- " this.spotLight.shadow.mapSize.width = size;" ,
448- " this.spotLight.shadow.mapSize.height = size;" ,
447+ " const shadow = this.spotLight.shadow;" ,
448+ " const mapSize = shadow.mapSize;" ,
449+ " if (mapSize.width !== size) {" ,
450+ " mapSize.set(size, size);" ,
451+ " " ,
452+ " // Force the recreation of the shadow map texture:" ,
453+ " if (shadow.map) {" ,
454+ " shadow.map.dispose();" ,
455+ " shadow.map = null;" ,
456+ " }" ,
457+ " shadow.needsUpdate = true;" ,
458+ " }" ,
449459 " }" ,
450460 " " ,
451461 " /**" ,
669679 " //@ts-ignore" ,
670680 " const object = objects[0];" ,
671681 " " ,
672- " // Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object." ,
673- " const gameScene = object.getRuntimeScene();" ,
674682 " const game = runtimeScene.getGame();" ,
675683 " " ,
676684 " // This is a hack that may break in future releases." ,
You can’t perform that action at this time.
0 commit comments