2

three.js调优之贴图初始化

 1 year ago
source link: https://www.msy.plus/2022/01/15/three-tuning-init-texture/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

three.js调优之贴图初始化

发表于2022-01-14更新于2023-05-04字数统计135阅读次数97阅读次数4
threejs-logo.png

three.js的Texture类其实不会把贴图放入缓冲区,只是存储了贴图的一系列信息。

通常情况下都是制作好模型和对应的贴图然后放入场景中等待被渲染。但这次的场景是一个模型对应多个贴图,在运行时切换贴图会有卡顿。

three.js的Texture类其实只是存储了贴图的相关信息,在渲染时才会将贴图放入到缓冲区中。

renderer.initTexture(texture);

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK