
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
@ridp/threejs
Advanced tools
useThreeJs 声明:
/**
*
* @param {String} selector ID '#xxxx'
* @param {Object} option - 初始化参数
* @property {Boolean} option.css3d - 模型
* @returns any
*/
function useThreeJs(selector, option)
使用:
import { useThreeJs } from '@ridp/threejs'
const { scene, camera, renderer, control, domWidth, domHeight, isReady, addAnimate, frameArea } = useThreeJs("#InsId", )
返回变量:
THREE.Scene
THREE.PerspectiveCamera
const renderer = new WebGLRenderer({
antialias: true,
alpha: true,
precision: "mediump",
logarithmicDepthBuffer: true,
})
THREE.OrbitControls
ref(Number)
ref(Number)
ref(Boolean)
返回方法:
addAnimate
/**
* 循环帧中添加执行函数
* @param {*} animate
*/
function addAnimate(animate): void
frameArea
/**物体视窗自动适应
*
* @param {Object3D} model
* @param {Number} scale
* @param {Camera} camera
* @param {OrbitControls} controls
* @param {Vector3} offset
*/
function frameArea(model, scale, camera, controls, offset): void
useRaycaster
useObb
useGLTFLoader
FAQs
- useThreeJs 声明:
The npm package @ridp/threejs receives a total of 75 weekly downloads. As such, @ridp/threejs popularity was classified as not popular.
We found that @ridp/threejs demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.