{"id":15021314,"url":"https://github.com/andrewisen-tikab/three-multi-select","last_synced_at":"2025-10-28T03:31:07.919Z","repository":{"id":143692682,"uuid":"616646243","full_name":"andrewisen-tikab/three-multi-select","owner":"andrewisen-tikab","description":"A control for three.js, similar to THREE.OrbitControl, that supports multi select.","archived":false,"fork":false,"pushed_at":"2024-09-26T20:39:26.000Z","size":6395,"stargazers_count":5,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-02-01T10:51:12.248Z","etag":null,"topics":["control","controller","controls","multiselect","select","three","threejs","transform"],"latest_commit_sha":null,"homepage":"https://andrewisen-tikab.github.io/three-multi-select/examples/simple/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewisen-tikab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-20T19:51:43.000Z","updated_at":"2024-10-16T19:53:02.000Z","dependencies_parsed_at":"2023-06-13T19:00:21.161Z","dependency_job_id":"d4ca34bf-a906-4dbe-b30e-873e5062a0e3","html_url":"https://github.com/andrewisen-tikab/three-multi-select","commit_stats":{"total_commits":105,"total_committers":5,"mean_commits":21.0,"dds":0.5619047619047619,"last_synced_commit":"47a1fd110f0961338f2202355a6202402c1eae79"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewisen-tikab%2Fthree-multi-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewisen-tikab%2Fthree-multi-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewisen-tikab%2Fthree-multi-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewisen-tikab%2Fthree-multi-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewisen-tikab","download_url":"https://codeload.github.com/andrewisen-tikab/three-multi-select/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238590593,"owners_count":19497351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["control","controller","controls","multiselect","select","three","threejs","transform"],"created_at":"2024-09-24T19:56:26.311Z","updated_at":"2025-10-28T03:31:03.101Z","avatar_url":"https://github.com/andrewisen-tikab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# three-multi-select\n\nA control for three.js, similar to THREE.OrbitControl, that supports multi select and transforming multiple objects at once.\n\n[![Release](https://github.com/andrewisen-tikab/three-multi-select/actions/workflows/release.yml/badge.svg)](https://github.com/andrewisen-tikab/three-multi-select/actions/workflows/release.yml)\n\n![Example](./resources/example.gif)\n\n## Demo\n\nCheck the `examples` folder or visit one of the links below:\n\n-   [Simple](https://andrewisen-tikab.github.io/three-multi-select/examples/simple/)\n-   [Kitchen Sink](https://andrewisen-tikab.github.io/three-multi-select/examples/kitchen-sink/)\n\n## Docs\n\nAuto-generated docs can be found [here](https://andrewisen-tikab.github.io/three-multi-select/docs/classes/MultiSelect.html).\n\n## Instructions\n\nHere's some boilerplate to setup the `three-multi-select`.\n\n```ts\nimport { MultiSelect } from 'three-multi-select';\n\n// Boilerplate code to setup a scene\nconst scene = new THREE.Scene();\n// Everything that is selectable goes into this group.\nconst group = new THREE.Group();\nscene.add(group);\n\n// Boilerplate code to setup three\nconst camera = new THREE.PerspectiveCamera();\nconst renderer = new THREE.WebGLRenderer();\n\n// We will use the OrbitControls from three.js\nconst controls = new OrbitControls(camera, renderer.domElement);\n\n// Everything is now ready for the multi select.\nconst multiSelect = new MultiSelect(\n    // First we provide a camera\n    camera,\n    // Then we provide a `DOMElement` that we can use to attach JavasScript event listeners to.\n    renderer.domElement,\n    // Then, we provide an array of objects that are selectable. In this case, our group.\n    group.children,\n    // Finally, we provide a configuration object.\n    {\n        cameraControls: controls,\n    },\n);\n```\n\nObjects are now selectable. But nothing will happen.\nWe can listen to `select` and `deselect` events like this:\n\n```ts\nmultiSelect.addEventListener\u003c'select', Mesh\u003e('select', (event) =\u003e {\n    const { object } = event;\n});\n\nmultiSelect.addEventListener\u003c'deselect', Mesh\u003e('deselect', (event) =\u003e {\n    const { object } = event;\n});\n```\n\n## Config\n\n| Name                  | Type                                | Default | Description                                                                                                                                                                    |\n| --------------------- | ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| recursive             | `boolean`                           | `false` | If true, it also checks all descendants. Otherwise it only checks intersection with the object.                                                                                |\n| useTransformControls  | `boolean`                           | `true`  | Whether to use THREE's `TransformControls`. If true, one can transform all selected objects as a group.                                                                        |\n| transformControls     | `THREE.TransformControls` or `null` | `null`  | Provide a custom `TransformControls`. If empty, a new controller will be created.                                                                                              |\n| cameraControls        | `GenericControls` or `null`         | `null`  | Provide a reference to a `camera` controller. When using `TransformControls`, it will disable the `cameraControls`. N.B; The provided objet must expose an `enabled` property. |\n| deselectOnRaycastMiss | `boolean`                           | `false` | If true, any raycast miss will result in a deselect. \\* Note that camera controls may interfere with this logic.                                                               |\n\n## Events\n\nGeneric events:\n\n```\nactivate\n```\n\n```\ndeactivate\n```\n\n```\naddEventListener\n```\n\n```\nremoveEventListener\n```\n\n```\nremoveAllEventListeners\n```\n\n```\ndispose\n```\n\nObject events:\n\n```\nselectObject\n```\n\n```\ndeselectObject\n```\n\n```\ndeselectAllObjects\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewisen-tikab%2Fthree-multi-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewisen-tikab%2Fthree-multi-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewisen-tikab%2Fthree-multi-select/lists"}