[add] Engine

This commit is contained in:
2022-08-26 16:48:17 +08:00
parent f67e566f2a
commit d9c19f096c
197 changed files with 10626 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
export module Bezier {
export function GetPoint(p0: cc.Vec2, p1: cc.Vec2, p2: cc.Vec2, p3: cc.Vec2, t: number): cc.Vec2 {
if (t < 0) {
t = 0;
}
else if (t > 1) {
t = 1
}
let OneMinusT = 1 - t;
return p0.mul(OneMinusT * OneMinusT * OneMinusT)
.add(p1.mul(3 * OneMinusT * OneMinusT * t))
.add(p2.mul(3 * OneMinusT * t * t))
.add(p3.mul(t * t * t));
}
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "b47d81c4-01a1-45cd-94f8-19daf96f17a8",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}