cuixueying 官方给出这样的回答:The debug renderer doesn't currently support zIndex I'm afraid. I'd accept a pull request though. You'd need to add body.render.zIndex, and inside Matter.Render create a buffer and add all constraints and bodies, then sort by it. It should probably be an opt-in option though as it would be reasonably intensive (unless you do some special optimisations), it would also break some of the optimisations for wireframe mode (which need to continue working).
但我还是不知道如何实现,能帮忙看下吗?多谢