Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
543 views
in Technique[技术] by (71.8m points)

webpack图片能加载,能在本地加载服务器,但是map纹理图片还是不能映射,本人小白

现在图片可以加载,但是还是不能显示,我把loadTexture里面的图片路径写成绝对路径也不行 我试着换了其他图片但是还不起作用,不是图片问题,THREE.TextureLoader写法也是对的啊图片描述

图片描述


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

这两天有空我就想这个问题,既然本地服务器能够获取到图片为什么不能显示
然后有了收获,map is not defined
于是干脆把 map:THREE.ImageUtils.loadTexture(texture)写到里面,奇迹发生了图片描述


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...