Skip to content

Commit

Permalink
Use null instead of an object with undefined properties
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Antonio Pisano committed Oct 12, 2023
1 parent f4c2b63 commit 6c03717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/body/ammo-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit 6c03717

Please sign in to comment.