有人知道如何从3d模型中获取storageID吗?似乎有一个这样的方法,但它总是告诉我无效的url。谢谢!
io3d.storage.getIdFromUrl('https://spaces.archilogic.com/3d/Home_2766/grrodvuu?modelResourceId=cd36dc78-a124-4a4e-9990-35be32415f84')发布于 2018-02-16 00:51:43
我假设您正在查找整个烘焙模型的存储ID?
在这种情况下,您可以使用场景API查找具有bakedModelUrl的子对象,该use是模型的存储ID:
// this is the modelResourceId from the URL you gave in your question
io3d.scene.getStructure('cd36dc78-a124-4a4e-9990-35be32415f84')
// we select the children
.then(scene => scene.children)
// find the child that has a bakedModelUrl
.then(children => children.find(child => child.bakedModelUrl))
// read the bakedModelUrl
.then(level => level.bakedModelUrl)
// and log it (or do whatever you need to do with it)
.then(console.log)https://stackoverflow.com/questions/48811840
复制相似问题