laymur 0.17.1 → 0.17.2
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 +5 -0
- package/dist/core/elements/UIText/UIText.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,11 @@ Peer Dependencies:
|
|
|
33
33
|
* `@lume/kiwi` (^0.4.4)
|
|
34
34
|
* `ferrsign` (^0.0.4)
|
|
35
35
|
|
|
36
|
+
## Live Examples
|
|
37
|
+
|
|
38
|
+
Check out interactive examples and demos at:
|
|
39
|
+
**[https://jango-git.github.io/laymur/](https://jango-git.github.io/laymur/)**
|
|
40
|
+
|
|
36
41
|
## Core Concepts
|
|
37
42
|
|
|
38
43
|
### 1. Layers & Elements
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Matrix3 } from 'three';
|
|
2
|
+
import { createCanvas, createCanvasTexture } from '../../miscellaneous/canvas.js';
|
|
2
3
|
import { UIColor } from '../../miscellaneous/color/UIColor.js';
|
|
3
4
|
import { UIInsets } from '../../miscellaneous/insets/UIInsets.js';
|
|
4
5
|
import { UITextSpan } from '../../miscellaneous/text-span/UITextSpan.js';
|
|
5
6
|
import { UITextStyle } from '../../miscellaneous/text-style/UITextStyle.js';
|
|
6
7
|
import source from '../../shaders/UIImage.glsl.js';
|
|
7
8
|
import { UIElement } from '../UIElement/UIElement.js';
|
|
8
|
-
import { createCanvas, createCanvasTexture } from '../../miscellaneous/canvas.js';
|
|
9
9
|
import { TEXT_DEFAULT_MAX_LINE_WIDTH, TEXT_DEFAULT_RESIZE_MODE, UITextResizeMode } from './UIText.Internal.js';
|
|
10
10
|
import { calculateTextContentParameters, buildTextChunks } from './UIText.Measuring.js';
|
|
11
11
|
import { renderTextLines } from './UIText.Rendering.js';
|
|
@@ -32,7 +32,7 @@ class UIText extends UIElement {
|
|
|
32
32
|
texture: texture,
|
|
33
33
|
textureTransform: new Matrix3(),
|
|
34
34
|
color,
|
|
35
|
-
});
|
|
35
|
+
}, options);
|
|
36
36
|
this._private_contentInternal = [];
|
|
37
37
|
this._private_contentDirty = false;
|
|
38
38
|
this._private_maxLineWidthDirty = false;
|