@mulsense/xnew 0.1.7 → 0.1.8
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/dist/addons/xmatter.js +7 -9
- package/dist/addons/xmatter.mjs +7 -9
- package/dist/addons/xpixi.js +6 -8
- package/dist/addons/xpixi.mjs +6 -8
- package/dist/addons/xrapier2d.d.ts +1 -1
- package/dist/addons/xrapier2d.js +30 -27
- package/dist/addons/xrapier2d.mjs +30 -27
- package/dist/addons/xthree.js +2 -2
- package/dist/addons/xthree.mjs +2 -2
- package/dist/types/audio/audio.d.ts +0 -17
- package/dist/types/audio/file.d.ts +12 -0
- package/dist/types/audio/loader.d.ts +2 -6
- package/dist/types/audio/synthesizer.d.ts +25 -38
- package/dist/types/basics/Accordion.d.ts +5 -5
- package/dist/types/basics/Controller.d.ts +4 -4
- package/dist/types/basics/Drag.d.ts +3 -3
- package/dist/types/basics/Input.d.ts +2 -2
- package/dist/types/basics/KeyboardEvent.d.ts +2 -2
- package/dist/types/basics/Modal.d.ts +3 -3
- package/dist/types/basics/PointerEvent.d.ts +2 -2
- package/dist/types/basics/ResizeEvent.d.ts +2 -1
- package/dist/types/basics/Screen.d.ts +3 -3
- package/dist/types/basics/Tab.d.ts +4 -4
- package/dist/types/core/time.d.ts +4 -7
- package/dist/types/core/unit.d.ts +11 -13
- package/dist/types/core/xnew.d.ts +189 -4
- package/dist/types/index.d.ts +9 -9
- package/dist/xnew.d.ts +267 -96
- package/dist/xnew.js +573 -557
- package/dist/xnew.mjs +573 -557
- package/package.json +1 -1
package/dist/addons/xmatter.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
xnew.extend(Root, { engine });
|
|
10
10
|
},
|
|
11
11
|
nest(object) {
|
|
12
|
-
xnew.extend(Nest, object);
|
|
12
|
+
xnew.extend(Nest, { object });
|
|
13
13
|
return object;
|
|
14
14
|
},
|
|
15
15
|
get engine() {
|
|
@@ -22,22 +22,20 @@
|
|
|
22
22
|
xnew.context('xmatter.root', root);
|
|
23
23
|
root.isActive = true;
|
|
24
24
|
root.engine = engine !== null && engine !== void 0 ? engine : Matter.Engine.create();
|
|
25
|
-
xnew.
|
|
25
|
+
xnew.context('xmatter.object', root.engine.world);
|
|
26
26
|
self.on('update', () => {
|
|
27
27
|
if (root.isActive) {
|
|
28
28
|
Matter.Engine.update(root.engine);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function Nest(self, object) {
|
|
32
|
+
function Nest(self, { object }) {
|
|
33
33
|
const parent = xnew.context('xmatter.object');
|
|
34
34
|
xnew.context('xmatter.object', object);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
}
|
|
35
|
+
Matter.Composite.add(parent, object);
|
|
36
|
+
self.on('finalize', () => {
|
|
37
|
+
Matter.Composite.remove(parent, object);
|
|
38
|
+
});
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
return xmatter;
|
package/dist/addons/xmatter.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var xmatter = {
|
|
|
6
6
|
xnew.extend(Root, { engine });
|
|
7
7
|
},
|
|
8
8
|
nest(object) {
|
|
9
|
-
xnew.extend(Nest, object);
|
|
9
|
+
xnew.extend(Nest, { object });
|
|
10
10
|
return object;
|
|
11
11
|
},
|
|
12
12
|
get engine() {
|
|
@@ -19,22 +19,20 @@ function Root(self, { engine }) {
|
|
|
19
19
|
xnew.context('xmatter.root', root);
|
|
20
20
|
root.isActive = true;
|
|
21
21
|
root.engine = engine !== null && engine !== void 0 ? engine : Matter.Engine.create();
|
|
22
|
-
xnew.
|
|
22
|
+
xnew.context('xmatter.object', root.engine.world);
|
|
23
23
|
self.on('update', () => {
|
|
24
24
|
if (root.isActive) {
|
|
25
25
|
Matter.Engine.update(root.engine);
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
function Nest(self, object) {
|
|
29
|
+
function Nest(self, { object }) {
|
|
30
30
|
const parent = xnew.context('xmatter.object');
|
|
31
31
|
xnew.context('xmatter.object', object);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
}
|
|
32
|
+
Matter.Composite.add(parent, object);
|
|
33
|
+
self.on('finalize', () => {
|
|
34
|
+
Matter.Composite.remove(parent, object);
|
|
35
|
+
});
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
export { xmatter as default };
|
package/dist/addons/xpixi.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
xnew.extend(Root, { renderer, canvas });
|
|
29
29
|
},
|
|
30
30
|
nest(object) {
|
|
31
|
-
xnew.extend(Nest, object);
|
|
31
|
+
xnew.extend(Nest, { object });
|
|
32
32
|
return object;
|
|
33
33
|
},
|
|
34
34
|
sync(canvas) {
|
|
@@ -78,15 +78,13 @@
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
function Nest(self, object) {
|
|
81
|
+
function Nest(self, { object }) {
|
|
82
82
|
const parent = xnew.context('xpixi.object');
|
|
83
83
|
xnew.context('xpixi.object', object);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
}
|
|
84
|
+
parent.addChild(object);
|
|
85
|
+
self.on('finalize', () => {
|
|
86
|
+
parent.removeChild(object);
|
|
87
|
+
});
|
|
90
88
|
}
|
|
91
89
|
function PreUpdate(self, callback) {
|
|
92
90
|
const root = xnew.context('xpixi.root');
|
package/dist/addons/xpixi.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var xpixi = {
|
|
|
6
6
|
xnew.extend(Root, { renderer, canvas });
|
|
7
7
|
},
|
|
8
8
|
nest(object) {
|
|
9
|
-
xnew.extend(Nest, object);
|
|
9
|
+
xnew.extend(Nest, { object });
|
|
10
10
|
return object;
|
|
11
11
|
},
|
|
12
12
|
sync(canvas) {
|
|
@@ -56,15 +56,13 @@ function Root(self, { canvas }) {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
function Nest(self, object) {
|
|
59
|
+
function Nest(self, { object }) {
|
|
60
60
|
const parent = xnew.context('xpixi.object');
|
|
61
61
|
xnew.context('xpixi.object', object);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
67
|
-
}
|
|
62
|
+
parent.addChild(object);
|
|
63
|
+
self.on('finalize', () => {
|
|
64
|
+
parent.removeChild(object);
|
|
65
|
+
});
|
|
68
66
|
}
|
|
69
67
|
function PreUpdate(self, callback) {
|
|
70
68
|
const root = xnew.context('xpixi.root');
|
package/dist/addons/xrapier2d.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
initialize({ gravity = { x: 0.0, y: 9.81 }, timestep = null } = {}) {
|
|
9
9
|
xnew.extend(Root, { gravity, timestep });
|
|
10
10
|
},
|
|
11
|
-
|
|
12
|
-
xnew.extend(
|
|
11
|
+
connect(type, object) {
|
|
12
|
+
xnew.extend(Connect, { type, object });
|
|
13
13
|
return object;
|
|
14
14
|
},
|
|
15
15
|
get world() {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
if (timestep !== null) {
|
|
26
26
|
root.world.timestep = timestep;
|
|
27
27
|
}
|
|
28
|
-
xnew.extend(Nest, root.world);
|
|
28
|
+
// xnew.extend(Nest, root.world);
|
|
29
29
|
});
|
|
30
30
|
self.on('update', () => {
|
|
31
31
|
if (root.world) {
|
|
@@ -33,32 +33,35 @@
|
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
xnew.context('xrapier2d.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
else if (object.shape && typeof object.shape === 'function') {
|
|
50
|
-
parent.removeCollider(object);
|
|
51
|
-
}
|
|
52
|
-
// Check if object is an ImpulseJoint
|
|
53
|
-
else if (object.impulse !== undefined) {
|
|
54
|
-
parent.removeImpulseJoint(object);
|
|
55
|
-
}
|
|
36
|
+
let count = 0;
|
|
37
|
+
function Connect(self, { type, object }) {
|
|
38
|
+
const root = xnew.context('xrapier2d.root');
|
|
39
|
+
let temp = count++;
|
|
40
|
+
console.log(temp, type, object);
|
|
41
|
+
// Rapier2D objects (RigidBody, Collider, etc.) are already added to the world
|
|
42
|
+
// when created, so we only need to handle removal on finalize
|
|
43
|
+
self.on('finalize', () => {
|
|
44
|
+
try {
|
|
45
|
+
// Check if object is a RigidBody
|
|
46
|
+
if (type === 'rigidBody') {
|
|
47
|
+
console.log('Removing RigidBody');
|
|
48
|
+
root.world.removeRigidBody(object);
|
|
56
49
|
}
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
// Check if object is a Collider
|
|
51
|
+
else if (type === 'collider') {
|
|
52
|
+
console.log('Removing Collider');
|
|
53
|
+
root.world.removeCollider(object);
|
|
59
54
|
}
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
// Check if object is an ImpulseJoint
|
|
56
|
+
else if (type === 'impulseJoint') {
|
|
57
|
+
console.log('Removing ImpulseJoint');
|
|
58
|
+
root.world.removeImpulseJoint(object);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
// Object may have already been removed
|
|
63
|
+
}
|
|
64
|
+
});
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
return xrapier2d;
|
|
@@ -5,8 +5,8 @@ var xrapier2d = {
|
|
|
5
5
|
initialize({ gravity = { x: 0.0, y: 9.81 }, timestep = null } = {}) {
|
|
6
6
|
xnew.extend(Root, { gravity, timestep });
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
xnew.extend(
|
|
8
|
+
connect(type, object) {
|
|
9
|
+
xnew.extend(Connect, { type, object });
|
|
10
10
|
return object;
|
|
11
11
|
},
|
|
12
12
|
get world() {
|
|
@@ -22,7 +22,7 @@ function Root(self, { gravity, timestep }) {
|
|
|
22
22
|
if (timestep !== null) {
|
|
23
23
|
root.world.timestep = timestep;
|
|
24
24
|
}
|
|
25
|
-
xnew.extend(Nest, root.world);
|
|
25
|
+
// xnew.extend(Nest, root.world);
|
|
26
26
|
});
|
|
27
27
|
self.on('update', () => {
|
|
28
28
|
if (root.world) {
|
|
@@ -30,32 +30,35 @@ function Root(self, { gravity, timestep }) {
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
xnew.context('xrapier2d.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
else if (object.shape && typeof object.shape === 'function') {
|
|
47
|
-
parent.removeCollider(object);
|
|
48
|
-
}
|
|
49
|
-
// Check if object is an ImpulseJoint
|
|
50
|
-
else if (object.impulse !== undefined) {
|
|
51
|
-
parent.removeImpulseJoint(object);
|
|
52
|
-
}
|
|
33
|
+
let count = 0;
|
|
34
|
+
function Connect(self, { type, object }) {
|
|
35
|
+
const root = xnew.context('xrapier2d.root');
|
|
36
|
+
let temp = count++;
|
|
37
|
+
console.log(temp, type, object);
|
|
38
|
+
// Rapier2D objects (RigidBody, Collider, etc.) are already added to the world
|
|
39
|
+
// when created, so we only need to handle removal on finalize
|
|
40
|
+
self.on('finalize', () => {
|
|
41
|
+
try {
|
|
42
|
+
// Check if object is a RigidBody
|
|
43
|
+
if (type === 'rigidBody') {
|
|
44
|
+
console.log('Removing RigidBody');
|
|
45
|
+
root.world.removeRigidBody(object);
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
// Check if object is a Collider
|
|
48
|
+
else if (type === 'collider') {
|
|
49
|
+
console.log('Removing Collider');
|
|
50
|
+
root.world.removeCollider(object);
|
|
56
51
|
}
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
// Check if object is an ImpulseJoint
|
|
53
|
+
else if (type === 'impulseJoint') {
|
|
54
|
+
console.log('Removing ImpulseJoint');
|
|
55
|
+
root.world.removeImpulseJoint(object);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
// Object may have already been removed
|
|
60
|
+
}
|
|
61
|
+
});
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
export { xrapier2d as default };
|
package/dist/addons/xthree.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
xnew.extend(Root, { renderer, canvas, camera });
|
|
29
29
|
},
|
|
30
30
|
nest(object) {
|
|
31
|
-
xnew.extend(Nest, object);
|
|
31
|
+
xnew.extend(Nest, { object });
|
|
32
32
|
return object;
|
|
33
33
|
},
|
|
34
34
|
get renderer() {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
root.renderer.render(root.scene, root.camera);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
function Nest(self, object) {
|
|
64
|
+
function Nest(self, { object }) {
|
|
65
65
|
const parent = xnew.context('xthree.object');
|
|
66
66
|
xnew.context('xthree.object', object);
|
|
67
67
|
if (parent) {
|
package/dist/addons/xthree.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var xthree = {
|
|
|
6
6
|
xnew.extend(Root, { renderer, canvas, camera });
|
|
7
7
|
},
|
|
8
8
|
nest(object) {
|
|
9
|
-
xnew.extend(Nest, object);
|
|
9
|
+
xnew.extend(Nest, { object });
|
|
10
10
|
return object;
|
|
11
11
|
},
|
|
12
12
|
get renderer() {
|
|
@@ -39,7 +39,7 @@ function Root(self, { canvas, camera }) {
|
|
|
39
39
|
root.renderer.render(root.scene, root.camera);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function Nest(self, object) {
|
|
42
|
+
function Nest(self, { object }) {
|
|
43
43
|
const parent = xnew.context('xthree.object');
|
|
44
44
|
xnew.context('xthree.object', object);
|
|
45
45
|
if (parent) {
|
|
@@ -1,19 +1,2 @@
|
|
|
1
1
|
export declare const context: AudioContext;
|
|
2
2
|
export declare const master: GainNode;
|
|
3
|
-
export declare class AudioNodeClass {
|
|
4
|
-
nodes: {
|
|
5
|
-
[key: string]: AudioNode & {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
constructor(params: {
|
|
10
|
-
[key: string]: any[];
|
|
11
|
-
});
|
|
12
|
-
cleanup(): void;
|
|
13
|
-
}
|
|
14
|
-
export type AudioNodeMap = {
|
|
15
|
-
[key: string]: AudioNode;
|
|
16
|
-
};
|
|
17
|
-
export declare function connect(params: {
|
|
18
|
-
[key: string]: any[];
|
|
19
|
-
}): AudioNodeMap;
|
|
@@ -0,0 +1,12 @@
|
|
|
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,16 +1,12 @@
|
|
|
1
|
-
import { AudioNodeMap } from './audio';
|
|
2
1
|
export declare function load(path: string): AudioFile;
|
|
3
2
|
declare class AudioFile {
|
|
4
3
|
data: any;
|
|
5
4
|
startTime: number | null;
|
|
6
|
-
|
|
5
|
+
source: AudioBufferSourceNode;
|
|
6
|
+
amp: GainNode;
|
|
7
7
|
constructor(path: string);
|
|
8
8
|
isReady(): boolean;
|
|
9
9
|
get promise(): Promise<void>;
|
|
10
|
-
set volume(value: number);
|
|
11
|
-
get volume(): number;
|
|
12
|
-
set loop(value: boolean);
|
|
13
|
-
get loop(): boolean;
|
|
14
10
|
play(offset?: number): void;
|
|
15
11
|
pause(): number | undefined;
|
|
16
12
|
}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
+
export declare function synthesizer(props: SynthProps): Synthesizer;
|
|
1
2
|
type SynthProps = {
|
|
2
|
-
oscillator
|
|
3
|
-
|
|
4
|
-
|
|
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;
|
|
5
13
|
};
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
9
24
|
};
|
|
10
25
|
type Envelope = {
|
|
11
26
|
amount: number;
|
|
@@ -16,39 +31,11 @@ type LFO = {
|
|
|
16
31
|
type: OscillatorType;
|
|
17
32
|
rate: number;
|
|
18
33
|
};
|
|
19
|
-
type OscillatorOptions = {
|
|
20
|
-
type?: OscillatorType;
|
|
21
|
-
envelope?: Envelope | null;
|
|
22
|
-
LFO?: LFO | null;
|
|
23
|
-
};
|
|
24
|
-
type FilterOptions = {
|
|
25
|
-
type?: BiquadFilterType;
|
|
26
|
-
cutoff?: number;
|
|
27
|
-
};
|
|
28
|
-
type AmpOptions = {
|
|
29
|
-
envelope?: Envelope | null;
|
|
30
|
-
};
|
|
31
|
-
type ReverbOptions = {
|
|
32
|
-
time?: number;
|
|
33
|
-
mix?: number;
|
|
34
|
-
};
|
|
35
|
-
export declare function synthesizer(props?: SynthProps, effects?: SynthEffects): Synthesizer;
|
|
36
34
|
declare class Synthesizer {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
bmp: number;
|
|
41
|
-
reverb: ReverbOptions;
|
|
42
|
-
static initialize(): void;
|
|
43
|
-
constructor({ oscillator, filter, amp }?: SynthProps, { bmp, reverb }?: SynthEffects);
|
|
44
|
-
static keymap: {
|
|
45
|
-
[key: string]: number;
|
|
46
|
-
};
|
|
47
|
-
static notemap: {
|
|
48
|
-
[key: string]: number;
|
|
49
|
-
};
|
|
50
|
-
press(frequency: number | string, duration?: number | string | null, wait?: number): {
|
|
35
|
+
props: SynthProps;
|
|
36
|
+
constructor(props: SynthProps);
|
|
37
|
+
press(frequency: number | string, duration?: number | string, wait?: number): {
|
|
51
38
|
release: () => void;
|
|
52
|
-
};
|
|
39
|
+
} | undefined;
|
|
53
40
|
}
|
|
54
41
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function AccordionFrame(frame:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function AccordionFrame(frame: Unit, { open, duration, easing }?: {
|
|
3
3
|
open?: boolean;
|
|
4
4
|
duration?: number;
|
|
5
5
|
easing?: string;
|
|
@@ -8,11 +8,11 @@ export declare function AccordionFrame(frame: xnew.Unit, { open, duration, easin
|
|
|
8
8
|
open(): void;
|
|
9
9
|
close(): void;
|
|
10
10
|
};
|
|
11
|
-
export declare function AccordionHeader(header:
|
|
12
|
-
export declare function AccordionBullet(bullet:
|
|
11
|
+
export declare function AccordionHeader(header: Unit, {}?: {}): void;
|
|
12
|
+
export declare function AccordionBullet(bullet: Unit, { type }?: {
|
|
13
13
|
type?: string;
|
|
14
14
|
}): void;
|
|
15
|
-
export declare function AccordionContent(content:
|
|
15
|
+
export declare function AccordionContent(content: Unit, {}?: {}): {
|
|
16
16
|
transition({ element, rate }: {
|
|
17
17
|
element: HTMLElement;
|
|
18
18
|
rate: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function AnalogStick(self:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function AnalogStick(self: Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
3
3
|
size?: number;
|
|
4
4
|
diagonal?: boolean;
|
|
5
5
|
fill?: string;
|
|
@@ -9,7 +9,7 @@ export declare function AnalogStick(self: xnew.Unit, { size, fill, fillOpacity,
|
|
|
9
9
|
strokeWidth?: number;
|
|
10
10
|
strokeLinejoin?: string;
|
|
11
11
|
}): void;
|
|
12
|
-
export declare function DirectionalPad(self:
|
|
12
|
+
export declare function DirectionalPad(self: Unit, { size, diagonal, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
13
13
|
size?: number;
|
|
14
14
|
diagonal?: boolean;
|
|
15
15
|
fill?: string;
|
|
@@ -19,7 +19,7 @@ export declare function DirectionalPad(self: xnew.Unit, { size, diagonal, fill,
|
|
|
19
19
|
strokeWidth?: number;
|
|
20
20
|
strokeLinejoin?: string;
|
|
21
21
|
}): void;
|
|
22
|
-
export declare function TouchButton(self:
|
|
22
|
+
export declare function TouchButton(self: Unit, { size, fill, fillOpacity, stroke, strokeOpacity, strokeWidth, strokeLinejoin }?: {
|
|
23
23
|
size?: number | undefined;
|
|
24
24
|
fill?: string | undefined;
|
|
25
25
|
fillOpacity?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function DragFrame(frame:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function DragFrame(frame: Unit, { x, y }?: {
|
|
3
3
|
x?: number;
|
|
4
4
|
y?: number;
|
|
5
5
|
}): void;
|
|
6
|
-
export declare function DragTarget(target:
|
|
6
|
+
export declare function DragTarget(target: Unit, {}?: {}): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function InputFrame(frame:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function InputFrame(frame: Unit, {}?: {}): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function KeyboardEvent(unit:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function KeyboardEvent(unit: Unit): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function ModalFrame(frame:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function ModalFrame(frame: Unit, { duration, easing }?: {
|
|
3
3
|
duration?: number;
|
|
4
4
|
easing?: string;
|
|
5
5
|
}): {
|
|
6
6
|
close(): void;
|
|
7
7
|
};
|
|
8
|
-
export declare function ModalContent(content:
|
|
8
|
+
export declare function ModalContent(content: Unit, { background }?: {
|
|
9
9
|
background?: string;
|
|
10
10
|
}): {
|
|
11
11
|
transition({ element, rate }: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function PointerEvent(unit:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function PointerEvent(unit: Unit): void;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function ResizeEvent(resize: Unit): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function Screen(screen:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function Screen(screen: Unit, { width, height, fit }?: {
|
|
3
3
|
width?: number | undefined;
|
|
4
4
|
height?: number | undefined;
|
|
5
5
|
fit?: string | undefined;
|
|
6
6
|
}): {
|
|
7
|
-
readonly canvas:
|
|
7
|
+
readonly canvas: import("../core/unit").UnitElement;
|
|
8
8
|
resize(width: number, height: number): void;
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function TabFrame(frame:
|
|
1
|
+
import { Unit } from '../core/unit';
|
|
2
|
+
export declare function TabFrame(frame: Unit, { select }?: {
|
|
3
3
|
select?: string;
|
|
4
4
|
}): void;
|
|
5
|
-
export declare function TabButton(button:
|
|
5
|
+
export declare function TabButton(button: Unit, { key }?: {
|
|
6
6
|
key?: string;
|
|
7
7
|
}): {
|
|
8
8
|
select({ element }: {
|
|
@@ -12,7 +12,7 @@ export declare function TabButton(button: xnew.Unit, { key }?: {
|
|
|
12
12
|
element: HTMLElement;
|
|
13
13
|
}): void;
|
|
14
14
|
};
|
|
15
|
-
export declare function TabContent(content:
|
|
15
|
+
export declare function TabContent(content: Unit, { key }?: {
|
|
16
16
|
key?: string;
|
|
17
17
|
}): {
|
|
18
18
|
select({ element }: {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export declare class Ticker {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
static ticker(): void;
|
|
6
|
-
static set(callback: (time: number) => void): void;
|
|
7
|
-
static clear(callback: (time: number) => void): void;
|
|
2
|
+
private id;
|
|
3
|
+
constructor(callback: Function);
|
|
4
|
+
clear(): void;
|
|
8
5
|
}
|
|
9
6
|
export declare class Timer {
|
|
10
7
|
private timeout;
|
|
@@ -15,7 +12,7 @@ export declare class Timer {
|
|
|
15
12
|
private time;
|
|
16
13
|
private offset;
|
|
17
14
|
private status;
|
|
18
|
-
private visibilitychange
|
|
15
|
+
private visibilitychange;
|
|
19
16
|
private ticker;
|
|
20
17
|
constructor(timeout: Function, transition: Function | null, delay: number, loop?: boolean);
|
|
21
18
|
clear(): void;
|