我正在尝试将来自Turbosquid的this asset渲染为Viro3DObject。虽然我可以渲染和定位它,但是它似乎并没有使用提供的纹理。在这里,我使用一个节点来显示一些带有对象的文本
<ViroNode position={[0, -1, 0]} dragType="FixedDistance" onDrag={() => {}}>
<ViroText
text={this.state.text}
scale={[0.5, 0.5, 0.5]}
position={[0, 0, -1]}
style={styles.helloWorldTextStyle}
/>
<Viro3DObject
source={require("./res/sword/SwordMinecraft.obj")}
resources={[
require("./res/sword/SwordMinecraft.mtl"),
require("./res/sword/Blue1.png"),
require("./res/sword/Blue2.png"),
require("./res/sword/Blue3.png"),
require("./res/sword/Blue4.png"),
require("./res/sword/Blue5.png"),
require("./res/sword/Blue6.png"),
require("./res/sword/Wood1.png"),
require("./res/sword/Wood2.png"),
require("./res/sword/Wood3.png"),
require("./res/sword/Wood4.png"),
]}
type="OBJ"
position={[0.1, -0.5, -2]}
scale={[0.03, 0.03, 0.03]}
rotation={[90, 0, 0]}
animation={{ name: "hover", run: true, loop: true }}
/>
</ViroNode>;
在加载应用程序时会显示一条错误消息
Error: ENOENT: no such file or directory, scandir '/home/jeremy/Documents/Programming/ViroSample/js/res/sword/C:/Users/kakamaka/Desktop/TurboSquid/Minecraft/SabieDiamant/Textures'
这是否意味着缺少应随资产提供的文件? (仅提供10个+ OBJ和.mtl)