import { Component } from '@zcomponent/core'; import { ContextManager, Observable } from '@zcomponent/core'; import { CombineMode } from '../index'; /** * A collider that uses a shape to define its collision volume. * This collider should be child of a RigidBody. * @zcomponent * @zgroup Physics * @zicon science * @zparents three/Object3D/Group/Physics/Collider */ export declare class PhysicsMaterial extends Component { props: {}; defaultMaterial: boolean; constructor(ctx: ContextManager, props: {}); /** * Sets the restitution of the physics material. * * The restitution is a factor which describes, the amount of energy that is retained after a collision, * which should be a number between 0 and 1.. * * A restitution of 0 means that no energy is retained and the objects will not bounce off each other, * while a restitution of 1 means that all energy is retained and the objects will bounce. * * Note, though, due that due to the simulation implementation, an object with a restitution of 1 may * still lose energy over time. * * If not provided, a default value of 0 will be used. * @zprop * @zdefault 0 * @ztype proportion */ bounciness: Observable; /** * Describes how two different restitution values should be combined. * * When each PhysicsMaterial specifies a different combine mode for some property, the combine mode which * * GEOMETRIC_MEAN - The final value will be the geometric mean of the two values: sqrt(valueA * valueB). * * MINIMUM - The final value will be the smaller of the two: min(valueA, valueB). * * MAXIMUM - The final value will be the larger of the two: max(valueA, valueB). * * ARITHMETIC_MEAN - The final value will be the arithmetic mean of the two values: (valueA + valueB) / 2. * * MULTIPLY - The final value will be the product of the two values: valueA * valueB. * * @zprop * @zdefault Maximum */ bouncinessCombine: Observable; /** * Sets the friction used by this material * * The friction determines how much an object will slow down when it is in contact with another object. * This is important for simulating realistic physics, such as when an object slides across a surface. * * If not provided, a default value of 0.5 will be used. * @zprop * @zdefault 0.5 * @ztype proportion */ friction: Observable; /** * Sets the static friction used by this material. * * Static friction is the friction that must be overcome before a pair of objects can start sliding * relative to each other; for physically-realistic behaviour, it should be at least as high as the * normal friction value. If not provided, the friction value will be used * @zprop * @zdefault 0.5 * @ztype proportion */ staticFriction: Observable; /** * Determines how values from the PhysicsMaterial are combined when two objects are in contact. * When each PhysicsMaterial specifies a different combine mode for some property, the combine mode which * * GEOMETRIC_MEAN - The final value will be the geometric mean of the two values: sqrt(valueA * valueB). * * MINIMUM - The final value will be the smaller of the two: min(valueA, valueB). * * MAXIMUM - The final value will be the larger of the two: max(valueA, valueB). * * ARITHMETIC_MEAN - The final value will be the arithmetic mean of the two values: (valueA + valueB) / 2. * * MULTIPLY - The final value will be the product of the two values: valueA * valueB. * * @zprop * @zdefault Minimum */ frictionCombine: Observable; }