laymur 0.3.6 → 0.3.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/index.js +14 -0
- 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/UIFullscreenLayer.d.ts +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6187,6 +6187,7 @@ class UIText extends UIElement {
|
|
|
6187
6187
|
this._private_texture.dispose();
|
|
6188
6188
|
this._private_texture = new CanvasTexture(this._private_canvas);
|
|
6189
6189
|
this._private_texture.needsUpdate = true;
|
|
6190
|
+
this.sceneWrapper.setUniform(this.planeHandler, "map", this._private_texture);
|
|
6190
6191
|
}
|
|
6191
6192
|
}
|
|
6192
6193
|
|
|
@@ -6331,6 +6332,19 @@ class UIFullscreenLayer extends UILayer {
|
|
|
6331
6332
|
assertValidNumber(deltaTime, "UIFullscreenLayer.deltaTime");
|
|
6332
6333
|
super.renderInternal(renderer, deltaTime);
|
|
6333
6334
|
}
|
|
6335
|
+
/**
|
|
6336
|
+
* Projects a 3D world position to 2D screen coordinates within this layer.
|
|
6337
|
+
*
|
|
6338
|
+
* @param position - The 3D world position to project
|
|
6339
|
+
* @param camera - The camera used for projection
|
|
6340
|
+
* @returns The projected 2D position in layer coordinates
|
|
6341
|
+
*/
|
|
6342
|
+
projectWorldPosition(position, camera) {
|
|
6343
|
+
const projectedPosition = position.project(camera);
|
|
6344
|
+
projectedPosition.x = MathUtils.mapLinear(projectedPosition.x, -1, 1, this.x, this.width);
|
|
6345
|
+
projectedPosition.y = MathUtils.mapLinear(projectedPosition.y, -1, 1, this.y, this.height);
|
|
6346
|
+
return projectedPosition;
|
|
6347
|
+
}
|
|
6334
6348
|
/**
|
|
6335
6349
|
* Calculates the scaling factor based on orientation and fixed dimensions.
|
|
6336
6350
|
*
|