Disable pointer constraint debug by default

This commit is contained in:
Richard Davey 2018-04-13 17:43:44 +01:00
parent 7aad8afa02
commit be29c69a8c

View file

@ -511,6 +511,13 @@ var Factory = new Class({
*/ */
pointerConstraint: function (options) pointerConstraint: function (options)
{ {
if (options === undefined) { options = {} };
if (!options.hasOwnProperty('render'))
{
options.render = { visible: false };
}
var pointerConstraint = new PointerConstraint(this.scene, this.world, options); var pointerConstraint = new PointerConstraint(this.scene, this.world, options);
this.world.add(pointerConstraint.constraint); this.world.add(pointerConstraint.constraint);