Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions components/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand Down
46 changes: 35 additions & 11 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
49 changes: 49 additions & 0 deletions pages/cinemagraphs/test.js
Original file line number Diff line number Diff line change
@@ -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 (
<div ref={ref => (this.mount = ref)}>
<Globals />
</div>
);
}
}
Binary file added static/.DS_Store
Binary file not shown.
Binary file added static/images/.DS_Store
Binary file not shown.
Binary file added static/images/projects/.DS_Store
Binary file not shown.
Binary file added static/images/projects/hong-kong/.DS_Store
Binary file not shown.
Binary file added static/images/projects/maui/.DS_Store
Binary file not shown.