Simple entities serialization fixed

This commit is contained in:
barsdeveloper
2024-06-04 14:40:47 +02:00
parent c05e6d3cc9
commit e16822760f
11 changed files with 266 additions and 128 deletions

View File

@@ -1,3 +1,4 @@
import P from "parsernostrum"
import Grammar from "../serialization/Grammar.js"
import IEntity from "./IEntity.js"
import NumberEntity from "./NumberEntity.js"
@@ -10,7 +11,8 @@ export default class VectorEntity extends IEntity {
Y: NumberEntity.withDefault(),
Z: NumberEntity.withDefault(),
}
static grammar = Grammar.createEntityGrammar(this).label("VectorEntity")
/** @type {P<VectorEntity>} */
static grammar = Grammar.createEntityGrammar(this, Grammar.commaSeparation, true).label("VectorEntity")
constructor(values) {
super(values)