From f5ba0673aed43bd1cd800ab5b243365e0cfabb71 Mon Sep 17 00:00:00 2001 From: mrmaxm Date: Mon, 16 Dec 2024 12:47:09 +0200 Subject: [PATCH] expose rootBone property --- src/framework/components/render/component.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/framework/components/render/component.js b/src/framework/components/render/component.js index aa45faf44ee..e04b35c0a26 100644 --- a/src/framework/components/render/component.js +++ b/src/framework/components/render/component.js @@ -135,6 +135,7 @@ class RenderComponent extends Component { * are rendered by this component. * * @type {import('../../entity.js').Entity|null} + * @private */ _rootBone = null; @@ -695,6 +696,11 @@ class RenderComponent extends Component { this._assetReference.id = id; } + /** + * Sets the root bone entity (or entity guid) for the render component. + * + * @type {import('../../entity.js').Entity|string|null} + */ set rootBone(value) { if (this._rootBone !== value) { const isString = typeof (value) === 'string'; @@ -720,6 +726,11 @@ class RenderComponent extends Component { } } + /** + * Gets the root bone entity for the render component. + * + * @type {import('../../entity.js').Entity|null} + */ get rootBone() { return this._rootBone; }