mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-27 13:02:41 +08:00
95a76235b6
`cocos/core` should not depend other modules, so move some files out of `cocos/core`: - move some files from `cocos/core` to `cocos/game` - director.ts - splash-screen.ts - game.ts - move `cocos/core/root.ts` to `cocos/root.ts` as there is not better module to contain `root.ts`. - move `cocos/core/platform/view.ts` to `cocos/ui/view.ts` as screen related logic is moved to `cocos/core/platform/screen.ts`
22 lines
670 B
TypeScript
22 lines
670 B
TypeScript
import { director } from "../../cocos/game";
|
|
import { legacyCC } from "../../cocos/core/global-exports";
|
|
import { Node, Scene } from "../../cocos/scene-graph";
|
|
import { ParticleSystem } from "../../exports/particle";
|
|
|
|
test('particle system capacity test', function () {
|
|
const scene = new Scene('test');
|
|
director.runSceneImmediate(scene);
|
|
|
|
const temp0 = new Node();
|
|
scene.addChild(temp0);
|
|
|
|
const particle = temp0.addComponent(ParticleSystem) as ParticleSystem;
|
|
|
|
particle.capacity = 0;
|
|
particle.renderer.useGPU = false;
|
|
|
|
legacyCC.game.step();
|
|
|
|
// @ts-expect-error
|
|
expect(!!particle.processor.getModel()._vBuffer).toBe(true);
|
|
}); |