@pixiv/types-vrmc-node-constraint-1.0 1.0.0-beta.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019-2021 pixiv Inc.
1
+ Copyright (c) 2019-2023 pixiv Inc.
2
2
 
3
3
  MIT License
4
4
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Type definitions of VRMC_node_constraint 1.0 schema.
4
4
 
5
- https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_node_constraint-1.0_draft
5
+ https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_node_constraint-1.0
6
6
 
7
7
  There should not be any implementation in this package. Just type definitions of the schema.
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixiv/types-vrmc-node-constraint-1.0",
3
- "version": "1.0.0-beta.9",
3
+ "version": "2.0.0",
4
4
  "description": "Type definitions of VRMC_node_constraint 1.0 schema",
5
5
  "license": "MIT",
6
6
  "author": "pixiv",
@@ -33,5 +33,5 @@
33
33
  "prettier --write"
34
34
  ]
35
35
  },
36
- "gitHead": "31a046e8ef027917490cbbb3e558f9f97f3d3259"
36
+ "gitHead": "3cfe3003a55e2617e9f1767934ac0aaa01c6f775"
37
37
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A constraint that makes it look at a source object.
3
+ */
4
+ export interface AimConstraint {
5
+ /**
6
+ * The index of the node constrains the node.
7
+ */
8
+ source: number;
9
+ /**
10
+ * The aim axis of the constraint.
11
+ */
12
+ aimAxis: 'PositiveX' | 'NegativeX' | 'PositiveY' | 'NegativeY' | 'PositiveZ' | 'NegativeZ';
13
+ /**
14
+ * The weight of the constraint.
15
+ */
16
+ weight?: number;
17
+ extensions?: {
18
+ [name: string]: any;
19
+ };
20
+ extras?: any;
21
+ }
@@ -1,9 +1,13 @@
1
+ import { AimConstraint } from './AimConstraint';
2
+ import { RollConstraint } from './RollConstraint';
1
3
  import { RotationConstraint } from './RotationConstraint';
2
4
  /**
3
5
  * An object contains one of constraints.
4
6
  */
