@mulsense/xnew 0.3.2 → 0.3.3

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.
Files changed (48) hide show
  1. package/dist/addons/xmatter.d.ts +2 -1
  2. package/dist/addons/xpixi.d.ts +3 -3
  3. package/dist/addons/xrapier2d.d.ts +2 -1
  4. package/dist/addons/xthree.d.ts +2 -1
  5. package/dist/xnew.js +2 -20
  6. package/dist/xnew.mjs +2 -20
  7. package/package.json +1 -1
  8. package/dist/types/audio/audio.d.ts +0 -64
  9. package/dist/types/audio/file.d.ts +0 -12
  10. package/dist/types/audio/loader.d.ts +0 -13
  11. package/dist/types/audio/synthesizer.d.ts +0 -41
  12. package/dist/types/basics/Accordion.d.ts +0 -20
  13. package/dist/types/basics/Audio.d.ts +0 -2
  14. package/dist/types/basics/Block.d.ts +0 -24
  15. package/dist/types/basics/Bullet.d.ts +0 -7
  16. package/dist/types/basics/ControlPanel.d.ts +0 -7
  17. package/dist/types/basics/Controller.d.ts +0 -19
  18. package/dist/types/basics/Drag.d.ts +0 -6
  19. package/dist/types/basics/Event.d.ts +0 -4
  20. package/dist/types/basics/File.d.ts +0 -1
  21. package/dist/types/basics/Input.d.ts +0 -8
  22. package/dist/types/basics/KeyEvent.d.ts +0 -2
  23. package/dist/types/basics/KeyboardEvent.d.ts +0 -2
  24. package/dist/types/basics/Modal.d.ts +0 -15
  25. package/dist/types/basics/Navigation.d.ts +0 -1
  26. package/dist/types/basics/Panel.d.ts +0 -6
  27. package/dist/types/basics/PointerEvent.d.ts +0 -2
  28. package/dist/types/basics/Popup.d.ts +0 -8
  29. package/dist/types/basics/ResizeEvent.d.ts +0 -2
  30. package/dist/types/basics/Screen.d.ts +0 -9
  31. package/dist/types/basics/SubWIndow.d.ts +0 -6
  32. package/dist/types/basics/Tab.d.ts +0 -24
  33. package/dist/types/basics/TabView.d.ts +0 -18
  34. package/dist/types/basics/Tabs.d.ts +0 -8
  35. package/dist/types/basics/Text.d.ts +0 -6
  36. package/dist/types/basics/Touch.d.ts +0 -28
  37. package/dist/types/basics/Transition.d.ts +0 -17
  38. package/dist/types/basics/UserEvent.d.ts +0 -2
  39. package/dist/types/basics/WorkSpace.d.ts +0 -16
  40. package/dist/types/core/audio.d.ts +0 -64
  41. package/dist/types/core/map.d.ts +0 -21
  42. package/dist/types/core/time.d.ts +0 -29
  43. package/dist/types/core/unit.d.ts +0 -94
  44. package/dist/types/core/util.d.ts +0 -1
  45. package/dist/types/core/xnew.d.ts +0 -150
  46. package/dist/types/icons/icons.d.ts +0 -327
  47. package/dist/types/index.d.ts +0 -48
  48. package/dist/types/xnew.d.ts +0 -8
@@ -3,4 +3,5 @@ declare const _default: {
3
3
  readonly engine: any;
4
4
  readonly world: any;
5
5
  };
6
- export default _default;
6
+
7
+ export { _default as default };
@@ -1,10 +1,10 @@
1
- import * as PIXI from 'pixi.js';
2
1
  declare const _default: {
3
2
  initialize({ renderer, canvas }?: any): void;
4
3
  nest(object: any): any;
5
- sync(canvas: any): PIXI.Texture<PIXI.TextureSource<any>>;
4
+ sync(canvas: any): any;
6
5
  readonly renderer: any;
7
6
  readonly scene: any;
8
7
  readonly canvas: any;
9
8
  };
