{"_id":"@boogiepop-other/quick-three","name":"@boogiepop-other/quick-three","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@boogiepop-other/quick-three","version":"0.1.0","description":"轻量 Three.js 场景引擎（框架无关，可被 Vue3 包装）","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./vue":{"types":"./dist/vue/index.d.ts","import":"./dist/vue/index.js","require":"./dist/vue/index.cjs"}},"peerDependencies":{"three":">=0.170.0","vue":"^3.4.0"},"peerDependenciesMeta":{"vue":{"optional":true}},"dependencies":{"@tweenjs/tween.js":"^23.1.3","cannon-es":"^0.20.0","lil-gui":"^0.20.0","@boogiepop-other/helper":"0.1.0"},"devDependencies":{"@types/three":"^0.185.0","three":"~0.185.1","tsup":"^8.3.5","typescript":"^5.7.3"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts src/vue/index.ts --format esm,cjs --dts --external three --external lil-gui --external @boogiepop-other/helper --external @tweenjs/tween.js --external cannon-es --clean","typecheck":"tsc -p tsconfig.json --noEmit"},"_id":"@boogiepop-other/quick-three@0.1.0","_integrity":"sha512-GgRwKpauB2EujHjYaEuJLdiNN+ejYE8X4P/bc9cS3gKhWA7cpW1WWUY4bLCh5yGYqxDkjBsHVchrMQTZS9SKVQ==","_resolved":"C:\\Users\\shell\\AppData\\Local\\Temp\\dec72f4013f5f0e82ce2c2597d9dca18\\boogiepop-other-quick-three-0.1.0.tgz","_from":"file:boogiepop-other-quick-three-0.1.0.tgz","_nodeVersion":"26.4.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-GgRwKpauB2EujHjYaEuJLdiNN+ejYE8X4P/bc9cS3gKhWA7cpW1WWUY4bLCh5yGYqxDkjBsHVchrMQTZS9SKVQ==","shasum":"5af6686a023be0ea4bc654f9150f20b2dd81aa54","tarball":"https://registry.npmjs.org/@boogiepop-other/quick-three/-/quick-three-0.1.0.tgz","fileCount":14,"unpackedSize":834577,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA+10R70nbQcr/mp43BS3vnzvxDvsiPIbyT0Ysxh2CdwAiBJ69DZbAHORtuMN7rn4A5VV5SGYlbcMYrqhLRsahzh8Q=="}]},"_npmUser":{"name":"boogiepop-other","email":"shelllvg0826@gmail.com"},"directories":{},"maintainers":[{"name":"boogiepop-other","email":"shelllvg0826@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/quick-three_0.1.0_1787623598941_0.6291706684111105"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T02:06:38.678Z","0.1.0":"2026-08-25T02:06:39.081Z","modified":"2026-08-25T02:06:39.328Z"},"maintainers":[{"name":"boogiepop-other","email":"shelllvg0826@gmail.com"}],"description":"轻量 Three.js 场景引擎（框架无关，可被 Vue3 包装）","readme":"# @boogiepop-other/quick-three\n\r\n轻量 Three.js 场景运行时 + 插件扩展。\r\n\r\n## 基础用法\r\n\r\n```ts\r\nimport {\r\n  QuickThree,\r\n  createOrbitControlsPlugin,\r\n  createDebugHelpersPlugin,\r\n  createGltfLoaderPlugin,\r\n  createDebugPanelPlugin,\r\n} from '@boogiepop-other/quick-three'\n\r\n// 方式 A：debug: true 自动挂右上角调试面板\r\nconst qt = new QuickThree({ el, debug: true })\r\nqt.use(createOrbitControlsPlugin({ target: [0, 0, 0] }))\r\nqt.use(createDebugHelpersPlugin())\r\nqt.use(createGltfLoaderPlugin())\r\nqt.start()\r\n\r\n// 方式 B：手动安装\r\n// qt.use(createDebugPanelPlugin({ openLight: true }))\r\n// qt.adjustment.show() / .hide()\r\n// qt.adjustment.refreshLights()\r\n\r\nqt.dispose()\r\n```\r\n\r\n## 调试面板（对齐京士威 inspector 外观）\r\n\r\n```ts\r\nnew QuickThree({ el, debug: true })\r\n// 右上角：滑杆图标 | FPS | 设备图标\r\n// 点滑杆展开「场景/相机/渲染器/光源/控制器」\r\n\r\nqt.adjustment.showAdjustment()\r\nqt.adjustment.hideAdjustment()\r\nconsole.log(qt.adjustment.fps)\r\n```\r\n\r\n## HTML 标注 + 拾取\r\n\r\n```ts\r\nqt.use(createCss2dPlugin())\r\nqt.css2d.add({ html: '<div class=\"tag\">泵组</div>', position: [0, 2, 0] })\r\n\r\nqt.use(createRaycasterPlugin({ targets: [mesh] }))\r\nqt.raycaster.on('click', (hit) => console.log(hit?.object))\r\n```\r\n\r\n## 后处理 Bloom\r\n\r\n```ts\r\nqt.use(createPostprocessingPlugin({\r\n  bloom: { strength: 1.35, threshold: 0.55 }\r\n}))\r\nqt.postprocessing.setBloom({ enabled: true, strength: 1.8 })\r\n```\r\n\r\n## Things 物体\r\n\r\n```ts\r\nqt.use(createRaycasterPlugin())\r\nqt.use(createThingsPlugin())\r\nconst thing = qt.thingsApi.add({ o3: mesh, name: '泵组' })\r\nthing.addEventListener(ThingEvents.Click, (e) => console.log(e.detail))\r\n```\r\n\r\n## WebGPU / 物理\r\n\r\n```ts\r\nconst qt = await QuickThree.create({ el, backend: 'webgpu', fallbackToWebGL: true })\r\nqt.use(createPhysicsPlugin({ groundY: 0 }))\r\nqt.physics.addBody({ object: mesh, mass: 1, shape: 'sphere' })\r\n```\r\n\r\n| 工厂函数 | 说明 |\r\n|---------|------|\r\n| `createDebugPanelPlugin` | 右上角 FPS 条 + 参数 mini-panel，`qt.adjustment` |\r\n| `createOrbitControlsPlugin` | 轨道控制器，挂载 `qt.controls` |\r\n| `createDebugHelpersPlugin` | 网格 / 坐标轴 / 灯光方向 + 范围盒 |\r\n| `createGltfLoaderPlugin` | `qt.gltf.load / loadMany / remove` |\r\n| `createCss2dPlugin` | CSS2D HTML 标注，`qt.css2d` |\r\n| `createRaycasterPlugin` | 点击/悬停拾取，`qt.raycaster` |\r\n| `createPostprocessingPlugin` | EffectComposer + Bloom（WebGL）；WebGPU 下跳过 |\r\n| `createThingsPlugin` | Thing 池 + 与拾取联动 |\r\n| `createPhysicsPlugin` | 简易重力/地面，`qt.physics` |\r\n| `QuickThree.create` / `isWebGPUAvailable` | WebGPU 可选后端 |\r\n\r\n地图叠加请用 `@boogiepop-other/map-amap` 的 `AmapThreeLayer`，不要混用本包的 OrbitControls。\n\r\n迁移路线见仓库 `docs/PLUGIN_MIGRATION.md`。\r\n","readmeFilename":"README.md","_rev":"1-7197d2927b47e8c8f1caeae68a1acd83"}