Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道任何地方是否有 CTMLoader 进度脚本?或者有人可以指出我建造一个正确的方向吗?就像加载器内部的哪个位置我可以实现进度调用一样?
我在任何地方都没有找到任何示例,但我只是在自己的应用程序中实现了它。只需将 .onprogress 添加到 xhr 即可。我在 CTMLoader.js 的第 100 行添加了这个:
xhr.onprogress = function(progressEvent) { console.log('Progress: ' + (progressEvent.total / progressEvent.loaded)) };