@pixiv/three-vrm-materials-v0compat 2.1.0-beta.3 → 2.1.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
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2019-2024 pixiv Inc.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixiv/three-vrm-materials-v0compat",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "VRM0.0 materials compatibility layer plugin for @pixiv/three-vrm",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pixiv",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@pixiv/types-vrm-0.0": "2.1.0
|
|
49
|
-
"@pixiv/types-vrmc-materials-mtoon-1.0": "2.1.0
|
|
48
|
+
"@pixiv/types-vrm-0.0": "2.1.0",
|
|
49
|
+
"@pixiv/types-vrmc-materials-mtoon-1.0": "2.1.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/three": "^0.160.0",
|
|
@@ -55,5 +55,6 @@
|
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@types/three": "^0.160.0",
|
|
57
57
|
"three": "^0.160.0"
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "0d96aeaa6e20baa8158658652179df20a162d8a3"
|
|
59
60
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
2
|
+
export declare class VRMMaterialsV0CompatPlugin implements GLTFLoaderPlugin {
|
|
3
|
+
readonly parser: GLTFParser;
|
|
4
|
+
/**
|
|
5
|
+
* A map from v0 render queue to v1 render queue offset, for Transparent materials.
|
|
6
|
+
*/
|
|
7
|
+
private readonly _renderQueueMapTransparent;
|
|
8
|
+
/**
|
|
9
|
+
* A map from v0 render queue to v1 render queue offset, for TransparentZWrite materials.
|
|
10
|
+
*/
|
|
11
|
+
private readonly _renderQueueMapTransparentZWrite;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
constructor(parser: GLTFParser);
|
|
14
|
+
beforeRoot(): Promise<void>;
|
|
15
|
+
private _parseV0MToonProperties;
|
|
16
|
+
private _parseV0UnlitProperties;
|
|
17
|
+
/**
|
|
18
|
+
* Create a glTF `KHR_texture_transform` extension from v0 texture transform info.
|
|
19
|
+
*/
|
|
20
|
+
private _portTextureTransform;
|
|
21
|
+
/**
|
|
22
|
+
* Convert v0 render order into v1 render order.
|
|
23
|
+
* This uses a map from v0 render queue to v1 compliant render queue offset which is generated in {@link _populateRenderQueueMap}.
|
|
24
|
+
*/
|
|
25
|
+
private _v0ParseRenderQueue;
|
|
26
|
+
/**
|
|
27
|
+
* Create a map which maps v0 render queue to v1 compliant render queue offset.
|
|
28
|
+
* This lists up all render queues the model use and creates a map to new render queue offsets in the same order.
|
|
29
|
+
*/
|
|
30
|
+
private _populateRenderQueueMap;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VRMMaterialsV0CompatPlugin } from './VRMMaterialsV0CompatPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function gammaEOTF(e: number): number;
|