From de8088f691ce2239a4d7805f5c387649807bd2fd Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Thu, 18 Jul 2019 18:03:16 +0900 Subject: [PATCH 1/3] Installs three.js package --- package-lock.json | 46 +++++++++++++++++++++++++++++++++++----------- package.json | 3 ++- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a57e12..0c405e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2350,7 +2350,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2368,11 +2369,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2385,15 +2388,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2496,7 +2502,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2506,6 +2513,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2518,17 +2526,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2545,6 +2556,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2617,7 +2629,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2627,6 +2640,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2702,7 +2716,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2732,6 +2747,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2749,6 +2765,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2787,11 +2804,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -5071,6 +5090,11 @@ } } }, + "three": { + "version": "0.106.2", + "resolved": "https://registry.npmjs.org/three/-/three-0.106.2.tgz", + "integrity": "sha512-4Tlx43uoxnIaZFW2Bzkd1rXsatvVHEWAZJy8LuE+s6Q8c66ogNnhfq1bHiBKPAnXP230LD11H/ScIZc2LZMviA==" + }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", diff --git a/package.json b/package.json index 0ce23d8..8c93a8f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "react": "^16.8.6", "react-dom": "^16.8.6", "react-images": "^0.5.19", - "react-photo-gallery": "^7.0.2" + "react-photo-gallery": "^7.0.2", + "three": "^0.106.2" }, "devDependencies": {}, "scripts": { From 180508ae13d70aa125e21dd0c74e4b57e468c353 Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Thu, 18 Jul 2019 18:03:28 +0900 Subject: [PATCH 2/3] Adds cinemagraph test boilerplate --- pages/cinemagraphs/test.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pages/cinemagraphs/test.js diff --git a/pages/cinemagraphs/test.js b/pages/cinemagraphs/test.js new file mode 100644 index 0000000..e69de29 From 141a846cfb0b9a202efa8af9aadfc448e14321c2 Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Sun, 22 Aug 2021 17:48:44 -0700 Subject: [PATCH 3/3] last --- .DS_Store | Bin 0 -> 6148 bytes components/gallery.js | 4 +- pages/cinemagraphs/test.js | 49 +++++++++++++++++++++ static/.DS_Store | Bin 0 -> 6148 bytes static/images/.DS_Store | Bin 0 -> 6148 bytes static/images/projects/.DS_Store | Bin 0 -> 8196 bytes static/images/projects/hong-kong/.DS_Store | Bin 0 -> 6148 bytes static/images/projects/maui/.DS_Store | Bin 0 -> 6148 bytes 8 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 static/.DS_Store create mode 100644 static/images/.DS_Store create mode 100644 static/images/projects/.DS_Store create mode 100644 static/images/projects/hong-kong/.DS_Store create mode 100644 static/images/projects/maui/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d1ccaab321d55a6c89fd78f960ff50c36dd0793b GIT binary patch literal 6148 zcmeHKOG-mQ5UkcH0XJE?oGW;PA;c4S0W}d30uf%^zm@0mXjXq*JRVsEH=!DOYNn@a zhN;Et*8pt&wR-?o0G4z|eETpr-*=zcRYe>v&KP#XcK>=f>}R>B0?xg`CtmQ5H%$1q z7;xmq5g*w89n5=VQa}nw0VyB_q`(;pR4rZJopFY!Qa}n^rUL$bXmrP3I3~uYgG00c z#0A4)oJTJ~Y#t!?!ZDE%nkAK(RI3)llFoRmyk0maCLIt+U5@t!?yYy661R-8c^lhbYIy jD92oQIlhmi%xga9elHvogU)!+iTW9EU1U<=zZLie?I0SR literal 0 HcmV?d00001 diff --git a/components/gallery.js b/components/gallery.js index ad7fec7..f9f43e7 100644 --- a/components/gallery.js +++ b/components/gallery.js @@ -3,8 +3,8 @@ import Gallery from "react-photo-gallery"; import Lightbox from "react-images"; export default class PhotoGallery extends React.Component { - constructor() { - super(); + constructor(props) { + super(props); this.state = { currentImage: 0 }; } diff --git a/pages/cinemagraphs/test.js b/pages/cinemagraphs/test.js index e69de29..1d22111 100644 --- a/pages/cinemagraphs/test.js +++ b/pages/cinemagraphs/test.js @@ -0,0 +1,49 @@ +import * as THREE from "three"; +import Globals from "../../components/globals"; + +export default class Test extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + const scene = new THREE.Scene(); + const camera = new THREE.PerspectiveCamera( + 75, + window.innerWidth / window.innerHeight, + 0.1, + 1000 + ); + const renderer = new THREE.WebGLRenderer(); + renderer.setSize(window.innerWidth, window.innerHeight); + // document.body.appendChild( renderer.domElement ); + // use ref as a mount point of the Three.js scene instead of the document.body + this.mount.appendChild(renderer.domElement); + const geometry = new THREE.BoxGeometry(1, 1, 1); + const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 }); + const cube = new THREE.Mesh(geometry, material); + scene.add(cube); + camera.position.z = 5; + const animate = function() { + requestAnimationFrame(animate); + cube.rotation.x += 0.01; + cube.rotation.y += 0.01; + renderer.render(scene, camera); + }; + animate(); + } + + initializeCamera() { + this.camera.position.x = 0; + this.camera.position.y = 0; + this.camera.position.z = 5; + } + + render() { + return ( +
(this.mount = ref)}> + +
+ ); + } +} diff --git a/static/.DS_Store b/static/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6716a24ff335c2232a1c830d863751bae5c23f34 GIT binary patch literal 6148 zcmeHK!A`fM2~y%#sNXZi%Ele@Mcn@2Q}DQ0!>OwXt7bm^f&a6`~rW+ zncc;Npf_U-nMr2eFgvqlUdb-Q7~}1+zsFdGF(yC}3l^Af1lLg)q+lW|fL!g-Wr>$1 zLobZIg=`A^M+WfSl~}+A%w;_`|Nh>+VHhN7t@gnSE5+5)nh<4C-YDNX{Wx<{HytN! zcXW-P&fT={8UG@V!!O_UE`x5?scap`QR)U!cch8~zY8fhS3%^*Svwv_exmkq^nwtU zusW5U$)w(BR%QLLIjzb`t5vJY{l>v`YKiULy`!_c!Q<29dHV9IndR^!RI+Js25;cZ zHR&h!p$A_R3+5IcoKY0UQ4iv?&1Rbr5(C5lF|a%gm=jK{FHcL<2{Awn{1O9rK1fhR z+hDFy9UWlQ2mn}wuoCcbmcSZm&^DNBgcT63O96E$HzNkuo-@s&vL}jbw=dVql&Doc%y5c>kaNJpZdCGQ9He-bRqy?EVBlCz%&C!MyWRM1f zv|EU_1C{~Hz@#xiXO}}4dLZEjzMS76mI3-+gKiw9S*`ZQW@bxs^9!6i+*xuiy^b7s znVp&lFA%FyYh#=NC-83>acC%mE8XNF~ zF(l2(1T$cc3SXSyHQJ?F1}p>r!vNh60+rA;m}^v52R5n%KrG>~611t7pd4Y)HJEEe z4+_(%h&q*-5`*b<92X|eHJEGE>A+0!!OWMLsZf~uI?gXtI51bEZ7lTZSJ z|HI$w|L;k*XBn^zOcevHbl@E{a7*TGEo_e7T7lX`C84-nqe{WXJjcqQr+5uj3Hk&X Wh_1n0BaWch9|1*!Z7c(S%D_AE45>E& literal 0 HcmV?d00001 diff --git a/static/images/projects/.DS_Store b/static/images/projects/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..275240aeaf6daa547b5271c1f23dc8f627540683 GIT binary patch literal 8196 zcmeHM&2G~`5T0#Q*aRVRKx&S@a0^n>mX=E;6T*QDLNY1`K&@RziNW?-v4hoyAYYJp z1$Y|{9C!jAfhXY3?2n8~T&YMEO2v${^R0Jgyxz}aZ^i)tHkkQ+fDQm~Y!cfyP}PXE z%eEwIX5TqB>9GIDznF@ue*)h&i?!at~q=^AyV3`3~yEkE?tM+RBo+e%>JhXoEk}ycKUhg|w zTW@S!yUuxww{EsxITMjPnVZehfjfO6kDj{O#54V8LWE`C^$vnje%QYKP{f%V#G|PS z4*U_iynG(SzQ_k+7W=6>kE0EoH+l20-I>p~ws*VM*8QDD*P8F`^}5#1_U>ZQw%E&8>?Ym2oSRfxqMsgz9%hofIhEl*IB7tH ze9RzNIYuriZOaALBx`A_rs$I&touQyXvO|JG3)F#=~%{|Aso|CJ!7cUE{sU~zsyh) zV&Dofu&%GQBkTW1=YRjdLMx(6B?gFrzh!_mhR$$+QEFGOiI%&(h3yEN6zNxJR3WI& h{1Cw7@()AoTj(ldY=ebH96_NE0g47v#K1pg;1`vu9Mb>* literal 0 HcmV?d00001 diff --git a/static/images/projects/hong-kong/.DS_Store b/static/images/projects/hong-kong/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0lVgkE!Pp|jGr>k!m+frp6?JB?c>NtZJfhj$0^_2>g?sXHb$RwSaRlbu71H;wX&cq zsIHlhW~P8CU<&M%0z9+TdVP;pngXVPDNrh)--np4m;@|5x=#lScLgAJ+3bvU{b5v2 z954x3cw`SvJeBCF60R8H>1>ZfToSPG=;@Gf`H+xV!VN`Sc8(vra7g0ON>jiT*i>N8 zKMwT#zuJEP-z3?SDPRixD+Q!Gz8R0Wq;R%27N=)zOuwb8X