FluidProperties

nape.phys.FluidProperties (final class)

FluidProperties providing shared parameters for fluid interaction.

Instance Members

@private


nape
userData: Dynamic

Dynamic object for user to store additional data.

This object cannot be set, only its dynamically created properties may be set. In AS3 the type of this property is &#42

This object will be lazily constructed so that until accessed for the first time, will be null internally.

@default {}


Set of all active shapes using this object.

Activeness of a shape in the sense that the Shape's Body is inside of a Space.

This list is immutable.


nape
density: Float

Density of fluid.

This value, like Material density is of g/pixel/pixel. @default 1


nape
viscosity: Float

Viscosity of fluid.

This value is used in drag comutations, the higher the viscosity the more quickly objects will come to rest in the fluid. @default 1


nape
gravity: Null<nape.geom.Vec2>

Local gravity for buoyancy computations.

When this value is not null, it will be used in place of the Space gravity when performing buoyancy computations.


nape
copy(): FluidProperties

Produce a copy of this FluidProperties object.

The copied object will be identical in all properties with the the copied userData being assigned the same fields as 'this' Shape with the same values copied over by reference for object types.

Returns Description
FluidProperties The copied FluidProperties.

nape
toString(): String

@private

Returns
String

nape
new(?density: Float = 1, ?viscosity: Float = 1): Void

Construct a new FluidProperties objects.

Name Type Default Description
density Float 1 The density of the fluid in g/px/px. (default 1)
viscosity Float 1 The viscosity of the fluid for drag computations in kg/px/s (default 1)

Private Members

Metadata

Name Parameters
:final -