diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..d1ccaab Binary files /dev/null and b/.DS_Store differ 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/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": { diff --git a/pages/cinemagraphs/test.js b/pages/cinemagraphs/test.js new file mode 100644 index 0000000..1d22111 --- /dev/null +++ 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 0000000..6716a24 Binary files /dev/null and b/static/.DS_Store differ diff --git a/static/images/.DS_Store b/static/images/.DS_Store new file mode 100644 index 0000000..ede6f88 Binary files /dev/null and b/static/images/.DS_Store differ diff --git a/static/images/projects/.DS_Store b/static/images/projects/.DS_Store new file mode 100644 index 0000000..275240a Binary files /dev/null and b/static/images/projects/.DS_Store differ diff --git a/static/images/projects/hong-kong/.DS_Store b/static/images/projects/hong-kong/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/static/images/projects/hong-kong/.DS_Store differ diff --git a/static/images/projects/maui/.DS_Store b/static/images/projects/maui/.DS_Store new file mode 100644 index 0000000..564bccf Binary files /dev/null and b/static/images/projects/maui/.DS_Store differ