小编Din*_*ino的帖子

我可以使用D3.js创建流程图(无树形图)

我可以创建这样的流程图: 在此输入图像描述

使用D3.js库从json对象开始?

json结构应该是什么样的?

你有任何我可以分析的例子吗?

非常感谢你.

flowchart d3.js

29
推荐指数
3
解决办法
5万
查看次数

AWS:certbot-auto 不再支持您的系统

尝试使用 certbot 在 Amazon Linux 2 上更新 letsencript,我收到以下消息:

certbot-auto 不再支持您的系统。无法安装 Certbot。

我完全迷失了,我不知道该怎么办。我找不到任何提供解决方案的详尽文档。

amazon-web-services certbot

19
推荐指数
3
解决办法
2万
查看次数

三个js:我的点是可见的还是被遮挡的?

我在空间中有一个点在三个 js 查看器中表达一个向量。附加到这一点有一个“HTML 注释”

可见注释

当该点不可见时(在同一网格的其他表面后面或被其他网格隐藏),我想隐藏它。例如,在下图中,它应该被隐藏:

应该是不可见的

我正在使用一些代码来检查注释是否在另一个问题中建议的截锥体中,但这并不完全有效,因为只有当我非常大幅度地旋转对象时注释才会消失。见下图:

现在不可见

你能帮我解决我的问题吗?

到目前为止我的代码是:

const vector = new THREE.Vector3(x, y, z);

this.aCamera.updateMatrix();
this.aCamera.updateMatrixWorld(true);

let frustum = new THREE.Frustum();
frustum.setFromMatrix(new THREE.Matrix4().multiplyMatrices(this.aCamera.projectionMatrix, this.aCamera.matrixWorldInverse));

  // check if annotation is in view
  if (frustum.containsPoint(vector)) {
       anAnnotation.css({opacity: 0});
  } else {
        anAnnotation.css({opacity: 1});
  }
Run Code Online (Sandbox Code Playgroud)

visibility occlusion-culling three.js

5
推荐指数
1
解决办法
2555
查看次数

三个js角度:属性“dispose”在类型“Material |”上不存在 材料[]'

我有一个 Angular 6.0.5,运行三个。

全部使用三个版本 0.89.0 和 @types/三个版本 0.84.3

我已经更新到三个版本0.93.0和@types/三个版本0.92.5

现在一切都坏了。我收到以下错误:

Property 'dispose' does not exist on type 'Material | Material[]'.

Property 'dispose' does not exist on type 'Material[]'.
Run Code Online (Sandbox Code Playgroud)

Property 'clippingPlanes' does not exist on type 'Material | 
Material[]'.
Property 'clippingPlanes' does not exist on type 'Material[]'.
Run Code Online (Sandbox Code Playgroud)

Property 'clippingPlanes' does not exist on type 'Material | 
Material[]'.

Property 'clippingPlanes' does not exist on type 'Material[]'.
Run Code Online (Sandbox Code Playgroud)

Argument of type '{ shading: Shading; side: Side; shininess: number; 
color: number; transparent: …
Run Code Online (Sandbox Code Playgroud)

types three.js angular

5
推荐指数
1
解决办法
2326
查看次数

三.js 光从相机直接照射到物体

在我的三个 js 设置中,我对定向光进行了以下设置:

private aLight: THREE.DirectionalLight;

this.aLight = new THREE.DirectionalLight(0xffffff, 1.0);
this.aLight.position.set(-5, 5, 5);

this.aScene.add(this.aLight);
Run Code Online (Sandbox Code Playgroud)

为了让光线跟随我的相机并始终照亮我的网格,我在渲染函数中设置了以下内容:private onRender() {

this.aLight.position.copy(this.aCamera.getWorldPosition());

window.requestAnimationFrame(_ => this.onRender());
this.aRenderer.render(this.aScene, this.aCamera);
Run Code Online (Sandbox Code Playgroud)

现在,物体总是被照亮:

在此处输入图片说明 在此处输入图片说明

但是如果我放大面向相机的表面是暗的:

在此处输入图片说明

我想让我的光总是从我的相机指向物体。我究竟做错了什么?

camera three.js directional-light

2
推荐指数
1
解决办法
1805
查看次数

Angular 2从父级调用子组件方法

我试图使用StackOverflow中建议的不同方法,但我无法完成以下工作.

我有一个嵌套的ChildComponent到ParentComponent.

这里是父母的HTML:

<div> ... <div>

<span *ngIf="value" class="option-button cursor-pointer" [attr.modelURL]="value"
      (click)="$event.stopPropagation();getParts(assemblyLibrary)">
    <i class="fa fa-cube"></i>
</span>

<child-component></child-component>
Run Code Online (Sandbox Code Playgroud)

显然,我已将子组件导入父组件:

import { SharedModule } from '../../shared'; //child declaration is inside here
Run Code Online (Sandbox Code Playgroud)

在父组件中,我正在实现以下代码:

import { child-component } from '../../../child-component';

@Component({
    selector: 'parent-component',
    templateUrl: './parent-component.html',
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class ParentComponent implements OnChanges, OnInit {
    ...

    @ViewChild('ChildComponent') childComponent;

    openDialog(filesToLoad) {
        this.childComponent.openDialog(filesToLoad);
    }

    getParts(value) {
        this.filesToLoad = [];

        ... code to populate files to load

        this.openDialog(this.filesToLoad);
    }}
}
Run Code Online (Sandbox Code Playgroud)

当我通过单击我的HTML中声明的方式调用getParts(value)时,我收到以下错误:

VM21157:55 EXCEPTION:无法读取未定义的属性'openDialog'

许多用户建议这种方法有什么问题?

methods parent-child angular

2
推荐指数
1
解决办法
3943
查看次数