mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-07 08:09:13 +08:00
* Instantiate FastDefined object as value type * Optimize #11052 * Doc * minor tweak Co-authored-by: Leslie Leigh <leslieleigh@outlook.com>
10 lines
431 B
TypeScript
10 lines
431 B
TypeScript
import { instantiate } from "../../cocos/core";
|
|
import { CurveRange } from "../../cocos/particle";
|
|
|
|
test('Bugfix cocos/3d-tasks#12248; Instantiate a property of fast defined type', () => {
|
|
const curveRange = new CurveRange();
|
|
const curveRange2 = instantiate(curveRange);
|
|
expect(curveRange.spline).not.toBe(curveRange2.spline);
|
|
expect(curveRange.curve._internalCurve).not.toBe(curveRange2.curve._internalCurve);
|
|
});
|