@mulsense/xnew 0.1.8 → 0.1.10
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 +46 -46
- package/dist/types/audio/audio.d.ts +55 -2
- package/dist/types/audio/loader.d.ts +6 -2
- package/dist/types/basics/Event.d.ts +4 -3
- package/dist/types/basics/Touch.d.ts +9 -8
- package/dist/types/core/time.d.ts +6 -2
- package/dist/types/core/unit.d.ts +41 -10
- package/dist/types/core/xnew.d.ts +11 -21
- package/dist/types/index.d.ts +3 -12
- package/dist/xnew.d.ts +48 -63
- package/dist/xnew.js +375 -400
- package/dist/xnew.mjs +375 -400
- package/package.json +78 -78
- package/dist/addons/xmatter.d.ts +0 -6
- package/dist/addons/xmatter.js +0 -43
- package/dist/addons/xmatter.mjs +0 -38
- package/dist/addons/xpixi.d.ts +0 -10
- package/dist/addons/xpixi.js +0 -99
- package/dist/addons/xpixi.mjs +0 -75
- package/dist/addons/xrapier2d.d.ts +0 -6
- package/dist/addons/xrapier2d.js +0 -69
- package/dist/addons/xrapier2d.mjs +0 -64
- package/dist/addons/xthree.d.ts +0 -9
- package/dist/addons/xthree.js +0 -77
- package/dist/addons/xthree.mjs +0 -53
- package/dist/types/basics/Block.d.ts +0 -24
- package/dist/types/basics/Bullet.d.ts +0 -7
- package/dist/types/basics/ControlPanel.d.ts +0 -7
- package/dist/types/basics/Navigation.d.ts +0 -1
- package/dist/types/basics/Panel.d.ts +0 -6
- package/dist/types/basics/Popup.d.ts +0 -8
- package/dist/types/basics/TabView.d.ts +0 -18
- package/dist/types/basics/Tabs.d.ts +0 -8
- package/dist/types/basics/Transition.d.ts +0 -17
- package/dist/types/basics/WorkSpace.d.ts +0 -16
- package/dist/types/core/util.d.ts +0 -1
- package/dist/types/xnew.d.ts +0 -8
package/dist/addons/xthree.mjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import xnew from '@mulsense/xnew';
|
|
2
|
-
import * as THREE from 'three';
|
|
3
|
-
|
|
4
|
-
var xthree = {
|
|
5
|
-
initialize({ renderer = null, canvas = null, camera = null } = {}) {
|
|
6
|
-
xnew.extend(Root, { renderer, canvas, camera });
|
|
7
|
-
},
|
|
8
|
-
nest(object) {
|
|
9
|
-
xnew.extend(Nest, { object });
|
|
10
|
-
return object;
|
|
11
|
-
},
|
|
12
|
-
get renderer() {
|
|
13
|
-
var _a;
|
|
14
|
-
return (_a = xnew.context('xthree.root')) === null || _a === void 0 ? void 0 : _a.renderer;
|
|
15
|
-
},
|
|
16
|
-
get camera() {
|
|
17
|
-
var _a;
|
|
18
|
-
return (_a = xnew.context('xthree.root')) === null || _a === void 0 ? void 0 : _a.camera;
|
|
19
|
-
},
|
|
20
|
-
get scene() {
|
|
21
|
-
var _a;
|
|
22
|
-
return (_a = xnew.context('xthree.root')) === null || _a === void 0 ? void 0 : _a.scene;
|
|
23
|
-
},
|
|
24
|
-
get canvas() {
|
|
25
|
-
var _a;
|
|
26
|
-
return (_a = xnew.context('xthree.root')) === null || _a === void 0 ? void 0 : _a.canvas;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
function Root(self, { canvas, camera }) {
|
|
30
|
-
const root = {};
|
|
31
|
-
xnew.context('xthree.root', root);
|
|
32
|
-
root.canvas = canvas;
|
|
33
|
-
root.renderer = new THREE.WebGLRenderer({ canvas, alpha: true });
|
|
34
|
-
root.renderer.setClearColor(0x000000, 0);
|
|
35
|
-
root.camera = camera !== null && camera !== void 0 ? camera : new THREE.PerspectiveCamera(45, root.renderer.domElement.width / root.renderer.domElement.height);
|
|
36
|
-
root.scene = new THREE.Scene();
|
|
37
|
-
xnew.context('xthree.object', root.scene);
|
|
38
|
-
self.on('update', () => {
|
|
39
|
-
root.renderer.render(root.scene, root.camera);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function Nest(self, { object }) {
|
|
43
|
-
const parent = xnew.context('xthree.object');
|
|
44
|
-
xnew.context('xthree.object', object);
|
|
45
|
-
if (parent) {
|
|
46
|
-
parent === null || parent === void 0 ? void 0 : parent.add(object);
|
|
47
|
-
self.on('finalize', () => {
|
|
48
|
-
parent === null || parent === void 0 ? void 0 : parent.remove(object);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { xthree as default };
|
|
@@ -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 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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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,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,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 +0,0 @@
|
|
|
1
|
-
export declare function isPlainObject(object: any): boolean;
|