playcanvas 1.46.1 → 1.46.5

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-zh.md CHANGED
@@ -15,6 +15,7 @@ PlayCanvas 是一款使用 HTML5 和 WebGL 技术运行游戏以及其他 3D 内
15
15
 
16
16
  [English](https://github.com/playcanvas/engine/blob/master/README.md)
17
17
  [中文](https://github.com/playcanvas/engine/blob/master/README-zh.md)
18
+ [日本語](https://github.com/playcanvas/engine/blob/master/README-ja.md)
18
19
 
19
20
  ## 项目展示
20
21
 
package/README.md CHANGED
@@ -15,6 +15,7 @@ PlayCanvas is an open-source game engine. It uses HTML5 and WebGL to run games a
15
15
 
16
16
  [English](https://github.com/playcanvas/engine/blob/master/README.md)
17
17
  [中文](https://github.com/playcanvas/engine/blob/master/README-zh.md)
18
+ [日本語](https://github.com/playcanvas/engine/blob/master/README-ja.md)
18
19
 
19
20
  ## Project Showcase
20
21
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * PlayCanvas Engine v1.46.1 revision 49b2ea2e4
3
+ * PlayCanvas Engine v1.46.5 revision e4663ebb2
4
4
  * Copyright 2011-2021 PlayCanvas Ltd. All rights reserved.
5
5
  */
6
6
  (function (global, factory) {
@@ -1896,8 +1896,9 @@ export class AnimComponent extends Component {
1896
1896
  /**
1897
1897
  * Sets the value of a trigger parameter that was defined in the animation components state graph to true.
1898
1898
  * @param name - The name of the parameter to set.
1899
+ * @param [singleFrame] - If true, this trigger will be set back to false at the end of the animation update. Defaults to false.
1899
1900
  */
1900
- setTrigger(name: string): void;
1901
+ setTrigger(name: string, singleFrame?: boolean): void;
1901
1902
  /**
1902
1903
  * Resets the value of a trigger parameter that was defined in the animation components state graph to false.
1903
1904
  * @param name - The name of the parameter to set.
@@ -4811,6 +4812,8 @@ export class ScriptComponentSystem extends ComponentSystem {
4811
4812
  * * {@link SCROLL_MODE_INFINITE}: Content can scroll forever.
4812
4813
  * @property bounceAmount - Controls how far the content should move before bouncing back.
4813
4814
  * @property friction - Controls how freely the content should move if thrown, i.e. By flicking on a phone or by flinging the scroll wheel on a mouse. A value of 1 means that content will stop immediately; 0 means that content will continue moving forever (or until the bounds of the content are reached, depending on the scrollMode).
4815
+ * @property useMouseWheel - Whether to use mouse wheel for scrolling (horizontally and vertically).
4816
+ * @property mouseWheelSensitivity - Mouse wheel horizontal and vertical sensitivity. Only used if useMouseWheel is set. Setting a direction to 0 will disable mouse wheel scrolling in that direction. 1 is a default sensitivity that is considered to feel good. The values can be set higher or lower than 1 to tune the sensitivity. Defaults to [1, 1].
4814
4817
  * @property horizontalScrollbarVisibility - Controls whether the horizontal scrollbar should be visible all the time, or only visible when the content exceeds the size of the viewport.
4815
4818
  * @property verticalScrollbarVisibility - Controls whether the vertical scrollbar should be visible all the time, or only visible when the content exceeds the size of the viewport.
4816
4819
  * @property viewportEntity - The entity to be used as the masked viewport area, within which the content will scroll. This entity must have an ElementGroup component.
@@ -4846,6 +4849,14 @@ export class ScrollViewComponent extends Component {
4846
4849
  * Controls how freely the content should move if thrown, i.e. By flicking on a phone or by flinging the scroll wheel on a mouse. A value of 1 means that content will stop immediately; 0 means that content will continue moving forever (or until the bounds of the content are reached, depending on the scrollMode).
4847
4850
  */
4848
4851
  friction: number;
4852
+ /**
4853
+ * Whether to use mouse wheel for scrolling (horizontally and vertically).
4854
+ */
4855
+ useMouseWheel: boolean;
4856
+ /**
4857
+ * Mouse wheel horizontal and vertical sensitivity. Only used if useMouseWheel is set. Setting a direction to 0 will disable mouse wheel scrolling in that direction. 1 is a default sensitivity that is considered to feel good. The values can be set higher or lower than 1 to tune the sensitivity. Defaults to [1, 1].
4858
+ */
4859
+ mouseWheelSensitivity: Vec2;
4849
4860
  /**
4850
4861
  * Controls whether the horizontal scrollbar should be visible all the time, or only visible when the content exceeds the size of the viewport.
4851
4862
  */
@@ -12200,12 +12211,21 @@ export class ContainerResource {
12200
12211
  /**
12201
12212
  * Instantiates an entity with a render component.
12202
12213
  * @example
12203
- * // load a glb file and instantiate an entity with a model component based on it
12214
+ * // load a glb file and instantiate an entity with a render component based on it
12204
12215
  * app.assets.loadFromUrl("statue.glb", "container", function (err, asset) {
12205
12216
  * var entity = asset.resource.instantiateRenderEntity({
12206
12217
  * castShadows: true
12207
12218
  * });
12208
12219
  * app.root.addChild(entity);
12220
+ *
12221
+ * // find all render components containing mesh instances, and change blend mode on their materials
12222
+ * var renders = entity.findComponents("render");
12223
+ * renders.forEach(function (render) {
12224
+ * render.meshInstances.forEach(function (meshInstance) {
12225
+ * meshInstance.material.blendType = pc.BLEND_MULTIPLICATIVE;
12226
+ * meshInstance.material.update();
12227
+ * });
12228
+ * });
12209
12229
  * });
12210
12230
  * @param [options] - The initialization data for the render component type {@link RenderComponent}.
12211
12231
  * @returns A hierarachy of entities with render components on entities containing renderable geometry.
@@ -16414,9 +16434,10 @@ export function createBox(device: GraphicsDevice, opts?: {
16414
16434
  /**
16415
16435
  * Creates a new forward renderer object.
16416
16436
  * @param graphicsDevice - The graphics device used by the renderer.
16437
+ * @param A - scene for the rendering.
16417
16438
  */
16418
16439
  export class ForwardRenderer {
16419
- constructor(graphicsDevice: GraphicsDevice);
16440
+ constructor(graphicsDevice: GraphicsDevice, A: Scene);
16420
16441
  }
16421
16442
 
16422
16443
  /**