Skip to content

Commit

Permalink
Version 2.0.0-dev.3.6 (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
lexaknyazev authored Apr 9, 2022
1 parent e60dd6d commit 20db52c
Show file tree
Hide file tree
Showing 136 changed files with 2,228 additions and 508 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ jobs:
build:
runs-on: ubuntu-latest

# Note that this workflow uses the latest stable version of the Dart SDK.
# Docker images for other release channels - like dev and beta - are also
# available. See https://hub.docker.com/r/google/dart/ for the available
# images.
container:
image: google/dart:latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- uses: dart-lang/[email protected]

- name: Print Dart SDK version
run: dart --version
Expand Down
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
## 2.0.0-dev.3.6

### New Features

* Added support for `KHR_materials_emissive_strength` extension; added `KHR_MATERIALS_EMISSIVE_STRENGTH_ZERO_FACTOR` warning.

* Added `KHR_MATERIALS_VOLUME_NO_TRANSMISSION` warning.

* Added 10 new vendor prefixes.

* Added allowed accessor formats for `TEXCOORD_n` and `COLOR_n` morph target attributes.

* Added `ANIMATION_SAMPLER_ACCESSOR_WITH_BYTESTRIDE` error.

* Added `BUFFER_BYTE_LENGTH_MISMATCH` error.

* Added `BUFFER_VIEW_TARGET_MISSING` hint.

* Added `CAMERA_XMAG_YMAG_NEGATIVE` warning.

* Added `GLB_EMPTY_BIN_CHUNK` info.

* Added `URI_GLB` info.

* Added `UNUSED_MESH_WEIGHTS` and `UNUSED_MESH_TANGENT` infos.

### Changes

* Skipped range-checking for vertex color attributes not defined in the spec.

* Data URIs with content not matching the declared `mediatype` now trigger `INVALID_URI` error.

* Updated `INVALID_IBM_ACCESSOR_COUNT` validation logic and message.

* Updated `MESH_PRIMITIVE_MORPH_TARGET_NO_BASE_ACCESSOR` validation message.

* Fixed JSON-pointers for `IMAGE_MIME_TYPE_INVALID` error.

* Changed `ASSET_MIN_VERSION_GREATER_THAN_VERSION` default severity to Error.

* Changed `CAMERA_XMAG_YMAG_ZERO` default severity to Error.

* Changed `DATA_URI_GLB` default severity to Warning.

* Removed `BUFFER_EMBEDDED_BYTELENGTH_MISMATCH` error.

* Removed `BUFFER_EXTERNAL_BYTELENGTH_MISMATCH` error.

* Removed `INTEGER_WRITTEN_AS_FLOAT` warning.

* Removed `MESH_PRIMITIVE_TANGENT_POINTS` and `MESH_PRIMITIVES_UNEQUAL_JOINTS_COUNT` validation issues.

### Bugfixes

* Fixed false positive `NODE_EMPTY` caused by unknown extensions.

* Fixed assertion on JSON arrays containing numbers that do not fit into double precision.

* Made `BUFFER_DATA_URI_MIME_TYPE_INVALID` validation case-insensitive.

* Tightened JPEG and WebP detection logic.

## 2.0.0-dev.3.5

### Integration updates
Expand Down
27 changes: 16 additions & 11 deletions ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@
|ACCESSOR_OFFSET_ALIGNMENT|Offset `%1` is not a multiple of componentType length `%2`.|Error|
|ACCESSOR_SPARSE_COUNT_OUT_OF_RANGE|Sparse accessor overrides more elements (`%1`) than the base accessor contains (`%2`).|Error|
|ANIMATION_CHANNEL_TARGET_NODE_SKIN|Animated TRS properties will not affect a skinned mesh.|Warning|
|ASSET_MIN_VERSION_GREATER_THAN_VERSION|Asset minVersion '`%1`' is greater than version '`%2`'.|Warning|
|BUFFER_DATA_URI_MIME_TYPE_INVALID|Buffer's Data URI MIME-Type must be 'application/octet-stream' or 'application/gltf-buffer'. Found '`%1`' instead.|Error|
|ASSET_MIN_VERSION_GREATER_THAN_VERSION|Asset minVersion '`%1`' is greater than version '`%2`'.|Error|
|BUFFER_DATA_URI_MIME_TYPE_INVALID|Data URI media type must be 'application/octet-stream' or 'application/gltf-buffer'. Found '`%1`' instead.|Error|
|BUFFER_VIEW_INVALID_BYTE_STRIDE|Only buffer views with raw vertex data can have byteStride.|Error|
|BUFFER_VIEW_TOO_BIG_BYTE_STRIDE|Buffer view's byteStride (`%1`) is greater than byteLength (`%2`).|Error|
|CAMERA_XMAG_YMAG_ZERO|xmag and ymag must not be zero.|Warning|
|CAMERA_XMAG_YMAG_NEGATIVE|xmag and ymag should not be negative.|Warning|
|CAMERA_XMAG_YMAG_ZERO|xmag and ymag must not be zero.|Error|
|CAMERA_YFOV_GEQUAL_PI|yfov should be less than Pi.|Warning|
|CAMERA_ZFAR_LEQUAL_ZNEAR|zfar must be greater than znear.|Error|
|EXTRA_PROPERTY|This property should not be defined as it will not be used.|Information|
|INTEGER_WRITTEN_AS_FLOAT|Integer value is written with fractional part: `%1`.|Warning|
|INVALID_EXTENSION_NAME_FORMAT|Extension name has invalid format.|Warning|
|INVALID_GL_VALUE|Invalid value `%1` for GL type '`%2`'.|Error|
|KHR_LIGHTS_PUNCTUAL_LIGHT_SPOT_ANGLES|outerConeAngle (`%2`) is less than or equal to innerConeAngle (`%1`).|Error|
|KHR_MATERIALS_EMISSIVE_STRENGTH_ZERO_FACTOR|Emissive strength has no effect when the emissive factor is zero or undefined.|Warning|
|KHR_MATERIALS_VOLUME_NO_TRANSMISSION|The volume extension needs to be combined with an extension that allows light to transmit through the surface.|Warning|
|MATERIAL_ALPHA_CUTOFF_INVALID_MODE|Alpha cutoff is supported only for 'MASK' alpha mode.|Warning|
|MESH_INVALID_WEIGHTS_COUNT|The length of weights array (`%1`) does not match the number of morph targets (`%2`).|Error|
|MESH_PRIMITIVES_UNEQUAL_JOINTS_COUNT|All primitives should contain the same number of 'JOINTS' and 'WEIGHTS' attribute sets.|Warning|
|MESH_PRIMITIVES_UNEQUAL_TARGETS_COUNT|All primitives must have the same number of morph targets.|Error|
|MESH_PRIMITIVE_INDEXED_SEMANTIC_CONTINUITY|Indices for indexed attribute semantic '`%1`' must start with 0 and be continuous. Total expected indices: `%2`, total provided indices: `%3`.|Error|
|MESH_PRIMITIVE_INVALID_ATTRIBUTE|Invalid attribute name.|Error|
|MESH_PRIMITIVE_JOINTS_WEIGHTS_MISMATCH|Number of JOINTS attribute semantics (`%1`) does not match the number of WEIGHTS (`%2`).|Error|
|MESH_PRIMITIVE_NO_POSITION|No POSITION attribute found.|Warning|
|MESH_PRIMITIVE_TANGENT_POINTS|TANGENT attribute defined for POINTS rendering mode.|Warning|
|MESH_PRIMITIVE_TANGENT_WITHOUT_NORMAL|TANGENT attribute without NORMAL found.|Warning|
|MULTIPLE_EXTENSIONS|This extension may be incompatible with other extensions for the object.|Warning|
|NODE_EMPTY|Empty node encountered.|Information|
Expand Down Expand Up @@ -81,16 +81,18 @@
|ANIMATION_CHANNEL_TARGET_NODE_MATRIX|Animation channel cannot target TRS properties of a node with defined matrix.|Error|
|ANIMATION_CHANNEL_TARGET_NODE_WEIGHTS_NO_MORPHS|Animation channel cannot target WEIGHTS when mesh does not have morph targets.|Error|
|ANIMATION_DUPLICATE_TARGETS|Animation channel has the same target as channel `%1`.|Error|
|ANIMATION_SAMPLER_ACCESSOR_WITH_BYTESTRIDE|bufferView.byteStride must not be defined for buffer views used by animation sampler accessors.|Error|
|ANIMATION_SAMPLER_INPUT_ACCESSOR_INVALID_FORMAT|Invalid Animation sampler input accessor format '`%1`'. Must be one of ('`%a`', '`%b`', '`%c`').|Error|
|ANIMATION_SAMPLER_INPUT_ACCESSOR_TOO_FEW_ELEMENTS|Animation sampler output accessor with '`%1`' interpolation must have at least `%2` elements. Got `%3`.|Error|
|ANIMATION_SAMPLER_INPUT_ACCESSOR_WITHOUT_BOUNDS|accessor.min and accessor.max must be defined for animation input accessor.|Error|
|ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_COUNT|Animation sampler output accessor of count `%1` expected. Found `%2`.|Error|
|ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_FORMAT|Invalid animation sampler output accessor format '`%1`' for path '`%3`'. Must be one of ('`%a`', '`%b`', '`%c`').|Error|
|BUFFER_MISSING_GLB_DATA|Buffer refers to an unresolved GLB binary chunk.|Error|
|BUFFER_VIEW_TARGET_MISSING|bufferView.target should be set for vertex or index data.|Hint|
|BUFFER_VIEW_TARGET_OVERRIDE|Override of previously set bufferView target or usage. Initial: '`%1`', new: '`%2`'.|Error|
|BUFFER_VIEW_TOO_LONG|BufferView does not fit buffer (`%1`) byteLength (`%2`).|Error|
|IMAGE_BUFFER_VIEW_WITH_BYTESTRIDE|bufferView.byteStride must not be defined for buffer views containing image data.|Error|
|INVALID_IBM_ACCESSOR_COUNT|Accessor of count `%1` expected. Found `%2`.|Error|
|INVALID_IBM_ACCESSOR_COUNT|IBM accessor must have at least `%1` elements. Found `%2`.|Error|
|KHR_MATERIALS_VARIANTS_NON_UNIQUE_VARIANT|This variant is used more than once for this mesh primitive.|Error|
|MESH_PRIMITIVE_ACCESSOR_UNALIGNED|Vertex attribute data must be aligned to 4-byte boundaries.|Error|
|MESH_PRIMITIVE_ACCESSOR_WITHOUT_BYTESTRIDE|bufferView.byteStride must be defined when two or more accessors use the same buffer view.|Error|
Expand All @@ -100,7 +102,7 @@
|MESH_PRIMITIVE_INDICES_ACCESSOR_INVALID_FORMAT|Invalid indices accessor format '`%1`'. Must be one of ('`%a`', '`%b`', '`%c`'). |Error|
|MESH_PRIMITIVE_INDICES_ACCESSOR_WITH_BYTESTRIDE|bufferView.byteStride must not be defined for indices accessor.|Error|
|MESH_PRIMITIVE_MORPH_TARGET_INVALID_ATTRIBUTE_COUNT|Base accessor has different count.|Error|
|MESH_PRIMITIVE_MORPH_TARGET_NO_BASE_ACCESSOR|No base accessor for this attribute semantic.|Error|
|MESH_PRIMITIVE_MORPH_TARGET_NO_BASE_ACCESSOR|The mesh primitive does not define this attribute semantic.|Error|
|MESH_PRIMITIVE_POSITION_ACCESSOR_WITHOUT_BOUNDS|accessor.min and accessor.max must be defined for POSITION attribute accessor.|Error|
|MESH_PRIMITIVE_TOO_FEW_TEXCOORDS|Material is incompatible with mesh primitive: Texture binding '`%1`' needs 'TEXCOORD_`%2`' attribute.|Error|
|MESH_PRIMITIVE_UNEQUAL_ACCESSOR_COUNT|All accessors of the same primitive must have the same count.|Error|
Expand All @@ -117,6 +119,8 @@
|UNEXPECTED_EXTENSION_OBJECT|Unexpected location for this extension.|Error|
|UNRESOLVED_REFERENCE|Unresolved reference: `%1`.|Error|
|UNSUPPORTED_EXTENSION|Cannot validate an extension as it is not supported by the validator: '`%1`'.|Information|
|UNUSED_MESH_TANGENT|Tangents are not used because the material has no normal texture.|Information|
|UNUSED_MESH_WEIGHTS|The static morph target weights are always overridden.|Information|
|UNUSED_OBJECT|This object may be unused.|Information|
## DataError
| Code | Message | Severity |
Expand All @@ -143,23 +147,24 @@
|ACCESSOR_VECTOR3_NON_UNIT|Vector3 at accessor indices `%1`..`%2` is not of unit length: `%3`.|Error|
|ACCESSOR_WEIGHTS_NEGATIVE|Weights accessor element at index `%1` (component index `%2`) has negative value `%3`.|Error|
|ACCESSOR_WEIGHTS_NON_NORMALIZED|Weights accessor elements (at indices `%1`..`%2`) have non-normalized sum: `%3`.|Error|
|BUFFER_EMBEDDED_BYTELENGTH_MISMATCH|Actual Data URI encoded data length `%1` is not equal to the declared buffer byteLength `%2`.|Error|
|BUFFER_EXTERNAL_BYTELENGTH_MISMATCH|Actual data length `%1` is less than the declared buffer byteLength `%2`.|Error|
|BUFFER_BYTE_LENGTH_MISMATCH|Actual data byte length (`%1`) is less than the declared buffer byte length (`%2`).|Error|
|BUFFER_GLB_CHUNK_TOO_BIG|GLB-stored BIN chunk contains `%1` extra padding byte(s).|Warning|
|DATA_URI_GLB|Data URI is used in GLB container.|Information|
|DATA_URI_GLB|Data URI is used in GLB container.|Warning|
|IMAGE_DATA_INVALID|Image data is invalid. `%1`|Error|
|IMAGE_FEATURES_UNSUPPORTED|Image contains unsupported features like non-default colorspace information, non-square pixels, or animation.|Warning|
|IMAGE_MIME_TYPE_INVALID|Recognized image format '`%1`' does not match declared image format '`%2`'.|Error|
|IMAGE_NON_ENABLED_MIME_TYPE|'`%1`' MIME type requires an extension.|Error|
|IMAGE_NPOT_DIMENSIONS|Image has non-power-of-two dimensions: `%1`x`%2`.|Information|
|IMAGE_UNEXPECTED_EOS|Unexpected end of image stream.|Error|
|IMAGE_UNRECOGNIZED_FORMAT|Image format not recognized.|Warning|
|URI_GLB|URI is used in GLB container.|Information|
## GlbError
| Code | Message | Severity |
|------|---------|----------|
|GLB_CHUNK_LENGTH_UNALIGNED|Length of `%1` chunk is not aligned to 4-byte boundaries.|Error|
|GLB_CHUNK_TOO_BIG|Chunk (`%1`) length (`%2`) does not fit total GLB length.|Error|
|GLB_DUPLICATE_CHUNK|Chunk of type `%1` has already been used.|Error|
|GLB_EMPTY_BIN_CHUNK|Empty BIN chunk should be omitted.|Information|
|GLB_EMPTY_CHUNK|Chunk (`%1`) cannot have zero length.|Error|
|GLB_INVALID_MAGIC|Invalid GLB magic value (`%1`).|Error|
|GLB_INVALID_VERSION|Invalid GLB version value `%1`.|Error|
Expand Down
73 changes: 18 additions & 55 deletions NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -61,37 +61,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

charcode

Copyright 2014, the Dart project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

collection

Copyright 2015, the Dart project authors. All rights reserved.
Expand Down Expand Up @@ -365,32 +334,26 @@ freely, subject to the following restrictions:

yaml

Copyright 2014, the Dart project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Copyright (c) 2014, the Dart project authors.
Copyright (c) 2006, Kirill Simonov.

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------------------

Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://github.com/KhronosGroup/glTF/raw/master/specification/figures/gltf.png" alt=""/>
<img src="web/logos/glTF_RGB_June16.svg" alt="" height="250"/>
</p>

# glTF-Validator
Expand All @@ -8,7 +8,7 @@

Tool to validate [glTF](https://github.com/KhronosGroup/glTF) assets.

Validation is performed against [glTF 2.0](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0) specification.
Validation is performed against [glTF 2.0](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html) specification.

Validator writes a validation report (in JSON-format) with all found issues and asset stats.

Expand All @@ -18,7 +18,7 @@ NPM package: https://www.npmjs.com/package/gltf-validator

## Implemented features

- JSON syntax check and [GLBv2](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#glb-file-format-specification) file format correctness.
- JSON syntax check and [GLBv2](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#glb-file-format-specification) file format correctness.
- Asset description validation
- All properties and their types from JSON-Schemas (including implicit limitations on valid values).
- Validity and compatibility of internal references.
Expand All @@ -35,6 +35,7 @@ NPM package: https://www.npmjs.com/package/gltf-validator
- EXT_texture_webp
- KHR_lights_punctual
- KHR_materials_clearcoat
- KHR_materials_emissive_strength
- KHR_materials_ior
- KHR_materials_pbrSpecularGlossiness
- KHR_materials_sheen
Expand Down Expand Up @@ -62,6 +63,8 @@ Validation log will be printed to stderr.
Shell return code will be non-zero if at least one error was found.
-o, --[no-]stdout Print JSON report to stdout instead of writing it to a file. This option cannot be used with directory input.
-r, --[no-]validate-resources Validate contents of embedded and/or referenced resources (buffers, images).
(defaults to on)
-t, --[no-]write-timestamp Write UTC timestamp to the validation report.
-p, --[no-]absolute-path Write absolute asset path to the validation report.
-m, --[no-]messages Print issue messages to stderr. Otherwise, only total number of issues will be printed.
Expand Down Expand Up @@ -114,7 +117,3 @@ To publish an npm package, follow these steps after installation:
To generate [ISSUES.md](ISSUES.md), follow these steps after installation:
1. Run `dart run grinder issues`.
2. `ISSUES.md` file will be written to the repo root.

## Known Issues
- Web and npm versions cannot differentiate between JSON integers and floats of the same value, e.g., `1` vs `1.0`.
- JSON charset encoding restrictions are not enforced.
Loading

0 comments on commit 20db52c

Please sign in to comment.