Skip to content

Commit

Permalink
update for v1.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Dec 15, 2023
1 parent ff07c79 commit 506d26c
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ const uni1 = makeStructuredView(defs.uniforms.uni1, new ArrayBuffer(4 * 16));
* include from the net

```js
import { createTextureFromImage } from 'https://greggman.github.io/webgpu-utils/dist/0.x/webgpu-utils.module.js'
import { createTextureFromImage } from 'https://greggman.github.io/webgpu-utils/dist/1.x/webgpu-utils.module.js'

...
```
Expand Down Expand Up @@ -340,7 +340,7 @@ npm start
```

This will run rollup in watch mode, building from typescript into
`dist/0.x/webgpu-utils.js`.
`dist/1.x/webgpu-utils.js`.

```
npx servez
Expand Down
2 changes: 1 addition & 1 deletion examples/2d-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global GPUBufferUsage */
/* global GPUTextureUsage */
import { mat4, vec3 } from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';
import * as wgh from '../dist/0.x/webgpu-utils.module.js';
import * as wgh from '../dist/1.x/webgpu-utils.module.js';

async function main() {
const adapter = await navigator.gpu?.requestAdapter();
Expand Down
4 changes: 2 additions & 2 deletions examples/background.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global GPUBufferUsage */
/* global GPUTextureUsage */
import { mat4, vec3 } from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';
import * as wgh from '../dist/0.x/webgpu-utils.module.js';
import * as wgh from '../dist/1.x/webgpu-utils.module.js';

async function main() {
const adapter = await navigator.gpu?.requestAdapter();
Expand Down Expand Up @@ -120,7 +120,7 @@ async function main() {
indexBuffer,
indexFormat,
numElements,
} = wgh.createBuffersAndAttributesFromArrays(device, wgh.primitives.createCylinderVertices(2, 4));
} = wgh.createBuffersAndAttributesFromArrays(device, wgh.primitives.createCylinderVertices({radius: 2, height: 4}));

const module = device.createShaderModule({code});
const module2 = device.createShaderModule({code: code2});
Expand Down
2 changes: 1 addition & 1 deletion examples/cube-map.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global GPUBufferUsage */
/* global GPUTextureUsage */
import { mat4 } from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';
import * as wgh from '../dist/0.x/webgpu-utils.module.js';
import * as wgh from '../dist/1.x/webgpu-utils.module.js';
import GUI from './3rdparty/muigui-0.x.module.js';

async function main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/cube.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global GPUBufferUsage */
/* global GPUTextureUsage */
import { mat4, vec3 } from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';
import * as wgh from '../dist/0.x/webgpu-utils.module.js';
import * as wgh from '../dist/1.x/webgpu-utils.module.js';

async function main() {
const adapter = await navigator.gpu?.requestAdapter();
Expand Down
2 changes: 1 addition & 1 deletion examples/instancing-size-only.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global GPUBufferUsage */
/* global GPUTextureUsage */
import { mat4, vec3 } from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';
import * as wgh from '../dist/0.x/webgpu-utils.module.js';
import * as wgh from '../dist/1.x/webgpu-utils.module.js';

async function main() {
const adapter = await navigator.gpu?.requestAdapter();
Expand Down
2 changes: 1 addition & 1 deletion examples/instancing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global GPUBufferUsage */
/* global GPUTextureUsage */
import { mat4, vec3 } from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';
import * as wgh from '../dist/0.x/webgpu-utils.module.js';
import * as wgh from '../dist/1.x/webgpu-utils.module.js';

async function main() {
const adapter = await navigator.gpu?.requestAdapter();
Expand Down
2 changes: 1 addition & 1 deletion test/tests/attribute-utils-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it } from '../mocha-support.js';
import { createBuffersAndAttributesFromArrays} from '../../dist/0.x/webgpu-utils.module.js';
import { createBuffersAndAttributesFromArrays} from '../../dist/1.x/webgpu-utils.module.js';
import { assertArrayEqual, assertEqual, assertDeepEqual, assertTruthy, assertFalsy } from '../assert.js';
import { testWithDevice, readBuffer } from '../webgpu.js';

Expand Down
2 changes: 1 addition & 1 deletion test/tests/buffer-views-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
setStructuredValues,
makeShaderDataDefinitions,
setIntrinsicsToView,
} from '../../dist/0.x/webgpu-utils.module.js';
} from '../../dist/1.x/webgpu-utils.module.js';
import { assertArrayEqual, assertEqual, assertTruthy } from '../assert.js';

describe('buffer-views-tests', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/tests/data-definition-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it } from '../mocha-support.js';
import {
makeShaderDataDefinitions,
} from '../../dist/0.x/webgpu-utils.module.js';
} from '../../dist/1.x/webgpu-utils.module.js';
import { assertEqual, assertFalsy, assertTruthy } from '../assert.js';

describe('data-definition-tests', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/tests/generate-mipmap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, it } from '../mocha-support.js';
import {
generateMipmap,
numMipLevels,
} from '../../dist/0.x/webgpu-utils.module.js';
} from '../../dist/1.x/webgpu-utils.module.js';
import { assertArrayEqualApproximately, assertEqual } from '../assert.js';
import { readTextureUnpadded, testWithDevice } from '../webgpu.js';

Expand Down
2 changes: 1 addition & 1 deletion test/tests/texture-utils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, it } from '../mocha-support.js';
import {
createTextureFromSource,
createTextureFromImage,
} from '../../dist/0.x/webgpu-utils.module.js';
} from '../../dist/1.x/webgpu-utils.module.js';
import { assertArrayEqual, assertArrayEqualApproximately, assertEqual } from '../assert.js';
import { readTextureUnpadded, testWithDevice, testWithDeviceAndDocument } from '../webgpu.js';

Expand Down
2 changes: 1 addition & 1 deletion test/tests/umd-min-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<body>
<canvas></canvas>
<script src="https://wgpu-matrix.org/dist/1.x/wgpu-matrix.js"></script>
<script src="../../dist/0.x/webgpu-utils.min.js"></script>
<script src="../../dist/1.x/webgpu-utils.min.js"></script>
<script>
/* global GPUBufferUsage */
/* global GPUTextureUsage */
Expand Down
2 changes: 1 addition & 1 deletion test/tests/umd-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<body>
<canvas></canvas>
<script src="https://wgpu-matrix.org/dist/1.x/wgpu-matrix.js"></script>
<script src="../../dist/0.x/webgpu-utils.js"></script>
<script src="../../dist/1.x/webgpu-utils.js"></script>
<script>
/* global GPUBufferUsage */
/* global GPUTextureUsage */
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"outDir": "dist/0.x",
"outDir": "dist/1.x",
"moduleResolution": "NodeNext",
"declaration": true,
"typeRoots": [
Expand Down

0 comments on commit 506d26c

Please sign in to comment.