Open 1455667325 opened 4 years ago
I am having the same issue, what is the problem?
It's sad ,I am having doing it for a week.and not any progress
This appears more related to threejs and possibly outside of the scope of this library. Are you able to have your example run fine in a regular three scene, but not in myGraph.scene()
?
Also could you reproduce your issue on https://codepen.io/ or similar?
hello, has any way to create a new mesh after loading a madel and then the new mesh use geomery and material in mesh. for example:
var loader = new ColladaLoader();
loader.load('./collada/elf.dae', function (collada, ) {
var model_geometry = collada.scene.children[0].geometry;
var model_material = collada.scene.children[0].material;
let mesh = new THREE.Mesh(model_geometry,model_material)
console.log(mesh)
});
and then, I get a bad mesh and can't use it in scene; I want to use the material in the model ,not create that in myself. because I want to use a model as a node in Graph(), thanks.
try something like this
const model = data.scene.children[0];
model.material.customProgramCacheKey = () => {}
model.geometry.hasAttribute = () => {}
worked for me
loader.load('./collada/elf.dae', function (collada) { let col = collada.scene; console.log(col) Graph.scene().add(col); })
Failed by three.js:19132 Uncaught TypeError: material.customProgramCacheKey is not a function the model is OK, and how can I do it?