# Are there any up to date WebGPU 169 examples?

**URL:** <https://discourse.threejs.org/t/are-there-any-up-to-date-webgpu-169-examples/73378>\
**Category:** Questions\
**Tags:** webgpu\
**Created:** [October 28, 2024, 9:44pm UTC](https://discourse.threejs.org/t/are-there-any-up-to-date-webgpu-169-examples/73378 "2024-10-28T21:44:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phoawb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/phoawb/32/53122_2.png) [@phoawb](https://discourse.threejs.org/u/phoawb)\
**Post date:** [October 28, 2024, 9:44pm UTC](https://discourse.threejs.org/t/are-there-any-up-to-date-webgpu-169-examples/73378/1 "2024-10-28T21:44:37Z")

</div>

I’m trying to get into using WebGPU, but the documentation is practically nonexistent. I tried to look at the examples but they seem to be out of date for the version? Looking at a standard compute shader pattern that I see a lot:

```javascript
const computeUpdate = Fn(() => {
    const position = positionBuffer.element(instanceIndex);
    const velocity = velocityBuffer.element(instanceIndex);

    velocity.addAssign(vec3(0.0, gravity, 0.0));
    position.addAssign(velocity);

    velocity.mulAssign(friction);

    // floor

    If(position.y.lessThan(0), () => {
      position.y = 0;
      velocity.y = velocity.y.negate().mul(bounce);

      // floor friction

      velocity.x = velocity.x.mul(0.9);
      velocity.z = velocity.z.mul(0.9);
    });
  });

  computeParticles = computeUpdate().compute(particleCount);

```

This is very common for the WebGPU examples, but with the current (169) version I get the following errors:

1. No overload matches this call.  
Overload 1 of 3, ‘(jsFunc: () =\> Node): () =\> Node’, gave the following error.  
Argument of type ‘() =\> void’ is not assignable to parameter of type ‘() =\> Node’.

2. Property ‘compute’ does not exist on type ‘Node’.ts(2339)

And this is just some of the ways that the syntax seems to be different. Is there anywhere I can find up to date resources?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 29, 2024, 8:57am UTC](https://discourse.threejs.org/t/are-there-any-up-to-date-webgpu-169-examples/73378/2 "2024-10-29T08:57:22Z")

</div>

All WebGPU examples at [three.js examples](https://threejs.org/examples/?q=webgpu#webgl_animation_keyframes) support `r169`. So if you pick the code from one of the compute demos, it should definitely work with the latest release.
