Adds a TreeNode as the root of a subtree.
The world tree can be split into subtrees, each of which will have it’s dedicated
NodeMap for optimal searching speed. A subtree does not differ structurally from
a regular node, and it does not alter the overall hierarchy of the world tree in any way.Parameters:
Goes throught the tree starting at node if provided, otherwise at the tree root
and runs the provided predicate for each node. All nodes which satisfy the predicate
are returned.
Be mindful about the predicate’s contents. If the tree is very large this operation can lock the
main thread for too long. If you need to execute complex predicates on large trees,
walkAsync is a better candidate.
Find a node by id. The optional subtreeId argument can narrow down the search
to a specific subtree, otherwise it will search the entire tree. It returns an
array of nodes because multiple nodes can have the same id, like in the case of instances.
Using this method for tree searches is encouraged because it’s accelerated by a backing NodeMap
which brings down searches to just one or more lookups
Parameters:
id: The id of the node to search for
(optional)subtreeId: The id of the subtree to search in. If undefined
the search will include the entire tree
Gets the RenderTree instance of the provided subtree id.
If the subtree id is not found, null is returned. The overloaded version with
no argument gets the RenderTree instance for the entire tree, which can never be null.Parameters:
Walks the tree starting at node and executes the SearchPredicate
for each node. If node argument is undefined, walking starts at root. Walking
is stopped when the predicate returns false.
This function is synchronous and depending on the complexity of your
SearchPredicate and the total number of
nodes, it might block the main thread. For a heavy
SearchPredicate use
walkAsync.
The asynchronous version of walk. The function
will yield for 16ms (one frame) after a cummulated 100ms spent executing. The return
promise will resolve to a boolean which determines if the tree was completely
walked (true) or not (false).Parameters:
When using the predicate in findAll the return
value detemines if the current node matche the search(true) or not(false). When using the
predicate in walk and
walkAsync, return false will stop the tree
walking early.
TreeNode
type TreeNode = TreeModel.Node<NodeData>
Abstraction of a tree node.
The tree is implemented on top of an existing tree
library which defines the tree nodes
it’s own way. At runtime the nodes will consist of:
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Speckle Docs","colors":{"primary":"#155DFC","light":"#51A2FF","dark":"#2B7FFF"},"logo":{"light":"https://mintcdn.com/speckle/8FGkkbZZbcuHzOBq/logo/light.svg?fit=max\u0026auto=format\u0026n=8FGkkbZZbcuHzOBq\u0026q=85\u0026s=9fc87cac252fa8cc443a9828ecbace70","dark":"https://mintcdn.com/speckle/8FGkkbZZbcuHzOBq/logo/dark.svg?fit=max\u0026auto=format\u0026n=8FGkkbZZbcuHzOBq\u0026q=85\u0026s=560ffcf355d3abfde56e5f8e514a64b7"},"favicon":"https://mintcdn.com/speckle/H0UAly7sy_Ci378-/favicon-docs.svg?fit=max\u0026auto=format\u0026n=H0UAly7sy_Ci378-\u0026q=85\u0026s=024a646efe6d1f271e2e537e4e58a606","background":{"color":{"light":"#FAFAFA","dark":"#09090B"}},"navbar":{"links":[{"href":"https://speckle.systems/","label":"Website"},{"href":"https://speckle.community/","label":"Community"}],"primary":{"type":"button","label":"Open Speckle","href":"https://app.speckle.systems/?utm_source=Docs\u0026utm_medium=SignUp\u0026utm_campaign=Docs"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/specklesystems","youtube":"https://www.youtube.com/@SpeckleSystems","github":"https://github.com/specklesystems","instagram":"https://www.instagram.com/specklesystems"}},"icons":{"library":"fontawesome"},"integrations":{"ga4":{"measurementId":"G-05WEYFZ28C"},"intercom":{"appId":"hoiaq4wn"},"mixpanel":{"projectToken":"acd87c5a50b56df91a795e999812a3a4"}},"contextual":{"options":["copy","chatgpt","claude"],"display":"header"},"metadata":{"timestamp":true},"markdown":{"instructions":["These docs describe Speckle as it works today, including everything released in 2026.9. Treat page content as current unless the page or section says it applies only to versions published before 2026.9.","Content scoped to versions published before 2026.9 (the object graph and root object, Proxies, Receive2, operations.receive, object.children) applies only to model versions in that earlier data format. For versions published in 2026.9, answer from the Object model pages and the SDK migration guides.","The What's new pages summarise what changed in 2026.9 and link to the page that documents each change. Answer from the linked page rather than from the summary. Legacy (v2) connectors are retired; send questions about them to the community help forum.","Match guidance to the customer's deployment, model data format, connector, plan and permissions. Self-hosted servers on a release before 2026.9 follow Data model migration for developers. If an unknown version or data format changes the answer, ask one focused question; do not infer the deployment version from the date alone."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"speckle","hasAudioNarration":false,"actualSubdomain":"speckle","customDomains":["docs.speckle.systems"],"gitSource":{"type":"github","owner":"specklesystems","repo":"speckle-docs-new","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"issues":true},"entitlements":{},"buildId":"6afc99871bfc62b1975d7a99","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Developers","count":213},{"language":"default","tag":"User Guides","count":95},{"language":"default","tag":"SDKs","count":65},{"language":"default","tag":"API Reference","count":54},{"language":"default","tag":"Viewer","count":50},{"language":"default","tag":"Connectors","count":39},{"language":"default","tag":"Publishing \u0026 Loading","count":37},{"language":"default","tag":"C# .NET","count":33},{"language":"default","tag":"Python","count":30},{"language":"default","tag":"Interfaces","count":29}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#footer div:first-child>div:first-child>div:first-child{display:none}.header-link+p{margin-top:0.6rem}li .frame{margin-top:1rem;margin-bottom:1.5rem}div:has(>.frame)+div:has(>.frame){margin-top:0.75rem}:root{--sp-surface-0: #fafafa;--sp-surface-1: #fcfcfc;--sp-border: #e4e4e7;--sp-bg-elevated: #f4f4f5;--sp-text-highlighted: #18181b;--sp-text-muted: #71717b;--sp-header-height: 56px}:root.dark{--sp-surface-0: #09090b;--sp-surface-1: #111113;--sp-border: #27272a;--sp-bg-elevated: #27272a;--sp-text-highlighted: #ffffff;--sp-text-muted: #9f9fa9}#sidebar [class*=\"bg-linear-to-b\"]{background-image:linear-gradient(to bottom, var(--sp-surface-1), transparent)!important}#sidebar [class*=\"bg-neutral-50\"][class*=\"rounded-full\"]{background:transparent!important}#sidebar li[data-active]>a{background:var(--sp-bg-elevated)!important;color:var(--sp-text-highlighted)!important}@media (min-width: 1024px){:root{--mintlify-slot-header-height: calc(var(--sp-header-height) + var(--topbar-tabs-height, 0rem))}div:has(>#sidebar){max-width:none!important;margin-left:0!important;margin-right:0!important;padding-left:0!important}#sidebar{background:var(--sp-surface-1);border-right:1px solid var(--sp-border)}#sidebar>div{left:16px!important;right:8px!important}div:has(>[data-layout-item=\"content\"]){max-width:1184px;margin-left:auto;margin-right:auto;padding-inline:48px}#navbar [class*=\"max-w-8xl\"]{max-width:none!important}body:has(#sidebar) #navbar #navbar-transition{border-bottom:1px solid var(--sp-border)!important;background:linear-gradient(\n to right,\n var(--sp-surface-1) 0,\n var(--sp-surface-1) calc(var(--sidebar-width, 18rem) - 1px),\n var(--sp-border) calc(var(--sidebar-width, 18rem) - 1px),\n var(--sp-border) var(--sidebar-width, 18rem),\n var(--sp-surface-0) var(--sidebar-width, 18rem)\n )!important}#navbar div:has(>div>div>a>img.nav-logo){height:var(--sp-header-height)!important;padding-left:32px!important}#navbar div:has(>div>div>a>img.nav-logo)>div{border-bottom:0!important}#navbar img.nav-logo{height:28px!important}#navbar div:has(>div>div>a>img.nav-logo)>div>div:first-child{flex:1 1 auto!important}#navbar div:has(>div>div>a>img.nav-logo)>div>div:nth-child(2){flex:0 0 auto!important;margin-left:auto;width:32px}#navbar div:has(>div>div>a>img.nav-logo)>div>div:nth-child(3){flex:0 0 auto!important;margin-left:16px}#navbar div:has(>div>div>a>img.nav-logo)>div>div:nth-child(3) a:has(>[class*=\"bg-primary\"]){height:32px!important;padding-top:0!important;padding-bottom:0!important}#search-bar-entry{width:32px!important;height:32px!important;padding:0!important;justify-content:center!important;border:0!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important}#search-bar-entry:hover{background:var(--sp-bg-elevated)!important}#search-bar-entry [data-search-item=\"trigger-icon\"]{width:16px!important;height:16px!important;color:var(--sp-text-muted)!important}#search-bar-entry:hover [data-search-item=\"trigger-icon\"]{color:var(--sp-text-highlighted)!important}#search-bar-entry [data-search-item=\"trigger-label\"],#search-bar-entry [data-search-item=\"trigger-hint\"]{display:none!important}body:has(#sidebar) #navbar div:has(>.nav-tabs){padding-left:calc(var(--sidebar-width, 18rem) + 32px)!important}}@media (min-width: 1440px){:root,body,body *{--topbar-tabs-height: 0rem !important}body:has(.nav-tabs) #navbar div:has(>div>.nav-tabs){display:grid!important}body:has(.nav-tabs) #navbar div:has(>div>.nav-tabs)>*{grid-area:1 / 1}#navbar div:has(>.nav-tabs){height:var(--sp-header-height)!important;pointer-events:none;align-items:stretch}#navbar .nav-tabs{pointer-events:auto}#content-side-layout{top:calc(var(--sp-header-height) + 48px)!important}}"}],"page":{"pagePath":"developers/viewer/world-tree-api","slug":"/developers/viewer/world-tree-api","pageMetadata":{"title":"WorldTree","description":"The WorldTree is a tree data structure that is used to store the scene graph.","href":"/developers/viewer/world-tree-api"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"The WorldTree is a tree data structure that is used to store the scene graph.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`constructors`,children:`Constructors`}),`\n`,_jsx(Heading,{level:`3`,id:`constructor`,children:`constructor`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` WorldTree`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api`,children:_jsx(_components.strong,{children:_jsx(_components.em,{children:`WorldTree`})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`accessors`,children:`Accessors`}),`\n`,_jsx(Heading,{level:`3`,id:`nodecount`,children:`nodeCount`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`get`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` nodeCount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Gets the total node count for the tree.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: number`]}),`\n`,_jsx(Heading,{level:`3`,id:`root`,children:`root`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`get`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` root`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Gets the root `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`methods`,children:`Methods`}),`\n`,_jsx(Heading,{level:`3`,id:`addnode`,children:`addNode`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Adds a `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` as a child of the provided parent node.`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`node`}),`: The `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` to add`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`parent`}),`: The parent `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` to add the node to`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: void`]}),`\n`,_jsx(Heading,{level:`3`,id:`addsubtree`,children:`addSubtree`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addSubtree`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Adds a `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` as the root of a subtree.\nThe world tree can be split into subtrees, each of which will have it’s dedicated\n`,_jsx(_components.em,{children:`NodeMap`}),` for optimal searching speed. A subtree does not differ structurally from\na regular node, and it does not alter the overall hierarchy of the world tree in any way.`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`node`}),`: The `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` to add as a subtree`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: void`]}),`\n`,_jsx(Heading,{level:`3`,id:`findall`,children:`findAll`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`findAll`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`predicate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SearchPredicate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Goes throught the tree starting at `,_jsx(_components.em,{children:`node`}),` if provided, otherwise at the tree `,_jsx(_components.em,{children:`root`}),`\nand runs the provided predicate for each node. All nodes which satisfy the predicate\nare returned.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Be mindful about the predicate’s contents. If the tree is very large this operation can lock the\nmain thread for too long. If you need to execute complex predicates on large trees,\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walkasync`,children:_jsx(_components.em,{children:`walkAsync`})}),` is a better candidate.`]})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`predicate`}),`: The `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#searchpredicate`,children:_jsx(_components.em,{children:`SearchPredicate`})}),`\nto run for each node`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`(optional)`}),` `,_jsx(_components.strong,{children:`node`}),`: The `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` to\nstart at. If not provided, the tree root will be used`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`[]`]}),`\n`,_jsx(Heading,{level:`3`,id:`findid`,children:`findId`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`findId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtreeId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Find a node by id. The optional `,_jsx(_components.em,{children:`subtreeId`}),` argument can narrow down the search\nto a specific subtree, otherwise it will search the entire tree. It returns an\narray of nodes because multiple nodes can have the same id, like in the case of instances.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Using this method for tree searches is encouraged because it’s accelerated by a backing `,_jsx(_components.em,{children:`NodeMap`}),`\nwhich brings down searches to just one or more lookups`]})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`id`}),`: The id of the node to search for`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`(optional)`}),` `,_jsx(_components.strong,{children:`subtreeId`}),`: The id of the subtree to search in. If `,_jsx(_components.em,{children:`undefined`}),`\nthe search will include the entire tree`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`[]`]}),`\n`,_jsx(Heading,{level:`3`,id:`getancestors`,children:`getAncestors`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getAncestors`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Gets the full list of node ancestors in hierarchical order.`}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`node`}),`: The node to search ancestors for`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`[]`]}),`\n`,_jsx(Heading,{level:`3`,id:`getinstances`,children:`getInstances`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getInstances`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtree`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`[id: string]:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Record`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, TreeNode> }`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Gets all the instances in the provided subtree id.`}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`subtree`}),`: The root subtree id`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: A dictionary where each instance id holds a record of\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` grouped by their instance unique id.`]}),`\n`,_jsx(Heading,{level:`3`,id:`getrendertree`,children:`getRenderTree`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getRenderTree`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`RenderTree`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getRenderTree`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtreeId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`RenderTree`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Gets the `,_jsx(_components.a,{href:`/developers/viewer/render-tree-api`,children:_jsx(_components.em,{children:`RenderTree`})}),` instance of the provided subtree id.\nIf the subtree id is not found, `,_jsx(_components.code,{children:`null`}),` is returned. The overloaded version with\nno argument gets the `,_jsx(_components.em,{children:`RenderTree`}),` instance for the entire tree, which can never be null.`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`subtreeId`}),`: The root subtree id`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/render-tree-api`,children:_jsx(_components.em,{children:`RenderTree`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`isroot`,children:`isRoot`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isRoot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`boolean`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Checks is a `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` is root.`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`node`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: boolean`]}),`\n`,_jsx(Heading,{level:`3`,id:`parse`,children:`parse`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Default way of creating `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`s.\nThe input model needs to follow the form.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` id: string,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` raw?: object,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` atomic?: boolean,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` children?: []`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The input `,_jsx(_components.em,{children:`model`}),` can contain virtually anything, but it should have at least the properties defined above.`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`node`}),`: `,_jsx(_components.code,{children:`{ id: string, raw?: object, atomic?: boolean, children: []}`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`purge`,children:`purge`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`purge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtreeId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Destroys part of the tree, or in the absence of a `,_jsx(_components.em,{children:`subtreeId`}),` argument, the entire tree.`]}),`\n`,_jsx(Warning,{children:`Purged trees are no longer usable!`}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`optional`}),` `,_jsx(_components.strong,{children:`subtreeId`}),`: The subtree root id. If undefined the whole tree will get purged`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: void`]}),`\n`,_jsx(Heading,{level:`3`,id:`removenode`,children:`removeNode`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`removeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Removed the provided `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),` from the tree.`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`node`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: void`]}),`\n`,_jsx(Heading,{level:`3`,id:`walk`,children:`walk`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`walk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`predicate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SearchPredicate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Walks the tree starting at `,_jsx(_components.em,{children:`node`}),` and executes the `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#searchpredicate`,children:_jsx(_components.em,{children:`SearchPredicate`})}),`\nfor each node. If `,_jsx(_components.em,{children:`node`}),` argument is undefined, walking starts at root. Walking\nis stopped when the predicate returns `,_jsx(_components.em,{children:`false`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This function is `,_jsx(_components.strong,{children:`synchronous`}),` and depending on the complexity of your\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#searchpredicate`,children:_jsx(_components.em,{children:`SearchPredicate`})}),` and the total number of\nnodes, it might block the main thread. For a heavy\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#searchpredicate`,children:_jsx(_components.em,{children:`SearchPredicate`})}),` use\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walkasync`,children:_jsx(_components.em,{children:`walkAsync`})}),`.`]})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`predicate`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#searchpredicate`,children:_jsx(_components.em,{children:`SearchPredicate`})})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`optional`}),` `,_jsx(_components.strong,{children:`node`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: void`]}),`\n`,_jsx(Heading,{level:`3`,id:`walkasync`,children:`walkAsync`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`async`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` walkAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`predicate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SearchPredicate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Promise`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`boolean`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The asynchronous version of `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walk`,children:_jsx(_components.em,{children:`walk`})}),`. The function\nwill yield for 16ms (one frame) after a cummulated 100ms spent executing. The return\npromise will resolve to a boolean which determines if the tree was completely\nwalked (true) or not (false).`]}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`predicate`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#searchpredicate`,children:_jsx(_components.em,{children:`SearchPredicate`})})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`optional`}),` `,_jsx(_components.strong,{children:`node`}),`: `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns`}),`: Promise\u003c boolean >`]}),`\n`,_jsx(Heading,{level:`2`,id:`typedefs`,children:`Typedefs`}),`\n`,_jsx(Heading,{level:`3`,id:`nodedata`,children:`NodeData`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` NodeData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` raw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { [`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`prop`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` any`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` children`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` atomic`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` boolean`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` subtreeId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` renderView`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` NodeRenderView`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instanced`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` boolean`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This is the data payload for each `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`raw`}),`: Raw from node creation with `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#parse`,children:_jsx(_components.em,{children:`parse`})})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`children`}),`: Children `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#treenode`,children:_jsx(_components.em,{children:`TreeNode`})}),`s`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`atomic`}),`: Whether this node is a complete object (true) or just part of another object (false)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`optional`}),` `,_jsx(_components.strong,{children:`subtreeId`}),`: Assigned at runtime used for search acceleration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`optional`}),` `,_jsx(_components.strong,{children:`renderView`}),`: Data required for everything rendering related`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.em,{children:`optional`}),` `,_jsx(_components.strong,{children:`instanced`}),`: Whether this node is an instance`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`searchpredicate`,children:`SearchPredicate`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SearchPredicate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`node`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TreeNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` boolean`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Delegate type used in tree’s `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#findall`,children:_jsx(_components.em,{children:`findAll`})}),`,\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walk`,children:_jsx(_components.em,{children:`walk`})}),` and\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walkasync`,children:_jsx(_components.em,{children:`walkAsync`})}),` methods.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`When using the predicate in `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#findall`,children:_jsx(_components.em,{children:`findAll`})}),` the return\nvalue detemines if the current node matche the search(`,_jsx(_components.em,{children:`true`}),`) or not(`,_jsx(_components.em,{children:`false`}),`). When using the\npredicate in `,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walk`,children:_jsx(_components.em,{children:`walk`})}),` and\n`,_jsx(_components.a,{href:`/developers/viewer/world-tree-api#walkasync`,children:_jsx(_components.em,{children:`walkAsync`})}),`, return `,_jsx(_components.em,{children:`false`}),` will stop the tree\nwalking early.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`treenode`,children:`TreeNode`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TreeNode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TreeModel`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`NodeData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Abstraction of a tree node.\nThe tree is implemented on top of an existing tree\n`,_jsx(_components.a,{href:`https://github.com/joaonuno/tree-model-js`,children:`library`}),` which defines the tree nodes\nit’s own way. At runtime the nodes will consist of:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` children`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:`childrenPropertyName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'children'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:`modelComparatorFn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`undefined`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NodeData`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` parent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TreeNode`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"WorldTree","description":"The WorldTree is a tree data structure that is used to store the scene graph.","href":"/developers/viewer/world-tree-api"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Constructors","slug":"constructors","depth":2,"children":[{"title":"constructor","slug":"constructor","depth":3,"children":[]}]},{"title":"Accessors","slug":"accessors","depth":2,"children":[{"title":"nodeCount","slug":"nodecount","depth":3,"children":[]},{"title":"root","slug":"root","depth":3,"children":[]}]},{"title":"Methods","slug":"methods","depth":2,"children":[{"title":"addNode","slug":"addnode","depth":3,"children":[]},{"title":"addSubtree","slug":"addsubtree","depth":3,"children":[]},{"title":"findAll","slug":"findall","depth":3,"children":[]},{"title":"findId","slug":"findid","depth":3,"children":[]},{"title":"getAncestors","slug":"getancestors","depth":3,"children":[]},{"title":"getInstances","slug":"getinstances","depth":3,"children":[]},{"title":"getRenderTree","slug":"getrendertree","depth":3,"children":[]},{"title":"isRoot","slug":"isroot","depth":3,"children":[]},{"title":"parse","slug":"parse","depth":3,"children":[]},{"title":"purge","slug":"purge","depth":3,"children":[]},{"title":"removeNode","slug":"removenode","depth":3,"children":[]},{"title":"walk","slug":"walk","depth":3,"children":[]},{"title":"walkAsync","slug":"walkasync","depth":3,"children":[]}]},{"title":"Typedefs","slug":"typedefs","depth":2,"children":[{"title":"NodeData","slug":"nodedata","depth":3,"children":[]},{"title":"SearchPredicate","slug":"searchpredicate","depth":3,"children":[]},{"title":"TreeNode","slug":"treenode","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/speckle/338e4d421a1293df/.omp/extensions/atlas-sync.js"],"subdomain":"speckle","siteName":"Speckle Docs","title":"WorldTree - Speckle Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-14T21:00:25.377Z","gitLastModified":"2026-07-18T12:55:16.000Z","originalFileLocation":"developers/viewer/world-tree-api.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"The WorldTree is a tree data structure that is used to store the scene graph.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Speckle Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"WorldTree - Speckle Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"The WorldTree is a tree data structure that is used to store the scene graph.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Speckle Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.speckle.systems/developers/viewer/world-tree-api\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://speckle.mintlify.site/_mintlify/api/og/v2?division=Viewer+Core\u0026amp;title=WorldTree\u0026amp;description=The+WorldTree+is+a+tree+data+structure+that+is+used+to+store+the+scene+graph.\u0026amp;theme=3e6fae5609aa483790e4f77c\u0026amp;signature=13e97540d8e8053199c1b452c7ad7237a9b8c4fbf65037599d54905d3fb9babb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"WorldTree - Speckle Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The WorldTree is a tree data structure that is used to store the scene graph.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://speckle.mintlify.site/_mintlify/api/og/v2?division=Viewer+Core\u0026amp;title=WorldTree\u0026amp;description=The+WorldTree+is+a+tree+data+structure+that+is+used+to+store+the+scene+graph.\u0026amp;theme=3e6fae5609aa483790e4f77c\u0026amp;signature=13e97540d8e8053199c1b452c7ad7237a9b8c4fbf65037599d54905d3fb9babb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/speckle/f7DEGxLA7h3Bcgui/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Speckle Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#155DFC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.speckle.systems/developers/viewer/world-tree-api\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developers/viewer/world-tree-api.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.speckle.systems/#organization\",\"name\":\"Speckle Docs\",\"url\":\"https://docs.speckle.systems\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/speckle/8FGkkbZZbcuHzOBq/logo/light.svg?fit=max\u0026auto=format\u0026n=8FGkkbZZbcuHzOBq\u0026q=85\u0026s=9fc87cac252fa8cc443a9828ecbace70\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.speckle.systems#website\",\"name\":\"Speckle Docs\",\"url\":\"https://docs.speckle.systems\",\"publisher\":{\"@id\":\"https://docs.speckle.systems/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.speckle.systems/developers/viewer/world-tree-api#webpage\",\"url\":\"https://docs.speckle.systems/developers/viewer/world-tree-api\",\"name\":\"WorldTree\",\"description\":\"The WorldTree is a tree data structure that is used to store the scene graph.\",\"dateModified\":\"2026-07-18T12:55:16.000Z\",\"isPartOf\":{\"@id\":\"https://docs.speckle.systems#website\"},\"breadcrumb\":{\"@id\":\"https://docs.speckle.systems/developers/viewer/world-tree-api#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.speckle.systems/developers/viewer/world-tree-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.speckle.systems/developers/viewer/acceleration-structure-api\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Viewer Core\",\"item\":\"https://docs.speckle.systems/developers/viewer/acceleration-structure-api\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WorldTree\",\"item\":\"https://docs.speckle.systems/developers/viewer/world-tree-api\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.speckle.systems/developers/viewer/world-tree-api#article\",\"headline\":\"WorldTree\",\"name\":\"WorldTree\",\"description\":\"The WorldTree is a tree data structure that is used to store the scene graph.\",\"url\":\"https://docs.speckle.systems/developers/viewer/world-tree-api\",\"mainEntityOfPage\":{\"@id\":\"https://docs.speckle.systems/developers/viewer/world-tree-api#webpage\"},\"dateModified\":\"2026-07-18T12:55:16.000Z\",\"publisher\":{\"@id\":\"https://docs.speckle.systems/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.speckle.systems#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Speckle Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Speckle Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/developers/viewer/world-tree-api.md","siteName":"Speckle Docs","nav":{"global":null,"dropdowns":[{"dropdown":"User Guides","icon":"book-open","groups":[{"group":"Quick Reference","pages":[{"title":"Welcome to Speckle","sidebarTitle":"Welcome","href":"/quickstart/welcome"},{"title":"Speckle's new data model: what has changed for you","sidebarTitle":"Data model migration","href":"/workspaces/data-model-migration"},{"title":"Quickstart Guide","href":"/quickstart/quickstart"},{"title":"Frequently Asked Questions","href":"/quickstart/faq"},{"title":"What's new in 2026.9 for workspace users","sidebarTitle":"What's new","href":"/whats-new/users"}]},{"group":"Your Speckle Workspace","pages":[{"title":"Organize teams and projects","sidebarTitle":"Overview","href":"/workspaces/introduction"},{"group":"Projects, Models, and Versions","pages":[{"title":"Projects","href":"/workspaces/projects"},{"title":"Models","href":"/workspaces/models"},{"title":"Version Control","href":"/workspaces/versions"}]},{"group":"Access and Identity","pages":[{"title":"Roles and permissions","href":"/workspaces/roles-and-seats"},{"title":"Invite to Workspace","href":"/workspaces/inviting"},{"title":"Workspace Discoverability","href":"/workspaces/workspace-discoverability"},{"title":"Domain Protection","href":"/workspaces/domain-protection"},{"title":"Single Sign-On (SSO)","tag":"Enterprise","href":"/workspaces/sso"},{"title":"User provisioning (SCIM)","sidebarTitle":"Provisioning (SCIM)","tag":"Enterprise","href":"/workspaces/scim"}]},{"group":"Plans and Governance","pages":[{"title":"Plans and Governance","sidebarTitle":"Overview","href":"/workspaces/plans-and-governance"},{"title":"Billing","href":"/workspaces/billing"},{"title":"Data Residency","tag":"Enterprise","href":"/workspaces/data-residency"}]},{"group":"Configuration","pages":[{"title":"Configuration","href":"/workspaces/configuration"},{"title":"Check workspace activity, plan limits, and AI spend","sidebarTitle":"Usage","href":"/workspaces/usage"},{"title":"Project metadata","tag":"Enterprise","href":"/workspaces/configuration/project-metadata"}]}]},{"group":"Viewing \u0026 Sharing","pages":[{"title":"Open and explore models in the 3D viewer","sidebarTitle":"Overview","href":"/3d-viewer/introduction"},{"title":"Interface and navigation","href":"/3d-viewer/interface-nav"},{"group":"Inspect and Compare","pages":[{"title":"Filter, browse, and measure your model","sidebarTitle":"Exploration","href":"/3d-viewer/exploration"},{"title":"Compare versions","href":"/3d-viewer/compare-versions"},{"title":"Combine models in one scene","sidebarTitle":"Model federation","href":"/3d-viewer/federation"}]},{"group":"Feedback and Tracking","pages":[{"title":"Issues","href":"/3d-viewer/issues"},{"title":"Sketch on your model","sidebarTitle":"Sketch","href":"/3d-viewer/markups"},{"title":"Saved views","href":"/3d-viewer/saved-views"}]},{"group":"Present and Share","pages":[{"title":"Present a model with saved views","sidebarTitle":"Presentation","href":"/3d-viewer/presentation"},{"title":"Share your models","href":"/3d-viewer/sharing"}]}]},{"group":"Publishing \u0026 Loading","pages":[{"title":"Connectors, cloud integrations, and file uploads","sidebarTitle":"Overview","href":"/connectors/overview"},{"group":"Connectors","pages":[{"title":"Installing Connectors","href":"/connectors/installation"},{"title":"Connector Assets \u0026 Templates","sidebarTitle":"Assets \u0026 Templates","href":"/connectors/assets"},{"group":"Revit","pages":[{"title":"How to use Speckle for Revit","sidebarTitle":"Quickstart","href":"/connectors/revit/revit"},{"title":"Loading blocks as families in Revit","sidebarTitle":"Blocks as Families","href":"/connectors/revit/blocks-to-families"}]},{"group":"Rhino","pages":[{"title":"How to use Speckle for Rhino","sidebarTitle":"Quickstart","href":"/connectors/rhino/rhino"},{"title":"Revit Categorization","href":"/connectors/rhino/rhino-revit"},{"title":"RhinoInside","sidebarTitle":"RhinoInside","href":"/connectors/grasshopper/grasshopper-integrations"}]},{"group":"Grasshopper","pages":[{"title":"How to use Speckle for Grasshopper","sidebarTitle":"Quickstart","href":"/connectors/grasshopper/grasshopper"},{"title":"Explore what an object is connected to","sidebarTitle":"Explore","href":"/connectors/grasshopper/explore"},{"title":"Models","href":"/connectors/grasshopper/grasshopper-models"},{"title":"Collections","href":"/connectors/grasshopper/grasshopper-collections"},{"title":"Objects","href":"/connectors/grasshopper/grasshopper-objects"},{"title":"Properties","href":"/connectors/grasshopper/grasshopper-properties"},{"title":"Developer Nodes","href":"/connectors/grasshopper/grasshopper-developer"},{"title":"Recommendations","href":"/connectors/grasshopper/grasshopper-recommendations"},{"title":"Karamba3D","sidebarTitle":"Karamba3D","tag":"Third-Party","href":"/connectors/third-party/karamba3d"},{"title":"ShapeDiver","sidebarTitle":"ShapeDiver","tag":"Third-Party","href":"/connectors/third-party/shapediver"}]},{"title":"How to use Speckle for SketchUp","sidebarTitle":"SketchUp","href":"/connectors/sketchup"},{"group":"Power BI","pages":[{"title":"How to use Speckle for Power BI","sidebarTitle":"Quickstart","href":"/connectors/power-bi/power-bi"},{"title":"Power BI Data Gateway","sidebarTitle":"Data Gateway","href":"/connectors/power-bi/gateway"}]},{"title":"How to use Speckle for Archicad","sidebarTitle":"Archicad","href":"/connectors/archicad"},{"title":"Publish Navisworks models to Speckle","sidebarTitle":"Navisworks","href":"/connectors/navisworks"},{"title":"How to use Speckle for Blender","sidebarTitle":"Blender","href":"/connectors/blender"},{"title":"How to use Speckle for Civil 3D","sidebarTitle":"Civil 3D","href":"/connectors/civil3d"},{"title":"How to use Speckle for Plant 3D","sidebarTitle":"Plant 3D","href":"/connectors/plant3d"},{"title":"How to use Speckle for AutoCAD","sidebarTitle":"AutoCAD","href":"/connectors/autocad"},{"title":"How to use Speckle for ETABS","sidebarTitle":"ETABS","href":"/connectors/etabs"},{"title":"How to use Speckle for Tekla Structures","sidebarTitle":"Tekla Structures","href":"/connectors/teklastructures"},{"title":"How to use Speckle for Vectorworks","sidebarTitle":"Vectorworks","tag":"Third-Party","href":"/connectors/third-party/vectorworks"}]},{"group":"Cloud Integrations","pages":[{"title":"Autodesk Forma Data Management","sidebarTitle":"Forma Data Management (ACC)","tag":"Enterprise","href":"/connectors/cloud-integrations/acc"},{"title":"Sync models from Trimble Connect","sidebarTitle":"Trimble Connect","tag":"Enterprise","href":"/connectors/cloud-integrations/trimble-connect"},{"title":"Sync models from SharePoint","sidebarTitle":"SharePoint","href":"/connectors/cloud-integrations/sharepoint"},{"title":"Bentley ProjectWise","sidebarTitle":"Bentley ProjectWise","tag":"Enterprise","href":"/connectors/cloud-integrations/projectwise"},{"title":"Databricks","sidebarTitle":"Databricks","href":"/connectors/cloud-integrations/databricks"},{"title":"Snowflake","sidebarTitle":"Snowflake","href":"/connectors/cloud-integrations/snowflake"}]},{"title":"Direct uploads","href":"/connectors/direct-uploads/introduction"}]},{"group":"Analytics \u0026 Intelligence","pages":[{"group":"Intelligence","pages":[{"title":"Ask questions about your models with Speckle Intelligence","sidebarTitle":"Speckle Intelligence","href":"/analytics/intelligence"},{"title":"Reuse organisation playbooks with Intelligence skills","sidebarTitle":"Skills","href":"/analytics/intelligence-skills"},{"title":"Set standing AI Rules for the workspace","sidebarTitle":"AI Rules","href":"/analytics/intelligence-rules"},{"title":"Create and share Intelligence Reports","sidebarTitle":"Reports","href":"/analytics/reports"}]},{"group":"Dashboards","pages":[{"title":"Intelligence Dashboards","sidebarTitle":"Overview","href":"/analytics/intelligence-dashboards"},{"title":"Retired and replaced dashboard widgets","sidebarTitle":"Widget availability","href":"/analytics/dashboards-widget-availability"},{"title":"Layout","sidebarTitle":"Layout","href":"/analytics/dashboards/layout"},{"title":"Sharing","sidebarTitle":"Sharing","href":"/analytics/dashboards/sharing"},{"title":"Filters","sidebarTitle":"Filters","href":"/analytics/dashboards/filters"},{"title":"Lookup tables","sidebarTitle":"Lookup tables","href":"/analytics/dashboards/lookup-tables"},{"title":"Calculated fields","sidebarTitle":"Calculated fields","href":"/analytics/dashboards/calculated-fields"},{"title":"Common workflows","sidebarTitle":"Common workflows","href":"/analytics/dashboards/common-workflows"}]},{"group":"Data Validation","pages":[{"title":"Data Validation","sidebarTitle":"Overview","href":"/analytics/data-validation/overview"},{"title":"Checks","sidebarTitle":"Checks","href":"/analytics/data-validation/checks"},{"title":"Project standards","sidebarTitle":"Standards","href":"/analytics/data-validation/standards"},{"title":"Viewing Results","sidebarTitle":"Viewing Results","href":"/analytics/data-validation/viewing-results"},{"title":"Validation Widgets in Dashboards","sidebarTitle":"Validation Widgets","href":"/analytics/dashboards/validation-widgets"}]},{"group":"Data Conditioning","pages":[{"title":"Update parameters from the model viewer","sidebarTitle":"Parameter Updater","href":"/beta/parameter-updater"}]}]},{"group":"Workflows","pages":[{"title":"Combine capabilities into outcomes","sidebarTitle":"Overview","href":"/workflows/overview"},{"title":"Assess model changes with Speckle Intelligence","sidebarTitle":"Compare versions with Intelligence","href":"/workflows/assess-model-changes"},{"title":"Take off quantities and cost with Speckle Intelligence","sidebarTitle":"Quantity \u0026 cost takeoff","href":"/workflows/take-off-quantities"},{"title":"Benchmark a project against your portfolio with Speckle Intelligence","sidebarTitle":"Portfolio benchmarking","href":"/workflows/benchmark-against-your-portfolio"},{"title":"Validate incoming models automatically","sidebarTitle":"Automatic model validation","href":"/workflows/validate-incoming-models-automatically"},{"title":"Design review workflow","sidebarTitle":"Design Review","href":"/workflows/design-review-workflow"},{"title":"Componentised Grasshopper workflow","sidebarTitle":"Grasshopper","href":"/workflows/grasshopper-componentised-workflow"},{"title":"Compare parametric design options from Grasshopper","sidebarTitle":"Design Explorer","href":"/workflows/grasshopper-design-explorer"},{"title":"Extract Revit room data with SpecklePy","sidebarTitle":"Revit room data extraction","href":"/workflows/revit-room-data-extraction-specklepy"},{"title":"Analyse model data with SpecklePy and DuckDB","sidebarTitle":"SpecklePy analytics","href":"/workflows/specklepy-model-data-analytics"}]}],"global":{"anchors":[]}},{"dropdown":"Developers","icon":"code","tabs":[{"tab":"Build with Speckle","pages":[{"title":"Build with Speckle","href":"/developers/introduction"}]},{"tab":"Data Schema","pages":[{"title":"Data Schema","href":"/developers/object-model/overview"}]},{"tab":"Interfaces","pages":[{"title":"Interfaces","href":"/developers/api/graphql"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/developers/sdks/introduction"}]},{"tab":"Viewer","groups":[{"group":"Speckle Viewer","pages":[{"title":"Developers Guide","sidebarTitle":"Getting Started","href":"/developers/viewer/introduction"},{"title":"Load a bundle in your Viewer app","sidebarTitle":"Loading bundles","href":"/developers/viewer/loading-bundles"},{"title":"Installation","href":"/developers/viewer/installation"},{"title":"Basic Setup","href":"/developers/viewer/basic-setup"},{"title":"Advanced Setup","href":"/developers/viewer/advanced-setup"}]},{"group":"Core Concepts","pages":[{"title":"3D Viewer","href":"/developers/viewer/overview"},{"title":"Data Tree","href":"/developers/viewer/viewer-data"},{"title":"Rendering","href":"/developers/viewer/viewer-rendering"},{"title":"Loaders","href":"/developers/viewer/loaders"}]},{"group":"API Reference","pages":[{"group":"Viewer Core","pages":[{"title":"AccelerationStructure","href":"/developers/viewer/acceleration-structure-api"},{"title":"Batch","href":"/developers/viewer/batch-api"},{"title":"BatchObject","href":"/developers/viewer/batch-object-api"},{"title":"GeometryConverter","href":"/developers/viewer/geometry-converter-api"},{"title":"Input","href":"/developers/viewer/input-api"},{"title":"Intersections","href":"/developers/viewer/intersections-api"},{"title":"Loader","href":"/developers/viewer/loader-api"},{"title":"Queries","href":"/developers/viewer/queries-api"},{"title":"NodeRenderView","href":"/developers/viewer/render-view-api"},{"title":"RenderTree","href":"/developers/viewer/render-tree-api"},{"group":"Rendering Pipelines","pages":[{"title":"Pipeline","href":"/developers/viewer/rendering-pipeline-api/pipeline-api"},{"title":"ProgressivePipeline","href":"/developers/viewer/rendering-pipeline-api/progressive-pipeline-api"},{"title":"GPass","href":"/developers/viewer/rendering-pipeline-api/g-pass-api"},{"title":"BaseGPass","href":"/developers/viewer/rendering-pipeline-api/base-g-pass-api"},{"title":"ProgressiveGPass","href":"/developers/viewer/rendering-pipeline-api/progressive-g-pass-api"}]},{"title":"SpeckleMaterial","href":"/developers/viewer/speckle-material-api"},{"title":"SpeckleRenderer","href":"/developers/viewer/speckle-renderer-api"},{"title":"TopLevelAccelerationStructure","href":"/developers/viewer/top-level-acceleration-structure-api"},{"title":"Viewer","description":"The Speckle Viewer API","href":"/developers/viewer/viewer-api"},{"title":"WorldTree","href":"/developers/viewer/world-tree-api"}]},{"group":"Extensions","pages":[{"title":"Extension","description":"Base class for all extensions. Extensions are created via [_createExtension_](/developers/viewer/viewer-api#createextension) method from the viewer instance.","href":"/developers/viewer/extensions/extension-api"},{"title":"CameraController","href":"/developers/viewer/extensions/camera-controller-api"},{"title":"DifExtension","href":"/developers/viewer/extensions/diff-extension-api"},{"title":"FilteringExtension","href":"/developers/viewer/extensions/filtering-extension-api"},{"title":"MeasurementsTool","href":"/developers/viewer/extensions/measurements-tool-api"},{"title":"SelectionExtension","href":"/developers/viewer/extensions/selection-extension-api"},{"title":"SectionTool","href":"/developers/viewer/extensions/section-tool-api"},{"title":"SectionToolOutlines","href":"/developers/viewer/extensions/section-tool-outlines-api"},{"title":"SpeckleControls","href":"/developers/viewer/extensions/speckle-controls-api"},{"title":"SmoothOrbitControls","href":"/developers/viewer/extensions/smooth-orbit-controls-api"},{"title":"ViewModes","href":"/developers/viewer/extensions/view-modes-api"}]}]},{"group":"Examples","pages":[{"title":"Basic Example","href":"/developers/viewer/examples/basic-example"},{"title":"More Extensions","href":"/developers/viewer/examples/more-extensions-example"},{"title":"Filtering","href":"/developers/viewer/examples/filtering-example"},{"title":"Loading Data","href":"/developers/viewer/examples/loading-example"},{"title":"Object Manipulation","href":"/developers/viewer/examples/object-manipulation-example"},{"title":"Box Selection","href":"/developers/viewer/examples/box-selection-example"},{"title":"Animation \u0026 Custom Text","href":"/developers/viewer/examples/categorize-example"}]},{"group":"Reference","pages":[{"title":"Migration Guide","href":"/developers/viewer/migration-guide"},{"title":"Backwards Compatibility","href":"/developers/viewer/migration-guide-compatibility"},{"title":"API 1.0 Full Migration","href":"/developers/viewer/migration-guide-v1"}]}]},{"tab":"Server","pages":[{"title":"Server","href":"/developers/server/introduction"}]},{"tab":"Automate","pages":[{"title":"Automate","href":"/developers/automate/introduction"}]}],"global":{"anchors":[]}},{"dropdown":"IT Administrators","icon":"wrench","groups":[{"group":"Deployment \u0026 Maintenance","pages":[{"title":"IT setup guide","href":"/it-admin/setup"},{"title":"Keep connectors current across your estate","sidebarTitle":"Connector updates","href":"/it-admin/connector-updates"},{"title":"Security","href":"/it-admin/security"},{"group":"Cloud Integrations","pages":[{"title":"Cloud Integrations: Access and Governance","sidebarTitle":"Introduction","href":"/it-admin/integrations/introduction"},{"title":"Enable Autodesk Forma Data Management integration","sidebarTitle":"Forma Data Management (ACC)","tag":"Enterprise","href":"/it-admin/integrations/acc"},{"title":"Configure Bentley ProjectWise Integration","sidebarTitle":"Bentley ProjectWise","tag":"Enterprise","href":"/it-admin/integrations/projectwise"},{"title":"Approve Speckle for SharePoint","sidebarTitle":"SharePoint","href":"/it-admin/integrations/sharepoint"},{"title":"Enable Databricks Integration","sidebarTitle":"Databricks","href":"/it-admin/integrations/databricks"},{"title":"Enable Snowflake Integration","sidebarTitle":"Snowflake","href":"/it-admin/integrations/snowflake"}]},{"title":"Admin Support Mode","href":"/it-admin/support-mode"},{"title":"Archive and unarchive projects","sidebarTitle":"Project Archival","tag":"Enterprise","href":"/it-admin/archived-projects"},{"title":"What's new in 2026.9 for IT admins","sidebarTitle":"What's new","href":"/whats-new/it-admins"}]},{"group":"Manual Connector Installation","pages":[{"title":"Manual installation","sidebarTitle":"Overview","href":"/connectors/manual-installation/introduction"},{"title":"Desktop Services","sidebarTitle":"Desktop Services (deprecated)","href":"/connectors/manual-installation/desktop-services"},{"title":"Archicad","href":"/connectors/manual-installation/archicad"},{"title":"AutoCAD","href":"/connectors/manual-installation/autocad"},{"title":"Blender","href":"/connectors/manual-installation/blender"},{"title":"Civil 3D","href":"/connectors/manual-installation/civil3d"},{"title":"ETABS","href":"/connectors/manual-installation/etabs"},{"title":"Navisworks","href":"/connectors/manual-installation/navisworks"},{"title":"Power BI","href":"/connectors/manual-installation/powerbi"},{"title":"Revit","href":"/connectors/manual-installation/revit"},{"title":"Rhino \u0026 Grasshopper","href":"/connectors/manual-installation/rhino-grasshopper"},{"title":"SketchUp","href":"/connectors/manual-installation/sketchup"},{"title":"Tekla Structures","href":"/connectors/manual-installation/teklastructures"}]}],"global":{"anchors":[]}},{"dropdown":"Get Involved","icon":"users","groups":[{"group":"Ways to get involved","pages":[{"title":"User testing and feedback","sidebarTitle":"User Testing","href":"/get-involved/user-testing"},{"title":"Join the Speckle Community","sidebarTitle":"Community","href":"/get-involved/community"},{"title":"Open source at Speckle","sidebarTitle":"Open source","href":"/get-involved/open-source"}]}],"global":{"anchors":[]}},{"dropdown":"Changelog","icon":"history","pages":[{"title":"Changelog — November 2026","sidebarTitle":"November 2026","href":"/technical-changelog/2026-11"},{"title":"Changelog — October 2026","sidebarTitle":"October 2026","href":"/technical-changelog/2026-10"},{"title":"Changelog — September 2026","sidebarTitle":"September 2026","href":"/technical-changelog/2026-09"}],"global":{"anchors":[]}}]},"basePath":"","title":"WorldTree - Speckle Docs","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":[],"chunks":[]}