
#############
ModelTreeNode
#############

.. js:class:: wvc.ModelTreeNode

   A custom element representing a node in the model tree.
   
   This component displays a model tree node with its type, visibility state, and interactive controls. It does not have any dependency on the @ts3d-hoops/web-viewer Model class.
   
   .. rubric:: Examples
   
   
   .. code-block:: html
   
      <hoops-model-tree-node nodeId="1" nodeName="Part1" nodeType="1"></hoops-model-tree-node>
      <hoops-model-tree-node nodeId="2" nodeName="Part2" nodeType="1" hidden></hoops-model-tree-node>
   
   .. rubric:: Custom Element
   
   
   ``hoops-model-tree-node``
   
   .. rubric:: Attributes
   
   
   **nodeId**
   
   
      The id of the node in the model
   
   
   **nodeName**
   
   
      The name of the node
   
   
   **nodeType**
   
   
      The type of the node (casted into a NodeType)
   
   
   **isRoot**
   
   
      Whether the node is a root node
   
   
   **hidden**
   
   
      The visibility state of the node
   
   
   .. rubric:: Since
   
   
   ``2025.8.0``
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.ModelTreeNode.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.ModelTreeNode.isRoot`
   * :js:data:`~wvc.ModelTreeNode.nodeId`
   * :js:data:`~wvc.ModelTreeNode.nodeName`
   * :js:data:`~wvc.ModelTreeNode.nodeType`
   * :js:data:`~wvc.ModelTreeNode.selected`
   * :js:data:`~wvc.ModelTreeNode.visibility`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wvc.ModelTreeNode.constructor

      .. rst-class:: sig-pretty-signature
      
         | ModelTreeNode(): :js:class:`ModelTreeNode <wvc.ModelTreeNode>`
      
      **Returns**\ : :js:class:`ModelTreeNode <wvc.ModelTreeNode>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wvc.ModelTreeNode.isRoot

      .. rst-class:: sig-pretty-signature
      
         | isRoot: *boolean*
      
      If the node is a root.
      



.. js:data:: wvc.ModelTreeNode.nodeId

      .. rst-class:: sig-pretty-signature
      
         | nodeId: *number*
      
      The id of the node to render.
      



.. js:data:: wvc.ModelTreeNode.nodeName

      .. rst-class:: sig-pretty-signature
      
         | nodeName: *string*
      
      The name of the node to render.
      



.. js:data:: wvc.ModelTreeNode.nodeType

      .. rst-class:: sig-pretty-signature
      
         | nodeType: *NodeType*
      
      The type of the node to render.
      



.. js:data:: wvc.ModelTreeNode.selected

      .. rst-class:: sig-pretty-signature
      
         | selected: *boolean*
      
      Whether the node is selected or not.
      



.. js:data:: wvc.ModelTreeNode.visibility

      .. rst-class:: sig-pretty-signature
      
         | visibility: *BranchVisibility*
      
      The visibility attribute represents the visibility of the node in the viewer. It may be one of the following three states:
      
      
      - ``Shown`` - The node and all of its children are visible.
      - ``Hidden`` - The node and all of its children are hidden.
      - ``Mixed`` - The node is visible, but some of its children are not visible.
      




