浏览代码

Fix tile prioritization and image loader.

pull/880/head
Nico Höllerich 4 年前
父节点
当前提交
e2a11da5da
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. +2
    -2
      doc/json-config-parameters.md
  2. +3
    -0
      src/js/libpannellum.js

+ 2
- 2
doc/json-config-parameters.md 查看文件

@@ -452,9 +452,9 @@ This specifies the maximum zoom level.

#### `loader` (function)

Supply a loader function instead of an URL to load tiles.
Supply an async loader function instead of an URL to load tiles.

Input: node, HTMLImageElement. Output: Promise
Input: node, HTMLImageElement. Resolved output: HTMLCanvasElement, ImageBitmap, HTMLImageElement

Node has the following properties: `x` (number), `y` (number),
`level` (number), `vertices` ([[number]]) part of the full image


+ 3
- 0
src/js/libpannellum.js 查看文件

@@ -1900,6 +1900,7 @@ function Renderer(container) {
releaseTextureImageLoader(this);
}).catch(() => {
this.callback(this.texture, false);
releaseTextureImageLoader(this);
});
} else {
this.image.src = src;
@@ -2100,6 +2101,8 @@ function Renderer(container) {
* @param {number} hfov - Horizontal field of view to check at.
*/
function checkMultiresNodeInView(node, yaw, pitch, roll, hfov) {
let v = node.vertices;

// Create rotation matrix
var matrix = identityMatrix3();
matrix = rotateMatrix(matrix, -yaw, 'y');


正在加载...
取消
保存