{"id":51985788,"url":"https://github.com/node-3d/core","last_synced_at":"2026-07-30T19:01:32.410Z","repository":{"id":16581903,"uuid":"80198999","full_name":"node-3d/core","owner":"node-3d","description":"An extensible Node.js 3D core for desktop applications","archived":false,"fork":false,"pushed_at":"2026-07-26T17:52:01.000Z","size":12954,"stargazers_count":82,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-07-26T19:15:41.300Z","etag":null,"topics":["3d","gl","glfw","gpu","gpu-computing","graphics","image","javascript","js","native","node-3d","opengl","pixijs","simulation","threejs","vao","vbo","webgl","window"],"latest_commit_sha":null,"homepage":"https://github.com/node-3d/node-3d","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/node-3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2017-01-27T10:33:14.000Z","updated_at":"2026-07-26T17:52:07.000Z","dependencies_parsed_at":"2026-07-19T00:03:21.571Z","dependency_job_id":null,"html_url":"https://github.com/node-3d/core","commit_stats":{"total_commits":179,"total_committers":5,"mean_commits":35.8,"dds":0.4860335195530726,"last_synced_commit":"19342c49cca9214eeefd9247e7c4db0efefb0904"},"previous_names":["raub/node-3d-ready","node-3d/core"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/node-3d/core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-3d","download_url":"https://codeload.github.com/node-3d/core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fcore/sbom","scorecard":{"id":691767,"data":{"date":"2025-08-11","repo":{"name":"github.com/node-3d/3d-core-raub","commit":"bd35a5e6e36df2ec450d017c52dbded681d4b31c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/eslint.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":1,"reason":"0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/eslint.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/eslint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/eslint.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/eslint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/3d-core-raub/test.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T02:28:21.555Z","repository_id":16581903,"created_at":"2025-08-22T02:28:21.555Z","updated_at":"2025-08-22T02:28:21.555Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36088336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-30T02:00:05.956Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["3d","gl","glfw","gpu","gpu-computing","graphics","image","javascript","js","native","node-3d","opengl","pixijs","simulation","threejs","vao","vbo","webgl","window"],"created_at":"2026-07-30T19:01:30.326Z","updated_at":"2026-07-30T19:01:32.392Z","avatar_url":"https://github.com/node-3d.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js 3D Core\n\nThis is a part of [Node3D](https://github.com/node-3d) project.\n\n[![NPM](https://badge.fury.io/js/@node-3d%2Fcore.svg)](https://badge.fury.io/js/@node-3d%2Fcore)\n[![Lint](https://github.com/node-3d/core/actions/workflows/lint.yml/badge.svg)](https://github.com/node-3d/core/actions/workflows/lint.yml)\n[![Test](https://github.com/node-3d/core/actions/workflows/test.yml/badge.svg)](https://github.com/node-3d/core/actions/workflows/test.yml)\n\n```bash\nnpm install @node-3d/core\n```\n\n\u003e This package uses precompiled Node.js addons. **There is no compilation** during `npm install`.\nThe addons are compiled for: Windows x64, Linux x64/ARM64, macOS ARM64.\n\n![Example](examples/screenshot.png)\n\n* WebGL/OpenGL on **Node.js** with support for web libs, such as **three.js**.\n* Multi-window apps, low-level window control with [@node-3d/glfw](https://github.com/node-3d/glfw).\n* Modern OpenGL functions also available, see [@node-3d/webgl](https://github.com/node-3d/webgl).\n* Image loading/saving in popular formats with [@node-3d/image](https://github.com/node-3d/image).\n\n## API\n\n### `init(opts?: TInitOpts): TCore3D`\n\nInitializes Node3D, creates the first `BrowserDocument`, wires browser-like globals, and returns:\n\n* `doc` - the created `BrowserDocument`, also assigned to `globalThis.document` and `globalThis.window`.\n* `loop` - shortcut for `doc.loop`.\n* `raf` - shortcut for `doc.requestAnimationFrame`.\n\n`init()` is cached. Repeated calls return the first result and do not create another document.\n\nOptions are mostly `BrowserDocument` window options, plus:\n\n* `isGles3` - request an OpenGL ES 3 style context and shader behavior, closest to WebGL.\n* `isWebGL2` - expose the context as WebGL2 to browser-style libraries.\n* `isVisible` - pass `false` to create an initially hidden window.\n\n### `addThreeHelpers(three): void`\n\nPatches a Three.js module instance for Node3D:\n\n* Makes `three.FileLoader.load()` read files through Node.js.\n* Adds `three.Texture.fromId(id)` so Three.js textures can wrap existing GL texture IDs.\n\nCall this once before creating Three.js loaders/materials that depend on those behaviors.\n\n### Re-exports\n\n`@node-3d/core` re-exports the common pieces needed by apps:\n\n* `Screen`, `Surface`, `Points`, `Lines`, `Tris`, `Rect`, `Brush`\n* `Color`, `Vec2`, `Vec3`, `Vec4`\n* `BrowserDocument`, `BrowserWindow`, `Document`, `Window`, `Image`\n* `gl` from `@node-3d/webgl`\n* `glfw` from `@node-3d/glfw`, with core `glfw.Document`, `glfw.Window`, and native `glfw.GlfwWindow` attached\n\n### `Screen`\n\n`Screen` is the high-level Three.js helper. It creates or accepts a camera, scene, and renderer,\nbinds them to the Node3D document, forwards input events, and recreates the renderer when the\nwindow mode changes.\n\nImportant members:\n\n* `renderer`, `scene`, `camera`, `document`, `canvas`, `context`\n* `width`, `height`, `w`, `h`, `size`\n* `title`, `icon`, `fov`, `mode`\n* `draw()` - renders `scene` with `camera`\n* `snapshot(name?)` - saves the current framebuffer\n\n### Drawable Helpers\n\nThe lightweight drawable classes are useful when you need simple geometry without writing\nThree.js setup code each time:\n\n* `Points` - point cloud drawable backed by GL buffers.\n* `Lines` - line, segment, or loop drawable.\n* `Tris` - triangle drawable.\n* `Rect` - 2D rectangle helper.\n* `Brush` - mouse/paint-style helper built on rectangles.\n* `Surface` - nested render surface.\n\nThey are intentionally small wrappers around Three.js objects and raw GL resources.\n\n## Example\n\n(As in [crate-lean.ts](examples/crate-lean.ts)):\n\n```javascript\nimport * as THREE from 'three';\n\nimport { Screen, addThreeHelpers, init } from '@node-3d/core';\n\nconst { loop } = init({\n\tisGles3: true, vsync: true, autoEsc: true, autoFullscreen: true, title: 'Crate',\n});\naddThreeHelpers(THREE);\nconst screen = new Screen({ three: THREE, fov: 70, z: 2 });\n\nconst texture = new THREE.TextureLoader().load('three/textures/crate.gif');\ntexture.colorSpace = THREE.SRGBColorSpace;\nconst geometry = new THREE.BoxGeometry();\nconst material = new THREE.MeshBasicMaterial({ map: texture });\nconst mesh = new THREE.Mesh(geometry, material);\nscreen.scene.add(mesh);\n\nloop((now) =\u003e {\n\tmesh.rotation.x = now * 0.0005;\n\tmesh.rotation.y = now * 0.001;\n\tscreen.draw();\n});\n```\n\nExample Notes:\n\n1. You can run TypeScript examples directly with Node.js 24.\n1. `loop` is a convenience method, you can use `requestAnimationFrame` too.\n1. `autoFullscreen` option enables \"CTRL+F\", \"CTRL+SHIFT+F\", \"CTRL+ALT+F\" to switch\n\twindow modes.\n1. `Screen` helps with **three.js**-oriented resource management, but is not required.\n1. **three.js** uses VAO, so if not using `Screen`, handling the window mode changes\n\t(which creates a separate OpenGL context) is up to you.\n\tBasically, `doc.on('mode', () =\u003e {...})` -\n\there you should re-create `THREE.WebGLRenderer`. See the current\n\t[Screen implementation](ts/objects/screen.ts).\n\n\n## OpenGL Features\n\n1. This is real **native OpenGL**, and you have direct access to GL resource IDs. This may be\n\tuseful for resource sharing and compute interop:\n\t* [CUDA-GL interop](https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__OPENGL.html).\n\t* [OpenCL-GL interop](https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clEnqueueAcquireGLObjects.html) - see [example](examples/boids).\n\t* [Context sharing](https://www.glfw.org/docs/latest/context_guide.html#context_sharing).\n1. The flag `isGles3` lets you use a **GL ES 3** preset, which is closest to \"real\" WebGL.\n\tIf set to `false`, WebGL stuff (such as three.js) will still work, but now with some hacks.\n\tHowever, if you are planning to use non-WebGL features (e.g. **OpenGL 4.5** features),\n\tyou might want it off, and then select a specific context version manually.\n1. The flag `isWebGL2` impacts how web libraries recognize the WebGL version.\n\tBut it doesn't really change the capabilities of the engine.\n1. **Offscreen rendering** is possible on Windows and Linux, as demonstrated by the tests\n\trunning in GitHub Actions. There are test cases that generate and compare screenshots.\n1. OpenGL **context sharing** is enabled. You can obtain `HDC, HWND, CTX` for Windows and whatever\n\tthose are called on Linux and macOS. See [@node-3d/glfw](https://github.com/node-3d/glfw).\n\n\n## License\n\n**You get this for free. Have fun!**\n\nSome of the components have their separate licenses, but all of them may be used\ncommercially, without royalty.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-3d%2Fcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-3d%2Fcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-3d%2Fcore/lists"}