{"id":19608634,"url":"https://github.com/avem-labs/ol3d","last_synced_at":"2025-04-27T20:32:59.533Z","repository":{"id":85871519,"uuid":"118320746","full_name":"avem-labs/ol3d","owner":"avem-labs","description":"A tiny portable 3D graphics lib for micro controllers","archived":false,"fork":false,"pushed_at":"2018-10-26T04:45:50.000Z","size":3105,"stargazers_count":149,"open_issues_count":4,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-05T03:22:48.573Z","etag":null,"topics":["3d-graphics","arduino","esp32","esp32-arduino","graphics","microcontroller"],"latest_commit_sha":null,"homepage":"","language":"C","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/avem-labs.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}},"created_at":"2018-01-21T09:20:57.000Z","updated_at":"2025-03-12T18:19:27.000Z","dependencies_parsed_at":"2023-06-01T01:30:20.552Z","dependency_job_id":null,"html_url":"https://github.com/avem-labs/ol3d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avem-labs%2Fol3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avem-labs%2Fol3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avem-labs%2Fol3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avem-labs%2Fol3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avem-labs","download_url":"https://codeload.github.com/avem-labs/ol3d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204702,"owners_count":21552270,"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-graphics","arduino","esp32","esp32-arduino","graphics","microcontroller"],"created_at":"2024-11-11T10:16:03.646Z","updated_at":"2025-04-27T20:32:59.279Z","avatar_url":"https://github.com/avem-labs.png","language":"C","funding_links":[],"categories":["MCU programming"],"sub_categories":["STM32"],"readme":"# ol3d\n\nA tiny portable 3D graphics lib for micro controllers.\n\n![49797676-c0ff-4ffa-8ffd-491a022d48d1](https://user-images.githubusercontent.com/7625588/39510593-c9a2bba6-4e1c-11e8-8fa5-9975348b2e33.jpeg)\n\n![4c8069e8-ebb0-4954-86dc-0561095fcf95](https://user-images.githubusercontent.com/7625588/39510596-ca71d27e-4e1c-11e8-897e-f52c012fcd68.jpeg)\n\n\n## Example\n\nRender a low poly wolf\n\n```c\n#include \u003cSPI.h\u003e\n#include \u003col3d_core.h\u003e\n#include \u003cWolf.h\u003e // .obj data\n\nvoid OLED_init();\nvoid OLED_fill(unsigned char *buf);\n\n// Declare display buffer, see ol3d_render.h\nuint8_t buffer[128*128*3] = {};\n\nfloat roll, yaw;\n\nvoid setup () {\n    SPI.begin();\n    SPI.setClockDivider(SPI_CLOCK_DIV2);\n    OLED_init(); // initialize your screen\n    yaw = 0;\n}\n\nvoid loop () {\n\n// MVP matrix\n    ol3d_matrix_t p;\n    ol3d_matrix_setPerspective(p, 60, 1, 1, 1000);\n    ol3d_matrix_t v;\n    ol3d_matrix_setTranslate(v, 0, 0, -700);\n    ol3d_matrix_t vp;\n    ol3d_matrix_multiply(v, p, vp);\n    ol3d_matrix_t mvp;\n\n// Render process\n    for(;;) {\n        // Model matrix of current frame\n        ol3d_matrix_t m = MATRIX_UNIT;\n        ol3d_matrix_translate(m, 0, -80, 0);    // Translate to center\n        ol3d_matrix_rotate(m, (float)yaw, M_AXIS_Y);    // Rotate\n        yaw += 8;\n\n        ol3d_matrix_multiply(m, vp, mvp);\n\n        ol3d_clean_buffer(buffer);\n        ol3d_draw_Element(buffer, mesh_f, mesh_v, mesh_v, 100, mvp);\n        OLED_fill(buffer);\n    }\n}\n```\n\n### OBJ model headerfile style\n\nSimply modify an obj file\n\n```c\ndouble mesh_v[] = {\n    -0.500000, -0.500000, 0.500000,\n    0.500000, -0.500000, 0.500000,\n    -0.500000, 0.500000, 0.500000,\n    0.500000, 0.500000, 0.500000,\n    -0.500000, 0.500000, -0.500000,\n    0.500000, 0.500000, -0.500000,\n    -0.500000, -0.500000, -0.500000,\n    0.500000, -0.500000, -0.500000,\n    -0.500000, -0.500000, 0.500000,\n    0.500000, -0.500000, 0.500000,\n    -0.500000, 0.500000, 0.500000,\n    0.500000, 0.500000, 0.500000,\n    -0.500000, 0.500000, -0.500000,\n    0.500000, 0.500000, -0.500000,\n    -0.500000, -0.500000, -0.500000,\n    0.500000, -0.500000, -0.500000\n};\nlong mesh_f[] = {\n    1, 2, 3,\n    3, 2, 4,\n    3, 4, 5,\n    5, 4, 6,\n    5, 6, 7,\n    7, 6, 8,\n    7, 8, 1,\n    1, 8, 2,\n    2, 8, 4,\n    4, 8, 6,\n    7, 1, 5,\n    5, 1, 3,\n    9, 10, 11,\n    11, 10, 12,\n    11, 12, 13,\n    13, 12, 14,\n    13, 14, 15,\n    15, 14, 16,\n    15, 16, 9,\n    9, 16, 10,\n    10, 16, 12,\n    12, 16, 14,\n    15, 9, 13,\n    13, 9, 11\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favem-labs%2Fol3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favem-labs%2Fol3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favem-labs%2Fol3d/lists"}