Skip to content

Commit

Permalink
Merge pull request #365 from makimenko/three-1.127.0
Browse files Browse the repository at this point in the history
Upgrade three.js 1.127.0
  • Loading branch information
makimenko authored Apr 12, 2021
2 parents 915de03 + d4d49e7 commit 8a4ca7a
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 21 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dagre": "^0.8.5",
"rxjs": "^6.6.7",
"snyk": "^1.518.0",
"three": "^0.126.1",
"three": "^0.127.0",
"uuid": "^8.3.2",
"yaml": "^1.10.2",
"zone.js": "~0.11.4"
Expand Down
5 changes: 1 addition & 4 deletions projects/atft/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "atft",
"version": "1.4.16",
"version": "1.4.19",
"description": "Ready-to-use Angular components for Three.js, see https://makimenko.github.io/angular-template-for-threejs/.",
"keywords": [
"threejs",
Expand Down Expand Up @@ -33,9 +33,6 @@
}
],
"peerDependencies": {
"@angular/common": "^11.2.7",
"@angular/core": "^11.2.7",
"three": "^0.126.1"
},
"dependencies": {
"tslib": "^2.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Subscription} from 'rxjs';
providers: [provideParent(DagreCompositionComponent)],
template: `
<atft-plane-mesh *ngIf="border!='frame'" atft-raycaster-group [width]="width" [height]="height" [materialColor]="color"
[depthWrite]="false"
[depthWrite]="true"
(mouseEnter)="onSelected()"
(mouseExit)="onDeselected()">
<atft-text-mesh [centered]="true" [text]="label" size="3" [translateY]="translateLabelY"
Expand All @@ -20,7 +20,7 @@ import {Subscription} from 'rxjs';
</atft-plane-mesh>
<atft-frame-mesh *ngIf="border=='frame'" [sizeX]="width" [sizeY]="height" [thickness]="2" [materialColor]="color"
[depthWrite]="false"
[depthWrite]="true"
atft-raycaster-group (mouseEnter)="onSelected()" (mouseExit)="onDeselected()">
<atft-text-mesh [centered]="true" [text]="label" size="3" [translateY]="translateLabelY"
materialColor="0xE0E0E0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class DagreEdgeComponent extends LineConnectorComponent implements OnInit
color: appliedColor(this.materialColor),
opacity: this.opacity,
transparent: this.opacity < 1,
depthWrite: false
depthWrite: true
});

// 2. Create start
Expand Down Expand Up @@ -221,7 +221,7 @@ export class DagreEdgeComponent extends LineConnectorComponent implements OnInit
edge.points.forEach(p => {
if (!Number.isNaN(p.x) && !Number.isNaN(p.y)) {
// console.log('x=' + p.x + ', y=' + p.y);
this.positions.push(p.x, p.y, 0);
this.positions.push(p.x, p.y, 0.1);
}
});
this.updateEnds(this.positions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { AbstractServerActor } from './abstract-server-actor';
<atft-text-mesh [text]="label" [size]="2" [bevelEnabled]="false" height="0" [centered]="true"
material="basic" materialColor="0xDADADA" [translateY]="-11" [translateZ]="0.1"
[depthWrite]="false">
[depthWrite]="true">
</atft-text-mesh>
<atft-frame-mesh *ngIf="showFrame" [thickness]="1" [sizeX]="15" [sizeY]="15" [translateZ]="0.2" material="basic"
[depthWrite]="true" [materialColor]="color">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {AbstractServerActor} from './abstract-server-actor';
<atft-video-mesh *ngIf="videoSrc" height="11.25" width="20" translateZ="0.6" [videoSrc]="videoSrc">
</atft-video-mesh>
<atft-box-mesh *ngIf="!videoSrc" height="11.25" width="20" depth="0" translateZ="0.6" materialColor="0xffffff"
[depthWrite]="false" >
[depthWrite]="true" >
</atft-box-mesh>
</atft-box-mesh>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class LineConnectorComponent extends AbstractConnector<Line2> implements
gapSize: this.gapSize,
opacity: this.opacity,
transparent: this.opacity < 1,
depthWrite: false
depthWrite: true
});
this.matLine.resolution.set(window.innerWidth, window.innerHeight);
if (!this.solid) {
Expand Down
3 changes: 2 additions & 1 deletion projects/atft/src/lib/object/loader/svg-loader.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class SVGLoaderComponent extends AbstractModelLoader {
material = 'basic';

@Input()
depthWrite = false;
depthWrite = true;

@Input()
maxX: number;
Expand Down Expand Up @@ -92,6 +92,7 @@ export class SVGLoaderComponent extends AbstractModelLoader {
}
}


if (this.maxX || this.maxY) {
scaleToFit(group, new THREE.Vector3(this.maxX, this.maxY, 0));
}
Expand Down
2 changes: 1 addition & 1 deletion projects/atft/src/lib/object/text/text-mesh.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class TextMeshComponent extends AbstractLazyObject3D {
receiveShadow = true;

@Input()
depthWrite = false;
depthWrite = true;

@Input()
centered = true;
Expand Down

0 comments on commit 8a4ca7a

Please sign in to comment.