From 7da3dcf1948cde532efc7905a621514758724879 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Tue, 15 Oct 2024 16:03:09 +0200 Subject: [PATCH 1/8] Fix typo --- src/validation/extensions/BoundingVolumeS2Validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation/extensions/BoundingVolumeS2Validator.ts b/src/validation/extensions/BoundingVolumeS2Validator.ts index 2a853d92..f09bd14b 100644 --- a/src/validation/extensions/BoundingVolumeS2Validator.ts +++ b/src/validation/extensions/BoundingVolumeS2Validator.ts @@ -18,7 +18,7 @@ import { BoundingVolumeS2ValidationIssues } from "./BoundingVolumeS2ValidationIs */ export class BoundingVolumeS2Validator implements Validator { /** - * Performs the validation of a `BoundungVolume` object that + * Performs the validation of a `BoundingVolume` object that * contains a `3DTILES_bounding_volume_S2` extension object. * * @param path - The path for `ValidationIssue` instances From df1178e4cb193007d6f19efd8446150f195df7e9 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Tue, 15 Oct 2024 16:03:38 +0200 Subject: [PATCH 2/8] Split glTF validation directories --- src/tileFormats/GltfValidator.ts | 2 +- .../{gltfExtensions => gltf}/Accessors.ts | 0 .../{gltfExtensions => gltf}/GltfData.ts | 0 .../GltfDataReader.ts | 6 ++--- .../GltfExtensionValidators.ts | 7 +++--- .../{gltfExtensions => gltf}/ImageData.ts | 0 .../ImageDataReader.ts | 0 .../SamplerValidator.ts | 0 .../TextureValidator.ts | 0 .../ExtInstanceFeaturesValidator.ts | 18 +++++++-------- .../meshFeatures}/ExtMeshFeaturesValidator.ts | 22 ++++++++++--------- .../FeatureIdAccessorValidator.ts | 12 +++++----- .../meshFeatures}/FeatureIdValidator.ts | 12 +++++----- .../ExtStructuralMetadataValidator.ts | 18 +++++++-------- .../PropertyAttributePropertyModel.ts | 2 +- .../PropertyAttributePropertyValidator.ts | 8 +++---- .../PropertyAttributeValidator.ts | 10 ++++----- .../PropertyAttributeValuesValidator.ts | 16 +++++++------- .../PropertyAttributesDefinitionValidator.ts | 8 +++---- .../PropertyTableDefinitionValidator.ts | 18 +++++++++------ ...ertyTextureBooleanMetadataPropertyModel.ts | 7 +++--- ...ropertyTextureEnumMetadataPropertyModel.ts | 7 +++--- .../PropertyTextureMetadataPropertyModels.ts | 4 ++-- ...ertyTextureNumericMetadataPropertyModel.ts | 7 +++--- .../PropertyTexturePropertyValidator.ts | 12 +++++----- .../PropertyTextureValidator.ts | 10 ++++----- .../PropertyTextureValuesValidator.ts | 17 +++++++------- .../PropertyTexturesDefinitionValidator.ts | 9 ++++---- 28 files changed, 122 insertions(+), 110 deletions(-) rename src/validation/{gltfExtensions => gltf}/Accessors.ts (100%) rename src/validation/{gltfExtensions => gltf}/GltfData.ts (100%) rename src/validation/{gltfExtensions => gltf}/GltfDataReader.ts (97%) rename src/validation/{gltfExtensions => gltf}/GltfExtensionValidators.ts (85%) rename src/validation/{gltfExtensions => gltf}/ImageData.ts (100%) rename src/validation/{gltfExtensions => gltf}/ImageDataReader.ts (100%) rename src/validation/{gltfExtensions => gltf}/SamplerValidator.ts (100%) rename src/validation/{gltfExtensions => gltf}/TextureValidator.ts (100%) rename src/validation/{gltfExtensions => gltf/instanceFeatures}/ExtInstanceFeaturesValidator.ts (93%) rename src/validation/{gltfExtensions => gltf/meshFeatures}/ExtMeshFeaturesValidator.ts (96%) rename src/validation/{gltfExtensions => gltf/meshFeatures}/FeatureIdAccessorValidator.ts (93%) rename src/validation/{gltfExtensions => gltf/meshFeatures}/FeatureIdValidator.ts (95%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/ExtStructuralMetadataValidator.ts (95%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyAttributePropertyModel.ts (96%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyAttributePropertyValidator.ts (95%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyAttributeValidator.ts (92%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyAttributeValuesValidator.ts (94%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyAttributesDefinitionValidator.ts (93%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTableDefinitionValidator.ts (90%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTextureBooleanMetadataPropertyModel.ts (94%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTextureEnumMetadataPropertyModel.ts (95%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTextureMetadataPropertyModels.ts (95%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTextureNumericMetadataPropertyModel.ts (94%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTexturePropertyValidator.ts (97%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTextureValidator.ts (92%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTextureValuesValidator.ts (94%) rename src/validation/{gltfExtensions => gltf/structuralMetadata}/PropertyTexturesDefinitionValidator.ts (93%) diff --git a/src/tileFormats/GltfValidator.ts b/src/tileFormats/GltfValidator.ts index 93a6c8af..557cf80a 100644 --- a/src/tileFormats/GltfValidator.ts +++ b/src/tileFormats/GltfValidator.ts @@ -5,7 +5,7 @@ import { ValidationContext } from "../validation/ValidationContext"; import { ValidationIssue } from "../validation/ValidationIssue"; import { ContentValidationIssues } from "../issues/ContentValidationIssues"; -import { GltfExtensionValidators } from "../validation/gltfExtensions/GltfExtensionValidators"; +import { GltfExtensionValidators } from "../validation/gltf/GltfExtensionValidators"; // eslint-disable-next-line @typescript-eslint/no-var-requires const validator = require("gltf-validator"); diff --git a/src/validation/gltfExtensions/Accessors.ts b/src/validation/gltf/Accessors.ts similarity index 100% rename from src/validation/gltfExtensions/Accessors.ts rename to src/validation/gltf/Accessors.ts diff --git a/src/validation/gltfExtensions/GltfData.ts b/src/validation/gltf/GltfData.ts similarity index 100% rename from src/validation/gltfExtensions/GltfData.ts rename to src/validation/gltf/GltfData.ts diff --git a/src/validation/gltfExtensions/GltfDataReader.ts b/src/validation/gltf/GltfDataReader.ts similarity index 97% rename from src/validation/gltfExtensions/GltfDataReader.ts rename to src/validation/gltf/GltfDataReader.ts index 30257628..8ecfcfa7 100644 --- a/src/validation/gltfExtensions/GltfDataReader.ts +++ b/src/validation/gltf/GltfDataReader.ts @@ -146,7 +146,7 @@ export class GltfDataReader { } /** - * Try to read a glTF-Tranform document from the given GLB buffer + * Try to read a glTF-Transform document from the given GLB buffer * data, returning `undefined` if the document cannot be read. * * @param input - The input GLB buffer @@ -222,10 +222,10 @@ export class GltfDataReader { } /** - * Try to read a glTF-Tranform document from the given glTF JSON + * Try to read a glTF-Transform document from the given glTF JSON * data, returning `undefined` if the document cannot be read. * - * @param input - The input buffer containging glTF JSON + * @param input - The input buffer containing glTF JSON * @returns The document, or `undefined` */ private static async readJsonGltfDocument( diff --git a/src/validation/gltfExtensions/GltfExtensionValidators.ts b/src/validation/gltf/GltfExtensionValidators.ts similarity index 85% rename from src/validation/gltfExtensions/GltfExtensionValidators.ts rename to src/validation/gltf/GltfExtensionValidators.ts index ab15113d..e2c371d2 100644 --- a/src/validation/gltfExtensions/GltfExtensionValidators.ts +++ b/src/validation/gltf/GltfExtensionValidators.ts @@ -1,8 +1,9 @@ import { ValidationContext } from "../ValidationContext"; -import { ExtInstanceFeaturesValidator } from "./ExtInstanceFeaturesValidator"; -import { ExtMeshFeaturesValidator } from "./ExtMeshFeaturesValidator"; -import { ExtStructuralMetadataValidator } from "./ExtStructuralMetadataValidator"; +import { ExtInstanceFeaturesValidator } from "./instanceFeatures/ExtInstanceFeaturesValidator"; +import { ExtMeshFeaturesValidator } from "./meshFeatures/ExtMeshFeaturesValidator"; +import { ExtStructuralMetadataValidator } from "./structuralMetadata/ExtStructuralMetadataValidator"; + import { GltfDataReader } from "./GltfDataReader"; /** diff --git a/src/validation/gltfExtensions/ImageData.ts b/src/validation/gltf/ImageData.ts similarity index 100% rename from src/validation/gltfExtensions/ImageData.ts rename to src/validation/gltf/ImageData.ts diff --git a/src/validation/gltfExtensions/ImageDataReader.ts b/src/validation/gltf/ImageDataReader.ts similarity index 100% rename from src/validation/gltfExtensions/ImageDataReader.ts rename to src/validation/gltf/ImageDataReader.ts diff --git a/src/validation/gltfExtensions/SamplerValidator.ts b/src/validation/gltf/SamplerValidator.ts similarity index 100% rename from src/validation/gltfExtensions/SamplerValidator.ts rename to src/validation/gltf/SamplerValidator.ts diff --git a/src/validation/gltfExtensions/TextureValidator.ts b/src/validation/gltf/TextureValidator.ts similarity index 100% rename from src/validation/gltfExtensions/TextureValidator.ts rename to src/validation/gltf/TextureValidator.ts diff --git a/src/validation/gltfExtensions/ExtInstanceFeaturesValidator.ts b/src/validation/gltf/instanceFeatures/ExtInstanceFeaturesValidator.ts similarity index 93% rename from src/validation/gltfExtensions/ExtInstanceFeaturesValidator.ts rename to src/validation/gltf/instanceFeatures/ExtInstanceFeaturesValidator.ts index bfb9ee7e..63e9d18e 100644 --- a/src/validation/gltfExtensions/ExtInstanceFeaturesValidator.ts +++ b/src/validation/gltf/instanceFeatures/ExtInstanceFeaturesValidator.ts @@ -1,16 +1,16 @@ import { defined } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; -import { ValidatedElement } from "../ValidatedElement"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; +import { ValidatedElement } from "../../ValidatedElement"; -import { GltfData } from "./GltfData"; -import { FeatureIdValidator } from "./FeatureIdValidator"; -import { PropertyTableDefinitionValidator } from "./PropertyTableDefinitionValidator"; -import { FeatureIdAccessorValidator } from "./FeatureIdAccessorValidator"; +import { GltfData } from "../GltfData"; +import { FeatureIdValidator } from "../meshFeatures/FeatureIdValidator"; +import { PropertyTableDefinitionValidator } from "../structuralMetadata/PropertyTableDefinitionValidator"; +import { FeatureIdAccessorValidator } from "../meshFeatures/FeatureIdAccessorValidator"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; -import { StructureValidationIssues } from "../../issues/StructureValidationIssues"; +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; /** * A class for validating the `EXT_instance_features` extension in diff --git a/src/validation/gltfExtensions/ExtMeshFeaturesValidator.ts b/src/validation/gltf/meshFeatures/ExtMeshFeaturesValidator.ts similarity index 96% rename from src/validation/gltfExtensions/ExtMeshFeaturesValidator.ts rename to src/validation/gltf/meshFeatures/ExtMeshFeaturesValidator.ts index 09d3c9e8..84ca9b05 100644 --- a/src/validation/gltfExtensions/ExtMeshFeaturesValidator.ts +++ b/src/validation/gltf/meshFeatures/ExtMeshFeaturesValidator.ts @@ -1,19 +1,21 @@ import { defined } from "3d-tiles-tools"; import { defaultValue } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; -import { ValidatedElement } from "../ValidatedElement"; - -import { GltfData } from "./GltfData"; -import { ImageDataReader } from "./ImageDataReader"; -import { SamplerValidator } from "./SamplerValidator"; -import { TextureValidator } from "./TextureValidator"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; +import { ValidatedElement } from "../../ValidatedElement"; + +import { GltfData } from "../GltfData"; +import { ImageDataReader } from "../ImageDataReader"; +import { SamplerValidator } from "../SamplerValidator"; +import { TextureValidator } from "../TextureValidator"; + import { FeatureIdValidator } from "./FeatureIdValidator"; import { FeatureIdAccessorValidator } from "./FeatureIdAccessorValidator"; -import { PropertyTableDefinitionValidator } from "./PropertyTableDefinitionValidator"; -import { StructureValidationIssues } from "../../issues/StructureValidationIssues"; +import { PropertyTableDefinitionValidator } from "../structuralMetadata/PropertyTableDefinitionValidator"; + +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; /** * A class for validating the `EXT_mesh_features` extension in diff --git a/src/validation/gltfExtensions/FeatureIdAccessorValidator.ts b/src/validation/gltf/meshFeatures/FeatureIdAccessorValidator.ts similarity index 93% rename from src/validation/gltfExtensions/FeatureIdAccessorValidator.ts rename to src/validation/gltf/meshFeatures/FeatureIdAccessorValidator.ts index e3e11e6d..4f67348a 100644 --- a/src/validation/gltfExtensions/FeatureIdAccessorValidator.ts +++ b/src/validation/gltf/meshFeatures/FeatureIdAccessorValidator.ts @@ -1,12 +1,12 @@ -import { ValidationContext } from "../ValidationContext"; -import { ValidatedElement } from "../ValidatedElement"; +import { ValidationContext } from "../../ValidationContext"; +import { ValidatedElement } from "../../ValidatedElement"; -import { GltfData } from "./GltfData"; -import { Accessors } from "./Accessors"; +import { GltfData } from "../GltfData"; +import { Accessors } from "../Accessors"; import { FeatureIdValidator } from "./FeatureIdValidator"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; -import { ValidationIssues } from "../../issues/ValidationIssues"; +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; +import { ValidationIssues } from "../../../issues/ValidationIssues"; /** * Methods related to the validation of accessors that store diff --git a/src/validation/gltfExtensions/FeatureIdValidator.ts b/src/validation/gltf/meshFeatures/FeatureIdValidator.ts similarity index 95% rename from src/validation/gltfExtensions/FeatureIdValidator.ts rename to src/validation/gltf/meshFeatures/FeatureIdValidator.ts index 5f4f6f95..eb9e4acb 100644 --- a/src/validation/gltfExtensions/FeatureIdValidator.ts +++ b/src/validation/gltf/meshFeatures/FeatureIdValidator.ts @@ -1,13 +1,13 @@ import { defined } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { ValidatedElement } from "../ValidatedElement"; -import { BasicValidator } from "../BasicValidator"; +import { ValidationContext } from "../../ValidationContext"; +import { ValidatedElement } from "../../ValidatedElement"; +import { BasicValidator } from "../../BasicValidator"; -import { GltfData } from "./GltfData"; +import { GltfData } from "../GltfData"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; -import { JsonValidationIssues } from "../../issues/JsonValidationIssues"; +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; +import { JsonValidationIssues } from "../../../issues/JsonValidationIssues"; /** * A class for validation functionality related to feature IDs, as they diff --git a/src/validation/gltfExtensions/ExtStructuralMetadataValidator.ts b/src/validation/gltf/structuralMetadata/ExtStructuralMetadataValidator.ts similarity index 95% rename from src/validation/gltfExtensions/ExtStructuralMetadataValidator.ts rename to src/validation/gltf/structuralMetadata/ExtStructuralMetadataValidator.ts index 7d61e0f4..b82783f6 100644 --- a/src/validation/gltfExtensions/ExtStructuralMetadataValidator.ts +++ b/src/validation/gltf/structuralMetadata/ExtStructuralMetadataValidator.ts @@ -1,20 +1,20 @@ import { Schema, defined } from "3d-tiles-tools"; import { defaultValue } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; -import { ValidatedElement } from "../ValidatedElement"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; +import { ValidatedElement } from "../../ValidatedElement"; -import { GltfData } from "./GltfData"; +import { GltfData } from "../GltfData"; import { PropertyTexturesDefinitionValidator } from "./PropertyTexturesDefinitionValidator"; import { PropertyAttributesDefinitionValidator } from "./PropertyAttributesDefinitionValidator"; import { PropertyTextureValuesValidator } from "./PropertyTextureValuesValidator"; -import { SchemaDefinitionValidator } from "../metadata/SchemaDefinitionValidator"; -import { PropertyTablesDefinitionValidator } from "../metadata/PropertyTablesDefinitionValidator"; +import { SchemaDefinitionValidator } from "../../metadata/SchemaDefinitionValidator"; +import { PropertyTablesDefinitionValidator } from "../../metadata/PropertyTablesDefinitionValidator"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; -import { JsonValidationIssues } from "../../issues/JsonValidationIssues"; +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; +import { JsonValidationIssues } from "../../../issues/JsonValidationIssues"; import { PropertyAttributeValuesValidator } from "./PropertyAttributeValuesValidator"; /** @@ -282,7 +282,7 @@ export class ExtStructuralMetadataValidator { * the extension object * @param meshIndex - The index of the mesh (only for details * in validation messages) - * @param pimitiveIndex - The index of the primitive (only for details + * @param primitiveIndex - The index of the primitive (only for details * in validation messages) * @param schema - The metadata schema * @param gltfStructuralMetadata - The EXT_mesh_features object diff --git a/src/validation/gltfExtensions/PropertyAttributePropertyModel.ts b/src/validation/gltf/structuralMetadata/PropertyAttributePropertyModel.ts similarity index 96% rename from src/validation/gltfExtensions/PropertyAttributePropertyModel.ts rename to src/validation/gltf/structuralMetadata/PropertyAttributePropertyModel.ts index 302cc764..d603531e 100644 --- a/src/validation/gltfExtensions/PropertyAttributePropertyModel.ts +++ b/src/validation/gltf/structuralMetadata/PropertyAttributePropertyModel.ts @@ -1,6 +1,6 @@ import { ClassProperty } from "3d-tiles-tools"; import { MetadataValues } from "3d-tiles-tools"; -import { MetadataPropertyModel } from "../metadata/MetadataPropertyModel"; +import { MetadataPropertyModel } from "../../metadata/MetadataPropertyModel"; /** * Implementation of a metadata property model for a diff --git a/src/validation/gltfExtensions/PropertyAttributePropertyValidator.ts b/src/validation/gltf/structuralMetadata/PropertyAttributePropertyValidator.ts similarity index 95% rename from src/validation/gltfExtensions/PropertyAttributePropertyValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyAttributePropertyValidator.ts index 1167ebd1..40e77a14 100644 --- a/src/validation/gltfExtensions/PropertyAttributePropertyValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyAttributePropertyValidator.ts @@ -1,10 +1,10 @@ import { ClassProperties, ClassProperty, defined } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; -import { MetadataPropertyValidator } from "../metadata/MetadataPropertyValidator"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; +import { MetadataPropertyValidator } from "../../metadata/MetadataPropertyValidator"; +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; /** * A class for validations related to `propertyAttribute.property` objects. diff --git a/src/validation/gltfExtensions/PropertyAttributeValidator.ts b/src/validation/gltf/structuralMetadata/PropertyAttributeValidator.ts similarity index 92% rename from src/validation/gltfExtensions/PropertyAttributeValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyAttributeValidator.ts index 780063dc..21b4d17a 100644 --- a/src/validation/gltfExtensions/PropertyAttributeValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyAttributeValidator.ts @@ -2,12 +2,12 @@ import { defined } from "3d-tiles-tools"; import { defaultValue } from "3d-tiles-tools"; import { Schema } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; -import { RootPropertyValidator } from "../RootPropertyValidator"; -import { ExtendedObjectsValidators } from "../ExtendedObjectsValidators"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; +import { RootPropertyValidator } from "../../RootPropertyValidator"; +import { ExtendedObjectsValidators } from "../../ExtendedObjectsValidators"; -import { MetadataStructureValidator } from "../metadata/MetadataStructureValidator"; +import { MetadataStructureValidator } from "../../metadata/MetadataStructureValidator"; import { PropertyAttributePropertyValidator } from "./PropertyAttributePropertyValidator"; diff --git a/src/validation/gltfExtensions/PropertyAttributeValuesValidator.ts b/src/validation/gltf/structuralMetadata/PropertyAttributeValuesValidator.ts similarity index 94% rename from src/validation/gltfExtensions/PropertyAttributeValuesValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyAttributeValuesValidator.ts index 2cf20d3f..b0530966 100644 --- a/src/validation/gltfExtensions/PropertyAttributeValuesValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyAttributeValuesValidator.ts @@ -4,18 +4,18 @@ import { ClassProperties } from "3d-tiles-tools"; import { ClassProperty } from "3d-tiles-tools"; import { Schema } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; +import { ValidationContext } from "../../ValidationContext"; -import { GltfData } from "./GltfData"; -import { Accessors } from "./Accessors"; +import { GltfData } from "../GltfData"; +import { Accessors } from "../Accessors"; import { PropertyAttributePropertyModel } from "./PropertyAttributePropertyModel"; -import { StructureValidationIssues } from "../../issues/StructureValidationIssues"; -import { ValidationIssues } from "../../issues/ValidationIssues"; +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; +import { ValidationIssues } from "../../../issues/ValidationIssues"; -import { MetadataValidationUtilities } from "../metadata/MetadataValidationUtilities"; -import { MetadataPropertyValuesValidator } from "../metadata/MetadataPropertyValuesValidator"; -import { RangeIterables } from "../metadata/RangeIterables"; +import { MetadataValidationUtilities } from "../../metadata/MetadataValidationUtilities"; +import { MetadataPropertyValuesValidator } from "../../metadata/MetadataPropertyValuesValidator"; +import { RangeIterables } from "../../metadata/RangeIterables"; /** * A class for the validation of values that are stored diff --git a/src/validation/gltfExtensions/PropertyAttributesDefinitionValidator.ts b/src/validation/gltf/structuralMetadata/PropertyAttributesDefinitionValidator.ts similarity index 93% rename from src/validation/gltfExtensions/PropertyAttributesDefinitionValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyAttributesDefinitionValidator.ts index 22abcb70..f760b148 100644 --- a/src/validation/gltfExtensions/PropertyAttributesDefinitionValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyAttributesDefinitionValidator.ts @@ -1,12 +1,12 @@ import { defined } from "3d-tiles-tools"; import { Schema } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { ValidatedElement } from "../ValidatedElement"; -import { BasicValidator } from "../BasicValidator"; +import { ValidationContext } from "../../ValidationContext"; +import { ValidatedElement } from "../../ValidatedElement"; +import { BasicValidator } from "../../BasicValidator"; import { PropertyAttributeValidator } from "./PropertyAttributeValidator"; -import { StructureValidationIssues } from "../../issues/StructureValidationIssues"; +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; /** * A class for validating the definition of property attributes. diff --git a/src/validation/gltfExtensions/PropertyTableDefinitionValidator.ts b/src/validation/gltf/structuralMetadata/PropertyTableDefinitionValidator.ts similarity index 90% rename from src/validation/gltfExtensions/PropertyTableDefinitionValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyTableDefinitionValidator.ts index 7f12bebf..6d826d61 100644 --- a/src/validation/gltfExtensions/PropertyTableDefinitionValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTableDefinitionValidator.ts @@ -1,9 +1,13 @@ -import { defaultValue, defined } from "3d-tiles-tools"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; -import { ValidatedElement } from "../ValidatedElement"; -import { ValidationContext } from "../ValidationContext"; -import { GltfData } from "./GltfData"; -import { BasicValidator } from "../BasicValidator"; +import { defined } from "3d-tiles-tools"; +import { defaultValue } from "3d-tiles-tools"; + +import { ValidationContext } from "../../ValidationContext"; +import { ValidatedElement } from "../../ValidatedElement"; +import { BasicValidator } from "../../BasicValidator"; + +import { GltfData } from "../GltfData"; + +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; /** * A class for the validation of a single property table that @@ -20,7 +24,7 @@ export class PropertyTableDefinitionValidator { * - `validatedElement`: The validated property table object, only * insofar that it contains a defined `count` value * - * This will check whether the `propertyTable` refers to an exising + * This will check whether the `propertyTable` refers to an existing * property table in the `EXT_structural_metadata` extension object, * and this property table has a valid `count`. * diff --git a/src/validation/gltfExtensions/PropertyTextureBooleanMetadataPropertyModel.ts b/src/validation/gltf/structuralMetadata/PropertyTextureBooleanMetadataPropertyModel.ts similarity index 94% rename from src/validation/gltfExtensions/PropertyTextureBooleanMetadataPropertyModel.ts rename to src/validation/gltf/structuralMetadata/PropertyTextureBooleanMetadataPropertyModel.ts index 6ea76c21..c2f34add 100644 --- a/src/validation/gltfExtensions/PropertyTextureBooleanMetadataPropertyModel.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTextureBooleanMetadataPropertyModel.ts @@ -2,9 +2,10 @@ import { ClassProperty } from "3d-tiles-tools"; import { MetadataValues } from "3d-tiles-tools"; import { NumericBuffers } from "3d-tiles-tools"; -import { ImageData } from "./ImageData"; -import { ImageDataReader } from "./ImageDataReader"; -import { MetadataPropertyModel } from "../metadata/MetadataPropertyModel"; +import { ImageData } from "../ImageData"; +import { ImageDataReader } from "../ImageDataReader"; + +import { MetadataPropertyModel } from "../../metadata/MetadataPropertyModel"; /** * Implementation of a MetadataPropertyModel for a single diff --git a/src/validation/gltfExtensions/PropertyTextureEnumMetadataPropertyModel.ts b/src/validation/gltf/structuralMetadata/PropertyTextureEnumMetadataPropertyModel.ts similarity index 95% rename from src/validation/gltfExtensions/PropertyTextureEnumMetadataPropertyModel.ts rename to src/validation/gltf/structuralMetadata/PropertyTextureEnumMetadataPropertyModel.ts index f9f05cd7..58d4f69b 100644 --- a/src/validation/gltfExtensions/PropertyTextureEnumMetadataPropertyModel.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTextureEnumMetadataPropertyModel.ts @@ -2,9 +2,10 @@ import { ClassProperty } from "3d-tiles-tools"; import { MetadataValues } from "3d-tiles-tools"; import { NumericBuffers } from "3d-tiles-tools"; -import { ImageData } from "./ImageData"; -import { ImageDataReader } from "./ImageDataReader"; -import { MetadataPropertyModel } from "../metadata/MetadataPropertyModel"; +import { ImageData } from "../ImageData"; +import { ImageDataReader } from "../ImageDataReader"; + +import { MetadataPropertyModel } from "../../metadata/MetadataPropertyModel"; /** * Implementation of a MetadataPropertyModel for a single diff --git a/src/validation/gltfExtensions/PropertyTextureMetadataPropertyModels.ts b/src/validation/gltf/structuralMetadata/PropertyTextureMetadataPropertyModels.ts similarity index 95% rename from src/validation/gltfExtensions/PropertyTextureMetadataPropertyModels.ts rename to src/validation/gltf/structuralMetadata/PropertyTextureMetadataPropertyModels.ts index 73afb9b0..13fadc8c 100644 --- a/src/validation/gltfExtensions/PropertyTextureMetadataPropertyModels.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTextureMetadataPropertyModels.ts @@ -1,12 +1,12 @@ import { ClassProperty } from "3d-tiles-tools"; -import { ImageData } from "./ImageData"; +import { ImageData } from "../ImageData"; import { PropertyTextureNumericMetadataPropertyModel } from "./PropertyTextureNumericMetadataPropertyModel"; import { PropertyTextureBooleanMetadataPropertyModel } from "./PropertyTextureBooleanMetadataPropertyModel"; import { PropertyTextureEnumMetadataPropertyModel } from "./PropertyTextureEnumMetadataPropertyModel"; -import { MetadataPropertyModel } from "../metadata/MetadataPropertyModel"; +import { MetadataPropertyModel } from "../../metadata/MetadataPropertyModel"; /** * Methods to create MetadataPropertyModel instances for diff --git a/src/validation/gltfExtensions/PropertyTextureNumericMetadataPropertyModel.ts b/src/validation/gltf/structuralMetadata/PropertyTextureNumericMetadataPropertyModel.ts similarity index 94% rename from src/validation/gltfExtensions/PropertyTextureNumericMetadataPropertyModel.ts rename to src/validation/gltf/structuralMetadata/PropertyTextureNumericMetadataPropertyModel.ts index 8666ce53..8e5e42ea 100644 --- a/src/validation/gltfExtensions/PropertyTextureNumericMetadataPropertyModel.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTextureNumericMetadataPropertyModel.ts @@ -2,9 +2,10 @@ import { ClassProperty } from "3d-tiles-tools"; import { MetadataValues } from "3d-tiles-tools"; import { NumericBuffers } from "3d-tiles-tools"; -import { ImageData } from "./ImageData"; -import { ImageDataReader } from "./ImageDataReader"; -import { MetadataPropertyModel } from "../metadata/MetadataPropertyModel"; +import { ImageData } from "../ImageData"; +import { ImageDataReader } from "../ImageDataReader"; + +import { MetadataPropertyModel } from "../../metadata/MetadataPropertyModel"; /** * Implementation of a MetadataPropertyModel for a single diff --git a/src/validation/gltfExtensions/PropertyTexturePropertyValidator.ts b/src/validation/gltf/structuralMetadata/PropertyTexturePropertyValidator.ts similarity index 97% rename from src/validation/gltfExtensions/PropertyTexturePropertyValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyTexturePropertyValidator.ts index b229f60d..fbd7c57d 100644 --- a/src/validation/gltfExtensions/PropertyTexturePropertyValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTexturePropertyValidator.ts @@ -4,15 +4,15 @@ import { MetadataTypes } from "3d-tiles-tools"; import { defaultValue } from "3d-tiles-tools"; import { ClassProperty } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; -import { MetadataPropertyValidator } from "../metadata/MetadataPropertyValidator"; +import { MetadataPropertyValidator } from "../../metadata/MetadataPropertyValidator"; -import { GltfExtensionValidationIssues } from "../../issues/GltfExtensionValidationIssues"; +import { GltfExtensionValidationIssues } from "../../../issues/GltfExtensionValidationIssues"; -import { TextureValidator } from "./TextureValidator"; -import { SamplerValidator } from "./SamplerValidator"; +import { TextureValidator } from "../TextureValidator"; +import { SamplerValidator } from "../SamplerValidator"; /** * A class for validations related to `propertyTexture.property` objects. diff --git a/src/validation/gltfExtensions/PropertyTextureValidator.ts b/src/validation/gltf/structuralMetadata/PropertyTextureValidator.ts similarity index 92% rename from src/validation/gltfExtensions/PropertyTextureValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyTextureValidator.ts index 2b60e0cb..5437e9da 100644 --- a/src/validation/gltfExtensions/PropertyTextureValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTextureValidator.ts @@ -3,12 +3,12 @@ import { defaultValue } from "3d-tiles-tools"; import { MetadataUtilities } from "3d-tiles-tools"; import { Schema } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { BasicValidator } from "../BasicValidator"; -import { RootPropertyValidator } from "../RootPropertyValidator"; -import { ExtendedObjectsValidators } from "../ExtendedObjectsValidators"; +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; +import { RootPropertyValidator } from "../../RootPropertyValidator"; +import { ExtendedObjectsValidators } from "../../ExtendedObjectsValidators"; -import { MetadataStructureValidator } from "../metadata/MetadataStructureValidator"; +import { MetadataStructureValidator } from "../../metadata/MetadataStructureValidator"; import { PropertyTexturePropertyValidator } from "./PropertyTexturePropertyValidator"; diff --git a/src/validation/gltfExtensions/PropertyTextureValuesValidator.ts b/src/validation/gltf/structuralMetadata/PropertyTextureValuesValidator.ts similarity index 94% rename from src/validation/gltfExtensions/PropertyTextureValuesValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyTextureValuesValidator.ts index 523be216..376b9433 100644 --- a/src/validation/gltfExtensions/PropertyTextureValuesValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTextureValuesValidator.ts @@ -3,18 +3,19 @@ import { defaultValue } from "3d-tiles-tools"; import { ClassProperties } from "3d-tiles-tools"; import { Schema } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; +import { ValidationContext } from "../../ValidationContext"; + +import { GltfData } from "../GltfData"; +import { ImageDataReader } from "../ImageDataReader"; +import { TextureValidator } from "../TextureValidator"; -import { GltfData } from "./GltfData"; -import { ImageDataReader } from "./ImageDataReader"; -import { TextureValidator } from "./TextureValidator"; import { PropertyTextureMetadataPropertyModels } from "./PropertyTextureMetadataPropertyModels"; -import { StructureValidationIssues } from "../../issues/StructureValidationIssues"; +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; -import { RangeIterables } from "../metadata/RangeIterables"; -import { MetadataPropertyValuesValidator } from "../metadata/MetadataPropertyValuesValidator"; -import { MetadataValidationUtilities } from "../metadata/MetadataValidationUtilities"; +import { RangeIterables } from "../../metadata/RangeIterables"; +import { MetadataPropertyValuesValidator } from "../../metadata/MetadataPropertyValuesValidator"; +import { MetadataValidationUtilities } from "../../metadata/MetadataValidationUtilities"; /** * A class for the validation of values that are stored diff --git a/src/validation/gltfExtensions/PropertyTexturesDefinitionValidator.ts b/src/validation/gltf/structuralMetadata/PropertyTexturesDefinitionValidator.ts similarity index 93% rename from src/validation/gltfExtensions/PropertyTexturesDefinitionValidator.ts rename to src/validation/gltf/structuralMetadata/PropertyTexturesDefinitionValidator.ts index 11278c6f..1a070887 100644 --- a/src/validation/gltfExtensions/PropertyTexturesDefinitionValidator.ts +++ b/src/validation/gltf/structuralMetadata/PropertyTexturesDefinitionValidator.ts @@ -1,12 +1,13 @@ import { defined } from "3d-tiles-tools"; import { Schema } from "3d-tiles-tools"; -import { ValidationContext } from "../ValidationContext"; -import { ValidatedElement } from "../ValidatedElement"; -import { BasicValidator } from "../BasicValidator"; +import { ValidationContext } from "../../ValidationContext"; +import { ValidatedElement } from "../../ValidatedElement"; +import { BasicValidator } from "../../BasicValidator"; + import { PropertyTextureValidator } from "./PropertyTextureValidator"; -import { StructureValidationIssues } from "../../issues/StructureValidationIssues"; +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; /** * A class for validating the definition of property textures. From 620fc6811c0e452baa998f53962f2bb047a96607 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Tue, 15 Oct 2024 16:52:38 +0200 Subject: [PATCH 3/8] Fix typos in comments --- src/validation/BasicValidator.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/validation/BasicValidator.ts b/src/validation/BasicValidator.ts index 0cccfa8a..4a196ff1 100644 --- a/src/validation/BasicValidator.ts +++ b/src/validation/BasicValidator.ts @@ -59,7 +59,7 @@ export class BasicValidator { * * If the value has the expected type, then `true` is returned. * - * If the value does not have the expeced type, a `TYPE_MISMATCH` + * If the value does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` * is returned. * @@ -130,7 +130,7 @@ export class BasicValidator { * is added to the given context, and `false` is returned. * * If the expected type is given, and any element of the array does - * not have the expcected type, then a `TYPE_MISMATCH` validation + * not have the expected type, then a `TYPE_MISMATCH` validation * issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message @@ -264,7 +264,7 @@ export class BasicValidator { * Validates that the elements in the given array are unique. * * This assumes that the basic validation of the array has already - * been peformed. It **ONLY** checks the uniqueness of the elements. + * been performed. It **ONLY** checks the uniqueness of the elements. * * If the elements are unique, then `true` is returned. * @@ -308,7 +308,7 @@ export class BasicValidator { * If the given value is not defined, a `PROPERTY_MISSING` validation * issue is added to the given context, and `false` is returned. * - * If the given object does not have the expeced type, a `TYPE_MISMATCH` + * If the given object does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message @@ -337,7 +337,7 @@ export class BasicValidator { * If the given value is not defined, a `PROPERTY_MISSING` validation * issue is added to the given context, and `false` is returned. * - * If the given object does not have the expeced type, a `TYPE_MISMATCH` + * If the given object does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message @@ -366,7 +366,7 @@ export class BasicValidator { * If the given value is not defined, a `PROPERTY_MISSING` validation * issue is added to the given context, and `false` is returned. * - * If the given object does not have the expeced type, a `TYPE_MISMATCH` + * If the given object does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message @@ -395,7 +395,7 @@ export class BasicValidator { * If the given value is not defined, a `PROPERTY_MISSING` validation * issue is added to the given context, and `false` is returned. * - * If the given object does not have the expeced type, a `TYPE_MISMATCH` + * If the given object does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message @@ -424,7 +424,7 @@ export class BasicValidator { * If the given value is not defined, a `PROPERTY_MISSING` validation * issue is added to the given context, and `false` is returned. * - * If the given object does not have the expeced type, a `TYPE_MISMATCH` + * If the given object does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message @@ -465,7 +465,7 @@ export class BasicValidator { * If the given value is not defined, a `PROPERTY_MISSING` validation * issue is added to the given context, and `false` is returned. * - * If the given object does not have the expeced type, a `TYPE_MISMATCH` + * If the given object does not have the expected type, a `TYPE_MISMATCH` * validation issue is added to the given context, and `false` is returned. * * @param path - The path for the `ValidationIssue` message From 4145432d46a81f2a04d7c53249432c31050a16c0 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Tue, 15 Oct 2024 17:00:25 +0200 Subject: [PATCH 4/8] Fix typos in comments --- src/issues/SemanticValidationIssues.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/issues/SemanticValidationIssues.ts b/src/issues/SemanticValidationIssues.ts index 8ddf95b1..692256c8 100644 --- a/src/issues/SemanticValidationIssues.ts +++ b/src/issues/SemanticValidationIssues.ts @@ -341,7 +341,7 @@ export class SemanticValidationIssues { * listed in the 'extensionsUsed' of a tileset. * * An extension is 'found' when it is encountered in any - * 'someRootProperty.extensons' dictionary during the + * 'someRootProperty.extensions' dictionary during the * traversal, * * @param path - The path for the `ValidationIssue` @@ -364,7 +364,7 @@ export class SemanticValidationIssues { * the traversal. * * An extension is 'found' when it is encountered in any - * 'someRootProperty.extensons' dictionary during the + * 'someRootProperty.extensions' dictionary during the * traversal. * * NOTE: The exact mechanism for an extension being "used" may have to be From a61e50b7804aa23fbeb3218b25e5c52af5691ea2 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 19 Oct 2024 18:39:31 +0200 Subject: [PATCH 5/8] Add validation for NGA_gpm_local --- specs/gltfExtensions/validateGltf.ts | 2 +- src/issues/StructureValidationIssues.ts | 15 + .../gltf/GltfExtensionValidators.ts | 11 + .../gltf/gpmLocal/NgaGpmLocalValidator.ts | 1067 +++++++++++++++++ 4 files changed, 1094 insertions(+), 1 deletion(-) create mode 100644 src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts diff --git a/specs/gltfExtensions/validateGltf.ts b/specs/gltfExtensions/validateGltf.ts index 958e2420..5ed371bc 100644 --- a/specs/gltfExtensions/validateGltf.ts +++ b/specs/gltfExtensions/validateGltf.ts @@ -5,7 +5,7 @@ import { ResourceResolvers } from "3d-tiles-tools"; import { ValidationContext } from "../../src/validation/ValidationContext"; -import { GltfExtensionValidators } from "../../src/validation/gltfExtensions/GltfExtensionValidators"; +import { GltfExtensionValidators } from "../../src/validation/gltf/GltfExtensionValidators"; export async function validateGltf(gltfFileName: string) { fs.readFileSync(gltfFileName); diff --git a/src/issues/StructureValidationIssues.ts b/src/issues/StructureValidationIssues.ts index b98498ab..2ab7bc7d 100644 --- a/src/issues/StructureValidationIssues.ts +++ b/src/issues/StructureValidationIssues.ts @@ -35,4 +35,19 @@ export class StructureValidationIssues { const issue = new ValidationIssue(type, path, message, severity); return issue; } + + /** + * Indicates that a value that is disallowed based on the presence + * or absence of another value has been defined. + * + * @param path - The path for the `ValidationIssue` + * @param message - The message for the `ValidationIssue` + * @returns The `ValidationIssue` + */ + static DISALLOWED_VALUE_FOUND(path: string, message: string) { + const type = "DISALLOWED_VALUE_FOUND"; + const severity = ValidationIssueSeverity.ERROR; + const issue = new ValidationIssue(type, path, message, severity); + return issue; + } } diff --git a/src/validation/gltf/GltfExtensionValidators.ts b/src/validation/gltf/GltfExtensionValidators.ts index e2c371d2..775fa6d1 100644 --- a/src/validation/gltf/GltfExtensionValidators.ts +++ b/src/validation/gltf/GltfExtensionValidators.ts @@ -5,6 +5,7 @@ import { ExtMeshFeaturesValidator } from "./meshFeatures/ExtMeshFeaturesValidato import { ExtStructuralMetadataValidator } from "./structuralMetadata/ExtStructuralMetadataValidator"; import { GltfDataReader } from "./GltfDataReader"; +import { NgaGpmLocalValidator } from "./gpmLocal/NgaGpmLocalValidator"; /** * A class that only serves as an entry point for validating @@ -64,6 +65,16 @@ export class GltfExtensionValidators { result = false; } + // Validate `NGA_gpm_local` + const ngaGpmLocalValid = await NgaGpmLocalValidator.validateGltf( + path, + gltfData, + context + ); + if (!ngaGpmLocalValid) { + result = false; + } + return result; } } diff --git a/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts b/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts new file mode 100644 index 00000000..f90cd37c --- /dev/null +++ b/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts @@ -0,0 +1,1067 @@ +import { defined } from "3d-tiles-tools"; + +import { ValidationContext } from "../../ValidationContext"; +import { BasicValidator } from "../../BasicValidator"; + +import { GltfData } from "../GltfData"; + +import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; +import { TextureValidator } from "../TextureValidator"; + + +/** + * A class for validating the `NGA_gpm_local` extension in glTF assets. + * + * This class assumes that the structure of the glTF asset itself + * has already been validated (e.g. with the glTF Validator). + * + * @internal + */ +export class NgaGpmLocalValidator { + /** + * Performs the validation to ensure that the `NGA_gpm_local` + * extensions in the given glTF are valid + * + * @param path - The path for validation issues + * @param gltfData - The glTF data, containing the parsed JSON and the + * (optional) binary buffer + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + static async validateGltf( + path: string, + gltfData: GltfData, + context: ValidationContext + ): Promise { + const gltf = gltfData.gltf; + + let result = true; + + // Check if the NGA_gpm_local extension object + // at the root level is present and valid + const rootExtensions = gltf.extensions; + if (defined(rootExtensions)) { + const gltfGpmLocal = rootExtensions["NGA_gpm_local"]; + if (defined(gltfGpmLocal)) { + const rootExtensionObjectIsValid = + NgaGpmLocalValidator.validateGltfGpmLocal( + path, + gltfGpmLocal, + context + ); + if (!rootExtensionObjectIsValid) { + result = false; + } + } + } + + // Check all mesh primitives, and see whether NGA_gpm_local + // extension object is present and valid + const meshes = gltf.meshes; + if (defined(meshes) && Array.isArray(meshes)) { + for (let m = 0; m < meshes.length; m++) { + const mesh = meshes[m]; + const primitives = mesh.primitives; + if (defined(primitives) && Array.isArray(primitives)) { + for (let p = 0; p < primitives.length; p++) { + const primitive = primitives[p]; + + const primitiveExtensions = primitive.extensions; + if (defined(primitiveExtensions)) { + const primitiveGpmLocal = primitiveExtensions["NGA_gpm_local"]; + if (defined(primitiveGpmLocal)) { + const currentPath = path + "/meshes/" + m + "/primitives/" + p; + const meshPrimitiveExtensionObjectIsValid = + NgaGpmLocalValidator.validateMeshPrimitiveGpmLocal( + currentPath, + primitiveGpmLocal, + gltf, + primitive, + context + ); + if (!meshPrimitiveExtensionObjectIsValid) { + result = false; + } + } + } + } + } + } + } + + return result; + } + + /** + * Validate the given root-level NGA_gpm_local extension object + * + * @param path - The path for validation issues + * @param gltfGpmLocal - The root-level NGA_gpm_local extension object + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateGltfGpmLocal( + path: string, + gltfGpmLocal: any, + context: ValidationContext + ): boolean { + // Make sure that the given value is an object + if ( + !BasicValidator.validateObject( + path, + "NGA_gpm_local", + gltfGpmLocal, + context + ) + ) { + return false; + } + + // Validate the storageType + const storageType = gltfGpmLocal.storageType; + const storageTypePath = path + "/storageType"; + + // The storageType MUST be one of these valid values + const storageTypeValues = ["Direct", "Indirect"]; + if ( + !BasicValidator.validateEnum( + storageTypePath, + "storageType", + storageType, + storageTypeValues, + context + ) + ) { + // The remaining validation depends on the storageType, + // so bail out early when it is invalid + return false; + } + + // The actual structure of the extension object is defined + // with a "oneOf [ two nearly disjoint things ]", depending + // on the storageType. + if (storageType === "Indirect") { + return NgaGpmLocalValidator.validateGltfGpmLocalIndirect( + path, + gltfGpmLocal, + context + ); + } + return NgaGpmLocalValidator.validateGltfGpmLocalDirect( + path, + gltfGpmLocal, + context + ); + } + + /** + * Validate the given root-level NGA_gpm_local extension object, + * assuming that it already has been checked to contain the + * `storageType === "Indirect"`. + * + * @param path - The path for validation issues + * @param gltfGpmLocal - The root-level NGA_gpm_local extension object + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateGltfGpmLocalIndirect( + path: string, + gltfGpmLocal: any, + context: ValidationContext + ): boolean { + const storageType = "Indirect"; + let result = true; + + // Validate that the properties that are disallowed for + // the storageType===Indirect are NOT defined: + const anchorPointsDirect = gltfGpmLocal.anchorPointsDirect; + if (defined(anchorPointsDirect)) { + const message = + `For storageType===${storageType}, ` + + `the 'anchorPointsDirect' may not be defined`; + const issue = StructureValidationIssues.DISALLOWED_VALUE_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } + const covarianceDirectUpperTriangle = + gltfGpmLocal.covarianceDirectUpperTriangle; + if (defined(covarianceDirectUpperTriangle)) { + const message = + `For storageType===${storageType}, ` + + `the 'covarianceDirectUpperTriangle' may not be defined`; + const issue = StructureValidationIssues.DISALLOWED_VALUE_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } + + // Validate the anchorPointsIndirect + const anchorPointsIndirect = gltfGpmLocal.anchorPointsIndirect; + const anchorPointsIndirectPath = path + "/anchorPointsIndirect"; + if (!defined(anchorPointsIndirect)) { + const message = + `For storageType===${storageType}, ` + + `the 'anchorPointsIndirect' must be defined`; + const issue = StructureValidationIssues.REQUIRED_VALUE_NOT_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } else { + const anchorPointsIndirectValid = + NgaGpmLocalValidator.validateAnchorPointsIndirect( + anchorPointsIndirectPath, + anchorPointsIndirect, + context + ); + if (!anchorPointsIndirectValid) { + result = false; + } + } + + // Validate the intraTileCorrelationGroups + const intraTileCorrelationGroups = gltfGpmLocal.intraTileCorrelationGroups; + const intraTileCorrelationGroupsPath = path + "/intraTileCorrelationGroups"; + if (!defined(intraTileCorrelationGroups)) { + const message = + `For storageType===${storageType}, ` + + `the 'intraTileCorrelationGroups' must be defined`; + const issue = StructureValidationIssues.REQUIRED_VALUE_NOT_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } else { + const intraTileCorrelationGroupsValid = + NgaGpmLocalValidator.validateIntraTileCorrelationGroups( + intraTileCorrelationGroupsPath, + intraTileCorrelationGroups, + context + ); + if (!intraTileCorrelationGroupsValid) { + result = false; + } + } + return result; + } + + /** + * Validate the given array of "anchorPointIndirect" objects + * + * @param path - The path for validation issues + * @param anchorPointsIndirect - The array of objects + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateAnchorPointsIndirect( + path: string, + anchorPointsIndirect: any, + context: ValidationContext + ): boolean { + // The anchorPointsIndirect MUST be an array of objects + if ( + !BasicValidator.validateArray( + path, + "anchorPointsIndirect", + anchorPointsIndirect, + undefined, + undefined, + "object", + context + ) + ) { + return false; + } + let result = true; + + // Validate each anchorPointIndirect + for (let i = 0; i < anchorPointsIndirect.length; i++) { + const anchorPointIndirect = anchorPointsIndirect[i]; + const anchorPointIndirectPath = path + "/" + i; + if ( + !NgaGpmLocalValidator.validateAnchorPointIndirect( + anchorPointIndirectPath, + anchorPointIndirect, + context + ) + ) { + result = false; + } + } + return result; + } + + /** + * Validate the given anchorPointIndirect + * + * @param path - The path for validation issues + * @param anchorPointIndirect - The anchorPointIndirect + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateAnchorPointIndirect( + path: string, + anchorPointIndirect: any, + context: ValidationContext + ): boolean { + let result = true; + + // Validate the position + const position = anchorPointIndirect.position; + const positionPath = path + "/position"; + + // The position MUST be a 3-element array of numbers + const positionValid = BasicValidator.validateArray( + positionPath, + "position", + position, + 3, + 3, + "number", + context + ); + if (!positionValid) { + result = false; + } + + // Validate the adjustmentParams + const adjustmentParams = anchorPointIndirect.adjustmentParams; + const adjustmentParamsPath = path + "/adjustmentParams"; + + // The adjustmentParams MUST be a 3-element array of numbers + const adjustmentParamsValid = BasicValidator.validateArray( + adjustmentParamsPath, + "adjustmentParams", + adjustmentParams, + 3, + 3, + "number", + context + ); + if (!adjustmentParamsValid) { + result = false; + } + + // Validate the covarianceMatrix + const covarianceMatrix = anchorPointIndirect.covarianceMatrix; + const covarianceMatrixPath = path + "/covarianceMatrix"; + + // The covarianceMatrix MUST be a 6-element array of numbers + const covarianceMatrixValid = BasicValidator.validateArray( + covarianceMatrixPath, + "covarianceMatrix", + covarianceMatrix, + 6, + 6, + "number", + context + ); + if (!covarianceMatrixValid) { + result = false; + } + + return result; + } + + /** + * Validate the given array of "correlationGroup" objects that + * have been found as the intraTileCorrelationGroups + * + * @param path - The path for validation issues + * @param intraTileCorrelationGroups - The array of objects + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateIntraTileCorrelationGroups( + path: string, + intraTileCorrelationGroups: any, + context: ValidationContext + ): boolean { + // The intraTileCorrelationGroups MUST be an array of at most 3 objects + if ( + !BasicValidator.validateArray( + path, + "intraTileCorrelationGroups", + intraTileCorrelationGroups, + 0, + 3, + "object", + context + ) + ) { + return false; + } + let result = true; + + // Validate each correlationGroup + for (let i = 0; i < intraTileCorrelationGroups.length; i++) { + const correlationGroup = intraTileCorrelationGroups[i]; + const correlationGroupPath = path + "/" + i; + if ( + !NgaGpmLocalValidator.validateCorrelationGroup( + correlationGroupPath, + correlationGroup, + context + ) + ) { + result = false; + } + } + return result; + } + + /** + * Validate the given correlationGroup + * + * @param path - The path for validation issues + * @param correlationGroup - The correlationGroup + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateCorrelationGroup( + path: string, + correlationGroup: any, + context: ValidationContext + ): boolean { + let result = true; + + // Validate the groupFlags + const groupFlags = correlationGroup.groupFlags; + const groupFlagsPath = path + "/groupFlags"; + + // The groupFlags MUST be a 3-element array of booleans + const groupFlagsValid = BasicValidator.validateArray( + groupFlagsPath, + "groupFlags", + groupFlags, + 3, + 3, + "boolean", + context + ); + if (!groupFlagsValid) { + result = false; + } + + // Validate the rotationThetas + const rotationThetas = correlationGroup.rotationThetas; + const rotationThetasPath = path + "/rotationThetas"; + + // The rotationThetas MUST be a 3-element array of numbers + const rotationThetasValid = BasicValidator.validateArray( + rotationThetasPath, + "rotationThetas", + rotationThetas, + 3, + 3, + "number", + context + ); + if (!rotationThetasValid) { + result = false; + } + + // Validate the params + const params = correlationGroup.params; + const paramsPath = path + "/params"; + + // The params MUST be a 3-element array of objects + if ( + !BasicValidator.validateArray( + paramsPath, + "params", + params, + 3, + 3, + "object", + context + ) + ) { + result = false; + } else { + // Validate each param (an SPDCF) + for (let i = 0; i < params.length; i++) { + const param = params[i]; + const paramPath = path + "/" + i; + if (!NgaGpmLocalValidator.validateSpdcf(paramPath, param, context)) { + result = false; + } + } + } + return result; + } + + /** + * Validate the given SPDCF (Strictly Positive-Definite Correlation Function) + * + * @param path - The path for validation issues + * @param spdcf - The SPDCF + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateSpdcf( + path: string, + spdcf: any, + context: ValidationContext + ): boolean { + let result = true; + + // Sorry about the names here. I'm trying to be consistent... + + // Validate the A + const A = spdcf.A; + const APath = path + "/A"; + + // The A MUST be a number in (0, 1] + const AValid = BasicValidator.validateNumberRange( + APath, + "A", + A, + 0, + false, + 1, + true, + context + ); + if (!AValid) { + result = false; + } + + // Validate the alpha + const alpha = spdcf.alpha; + const alphaPath = path + "/alpha"; + + // The alpha MUST be a number in [0, 1) + const alphaValid = BasicValidator.validateNumberRange( + alphaPath, + "alpha", + alpha, + 0, + true, + 1, + false, + context + ); + if (!alphaValid) { + result = false; + } + + // Validate the beta + const beta = spdcf.beta; + const betaPath = path + "/beta"; + + // The beta MUST be a number in [0, 10] + const betaValid = BasicValidator.validateNumberRange( + betaPath, + "beta", + beta, + 0, + true, + 10, + true, + context + ); + if (!betaValid) { + result = false; + } + + // Validate the T + const T = spdcf.T; + const TPath = path + "/T"; + + // The T MUST be a number in (0, +Inf) + const TValid = BasicValidator.validateNumberRange( + TPath, + "T", + T, + 0, + false, + undefined, + false, + context + ); + if (!TValid) { + result = false; + } + + return result; + } + + /** + * Validate the given root-level NGA_gpm_local extension object, + * assuming that it already has been checked to contain the + * `storageType === "Direct"`. + * + * @param path - The path for validation issues + * @param gltfGpmLocal - The root-level NGA_gpm_local extension object + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateGltfGpmLocalDirect( + path: string, + gltfGpmLocal: any, + context: ValidationContext + ): boolean { + const storageType = "Direct"; + let result = true; + + // Validate that the properties that are disallowed for + // the storageType===Direct are NOT defined: + const anchorPointsIndirect = gltfGpmLocal.anchorPointsIndirect; + if (defined(anchorPointsIndirect)) { + const message = + `For storageType===${storageType}, ` + + `the 'anchorPointsIndirect' may not be defined`; + const issue = StructureValidationIssues.DISALLOWED_VALUE_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } + + const intraTileCorrelationGroups = gltfGpmLocal.intraTileCorrelationGroups; + if (defined(intraTileCorrelationGroups)) { + const message = + `For storageType===${storageType}, ` + + `the 'intraTileCorrelationGroups' may not be defined`; + const issue = StructureValidationIssues.DISALLOWED_VALUE_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } + + // Validate the anchorPointsDirect + const anchorPointsDirect = gltfGpmLocal.anchorPointsDirect; + const anchorPointsDirectPath = path + "/anchorPointsDirect"; + if (!defined(anchorPointsDirect)) { + const message = + `For storageType===${storageType}, ` + + `the 'anchorPointsDirect' must be defined`; + const issue = StructureValidationIssues.REQUIRED_VALUE_NOT_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } else { + const anchorPointsDirectValid = + NgaGpmLocalValidator.validateAnchorPointsDirect( + anchorPointsDirectPath, + anchorPointsDirect, + context + ); + if (!anchorPointsDirectValid) { + result = false; + } + } + + // Validate the covarianceDirectUpperTriangle + const covarianceDirectUpperTriangle = + gltfGpmLocal.covarianceDirectUpperTriangle; + const covarianceDirectUpperTrianglePath = + path + "/covarianceDirectUpperTriangle"; + if (!defined(covarianceDirectUpperTriangle)) { + const message = + `For storageType===${storageType}, ` + + `the 'covarianceDirectUpperTriangle' must be defined`; + const issue = StructureValidationIssues.REQUIRED_VALUE_NOT_FOUND( + path, + message + ); + context.addIssue(issue); + result = false; + } else { + const covarianceDirectUpperTriangleValid = + NgaGpmLocalValidator.validateCovarianceDirectUpperTriangle( + covarianceDirectUpperTrianglePath, + covarianceDirectUpperTriangle, + context + ); + if (!covarianceDirectUpperTriangleValid) { + result = false; + } + } + return result; + } + + private static validateAnchorPointsDirect( + path: string, + anchorPointsDirect: any, + context: ValidationContext + ): boolean { + // The anchorPointsDirect MUST be an array of objects + if ( + !BasicValidator.validateArray( + path, + "anchorPointsDirect", + anchorPointsDirect, + undefined, + undefined, + "object", + context + ) + ) { + return false; + } + let result = true; + + // Validate each anchorPointDirect + for (let i = 0; i < anchorPointsDirect.length; i++) { + const anchorPointDirect = anchorPointsDirect[i]; + const anchorPointDirectPath = path + "/" + i; + if ( + !NgaGpmLocalValidator.validateAnchorPointDirect( + anchorPointDirectPath, + anchorPointDirect, + context + ) + ) { + result = false; + } + } + return result; + } + + /** + * Validate the given anchorPointDirect + * + * @param path - The path for validation issues + * @param anchorPointDirect - The anchorPointDirect + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateAnchorPointDirect( + path: string, + anchorPointDirect: any, + context: ValidationContext + ): boolean { + let result = true; + + // Validate the position + const position = anchorPointDirect.position; + const positionPath = path + "/position"; + + // The position MUST be a 3-element array of numbers + const positionValid = BasicValidator.validateArray( + positionPath, + "position", + position, + 3, + 3, + "number", + context + ); + if (!positionValid) { + result = false; + } + + // Validate the adjustmentParams + const adjustmentParams = anchorPointDirect.adjustmentParams; + const adjustmentParamsPath = path + "/adjustmentParams"; + + // The adjustmentParams MUST be a 3-element array of numbers + const adjustmentParamsValid = BasicValidator.validateArray( + adjustmentParamsPath, + "adjustmentParams", + adjustmentParams, + 3, + 3, + "number", + context + ); + if (!adjustmentParamsValid) { + result = false; + } + + return result; + } + + /** + * Validate the given covarianceDirectUpperTriangle + * + * @param path - The path for validation issues + * @param covarianceDirectUpperTriangle - The covarianceDirectUpperTriangle + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateCovarianceDirectUpperTriangle( + path: string, + covarianceDirectUpperTriangle: any, + context: ValidationContext + ): boolean { + // The covarianceDirectUpperTriangle MUST be an array of numbers + return BasicValidator.validateArray( + path, + "covarianceDirectUpperTriangle", + covarianceDirectUpperTriangle, + undefined, + undefined, + "number", + context + ); + } + + /** + * Validate the given mesh-primitive NGA_gpm_local extension object + * + * @param path - The path for validation issues + * @param meshPrimitiveGpmLocal - The mesh-primitive NGA_gpm_local extension object + * @param gltf - The glTF that contains this object + * @param meshPrimitive - The mesh primitive that contains this object + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validateMeshPrimitiveGpmLocal( + path: string, + meshPrimitiveGpmLocal: any, + gltf: any, + meshPrimitive: any, + context: ValidationContext + ): boolean { + // Make sure that the given value is an object + if ( + !BasicValidator.validateObject( + path, + "NGA_gpm_local", + meshPrimitiveGpmLocal, + context + ) + ) { + return false; + } + + // Validate the ppeTextures + const ppeTextures = meshPrimitiveGpmLocal.ppeTextures; + const ppeTexturesPath = path + "/ppeTextures"; + + // The ppeTextures MUST be an array of objects + if ( + !BasicValidator.validateArray( + ppeTexturesPath, + "ppeTextures", + ppeTextures, + 1, + undefined, + "object", + context + ) + ) { + return false; + } + + let result = true; + + // Validate each ppeTexture + for (let i = 0; i < ppeTextures.length; i++) { + const ppeTexture = ppeTextures[i]; + const ppeTexturePath = path + "/" + i; + if ( + !NgaGpmLocalValidator.validatePpeTexture( + ppeTexturePath, + ppeTexture, + gltf, + meshPrimitive, + context + ) + ) { + result = false; + } + } + return result; + } + + /** + * Validate the given ppeTexture object + * + * @param path - The path for validation issues + * @param ppeTexture - The ppeTexture object + * @param gltf - The glTF that contains this object + * @param meshPrimitive - The mesh primitive that contains this object + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validatePpeTexture( + path: string, + ppeTexture: any, + gltf: any, + meshPrimitive: any, + context: ValidationContext + ): boolean { + // Make sure that the given value is an object + if ( + !BasicValidator.validateObject(path, "ppeTexture", ppeTexture, context) + ) { + return false; + } + + let result = true; + + // Validate the index (this is part of the textureInfo) + const index = ppeTexture.index; + const indexPath = path + "/index"; + + // The index MUST be defined, and must be a valid texture index + const textures = gltf.textures ?? []; + if ( + !BasicValidator.validateIntegerRange( + indexPath, + "index", + index, + 0, + true, + textures.length, + false, + context + ) + ) { + result = false; + } + + // Validate the texCoord (this is part of the textureInfo) + const texCoord = ppeTexture.texCoord; + const texCoordPath = path + "/texCoord"; + if (defined(texCoord)) { + if ( + !TextureValidator.validateTexCoordForMeshPrimitive( + texCoordPath, + texCoord, + meshPrimitive, + context + ) + ) { + result = false; + } + } + + // Validate the traits + const traits = ppeTexture.traits; + const traitsPath = path + "/traits"; + if ( + !NgaGpmLocalValidator.validatePpeMetadata(traitsPath, traits, context) + ) { + result = false; + } + + // Validate the noData + const noData = ppeTexture.noData; + const noDataPath = path + "/noData"; + + // If noData is defined, then it MUST be an integer + if (defined(noData)) { + if ( + !BasicValidator.validateInteger(noDataPath, "noData", noData, context) + ) { + result = false; + } + } + + // Validate the offset + const offset = ppeTexture.offset; + const offsetPath = path + "/offset"; + + // If offset is defined, then it MUST be a number + if (defined(offset)) { + if ( + !BasicValidator.validateNumber(offsetPath, "offset", offset, context) + ) { + result = false; + } + } + + // Validate the scale + const scale = ppeTexture.scale; + const scalePath = path + "/scale"; + + // If scale is defined, then it MUST be a number + if (defined(scale)) { + if (!BasicValidator.validateNumber(scalePath, "scale", scale, context)) { + result = false; + } + } + + return result; + } + + /** + * Validate the given ppeMetadata object + * + * @param path - The path for validation issues + * @param ppeMetadata - The ppeMetadata object + * @param context - The `ValidationContext` that any issues will be added to + * @returns Whether the object was valid + */ + private static validatePpeMetadata( + path: string, + ppeMetadata: any, + context: ValidationContext + ): boolean { + // Make sure that the given value is an object + if ( + !BasicValidator.validateObject(path, "ppeMetadata", ppeMetadata, context) + ) { + return false; + } + + let result = true; + + // Validate the source + const source = ppeMetadata.source; + const sourcePath = path + "/source"; + + // The source MUST be one of these valid values + const sourceValues = [ + "SIGX", + "SIGY", + "SIGZ", + "VARX", + "VARY", + "VARZ", + "SIGR", + ]; + if ( + !BasicValidator.validateEnum( + sourcePath, + "source", + source, + sourceValues, + context + ) + ) { + result = false; + } + + // Validate the min + const min = ppeMetadata.min; + const minPath = path + "/min"; + + // If min is defined, then it MUST be a number + if (defined(min)) { + if (!BasicValidator.validateNumber(minPath, "min", min, context)) { + result = false; + } + } + + // Validate the max + const max = ppeMetadata.max; + const maxPath = path + "/max"; + + // If max is defined, then it MUST be a number + if (defined(max)) { + if (!BasicValidator.validateNumber(maxPath, "max", max, context)) { + result = false; + } + } + + return result; + } +} From 9f5d0eb934739270f2a5ed5c4de4786a523c52b8 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 19 Oct 2024 18:39:51 +0200 Subject: [PATCH 6/8] Add NGA_gpm_local validation spec --- .../NgaGpmLocalValidationSpec.ts | 657 ++++++++++++++++++ 1 file changed, 657 insertions(+) create mode 100644 specs/gltfExtensions/NgaGpmLocalValidationSpec.ts diff --git a/specs/gltfExtensions/NgaGpmLocalValidationSpec.ts b/specs/gltfExtensions/NgaGpmLocalValidationSpec.ts new file mode 100644 index 00000000..314049f6 --- /dev/null +++ b/specs/gltfExtensions/NgaGpmLocalValidationSpec.ts @@ -0,0 +1,657 @@ +import { validateGltf } from "./validateGltf"; + +describe("NGA_gpm_local extension validation", function () { + it("detects issues in anchorPointDirectAdjustmentParamsInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointDirectAdjustmentParamsInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in anchorPointDirectAdjustmentParamsInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointDirectAdjustmentParamsMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in anchorPointDirectPositionInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in anchorPointDirectPositionInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointDirectPositionMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in anchorPointIndirectAdjustmentParamsInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectAdjustmentParamsInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectAdjustmentParamsInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectAdjustmentParamsMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in anchorPointIndirectCovarianceInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectCovarianceMatrixInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectCovarianceMatrixInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectCovarianceMatrixMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in anchorPointIndirectPositionInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectPositionInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectPositionInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointIndirectPositionMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in anchorPointsDirectInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointsDirectInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointsIndirectInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in anchorPointsIndirectInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupGroupFlagsElementInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsElementInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupGroupFlagsInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in correlationGroupGroupFlagsInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupGroupFlagsMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in correlationGroupParamsInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupParamsInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in correlationGroupParamsInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupParamsMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupParamsMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in correlationGroupRotationThetasInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupRotationThetasInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in correlationGroupRotationThetasInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in correlationGroupRotationThetasMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in directAnchorPointsDirectMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/directAnchorPointsDirectMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("REQUIRED_VALUE_NOT_FOUND"); + }); + + it("detects issues in directCovarianceDirectUpperTriangleMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/directCovarianceDirectUpperTriangleMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("REQUIRED_VALUE_NOT_FOUND"); + }); + + it("detects issues in directWithAnchorPointsIndirect", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/directWithAnchorPointsIndirect.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("DISALLOWED_VALUE_FOUND"); + }); + + it("detects issues in directWithIntraTileCorrelationGroups", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/directWithIntraTileCorrelationGroups.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("DISALLOWED_VALUE_FOUND"); + }); + + it("detects issues in indirectAnchorPointsIndirectMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/indirectAnchorPointsIndirectMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("REQUIRED_VALUE_NOT_FOUND"); + }); + + it("detects issues in indirectIntraTileCorrelationGroupsMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/indirectIntraTileCorrelationGroupsMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("REQUIRED_VALUE_NOT_FOUND"); + }); + + it("detects issues in indirectWithAnchorPointsDirect", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/indirectWithAnchorPointsDirect.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("DISALLOWED_VALUE_FOUND"); + }); + + it("detects issues in indirectWithCovarianceDirectUpperTriangle", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/indirectWithCovarianceDirectUpperTriangle.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("DISALLOWED_VALUE_FOUND"); + }); + + it("detects issues in intraTileCorrelationGroupsInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in intraTileCorrelationGroupsInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in intraTileCorrelationGroupsInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeMetadataMaxInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeMetadataMaxInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeMetadataMinInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeMetadataMinInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeMetadataSourceInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_LIST"); + }); + + it("detects issues in ppeMetadataSourceInvalidValue", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidValue.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_LIST"); + }); + + it("detects issues in ppeTextureIndexInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureIndexInvalidValue", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidValue.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureNoDataInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureNoDataInvalidValue", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidValue.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureOffsetInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureOffsetInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureScaleInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureScaleInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTexturesInvalidElementType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidElementType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_ELEMENT_TYPE_MISMATCH"); + }); + + it("detects issues in ppeTexturesInvalidLength", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidLength.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("ARRAY_LENGTH_MISMATCH"); + }); + + it("detects issues in ppeTexturesInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureTexCoordInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureTexCoordInvalidValue", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidValue.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("IDENTIFIER_NOT_FOUND"); + }); + + it("detects issues in ppeTextureTraitsInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in ppeTextureTraitsMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in spdcfAInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in spdcfAInvalidValueA", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueA.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfAInvalidValueB", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueB.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfAlphaInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in spdcfAlphaInvalidValueA", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueA.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfAlphaInvalidValueB", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueB.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfAlphaMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAlphaMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in spdcfAMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfAMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in spdcfBetaInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in spdcfBetaInvalidValueA", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueA.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfBetaInvalidValueB", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueB.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfBetaMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfBetaMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in spdcfTInvalidType", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfTInvalidType.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("TYPE_MISMATCH"); + }); + + it("detects issues in spdcfTInvalidValue", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfTInvalidValue.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_RANGE"); + }); + + it("detects issues in spdcfTMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/spdcfTMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects issues in storageTypeInvalidValue", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/storageTypeInvalidValue.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("VALUE_NOT_IN_LIST"); + }); + + it("detects issues in storageTypeMissing", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/storageTypeMissing.gltf" + ); + expect(result.length).toEqual(1); + expect(result.get(0).type).toEqual("PROPERTY_MISSING"); + }); + + it("detects no issues in ValidGltfGpmLocal", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ValidGltfGpmLocal.gltf" + ); + expect(result.length).toEqual(0); + }); + + it("detects no issues in ValidMeshPrimitiveGpmLocal", async function () { + const result = await validateGltf( + "./specs/data/gltfExtensions/gpmLocal/ValidMeshPrimitiveGpmLocal.gltf" + ); + expect(result.length).toEqual(0); + }); +}); From ac742e4e00ad7a0acbe949377a22f67ce484fb21 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 19 Oct 2024 18:40:19 +0200 Subject: [PATCH 7/8] Add NGA_gpm_local spec files --- .../gpmLocal/ValidGltfGpmLocal.gltf | 69 ++++++++ .../gpmLocal/ValidMeshPrimitiveGpmLocal.gltf | 131 ++++++++++++++ ...ectAdjustmentParamsInvalidElementType.gltf | 35 ++++ ...ntDirectAdjustmentParamsInvalidLength.gltf | 34 ++++ ...ointDirectAdjustmentParamsInvalidType.gltf | 31 ++++ ...horPointDirectAdjustmentParamsMissing.gltf | 30 ++++ ...nchorPointDirectPositionInvalidLength.gltf | 34 ++++ .../anchorPointDirectPositionInvalidType.gltf | 31 ++++ .../anchorPointDirectPositionMissing.gltf | 30 ++++ ...ectAdjustmentParamsInvalidElementType.gltf | 69 ++++++++ ...IndirectAdjustmentParamsInvalidLength.gltf | 68 ++++++++ ...ntIndirectAdjustmentParamsInvalidType.gltf | 65 +++++++ ...rPointIndirectAdjustmentParamsMissing.gltf | 64 +++++++ ...rPointIndirectCovarianceInvalidLength.gltf | 68 ++++++++ ...ectCovarianceMatrixInvalidElementType.gltf | 69 ++++++++ ...ntIndirectCovarianceMatrixInvalidType.gltf | 62 +++++++ ...rPointIndirectCovarianceMatrixMissing.gltf | 61 +++++++ ...intIndirectPositionInvalidElementType.gltf | 69 ++++++++ ...horPointIndirectPositionInvalidLength.gltf | 68 ++++++++ ...nchorPointIndirectPositionInvalidType.gltf | 65 +++++++ .../anchorPointIndirectPositionMissing.gltf | 64 +++++++ .../anchorPointsDirectInvalidElementType.gltf | 36 ++++ .../anchorPointsDirectInvalidType.gltf | 22 +++ ...nchorPointsIndirectInvalidElementType.gltf | 70 ++++++++ .../anchorPointsIndirectInvalidType.gltf | 48 +++++ ...tionGroupGroupFlagsElementInvalidType.gltf | 69 ++++++++ ...rrelationGroupGroupFlagsInvalidLength.gltf | 70 ++++++++ ...correlationGroupGroupFlagsInvalidType.gltf | 65 +++++++ .../correlationGroupGroupFlagsMissing.gltf | 64 +++++++ ...relationGroupParamsInvalidElementType.gltf | 64 +++++++ .../correlationGroupParamsInvalidLength.gltf | 75 ++++++++ .../correlationGroupParamsInvalidType.gltf | 50 ++++++ .../correlationGroupParamsMissing.gltf | 49 ++++++ ...GroupRotationThetasInvalidElementType.gltf | 69 ++++++++ ...ationGroupRotationThetasInvalidLength.gltf | 70 ++++++++ ...elationGroupRotationThetasInvalidType.gltf | 65 +++++++ ...correlationGroupRotationThetasMissing.gltf | 64 +++++++ .../directAnchorPointsDirectMissing.gltf | 21 +++ ...tCovarianceDirectUpperTriangleMissing.gltf | 35 ++++ .../directWithAnchorPointsIndirect.gltf | 36 ++++ .../directWithIntraTileCorrelationGroups.gltf | 69 ++++++++ .../indirectAnchorPointsIndirectMissing.gltf | 47 +++++ ...rectIntraTileCorrelationGroupsMissing.gltf | 35 ++++ .../indirectWithAnchorPointsDirect.gltf | 70 ++++++++ ...rectWithCovarianceDirectUpperTriangle.gltf | 70 ++++++++ ...leCorrelationGroupsInvalidElementType.gltf | 70 ++++++++ ...traTileCorrelationGroupsInvalidLength.gltf | 165 ++++++++++++++++++ ...intraTileCorrelationGroupsInvalidType.gltf | 36 ++++ .../gpmLocal/ppeMetadataMaxInvalidType.gltf | 131 ++++++++++++++ .../gpmLocal/ppeMetadataMinInvalidType.gltf | 131 ++++++++++++++ .../ppeMetadataSourceInvalidType.gltf | 131 ++++++++++++++ .../ppeMetadataSourceInvalidValue.gltf | 131 ++++++++++++++ .../gpmLocal/ppeTextureIndexInvalidType.gltf | 131 ++++++++++++++ .../gpmLocal/ppeTextureIndexInvalidValue.gltf | 131 ++++++++++++++ .../gpmLocal/ppeTextureNoDataInvalidType.gltf | 131 ++++++++++++++ .../ppeTextureNoDataInvalidValue.gltf | 131 ++++++++++++++ .../gpmLocal/ppeTextureOffsetInvalidType.gltf | 131 ++++++++++++++ .../gpmLocal/ppeTextureScaleInvalidType.gltf | 131 ++++++++++++++ .../ppeTextureTexCoordInvalidType.gltf | 131 ++++++++++++++ .../ppeTextureTexCoordInvalidValue.gltf | 131 ++++++++++++++ .../gpmLocal/ppeTextureTraitsInvalidType.gltf | 127 ++++++++++++++ .../gpmLocal/ppeTextureTraitsMissing.gltf | 126 +++++++++++++ .../ppeTexturesInvalidElementType.gltf | 132 ++++++++++++++ .../gpmLocal/ppeTexturesInvalidLength.gltf | 118 +++++++++++++ .../gpmLocal/ppeTexturesInvalidType.gltf | 118 +++++++++++++ .../gpmLocal/spdcfAInvalidType.gltf | 69 ++++++++ .../gpmLocal/spdcfAInvalidValueA.gltf | 69 ++++++++ .../gpmLocal/spdcfAInvalidValueB.gltf | 69 ++++++++ .../gpmLocal/spdcfAMissing.gltf | 68 ++++++++ .../gpmLocal/spdcfAlphaInvalidType.gltf | 69 ++++++++ .../gpmLocal/spdcfAlphaInvalidValueA.gltf | 69 ++++++++ .../gpmLocal/spdcfAlphaInvalidValueB.gltf | 69 ++++++++ .../gpmLocal/spdcfAlphaMissing.gltf | 68 ++++++++ .../gpmLocal/spdcfBetaInvalidType.gltf | 69 ++++++++ .../gpmLocal/spdcfBetaInvalidValueA.gltf | 69 ++++++++ .../gpmLocal/spdcfBetaInvalidValueB.gltf | 69 ++++++++ .../gpmLocal/spdcfBetaMissing.gltf | 68 ++++++++ .../gpmLocal/spdcfTInvalidType.gltf | 69 ++++++++ .../gpmLocal/spdcfTInvalidValue.gltf | 69 ++++++++ .../gpmLocal/spdcfTMissing.gltf | 68 ++++++++ .../gpmLocal/storageTypeInvalidValue.gltf | 69 ++++++++ .../gpmLocal/storageTypeMissing.gltf | 68 ++++++++ 82 files changed, 6182 insertions(+) create mode 100644 specs/data/gltfExtensions/gpmLocal/ValidGltfGpmLocal.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ValidMeshPrimitiveGpmLocal.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsElementInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupParamsMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/directAnchorPointsDirectMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/directCovarianceDirectUpperTriangleMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/directWithAnchorPointsIndirect.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/directWithIntraTileCorrelationGroups.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/indirectAnchorPointsIndirectMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/indirectIntraTileCorrelationGroupsMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/indirectWithAnchorPointsDirect.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/indirectWithCovarianceDirectUpperTriangle.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeMetadataMaxInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeMetadataMinInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidValue.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidValue.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidValue.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureOffsetInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureScaleInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidValue.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidElementType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidLength.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueA.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueB.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueA.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueB.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfAlphaMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueA.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueB.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfBetaMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfTInvalidType.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfTInvalidValue.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/spdcfTMissing.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/storageTypeInvalidValue.gltf create mode 100644 specs/data/gltfExtensions/gpmLocal/storageTypeMissing.gltf diff --git a/specs/data/gltfExtensions/gpmLocal/ValidGltfGpmLocal.gltf b/specs/data/gltfExtensions/gpmLocal/ValidGltfGpmLocal.gltf new file mode 100644 index 00000000..23d5325c --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ValidGltfGpmLocal.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/ValidMeshPrimitiveGpmLocal.gltf b/specs/data/gltfExtensions/gpmLocal/ValidMeshPrimitiveGpmLocal.gltf new file mode 100644 index 00000000..8b750022 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ValidMeshPrimitiveGpmLocal.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidElementType.gltf new file mode 100644 index 00000000..db753781 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidElementType.gltf @@ -0,0 +1,35 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + "Not a number", + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidLength.gltf new file mode 100644 index 00000000..d1d131ae --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidLength.gltf @@ -0,0 +1,34 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidType.gltf new file mode 100644 index 00000000..23da9042 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsInvalidType.gltf @@ -0,0 +1,31 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : "Not an array" + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsMissing.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsMissing.gltf new file mode 100644 index 00000000..88a4c053 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectAdjustmentParamsMissing.gltf @@ -0,0 +1,30 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidLength.gltf new file mode 100644 index 00000000..18236cd1 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidLength.gltf @@ -0,0 +1,34 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidType.gltf new file mode 100644 index 00000000..4fb5ac3b --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionInvalidType.gltf @@ -0,0 +1,31 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : "Not an array", + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionMissing.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionMissing.gltf new file mode 100644 index 00000000..87001f81 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointDirectPositionMissing.gltf @@ -0,0 +1,30 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidElementType.gltf new file mode 100644 index 00000000..588df9f8 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidElementType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + "Not a number", + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidLength.gltf new file mode 100644 index 00000000..ec59b73d --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidLength.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidType.gltf new file mode 100644 index 00000000..072657ab --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsInvalidType.gltf @@ -0,0 +1,65 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : "Not an array", + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsMissing.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsMissing.gltf new file mode 100644 index 00000000..820e8f29 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectAdjustmentParamsMissing.gltf @@ -0,0 +1,64 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceInvalidLength.gltf new file mode 100644 index 00000000..06ea5309 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceInvalidLength.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidElementType.gltf new file mode 100644 index 00000000..1a99146e --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidElementType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + "Not a number", + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidType.gltf new file mode 100644 index 00000000..87da34f1 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixInvalidType.gltf @@ -0,0 +1,62 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : "Not an array" + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixMissing.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixMissing.gltf new file mode 100644 index 00000000..0d72536d --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectCovarianceMatrixMissing.gltf @@ -0,0 +1,61 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidElementType.gltf new file mode 100644 index 00000000..3e08b020 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidElementType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + "Not a number", + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidLength.gltf new file mode 100644 index 00000000..59af098b --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidLength.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidType.gltf new file mode 100644 index 00000000..de1d2b56 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionInvalidType.gltf @@ -0,0 +1,65 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : "Not an array", + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionMissing.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionMissing.gltf new file mode 100644 index 00000000..a8d57fe3 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointIndirectPositionMissing.gltf @@ -0,0 +1,64 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidElementType.gltf new file mode 100644 index 00000000..1cdb4f18 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidElementType.gltf @@ -0,0 +1,36 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + "Not an object", + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidType.gltf new file mode 100644 index 00000000..68ed8c30 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointsDirectInvalidType.gltf @@ -0,0 +1,22 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : "Not an array", + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidElementType.gltf new file mode 100644 index 00000000..0071dd37 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidElementType.gltf @@ -0,0 +1,70 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + "Not an object", + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidType.gltf new file mode 100644 index 00000000..3ffa8381 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/anchorPointsIndirectInvalidType.gltf @@ -0,0 +1,48 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : "Not an array", + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsElementInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsElementInvalidType.gltf new file mode 100644 index 00000000..9a0a747f --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsElementInvalidType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + "Not a boolean", + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidLength.gltf new file mode 100644 index 00000000..304e60eb --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidLength.gltf @@ -0,0 +1,70 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidType.gltf new file mode 100644 index 00000000..d4f674c5 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsInvalidType.gltf @@ -0,0 +1,65 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : "Not an array", + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsMissing.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsMissing.gltf new file mode 100644 index 00000000..2aae7ef5 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupGroupFlagsMissing.gltf @@ -0,0 +1,64 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidElementType.gltf new file mode 100644 index 00000000..47fe0d96 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidElementType.gltf @@ -0,0 +1,64 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + "Not an object", + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidLength.gltf new file mode 100644 index 00000000..2e213e90 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidLength.gltf @@ -0,0 +1,75 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidType.gltf new file mode 100644 index 00000000..f89ffdb9 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsInvalidType.gltf @@ -0,0 +1,50 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : "Not an array" + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsMissing.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsMissing.gltf new file mode 100644 index 00000000..a74549f0 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupParamsMissing.gltf @@ -0,0 +1,49 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidElementType.gltf new file mode 100644 index 00000000..260a5b35 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidElementType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + "Not a number", + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidLength.gltf new file mode 100644 index 00000000..4207eb02 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidLength.gltf @@ -0,0 +1,70 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.9, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidType.gltf new file mode 100644 index 00000000..0b4b048f --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasInvalidType.gltf @@ -0,0 +1,65 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : "Not an array", + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasMissing.gltf b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasMissing.gltf new file mode 100644 index 00000000..4a9fd8b6 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/correlationGroupRotationThetasMissing.gltf @@ -0,0 +1,64 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/directAnchorPointsDirectMissing.gltf b/specs/data/gltfExtensions/gpmLocal/directAnchorPointsDirectMissing.gltf new file mode 100644 index 00000000..9c38c431 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/directAnchorPointsDirectMissing.gltf @@ -0,0 +1,21 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/directCovarianceDirectUpperTriangleMissing.gltf b/specs/data/gltfExtensions/gpmLocal/directCovarianceDirectUpperTriangleMissing.gltf new file mode 100644 index 00000000..4cefc0e2 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/directCovarianceDirectUpperTriangleMissing.gltf @@ -0,0 +1,35 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/directWithAnchorPointsIndirect.gltf b/specs/data/gltfExtensions/gpmLocal/directWithAnchorPointsIndirect.gltf new file mode 100644 index 00000000..a235df56 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/directWithAnchorPointsIndirect.gltf @@ -0,0 +1,36 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsIndirect" : [], + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/directWithIntraTileCorrelationGroups.gltf b/specs/data/gltfExtensions/gpmLocal/directWithIntraTileCorrelationGroups.gltf new file mode 100644 index 00000000..ec9eab51 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/directWithIntraTileCorrelationGroups.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Direct", + "anchorPointsDirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ] + } + ], + "covarianceDirectUpperTriangle" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/indirectAnchorPointsIndirectMissing.gltf b/specs/data/gltfExtensions/gpmLocal/indirectAnchorPointsIndirectMissing.gltf new file mode 100644 index 00000000..d0bb0099 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/indirectAnchorPointsIndirectMissing.gltf @@ -0,0 +1,47 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/indirectIntraTileCorrelationGroupsMissing.gltf b/specs/data/gltfExtensions/gpmLocal/indirectIntraTileCorrelationGroupsMissing.gltf new file mode 100644 index 00000000..8a0f69f8 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/indirectIntraTileCorrelationGroupsMissing.gltf @@ -0,0 +1,35 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/indirectWithAnchorPointsDirect.gltf b/specs/data/gltfExtensions/gpmLocal/indirectWithAnchorPointsDirect.gltf new file mode 100644 index 00000000..c55c2098 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/indirectWithAnchorPointsDirect.gltf @@ -0,0 +1,70 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsDirect" : [], + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/indirectWithCovarianceDirectUpperTriangle.gltf b/specs/data/gltfExtensions/gpmLocal/indirectWithCovarianceDirectUpperTriangle.gltf new file mode 100644 index 00000000..8707cca0 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/indirectWithCovarianceDirectUpperTriangle.gltf @@ -0,0 +1,70 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "covarianceDirectUpperTriangle" : [], + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidElementType.gltf new file mode 100644 index 00000000..0fa91f8c --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidElementType.gltf @@ -0,0 +1,70 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + "Not an object", + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidLength.gltf new file mode 100644 index 00000000..009c2747 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidLength.gltf @@ -0,0 +1,165 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + }, + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + }, + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + }, + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidType.gltf new file mode 100644 index 00000000..ae4204ed --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/intraTileCorrelationGroupsInvalidType.gltf @@ -0,0 +1,36 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : "Not an array" + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/ppeMetadataMaxInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeMetadataMaxInvalidType.gltf new file mode 100644 index 00000000..f56e839c --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeMetadataMaxInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": "Not a number" + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeMetadataMinInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeMetadataMinInvalidType.gltf new file mode 100644 index 00000000..f795dac2 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeMetadataMinInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": "Not a number", + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidType.gltf new file mode 100644 index 00000000..30a1c7b1 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": 123.456, + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidValue.gltf b/specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidValue.gltf new file mode 100644 index 00000000..ac7f1a94 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeMetadataSourceInvalidValue.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "NOT_A_VALID_SOURCE", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidType.gltf new file mode 100644 index 00000000..23d17ccb --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": "Not a number", + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidValue.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidValue.gltf new file mode 100644 index 00000000..58973681 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureIndexInvalidValue.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 123.456, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidType.gltf new file mode 100644 index 00000000..069785a0 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": "Not a number", + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidValue.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidValue.gltf new file mode 100644 index 00000000..b58dfc28 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureNoDataInvalidValue.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 123.456, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureOffsetInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureOffsetInvalidType.gltf new file mode 100644 index 00000000..9ce35134 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureOffsetInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": "Not a number", + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureScaleInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureScaleInvalidType.gltf new file mode 100644 index 00000000..87986a63 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureScaleInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": "Not a number", + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidType.gltf new file mode 100644 index 00000000..aeb910c3 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidType.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": "Not a number" + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidValue.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidValue.gltf new file mode 100644 index 00000000..0abbc95c --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureTexCoordInvalidValue.gltf @@ -0,0 +1,131 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 12345 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsInvalidType.gltf new file mode 100644 index 00000000..8c0206b9 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsInvalidType.gltf @@ -0,0 +1,127 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "traits": "Not an object", + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsMissing.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsMissing.gltf new file mode 100644 index 00000000..b1cb4574 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTextureTraitsMissing.gltf @@ -0,0 +1,126 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + { + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidElementType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidElementType.gltf new file mode 100644 index 00000000..4b1db435 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidElementType.gltf @@ -0,0 +1,132 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [ + "Not an object", + { + "traits": { + "source": "SIGZ", + "min": 0.0, + "max": 16.0 + }, + "index": 0, + "noData": 255, + "offset": 0.0, + "scale": 0.06274509803921569, + "texCoord": 0 + } + ] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidLength.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidLength.gltf new file mode 100644 index 00000000..5351496a --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidLength.gltf @@ -0,0 +1,118 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": [] + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidType.gltf new file mode 100644 index 00000000..e1dfe58a --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/ppeTexturesInvalidType.gltf @@ -0,0 +1,118 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "max": [3], + "min": [0] + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [1.0, 1.0, 0.0], + "min": [0.0, 0.0, 0.0] + }, + { + "bufferView": 1, + "byteOffset": 48, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [0.0, 0.0, 1.0], + "min": [0.0, 0.0, 1.0] + }, + { + "bufferView": 1, + "byteOffset": 96, + "componentType": 5126, + "count": 4, + "type": "VEC2", + "max": [1.0, 1.0], + "min": [0.0, 0.0] + } + ], + "asset": { + "generator": "JglTF from https://github.com/javagl/JglTF", + "version": "2.0" + }, + "buffers": [ + { + "uri": "data:application/gltf-buffer;base64,AAABAAIAAQADAAIAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAA", + "byteLength": 156 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 12, + "target": 34963 + }, + { + "buffer": 0, + "byteOffset": 12, + "byteLength": 144, + "byteStride": 12, + "target": 34962 + } + ], + "images": [ + { + "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR42hXMUwCWBwBA0b8Wlo1lLHNt2a4tLZtbrdZatm1jWcu2bSxrtWq1Zds438O5jzcUCoU+hSEsXxCO8EQgIl8SichEISrRiE4MQjElFrGJQ1ziEZ8EJOQrEpGYJCQlGcmDQQpJSSpS8zVpSEs60pOBjGQiM1nISrZgkF2+IQff8h05yUVu8pCXfOSnAAUpROFgUESKUozilKAkpShNGcryPT9QjvJUoGIwqCQ/UpkqVKUa1alBTWpRmzrUpR71aRAMGkojGtOEn/iZpjTjF5rTgl9pyW+04vdg0Fra0JZ2tKcDHelEZ7rQlW50pwc96RUMeksf+tKP/gxgIIMYzBCGMozhjGAko4LBaBnDWMYxnglMZBJ/MJkpTGUa05nBzGAwS2Yzh7n8yTzms4CFLGIxS1jKMpazIhislFWsZg1rWcd6NrCRTWxmC1vZxnZ2BIOdsovd7GEv+9jPAQ5yiMMc4Sh/cYzjweCEnOQUpznDWc5xngv8zUUu8Q+XucLVYPCvXOM6//E/N7jJLW5zh7vc4z4PeMijYPBYnvCUZzznBS95xWve8JZ3vOcDH/nEZ7gvfpBCxLDKAAAAAElFTkSuQmCC", + "mimeType": "image/png" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "mode": 4, + + "extensions": { + "NGA_gpm_local": { + "ppeTextures": "Not an array" + } + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "samplers": [ + { + "magFilter": 9728, + "minFilter": 9728, + "wrapS": 33071, + "wrapT": 33071 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [0] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": ["NGA_gpm_local"] +} diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidType.gltf new file mode 100644 index 00000000..1adf6364 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : "Not a number", + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueA.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueA.gltf new file mode 100644 index 00000000..a7094428 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueA.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 0.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueB.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueB.gltf new file mode 100644 index 00000000..dd2b9f73 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAInvalidValueB.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.1, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAMissing.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAMissing.gltf new file mode 100644 index 00000000..c9e53ccd --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAMissing.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidType.gltf new file mode 100644 index 00000000..d2183082 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : "Not a number", + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueA.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueA.gltf new file mode 100644 index 00000000..672fb857 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueA.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : -0.1, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueB.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueB.gltf new file mode 100644 index 00000000..c8681c24 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaInvalidValueB.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 1.0, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfAlphaMissing.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaMissing.gltf new file mode 100644 index 00000000..f045838a --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfAlphaMissing.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidType.gltf new file mode 100644 index 00000000..1ffa55bd --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : "Not a number", + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueA.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueA.gltf new file mode 100644 index 00000000..34d2d323 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueA.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : -0.1, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueB.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueB.gltf new file mode 100644 index 00000000..d2cc35a7 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfBetaInvalidValueB.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 10.1, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfBetaMissing.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfBetaMissing.gltf new file mode 100644 index 00000000..46addc8e --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfBetaMissing.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfTInvalidType.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfTInvalidType.gltf new file mode 100644 index 00000000..9accd1ab --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfTInvalidType.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : "Not a number" + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfTInvalidValue.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfTInvalidValue.gltf new file mode 100644 index 00000000..7ed6704a --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfTInvalidValue.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 0.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/spdcfTMissing.gltf b/specs/data/gltfExtensions/gpmLocal/spdcfTMissing.gltf new file mode 100644 index 00000000..6d1c0972 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/spdcfTMissing.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : "Indirect", + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/storageTypeInvalidValue.gltf b/specs/data/gltfExtensions/gpmLocal/storageTypeInvalidValue.gltf new file mode 100644 index 00000000..03c3d384 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/storageTypeInvalidValue.gltf @@ -0,0 +1,69 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "storageType" : 12345, + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specs/data/gltfExtensions/gpmLocal/storageTypeMissing.gltf b/specs/data/gltfExtensions/gpmLocal/storageTypeMissing.gltf new file mode 100644 index 00000000..4f1a0488 --- /dev/null +++ b/specs/data/gltfExtensions/gpmLocal/storageTypeMissing.gltf @@ -0,0 +1,68 @@ +{ + "asset" : { + "version" : "2.0" + }, + "extensionsUsed" : [ + "NGA_gpm_local" + ], + "extensions" : { + "NGA_gpm_local" : { + "anchorPointsIndirect" : [ + { + "position" : [ + 12.34, + 23.45, + 34.56 + ], + "adjustmentParams" : [ + 0.1, + 0.2, + 0.3 + ], + "covarianceMatrix" : [ + 0.1833647900304413, + -0.093582914309524, + 0.4550734755685732, + 0.0572007221435672, + -0.18392374133036396, + 0.27486040919852534 + ] + } + ], + "intraTileCorrelationGroups" : [ + { + "groupFlags" : [ + true, + true, + true + ], + "rotationThetas" : [ + 0.1, + 0.2, + 0.3 + ], + "params" : [ + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + }, + { + "A" : 1.0, + "alpha" : 0.99, + "beta" : 0.0, + "T" : 10000.0 + } + ] + } + ] + } + } +} \ No newline at end of file From 838d43219b797eb8e2fe0e0d35f19b803f8c046d Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 19 Oct 2024 18:50:07 +0200 Subject: [PATCH 8/8] Formatting --- src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts b/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts index f90cd37c..328dab60 100644 --- a/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts +++ b/src/validation/gltf/gpmLocal/NgaGpmLocalValidator.ts @@ -8,7 +8,6 @@ import { GltfData } from "../GltfData"; import { StructureValidationIssues } from "../../../issues/StructureValidationIssues"; import { TextureValidator } from "../TextureValidator"; - /** * A class for validating the `NGA_gpm_local` extension in glTF assets. *