trainsim/track/shapes.ts
2025-02-07 12:34:58 -07:00

15 lines
348 B
TypeScript

import { Vector } from "@bearmetal/doodler";
import { TrackSegment } from "./system.ts";
export class StraightTrack extends TrackSegment {
constructor(start?: Vector) {
start = start || new Vector(100, 100);
super([
start,
start.copy().add(25, 0),
start.copy().add(75, 0),
start.copy().add(100, 0),
]);
}
}