Skip to content

Commit fdfc671

Browse files
PANSTER.DanielPANSTER.Daniel
authored andcommitted
Major Changes in CSS3D gallery
1 parent 344859d commit fdfc671

27 files changed

+39186
-297
lines changed

angular.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
}
2424
],
2525
"styles": [
26-
"styles/styles.css",
2726
"styles/w3.4.10.css",
2827
"styles/css3d-threejs.component.css",
2928
"styles/img-gallery.component.css"
@@ -76,7 +75,6 @@
7675
"tsConfig": "src/tsconfig.spec.json",
7776
"scripts": [],
7877
"styles": [
79-
"styles/styles.css",
8078
"styles/w3.4.10.css",
8179
"styles/css3d-threejs.component.css"
8280
],

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"cannon": "^0.6.1",
3232
"chroma-js": "^1.3.7",
3333
"core-js": "^2.4.1",
34+
"exif-js": "^2.3.0",
3435
"file-system": "^2.2.2",
3536
"filelist_reader": "^1.0.2",
3637
"fs": "0.0.1-security",

src/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ <h3>
66
</div>
77
<code>
88
<a routerLink="" class="w3-bar-item w3-button">About</a>
9-
<a routerLink="cube-threejs" class="w3-bar-item w3-button">Cube - Three.js</a>
10-
<a routerLink="css3d-threejs" class="w3-bar-item w3-button">CSS3D - Three.js</a>
119
<a routerLink="img-gallery" class="w3-bar-item w3-button">Image Gallery - Three.js</a>
10+
<a routerLink="css3d-threejs" class="w3-bar-item w3-button">CSS3D - Three.js</a>
11+
<a routerLink="cube-threejs" class="w3-bar-item w3-button">Cube - Three.js</a>
1212
</code>
1313
</div>
1414

src/app/css3d-threejs/css3d-threejs.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55
<h1>
66
<b>A Three.js - CSS3d showcase with terrain and physics...</b>
77
</h1>
8+
<b>Note: This page is not responsive for mobile screens yet.</b><br>
89
This canvas contains two scenes from
910
<em>THREE.js</em> and two renderer elements, a
1011
<em>WebGLRenderer</em> and a
1112
<em>CSS3DRenderer</em>.
12-
<br> The focus is the integration and handling on the CSS 3d in the scene. Features for this showcase are clickable, highlight,
13+
<br> The focus is the integration and handling on the CSS 3d in the scene. Features for this showcase are
14+
clickable, highlight,
1315
moveable css elements. One drop-down menu is integrated.
14-
<br> Additionally the WebGL scene contains a random generated terrain, light, shadow, camera handling with mouse, physics
15-
with collision detection, tween, object scaling, rotation around a (pivot-)point and a simple particle system. Play with the clickable elements and see whats happen.
16+
<br> Additionally the WebGL scene contains a random generated terrain, light, shadow, camera handling with mouse,
17+
physics
18+
with collision detection, tween, object scaling, rotation around a (pivot-)point and a simple particle system.
19+
Play with the clickable elements and see whats happen.
1620
<br>
1721
<br> A list of used libraries / packages for this angular controller example:
1822
</div>
@@ -33,6 +37,6 @@ <h1>
3337
<!-- canvas here -->
3438
<!--<canvas class="w3-center" #canvasCSS3d (window:resize)="onResize($event)"></canvas>-->
3539
<div class="w3-container">
36-
<div #canvasCSS3d (window:resize)="onResize()"></div>
40+
<div #canvasCSS3d (window:resize)="onResize()"></div>
3741
</div>
3842
</div>

src/app/css3d-threejs/src/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import * as Perlin from 'perlin-noise';
77
import * as Chroma from 'chroma-js';
88
import * as Cannon from 'cannon';
99

10+
11+
/**
12+
*
13+
*
14+
* @enum {number}
15+
*/
1016
enum Texture {
1117
BRICK = "assets/texture/Bricks.jpg",
1218
GAS_BRIGHT = "assets/texture/Gaseous_Bright.jpg",

src/app/cube-threejs/cube-threejs.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<header>
1212
<div class="w3-container ">
1313
<h1><b>A Three.js cube showcase...</b></h1>
14+
<b>Note: This page is not responsive for mobile screens yet.</b><br>
1415
In the canvas below you can play with at least one spinning cube. It's size is set to 1.0 "unitless" length of each edge.<br>
1516
The scene contains a plane below the cubes and a spotlight over it.<br>
1617
In this example the user cannot interact directly with the canvas via keybord or mouse movement.<br>

src/app/home/home.component.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
<h1>
66
<b>3D showcase examples set up on Angular 5, Three.js</b>
77
</h1>
8-
Currently there is an example with rotating cubes and an example with a terrain, CSS3D and pysics developed.
9-
<br> A small game included most features of the examples will be implemented...
8+
Currently there is an example...<br>
9+
... with images in CSS3D as gallery with options<br>
10+
... with a terrain, CSS3D and physics<br>
11+
... with rotating cubes<br>
1012
<br>
1113
</div>
1214

@@ -20,22 +22,22 @@ <h1>
2022
<!-- thumb naming-->
2123
<div class="w3-row">
2224
<div class="w3-col s3 w3-center">
23-
<p>Cube - Three.js</p>
25+
<p>Image Gallery - Three.js</p>
2426
</div>
2527
<div class="w3-col s3 w3-center">
2628
<p>CSS3D - Three.js</p>
2729
</div>
2830
<div class="w3-col s3 w3-center">
29-
<p>Image Gallery - Three.js</p>
31+
<p>Cube - Three.js</p>
3032
</div>
3133
<div class="w3-col s3"></div>
3234
</div>
3335

3436
<!--thumbs-->
3537
<div class="w3-row">
3638
<div class="w3-col s3 w3-center">
37-
<a routerLink="cube-threejs">
38-
<img [src]="imgURL_cube_threejs" alt="" height="150" width="150">
39+
<a routerLink="img-gallery">
40+
<img [src]="imgURL_img_gallery_threejs" alt="" height="150" width="150">
3941
</a>
4042
</div>
4143
<div class="w3-col s3 w3-center">
@@ -44,8 +46,8 @@ <h1>
4446
</a>
4547
</div>
4648
<div class="w3-col s3 w3-center">
47-
<a routerLink="img-gallery">
48-
<img [src]="imgURL_img_gallery_threejs" alt="" height="150" width="150">
49+
<a routerLink="cube-threejs">
50+
<img [src]="imgURL_cube_threejs" alt="" height="150" width="150">
4951
</a>
5052
</div>
5153
<div class="w3-col s6"></div>

src/app/img-gallery/img-gallery.component.html

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,63 @@
55
<h1>
66
<b>A Three.js - CSS3d showcase for an image gallery...</b>
77
</h1>
8+
<b>Note: This page is not responsive for mobile screens yet.</b><br>
89
Here you see an image gallery based on css3d. The photos you see are from the default <em>assets/galleries</em>
910
folder.<br>
10-
On the top left within the canvas you can choose a folder with images to load from. (Note: In some browsers the
11-
<em>webkitDirectory</em> picker may not work :/ .)<br>
12-
On the top right you can choose the presentation layout of the image gallery.
11+
Above the canvas you can download the full gallery, if you want. On the top left within the canvas you have
12+
options for each arrangement.<br>
13+
Hovering (in front of camera) on image show few Exif information.<br>
14+
<!--You can choose a folder with images to load from. (Note: In some browsers the
15+
<em>webkitDirectory</em> picker may not work :/ .)<br>-->
16+
On the left in the menu you can choose an arrangement of the images. Below that you find some gloabl options.<br>
1317
<br>
18+
<em>... implementation not finished yet.</em>
1419
<br>
1520
</div>
1621
</header>
1722
<div class="w3-container">
1823
<!-- Folder Picker (support by chrome, edge, firefox) -->
19-
<!--<input id="imgFolderInput" #imgFolderInputNG type="file" (change)="filesPicked(imgFolderInputNG.files)"
20-
webkitDirectory>-->
24+
<!-- <p> Choose your own gallery folder:
25+
<input #imgFolderInputNG type="file" (change)="filesPicked(imgFolderInputNG.files)" webkitDirectory>
26+
</p> -->
27+
28+
<p> Download Full Gallery (~25 MB):
29+
<input #id_tglFullDefGal (change)="toggleLoadFullDefGal(id_tglFullDefGal.checked)" type="checkbox">
30+
</p>
2131

22-
Load Full Gallery (~25 MB) <input #id_tglFullDefGal (change)="toggleLoadFullDefGal(id_tglFullDefGal.checked)" type="checkbox">
2332

2433
<!-- fixed main layout menu-->
2534
<div class="imgMainMenu">
26-
<button (click)="addOtherStuff($event)">Random</button>
27-
<!-- <button id="sphere">SPHERE</button> -->
28-
<!-- <button id="helix">HELIX</button> -->
29-
<!-- <button id="grid">GRID</button> -->
35+
<p id="menuTitle">Choose arrangement:</p>
36+
<button class="menuMainElement" #btnGrid (click)="arrangeGallery(eArrgmt.GRID)">Grid</button><br>
37+
<!-- <button class="menuMainElement" (click)="arrangeGallery(eArrgmt.TUBE)">Tube</button><br> -->
38+
<!-- <button class="menuMainElement" (click)="arrangeGallery(eArrgmt.CUBE)">Cube</button><br> -->
39+
<button class="menuMainElement" (click)="arrangeGallery(eArrgmt.RANDOM)">Random</button><br>
40+
<p id="menuTitle">Global settings:</p>
41+
<span class="menuMainElement menuChkBx"><input #id_tglCamYawCtrl (change)="toggleCamYawCtrl(id_tglCamYawCtrl.checked)"
42+
type="checkbox" checked> Cam yaw control</span><br>
43+
<span class="menuMainElement menuChkBx"><input #id_tglCamPitchCtrl (change)="toggleCamPitchCtrl(id_tglCamPitchCtrl.checked)"
44+
type="checkbox" unchecked> Cam pitch control</span><br>
45+
<!-- <button class="menuMainElement" (click)="resetPerspective()">Reset perspective</button> -->
46+
</div>
47+
48+
<!-- fixed main layout menu-->
49+
<div class="imgSubMenu">
50+
<p id="menuTitle">Arrangement options:</p>
51+
<!--Use [ngStyle]= / [style.X]= -->
52+
<!--<span [style.display]="gggggetHideState()" class="menuSubElement">Show Line Grid <input #id_tglShowGrid (change)="toggleShowGrid(id_tglShowGrid.checked)" type="checkbox" unchecked></span><br>-->
53+
<!-- use the id / view child reference-->
54+
<p #id_spnShowGrid class="menuSubElement">
55+
<input #id_tglShowGrid (change)="toggleShowGrid(id_tglShowGrid.checked)" type="checkbox" unchecked>
56+
Show Line Grid
57+
</p>
58+
<p #id_spnRangeGridCols class="menuSubElement" style="color: rgba(146, 255, 127, 0.75);">No. of columns: {{id_sldRangeGridCols.value}}<br>
59+
<input #id_sldRangeGridCols (change)="changeSldNumOfCols(id_sldRangeGridCols.value)" type="range" min="1" max="10" value="4" class="slider">
60+
</p>
3061
</div>
3162

3263
<!-- the canvas-->
33-
<div id="canvasImgGal" #canvasImgGal (window:resize)="onResize()"></div>
64+
<div id="canvasImgGal" #canvasImgGal (window:resize)="onResize()" (keyup)="onKey($event)"></div>
3465
</div>
3566

3667

0 commit comments

Comments
 (0)