Skip to content
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

Unify splash screen rendering #16944

Open
smallmain opened this issue May 3, 2024 · 0 comments
Open

Unify splash screen rendering #16944

smallmain opened this issue May 3, 2024 · 0 comments
Assignees
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@smallmain
Copy link

Cocos Creator version

3.8.2

System information

MacOS

Issue description

wechatgame:

const defaultRatio = 200 / image.height;
const widthRatio = image.width / canvas.width * 1.35 * defaultRatio * displayRatio;
const heightRatio = image.height / canvas.height * 1.35 * defaultRatio * displayRatio;
const heightOffset = 1/6; // canvas:(-1,1) -> (button, top); heightOffset = (5/12) * (-2) + 1 = 1/6
const vertices = new Float32Array([
   widthRatio, heightOffset - heightRatio, 1.0, 1.0,
   widthRatio, heightOffset + heightRatio, 1.0, 0.0,
   -widthRatio, heightOffset - heightRatio, 0.0, 1.0,
   -widthRatio, heightOffset + heightRatio, 0.0, 0.0,
]);
gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);

splash-screen.ts:

this.logoYTrans = 1 / 6 + 2.5 / 6;// Percent

I reproduce the rendering position and size of the logo on the start scene because we may need to make a special transition effect.

However, the rendering codes of different platforms are different and cannot be easily reproduced.

so:
Can you provide an example to help us reproduce splash screen rendering? Or unify the rendering code so that we can reproduce it more easily.

Relevant error log output

No response

Steps to reproduce

.

Minimal reproduction project

No response

@smallmain smallmain added Bug Needs Triage Needs to be assigned by the team labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants