@@ -85,6 +85,7 @@ export interface IRenderedDisplayEntityNode extends IRenderedNode {
8585 */
8686 base_scale : number
8787 bounding_box : THREE . Box3
88+ on_summon_function ?: string
8889 configs ?: IDisplayEntityConfigs
8990}
9091
@@ -354,7 +355,8 @@ function renderGroup(
354355 parent : parentId ,
355356 bounding_box : getNodeBoundingBox ( group ) ,
356357 base_scale : 1 ,
357- configs : group . configs ,
358+ configs : structuredClone ( group . configs ) ,
359+ on_summon_function : group . onSummonFunction ?. trim ( ) ,
358360 // This is a placeholder value that will be updated later once the animation renderer is run.
359361 default_transform : { } as INodeTransform ,
360362 }
@@ -464,7 +466,8 @@ function renderItemDisplay(display: VanillaItemDisplay, rig: IRenderedRig) {
464466 item : display . item ,
465467 item_display : display . itemDisplay ,
466468 base_scale : 1 ,
467- configs : display . configs ,
469+ configs : structuredClone ( display . configs ) ,
470+ on_summon_function : display . onSummonFunction ?. trim ( ) ,
468471 bounding_box : getNodeBoundingBox ( display ) ,
469472 default_transform : { } as INodeTransform ,
470473 }
@@ -492,7 +495,8 @@ function renderBlockDisplay(display: VanillaBlockDisplay, rig: IRenderedRig) {
492495 block : display . block ,
493496 parent : parentId ,
494497 base_scale : 1 ,
495- configs : display . configs ,
498+ configs : structuredClone ( display . configs ) ,
499+ on_summon_function : display . onSummonFunction ?. trim ( ) ,
496500 bounding_box : getNodeBoundingBox ( display ) ,
497501 default_transform : { } as INodeTransform ,
498502 }
@@ -527,7 +531,8 @@ function renderTextDisplay(display: TextDisplay, rig: IRenderedRig): INodeStruct
527531 shadow : display . shadow ,
528532 see_through : display . seeThrough ,
529533 base_scale : 1 ,
530- configs : display . configs ,
534+ configs : structuredClone ( display . configs ) ,
535+ on_summon_function : display . onSummonFunction ?. trim ( ) ,
531536 bounding_box : getNodeBoundingBox ( display ) ,
532537 default_transform : { } as INodeTransform ,
533538 }
@@ -549,7 +554,7 @@ function renderLocator(locator: Locator, rig: IRenderedRig) {
549554 storage_name : sanitizeStorageKey ( locator . name ) ,
550555 uuid : locator . uuid ,
551556 parent : parentId ,
552- config : locator . config ,
557+ config : structuredClone ( locator . config ) ,
553558 max_distance : 0 ,
554559 default_transform : { } as INodeTransform ,
555560 }
0 commit comments