@predy-js/render-interface 0.3.4-beta.62 → 0.3.4-beta.64

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
@@ -2,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.3.4-beta.62
5
+ * Version: v0.3.4-beta.64
6
6
  */
7
7
 
8
8
  'use strict';
@@ -5938,7 +5938,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5938
5938
  return MarsSharedGeometry;
5939
5939
  }(MarsGeometry));
5940
5940
 
5941
- consoleLog('version: ' + "0.3.4-beta.62");
5941
+ consoleLog('version: ' + "0.3.4-beta.64");
5942
5942
  var ModuleMsg = 'RI Package: @predy-js/render-interface';
5943
5943
 
5944
5944
  var RI = /*#__PURE__*/Object.freeze({
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.3.4-beta.62
5
+ * Version: v0.3.4-beta.64
6
6
  */
7
7
 
8
8
  /******************************************************************************
@@ -5934,7 +5934,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5934
5934
  return MarsSharedGeometry;
5935
5935
  }(MarsGeometry));
5936
5936
 
5937
- consoleLog('version: ' + "0.3.4-beta.62");
5937
+ consoleLog('version: ' + "0.3.4-beta.64");
5938
5938
  var ModuleMsg = 'RI Package: @predy-js/render-interface';
5939
5939
 
5940
5940
  var RI = /*#__PURE__*/Object.freeze({
package/dist/statistic.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.3.4-beta.62
5
+ * Version: v0.3.4-beta.64
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -1,7 +1,7 @@
1
1
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
2
2
  import type { TypedArray, vec2 } from '../type';
3
3
  import type { GPUCapability } from '../GPUCapability';
4
- import type { PredyResizeTemplate, SDFImageOptions, SDFImage } from '@predy-js/specification';
4
+ import type { PredyResizeTemplate, SDFImageOptions, SDFImage, SDFString, FontBase } from '@predy-js/specification';
5
5
  import type { ImageBitmapInternal } from './ImageBitmapInternal';
6
6
  import type { PredyVideoDecoder, PredyVideoDecoderConstructor } from './VideoDecoder';
7
7
  import type { ResourcePlatform } from './ResourceInternal';
@@ -53,6 +53,13 @@ export interface PredyNativeInternal {
53
53
  * @param callback 如果传入callback就是异步绘制,否则会直接返回结果
54
54
  */
55
55
  generateSDFImage(options: SDFImageOptions, callback?: renderSDFImageCallback): SDFImage | undefined;
56
+ /**
57
+ * 同步获取一些文本的大小
58
+ * @param lines 文本
59
+ * @param fonts 字体
60
+ * 按照传入的顺序依次返回每个文本的大小。如传入[line1, line2, line3],返回[line1_width, line1_height, line2_width, line2_height, line3_width, line3_height]
61
+ */
62
+ getTextLineSize(lines: SDFString[], fonts: FontBase[]): Float32Array;
56
63
  /**
57
64
  * 下载并且执行脚本文件,此方法会缓存https的脚本内容
58
65
  * 对于http的请求(开发环境),每次都重新请求
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.3.4-beta.62",
3
+ "version": "0.3.4-beta.64",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -1,7 +1,7 @@
1
1
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
2
2
  import type { TypedArray, vec2 } from '../type';
3
3
  import type { GPUCapability } from '../GPUCapability';
4
- import type { PredyResizeTemplate, SDFImageOptions, SDFImage } from '@predy-js/specification';
4
+ import type { PredyResizeTemplate, SDFImageOptions, SDFImage, SDFString, FontBase } from '@predy-js/specification';
5
5
  import type { ImageBitmapInternal } from './ImageBitmapInternal';
6
6
  import type { PredyVideoDecoder, PredyVideoDecoderConstructor } from './VideoDecoder';
7
7
  import type { ResourcePlatform } from './ResourceInternal';
@@ -64,6 +64,15 @@ export interface PredyNativeInternal {
64
64
  * @param callback 如果传入callback就是异步绘制,否则会直接返回结果
65
65
  */
66
66
  generateSDFImage(options: SDFImageOptions, callback?: renderSDFImageCallback): SDFImage | undefined,
67
+
68
+ /**
69
+ * 同步获取一些文本的大小
70
+ * @param lines 文本
71
+ * @param fonts 字体
72
+ * 按照传入的顺序依次返回每个文本的大小。如传入[line1, line2, line3],返回[line1_width, line1_height, line2_width, line2_height, line3_width, line3_height]
73
+ */
74
+ getTextLineSize(lines: SDFString[], fonts: FontBase[]): Float32Array,
75
+
67
76
  /**
68
77
  * 下载并且执行脚本文件,此方法会缓存https的脚本内容
69
78
  * 对于http的请求(开发环境),每次都重新请求