This commit is contained in:
linghuam 2019-07-02 09:51:10 +08:00
parent fad49d69bf
commit 6352527189

View File

@ -386,20 +386,26 @@ function toStatic () {
### util.js ### util.js
```js ```js
function inherits(clazz, baseClazz) { function bind(func, context) {
var clazzPrototype = clazz.prototype; var nativeSlice = Array.prototype.slice;
function F() {} var args = nativeSlice.call(arguments, 2);
F.prototype = baseClazz.prototype; return function() {
clazz.prototype = new F(); return func.apply(context, args.concat(nativeSlice.call(arguments)));
};
}
for (var prop in clazzPrototype) { function curry(func) {
clazz.prototype[prop] = clazzPrototype[prop]; var nativeSlice = Array.prototype.slice;
var args = nativeSlice.call(arguments, 1);
return function() {
return func.apply(this, args.concat(nativeSlice.call(arguments)));
} }
clazz.prototype.constructor = clazz;
clazz.superClass = baseClazz;
} }
``` ```
### vector.js ### vector.js
向量操作 向量操作
## src/animation