@webxr-jp/avatar-optimizer 0.1.1 → 0.1.2
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/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { mergeGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js
|
|
|
9
9
|
import { initBasisEncoder } from '@webxr-jp/texture-compression';
|
|
10
10
|
export { UastcQuality } from '@webxr-jp/texture-compression';
|
|
11
11
|
import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js';
|
|
12
|
+
import { VRMMetaLoaderPlugin } from '@pixiv/three-vrm-core';
|
|
12
13
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
13
14
|
import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
|
|
14
15
|
|
|
@@ -1206,7 +1207,8 @@ function createMToonAtlasMaterial(representativeMaterial, parameterTexture, slot
|
|
|
1206
1207
|
material.depthWrite = false;
|
|
1207
1208
|
} else if (renderMode === "alphaTest") {
|
|
1208
1209
|
material.transparent = false;
|
|
1209
|
-
material.alphaTest =
|
|
1210
|
+
material.alphaTest = 0.5;
|
|
1211
|
+
material.updateDefines();
|
|
1210
1212
|
} else {
|
|
1211
1213
|
material.transparent = false;
|
|
1212
1214
|
}
|
|
@@ -2279,7 +2281,29 @@ function loadVRM(source) {
|
|
|
2279
2281
|
if (ktx2Loader) {
|
|
2280
2282
|
loader.setKTX2Loader(ktx2Loader);
|
|
2281
2283
|
}
|
|
2282
|
-
loader.register((parser) =>
|
|
2284
|
+
loader.register((parser) => {
|
|
2285
|
+
const metaPlugin = new VRMMetaLoaderPlugin(parser, {
|
|
2286
|
+
acceptLicenseUrls: [
|
|
2287
|
+
// VRM 1.0 公式ライセンス
|
|
2288
|
+
"https://vrm.dev/licenses/1.0/",
|
|
2289
|
+
// CC0 (パブリックドメイン)
|
|
2290
|
+
"https://creativecommons.org/publicdomain/zero/1.0/",
|
|
2291
|
+
// CC BY
|
|
2292
|
+
"https://creativecommons.org/licenses/by/4.0/",
|
|
2293
|
+
// CC BY-NC
|
|
2294
|
+
"https://creativecommons.org/licenses/by-nc/4.0/",
|
|
2295
|
+
// CC BY-SA
|
|
2296
|
+
"https://creativecommons.org/licenses/by-sa/4.0/",
|
|
2297
|
+
// CC BY-NC-SA
|
|
2298
|
+
"https://creativecommons.org/licenses/by-nc-sa/4.0/",
|
|
2299
|
+
// CC BY-ND
|
|
2300
|
+
"https://creativecommons.org/licenses/by-nd/4.0/",
|
|
2301
|
+
// CC BY-NC-ND
|
|
2302
|
+
"https://creativecommons.org/licenses/by-nc-nd/4.0/"
|
|
2303
|
+
]
|
|
2304
|
+
});
|
|
2305
|
+
return new VRMLoaderPlugin(parser, { metaPlugin });
|
|
2306
|
+
});
|
|
2283
2307
|
loader.register((parser) => new MToonAtlasLoaderPlugin(parser));
|
|
2284
2308
|
let gltf;
|
|
2285
2309
|
let blobUrl = null;
|