{"id":13826823,"url":"https://github.com/Donorhan/Lemon-JS","last_synced_at":"2025-07-09T01:31:47.597Z","repository":{"id":36243666,"uuid":"40548023","full_name":"Donorhan/Lemon-JS","owner":"Donorhan","description":"An accessible rendering engine in Javascript","archived":false,"fork":false,"pushed_at":"2019-06-06T05:57:15.000Z","size":7514,"stargazers_count":64,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-11T06:37:06.185Z","etag":null,"topics":["3d","javascript","rendering-engine","shaders","webgl"],"latest_commit_sha":null,"homepage":"https://donorhan.github.io/Lemon-JS/","language":"JavaScript","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/Donorhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-11T14:55:47.000Z","updated_at":"2023-12-20T15:08:07.000Z","dependencies_parsed_at":"2022-08-20T17:40:51.729Z","dependency_job_id":null,"html_url":"https://github.com/Donorhan/Lemon-JS","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donorhan%2FLemon-JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donorhan%2FLemon-JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donorhan%2FLemon-JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Donorhan%2FLemon-JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Donorhan","download_url":"https://codeload.github.com/Donorhan/Lemon-JS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476383,"owners_count":17480215,"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":["3d","javascript","rendering-engine","shaders","webgl"],"created_at":"2024-08-04T09:01:44.915Z","updated_at":"2024-11-20T05:31:12.111Z","avatar_url":"https://github.com/Donorhan.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"Lemon-JS\n======\nAn accessible rendering engine in Javascript.\n\nNote: The goal of this project is to stay simple to make people understand and experiment with 3D rendering\n\n### Demonstrations\n - [A simple cube](https://www.dorhan.fr/Demos/Lemon/01-Cube/index.html)\n - [Billboard sprites](https://www.dorhan.fr/Demos/Lemon/02-Sprites/index.html)\n - [A 3D model](https://www.dorhan.fr/Demos/Lemon/03-Model/index.html)\n - [Scene management](https://www.dorhan.fr/Demos/Lemon/04-Scene/index.html)\n - [Lights](https://www.dorhan.fr/Demos/Lemon/05-Lights/index.html)\n - [Make blob using shaders](https://www.dorhan.fr/Demos/Lemon/06-Shaders/index.html)\n - [Post processing stack](https://www.dorhan.fr/Demos/Lemon/07-PostProcessing/index.html)\n - [Using a Skybox](https://www.dorhan.fr/Demos/Lemon/08-Skybox/index.html)\n - [Use video as a texture](https://www.dorhan.fr/Demos/Lemon/09-Video/index.html)\n - [Hide out of screens objects](https://www.dorhan.fr/Demos/Lemon/10-Culling/index.html)\n - [Using Materials](https://www.dorhan.fr/Demos/Lemon/11-Material/index.html)\n\n### Features\n- Access to the low level API\n- Rendering queues and commands system\n- Lights support\n- Shaders\n- Scene management (nodes, hierrachy, …)\n- Separated \"engine\" logic from the low level part\n- Post processing\n- Loading models, sprites, videos and custom mesh\n\n### Todo\n- Fonts support\n- Advanced lighting\n- Batching\n\n### Installation\n- Download [the latest version](https://github.com/Donorhan/Lemon-JS/releases) of LemonJS or install it with `npm install @dono/lemon-js`\n- Copy \"shaders\" folder to your project to get default shaders\n- Enjoy!\n\n### The Hello world of 3D : A cube\n\n```javascript\nimport {\n  ProgramLibrary,\n  RenderCanvas,\n  Camera,\n  Mesh,\n  Scene,\n  PointLight,\n  Geometry,\n  Material,\n  Color\n} from \"@dono/lemon-js\";\n\n// Use the ProgramLibrary helper to build a shader with lights and texture support\nProgramLibrary.loadFromFile('DefaultShader', './shaders/GLSL/default.vert', './shaders/GLSL/default.frag', ['USE_LIGHT', 'USE_TEXTURE']);\n\n// Create a new renderer using HTML identifier\nconst renderer = new RenderCanvas(\"simulation\");\n\n// A camera to draw the scene\nconst camera = new Camera();\ncamera.move(3, 3, 3);\ncamera.setViewport(0, 0, renderer.getWidth(), renderer.getHeight());\n\n// Create a scene where we can add sprites, lights, objects, …\nconst scene = new Scene();\n\n// Now we can create our first cube\nconst cube = new Mesh(\n    Geometry.createCube(0.5, 0.5, 0.5),\n    Material.Create('default'),\n    ProgramLibrary.get('DefaultShader'),\n);\nscene.add(cube);\n\n// A light to see something\nconst light = new PointLight();\nlight.setPosition(0, 3, 0);\nscene.add(light);\n```\n\n```javascript\nlet previous = 0;\nlet deltatime = 0;\nconst applicationLoop = (timestamp) =\u003e {\n    requestAnimationFrame(applicationLoop);\n\n    // Calculate elapsed time between two frames\n    deltatime = timestamp - previous;\n    previous = timestamp;\n\n    // Update scene …\n    scene.update(deltatime);\n\n    // … then draw it!\n    renderer.clear(new Color(30, 30, 30));\n    renderer.render(scene, camera);\n    renderer.display();\n};\nrequestAnimationFrame(applicationLoop);\n```\n\nThe result [can be found here](https://www.dorhan.fr/Demos/Lemon/01-Cube/index.html).\n\n### How to contribute\n- Clone this repository\n- `npm install` from the folder\n- `npm run dev` (developement) or `npm run build` (production)\n- Enjoy!\n\n### License\n[MIT](https://github.com/Donorhan/Lemon-JS/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDonorhan%2FLemon-JS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDonorhan%2FLemon-JS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDonorhan%2FLemon-JS/lists"}