extendPreset
extendPreset(basePreset : PhysicsModel, overrides : Object) : PhysicsModelExtends a base physics preset with custom overrides. Allows users to modify specific behaviors while inheriting the rest.
Parameters
basePresetPhysicsModelThe preset to extend.
overridesObjectPartial PhysicsModel properties to override.
Returns
PhysicsModel — The extended preset.Example
import { extendPreset, DefaultModel } from '@three-blocks/pro';
const custom = extendPreset( DefaultModel, {
name: 'custom-default',
config: { ...DefaultModel.config, jumpVelocity: 12 },
} );