Back to Popmotion

isPoint3D

packages/popcorn/docs/api/utilities/is-point-3d.md

8.7.1360 B
Original Source

isPoint3D

Returns true if the provided value has an x, y and z properties.

<TOC />

Import

javascript
import { isPoint3D } from '@popmotion/popcorn';

Usage

javascript
isPoint3D(0); // false
isPoint3D({ x: 0, y: 0 }); // false
isPoint3D({ x: 0, y: 0, z: 0 }); // true

Types

typescript
isPoint3D(v: any): boolean;