{"id":20049407,"url":"https://github.com/aidear3/fairygui-threejs","last_synced_at":"2026-04-27T18:32:12.441Z","repository":{"id":186288705,"uuid":"634295060","full_name":"aidear3/FairyGUI-threejs","owner":"aidear3","description":"A GUI Editor \u0026 framework for Three.js","archived":false,"fork":false,"pushed_at":"2023-04-29T17:05:40.000Z","size":9039,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T13:54:07.258Z","etag":null,"topics":["fairygui","gui-editor","three-js","threejs","threejs-e"],"latest_commit_sha":null,"homepage":"https://www.fairygui.com/","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/aidear3.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}},"created_at":"2023-04-29T17:03:57.000Z","updated_at":"2023-10-08T07:52:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ed5f09b-4d1b-49cd-b619-b7ca82515dff","html_url":"https://github.com/aidear3/FairyGUI-threejs","commit_stats":null,"previous_names":["aidear323/fairygui-threejs","aidear3/fairygui-threejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aidear3/FairyGUI-threejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidear3%2FFairyGUI-threejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidear3%2FFairyGUI-threejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidear3%2FFairyGUI-threejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidear3%2FFairyGUI-threejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aidear3","download_url":"https://codeload.github.com/aidear3/FairyGUI-threejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidear3%2FFairyGUI-threejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32349445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"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":["fairygui","gui-editor","three-js","threejs","threejs-e"],"created_at":"2024-11-13T11:49:48.900Z","updated_at":"2026-04-27T18:32:12.425Z","avatar_url":"https://github.com/aidear3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FairyGUI-three\n\n#### A GUI Editor\u0026amp;framework for Three.js ####\n\nOfficial website: [www.fairygui.com](https://www.fairygui.com)\n\n### Usage ###\n\nStep 1, we use the editor to create the UI.\n\n![](images/20200610-084916.png)\n\nStep 2, we only need a little code to display it.\n\n```javascript\nimport * as fgui from \"fairygui-three\";\n\nvar renderer;\nvar scene;\nvar view;\n\ninit();\nanimate();\n\nfunction init() {\n    //THREE initialization code here\n\n    fgui.Stage.init(renderer, { screenMode:'horizontal' });  //screenMode is optional if you dont want to rotate the screen \n    fgui.Stage.scene = scene;\n\n    fgui.UIPackage.loadPackage('path/to/UI').then(()=\u003e {\n        view = fgui.UIPackage.CreateObject('Basics', 'Main');\n        view.makeFullScreen();\n        fgui.GRoot.inst.addChild(view);\n    });\n}\n\nfunction animate() {\n\n    requestAnimationFrame( animate );\n\n    fgui.Stage.update();\n    renderer.render(scene, fgui.Stage.camera);\n}\n```\n\nYou should see [this](https://fairygui.com/threejs-demo/main/)\n\nIn the example above, an UI is created and displayed by an orthographic camera (fgui.Stage.camera) . It's easy to display UI by an specific perspective camera.\n\n```javascript\nimport * as fgui from \"fairygui-three\";\n\nvar renderer;\nvar scene;\nvar camera;\nvar view;\n\ninit();\nanimate();\n\nfunction init() {\n    //THREE initialization code here\n\n    camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.01, 10 );\n\tcamera.position.z = 1;\n\n    fgui.Stage.init(renderer);\n    fgui.Stage.scene = scene;\n\n    fgui.UIPackage.loadPackage('path/to/UI').then(()=\u003e {\n        view = fgui.UIPackage.CreateObject('3DInventory', 'Main');\n        view.displayObject.camera = camera;\n        view.displayObject.setLayer(0);\n\n        let container = new Group();\n        container.scale.set(0.5, 0.5, 0.5);\n        container.add(view.obj3D);\n        scene.add(container);\n    });\n}\n\nfunction animate() {\n\n    requestAnimationFrame( animate );\n\n    fgui.Stage.update();\n    renderer.render(scene, camera);\n}\n```\n\nYou should see [this](https://fairygui.com/threejs-demo/3d/)\n\nIf a perspective camera is using for all UI,\n\n```javascript\n    Stage.init(renderer, { defaultLayer:0 });\n    Stage.camera = yourCamera;\n```\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidear3%2Ffairygui-threejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faidear3%2Ffairygui-threejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidear3%2Ffairygui-threejs/lists"}