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.
unplugin-3d-object
Advanced tools
Import 3d objects with obj, mtl and textures whilte importing .obj file
Load whole 3d object while importing .obj files.
npm i unplugin-3d-object
# or
yarn add unplugin-3d-object
# or
pnpm i unplugin-3d-object
// vite.config.ts
import loader3dObject from 'unplugin-3d-object/vite'
export default defineConfig({
plugins: [
loader3dObject({ /* options */ }),
],
})
Example: playground/
// rollup.config.js
import loader3dObject from 'unplugin-3d-object/rollup'
export default {
plugins: [
loader3dObject({ /* options */ }),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-3d-object/webpack')({ /* options */ })
]
}
// nuxt.config.js
export default {
buildModules: [
['unplugin-3d-object/nuxt', { /* options */ }],
],
}
This module works for both Nuxt 2 and Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-3d-object/webpack')({ /* options */ }),
],
},
}
Plugin load .obj, scan for mtl libs and trying to load them. From mtl plugin also trying to load textures. Plugin transform .obj files to OBJ
type.
import house from 'house/house.obj'
// ...
createObject(house.obj, house.mtl.toString(), house.mtl.paths)
import house from 'house/house.obj?three'
// ...
scene.add(house)
Example: playground
If .obj file require texture or mtl file that can not be found it will throw warning.
Make sure change absolute paths to relative in .obj and .mtl
You can turn off warnings by passing warnings: false
in plugin options if you don't care about missing assets.
FAQs
Import 3d objects with obj, mtl and textures whilte importing .obj file
The npm package unplugin-3d-object receives a total of 0 weekly downloads. As such, unplugin-3d-object popularity was classified as not popular.
We found that unplugin-3d-object demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.