10
- export default _default;
9
+
10
+ export { _default as default };
@@ -3,4 +3,5 @@ declare const _default: {
3
3
  connect(type: any, object: any): any;
4
4
  readonly world: any;
5
5
  };
6
- export default _default;
6
+
7
+ export { _default as default };
@@ -6,4 +6,5 @@ declare const _default: {
6
6
  readonly scene: any;
7
7
  readonly canvas: any;
8
8
  };
9
- export default _default;
9
+
10
+ export { _default as default };
package/dist/xnew.js CHANGED
@@ -1700,25 +1700,7 @@
1700
1700
  // heroicons
1701
1701
  // https://heroicons.com/outline
1702
1702
  // MIT License
1703
- function OutLineTemplate(unit, { frame, stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1704
- if (frame) {
1705
- xnew$1((unit) => {
1706
- xnew$1.nest(`<div style="position: absolute; margin: auto; width: 100%; height: 100%;">`);
1707
- xnew$1.nest('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.0" stroke="currentColor">');
1708
- if (frame === 'circle') {
1709
- xnew$1('<circle cx="12" cy="12" r="11">');
1710
- }
1711
- else if (frame === 'square') {
1712
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="0">');
1713
- }
1714
- else if (frame === 'rounded-square') {
1715
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="6">');
1716
- }
1717
- });
1718
- }
1719
- if (frame) {
1720
- xnew$1.nest(`<div style="position: absolute; inset: 0; margin: auto; width: 70%; height: 70%;">`);
1721
- }
1703
+ function OutLineTemplate(unit, { stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1722
1704
  xnew$1.nest(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1723
1705
  style="stroke-width: ${strokeWidth}; stroke: ${stroke}; stroke-opacity: ${strokeOpacity}; stroke-linejoin: ${strokeLinejoin}; stroke-linecap: ${strokeLinecap};"
1724
1706
  >`);
@@ -4061,7 +4043,7 @@
4061
4043
  const unit = xnew();
4062
4044
  if (music.played === null) {
4063
4045
  music.play(options);
4064
- unit.on('-finalize', () => music.pause({ fade: options.fade }));
4046
+ unit.on('finalize', () => music.pause({ fade: options.fade }));
4065
4047
  }
4066
4048
  },
4067
4049
  pause(options) {
package/dist/xnew.mjs CHANGED
@@ -1694,25 +1694,7 @@ class Synthesizer {
1694
1694
  // heroicons
1695
1695
  // https://heroicons.com/outline
1696
1696
  // MIT License
1697
- function OutLineTemplate(unit, { frame, stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1698
- if (frame) {
1699
- xnew$1((unit) => {
1700
- xnew$1.nest(`<div style="position: absolute; margin: auto; width: 100%; height: 100%;">`);
1701
- xnew$1.nest('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.0" stroke="currentColor">');
1702
- if (frame === 'circle') {
1703
- xnew$1('<circle cx="12" cy="12" r="11">');
1704
- }
1705
- else if (frame === 'square') {
1706
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="0">');
1707
- }
1708
- else if (frame === 'rounded-square') {
1709
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="6">');
1710
- }
1711
- });
1712
- }
1713
- if (frame) {
1714
- xnew$1.nest(`<div style="position: absolute; inset: 0; margin: auto; width: 70%; height: 70%;">`);
1715
- }
1697
+ function OutLineTemplate(unit, { stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1716
1698
  xnew$1.nest(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1717
1699
  style="stroke-width: ${strokeWidth}; stroke: ${stroke}; stroke-opacity: ${strokeOpacity}; stroke-linejoin: ${strokeLinejoin}; stroke-linecap: ${strokeLinecap};"
1718
1700
  >`);
@@ -4055,7 +4037,7 @@ const audio = {
4055
4037
  const unit = xnew();
4056
4038
  if (music.played === null) {
4057
4039
  music.play(options);
4058
- unit.on('-finalize', () => music.pause({ fade: options.fade }));
4040
+ unit.on('finalize', () => music.pause({ fade: options.fade }));
4059
4041
  }
4060
4042
  },
4061
4043
  pause(options) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "Component-Oriented Programming"
6
6
  ],
7
- "version": "0.3.2",
7
+ "version": "0.3.3",
8
8
  "main": "dist/xnew.js",
9
9
  "module": "dist/xnew.mjs",
10
10
  "types": "dist/xnew.d.ts",
@@ -1,64 +0,0 @@
1
- export declare const context: AudioContext;
2
- export declare const master: GainNode;
3
- export type AudioFilePlayOptions = {
4
- offset?: number;
5
- fade?: number;
6
- loop?: boolean;
7
- };
8
- export type AudioFilePauseOptions = {
9
- fade?: number;
10
- };
11
- export declare class AudioFile {
12
- private buffer?;
13
- private source;
14
- private amp;
15
- private fade;
16
- promise: Promise<void>;
17
- played: number | null;
18
- constructor(path: string);
19
- set volume(value: number);
20
- get volume(): number;
21
- play({ offset, fade, loop }?: AudioFilePlayOptions): void;
22
- pause({ fade }?: AudioFilePauseOptions): number | undefined;
23
- clear(): void;
24
- }
25
- export type SynthesizerOptions = {
26
- oscillator: OscillatorOptions;
27
- amp: AmpOptions;
28
- filter?: FilterOptions;
29
- reverb?: ReverbOptions;
30
- bpm?: number;
31
- };
32
- type OscillatorOptions = {
33
- type: OscillatorType;
34
- envelope?: Envelope;
35
- LFO?: LFO;
36
- };
37
- type FilterOptions = {
38
- type: BiquadFilterType;
39
- cutoff: number;
40
- };
41
- type AmpOptions = {
42
- envelope: Envelope;
43
- };
44
- type ReverbOptions = {
45
- time: number;
46
- mix: number;
47
- };
48
- type Envelope = {
49
- amount: number;
50
- ADSR: [number, number, number, number];
51
- };
52
- type LFO = {
53
- amount: number;
54
- type: OscillatorType;
55
- rate: number;
56
- };
57
- export declare class Synthesizer {
58
- props: SynthesizerOptions;
59
- constructor(props: SynthesizerOptions);
60
- press(frequency: number | string, duration?: number | string, wait?: number): {
61
- release: () => void;
62
- } | undefined;
63
- }
64
- export {};
@@ -1,12 +0,0 @@
1
- export declare function load(path: string): AudioFile;
2
- declare class AudioFile {
3
- buffer?: AudioBuffer;
4
- promise: Promise<void>;
5
- source?: AudioBufferSourceNode;
6
- amp?: GainNode;
7
- start: number | null;
8
- constructor(path: string);
9
- play(offset?: number, loop?: boolean): void;
10
- pause(): number | undefined;
11
- }
12
- export {};
@@ -1,13 +0,0 @@
1
- export declare function load(path: string): AudioFile;
2
- declare class AudioFile {
3
- data: any;
4
- startTime: number | null;
5
- source: AudioBufferSourceNode;
6
- amp: GainNode;
7
- constructor(path: string);
8
- isReady(): boolean;
9
- get promise(): Promise<void>;
10
- play(offset?: number): void;
11
- pause(): number | undefined;
12
- }
13
- export {};
@@ -1,41 +0,0 @@
1
- export declare function synthesizer(props: SynthProps): Synthesizer;
2
- type SynthProps = {
3
- oscillator: OscillatorOptions;
4
- amp: AmpOptions;
5
- filter?: FilterOptions;
6
- reverb?: ReverbOptions;
7
- bpm?: number;
8
- };
9
- type OscillatorOptions = {
10
- type: OscillatorType;
11
- envelope?: Envelope;
12
- LFO?: LFO;
13
- };
14
- type FilterOptions = {
15
- type: BiquadFilterType;
16
- cutoff: number;
17
- };
18
- type AmpOptions = {
19
- envelope: Envelope;
20
- };
21
- type ReverbOptions = {
22
- time: number;
23
- mix: number;
24
- };
25
- type Envelope = {
26
- amount: number;
27
- ADSR: [number, number, number, number];
28
- };
29
- type LFO = {
30
- amount: number;
31
- type: OscillatorType;
32
- rate: number;
33
- };
34
- declare class Synthesizer {
35
- props: SynthProps;
36
- constructor(props: SynthProps);
37
- press(frequency: number | string, duration?: number | string, wait?: number): {
38
- release: () => void;
39
- } | undefined;
40
- }
41
- export {};
@@ -1,20 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function AccordionFrame(frame: Unit, { open, duration, easing }?: {
3
- open?: boolean;
4
- duration?: number;
5
- easing?: string;
6
- }): {
7
- toggle(): void;
8
- open(): void;
9
- close(): void;
10
- };
11
- export declare function AccordionHeader(header: Unit, {}?: {}): void;
12
- export declare function AccordionBullet(bullet: Unit, { type }?: {
13
- type?: string;
14
- }): void;
15
- export declare function AccordionContent(content: Unit, {}?: {}): {
16
- transition({ element, rate }: {
17
- element: HTMLElement;
18
- rate: number;
19
- }): void;
20
- };
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function VolumeController(unit: Unit, {}?: {}): void;
@@ -1,24 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function Modal(self: xnew.Unit, { duration, easing }?: {
3
- duration?: number | undefined;
4
- easing?: string | undefined;
5
- }): {
6
- open(): void;
7
- close(): void;
8
- };
9
- export declare function Accordion(self: xnew.Unit, { open, duration, easing }?: {
10
- open?: boolean | undefined;
11
- duration?: number | undefined;
12
- easing?: string | undefined;
13
- }): {
14
- open(): void;
15
- close(): void;
16
- toggle(): void;
17
- };
18
- export declare function Tab(self: xnew.Unit, { duration, easing }?: {
19
- duration?: number | undefined;
20
- easing?: string | undefined;
21
- }): {
22
- assign(name: string, component: Function): void;
23
- select(name: string): void;
24
- };
@@ -1,7 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function BulletArrow(self: xnew.Unit, { rotate, color }?: {
3
- rotate?: number;
4
- color?: string;
5
- }): {
6
- rotate(rotate: number, transition?: number, easing?: string): void;
7
- };
@@ -1,7 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function ControlPanel(self: xnew.Unit, {}?: {}): {
3
- group(name: string): void;
4
- button(name: string, component: Function, props?: any): void;
5
- range(name: string, component: Function, props?: any): void;
6
- select(name: string): void;
7
- };
@@ -1,19 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function AnalogStick(unit: Unit, { stroke, strokeOpacity, strokeWidth, strokeLinejoin, fill, fillOpacity }?: {
3
- stroke?: string;
4
- strokeOpacity?: number;
5
- strokeWidth?: number;
6
- strokeLinejoin?: string;
7
- diagonal?: boolean;
8
- fill?: string;
9
- fillOpacity?: number;
10
- }): void;
11
- export declare function DirectionalPad(unit: Unit, { diagonal, stroke, strokeOpacity, strokeWidth, strokeLinejoin, fill, fillOpacity }?: {
12
- diagonal?: boolean;
13
- stroke?: string;
14
- strokeOpacity?: number;
15
- strokeWidth?: number;
16
- strokeLinejoin?: string;
17
- fill?: string;
18
- fillOpacity?: number;
19
- }): void;
@@ -1,6 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function DragFrame(frame: Unit, { x, y }?: {
3
- x?: number;
4
- y?: number;
5
- }): void;
6
- export declare function DragTarget(target: Unit, {}?: {}): void;
@@ -1,4 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function ResizeEvent(resize: Unit): void;
3
- export declare function KeyboardEvent(keyboard: Unit): void;
4
- export declare function PointerEvent(unit: Unit): void;
@@ -1 +0,0 @@
1
- export declare function File(data: string, filename: string, mimeType?: string): void;
@@ -1,8 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function InputRange(frame: Unit, { value, min, max, step, ...attributes }?: {
3
- value?: number | string;
4
- min?: number | string;
5
- max?: number | string;
6
- step?: number | string;
7
- attributes?: Object;
8
- }): void;
@@ -1,2 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function KeyEvent(unit: xnew.Unit): void;
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function KeyboardEvent(unit: Unit): void;
@@ -1,15 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function ModalFrame(frame: Unit, { duration, easing }?: {
3
- duration?: number;
4
- easing?: string;
5
- }): {
6
- close(): void;
7
- };
8
- export declare function ModalContent(content: Unit, { background }?: {
9
- background?: string;
10
- }): {
11
- transition({ element, rate }: {
12
- element: HTMLElement;
13
- rate: number;
14
- }): void;
15
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function PanelFrame(frame: xnew.Unit): void;
3
- export declare function PanelGroup(group: xnew.Unit, { name, open }?: {
4
- name?: string;
5
- open?: boolean;
6
- }): void;
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function PointerEvent(unit: Unit): void;
@@ -1,8 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function Modal(self: xnew.Unit, { duration, easing }?: {
3
- duration?: number | undefined;
4
- easing?: string | undefined;
5
- }): {
6
- open(): void;
7
- close(): void;
8
- };
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function ResizeEvent(resize: Unit): void;
@@ -1,9 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function Screen(screen: Unit, { width, height, fit }?: {
3
- width?: number | undefined;
4
- height?: number | undefined;
5
- fit?: string | undefined;
6
- }): {
7
- readonly canvas: import("../core/unit").UnitElement;
8
- resize(width: number, height: number): void;
9
- };
@@ -1,6 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function DragFrame(frame: xnew.Unit, { x, y }?: {
3
- x?: number;
4
- y?: number;
5
- }): void;
6
- export declare function DragTarget(target: xnew.Unit, {}?: {}): void;
@@ -1,24 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function TabFrame(frame: Unit, { select }?: {
3
- select?: string;
4
- }): void;
5
- export declare function TabButton(button: Unit, { key }?: {
6
- key?: string;
7
- }): {
8
- select({ element }: {
9
- element: HTMLElement;
10
- }): void;
11
- deselect({ element }: {
12
- element: HTMLElement;
13
- }): void;
14
- };
15
- export declare function TabContent(content: Unit, { key }?: {
16
- key?: string;
17
- }): {
18
- select({ element }: {
19
- element: HTMLElement;
20
- }): void;
21
- deselect({ element }: {
22
- element: HTMLElement;
23
- }): void;
24
- };
@@ -1,18 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function TabFrame(frame: xnew.Unit, { select, duration, easing }?: {
3
- select?: number | undefined;
4
- duration?: number | undefined;
5
- easing?: string | undefined;
6
- }): {
7
- tabs: import("../core/unit").Unit[];
8
- contents: import("../core/unit").Unit[];
9
- select(index: number): void;
10
- };
11
- export declare function TabButton(self: xnew.Unit): {
12
- select(): void;
13
- deselect(): void;
14
- };
15
- export declare function TabContent(self: xnew.Unit): {
16
- select(): void;
17
- deselect(): void;
18
- };
@@ -1,8 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function Tabs(self: xnew.Unit, { duration, easing }?: {
3
- duration?: number | undefined;
4
- easing?: string | undefined;
5
- }): {
6
- content(name: string, component: Function, props?: any): void;
7
- select(name: string): void;
8
- };
@@ -1,6 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function TextStream(unit: Unit, { text, speed, fade }?: {
3
- text?: string;
4
- speed?: number;
5
- fade?: number;
6
- }): void;
@@ -1,28 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function TouchStick(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
3
- size?: number | undefined;
4
- fill?: string | undefined;
5
- fillOpacity?: number | undefined;
6
- stroke?: string | undefined;
7
- strokeOpacity?: number | undefined;
8
- strokeWidth?: number | undefined;
9
- strokeLinejoin?: string | undefined;
10
- }): void;
11
- export declare function TouchDPad(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
12
- size?: number | undefined;
13
- fill?: string | undefined;
14
- fillOpacity?: number | undefined;
15
- stroke?: string | undefined;
16
- strokeOpacity?: number | undefined;
17
- strokeWidth?: number | undefined;
18
- strokeLinejoin?: string | undefined;
19
- }): void;
20
- export declare function TouchButton(self: xnew.Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
21
- size?: number | undefined;
22
- fill?: string | undefined;
23
- fillOpacity?: number | undefined;
24
- stroke?: string | undefined;
25
- strokeOpacity?: number | undefined;
26
- strokeWidth?: number | undefined;
27
- strokeLinejoin?: string | undefined;
28
- }): void;
@@ -1,17 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function Modal(self: xnew.Unit, { duration, easing }?: {
3
- duration?: number | undefined;
4
- easing?: string | undefined;
5
- }): {
6
- open(): void;
7
- close(): void;
8
- };
9
- export declare function Accordion(self: xnew.Unit, { open, duration, easing }: {
10
- open?: boolean | undefined;
11
- duration?: number | undefined;
12
- easing?: string | undefined;
13
- }): {
14
- open(): void;
15
- close(): void;
16
- toggle(): void;
17
- };
@@ -1,2 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function UserEvent(unit: xnew.Unit): void;
@@ -1,16 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- interface Position {
3
- x: number | null | undefined;
4
- y: number | null | undefined;
5
- }
6
- interface Transform {
7
- position: Position | null | undefined;
8
- rotation: number | null | undefined;
9
- scale: number | null | undefined;
10
- }
11
- export declare function WorkSpace(self: xnew.Unit, attributes?: any): {
12
- readonly transform: Transform;
13
- move(transform: Transform): void;
14
- update(): void;
15
- };
16
- export {};
@@ -1,64 +0,0 @@
1
- export declare const context: AudioContext;
2
- export declare const master: GainNode;
3
- export type AudioFilePlayOptions = {
4
- offset?: number;
5
- fade?: number;
6
- loop?: boolean;
7
- };
8
- export type AudioFilePauseOptions = {
9
- fade?: number;
10
- };
11
- export declare class AudioFile {
12
- private buffer?;
13
- private source;
14
- private amp;
15
- private fade;
16
- promise: Promise<void>;
17
- played: number | null;
18
- constructor(path: string);
19
- set volume(value: number);
20
- get volume(): number;
21
- play({ offset, fade, loop }?: AudioFilePlayOptions): void;
22
- pause({ fade }?: AudioFilePauseOptions): number | undefined;
23
- clear(): void;
24
- }
25
- export type SynthesizerOptions = {
26
- oscillator: OscillatorOptions;
27
- amp: AmpOptions;
28
- filter?: FilterOptions;
29
- reverb?: ReverbOptions;
30
- bpm?: number;
31
- };
32
- type OscillatorOptions = {
33
- type: OscillatorType;
34
- envelope?: Envelope;
35
- LFO?: LFO;
36
- };
37
- type FilterOptions = {
38
- type: BiquadFilterType;
39
- cutoff: number;
40
- };
41
- type AmpOptions = {
42
- envelope: Envelope;
43
- };
44
- type ReverbOptions = {
45
- time: number;
46
- mix: number;
47
- };
48
- type Envelope = {
49
- amount: number;
50
- ADSR: [number, number, number, number];
51
- };
52
- type LFO = {
53
- amount: number;
54
- type: OscillatorType;
55
- rate: number;
56
- };
57
- export declare class Synthesizer {
58
- props: SynthesizerOptions;
59
- constructor(props: SynthesizerOptions);
60
- press(frequency: number | string, duration?: number | string, wait?: number): {
61
- release: () => void;
62
- } | undefined;
63
- }
64
- export {};