{"id":21525271,"url":"https://github.com/superraytin/raytinjs","last_synced_at":"2025-03-17T18:18:54.662Z","repository":{"id":150978055,"uuid":"12964260","full_name":"superRaytin/RaytinJS","owner":"superRaytin","description":"A Lightly JavaScript Library - 轻量的Javascript类库","archived":false,"fork":false,"pushed_at":"2014-01-20T05:38:19.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T05:25:15.108Z","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/superRaytin.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":"2013-09-20T02:43:20.000Z","updated_at":"2014-01-20T05:38:19.000Z","dependencies_parsed_at":"2023-04-04T23:44:34.873Z","dependency_job_id":null,"html_url":"https://github.com/superRaytin/RaytinJS","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/superRaytin%2FRaytinJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superRaytin%2FRaytinJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superRaytin%2FRaytinJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superRaytin%2FRaytinJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superRaytin","download_url":"https://codeload.github.com/superRaytin/RaytinJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244085008,"owners_count":20395523,"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-11-24T01:34:10.200Z","updated_at":"2025-03-17T18:18:54.642Z","avatar_url":"https://github.com/superRaytin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![RaytinJS](test/logo.png)\n# RaytinJS\n\n\u003e 统一浏览器差异，将原生JavaScript接口封装成命名风格一致，并且语义良好的方法。基于她快速构建Web应用，小巧而实用，这就是Raytin，一个轻量的JavaScript开发类库。\n\n方法命名上借鉴了PHP中的变量，所有的方法都以 $ 符号开始，比如这样获取DOM元素：\n\n```javascipt\n$id('#box')\n```\n\nRaytin定位为 `敏捷的DOM操作类库`，方法的设计上大量的借鉴了jQuery的语法，降低学习使用成本。\n\n#API\n在线API文档: [http://www.jsfor.com/raytin/](http://www.jsfor.com/raytin/selector/get.html)\n\n## Usage\n\n```javascipt\n\u003cscript type=\"text/javascript\" src=\"Raytin.core.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    $DOMReady(function(){\n        $event.add($id('#box'), 'click', function(e){\n            var name = $text(e.target)\n            alert('yeah, I am a box! my name is ' + name);\n        });\n    });\n\u003c/script\u003e\n```\n\n## 动画\n下面这段代码的效果将会是以600毫秒的时间将左边距移动到200像素。\n\n```javascipt\n$animate($id('box'), {\n    marginLeft: 200\n}, 600);\n```\n\n动画算法是flash的 `Tween` 类算法，可以达到很优秀的缓动效果。\n\n默认擦除效果类型是 `Quad` ，如果想获得更多的效果，这里提供了动画辅助插件 `Raytin.tween.js` ，引入即可扩展。\n\n```javascipt\n\u003cscript type=\"text/javascript\" src=\"Raytin.core.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"Raytin.tween.js\"\u003e\u003c/script\u003e\n```\n\n引入之后可以这样使用：\n\n```javascipt\n$animate(\n    $id('box'),\n    {\n        marginLeft: 200\n    },\n    600,\n    'Bounce:easeIn',\n    function(){\n        alert('动画完成了')\n    }\n);\n```\n\n详细使用方法请参见 [动画API](http://www.jsfor.com/raytin/effect/animate.html)。\n\n# License\n本项目基于MIT协议发布\n\nMIT: [http://rem.mit-license.org](http://rem.mit-license.org/) 详见 [LICENSE](/LICENSE) 文件","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperraytin%2Fraytinjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperraytin%2Fraytinjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperraytin%2Fraytinjs/lists"}