@openhps/core
Version:
Open Hybrid Positioning System - Core component
27 lines (22 loc) • 623 B
text/typescript
import { SerializableObject, SerializableMember, NumberType } from '../../data/decorators';
import * as THREE from './_internal';
/**
* Serializable THREE.js Vector2
*/
export class Vector2 extends THREE.Vector2 {
x: number;
y: number;
static fromArray(array: number[]): Vector2 {
return new this().fromArray(array);
}
clone(): this {
return new (this.constructor as new () => this)().copy(this) as this;
}
}