Files
ueblueprint/js/entity/ColorChannelEntity.js
2024-06-06 23:16:21 +02:00

23 lines
420 B
JavaScript

import P from "parsernostrum"
import IEntity from "./IEntity.js"
export default class ColorChannelEntity extends IEntity {
static grammar = /** @type {P<ColorChannelEntity>} */(
P.number.map(v => new this(v))
)
constructor(value = 0) {
super()
this.value = value
}
valueOf() {
return this.value
}
toString() {
return this.value.toFixed(6)
}
}