Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions app/stickers/StickerBall/useStickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,15 @@ const STICKER_TEXTURES = [
"/stickers/webp/sticker7.webp",
"/stickers/webp/sticker8.webp",
"/stickers/webp/sticker9.webp",
"/stickers/webp/sticker10.webp",
"/stickers/webp/sticker11.webp",
"/stickers/webp/sticker12.webp",
"/stickers/webp/sticker13.webp",
"/stickers/webp/sticker14.webp",
"/stickers/webp/sticker15.webp",
"/stickers/webp/sticker16.webp",
"/stickers/webp/sticker17.webp",
"/stickers/webp/sticker18.webp",
"/stickers/webp/sticker19.webp",
];

export const STICKER_TEXTURES_LENGTH = STICKER_TEXTURES.length;

const MAX_DPR = {
sticker: 5,
normal: 5,
};

export const useStickers = (resizeBoundary: ResizeBoundary) => {
const canvasState = CanvasState.getInstance();

Expand All @@ -75,7 +70,7 @@ export const useStickers = (resizeBoundary: ResizeBoundary) => {

const [updateSticker, _, { output: stickerMap }] = useBlank({
size,
dpr: Math.min(resizeBoundary.maxDpr, 6),
dpr: Math.min(resizeBoundary.maxDpr, MAX_DPR.sticker),
isSizeUpdate: resizeBoundary.isUpdate,
onBeforeInit: useCallback(
(parameters: any) => {
Expand Down Expand Up @@ -127,7 +122,7 @@ export const useStickers = (resizeBoundary: ResizeBoundary) => {

const [updateNormal, __, { output: normalMap }] = useBlank({
size,
dpr: Math.min(resizeBoundary.maxDpr, 4),
dpr: Math.min(resizeBoundary.maxDpr, MAX_DPR.normal),
isSizeUpdate: resizeBoundary.isUpdate,
onBeforeInit: useCallback(
(shader: any) => {
Expand Down
2 changes: 1 addition & 1 deletion app/stickers/UI/Cursor/Confetti.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Confetti = ({ state }: { state: number }) => {
{styles.map((style, i) => (
<div className={s.confetti} key={i} style={style}>
<Image
src="/stickers/gif/gif3.gif"
src="/stickers/gif/gif11.gif"
fill
alt=""
unoptimized
Expand Down
4 changes: 2 additions & 2 deletions app/stickers/romanticism/FxMaterial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export const FxMaterial = shaderMaterial(
vec4 romanticColor = vec4(vec3(clamp(gamma * noise,0.,1.)),romance.a);

// mix
gl_FragColor = mix(originalColor, romanticColor, sin(u_time)*0.5+0.5);
// gl_FragColor = mix(originalColor, romanticColor, 0.);
// gl_FragColor = mix(originalColor, romanticColor, sin(u_time)*0.5+0.5);
gl_FragColor = mix(originalColor, romanticColor, 0.);
}
`
);
Loading