playcanvas 1.64.2 → 1.64.3
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/build/playcanvas-extras.js +1 -1
- package/build/playcanvas-extras.mjs/exporters/core-exporter.js +1 -1
- package/build/playcanvas-extras.mjs/exporters/gltf-exporter.js +1 -1
- package/build/playcanvas-extras.mjs/exporters/usdz-exporter.js +1 -1
- package/build/playcanvas-extras.mjs/index.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/cpu-timer.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/gpu-timer.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/graph.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/mini-stats.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/render2d.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/stats-timer.js +1 -1
- package/build/playcanvas-extras.mjs/mini-stats/word-atlas.js +1 -1
- package/build/playcanvas.d.ts +45 -42
- package/build/playcanvas.dbg.js +153 -137
- package/build/playcanvas.dbg.mjs/core/core.js +2 -2
- package/build/playcanvas.dbg.mjs/core/preprocessor.js +38 -8
- package/build/playcanvas.dbg.mjs/framework/asset/asset-registry.js +81 -112
- package/build/playcanvas.dbg.mjs/framework/asset/asset.js +2 -2
- package/build/playcanvas.dbg.mjs/framework/parsers/glb-parser.js +12 -11
- package/build/playcanvas.dbg.mjs/platform/graphics/shader-chunks/frag/gles3.js +15 -1
- package/build/playcanvas.dbg.mjs/platform/graphics/shader.js +2 -2
- package/build/playcanvas.dbg.mjs/platform/graphics/webgl/webgl-render-target.js +3 -3
- package/build/playcanvas.js +92 -91
- package/build/playcanvas.min.js +2 -2
- package/build/playcanvas.min.mjs/core/core.js +1 -1
- package/build/playcanvas.min.mjs/core/preprocessor.js +1 -1
- package/build/playcanvas.min.mjs/framework/asset/asset-registry.js +1 -1
- package/build/playcanvas.min.mjs/framework/parsers/glb-parser.js +1 -1
- package/build/playcanvas.min.mjs/platform/graphics/shader-chunks/frag/gles3.js +1 -1
- package/build/playcanvas.min.mjs/platform/graphics/shader.js +1 -1
- package/build/playcanvas.min.mjs/platform/graphics/webgl/webgl-render-target.js +1 -1
- package/build/playcanvas.mjs/core/core.js +2 -2
- package/build/playcanvas.mjs/core/preprocessor.js +19 -4
- package/build/playcanvas.mjs/framework/asset/asset-registry.js +43 -72
- package/build/playcanvas.mjs/framework/parsers/glb-parser.js +9 -8
- package/build/playcanvas.mjs/platform/graphics/shader-chunks/frag/gles3.js +14 -0
- package/build/playcanvas.mjs/platform/graphics/shader.js +1 -1
- package/build/playcanvas.mjs/platform/graphics/webgl/webgl-render-target.js +2 -2
- package/build/playcanvas.prf.js +92 -91
- package/build/playcanvas.prf.mjs/core/core.js +2 -2
- package/build/playcanvas.prf.mjs/core/preprocessor.js +19 -4
- package/build/playcanvas.prf.mjs/framework/asset/asset-registry.js +43 -72
- package/build/playcanvas.prf.mjs/framework/parsers/glb-parser.js +9 -8
- package/build/playcanvas.prf.mjs/platform/graphics/shader-chunks/frag/gles3.js +14 -0
- package/build/playcanvas.prf.mjs/platform/graphics/shader.js +1 -1
- package/build/playcanvas.prf.mjs/platform/graphics/webgl/webgl-render-target.js +2 -2
- package/package.json +1 -1
- package/scripts/parsers/vox-parser.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* PlayCanvas Engine v1.64.
|
|
3
|
+
* PlayCanvas Engine v1.64.3 revision 5a45c53b5
|
|
4
4
|
* Copyright 2011-2023 PlayCanvas Ltd. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
import { Texture, PIXELFORMAT_RGBA8, FILTER_LINEAR, ADDRESS_CLAMP_TO_EDGE, RenderTarget, createShaderFromCode, BlendState, drawQuadWithShader } from 'playcanvas';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* PlayCanvas Engine v1.64.
|
|
3
|
+
* PlayCanvas Engine v1.64.3 revision 5a45c53b5
|
|
4
4
|
* Copyright 2011-2023 PlayCanvas Ltd. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
import { VertexFormat, SEMANTIC_POSITION, TYPE_FLOAT32, SEMANTIC_TEXCOORD0, shaderChunks, VertexBuffer, BUFFER_STREAM, IndexBuffer, INDEXFORMAT_UINT16, BUFFER_STATIC, BlendState, BLENDEQUATION_ADD, BLENDMODE_SRC_ALPHA, BLENDMODE_ONE_MINUS_SRC_ALPHA, BLENDMODE_ONE, PRIMITIVE_TRIANGLES, CULLFACE_NONE, DepthState } from 'playcanvas';
|
package/build/playcanvas.d.ts
CHANGED
|
@@ -18736,9 +18736,9 @@ declare class Asset extends EventHandler {
|
|
|
18736
18736
|
/**
|
|
18737
18737
|
* The asset registry that this Asset belongs to.
|
|
18738
18738
|
*
|
|
18739
|
-
* @type {import('./asset-registry.js').AssetRegistry}
|
|
18739
|
+
* @type {import('./asset-registry.js').AssetRegistry|null}
|
|
18740
18740
|
*/
|
|
18741
|
-
registry: AssetRegistry;
|
|
18741
|
+
registry: AssetRegistry | null;
|
|
18742
18742
|
/**
|
|
18743
18743
|
* The file details or null if no file.
|
|
18744
18744
|
*
|
|
@@ -19105,17 +19105,6 @@ declare class ResourceLoader {
|
|
|
19105
19105
|
destroy(): void;
|
|
19106
19106
|
}
|
|
19107
19107
|
|
|
19108
|
-
declare class TagsCache {
|
|
19109
|
-
constructor(key?: any);
|
|
19110
|
-
_index: {};
|
|
19111
|
-
_key: any;
|
|
19112
|
-
addItem(item: any): void;
|
|
19113
|
-
removeItem(item: any): void;
|
|
19114
|
-
add(tag: any, item: any): void;
|
|
19115
|
-
remove(tag: any, item: any): void;
|
|
19116
|
-
find(args: any): any[];
|
|
19117
|
-
}
|
|
19118
|
-
|
|
19119
19108
|
/**
|
|
19120
19109
|
* Callback used by {@link AssetRegistryfilter } to filter assets.
|
|
19121
19110
|
*/
|
|
@@ -19154,18 +19143,34 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19154
19143
|
* load the asset files.
|
|
19155
19144
|
*/
|
|
19156
19145
|
constructor(loader: ResourceLoader);
|
|
19157
|
-
|
|
19158
|
-
|
|
19159
|
-
|
|
19160
|
-
|
|
19161
|
-
|
|
19162
|
-
|
|
19146
|
+
/**
|
|
19147
|
+
* @type {Set<Asset>}
|
|
19148
|
+
* @private
|
|
19149
|
+
*/
|
|
19150
|
+
private _assets;
|
|
19151
|
+
/**
|
|
19152
|
+
* @type {Map<number, Asset>}
|
|
19153
|
+
* @private
|
|
19154
|
+
*/
|
|
19155
|
+
private _idToAsset;
|
|
19156
|
+
/**
|
|
19157
|
+
* @type {Map<string, Asset>}
|
|
19158
|
+
* @private
|
|
19159
|
+
*/
|
|
19160
|
+
private _urlToAsset;
|
|
19161
|
+
/**
|
|
19162
|
+
* Index for looking up by tags.
|
|
19163
|
+
*
|
|
19164
|
+
* @private
|
|
19165
|
+
*/
|
|
19166
|
+
private _tags;
|
|
19163
19167
|
/**
|
|
19164
19168
|
* A URL prefix that will be added to all asset loading requests.
|
|
19165
19169
|
*
|
|
19166
|
-
* @type {string}
|
|
19170
|
+
* @type {string|null}
|
|
19167
19171
|
*/
|
|
19168
|
-
prefix: string;
|
|
19172
|
+
prefix: string | null;
|
|
19173
|
+
_loader: ResourceLoader;
|
|
19169
19174
|
/**
|
|
19170
19175
|
* Fired when an asset completes loading.
|
|
19171
19176
|
*
|
|
@@ -19289,7 +19294,7 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19289
19294
|
* @param {object} filters - Properties to filter on, currently supports: 'preload: true|false'.
|
|
19290
19295
|
* @returns {Asset[]} The filtered list of assets.
|
|
19291
19296
|
*/
|
|
19292
|
-
list(filters
|
|
19297
|
+
list(filters?: object): Asset[];
|
|
19293
19298
|
/**
|
|
19294
19299
|
* Add an asset to the registry.
|
|
19295
19300
|
*
|
|
@@ -19315,20 +19320,20 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19315
19320
|
* Retrieve an asset from the registry by its id field.
|
|
19316
19321
|
*
|
|
19317
19322
|
* @param {number} id - The id of the asset to get.
|
|
19318
|
-
* @returns {Asset} The asset.
|
|
19323
|
+
* @returns {Asset|undefined} The asset.
|
|
19319
19324
|
* @example
|
|
19320
19325
|
* const asset = app.assets.get(100);
|
|
19321
19326
|
*/
|
|
19322
|
-
get(id: number): Asset;
|
|
19327
|
+
get(id: number): Asset | undefined;
|
|
19323
19328
|
/**
|
|
19324
19329
|
* Retrieve an asset from the registry by its file's URL field.
|
|
19325
19330
|
*
|
|
19326
19331
|
* @param {string} url - The url of the asset to get.
|
|
19327
|
-
* @returns {Asset} The asset.
|
|
19332
|
+
* @returns {Asset|undefined} The asset.
|
|
19328
19333
|
* @example
|
|
19329
19334
|
* const asset = app.assets.getByUrl("../path/to/image.jpg");
|
|
19330
19335
|
*/
|
|
19331
|
-
getByUrl(url: string): Asset;
|
|
19336
|
+
getByUrl(url: string): Asset | undefined;
|
|
19332
19337
|
/**
|
|
19333
19338
|
* Load the asset's file from a remote source. Listen for "load" events on the asset to find
|
|
19334
19339
|
* out when it is loaded.
|
|
@@ -19377,7 +19382,7 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19377
19382
|
* @param {LoadAssetCallback} callback - Function called when asset is loaded, passed (err,
|
|
19378
19383
|
* asset), where err is null if no errors were encountered.
|
|
19379
19384
|
* @example
|
|
19380
|
-
* const file =
|
|
19385
|
+
* const file = magicallyObtainAFile();
|
|
19381
19386
|
* app.assets.loadFromUrlAndFilename(URL.createObjectURL(file), "texture.png", "texture", function (err, asset) {
|
|
19382
19387
|
* const texture = asset.resource;
|
|
19383
19388
|
* });
|
|
@@ -19387,17 +19392,6 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19387
19392
|
_loadModel(modelAsset: any, continuation: any): void;
|
|
19388
19393
|
_loadMaterials(modelAsset: any, mapping: any, callback: any): void;
|
|
19389
19394
|
_loadTextures(materialAsset: any, callback: any): void;
|
|
19390
|
-
/**
|
|
19391
|
-
* Return all Assets with the specified name and type found in the registry.
|
|
19392
|
-
*
|
|
19393
|
-
* @param {string} name - The name of the Assets to find.
|
|
19394
|
-
* @param {string} [type] - The type of the Assets to find.
|
|
19395
|
-
* @returns {Asset[]} A list of all Assets found.
|
|
19396
|
-
* @example
|
|
19397
|
-
* const assets = app.assets.findAll("myTextureAsset", "texture");
|
|
19398
|
-
* console.log("Found " + assets.length + " assets called " + name);
|
|
19399
|
-
*/
|
|
19400
|
-
findAll(name: string, type?: string): Asset[];
|
|
19401
19395
|
_onTagAdd(tag: any, asset: any): void;
|
|
19402
19396
|
_onTagRemove(tag: any, asset: any): void;
|
|
19403
19397
|
/**
|
|
@@ -19429,10 +19423,8 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19429
19423
|
* Return `true` to include an asset in the returned array.
|
|
19430
19424
|
* @returns {Asset[]} A list of all Assets found.
|
|
19431
19425
|
* @example
|
|
19432
|
-
* const assets = app.assets.filter(
|
|
19433
|
-
*
|
|
19434
|
-
* });
|
|
19435
|
-
* console.log("Found " + assets.length + " assets, where names contains 'monster'");
|
|
19426
|
+
* const assets = app.assets.filter(asset => asset.name.includes('monster'));
|
|
19427
|
+
* console.log(`Found ${assets.length} assets with a name containing 'monster'`);
|
|
19436
19428
|
*/
|
|
19437
19429
|
filter(callback: FilterAssetCallback): Asset[];
|
|
19438
19430
|
/**
|
|
@@ -19445,6 +19437,17 @@ declare class AssetRegistry extends EventHandler {
|
|
|
19445
19437
|
* const asset = app.assets.find("myTextureAsset", "texture");
|
|
19446
19438
|
*/
|
|
19447
19439
|
find(name: string, type?: string): Asset | null;
|
|
19440
|
+
/**
|
|
19441
|
+
* Return all Assets with the specified name and type found in the registry.
|
|
19442
|
+
*
|
|
19443
|
+
* @param {string} name - The name of the Assets to find.
|
|
19444
|
+
* @param {string} [type] - The type of the Assets to find.
|
|
19445
|
+
* @returns {Asset[]} A list of all Assets found.
|
|
19446
|
+
* @example
|
|
19447
|
+
* const assets = app.assets.findAll('brick', 'texture');
|
|
19448
|
+
* console.log(`Found ${assets.length} texture assets named 'brick'`);
|
|
19449
|
+
*/
|
|
19450
|
+
findAll(name: string, type?: string): Asset[];
|
|
19448
19451
|
}
|
|
19449
19452
|
|
|
19450
19453
|
/**
|