5
7
  export interface Constraint {
6
- rotation: RotationConstraint;
8
+ roll?: RollConstraint;
9
+ aim?: AimConstraint;
10
+ rotation?: RotationConstraint;
7
11
  extensions?: {
8
12
  [name: string]: any;
9
13
  };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A constraint that transfers a rotation around one axis of a source.
3
+ */
4
+ export interface RollConstraint {
5
+ /**
6
+ * The index of the node constrains the node.
7
+ */
8
+ source: number;
9
+ /**
10
+ * The roll axis of the constraint.
11
+ */
12
+ rollAxis: 'X' | 'Y' | 'Z';
13
+ /**
14
+ * The weight of the constraint.
15
+ */
16
+ weight?: number;
17
+ extensions?: {
18
+ [name: string]: any;
19
+ };
20
+ extras?: any;
21
+ }
@@ -1,21 +1,17 @@
1
1
  /**
2
- * A constraint that links the rotation with sources.
2
+ * A constraint that links the rotation with a source.
3
3
  */
4
4
  export interface RotationConstraint {
5
5
  /**
6
6
  * The index of the node constrains the node.
7
7
  */
8
8
  source: number;
9
- /**
10
- * Axes be constrained by this constraint, in X-Y-Z order.
11
- */
12
- freezeAxes?: [
13
- boolean,
14
- boolean,
15
- boolean
16
- ];
17
9
  /**
18
10
  * The weight of the constraint.
19
11
  */
20
12
  weight?: number;
13
+ extensions?: {
14
+ [name: string]: any;
15
+ };
16
+ extras?: any;
21
17
  }
@@ -6,7 +6,7 @@ export interface VRMCNodeConstraint {
6
6
  /**
7
7
  * Specification version of VRMC_node_constraint
8
8
  */
9
- specVersion: '1.0-draft';
9
+ specVersion: '1.0' | '1.0-beta';
10
10
  constraint: Constraint;
11
11
  extensions?: {
12
12
  [name: string]: any;
@@ -1,3 +1,5 @@
1
+ export { AimConstraint } from './AimConstraint';
1
2
  export { Constraint } from './Constraint';
3
+ export { RollConstraint } from './RollConstraint';
2
4
  export { RotationConstraint } from './RotationConstraint';
3
5
  export { VRMCNodeConstraint } from './VRMCNodeConstraint';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A constraint that makes it look at a source object.
3
+ */
4
+ export interface AimConstraint {
5
+ /**
6
+ * The index of the node constrains the node.
7
+ */
8
+ source: number;
9
+ /**
10
+ * The aim axis of the constraint.
11
+ */
12
+ aimAxis: 'PositiveX' | 'NegativeX' | 'PositiveY' | 'NegativeY' | 'PositiveZ' | 'NegativeZ';
13
+ /**
14
+ * The weight of the constraint.
15
+ */
16
+ weight?: number;
17
+ extensions?: {
18
+ [name: string]: any;
19
+ };
20
+ extras?: any;
21
+ }
@@ -1,11 +1,15 @@
1
- import type { RotationConstraint } from './RotationConstraint';
2
- /**
3
- * An object contains one of constraints.
4
- */
5
- export interface Constraint {
6
- rotation: RotationConstraint;
7
- extensions?: {
8
- [name: string]: any;
9
- };
10
- extras?: any;
11
- }
1
+ import { AimConstraint } from './AimConstraint';
2
+ import { RollConstraint } from './RollConstraint';
3
+ import type { RotationConstraint } from './RotationConstraint';
4
+ /**
5
+ * An object contains one of constraints.
6
+ */
7
+ export interface Constraint {
8
+ roll?: RollConstraint;
9
+ aim?: AimConstraint;
10
+ rotation?: RotationConstraint;
11
+ extensions?: {
12
+ [name: string]: any;
13
+ };
14
+ extras?: any;
15
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A constraint that transfers a rotation around one axis of a source.
3
+ */
4
+ export interface RollConstraint {
5
+ /**
6
+ * The index of the node constrains the node.
7
+ */
8
+ source: number;
9
+ /**
10
+ * The roll axis of the constraint.
11
+ */
12
+ rollAxis: 'X' | 'Y' | 'Z';
13
+ /**
14
+ * The weight of the constraint.
15
+ */
16
+ weight?: number;
17
+ extensions?: {
18
+ [name: string]: any;
19
+ };
20
+ extras?: any;
21
+ }
@@ -1,17 +1,17 @@
1
- /**
2
- * A constraint that links the rotation with sources.
3
- */
4
- export interface RotationConstraint {
5
- /**
6
- * The index of the node constrains the node.
7
- */
8
- source: number;
9
- /**
10
- * Axes be constrained by this constraint, in X-Y-Z order.
11
- */
12
- freezeAxes?: [boolean, boolean, boolean];
13
- /**
14
- * The weight of the constraint.
15
- */
16
- weight?: number;
17
- }
1
+ /**
2
+ * A constraint that links the rotation with a source.
3
+ */
4
+ export interface RotationConstraint {
5
+ /**
6
+ * The index of the node constrains the node.
7
+ */
8
+ source: number;
9
+ /**
10
+ * The weight of the constraint.
11
+ */
12
+ weight?: number;
13
+ extensions?: {
14
+ [name: string]: any;
15
+ };
16
+ extras?: any;
17
+ }
@@ -1,15 +1,15 @@
1
- import type { Constraint } from './Constraint';
2
- /**
3
- * glTF extension that defines a node constraint.
4
- */
5
- export interface VRMCNodeConstraint {
6
- /**
7
- * Specification version of VRMC_node_constraint
8
- */
9
- specVersion: '1.0-draft';
10
- constraint: Constraint;
11
- extensions?: {
12
- [name: string]: any;
13
- };
14
- extras?: any;
15
- }
1
+ import type { Constraint } from './Constraint';
2
+ /**
3
+ * glTF extension that defines a node constraint.
4
+ */
5
+ export interface VRMCNodeConstraint {
6
+ /**
7
+ * Specification version of VRMC_node_constraint
8
+ */
9
+ specVersion: '1.0' | '1.0-beta';
10
+ constraint: Constraint;
11
+ extensions?: {
12
+ [name: string]: any;
13
+ };
14
+ extras?: any;
15
+ }
package/types/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- export type { Constraint } from './Constraint';
2
- export type { RotationConstraint } from './RotationConstraint';
3
- export type { VRMCNodeConstraint } from './VRMCNodeConstraint';
1
+ export type { AimConstraint } from './AimConstraint';
2
+ export type { Constraint } from './Constraint';
3
+ export type { RollConstraint } from './RollConstraint';
4
+ export type { RotationConstraint } from './RotationConstraint';
5
+ export type { VRMCNodeConstraint } from './VRMCNodeConstraint';