react-babylonjs icon indicating copy to clipboard operation
react-babylonjs copied to clipboard

babylon-image TypeError: Cannot set property children of #<Container> which has only a getter

Open smoya-ekoo opened this issue 5 months ago • 1 comments

With react 19 I have an error with babylon-image

TypeError: Cannot set property children of #<Container> which has only a getter

<plane
	billboardMode={Mesh.BILLBOARDMODE_ALL}
	height={size}
	name={`hotspot ${name}`}
	position={hotspotPosition}
	width={size}
	alphaIndex={1}
	{...rest}
>
	<advancedDynamicTexture
		createForParentMesh
		generateMipMaps
		height={textureScale * size}
		name={name + "hotspot-texture"}
		samplingMode={Texture.TRILINEAR_SAMPLINGMODE}
		width={textureScale * size}
	>
		<rectangle thickness={0}>
			<babylon-image source={icon} /> {/*Error*/}
		</rectangle>
	</advancedDynamicTexture>
</plane>

Can you help me?

Thanks!

smoya-ekoo avatar Aug 06 '25 00:08 smoya-ekoo

It doesn’t look like “children” of image, since it was in a self enclosed tag. Are you sure also there is no “children” left over from a spread operation? Or can you share a playground?

brianzinn avatar Aug 06 '25 00:08 brianzinn