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;
    }
}
