Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit beda6a1

Browse files
author
takuma-hmng8
committed
v1.1.26
1 parent bbfeedd commit beda6a1

File tree

120 files changed

+2091
-2307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+2091
-2307
lines changed

‎.storybook/stories/UseBlank.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const UseBlank = (args: BlankParams) => {
2727
dpr: dpr,
2828
onBeforeCompile: React.useCallback((shader: THREE.Shader) => {
2929
shader.fragmentShader = shader.fragmentShader.replace(
30-
"#usf main",
30+
"#usf <main>",
3131
`float t=uTime,c;vec2 z,n=vec2(cos(t),sin(t));z=vUv*2.-1.;for(int i=0;i<12;i++){if(dot(z,z)>8.)discard;z=vec2(z.x*z.x-z.y*z.y,z.x*z.y)+n;}c=cos(length(z)+log(length(z)));usf_FragColor=vec4(vec3(c),1.);`
3232
);
3333
}, []),

‎.storybook/stories/UseBlending.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ export const UseBlending = (args: BlendingParams) => {
4545
size,
4646
dpr,
4747
});
48-
const [updateBlending, setBlending] = useBlending({ size, dpr });
49-
const [updateBrightnessPicker] = useBrightnessPicker({ size, dpr });
48+
const [updateBlending] = useBlending({ size, dpr });
5049

5150
const colorVec = React.useMemo(() => new THREE.Vector3(), []);
5251

@@ -69,13 +68,11 @@ export const UseBlending = (args: BlendingParams) => {
6968
const bgTexture = updateCover(props, {
7069
texture: bg,
7170
});
72-
const fluid = updateFluid(props);
73-
const picked = updateBrightnessPicker(props, { texture: fluid });
71+
updateFluid(props);
7472
const fx = updateBlending(props, {
7573
...setConfig(),
7674
texture: bgTexture,
7775
map: fluid,
78-
alphaMap: false,
7976
});
8077
fxRef.current!.u_fx = fx;
8178
fxRef.current!.u_alpha = 0.0;

‎.storybook/stories/UseFluid.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import {
1313
FLUID_PARAMS,
1414
FluidParams,
15-
} from "../../packages/use-shader-fx/src/fxs/interactions/useFluid";
15+
} from "../../packages/use-shader-fx/src/fxs/simulations/useFluid";
1616

1717
extend({ FxMaterial });
1818

‎.storybook/stories/UseRipple.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useRipple, useFxTexture } from "../../packages/use-shader-fx/src";
88
import {
99
RippleParams,
1010
RIPPLE_PARAMS,
11-
} from "../../packages/use-shader-fx/src/fxs/interactions/useRipple";
11+
} from "../../packages/use-shader-fx/src/fxs/simulations/useRipple";
1212

1313
extend({ FxMaterial });
1414

‎.storybook/stories/UseWobble3D.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ const setGUI = (gui: GUI) => {
2828
gui.add(CONFIG, "warpStrength", 0, 10, 0.01);
2929
gui.add(CONFIG, "warpPositionFrequency", 0, 10, 0.01);
3030
gui.add(CONFIG, "warpTimeFrequency", 0, 10, 0.01);
31-
gui.add(CONFIG, "wobbleShine", 0, 5, 0.01);
32-
gui.add(CONFIG, "samples", 0, 10, 1);
3331
gui.add(CONFIG, "colorMix", 0, 1, 0.01);
3432
gui.add(CONFIG, "chromaticAberration", 0, 10, 0.01);
3533
gui.add(CONFIG, "anisotropicBlur", 0, 10, 0.01);

‎.storybook/stories/useFluid.stories.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import type { Meta } from "@storybook/react";
66
import {
77
FLUID_PARAMS,
88
FluidParams,
9-
} from "../../packages/use-shader-fx/src/fxs/interactions/useFluid";
9+
} from "../../packages/use-shader-fx/src/fxs/simulations/useFluid";
1010
import { UseFluid, UseFluidWithTexture } from "./UseFluid";
1111

1212
const meta = {
13-
title: "interactions/useFluid",
13+
title: "simulations/useFluid",
1414
component: UseFluid,
1515
tags: ["autodocs"],
1616
decorators: [(storyFn: any) => <Setup>{storyFn()}</Setup>],

‎.storybook/stories/useRipple.stories.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { UseRipple, UseRippleWithTexture } from "./UseRipple";
77
import {
88
RIPPLE_PARAMS,
99
RippleParams,
10-
} from "../../packages/use-shader-fx/src/fxs/interactions/useRipple";
10+
} from "../../packages/use-shader-fx/src/fxs/simulations/useRipple";
1111

1212
const meta = {
13-
title: "interactions/useRipple",
13+
title: "simulations/useRipple",
1414
component: UseRipple,
1515
tags: ["autodocs"],
1616
decorators: [(storyFn: any) => <Setup>{storyFn()}</Setup>],

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,11 @@ const [updateBlank, _, { output: blank, material }] = useBlank({
516516
},
517517
onBeforeCompile: useCallback((shader: THREE.Shader) => {
518518
shader.fragmentShader = shader.fragmentShader.replace(
519-
"#usf uniforms",
519+
"#usf <uniforms>",
520520
"uniform float hoge;"
521521
);
522522
shader.fragmentShader = shader.fragmentShader.replace(
523-
"#usf main",
523+
"#usf <main>",
524524
`usf_FragColor=vec4(vec3(1.,hoge,1.),1.);`
525525
);
526526
}, []),

‎app/_home/Playground.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const Playground = ({
114114
),
115115
onBeforeCompile: useCallback((shader: THREE.Shader) => {
116116
shader.fragmentShader = shader.fragmentShader.replace(
117-
"#usf uniforms",
117+
"#usf <uniforms>",
118118
`
119119
uniform sampler2D u_noise;
120120
uniform float u_noiseIntensity;
@@ -125,7 +125,7 @@ export const Playground = ({
125125
`
126126
);
127127
shader.fragmentShader = shader.fragmentShader.replace(
128-
"#usf main",
128+
"#usf <main>",
129129
`
130130
vec2 uv = vUv;
131131
float grain=rand(uv+sin(uTime))*.4;

‎app/cream/Playground.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ export const Playground = () => {
1313
const [updateFluid, setFluid, { output: fluid }] = useFluid({
1414
size,
1515
dpr: {
16-
shader: 0.08,
17-
fbo: 0.2,
16+
shader: 0.2,
17+
fbo: 0.8,
1818
},
1919
});
2020

2121
setFluid({
2222
density_dissipation: 0.99,
2323
velocity_dissipation: 0.99,
2424
splat_radius: 0.001,
25+
pressure_iterations: 1,
2526
});
2627

2728
useFrame((state) => {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /