laymur 0.1.72 → 0.2.0
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 +16 -0
- package/dist/Passes/UIPass.d.ts +2 -2
- package/dist/{Builders → builders}/UIConstraint2DBuilder.d.ts +14 -14
- package/dist/{Builders → builders}/UIConstraintContainerBuilder.d.ts +5 -5
- package/dist/{Builders → builders}/UIConstraintStackBuilder.d.ts +7 -7
- package/dist/{Constraints → constraints}/UIAspectConstraint.d.ts +5 -5
- package/dist/{Constraints → constraints}/UIConstraint.d.ts +3 -3
- package/dist/{Constraints → constraints}/UIConstraintRule.d.ts +1 -1
- package/dist/{Constraints → constraints}/UICoverConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIFitConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIHeightConstraint.d.ts +2 -2
- package/dist/{Constraints → constraints}/UIHorizontalDistanceConstraint.d.ts +7 -7
- package/dist/{Constraints → constraints}/UIHorizontalProportionConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIVerticalDistanceConstraint.d.ts +7 -7
- package/dist/{Constraints → constraints}/UIVerticalProportionConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIWidthConstraint.d.ts +2 -2
- package/dist/{Elements → elements}/UIAnchor.d.ts +5 -6
- package/dist/{Elements → elements}/UIDummy.d.ts +1 -1
- package/dist/{Elements → elements}/UIElement.d.ts +9 -10
- package/dist/{Elements → elements}/UIImage.d.ts +2 -2
- package/dist/{Elements → elements}/UIProgress.d.ts +1 -1
- package/dist/{Elements → elements}/UIScene.d.ts +1 -1
- package/dist/{Elements → elements}/UIText.d.ts +4 -4
- package/dist/index.d.ts +28 -29
- package/dist/index.js +871 -978
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/{Layers → layers}/UILayer.d.ts +20 -21
- package/dist/{Materials → materials}/UIMaterial.d.ts +1 -1
- package/dist/{Miscellaneous → miscellaneous}/UIMicro.d.ts +1 -1
- package/dist/{Miscellaneous → miscellaneous}/asserts.d.ts +3 -3
- package/package.json +16 -12
- package/dist/Miscellaneous/symbols.d.ts +0 -1
- /package/dist/{Constraints → constraints}/UIConstraintPower.d.ts +0 -0
- /package/dist/{Layers → layers}/UIFullScreenLayer.d.ts +0 -0
- /package/dist/{Materials → materials}/UIProgressMaterial.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UIBlending.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UIMode.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UIOrientation.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UITextInterfaces.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/math.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/microTransformationTools.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/textTools.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/threeInstances.d.ts +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import { Constraint, Solver, Variable } from "@lume/kiwi";
|
|
1
2
|
import { Eventail } from "eventail";
|
|
2
|
-
import { Constraint, Solver, Variable } from "kiwi.js";
|
|
3
3
|
import type { Object3D, WebGLRenderer } from "three";
|
|
4
4
|
import { OrthographicCamera, Scene } from "three";
|
|
5
|
-
import type { UIConstraint } from "../
|
|
6
|
-
import { UIAnchor } from "../
|
|
7
|
-
import { UIElement } from "../
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { UIOrientation } from "../Miscellaneous/UIOrientation";
|
|
5
|
+
import type { UIConstraint } from "../constraints/UIConstraint";
|
|
6
|
+
import { UIAnchor } from "../elements/UIAnchor";
|
|
7
|
+
import { UIElement } from "../elements/UIElement";
|
|
8
|
+
import { UIMode } from "../miscellaneous/UIMode";
|
|
9
|
+
import { UIOrientation } from "../miscellaneous/UIOrientation";
|
|
11
10
|
interface VariableDescription {
|
|
12
11
|
strength: number;
|
|
13
12
|
suggestedValue: number;
|
|
@@ -28,10 +27,10 @@ export declare enum UILayerEvent {
|
|
|
28
27
|
}
|
|
29
28
|
export declare abstract class UILayer extends Eventail {
|
|
30
29
|
mode: UIMode;
|
|
31
|
-
readonly [
|
|
32
|
-
readonly [
|
|
33
|
-
readonly [
|
|
34
|
-
readonly [
|
|
30
|
+
readonly ["xInternal"]: Variable;
|
|
31
|
+
readonly ["yInternal"]: Variable;
|
|
32
|
+
readonly ["widthInternal"]: Variable;
|
|
33
|
+
readonly ["heightInternal"]: Variable;
|
|
35
34
|
protected readonly scene: Scene;
|
|
36
35
|
protected readonly camera: OrthographicCamera;
|
|
37
36
|
protected solver?: Solver | undefined;
|
|
@@ -47,16 +46,16 @@ export declare abstract class UILayer extends Eventail {
|
|
|
47
46
|
get width(): number;
|
|
48
47
|
get height(): number;
|
|
49
48
|
destroy(): void;
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
49
|
+
["addUIElementInternal"](element: UIElement | UIAnchor, object?: Object3D, renderOrder?: number): void;
|
|
50
|
+
["removeUIElementInternal"](element: UIElement | UIAnchor): void;
|
|
51
|
+
["addUIConstraintInternal"](constraint: UIConstraint, elements: Set<UIElement | UIAnchor>): void;
|
|
52
|
+
["removeUIConstraintInternal"](constraint: UIConstraint): void;
|
|
53
|
+
["addConstraintInternal"](owner: UIConstraint, constraint: Constraint): void;
|
|
54
|
+
["removeConstraintInternal"](owner: UIConstraint, constraint: Constraint): void;
|
|
55
|
+
["addVariableInternal"](owner: UIElement | UIAnchor | UIConstraint, variable: Variable, strength: number): void;
|
|
56
|
+
["removeVariableInternal"](owner: UIElement | UIAnchor | UIConstraint, variable: Variable): void;
|
|
57
|
+
["suggestVariableInternal"](owner: UIElement | UIAnchor | UIConstraint, variable: Variable, value: number): void;
|
|
58
|
+
["sortInternal"](): void;
|
|
60
59
|
render(renderer: WebGLRenderer, deltaTime: number): void;
|
|
61
60
|
protected clickInternal(x: number, y: number): void;
|
|
62
61
|
protected resizeInternal(width: number, height: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Texture } from "three";
|
|
2
2
|
import { ShaderMaterial } from "three";
|
|
3
|
-
import { UIBlending } from "../
|
|
3
|
+
import { UIBlending } from "../miscellaneous/UIBlending";
|
|
4
4
|
export declare class UIMaterial extends ShaderMaterial {
|
|
5
5
|
constructor(map?: Texture);
|
|
6
6
|
getTexture(): Texture | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UIAnchor } from "../
|
|
2
|
-
import type { UIElement } from "../
|
|
3
|
-
import { UILayer } from "../
|
|
1
|
+
import type { UIAnchor } from "../elements/UIAnchor";
|
|
2
|
+
import type { UIElement } from "../elements/UIElement";
|
|
3
|
+
import { UILayer } from "../layers/UILayer";
|
|
4
4
|
export declare function assertSameLayer(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor, message?: string): void;
|
|
5
5
|
export declare function assertSize(width: number, height: number, message?: string): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laymur",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Lightweight Three.js UI toolkit mainly for mobile ads",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
7
7
|
"build": "npm run clean && rollup -c",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"prepublishOnly": "npm run build:prod"
|
|
10
10
|
},
|
|
11
11
|
"main": "dist/index.js",
|
|
12
|
+
"module": "dist/index.js",
|
|
12
13
|
"types": "dist/index.d.ts",
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
@@ -25,7 +26,13 @@
|
|
|
25
26
|
"files": [
|
|
26
27
|
"dist"
|
|
27
28
|
],
|
|
28
|
-
"
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"keywords": [
|
|
31
|
+
"ui",
|
|
32
|
+
"three.js",
|
|
33
|
+
"typescript",
|
|
34
|
+
"3d"
|
|
35
|
+
],
|
|
29
36
|
"author": "jango",
|
|
30
37
|
"license": "MIT",
|
|
31
38
|
"repository": {
|
|
@@ -33,18 +40,15 @@
|
|
|
33
40
|
"url": "https://github.com/jango-git/laymur.git"
|
|
34
41
|
},
|
|
35
42
|
"type": "module",
|
|
36
|
-
"publishConfig": {
|
|
37
|
-
"access": "public"
|
|
38
|
-
},
|
|
39
43
|
"peerDependencies": {
|
|
40
|
-
"three": ">=0.
|
|
44
|
+
"three": ">=0.175.0 <0.180.0"
|
|
41
45
|
},
|
|
42
46
|
"devDependencies": {
|
|
43
47
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
44
48
|
"@rollup/plugin-terser": "^0.4.4",
|
|
45
|
-
"@types/three": "^0.
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^8.32.
|
|
47
|
-
"@typescript-eslint/parser": "^8.32.
|
|
49
|
+
"@types/three": "^0.175.0",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
|
51
|
+
"@typescript-eslint/parser": "^8.32.0",
|
|
48
52
|
"eslint": "^9.26.0",
|
|
49
53
|
"rollup": "^4.40.2",
|
|
50
54
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
@@ -52,7 +56,7 @@
|
|
|
52
56
|
"typescript": "^5.8.3"
|
|
53
57
|
},
|
|
54
58
|
"dependencies": {
|
|
55
|
-
"
|
|
56
|
-
"
|
|
59
|
+
"@lume/kiwi": "^0.4.4",
|
|
60
|
+
"eventail": "^0.2.9"
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|