pts 0.11.3 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3879 -27
- package/dist/index.mjs +3880 -27
- package/dist/pts.js +3896 -47
- package/dist/pts.min.js +4 -4
- package/dist/pts.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,5 +76,5 @@ For larger PRs, please ping [@williamngan](https://twitter.com/williamngan) to d
|
|
|
76
76
|
|
|
77
77
|
### License
|
|
78
78
|
Apache License 2.0. See LICENSE file for details.
|
|
79
|
-
Copyright © 2017-
|
|
79
|
+
Copyright © 2017-today by William Ngan and contributors.
|
|
80
80
|
|
package/dist/index.d.ts
CHANGED
|
@@ -205,7 +205,7 @@ declare type CanvasPatternRepetition = "repeat" | "repeat-x" | "repeat-y" | "no-
|
|
|
205
205
|
|
|
206
206
|
declare class Pt extends Float32Array implements IPt, Iterable<number> {
|
|
207
207
|
protected _id: string;
|
|
208
|
-
constructor(...args:
|
|
208
|
+
constructor(...args: Array<number | number[] | IPt | Float32Array>);
|
|
209
209
|
static make(dimensions: number, defaultValue?: number, randomize?: boolean): Pt;
|
|
210
210
|
get id(): string;
|
|
211
211
|
set id(s: string);
|
|
@@ -1209,6 +1209,7 @@ declare class World {
|
|
|
1209
1209
|
protected _gravity: Pt;
|
|
1210
1210
|
protected _friction: number;
|
|
1211
1211
|
protected _damping: number;
|
|
1212
|
+
protected _iterations: number;
|
|
1212
1213
|
protected _bound: Bound;
|
|
1213
1214
|
protected _particles: Particle[];
|
|
1214
1215
|
protected _bodies: Body[];
|
|
@@ -1225,6 +1226,8 @@ declare class World {
|
|
|
1225
1226
|
set friction(f: number);
|
|
1226
1227
|
get damping(): number;
|
|
1227
1228
|
set damping(f: number);
|
|
1229
|
+
get iterations(): number;
|
|
1230
|
+
set iterations(f: number);
|
|
1228
1231
|
get bodyCount(): number;
|
|
1229
1232
|
get particleCount(): number;
|
|
1230
1233
|
body(id: number | string): any;
|
|
@@ -1329,6 +1332,7 @@ declare class Sound {
|
|
|
1329
1332
|
protected _playing: boolean;
|
|
1330
1333
|
protected _timestamp: number;
|
|
1331
1334
|
constructor(type: SoundType);
|
|
1335
|
+
protected _createAudioContext(): void;
|
|
1332
1336
|
static from(node: AudioNode, ctx: AudioContext, type?: SoundType, stream?: MediaStream): Sound;
|
|
1333
1337
|
static load(source: HTMLMediaElement | string, crossOrigin?: string): Promise<Sound>;
|
|
1334
1338
|
static loadAsBuffer(url: string): Promise<Sound>;
|