three-base 2.0.43 → 2.0.44
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/ThreeBase.d.ts +1 -1
- package/ThreeBase.js +2 -3
- package/ThreeBase.ts +3 -4
- package/package.json +1 -1
package/ThreeBase.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
52
52
|
needRender: boolean;
|
|
53
53
|
stopRender(): void;
|
|
54
54
|
hasStrokeOrPass(): boolean;
|
|
55
|
-
render():
|
|
55
|
+
render(): void;
|
|
56
56
|
private renderBindThis;
|
|
57
57
|
download(fileName?: string): void;
|
|
58
58
|
private _preMesh;
|
package/ThreeBase.js
CHANGED
|
@@ -355,7 +355,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
355
355
|
// canvas 没有在页面上面的话 就停止渲染
|
|
356
356
|
if (!threeUtils.inDocument(this.renderer.domElement)) {
|
|
357
357
|
this.stopRender();
|
|
358
|
-
return
|
|
358
|
+
return;
|
|
359
359
|
}
|
|
360
360
|
//透视相机和正交相机参数的时时转换
|
|
361
361
|
if (this.cameraType === "perspectiveCamera") {
|
|
@@ -384,7 +384,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
384
384
|
this.threeMouse.dispatchEvent();
|
|
385
385
|
// 在不自动渲染时, needRender=false 就跳过渲染
|
|
386
386
|
if (!this.autoRender && !this.needRender) {
|
|
387
|
-
return
|
|
387
|
+
return; // 标识未渲染
|
|
388
388
|
}
|
|
389
389
|
this.needRender = false;
|
|
390
390
|
if (this.controls.enabled) {
|
|
@@ -411,7 +411,6 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
this.dispatchEvent({ type: "afterRender" });
|
|
414
|
-
return true; // 标识已渲染
|
|
415
414
|
}
|
|
416
415
|
renderBindThis = this.render.bind(this);
|
|
417
416
|
// 下载渲染图
|
package/ThreeBase.ts
CHANGED
|
@@ -424,11 +424,11 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
// 渲染场景
|
|
427
|
-
render()
|
|
427
|
+
render() {
|
|
428
428
|
// canvas 没有在页面上面的话 就停止渲染
|
|
429
429
|
if (!threeUtils.inDocument(this.renderer.domElement)) {
|
|
430
430
|
this.stopRender();
|
|
431
|
-
return
|
|
431
|
+
return;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
//透视相机和正交相机参数的时时转换
|
|
@@ -461,7 +461,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
461
461
|
|
|
462
462
|
// 在不自动渲染时, needRender=false 就跳过渲染
|
|
463
463
|
if (!this.autoRender && !this.needRender) {
|
|
464
|
-
return
|
|
464
|
+
return; // 标识未渲染
|
|
465
465
|
}
|
|
466
466
|
this.needRender = false;
|
|
467
467
|
|
|
@@ -495,7 +495,6 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
this.dispatchEvent({ type: "afterRender" } as never);
|
|
498
|
-
return true; // 标识已渲染
|
|
499
498
|
}
|
|
500
499
|
|
|
501
500
|
private renderBindThis = this.render.bind(this);
|