@onerjs/core 8.35.5 → 8.35.6

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.
@@ -73,7 +73,7 @@ export class TouchCamera extends FreeCamera {
73
73
  // enable touch in mouse input if touch module is not enabled
74
74
  mouse.touchEnabled = !touch;
75
75
  }
76
- else {
76
+ else if (touch) {
77
77
  // allow mouse in touch input if mouse module is not available
78
78
  touch.allowMouse = !mouse;
79
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"touchCamera.js","sourceRoot":"","sources":["../../../../dev/core/src/Cameras/touchCamera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACnD,OAAO,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU;IACvC;;;OAGG;IACH,IAAW,uBAAuB;QAC9B,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACR,OAAO,KAAK,CAAC,uBAAuB,CAAC;QACzC,CAAC;QAED,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAW,uBAAuB,CAAC,KAAa;QAC5C,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACR,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC;QAC1C,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAW,oBAAoB;QAC3B,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACR,OAAO,KAAK,CAAC,oBAAoB,CAAC;QACtC,CAAC;QAED,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAW,oBAAoB,CAAC,KAAa;QACzC,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACR,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC;QACvC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,IAAY,EAAE,QAAiB,EAAE,KAAa;QACtD,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QAEvB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,aAAa,CAAC;IACzB,CAAC;IAED,gBAAgB;IACA,YAAY;QACxB,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACR,6DAA6D;YAC7D,KAAK,CAAC,YAAY,GAAG,CAAC,KAAK,CAAC;QAChC,CAAC;aAAM,CAAC;YACJ,8DAA8D;YAC9D,KAAK,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC;QAC9B,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { FreeCamera } from \"./freeCamera\";\r\nimport type { FreeCameraTouchInput } from \"../Cameras/Inputs/freeCameraTouchInput\";\r\nimport type { FreeCameraMouseInput } from \"../Cameras/Inputs/freeCameraMouseInput\";\r\nimport type { Scene } from \"../scene\";\r\nimport { Vector3 } from \"../Maths/math.vector\";\r\nimport { Node } from \"../node\";\r\n\r\nNode.AddNodeConstructor(\"TouchCamera\", (name, scene) => {\r\n return () => new TouchCamera(name, Vector3.Zero(), scene);\r\n});\r\n\r\n/**\r\n * This represents a FPS type of camera controlled by touch.\r\n * This is like a universal camera minus the Gamepad controls.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\r\n */\r\nexport class TouchCamera extends FreeCamera {\r\n /**\r\n * Defines the touch sensibility for rotation.\r\n * The higher the faster.\r\n */\r\n public get touchAngularSensibility(): number {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n return touch.touchAngularSensibility;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public set touchAngularSensibility(value: number) {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n touch.touchAngularSensibility = value;\r\n }\r\n }\r\n\r\n /**\r\n * Defines the touch sensibility for move.\r\n * The higher the faster.\r\n */\r\n public get touchMoveSensibility(): number {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n return touch.touchMoveSensibility;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public set touchMoveSensibility(value: number) {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n touch.touchMoveSensibility = value;\r\n }\r\n }\r\n\r\n /**\r\n * Instantiates a new touch camera.\r\n * This represents a FPS type of camera controlled by touch.\r\n * This is like a universal camera minus the Gamepad controls.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\r\n * @param name Define the name of the camera in the scene\r\n * @param position Define the start position of the camera in the scene\r\n * @param scene Define the scene the camera belongs to\r\n */\r\n constructor(name: string, position: Vector3, scene?: Scene) {\r\n super(name, position, scene);\r\n this.inputs.addTouch();\r\n\r\n this._setupInputs();\r\n }\r\n\r\n /**\r\n * Gets the current object class name.\r\n * @returns the class name\r\n */\r\n public override getClassName(): string {\r\n return \"TouchCamera\";\r\n }\r\n\r\n /** @internal */\r\n public override _setupInputs() {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n const mouse = <FreeCameraMouseInput>this.inputs.attached[\"mouse\"];\r\n if (mouse) {\r\n // enable touch in mouse input if touch module is not enabled\r\n mouse.touchEnabled = !touch;\r\n } else {\r\n // allow mouse in touch input if mouse module is not available\r\n touch.allowMouse = !mouse;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"touchCamera.js","sourceRoot":"","sources":["../../../../dev/core/src/Cameras/touchCamera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACnD,OAAO,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU;IACvC;;;OAGG;IACH,IAAW,uBAAuB;QAC9B,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACR,OAAO,KAAK,CAAC,uBAAuB,CAAC;QACzC,CAAC;QAED,OAAO,CAAC,CAAC;IACb,CAAC;IAED,IAAW,uBAAuB,CAAC,KAAa;QAC5C,MAAM,KAAK,GAAyB,IAAI,CAAC,MAAM,C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C;QAC9B,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { FreeCamera } from \"./freeCamera\";\r\nimport type { FreeCameraTouchInput } from \"../Cameras/Inputs/freeCameraTouchInput\";\r\nimport type { FreeCameraMouseInput } from \"../Cameras/Inputs/freeCameraMouseInput\";\r\nimport type { Scene } from \"../scene\";\r\nimport { Vector3 } from \"../Maths/math.vector\";\r\nimport { Node } from \"../node\";\r\n\r\nNode.AddNodeConstructor(\"TouchCamera\", (name, scene) => {\r\n return () => new TouchCamera(name, Vector3.Zero(), scene);\r\n});\r\n\r\n/**\r\n * This represents a FPS type of camera controlled by touch.\r\n * This is like a universal camera minus the Gamepad controls.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\r\n */\r\nexport class TouchCamera extends FreeCamera {\r\n /**\r\n * Defines the touch sensibility for rotation.\r\n * The higher the faster.\r\n */\r\n public get touchAngularSensibility(): number {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n return touch.touchAngularSensibility;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public set touchAngularSensibility(value: number) {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n touch.touchAngularSensibility = value;\r\n }\r\n }\r\n\r\n /**\r\n * Defines the touch sensibility for move.\r\n * The higher the faster.\r\n */\r\n public get touchMoveSensibility(): number {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n return touch.touchMoveSensibility;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public set touchMoveSensibility(value: number) {\r\n const touch = <FreeCameraTouchInput>this.inputs.attached[\"touch\"];\r\n if (touch) {\r\n touch.touchMoveSensibility = value;\r\n }\r\n }\r\n\r\n /**\r\n * Instantiates a new touch camera.\r\n * This represents a FPS type of camera controlled by touch.\r\n * This is like a universal camera minus the Gamepad controls.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#universal-camera\r\n * @param name Define the name of the camera in the scene\r\n * @param position Define the start position of the camera in the scene\r\n * @param scene Define the scene the camera belongs to\r\n */\r\n constructor(name: string, position: Vector3, scene?: Scene) {\r\n super(name, position, scene);\r\n this.inputs.addTouch();\r\n\r\n this._setupInputs();\r\n }\r\n\r\n /**\r\n * Gets the current object class name.\r\n * @returns the class name\r\n */\r\n public override getClassName(): string {\r\n return \"TouchCamera\";\r\n }\r\n\r\n /** @internal */\r\n public override _setupInputs() {\r\n const touch = this.inputs.attached[\"touch\"] as FreeCameraTouchInput | undefined;\r\n const mouse = this.inputs.attached[\"mouse\"] as FreeCameraMouseInput | undefined;\r\n if (mouse) {\r\n // enable touch in mouse input if touch module is not enabled\r\n mouse.touchEnabled = !touch;\r\n } else if (touch) {\r\n // allow mouse in touch input if mouse module is not available\r\n touch.allowMouse = !mouse;\r\n }\r\n }\r\n}\r\n"]}
@@ -385,6 +385,10 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
385
385
  overlayColor: Color3;
386
386
  /** Defines alpha to use when rendering overlay */
387
387
  overlayAlpha: number;
388
+ /** Defines alpha to use when rendering internal overlay */
389
+ _internalOverlayAlpha: number;
390
+ /** Defines color to use when rendering internal overlay */
391
+ _internalOverlayColor: Color3;
388
392
  /**
389
393
  * Gets or sets a boolean indicating that this mesh needs to use vertex alpha data to render.
390
394
  * This property is misnamed and should be `useVertexAlpha`. Note that the mesh will be rendered
@@ -669,6 +669,10 @@ export class AbstractMesh extends TransformNode {
669
669
  this.overlayColor = Color3.Red();
670
670
  /** Defines alpha to use when rendering overlay */
671
671
  this.overlayAlpha = 0.5;
672
+ /** Defines alpha to use when rendering internal overlay */
673
+ this._internalOverlayAlpha = 0.5;
674
+ /** Defines color to use when rendering internal overlay */
675
+ this._internalOverlayColor = Color3.Red();
672
676
  /** Gets or sets a boolean indicating that internal octree (if available) can be used to boost submeshes selection (true by default) */
673
677
  this.useOctreeForRenderingSelection = true;
674
678
  /** Gets or sets a boolean indicating that internal octree (if available) can be used to boost submeshes picking (true by default) */