feat(utils): 添加二进制文件读取器 BinaryReader

refactor(assets): 将着色器路径从 "shaders" 改为 "assets/shaders"
refactor(build): 统一各平台资源目录复制逻辑为 assets 目录

style: 更新 .gitignore 忽略参考代码目录和 .pvf 文件
This commit is contained in:
2026-03-18 03:12:39 +08:00
parent 57a96a0cc5
commit a4883b433e
12 changed files with 535 additions and 67 deletions

View File

@@ -0,0 +1,9 @@
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
void main() {
gl_FragColor = v_color;
}

View File

@@ -0,0 +1,19 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec2 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
uniform mat4 u_view;
uniform mat4 u_projection;
varying vec2 v_texCoord;
varying vec4 v_color;
void main() {
gl_Position = u_projection * u_view * vec4(a_position, 0.0, 1.0);
v_texCoord = a_texCoord;
v_color = a_color;
}

View File

@@ -0,0 +1,13 @@
#ifdef GL_ES
precision mediump float;
#endif
varying vec2 v_texCoord;
varying vec4 v_color;
uniform sampler2D u_texture;
void main() {
vec4 texColor = texture2D(u_texture, v_texCoord);
gl_FragColor = texColor * v_color;
}

View File

@@ -0,0 +1,20 @@
#ifdef GL_ES
precision mediump float;
#endif
attribute vec2 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
uniform mat4 u_view;
uniform mat4 u_projection;
uniform sampler2D u_texture;
varying vec2 v_texCoord;
varying vec4 v_color;
void main() {
gl_Position = u_projection * u_view * vec4(a_position, 0.0, 1.0);
v_texCoord = a_texCoord;
v_color = a_color;
}