react-simple-game-engine 0.2.91 → 0.2.92

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.
@@ -82,7 +82,7 @@ export declare abstract class Scene<UIP = any> {
82
82
  })[]): Promise<import("p5").Image[]>;
83
83
  createSounds(...srcables: (string | {
84
84
  src: string;
85
- volumn?: number;
85
+ volume?: number;
86
86
  type?: SoundType;
87
87
  })[]): Promise<Sound[]>;
88
88
  mapSprites(...srcs: string[]): Promise<void>;
@@ -290,8 +290,8 @@ var Scene = /** @class */ (function () {
290
290
  return [4 /*yield*/, createAssetSound(decor.src, decor.type)];
291
291
  case 2:
292
292
  sound = _b.sent();
293
- if (decor.volumn) {
294
- sound.volumn = decor.volumn;
293
+ if (decor.volume) {
294
+ sound.volume = decor.volume;
295
295
  }
296
296
  this[decor.propertyKey] = sound;
297
297
  this.sounds.push(sound);
@@ -331,7 +331,7 @@ var Scene = /** @class */ (function () {
331
331
  srcables[_i] = arguments[_i];
332
332
  }
333
333
  return __awaiter(this, void 0, void 0, function () {
334
- var sounds, _a, srcables_1, srcable, _b, volumn, src, _c, type, sound;
334
+ var sounds, _a, srcables_1, srcable, _b, volume, src, _c, type, sound;
335
335
  return __generator(this, function (_d) {
336
336
  switch (_d.label) {
337
337
  case 0:
@@ -342,13 +342,13 @@ var Scene = /** @class */ (function () {
342
342
  if (!(_a < srcables_1.length)) return [3 /*break*/, 4];
343
343
  srcable = srcables_1[_a];
344
344
  _b = typeof srcable === "string"
345
- ? { src: srcable, volumn: undefined, type: undefined }
346
- : srcable, volumn = _b.volumn, src = _b.src, _c = _b.type, type = _c === void 0 ? SoundType.ONCE : _c;
345
+ ? { src: srcable, volume: undefined, type: undefined }
346
+ : srcable, volume = _b.volume, src = _b.src, _c = _b.type, type = _c === void 0 ? SoundType.ONCE : _c;
347
347
  return [4 /*yield*/, createAssetSound(src, type)];
348
348
  case 2:
349
349
  sound = _d.sent();
350
- if (volumn) {
351
- sound.volumn = volumn;
350
+ if (volume) {
351
+ sound.volume = volume;
352
352
  }
353
353
  sounds.push(sound);
354
354
  this.sounds.push(sound);
@@ -421,8 +421,8 @@ var Scene = /** @class */ (function () {
421
421
  return [4 /*yield*/, createAssetSound(src, decor.type)];
422
422
  case 2:
423
423
  sound = _b.sent();
424
- if (decor.volumn) {
425
- sound.volumn = decor.volumn;
424
+ if (decor.volume) {
425
+ sound.volume = decor.volume;
426
426
  }
427
427
  this[decor.propertyKey] = sound;
428
428
  this.sounds.push(sound);
@@ -5,8 +5,8 @@ export declare class Sound {
5
5
  static Management: SoundManagement;
6
6
  readonly native: HTMLAudioElement;
7
7
  constructor(type?: SoundType);
8
- get volumn(): number;
9
- set volumn(vol: number);
8
+ get volume(): number;
9
+ set volume(vol: number);
10
10
  get isStopped(): boolean;
11
11
  playNow(): Promise<void>;
12
12
  pause(): Promise<void>;
@@ -43,7 +43,7 @@ var Sound = /** @class */ (function () {
43
43
  this.type = type;
44
44
  this.native = new Audio();
45
45
  }
46
- Object.defineProperty(Sound.prototype, "volumn", {
46
+ Object.defineProperty(Sound.prototype, "volume", {
47
47
  get: function () {
48
48
  return this.native.volume;
49
49
  },
@@ -1,6 +1,6 @@
1
1
  import { SoundType } from "../export-enums";
2
2
  export declare function SoundFrom(srcable?: string | {
3
3
  src?: string;
4
- volumn?: number;
4
+ volume?: number;
5
5
  }, type?: SoundType): (target: any, propertyKey: string) => void;
6
6
  //# sourceMappingURL=sound-from.decor.d.ts.map
@@ -4,14 +4,14 @@ export function SoundFrom(srcable, type) {
4
4
  return function (target, propertyKey) {
5
5
  var _a = srcable
6
6
  ? typeof srcable === "string"
7
- ? { src: srcable, volumn: undefined }
7
+ ? { src: srcable, volume: undefined }
8
8
  : srcable
9
- : { volumn: undefined, src: undefined }, volumn = _a.volumn, src = _a.src;
9
+ : { volume: undefined, src: undefined }, volume = _a.volume, src = _a.src;
10
10
  if (!target.soundsDecor) {
11
11
  target.soundsDecor = [];
12
12
  }
13
13
  target.soundsDecor.push({
14
- volumn: volumn,
14
+ volume: volume,
15
15
  propertyKey: propertyKey,
16
16
  src: src,
17
17
  type: type,
@@ -42,7 +42,7 @@ export declare type SoundDecor = {
42
42
  propertyKey: string;
43
43
  src?: string;
44
44
  type: SoundType;
45
- volumn?: number;
45
+ volume?: number;
46
46
  };
47
47
  export declare type SpriteDecor = {
48
48
  propertyKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simple-game-engine",
3
- "version": "0.2.91",
3
+ "version": "0.2.92",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib",