
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@zappar/three-gaussian-splat
Advanced tools
This library allows you to render [3D Gaussian Splats](https://github.com/graphdeco-inria/gaussian-splatting) using the 3D rendering platform ThreeJS.
This library allows you to render 3D Gaussian Splats using the 3D rendering platform ThreeJS.
You may also be interested in Mattercraft, a browser based 3D content development environment perfected for building interactive experiences for the web.
You can use this library by installing from NPM.
Run the following NPM command inside your project directory:
npm install --save @zappar/three-guassian-splat
Then import the library into your JavaScript or TypeScript files:
import * as ZapSplat from '@zappar/three-guassian-splat';
Please note - This library supports Webpack 5 and later.
You can integrate the library with the existing requestAnimationFrame
loop of your ThreeJS project. A typical project may look like this. The remainder of this document goes into more detail about each of the component elements of this example.
import * as ZapSplat from '@zappar/three-gaussian-splat';
const bonsai = new URL('./bonsai.splat', import.meta.url).href;
const maxSplats = Infinity;
const splat = new ZapSplat.GaussianSplatMesh(camera, renderer, bonsai, maxSplats);
splat.load();
scene.add(splat);
renderer.setAnimationLoop(animation);
function animation() {
splat.update();
renderer.render(scene, camera);
}
Explore our template project at this link: Three Gaussian Splat Example on GitHub
For a live preview, visit: Three Gaussian Splat Example Preview
You can use the GaussianSplatMesh
to construct the splat mesh. It takes 2 arguments.
const splat = new ZapSplat.GaussianSplatMesh(
url, // url to .splat file
maxSplats // Maximum number of splats to render. Default = Infinity.
);
To start loading the .splat
file, call the load
function.
splat.load();
You may optionally choose to provide a THREE.LoadingManager
to track the loading progress:
const loadingManager = new THREE.LoadingManager();
splat.load(loadingManager);
The GaussianSplat mesh can be added to the scene like any other Object3D
:
scene.add(splat);
The mesh needs to be updated before rendering. This can be done by calling the update
function.
splat.update(
camera, // THREE.PerspectiveCamera
renderer // THREE.WebGLRenderer
);
The library provides two meshes to define invisible areas of your splat.
A MaskingShere
can be added to the GaussianSplatMesh
to hide anything outside of the sphere.
const splat = new ZapSplat.GaussianSplatMesh(bonsai, Infinity);
splat.load();
scene.add(splat);
const maskSphere = new ZapSplat.MaskingSphere();
splat.addMaskMesh(maskSphere);
maskSphere.position.y = 0.9;
maskSphere.scale.setScalar(2.5);
// set to invisible once finalized position
maskSphere.visible = false;
renderer.setAnimationLoop(animation);
function animation() {
splat.update(camera, renderer);
renderer.render(scene, camera);
}
A MaskingPlane
can be added to the GaussianSplatMesh
to hide anything in the planes normal direction.
const splat = new ZapSplat.GaussianSplatMesh(bonsai, Infinity);
splat.load();
scene.add(splat);
const maskPlane = new ZapSplat.MaskingPlane();
splat.addMaskMesh(maskPlane);
renderer.setAnimationLoop(animation);
function animation() {
splat.update(camera, renderer);
renderer.render(scene, camera);
}
To aid development, the MaskMesh
objects are rendered with a wireframe material. You can hide this by setting the visible
property to false
.
For devices that support SharedArrayBuffer
, the sorting process within this library is significantly optimized. This feature enhances the efficiency of data handling, leading to faster rendering times and smoother user experiences.
To check if your device supports SharedArrayBuffer
, please refer to https://caniuse.com/sharedarraybuffer
Splat format discussion https://github.com/mkkellogg/GaussianSplats3D/issues/47
This project is released under the MIT license. It is built upon several other open-source projects:
Please note that the license of the original 3D Gaussian Splatting research project is non-commercial. While this library provides an open-source rendering implementation, users should consider the source of the splat data separately.
FAQs
This library allows you to render [3D Gaussian Splats](https://github.com/graphdeco-inria/gaussian-splatting) using the 3D rendering platform ThreeJS.
The npm package @zappar/three-gaussian-splat receives a total of 2 weekly downloads. As such, @zappar/three-gaussian-splat popularity was classified as not popular.
We found that @zappar/three-gaussian-splat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.