@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
47 lines (39 loc) • 1.19 kB
JavaScript
import { EntityPathMarkerDefinition } from "./EntityPathMarkerDefinition.js";
export class EntityPathStyle {
constructor() {
/**
*
* @type {EntityPathMarkerDefinition}
*/
this.marker_start = null;
/**
*
* @type {EntityPathMarkerDefinition}
*/
this.marker_end = null;
/**
*
* @type {EntityPathMarkerDefinition}
*/
this.marker_main = null;
/**
* Distance between markers
* @type {number}
*/
this.spacing = 1;
}
/**
*
* @param marker_start
* @param marker_end
* @param marker_main
* @param spacing
* @param {ModuleRegistry} registry
*/
fromJSON({ marker_start, marker_end, marker_main, spacing = 1 }, registry) {
this.marker_start = EntityPathMarkerDefinition.fromJSON(marker_start, registry);
this.marker_end = EntityPathMarkerDefinition.fromJSON(marker_end, registry);
this.marker_main = EntityPathMarkerDefinition.fromJSON(marker_main, registry);
this.spacing = spacing;
}
}