{"id":18996816,"url":"https://github.com/ailhc/layad3tween","last_synced_at":"2025-04-22T14:02:21.259Z","repository":{"id":97517984,"uuid":"157805482","full_name":"AILHC/LayaD3Tween","owner":"AILHC","description":"基于Laya Tween做的3d缓动拓展，现在支持Sprite3d的transform里的旋转，位移，缩放，支持Vector3和Vector4属性的缓动","archived":false,"fork":false,"pushed_at":"2019-05-15T01:49:39.000Z","size":2143,"stargazers_count":39,"open_issues_count":2,"forks_count":10,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-29T15:42:02.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AILHC.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":"2018-11-16T03:07:20.000Z","updated_at":"2024-11-29T06:50:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ba780b0-d041-4668-bb83-d2ca17e25a81","html_url":"https://github.com/AILHC/LayaD3Tween","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/AILHC%2FLayaD3Tween","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AILHC%2FLayaD3Tween/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AILHC%2FLayaD3Tween/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AILHC%2FLayaD3Tween/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AILHC","download_url":"https://codeload.github.com/AILHC/LayaD3Tween/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249273824,"owners_count":21241978,"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-08T17:37:08.991Z","updated_at":"2025-04-16T20:31:26.570Z","avatar_url":"https://github.com/AILHC.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LayaD3Tween\n基于Laya Tween做的3d缓动拓展，现在支持Sprite3d的transform里的旋转，位移，缩放，支持Vector3和Vector4属性的缓动\n# 使用方法\n拷贝TweenExt.ts到项目中，在使用这个扩展之前先初始化，TweenExt.init();\n### 3d对象的缓动使用\n1. transform 对象的缓动\n```ts\n//可以缓动position，rotationEuler ,scale 等\nawait Tween.to(box, { position: { x: 0, y: 0, z: 0 } }, 10000, null);\nconsole.log(\"complete\");\nconsole.log(box.transform.position);\n```\n2. 材质属性缓动\n```ts\n//可以缓动position，rotationEuler ,scale 等\nawait Tween.to(box.meshRenderer.sharedMaterial, { albedoColor: { x: 0.5, y: 0.6, z: 0.7, w: 0.8 } }, 10000, null);\nconsole.log(\"complete\");\n console.log(`label_color:x:\n            ${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColor.x}\n            ,y:${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColor.y}\n            ,z:${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColor.z}\n            ,w:${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColor.w}`);\n            console.log(`label_color:a:\n            ${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColorA}\n            ,r:${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColorR}\n            ,g:${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColorG}\n            ,b:${(box.meshRenderer.sharedMaterial as Laya.UnlitMaterial).albedoColorB}`);\n```\n3. 其他更多支持，可以看源码\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Failhc%2Flayad3tween","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Failhc%2Flayad3tween","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Failhc%2Flayad3tween/lists"}