Property nodes does not exist on type GLTF #916
Unanswered
SiegeSailor
asked this question in
Q&A
Replies: 2 comments 6 replies
-
Not sure this is the answer you're looking for, but if you use the |
Beta Was this translation helpful? Give feedback.
6 replies
-
kinda late, but this is what I did and it works for me. import { GLTF } from "three-stdlib";
type GLTFResult = GLTF & {
nodes: {
rocket_body_Mat_0: THREE.Mesh;
rocket_body_Mat2_0: THREE.Mesh;
rocket_body_Mat3_0: THREE.Mesh;
Subdivision_Surface_Mat3_0: THREE.Mesh;
Subdivision_Surface_Mat3_0_1: THREE.Mesh;
window_1_Mat4_0: THREE.Mesh;
st_1_Mat6_0: THREE.Mesh;
};
materials: {};
}; note // on first line of nodes I wrote
rocket_body_Mat_0 : THREE.Mesh
/* because in my gltf file when I go down to nodes I find */
{
"name": "rocket_body_Mat_0",
"mesh": 0
}
/* also */
// only select the names which have mesh key property, don't select the ones with children or matrix key. like this
{
"name": "Rocket simple.fbx",
"children": [
11
],
"matrix": [
1,
0,
0,
0,
0,
3.422854177870249e-8,
0.9999999403953552,
0,
0,
-0.9999999403953552,
3.422854177870249e-8,
0,
0,
0,
0,
1
]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am quite new to the ThreeJS world, studying from the examples. I wanted to import a model with mapped skin, then I saw the usage of
nodes
from this react-three-fiber-example, But it seems incorrect with types. Please take a look at this.After going through ThreeJS Document#GLTFLoader, I haven't found any documented way of using
nodes
, I will continue searching for the correct/other ways of applying skin/material to models. But so far I think the propertynodes
should be added to typeGLTF
even though we can still getnodes
by the following method.Package Version
Beta Was this translation helpful? Give feedback.
All reactions