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.
我正在使用matter.js 在p5.js 中制作弹弓游戏,我遇到了一个问题,每次两个非静态物体碰撞时程序和窗口都会崩溃。
程序运行时,控制台显示错误信息;You just changed the value of "scale", which was a p5 function. This could cause problems later if you're not careful.
You just changed the value of "scale", which was a p5 function. This could cause problems later if you're not careful.
此错误消息可能意味着什么?
我的猜测是你正在做这样的事情:
scale = 42;
你不应该这样做,因为scale它已经是 P5.js 中的一个函数。
scale
不过,我认为这不会使您的整个浏览器崩溃。请发布重现问题的MCVE。