import { html } from "lit" import RotatorEntity from "../entity/RotatorEntity" import IInputPinTemplate from "./IInputPinTemplate" import RealPinTemplate from "./RealPinTemplate" export default class RotatorPinTemplate extends RealPinTemplate { setDefaultValue(pin, values = [], rawValues = values) { if (!(pin.entity.DefaultValue instanceof RotatorEntity)) { throw new TypeError("Expected DefaultValue to be a VectorEntity") } let rotator = pin.entity.DefaultValue rotator.R = values[0] // Roll rotator.P = values[1] // Pitch rotator.Y = values[2] // Yaw } /** @param {PinElement} pin */ renderInput(pin) { if (pin.isInput()) { return html`