标签: javascript p5.js matter.js
我正在使用something.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.
此错误消息表示什么?
答案 0 :(得分:0)
我的猜测是您正在执行以下操作:
scale = 42;
您不应该这样做,因为scale已经是P5.js中的函数。
scale
我认为这不会使您的整个浏览器崩溃。请发布MCVE来重现该问题。