{"id":19740373,"url":"https://github.com/distributive-network/dcp-cycles","last_synced_at":"2026-06-17T09:31:13.853Z","repository":{"id":137121129,"uuid":"357284947","full_name":"Distributive-Network/dcp-cycles","owner":"Distributive-Network","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-12T17:59:11.000Z","size":43854,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-23T09:03:25.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Distributive-Network.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}},"created_at":"2021-04-12T17:39:23.000Z","updated_at":"2021-04-12T17:59:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd2eff81-05ca-4bf6-97d8-5bcd4fbd714a","html_url":"https://github.com/Distributive-Network/dcp-cycles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Distributive-Network/dcp-cycles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fdcp-cycles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fdcp-cycles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fdcp-cycles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fdcp-cycles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Distributive-Network","download_url":"https://codeload.github.com/Distributive-Network/dcp-cycles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fdcp-cycles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34443229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":[],"created_at":"2024-11-12T01:20:52.527Z","updated_at":"2026-06-17T09:31:13.829Z","avatar_url":"https://github.com/Distributive-Network.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a modified version of the Cycles renderer used in Blender 3D.\nThe modifications are limited to stripping down dependencies to the\npoint where it can be compiled to javascript (using emscripten).\n\nCurrent status: 1.6 MB javascript output (with `elephant.xml` test\nscene embedded).  On my random hardware it takes about 7 seconds to\nparse the test scene and render the first pass at a little 80x60\nimage; 8 secs for 160x120; 22secs for 640x480.\n\nCompiling\n---------\n\nYou'll need emscripten to compile this code.  Basically, you'll be\nusing a specially tweaked C++ compiler that outputs javascript.\nBefore doing that, it is a good idea to just try compiling the code\nwith a regular old C++ compiler.  You'll need a compiler \n(e.g. `g++`) and `cmake`. Then:\n\n    mkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make\n\nAll going well, you should end up with a program called\n`./bin/cycles_test` which when run spits out a bunch of \nnumbers (these in fact encode a picture of two elephants).\n\n    scene_init.\n    filename faked as elephant.xml\n    filename faked as elephant.xml\n    session_init.\n    draw_out 80 60 4!\n    993 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 209 \n    ...\n    999 \n    Got image\n    session_exit.\n\nDid that work?  Ok.  Now back out of the \"build\" directory, make sure\nyou have `emscripten` (see https://github.com/kripken/emscripten) and try this:\n\n    mkdir js_build \u0026\u0026 cd js_build \u0026\u0026 emconfigure cmake .. \u0026\u0026 make\n\nNote the \"emconfigure\" in there, that switches everything over to\na different compiler.  The resulting code is unrunnable, but \ncan be converted to javascript as follows:\n\n    cp bin/cycles_test cycles_test.bc \u0026\u0026 emcc --embed-file elephant.xml --embed-file gumbo.xml cycles_test.bc -o cycles_test.js\n\nor to create a test html page:\n\n    cp bin/cycles_test cycles_test.bc \u0026\u0026 emcc --embed-file elephant.xml --embed-file gumbo.xml cycles_test.bc -o cycles_test.html\n\nYou'll need patience :-).  You'll then need to fiddle with emcc's\nvarious flags to get a good optimized result.  The .html needs to be\nserved by a local webserver to be viewed correctly I think.\n\n\n\n\n## DCP work\n\nAll of the above come from the the emcycles repo. In order to make this better for DCP, I've gone ahead and made it easier to compile (hopefully). Simplly run `./full_build.sh` after enabling and setting all your emscripten paths (`source EMSCRIPTEN/emsdk_env.sh`).\n\nOnce this completes, a JS file called `emcycles_core.js` which is the core emcycles render library.\n\n\nThis can be copied over into the DCP folder, where webpack can be used to webpack emcycles with some polyfills (up to your discretion). \n\n\n`/dcp/dist`, you'll find the stuff to be able to publish the package up (For more info please talk to either Chris or Hamada).\n\nLastly in `/dcp/dist/test`, you'll find a simple test script to try to render something small according to some info from blender. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributive-network%2Fdcp-cycles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistributive-network%2Fdcp-cycles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributive-network%2Fdcp-cycles/lists"}