playcanvas 1.47.0 → 1.48.1

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * PlayCanvas Engine v1.47.0 revision 41e3906e3
3
+ * PlayCanvas Engine v1.48.1 revision 89325c656
4
4
  * Copyright 2011-2021 PlayCanvas Ltd. All rights reserved.
5
5
  */
6
6
  (function (global, factory) {
@@ -1708,6 +1708,20 @@ export class AnimComponentLayer {
1708
1708
  * Rebind any animations in the layer to the currently present components and model of the anim components entity.
1709
1709
  */
1710
1710
  rebind(): void;
1711
+ /**
1712
+ * Add a mask to this layer.
1713
+ * @example
1714
+ * entity.anim.baseLayer.assignMask({
1715
+ * // include the spine of the current model and all of it's children
1716
+ * "path/to/spine": {
1717
+ * children: true
1718
+ * },
1719
+ * // include the hip of the current model but not all of it's children
1720
+ * "path/to/hip": true
1721
+ * });
1722
+ * @param [mask] - The mask to assign to the layer. If not provided the current mask in the layer will be removed.
1723
+ */
1724
+ assignMask(mask?: any): void;
1711
1725
  /**
1712
1726
  * Assigns an animation track to a state in the current graph. If a state for the given nodeName doesn't exist, it will be created. If all states nodes are linked and the {@link AnimComponent#activate} value was set to true then the component will begin playing.
1713
1727
  * @param nodeName - The name of the node that this animation should be associated with.
@@ -5191,8 +5205,8 @@ export class SoundComponent extends Component {
5191
5205
  * @property isStopped - Returns true if the slot is currently stopped.
5192
5206
  * @property instances - An array that contains all the {@link SoundInstance}s currently being played by the slot.
5193
5207
  * @param component - The Component that created this slot.
5194
- * @param name - The name of the slot.
5195
- * @param options - Settings for the slot.
5208
+ * @param [name] - The name of the slot. Defaults to 'Untitled'.
5209
+ * @param [options] - Settings for the slot.
5196
5210
  * @param [options.volume = 1] - The playback volume, between 0 and 1.
5197
5211
  * @param [options.pitch = 1] - The relative pitch, default of 1, plays at normal pitch.
5198
5212
  * @param [options.loop = false] - If true the sound will restart when it reaches the end.
@@ -5203,7 +5217,7 @@ export class SoundComponent extends Component {
5203
5217
  * @param [options.asset = null] - The asset id of the audio asset that is going to be played by this slot.
5204
5218
  */
5205
5219
  export class SoundSlot extends EventHandler {
5206
- constructor(component: SoundComponent, name: string, options: {
5220
+ constructor(component: SoundComponent, name?: string, options?: {
5207
5221
  volume?: number;
5208
5222
  pitch?: number;
5209
5223
  loop?: boolean;
@@ -14495,6 +14509,10 @@ export class BasicMaterial extends Material {
14495
14509
  * * {@link BLEND_PREMULTIPLIED}: Similar to {@link BLEND_NORMAL} expect the source fragment is assumed to have already been multiplied by the source alpha value.
14496
14510
  * * {@link BLEND_MULTIPLICATIVE}: Multiply the color of the source fragment by the color of the destination fragment and write the result to the frame buffer.
14497
14511
  * * {@link BLEND_ADDITIVEALPHA}: Same as {@link BLEND_ADDITIVE} except the source RGB is multiplied by the source alpha.
14512
+ * * {@link BLEND_MULTIPLICATIVE2X}: Multiplies colors and doubles the result.
14513
+ * * {@link BLEND_SCREEN}: Softer version of additive.
14514
+ * * {@link BLEND_MIN}: Minimum color. Check app.graphicsDevice.extBlendMinmax for support.
14515
+ * * {@link BLEND_MAX}: Maximum color. Check app.graphicsDevice.extBlendMinmax for support.
14498
14516
  *
14499
14517
  * Defaults to {@link BLEND_NONE}.
14500
14518
  * @property blueWrite - If true, the blue component of fragments generated by the shader of this material is written to
@@ -14579,6 +14597,10 @@ export class Material {
14579
14597
  * {@link BLEND_PREMULTIPLIED}: Similar to {@link BLEND_NORMAL} expect the source fragment is assumed to have already been multiplied by the source alpha value.
14580
14598
  * {@link BLEND_MULTIPLICATIVE}: Multiply the color of the source fragment by the color of the destination fragment and write the result to the frame buffer.
14581
14599
  * {@link BLEND_ADDITIVEALPHA}: Same as {@link BLEND_ADDITIVE} except the source RGB is multiplied by the source alpha.
14600
+ * {@link BLEND_MULTIPLICATIVE2X}: Multiplies colors and doubles the result.
14601
+ * {@link BLEND_SCREEN}: Softer version of additive.
14602
+ * {@link BLEND_MIN}: Minimum color. Check app.graphicsDevice.extBlendMinmax for support.
14603
+ * {@link BLEND_MAX}: Maximum color. Check app.graphicsDevice.extBlendMinmax for support.
14582
14604
 
14583
14605
  Defaults to {@link BLEND_NONE}.
14584
14606
  */
@@ -15917,7 +15939,7 @@ export class Mesh {
15917
15939
  setColors32(colors: number[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array, numVertices?: number): void;
15918
15940
  /**
15919
15941
  * Sets the index array. Indices are stored using 16-bit format by default, unless more than 65535 vertices are specified, in which case 32-bit format is used.
15920
- * @param indices - The array of indicies that define primitives (lines, triangles, etc.).
15942
+ * @param indices - The array of indices that define primitives (lines, triangles, etc.).
15921
15943
  * @param [numIndices] - The number of indices to be used from data array. If not provided, the whole data array is used. This allows to use only part of the data array.
15922
15944
  */
15923
15945
  setIndices(indices: number[] | Uint8Array | Uint16Array | Uint32Array, numIndices?: number): void;