Skip to content

Commit

Permalink
rename: "Example03Texture"
Browse files Browse the repository at this point in the history
  • Loading branch information
satelllte committed Nov 10, 2024
1 parent be598af commit 9c0aa30
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ In WGSL shader, it'll appear under the following vars:
> If you have uniforms, they'll appear at `@binding(0)`, but `sampler` and `textures` will appear under their bindings incremented by 1.
See full example here:
- [apps/examples/src/examples/Example02Texture.ts](./apps/examples/src/examples/Example02Texture.ts)
- [apps/examples/src/examples/Example02Texture.wgsl](./apps/examples/src/examples/Example02Texture.ts)
- [apps/examples/src/examples/Example03Texture.ts](./apps/examples/src/examples/Example03Texture.ts)
- [apps/examples/src/examples/Example03Texture.wgsl](./apps/examples/src/examples/Example03Texture.ts)

## Examples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WGSLCanvas } from "@wgsl-canvas/core";
import shaderFragment from "./Example02Texture.wgsl?raw";
import shaderFragment from "./Example03Texture.wgsl?raw";

export const Example02Texture = async (canvas: HTMLCanvasElement) => {
export const Example03Texture = async (canvas: HTMLCanvasElement) => {
const wgslCanvas = new WGSLCanvas({ canvas });
await wgslCanvas.init();
const textureUrl = "/assets/textures/uv_grid/uv_grid_webgpu.jpg";
Expand Down
4 changes: 2 additions & 2 deletions apps/examples/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { WGSLCanvas } from "@wgsl-canvas/core";
import { Example00Default } from "./examples/Example00Default";
import { Example01Color } from "./examples/Example01Color";
import { Example02Uniforms } from "./examples/Example02Uniforms";
import { Example02Texture } from "./examples/Example02Texture";
import { Example03Texture } from "./examples/Example03Texture";

const main = async () => {
if (!WGSLCanvas.isSupported()) {
Expand All @@ -17,7 +17,7 @@ const main = async () => {
Example00Default,
Example01Color,
Example02Uniforms,
Example02Texture, // TODO: rename to "Example03Texture"
Example03Texture,
];
for (const example of examples) {
const canvas = document.createElement("canvas");
Expand Down

0 comments on commit 9c0aa30

Please sign in to comment.