-
Notifications
You must be signed in to change notification settings - Fork 2k
Add Particle 3D rotation (WON-3947) #19034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maigiaminh
wants to merge
15
commits into
cocos:v3.8.7
Choose a base branch
from
sun-studio-jsc:WON-3947
base: v3.8.7
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ime calculations in Game class
…prove unpacking logic in bin-package-unpack. Refactor scene handling in WebRenderQueueBuilder and enhance event handling in TiledLayer. Adjust SkeletonDataMgr to return SkeletonDataInfo and add compatibility for older versions.
…adjust node engine requirements. Update gulp version to 5.0.1 in package.json.
…utions to reduce memory allocations during calculations.
… and premultiplied alpha unpacking for texture copying.
…mproved traversal performance
…ion for canvases, improving UV handling in SpriteFrame, and refining matrix calculations in Simple assembler. Update font loading to utilize frequent read settings for canvas contexts.
…um value of 3 for improved rendering quality
…for sampler hash assignment
Code Size Check Report
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -980,14 +980,15 @@
* @zh 网格类型精灵帧的所有顶点列表。
*/
vertices: __private._cocos_2d_assets_sprite_frame__IVertices | null;
/**
- * @en UV for quad vertices.
- * @zh 矩形的顶点 UV。
+ * @en The uv of the sprite frame in the original texture.
+ * @zh SpriteFrame 在原始贴图中的 UV 坐标。
*/
- uv: number[];
+ uv: Float32Array;
/**
- * @deprecated since v3.7.0, this is an engine private interface that will be removed in the future.
+ * @en The packed uv of the sprite frame in the original texture.
+ * @zh SpriteFrame 在原始贴图中的打包 UV 坐标。
*/
unbiasUV: number[];
/**
* @en UV for sliced 9 vertices.
@@ -3774,9 +3775,9 @@
* @zh
* 强制刷新材质。
*/
flushMaterial(mat: Material): void;
- walk(node: Node, level?: number): void;
+ walk(node: Node): void;
syncMeshBuffersToNative(accId: number, buffers: MeshBuffer[]): void;
}
/**
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
@@ -46328,16 +46329,19 @@
* @en Indicate whether the owner node will be auto-removed when it has no particles left.
* @zh 粒子播放完毕后自动销毁所在的节点。
*/
autoRemoveOnFinish: boolean;
+ batchData: __private._cocos_particle_2d_particle_system_2d__MeshBatchData;
+ get meshRenderData(): MeshRenderData;
constructor();
onEnable(): void;
onDestroy(): void;
onFocusInEditor(): void;
onLostFocusInEditor(): void;
__preload(): void;
destroyRenderData(): void;
protected _flushAssembler(): void;
+ swapBuffer(): void;
protected lateUpdate(dt: number): void;
/**
* @en Add a particle to the emitter.
* @zh 添加一个粒子到发射器中。
@@ -46351,8 +46355,9 @@
* // stop particle system.
* myParticleSystem.stopSystem();
*/
stopSystem(): void;
+ stopSystemAndClearAllParticles(): void;
/**
* @en Kill all living particles.
* @zh 杀死所有存在的粒子,然后重新启动粒子发射器。
* @example
@@ -70296,25 +70301,43 @@
angle: number;
degreesPerSecond: number;
radius: number;
deltaRadius: number;
+ rotation3D: math.Vec3;
+ deltaRotation3D: math.Vec3;
}
export class _cocos_particle_2d_particle_simulator_2d__Simulator {
particles: _cocos_particle_2d_particle_simulator_2d__Particle[];
active: boolean;
- uvFilled: number;
finished: boolean;
- renderData: MeshRenderData | null;
+ is3DMode: boolean;
constructor(system: any);
stop(): void;
reset(): void;
emitParticle(pos: any): void;
- updateUVs(force?: boolean): void;
- updateParticleBuffer(particle: any, pos: any, buffer: any, offset: number): void;
+ updateParticleBuffer(particle: any, pos: any, p2d: ParticleSystem2D, offset: number): void;
step(dt: number): void;
- requestData(vertexCount: number, indexCount: number): void;
- initDrawInfo(): void;
+ clearAllParticles(): void;
+ /**
+ * This function is called before commitComp for batch rendering.
+ * Because when we call `requestData` in `step`, we do not know if 2 particle is inserted a sprite between them or not.
+ * CommitComp will be called by order of the node tree.
+ */
+ stepBeforeDraw(): void;
}
+ export class _cocos_particle_2d_particle_system_2d__MeshBatchData {
+ startVertexIndex: number;
+ startIndexIndex: number;
+ vertexCount: number;
+ indexCount: number;
+ renderData: MeshRenderData | null;
+ lastVertexCount: number;
+ lastIndexCount: number;
+ isRendering: boolean;
+ init(p2d: ParticleSystem2D): void;
+ reset(): void;
+ request(renderData: MeshRenderData, oldVextexCount: number, oldIndiceCount: number): void;
+ }
export class _cocos_particle_2d_motion_streak_2d__Point {
point: math.Vec2;
dir: math.Vec2;
distance: number;
|
|
haha |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.