laymur 0.3.7 → 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 CHANGED
@@ -6332,6 +6332,19 @@ class UIFullscreenLayer extends UILayer {
6332
6332
  assertValidNumber(deltaTime, "UIFullscreenLayer.deltaTime");
6333
6333
  super.renderInternal(renderer, deltaTime);
6334
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
+ }
6335
6348
  /**
6336
6349
  * Calculates the scaling factor based on orientation and fixed dimensions.
6337
6350
  *