mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 16:44:49 +08:00
21 lines
368 B
JavaScript
21 lines
368 B
JavaScript
import P from "parsernostrum"
|
|
import IEntity from "./IEntity.js"
|
|
|
|
export default class ColorChannelEntity extends IEntity {
|
|
|
|
static grammar = P.number.map(v => new this(v))
|
|
|
|
constructor(value = 0) {
|
|
super()
|
|
this.value = value
|
|
}
|
|
|
|
valueOf() {
|
|
return this.value
|
|
}
|
|
|
|
toString() {
|
|
return this.value.toFixed(6)
|
|
}
|
|
}
|