three-base 2.0.46 → 2.0.47
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.js +1 -1
- package/ThreeBase.ts +1 -1
- package/package.json +1 -1
- package/pass/glow_pass.js +1 -1
- package/pass/glow_pass.ts +1 -1
- package/pass/stroke_pass.js +1 -1
- package/pass/stroke_pass.ts +1 -1
package/ThreeBase.js
CHANGED
|
@@ -405,7 +405,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
405
405
|
this.renderer.render(this.scene, camera);
|
|
406
406
|
if (has_stroke_or_pass) {
|
|
407
407
|
// 查找需要绘制描边的对象,并且绘制描边
|
|
408
|
-
this.scene.
|
|
408
|
+
this.scene.traverseVisible(obj => {
|
|
409
409
|
stroke_pass(this.renderer, camera, obj, this.baseDepthTexture);
|
|
410
410
|
glow_pass(this.renderer, camera, obj, this.baseDepthTexture);
|
|
411
411
|
});
|
package/ThreeBase.ts
CHANGED
|
@@ -488,7 +488,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
488
488
|
|
|
489
489
|
if (has_stroke_or_pass) {
|
|
490
490
|
// 查找需要绘制描边的对象,并且绘制描边
|
|
491
|
-
this.scene.
|
|
491
|
+
this.scene.traverseVisible(obj => {
|
|
492
492
|
stroke_pass(this.renderer, camera, obj, this.baseDepthTexture);
|
|
493
493
|
glow_pass(this.renderer, camera, obj, this.baseDepthTexture);
|
|
494
494
|
});
|
package/package.json
CHANGED
package/pass/glow_pass.js
CHANGED
|
@@ -467,7 +467,7 @@ const scene = new Scene();
|
|
|
467
467
|
// 对象发光
|
|
468
468
|
export default function glow_pass(renderer, camera, object3d, baseDepthTexture) {
|
|
469
469
|
const { glow_enable = false, glow_color = "#04fa12", glow_width = 1, glow_opacity = 1 } = object3d.userData;
|
|
470
|
-
if (!glow_enable || glow_width === 0
|
|
470
|
+
if (!glow_enable || glow_width === 0) {
|
|
471
471
|
return;
|
|
472
472
|
}
|
|
473
473
|
// 保存原帧缓冲区
|
package/pass/glow_pass.ts
CHANGED
|
@@ -486,7 +486,7 @@ export default function glow_pass(renderer: WebGLRenderer, camera: Camera, objec
|
|
|
486
486
|
|
|
487
487
|
const { glow_enable = false, glow_color = "#04fa12", glow_width = 1, glow_opacity = 1 } = object3d.userData;
|
|
488
488
|
|
|
489
|
-
if (!glow_enable || glow_width === 0
|
|
489
|
+
if (!glow_enable || glow_width === 0) {
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
492
|
|
package/pass/stroke_pass.js
CHANGED
|
@@ -463,7 +463,7 @@ const scene = new Scene();
|
|
|
463
463
|
// 对象描边
|
|
464
464
|
export default function stroke_pass(renderer, camera, object3d, baseDepthTexture) {
|
|
465
465
|
const { stroke_enable = false, stroke_color = "#04fa12", stroke_width = 1 } = object3d.userData;
|
|
466
|
-
if (!stroke_enable || stroke_width === 0
|
|
466
|
+
if (!stroke_enable || stroke_width === 0) {
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
469
|
// 保存原帧缓冲区
|
package/pass/stroke_pass.ts
CHANGED
|
@@ -480,7 +480,7 @@ const scene = new Scene();
|
|
|
480
480
|
export default function stroke_pass(renderer: WebGLRenderer, camera: Camera, object3d: Object3D, baseDepthTexture: DepthTexture) {
|
|
481
481
|
|
|
482
482
|
const { stroke_enable = false, stroke_color = "#04fa12", stroke_width = 1 } = object3d.userData;
|
|
483
|
-
if (!stroke_enable || stroke_width === 0
|
|
483
|
+
if (!stroke_enable || stroke_width === 0) {
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
486
|
|