Skip to content

Commit

Permalink
chore: rebase conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxue committed Nov 13, 2023
1 parent 2f5f10e commit 83c83ce
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/layers/src/core/BaseModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
getCommonStyleAttributeOptions,
ShaderLocation,
} from './CommonStyleAttribute';

export type styleSingle =
| number
| string
Expand Down Expand Up @@ -74,7 +73,8 @@ const shaderLocationMap: Record<string, ShaderLocation> = {

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default class BaseModel<ChildLayerStyleOptions = {}>
implements ILayerModel {
implements ILayerModel
{
public triangulation: Triangulation;
public uniformBuffers: IBuffer[] = [];
public textures: ITexture2D[] = [];
Expand Down Expand Up @@ -258,8 +258,9 @@ export default class BaseModel<ChildLayerStyleOptions = {}>
}
str += `
#ifdef USE_ATTRIBUTE_${key.toUpperCase()}
layout(location = ${shaderLocationMap[key]}) in ${DefaultUniformStyleType[key]} a_${key.charAt(0).toUpperCase() + key.slice(1)
};
layout(location = ${shaderLocationMap[key]}) in ${
DefaultUniformStyleType[key]
} a_${key.charAt(0).toUpperCase() + key.slice(1)};
#endif\n
`;
});
Expand All @@ -276,8 +277,9 @@ ${uniforms.join('\n')}
this.layer.enableShaderEncodeStyles.forEach((key) => {
innerStr += `\n
#ifdef USE_ATTRIBUTE_${key.toUpperCase()}
${DefaultUniformStyleType[key]} ${key} = a_${key.charAt(0).toUpperCase() + key.slice(1)
};
${DefaultUniformStyleType[key]} ${key} = a_${
key.charAt(0).toUpperCase() + key.slice(1)
};
#else
${DefaultUniformStyleType[key]} ${key} = u_${key};
#endif\n
Expand Down

0 comments on commit 83c83ce

Please sign in to comment.