Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@cloudfour/lite-model-viewer
Advanced tools
Lite Model-Viewer is a web component to lazy-load <model-viewer>
for improved performance.
The <lite-model-viewer>
web component accepts all the same attributes as <model-viewer>
, and will display a poster image if provided. When <lite-model-viewer>
is clicked, it will inject the <model-viewer>
element into the page, which will immediately activate and load the 3D file.
npm install @cloudfour/lite-model-viewer
<lite-model-viewer
src="your-asset.glb"
poster="your-poster.webp"
ar
camera-controls
shadow-intensity="1"
>
<button>View Model</button>
</lite-model-viewer>
<script type="module" src="lite-model-viewer.js"></script>
Note that although we're adding a <button>
element, it's just a visual indicator. There is a click event listener applied to the entire <lite-model-viewer>
element, so the user can click anywhere on the poster image to trigger the load event.
<lite-model-viewer>
will be applied to <model-viewer>
.
<model-viewer>
docs for more info on available attributes.<template>
element to pass content into <model-viewer>
, to set a custom progress bar, etc.height
and width
attribute, which will apply to both the <lite-model-viewer>
preview and the lazy-loaded <model-viewer>
element.id="model-viewer-script"
attribute. If Lite Model-Viewer detects this script, it will not load the script from Google's CDN.FAQs
A lazy-loaded model-viewer web component
The npm package @cloudfour/lite-model-viewer receives a total of 41 weekly downloads. As such, @cloudfour/lite-model-viewer popularity was classified as not popular.
We found that @cloudfour/lite-model-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.