MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / checkVec3

Function checkVec3

src/world/validate.ts:184–192  ·  view source on GitHub ↗
(errors: string[], path: string, v: Vec3Lit | null)

Source from the content-addressed store, hash-verified

182}
183
184function checkVec3(errors: string[], path: string, v: Vec3Lit | null): void {
185 if (!v || !Array.isArray(v) || v.length !== 3) {
186 errors.push(path + ' must be a length-3 number array');
187 return;
188 }
189 if (typeof v[0] !== 'number' || typeof v[1] !== 'number' || typeof v[2] !== 'number') {
190 errors.push(path + ' must contain numbers');
191 }
192}
193
194// Re-exported for use in loader/saver error formatting.
195export function formatValidationErrors(errors: string[]): string {

Callers 3

validateWorldFunction · 0.85
validateTransformFunction · 0.85
validateTerrainFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected