Gathering detailed insights and metrics for @pixiv/three-vrm-springbone
Gathering detailed insights and metrics for @pixiv/three-vrm-springbone
Gathering detailed insights and metrics for @pixiv/three-vrm-springbone
Gathering detailed insights and metrics for @pixiv/three-vrm-springbone
@pixiv/types-vrmc-springbone-1.0
Type definitions of VRMC_springBone 1.0 schema
@pixiv/types-vrmc-springbone-extended-collider-1.0
Type definitions of VRMC_springBone_extended_collider 1.0 schema
@pixiv/three-vrm
VRM file loader for three.js.
@pixiv/three-vrm-core
The implementation of core features of VRM, for @pixiv/three-vrm
npm install @pixiv/three-vrm-springbone
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,305 Stars
2,544 Commits
110 Forks
85 Watching
21 Branches
29 Contributors
Updated on 28 Nov 2024
TypeScript (67.6%)
HTML (24.68%)
GLSL (4.1%)
JavaScript (3.58%)
Shell (0.03%)
Cumulative downloads
Total Downloads
Last day
5.3%
710
Compared to previous day
Last week
-8.3%
3,448
Compared to previous week
Last month
23.1%
14,817
Compared to previous month
Last year
70.3%
111,971
Compared to previous year
3
1
2
@pixiv/three-vrm
You will need:
.module
ones are ESM, otherwise it's UMD and injects its modules into global THREE
.min
ones are minified (for production), otherwise it's not minified and it comes with source mapsYou can import all the dependencies via CDN like jsDelivr.
1<script type="importmap"> 2 { 3 "imports": { 4 "three": "https://cdn.jsdelivr.net/npm/three@0.169.0/build/three.module.js", 5 "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.169.0/examples/jsm/", 6 "@pixiv/three-vrm": "https://cdn.jsdelivr.net/npm/@pixiv/three-vrm@3/lib/three-vrm.module.min.js" 7 } 8 } 9</script> 10 11<script type="module"> 12 import * as THREE from 'three'; 13 import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; 14 import { VRMLoaderPlugin } from '@pixiv/three-vrm'; 15 16 // ... Setup renderer, camera, scene ... 17 18 // Create a GLTFLoader - The loader for loading VRM models 19 const loader = new GLTFLoader(); 20 21 // Install a GLTFLoader plugin that enables VRM support 22 loader.register((parser) => { 23 return new VRMLoaderPlugin(parser); 24 }); 25 26 loader.load( 27 // URL of the VRM you want to load 28 '/models/VRM1_Constraint_Twist_Sample.vrm', 29 30 // called when the resource is loaded 31 (gltf) => { 32 // retrieve a VRM instance from gltf 33 const vrm = gltf.userData.vrm; 34 35 // add the loaded vrm to the scene 36 scene.add(vrm.scene); 37 38 // deal with vrm features 39 console.log(vrm); 40 }, 41 42 // called while loading is progressing 43 (progress) => console.log('Loading model...', 100.0 * (progress.loaded / progress.total), '%'), 44 45 // called when loading has errors 46 (error) => console.error(error), 47 ); 48 49 // ... Perform the render loop ... 50</script>
See the Three.js document if you are not familiar with Three.js yet: https://threejs.org/docs/#manual/en/introduction/Creating-a-scene
See the example for the complete code: https://github.com/pixiv/three-vrm/blob/release/packages/three-vrm/examples/basic.html
Install three
and @pixiv/three-vrm
:
1npm install three @pixiv/three-vrm
Starting from v3, we provide WebGPURenderer compatibility.
To use three-vrm with WebGPURenderer, specify the WebGPU-compatible MToonNodeMaterial
for the materialType
option of MToonMaterialLoaderPlugin
.
MToonNodeMaterial
only supports Three.js r167 or later.
The NodeMaterial system of Three.js is still under development, so we may break compatibility with older versions of Three.js more frequently than other parts of three-vrm.
1import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; 2import { MToonMaterialLoaderPlugin, VRMLoaderPlugin } from '@pixiv/three-vrm'; 3import { MToonNodeMaterial } from '@pixiv/three-vrm/nodes'; 4 5// ... Setup renderer, camera, scene ... 6 7// Create a GLTFLoader 8const loader = new GLTFLoader(); 9 10// Register a VRMLoaderPlugin 11loader.register((parser) => { 12 13 // create a WebGPU compatible MToonMaterialLoaderPlugin 14 const mtoonMaterialPlugin = new MToonMaterialLoaderPlugin(parser, { 15 16 // set the material type to MToonNodeMaterial 17 materialType: MToonNodeMaterial, 18 19 }); 20 21 return new VRMLoaderPlugin(parser, { 22 23 // Specify the MToonMaterialLoaderPlugin to use in the VRMLoaderPlugin instance 24 mtoonMaterialPlugin, 25 26 }); 27 28}); 29 30// ... Load the VRM and perform the render loop ...
See the example for the complete code: https://github.com/pixiv/three-vrm/blob/release/packages/three-vrm/examples/webgpu-dnd.html
See: CONTRIBUTING.md
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 5/11 approved changesets -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More