- xr-frame贴图平铺效果无法显示,请问是什么原因呢?
await scene.assets.loadAsset({ type: 'texture', assetId: 'arrow_png', src: '', options: { wrapU: 1, wrapV: 1 } }); const arrowMat = scene.createMaterial( // 使用定制的效果 scene.assets.getAsset('effect', 'standard'), { u_baseColorMap: scene.assets.getAsset('texture', 'arrow_png') } ); scene.assets.addAsset('material', "arrow-mat", arrowMat) const arrow = scene.createElement(xrFrameSystem.XRMesh, { geometry: "plane", material: "arrow-mat", }); root.addChild(arrow);
2023-10-24 - xr-frame无法实现纹理平铺,代码如下,麻烦帮看下问题在哪?
await scene.assets.loadAsset({ type: 'texture', assetId: 'arrow_png', src: '', options: { wrapU: 1, wrapV: 1 } }); const arrowMat = scene.createMaterial( // 使用定制的效果 scene.assets.getAsset('effect', 'standard'), { u_baseColorMap: scene.assets.getAsset('texture', 'arrow_png') } ); scene.assets.addAsset('material', "arrow-mat", arrowMat) const arrow = scene.createElement(xrFrameSystem.XRMesh, { geometry: "plane", material: "arrow-mat", }); root.addChild(arrow);
2023-10-24