Skip to content

Commit

Permalink
Remove check for known extension prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emackey committed May 17, 2024
1 parent 2b8bd0f commit 4e52d42
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 127 deletions.
3 changes: 0 additions & 3 deletions lib/src/context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ class Context {
if (prefix == null) {
addIssue(SemanticError.invalidExtensionNameFormat,
name: '/$EXTENSIONS_USED/$i');
} else if (!kReservedPrefixes.contains(prefix)) {
addIssue(SemanticError.unreservedExtensionPrefix,
name: '/$EXTENSIONS_USED/$i', args: [prefix]);
}

final extension = _userExtensions.firstWhere(
Expand Down
5 changes: 0 additions & 5 deletions lib/src/errors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,6 @@ class SemanticError extends IssueType {
'NON_REQUIRED_EXTENSION',
(args) => 'Extension ${_q(args[0])} cannot be optional.');

static final SemanticError unreservedExtensionPrefix = SemanticError._(
'UNRESERVED_EXTENSION_PREFIX',
(args) => 'Extension uses unreserved extension prefix ${_q(args[0])}.',
Severity.Warning);

static final SemanticError invalidExtensionNameFormat = SemanticError._(
'INVALID_EXTENSION_NAME_FORMAT',
(args) => 'Extension name has invalid format.',
Expand Down
68 changes: 0 additions & 68 deletions lib/src/ext/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,71 +113,3 @@ const List<Extension> kDefaultExtensions = <Extension>[
khrMeshQuantizationExtension,
khrTextureTransformExtension
];

// https://github.com/KhronosGroup/glTF/blob/main/extensions/Prefixes.md
const Set<String> kReservedPrefixes = <String>{
'KHR',
'EXT',
'ADOBE',
'AGI',
'AGT',
'ALCM',
'ALI',
'AMZN',
'ANIMECH',
'ASOBO',
'AVR',
'BLENDER',
'CAPTURE',
'CESIUM',
'CITRUS',
'CLO',
'CVTOOLS',
'DOTV',
'EMBARK',
'EPIC',
'ESSILORLUXOTTICA',
'F8',
'FB',
'FOXIT',
'GOOGLE',
'GRIFFEL',
'HEVOLUS',
'INTEL',
'KDAB',
'LLQ',
'MAXAR',
'MESHOPT',
'MOZ',
'MPEG',
'MSFT',
'MTTR',
'MX',
'NEEDLE',
'NTAR',
'NV',
'OFT',
'OMI',
'OTOY',
'OWLII',
'PANDA3D',
'POLUTROPON',
'PTC',
'S8S',
'SE',
'SEIN',
'SHAPEDIVER',
'SI',
'SKFB',
'SKYLINE',
'SNAP',
'SPECTRUM',
'TENCENT',
'TRYON',
'UNITY',
'USSF',
'UX3D',
'VRMC',
'VSEKAI',
'WEB3D'
};
1 change: 0 additions & 1 deletion test/base/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@
"invalid_extension_name.gltf": "Invalid extension name",
"named_objects.gltf": "Valid named objects",
"undefined_used_extensions.gltf": "Undefined used extensions array",
"unreserved_extension_prefix.gltf": "Unreserved extension prefix",
"unused_objects.gltf": "Unused objects",
"valid.gltf": "Valid"
}
Expand Down
6 changes: 0 additions & 6 deletions test/base/data/root/unreserved_extension_prefix.gltf

This file was deleted.

44 changes: 0 additions & 44 deletions test/base/data/root/unreserved_extension_prefix.gltf.report.json

This file was deleted.

0 comments on commit 4e52d42

Please sign in to comment.