UNPKG
glam
Version:
latest (5.0.1)
5.0.1
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.0.0
2.1.1
2.0.0
1.0.0
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.0
Experimental WebGL Engine
github.com/glamjs/glam
glamjs/glam
glam
/
lib
/
scene
/
node
/
is-rooted.js
11 lines
(8 loc)
•
225 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
default
function
isRooted
(
scene, graph, node
) {
// Walk up and see if the root node is the scene
do
{ node = graph.
parent
.
get
( node ) }
while
( node !== scene && node !==
undefined
)
return
scene === node }