From 6c037175af3446d3721715eab36f1ad808aa7c86 Mon Sep 17 00:00:00 2001 From: Antonio Pisano Date: Thu, 12 Oct 2023 14:20:18 +0200 Subject: [PATCH] Use null instead of an object with undefined properties This will be coalesced to an empty object, which keeps the expected behavior. The previous default would trigger a warning in the console about it not being conform to the vec3 property type definition. --- src/components/body/ammo-body.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/body/ammo-body.js b/src/components/body/ammo-body.js index 0e83dd7..3725333 100644 --- a/src/components/body/ammo-body.js +++ b/src/components/body/ammo-body.js @@ -46,7 +46,7 @@ let AmmoBody = { schema: { loadedEvent: { default: "" }, mass: { default: 1 }, - gravity: { type: "vec3", default: { x: undefined, y: undefined, z: undefined } }, + gravity: { type: "vec3", default: null }, linearDamping: { default: 0.01 }, angularDamping: { default: 0.01 }, linearSleepingThreshold: { default: 1.6 },