@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 +1 -1
- package/README.md +1 -1
- package/package.json +2 -2
- package/ts3.4/types/AimConstraint.d.ts +21 -0
- package/ts3.4/types/Constraint.d.ts +5 -1
- package/ts3.4/types/RollConstraint.d.ts +21 -0
- package/ts3.4/types/RotationConstraint.d.ts +5 -9
- package/ts3.4/types/VRMCNodeConstraint.d.ts +1 -1
- package/ts3.4/types/index.d.ts +2 -0
- package/types/AimConstraint.d.ts +21 -0
- package/types/Constraint.d.ts +15 -11
- package/types/RollConstraint.d.ts +21 -0
- package/types/RotationConstraint.d.ts +17 -17
- package/types/VRMCNodeConstraint.d.ts +15 -15
- package/types/index.d.ts +5 -3
package/LICENSE
CHANGED
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.
|
|
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": "
|
|
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": "
|
|
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
|
-
|
|
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
|
|
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
|
}
|
package/ts3.4/types/index.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/types/Constraint.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
3
|
-
*/
|
|
4
|
-
export interface RotationConstraint {
|
|
5
|
-
/**
|
|
6
|
-
* The index of the node constrains the node.
|
|
7
|
-
*/
|
|
8
|
-
source: number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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-
|
|
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 {
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
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';
|