@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
30 lines (25 loc) • 786 B
JavaScript
import { RibbonXMaterialSpec } from "../../../trail/x/RibbonXMaterialSpec.js";
export class RibbonPathStyle {
constructor() {
/**
*
* @type {RibbonXMaterialSpec|null}
*/
this.material = new RibbonXMaterialSpec();
/**
* Number of samples per path segment, higher number will produce smoother looking curves
* @type {number}
*/
this.resolution = 1;
/**
* Thickness of the ribbon in world units
* @type {number}
*/
this.thickness = 1;
}
fromJSON({material, resolution = 1, thickness = 1}) {
this.material.fromJSON(material);
this.resolution = resolution;
this.thickness = thickness;
}
}