{"_id":"@dreamoment/para-world","_rev":"4-42a7c79de91108d76cdd198183e0e741","name":"@dreamoment/para-world","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@dreamoment/para-world","version":"0.0.1","type":"module","main":"dist/index.es.js","author":{"name":"dreamoment-npm"},"license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"dev":"vite","build":"vue-tsc && vite build","publish:patch":"npm version patch && npm publish"},"devDependencies":{"@types/node":"^20.10.5","@types/three":"^0.159.0","@vitejs/plugin-vue":"^4.5.2","typescript":"^5.2.2","vite":"^5.0.8","vite-plugin-dts":"^3.6.4","vue":"^3.3.11","vue-tsc":"^1.8.25"},"dependencies":{"three":"^0.159.0"},"_id":"@dreamoment/para-world@0.0.1","gitHead":"057ac3842a75d7cd48d8564a2c0a068a36da4ccd","description":"![](/docs/preview.gif)","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-1O2JAQVLd5ZKyQQqCsQOkDGXTjJggdyVJy0Mzss9X7wWF06jUIoh3gUDGDc1lmF/hV0mmOdChBcSocEA7VnzVw==","shasum":"b80592b0138e5d869bcb74c357ed5ad1ffb8b247","tarball":"https://registry.npmjs.org/@dreamoment/para-world/-/para-world-0.0.1.tgz","fileCount":5,"unpackedSize":3640,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMiNFmTYuWeD+vK6YoqaA60ZOIniu4onT1OYmBADSTjgIgOs1vtaibWlFn/kTPjvXmu3fxRoE75feuEzTPbQWpkIo="}]},"_npmUser":{"name":"dreamoment-npm","email":"dasu709394@qq.com"},"directories":{},"maintainers":[{"name":"dreamoment-npm","email":"dasu709394@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/para-world_0.0.1_1703005299792_0.5913425753892434"},"_hasShrinkwrap":false},"0.0.2":{"name":"@dreamoment/para-world","version":"0.0.2","type":"module","main":"dist/index.es.js","typings":"dist/index.d.ts","author":{"name":"dreamoment-npm"},"license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"dev":"vite","build":"vue-tsc && vite build","publish:patch":"npm version patch && npm publish"},"devDependencies":{"@types/node":"^20.10.5","@types/three":"^0.159.0","@vitejs/plugin-vue":"^4.5.2","typescript":"^5.2.2","vite":"^5.0.8","vite-plugin-dts":"^3.6.4","vue":"^3.3.11","vue-tsc":"^1.8.25"},"dependencies":{"@dreamoment/para-world":"^0.0.1","three":"^0.159.0"},"_id":"@dreamoment/para-world@0.0.2","gitHead":"12b24761c7929db193c445860a4b61a301ab6817","description":"![](/docs/preview.gif)","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-qkB9VhWTYJX6HrYlT5YICVKCxNhwjmfNeDN84/ROWGyn1pguF6Y0IM/gcVaJdtoPWVUVyAVeKgkoLPg+AYNvpA==","shasum":"5a28a75e4ff23de408603b0f29cf0fea6f0ff420","tarball":"https://registry.npmjs.org/@dreamoment/para-world/-/para-world-0.0.2.tgz","fileCount":6,"unpackedSize":751281,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/cqmMEonjZ6R25F/yGUBugVtPU9NcKYGbFrByFg/19AiEA+g+HxdUCxEvAgL6yfKpBmYGTd7lrOk7KAn5ZG8Yn4EY="}]},"_npmUser":{"name":"dreamoment-npm","email":"dasu709394@qq.com"},"directories":{},"maintainers":[{"name":"dreamoment-npm","email":"dasu709394@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/para-world_0.0.2_1703005582239_0.986075436679144"},"_hasShrinkwrap":false},"0.0.3":{"name":"@dreamoment/para-world","version":"0.0.3","type":"module","types":"dist/index.d.ts","main":"dist/index.es.js","author":{"name":"dreamoment-npm"},"license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"dev":"vite","build":"vue-tsc && vite build","publish:patch":"npm version patch && npm publish"},"devDependencies":{"@types/node":"^20.10.5","@types/three":"^0.159.0","@vitejs/plugin-vue":"^4.5.2","typescript":"^5.2.2","vite":"^5.0.8","vite-plugin-dts":"^3.6.4","vue":"^3.3.11","vue-tsc":"^1.8.25"},"dependencies":{"three":"^0.159.0"},"_id":"@dreamoment/para-world@0.0.3","gitHead":"e56264e1abf37f06c4fb1bfc72c5c6bf93a12363","description":"![](/docs/preview.gif)","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-8SUIihEEwLx/QUSWUDkmrNVc4qeSJzpM0Z5mVqmr7zmQ5LdLfRApJ7R7XoUCw8EtwdmpCJHLVlyelOuUEEEQoA==","shasum":"9f06cf60bd73d00aea9838c87a9ea03a1c98ab23","tarball":"https://registry.npmjs.org/@dreamoment/para-world/-/para-world-0.0.3.tgz","fileCount":6,"unpackedSize":751239,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYk3IGIxZwFviufbN5nyx2LukaQewmVbHeG/aOcLcqeAiEAscM71KuvJy3qX/A4bTOyvckj+w2VUPn1g3W+FJGfg6k="}]},"_npmUser":{"name":"dreamoment-npm","email":"dasu709394@qq.com"},"directories":{},"maintainers":[{"name":"dreamoment-npm","email":"dasu709394@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/para-world_0.0.3_1703005886015_0.333947330258761"},"_hasShrinkwrap":false},"0.0.4":{"name":"@dreamoment/para-world","version":"0.0.4","type":"module","types":"dist/index.d.ts","main":"dist/index.es.js","author":{"name":"dreamoment-npm"},"license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"dev":"vite","build":"vue-tsc && vite build","publish:patch":"npm version patch && npm publish"},"devDependencies":{"@types/node":"^20.10.5","@types/three":"^0.159.0","@vitejs/plugin-vue":"^4.5.2","typescript":"^5.2.2","vite":"^5.0.8","vite-plugin-dts":"^3.6.4","vue":"^3.3.11","vue-tsc":"^1.8.25"},"dependencies":{"three":"^0.159.0"},"_id":"@dreamoment/para-world@0.0.4","gitHead":"75d935e5fa655cc921518a66a211252f96b07a39","description":"<h1 align=\"center\">para-world</h1>","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-ryL8xl9dYnUr/VmKoN5OVPwOYnxphJyS4UpYrdXL8XN/cd+xqnejQhph0HHuV2adgITM1x+1RvLZ+CsX04af7g==","shasum":"30fc174ba11471e33bb2f82d8e593edd479aaa90","tarball":"https://registry.npmjs.org/@dreamoment/para-world/-/para-world-0.0.4.tgz","fileCount":7,"unpackedSize":756722,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmY5bf1lYBAe1MvMu+kUtxemVakvG0AUUMiVAMf3qZhQIhAL51EwDvi1ODvaw1wm3d48eewL5fUNq7UeJyR1CtH/aO"}]},"_npmUser":{"name":"dreamoment-npm","email":"dasu709394@qq.com"},"directories":{},"maintainers":[{"name":"dreamoment-npm","email":"dasu709394@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/para-world_0.0.4_1703010715637_0.45388935231114425"},"_hasShrinkwrap":false},"0.0.5":{"name":"@dreamoment/para-world","version":"0.0.5","type":"module","types":"dist/index.d.ts","main":"dist/index.es.js","author":{"name":"dreamoment-npm"},"license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"dev":"vite","build:example":"vue-tsc && vite build --mode example","build:lib":"vue-tsc && vite build --mode lib","publish:patch":"npm version patch && npm publish"},"devDependencies":{"@types/node":"^20.10.5","@types/three":"^0.159.0","@vitejs/plugin-vue":"^4.5.2","typescript":"^5.2.2","vite":"^5.0.8","vite-plugin-dts":"^3.6.4","vue":"^3.3.11","vue-tsc":"^1.8.25"},"dependencies":{"normalize.css":"^8.0.1","three":"^0.159.0"},"_id":"@dreamoment/para-world@0.0.5","gitHead":"0b967aea7d6e946860a62eab020b20dff552185a","description":"<h1 align=\"center\">para-world</h1>","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-bFF30KHyp88YIlaDN1X9mNqarRnOG6ZC9To1fEcCvEEwvYTMqn1TqK9jR7U6PwkpNMdh0F8I3mjU2muzqNp50g==","shasum":"1385a385e08f6168f02d12d56cc4c055c0a0113e","tarball":"https://registry.npmjs.org/@dreamoment/para-world/-/para-world-0.0.5.tgz","fileCount":7,"unpackedSize":756829,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4XAWwhO1myl8YBtlIKFRWn71fQO/byR/rlQkz6zE/1AiEAsRyyYOJ8B3O0uKlcDZIbc5vVX4JMHyJGUreUgBRDPjI="}]},"_npmUser":{"name":"dreamoment-npm","email":"dasu709394@qq.com"},"directories":{},"maintainers":[{"name":"dreamoment-npm","email":"dasu709394@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/para-world_0.0.5_1703058045358_0.7835063020085442"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-19T17:01:39.680Z","0.0.1":"2023-12-19T17:01:40.054Z","modified":"2023-12-20T07:40:45.820Z","0.0.2":"2023-12-19T17:06:22.517Z","0.0.3":"2023-12-19T17:11:26.270Z","0.0.4":"2023-12-19T18:31:55.992Z","0.0.5":"2023-12-20T07:40:45.617Z"},"maintainers":[{"name":"dreamoment-npm","email":"dasu709394@qq.com"}],"description":"<h1 align=\"center\">para-world</h1>","author":{"name":"dreamoment-npm"},"license":"MIT","readme":"<h1 align=\"center\">para-world</h1>\n\n![](/docs/preview.gif)\n\nLanguage: English | [中文简体](README_zh_cn.md)\n\n## What is para-world ?\n\nAchieve the X-ray effect of objects as if there were parallel worlds.\n\n## Features\n\n- Lightweight and easy to use\n\n- It relies on `three.js` and does not mandate the `three.js` version\n\n- support`typescript`\n\n## Install\n\n```agsl\nnpm i @dreamoment/para-world\n```\n\n## Examples\n\n```\nimport * as THREE from 'three'\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'\nimport ParaWorld from '@dreamoment/para-world'\n\nconst scene = new THREE.Scene()\nconst camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000 )\nconst ambientLight = new THREE.AmbientLight(0xffffff)\nconst directionalLight = new THREE.DirectionalLight(0xffffff)\ndirectionalLight.position.set(1, 1, 1)\nscene.add(ambientLight, directionalLight)\n\nconst renderer = new THREE.WebGLRenderer()\nrenderer.setSize(window.innerWidth, window.innerHeight)\ndocument.body.appendChild(renderer.domElement)\n\nconst controls = new OrbitControls(camera, renderer.domElement)\n\ncamera.position.y += 10\n\n// edit scene\nconst createWall = () => {\n  const mesh = new THREE.Mesh(new THREE.BoxGeometry(2, 2, 2), new THREE.MeshPhysicalMaterial({ color: 0x00ff00 }))\n  return mesh\n}\nconst _player = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), new THREE.MeshPhysicalMaterial({ color: 0xff0000 }))\nconst _wall1 = createWall()\nconst _wall2 = createWall()\nconst _wall3 = createWall()\n_wall1.position.set(0, 0, 3)\n_wall2.position.set(3, 0, 3)\n_wall3.position.set(6, 0, 3)\nscene.add(_player, _wall1, _wall2, _wall3)\n\n// enter para world\nParaWorld.createTargetByMaterial(_player, new THREE.MeshPhysicalMaterial({ color: 0x0000ff }))\nParaWorld.createCover(_wall1)\nParaWorld.createCover(_wall2)\n\nconst animate = () => {\n  controls.update();\n  renderer.render(scene, camera)\n}\n\nrenderer.setAnimationLoop(animate)\n```\n\n## API\n\n### `static`renderOrder\n\nRender order, used as a base for calculation。\n\n### `static`createTargetByMaterial\n\nPass uniform materials to create transformable objects, such as players. (For simple models of a single material)\n\n```\nParaWorld.createTargetByMaterial(target: THREE.Object3D, material: THREE.Material): THREE.Group\n```\n\n### `static`createTargetByObject3D\n\nPass custom objects and create transformable objects, such as players. (For complex models with multiple materials) This custom object is a clone of a different new material based on the source object.\n\n```\nParaWorld.createTargetByMaterial(target: THREE.Object3D, clone: THREE.Object3D): THREE.Group\n```\n\n### `static`createCover\n\nCreate an occluding object, such as a wall.\n\n```\nParaWorld.createCover(target: THREE.Object3D): THREE.Group\n```\n","readmeFilename":"README.md"}