Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@needle-tools/gltf-progressive
Advanced tools
three.js support for loading glTF or GLB files that contain progressive loading data
LODs on steroids for glTF, GLB or VRM files with density based loading for meshes or texture for any three.js based project.
Examples are in the /examples
directory. Live versions can be found in the links below.
Interactive Examples:
Full example in examples/react-three-fiber
function ChurchModel() {
const { gl } = useThree()
const url = 'https://engine.needle.tools/demos/gltf-progressive/assets/church/model.glb'
const { scene } = useGLTF(url, false, false, (loader) => {
useNeedleProgressive(url, gl, loader as any)
})
return <primitive object={scene} />
}
The full example can be found at examples/threejs
<head>
<!-- Add the threejs import map to your HTML head section -->
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@latest/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@latest/examples/jsm/",
"three/examples/": "https://cdn.jsdelivr.net/npm/three@latest/examples/",
"@needle-engine/gltf-progressive": "https://www.unpkg.com/@needle-tools/gltf-progressive@latest"
}
}
</script>
</head>
In your script:
const gltfLoader = new GLTFLoader();
const url = "https://engine.needle.tools/demos/gltf-progressive/assets/church/model.glb";
// register the progressive loader
useNeedleProgressive(url, renderer, gltfLoader)
// just call the load method as usual
gltfLoader.load(url, gltf => {
console.log(gltf)
scene.add(gltf.scene)
gltf.scene.position.y += .95;
})
The example can be found in examples/modelviewer.html
<head>
<!-- Include threejs import map -->
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three/build/three.module.js",
"three/": "https://unpkg.com/three/"
}
}
</script>
<!-- Include gltf-progressive -->
<script type="module" src="https://www.unpkg.com/@needle-tools/gltf-progressive@latest"></script>
<!-- Include model-viewer -->
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.4.0/model-viewer.min.js"></script>
</head>
<body>
<model-viewer src="https://engine.needle.tools/demos/gltf-progressive/assets/church/model.glb" camera-controls auto-rotate></model-viewer>
</body>
Needle Engine natively supports progressive loading of these glTF files! See docs.needle.tools for more information.
Use cloud.needle.tools to generate LODs for your assets now.
FAQs
three.js support for loading glTF or GLB files that contain progressive loading data
The npm package @needle-tools/gltf-progressive receives a total of 279 weekly downloads. As such, @needle-tools/gltf-progressive popularity was classified as not popular.
We found that @needle-tools/gltf-progressive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.