default
TypeScriptstatic get default(): Promise<PhysicsMaterialResource>Swift declaration@MainActor @preconcurrency static let `default`: PhysicsMaterialResourceA default material resource.
class · iOS 13.0+ · SDK 27.1
@MainActor @preconcurrency class PhysicsMaterialResourceMaterial properties, like friction, of a physically simulated object.
static get default(): Promise<PhysicsMaterialResource>Swift declaration@MainActor @preconcurrency static let `default`: PhysicsMaterialResourceA default material resource.
static generateStaticFrictionDynamicFrictionRestitution(staticFriction: number, dynamicFriction: number, restitution: number): Promise<PhysicsMaterialResource>Swift declaration@MainActor @preconcurrency static func generate(staticFriction: Float, dynamicFriction: Float, restitution: Float) -> PhysicsMaterialResourceCreates a new material with the specified static friction, dynamic friction, and restitution. - Parameters: - staticFriction: The static (stationary) friction coefficient in the range [0, ∞). - dynamicFriction: The dynamic (moving) friction coefficient in the range [0, ∞). - restitution: The coefficient of restitution (bounciness) in the range [0, 1].
static generateFrictionRestitution(friction?: number, restitution?: number): Promise<PhysicsMaterialResource>Swift declaration@MainActor @preconcurrency static func generate(friction: Float = 0.8, restitution: Float = 0.8) -> PhysicsMaterialResourceGenerates a new material with the given characteristics. - Parameters: - friction: The coefficient of friction, in the range `[0, infinity)`. - restitution: The coefficient of restitution, in the range `[0, 1]`. Use values at the high end of the range to indicate materials that experience elastic collisions, meaning that objects bounce off each other and kinetic energy is conserved after a collision. Use low values to indicate materials that lose kinetic energy when they collide. - Returns: A physics material resource.
No declarations were skipped in this snapshot.