import { Node } from '@babylonjs/core/node' ; import { CreatedInstance } from '../CreatedInstance' ; import { FiberNodeProps } from '../generatedProps' ; import BaseLifecycleListener from './BaseLifecycleListener' ; export default class NodeLifecycleListener extends BaseLifecycleListener < Node , FiberNodeProps > { onParented ( parent , child ) { super . onParented ( parent , child ) ; if ( parent . metadata . isNode && child . metadata . isNode ) { child . hostInstance . parent = parent . hostInstance ; } } }