{"id":15645130,"url":"https://github.com/spite/solaridisplay","last_synced_at":"2025-04-30T10:32:46.961Z","repository":{"id":5499533,"uuid":"6698522","full_name":"spite/SolariDisplay","owner":"spite","description":"A Split-Flap Display with CSS and JavaScript","archived":false,"fork":false,"pushed_at":"2017-03-01T23:06:48.000Z","size":4776,"stargazers_count":59,"open_issues_count":0,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-30T10:32:03.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/spite.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}},"created_at":"2012-11-15T02:40:47.000Z","updated_at":"2024-04-12T08:16:32.000Z","dependencies_parsed_at":"2022-08-06T18:16:21.100Z","dependency_job_id":null,"html_url":"https://github.com/spite/SolariDisplay","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/spite%2FSolariDisplay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spite%2FSolariDisplay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spite%2FSolariDisplay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spite%2FSolariDisplay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spite","download_url":"https://codeload.github.com/spite/SolariDisplay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251684525,"owners_count":21627146,"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":[],"created_at":"2024-10-03T12:04:41.617Z","updated_at":"2025-04-30T10:32:46.898Z","avatar_url":"https://github.com/spite.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SolariDisplay - A Split-Flap Display with CSS and JavaScript\n\nLibrary to create a Split-Flap Display, or Solari Board. \n\nYou can see the blog post here [Split-flap display with CSS and JavaScript](http://www.clicktorelease.com/blog/split-flap-display).\n\nForks, pull requests and code critiques are welcome!\n\n#### Using the code ####\n\nInclude SolariDisplay.[min.]js and SolariDisplay.css. \n\n```html\n\u003cscript src=\"SolariDisplay.min.js\"\u003e\u003c/script\u003e\n\u003clink href=\"SolariBoard.css\"\u003e\n````\n\nYou'll need to add this markup\n\n```html\n\u003cdiv id=\"viewport\" class=\"displayBase\"\u003e\n\t\u003cdiv id=\"container\" \u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\nand this CSS\n```css\n#viewport{ position: absolute; left: 0; top: 0; right: 0; bottom: 0; }\n#container{ position: absolute; left: 0; top: 0; right: 0; bottom: 0; font-family: sans-serif; }\n```\n\nand then this basic code:\n\n```js\nvar display; // this will be the Solari Display object\n\nwindow.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; // you'll need support for rAF\n\nwindow.addEventListener( 'load', function() { // once the page loads\n\n\t// create a SolariDisplay\n\n\t/*\n\t\tparameters:\n\t\tcontainer - the element that will contain the display\n\t\tformat - an array of either a single character or an array of characters. \n\t\t\tThe length of this format array is the number of segments.\n\t\t\tThere are several defines ready to use:\n\t\t\t\tCTR.SOLARIVALUES.letter: A to Z and space\n\t\t\t\tCTR.SOLARIVALUES.number: 0 to 9\n\t\t\t\tCTR.SOLARIVALUES.hour: 00 to 23\n\t\t\t\tCTR.SOLARIVALUES.minute: 00 to 59\n\t\tsegmentWidth: the width in pixels of a single segment\n\t\tsegmentHeight: the height in pixels of a single segment\n\t\tfontSize: the size of the font in pixels\n\t*/\n\n\tdisplay = new CTR.SolariBoard( {\n\t\tcontainer: container,\n\t\tformat: [ \n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter,\n\t\t\tCTR.SOLARIVALUES.letter\n\t\t ],\n\t\tsegmentWidth: 70,\n\t\tsegmentHeight: 120,\n\t\tfontSize: 100\n\t} );\n\n\t// update the content of the display\n\tdisplay.setContent( 'HELLO WORLD' );\n\n}, false );\n```\n\n#### License ####\n\nMIT licensed\n\nCopyright (C) 2012 Jaume Sanchez Elias, http://www.clicktorelease.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspite%2Fsolaridisplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspite%2Fsolaridisplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspite%2Fsolaridisplay/lists"}