24 lines
569 B
Markdown
24 lines
569 B
Markdown
# MercanRey5.js — snapshot() (satır 70)
|
||
|
||
[← MercanRey5.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function snapshot(entity)
|
||
{
|
||
var pos = entity.getPosition();
|
||
var rotations = entity.getRotations();
|
||
|
||
return {
|
||
uuid: String(entity.getUniqueId()),
|
||
x: pos.x,
|
||
y: pos.y,
|
||
z: pos.z,
|
||
pitch: rotations.x,
|
||
yaw: rotations.y,
|
||
yawHead: rotations.z,
|
||
wasPositionLocked: entity.isPositionLocked(),
|
||
wasRotationLocked: entity.isRotationLocked()
|
||
};
|
||
}
|
||
```
|