{"id":42712774,"url":"https://github.com/bimdata/bimdata-viewer-sdk","last_synced_at":"2026-01-29T15:13:09.165Z","repository":{"id":37087361,"uuid":"235123495","full_name":"bimdata/bimdata-viewer-sdk","owner":"bimdata","description":"🏨 Development environment to create BIMData Viewer plugins","archived":false,"fork":false,"pushed_at":"2026-01-22T14:23:11.000Z","size":8157,"stargazers_count":12,"open_issues_count":7,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-23T07:20:15.504Z","etag":null,"topics":["2d","3d","sdk","viewer"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bimdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-20T14:42:02.000Z","updated_at":"2026-01-22T14:23:16.000Z","dependencies_parsed_at":"2024-03-07T16:59:34.388Z","dependency_job_id":"80496037-d259-4183-a292-638ce98383c2","html_url":"https://github.com/bimdata/bimdata-viewer-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/bimdata/bimdata-viewer-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fbimdata-viewer-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fbimdata-viewer-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fbimdata-viewer-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fbimdata-viewer-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bimdata","download_url":"https://codeload.github.com/bimdata/bimdata-viewer-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fbimdata-viewer-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28880017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["2d","3d","sdk","viewer"],"created_at":"2026-01-29T15:13:08.543Z","updated_at":"2026-01-29T15:13:09.159Z","avatar_url":"https://github.com/bimdata.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BIMData Viewer SDK\n\n\u003e `Viewer SDK` is only compatible with alpha versions of @bimdata/viewer:2\n\u003e To use this repository with the lastest stable version of BIMData viewer, please use the [viewer/1.10](https://github.com/bimdata/bimdata-viewer-sdk/tree/viewer/1.10) branch\n\nThis repo is a pre-configured environment to develop BIMData Viewer plugins.\nYou can develop, test, build, package and share your plugin easily.\n\n## Setup\n\nFirst, you have to clone the sdk repo and install SDK dependencies :\n\n```sh\ngit clone https://github.com/bimdata/bimdata-viewer-sdk.git\ncd bimdata-viewer-sdk\nnpm install\nnpm run build\n```\n\n\u003e **Note**\n\u003e\n\u003e If you want to create you own application you can copy the `.env.example` file :\n\u003e\n\u003e ```\n\u003e cp .env.example .env\n\u003e ```\n\u003e\n\u003e Then you can read this guide : https://developers.bimdata.io/api/guides/application.html#which-app-will-you-create\n\n\n\u003e **Warning**\n\u003e\n\u003e **Breaking changes**\n\u003e\n\u003e The old .env.example file contained the `VUE_` prefix which has now been replaced by `VITE_`\n\n### Compiles and hot-reloads for development\n\n```sh\nnpm run dev\n```\n\n### Usage\n\nWhen going on http://localhost:8080, a simple interface will parse your projects and models and let you open the one you want.\nYou can directly open one by opening an URL using specific Ids: http://localhost:8080/viewer?cloudId=391\u0026projectId=634\u0026ifcId=1491\n\n## Create your first plugin\n\n```sh\nnpm run init-plugin\n```\n\nThis tool asks you a couple of questions about the plugin you develop and generate from your answers basic files for your plugin.\n\nFiles are created in the directory `src/plugins/{{name of your plugin}}`.\n\nThen import your newly created plugin and add it to the registerPlugin array.\n\nThe SDK utilizes npm workspaces to link your plugin in the root node_modules directory, making it accessible from Viewer.vue as if it were an installed package.\n\n#### **`src/views/Viewer.vue`**\n\n```js\n// `myPlugin` is the package name of `package.json`\nimport myPlugin from \"myPlugin\";\n\n...\nmounted() {\n  const bimdataViewer = makeBIMDataViewer({...})\n\n  bimdataViewer.registerPlugin(myPlugin);\n}\n...\n```\n\nAnd run the following command:\n\n```sh\nnpm run dev myPlugin\n```\n\n## Package your plugin\n\nTo load your plugin in a real environment, you want to package and publish your plugin.\nThe plugin template is pre-configured with a rollup config that let you do this easily:\n\n```bash\ncd src/plugins/{your_plugin}\nnpm install\nnpm run build\n```\n\nThis creates a dist/ folder in your plugin directory with a simple js file. This minified file includes the CSS and the assets (encoded in base64). It's not the most performant way, but it's the simplest and the Viewer loads many mega-bytes models anyway.\n\nYou can either copy-paste this file in your environment and load it at your convenience, or you can publish it on NPM.\nTo publish it, update the `package.json` file with the proper information and just run an `npm publish`.\n\nThe code is minified to protect your code as much as possible.\n\n## More info about how it works\n\nThe SDK itself and the packaging use _Vite_ to build.\n\nThe `npm run dev` command facilitates the development process by automatically watching selected plugins while using the Vite build tool.\n\n### Usage\n\n```js\nnpm run dev [plugin1] [plugin2] ...\n```\n\nIf no argument, it prompts users to select plugins they want to monitor and launches the necessary processes to watch them simultaneously.\n\nIf a `.watch-plugin.rc` file exists in the SDK root's directory, the script will attempt to read the selected plugins from it.\nExample:\n\n```sh\n\u003e cat .watch-plugin.rc\n@bimdata/snowflakes-viewer-plugin\nMyPlugin\n```\n\nThe `npm run dev:only` command disables this behavior.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimdata%2Fbimdata-viewer-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbimdata%2Fbimdata-viewer-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimdata%2Fbimdata-viewer-sdk/lists"}