feat(All):Initial

This commit is contained in:
2025-10-04 23:36:07 +08:00
commit 2b4e5d2668
1321 changed files with 415958 additions and 0 deletions
@@ -0,0 +1,15 @@
import { Material } from "three";
/**
* 从另一个材质中复制相同的属性(材质类型可能不同)
* @param source - 用于被复制属性的材质,属性为引用
*/
Material.prototype.copyAttr = function (source) {
if (!source.isMaterial) return;
Object.keys(source).forEach(key => {
if (this.hasOwnProperty(key)){
this[key] = source[key];
}
})
}