Skip to content

Commit

Permalink
Update references to VRM 1.0-beta to VRM 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrxz committed Nov 7, 2024
1 parent caa0664 commit add5d45
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Tool to validate [VRM](https://vrm.dev/en/) ([glTF](https://github.com/KhronosGr

[Try it out in your browser](https://vrm-validator.fern.solutions/)

This project is a fork of the official [glTF-validator](https://github.com/KhronosGroup/glTF-Validator), expanded to valdiate .vrm files.
Validation is performed against [glTF 2.0](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0) specification and [VRM 1.0-beta](https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_vrm-1.0-beta) specification.
This project is a fork of the official [glTF-validator](https://github.com/KhronosGroup/glTF-Validator), expanded to validate .vrm files.
Validation is performed against [glTF 2.0](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0) specification and [VRM 1.0](https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_vrm-1.0) specification.

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

Expand Down
2 changes: 1 addition & 1 deletion lib/cmd_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Future<void> run(List<String> args) async {

if (argResult?.rest?.length != 1) {
errPipe
..write('VRM 1.0-beta Validator, version $kGltfValidatorVersion\n')
..write('VRM 1.0 Validator, version $kGltfValidatorVersion\n')
..write('Supported extensions:\n\t')
..write(Context.defaultExtensionNames.join('\n\t'))
..write('\n\n')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class KhrTextureTransform extends GltfProperty {

final texCoord = getUint(map, TEX_COORD, context);

// https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_vrm-1.0-beta#obsolete-properties-of-khr_texture_transform-with-vrm1
// https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_vrm-1.0#obsolete-properties-of-khr_texture_transform-with-vrm1
// `rotation` and `texCoord` are not recommended for VRM
if (rotation != 0.0) {
context.addIssue(SemanticError.vrm1TextureTransformRotation,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ext/VRMC_materials_mtoon/vrmc_materials_mtoon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library gltf.extensions.vrmc_vrm;
import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_materials_mtoon-1.0-beta/schema/VRMC_materials_mtoon.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_materials_mtoon-1.0/schema/VRMC_materials_mtoon.schema.json
const String VRMC_MATERIALS_MTOON = 'VRMC_materials_mtoon';
const String SPEC_VERSION = 'specVersion';
const String TRANSPARENT_WITH_Z_WRITE = 'transparentWithZWrite';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ext/VRMC_springBone/vrmc_collider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library gltf.extensions.vrmc_vrm;
import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0-beta/schema/VRMC_springBone.collider.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0/schema/VRMC_springBone.collider.schema.json
const String NODE = 'node';
const String SHAPE = 'shape';

Expand Down Expand Up @@ -68,7 +68,7 @@ class Collider extends GltfProperty {
}
}

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0-beta/schema/VRMC_springBone.shape.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0/schema/VRMC_springBone.shape.schema.json
const String SPHERE = 'sphere';
const String CAPSULE = 'capsule';
const List<String> COLLIDER_SHAPE_MEMBERS = <String>[
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ext/VRMC_springBone/vrmc_collider_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/VRMC_springBone/vrmc_collider.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0-beta/schema/VRMC_springBone.colliderGroup.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0/schema/VRMC_springBone.colliderGroup.schema.json
const String NAME = 'name';
const String COLLIDERS = 'colliders';

Expand Down
4 changes: 2 additions & 2 deletions lib/src/ext/VRMC_springBone/vrmc_spring.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/VRMC_springBone/vrmc_collider_group.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0-beta/schema/VRMC_springBone.spring.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0/schema/VRMC_springBone.spring.schema.json
const String NAME = 'name';
const String JOINTS = 'joints';
const String COLLIDER_GROUPS = 'colliderGroups';
Expand Down Expand Up @@ -100,7 +100,7 @@ class Spring extends GltfProperty {
}
}

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0-beta/schema/VRMC_springBone.joint.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_springBone-1.0/schema/VRMC_springBone.joint.schema.json
const String NODE = 'node';
const String HIT_RADIUS = 'hitRadius';
const String STIFFNESS = 'stiffness';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ext/VRMC_springBone/vrmc_spring_bone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import 'package:gltf/src/ext/VRMC_springBone/vrmc_collider.dart';
import 'package:gltf/src/ext/VRMC_springBone/vrmc_spring.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_springBone-1.0-beta
// https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_springBone-1.0
const String VRMC_SPRING_BONE = 'VRMC_springBone';
const String SPEC_VERSION = 'specVersion';
const String COLLIDERS = 'colliders';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ext/VRMC_vrm/vrmc_vrm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import 'package:gltf/src/ext/VRMC_vrm/vrmc_vrm_look_at.dart';
import 'package:gltf/src/ext/VRMC_vrm/vrmc_vrm_meta.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/README.md
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/README.md
const String VRMC_VRM = 'VRMC_vrm';
const String SPEC_VERSION = 'specVersion';
const String META = 'meta';
Expand Down
10 changes: 5 additions & 5 deletions lib/src/ext/VRMC_vrm/vrmc_vrm_expressions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library gltf.extensions.vrmc_vrm;

import 'package:gltf/src/base/gltf_property.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/expressions.md
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/expressions.md
const String PRESET = 'preset';
const String CUSTOM = 'custom';

Expand Down Expand Up @@ -100,7 +100,7 @@ class VrmcVrmExpressions extends GltfProperty {
}

// Expression
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.expressions.expression.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.expressions.expression.schema.json

const String MORPH_TARGET_BINDS = 'morphTargetBinds';
const String MATERIAL_COLOR_BINDS = 'materialColorBinds';
Expand Down Expand Up @@ -203,7 +203,7 @@ class Expression extends GltfProperty {
}

// Morph Target Bind
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.expressions.expression.morphTargetBind.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.expressions.expression.morphTargetBind.schema.json
const String NODE = 'node';
const String INDEX = 'index';
const String WEIGHT = 'weight';
Expand Down Expand Up @@ -269,7 +269,7 @@ class MorphTargetBind extends GltfProperty {
}

// Material Color Bind
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.expressions.expression.materialColorBind.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.expressions.expression.materialColorBind.schema.json
const String MATERIAL = 'material';
const String TYPE = 'type';
const String TARGET_VALUE = 'targetValue';
Expand Down Expand Up @@ -321,7 +321,7 @@ class MaterialColorBind extends GltfProperty {
}

// Texture Transform Bind
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.expressions.expression.textureTransformBind.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.expressions.expression.textureTransformBind.schema.json
// Note: MATERIAL is already defined above
const String SCALE = 'scale';
const String OFFSET = 'offset';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ext/VRMC_vrm/vrmc_vrm_first_person.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library gltf.extensions.vrmc_vrm;
import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/firstPerson.md
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/firstPerson.md
const String MESH_ANNOTATIONS = 'meshAnnotations';

const List<String> VRMC_VRM_FIRST_PERSON_MEMBERS = <String>[
Expand Down Expand Up @@ -60,7 +60,7 @@ class VrmcVrmFirstPerson extends GltfProperty {
}

// Mesh Annotation
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.firstPerson.meshAnnotation.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.firstPerson.meshAnnotation.schema.json
const String NODE = 'node';
const String TYPE = 'type';

Expand Down
6 changes: 3 additions & 3 deletions lib/src/ext/VRMC_vrm/vrmc_vrm_humanoid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library gltf.extensions.vrmc_vrm;
import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/humanoid.md
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/humanoid.md
const String HUMAN_BONES = 'humanBones';

const List<String> VRMC_VRM_HUMANOID_MEMBERS = <String>[
Expand Down Expand Up @@ -56,7 +56,7 @@ class VrmcVrmHumanoid extends GltfProperty {
}

// Human Bones
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.humanoid.humanBones.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.humanoid.humanBones.schema.json

const String CHEST = 'chest';
const String HEAD = 'head';
Expand Down Expand Up @@ -447,7 +447,7 @@ class HumanBones {
}

// Human Bone
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.humanoid.humanBones.humanBone.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.humanoid.humanBones.humanBone.schema.json

const String NODE = 'node';

Expand Down
4 changes: 2 additions & 2 deletions lib/src/ext/VRMC_vrm/vrmc_vrm_look_at.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library gltf.extensions.vrmc_vrm;
import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/lookAt.md
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/lookAt.md
const String OFFSET_FROM_HEAD_BONE = 'offsetFromHeadBone';
const String TYPE = 'type';
const String RANGE_MAP_HORIZONTAL_INNER = 'rangeMapHorizontalInner';
Expand Down Expand Up @@ -78,7 +78,7 @@ class VrmcVrmLookAt extends GltfProperty {
}

// Range Map
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/schema/VRMC_vrm.lookAt.rangeMap.schema.json
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/schema/VRMC_vrm.lookAt.rangeMap.schema.json

const String INPUT_MAX_VALUE = 'inputMaxValue';
const String OUTPUT_SCALE = 'outputScale';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ext/VRMC_vrm/vrmc_vrm_meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library gltf.extensions.vrmc_vrm;
import 'package:gltf/src/base/gltf_property.dart';
import 'package:gltf/src/ext/extensions.dart';

// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0-beta/meta.md
// https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/meta.md
const String NAME = 'name';
const String VERSION = 'version';
const String AUTHORS = 'authors';
Expand Down
4 changes: 2 additions & 2 deletions node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install --save vrm-validator
const fs = require('fs');
const validator = require('vrm-validator');

const asset = fs.readFileSync('./Avatar-1.0-beta.vrm');
const asset = fs.readFileSync('./Avatar-1.0.vrm');

validator.validateBytes(new Uint8Array(asset))
.then((report) => console.info('Validation succeeded: ', report))
Expand All @@ -28,7 +28,7 @@ validator.validateBytes(new Uint8Array(asset))
```javascript
const validator = require('vrm-validator');

fetch('Avatar-1.0-beta.vrm')
fetch('Avatar-1.0.vrm')
.then((response) => response.arrayBuffer())
.then((asset) => validator.validateBytes(new Uint8Array(asset)))
.then((report) => console.info('Validation succeeded: ', report))
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: gltf
version: 2.0.0-dev.3.10
description: Library for loading and validating VRM 1.0-beta assets (glTF 2.0 + VRM extensions)
description: Library for loading and validating VRM 1.0 assets (glTF 2.0 + VRM extensions)
homepage: https://github.com/mrxz/vrm-validator

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VRM 1.0-beta Validator</title>
<title>VRM 1.0 Validator</title>
<link rel="stylesheet" href="styles/styles.css">
<link rel="stylesheet" href="styles/prism.css">
<link rel="icon" href="logos/logo_32px.png">
Expand Down

0 comments on commit add5d45

Please sign in to comment.