Phaser API Documentation

  Version: 
<static> MergeRight(obj1, obj2)

Description:

Creates a new Object using all values from obj1.

Then scans obj2. If a property is found in obj2 that also exists in obj1, the value from obj2 is used, otherwise the property is skipped.

Parameters:

name type description
obj1 object

The first object to merge.

obj2 object

The second object to merge. Keys from this object which also exist in obj1 will be copied to obj1.

Returns:
Description:

The merged object. obj1 and obj2 are not modified.

Type:
  • object
Since: 3.0.0