forked from trent_larson/crowd-funder-for-time-pwa
play with sizing, and stop bobbing and rotation
This commit is contained in:
@@ -34,6 +34,11 @@ export default function createTerrain(props) {
|
||||
|
||||
plane.geometry.attributes.position.randomValues = props.randVertexArr;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
plane.tick = () => {};
|
||||
/**
|
||||
* This makes the terrain bob up and down.
|
||||
*
|
||||
let frame = 0;
|
||||
plane.tick = () => {
|
||||
frame += 0.01;
|
||||
@@ -55,6 +60,7 @@ export default function createTerrain(props) {
|
||||
}
|
||||
plane.geometry.attributes.position.needsUpdate = true;
|
||||
};
|
||||
**/
|
||||
|
||||
return plane;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
const setSize = (container, camera, renderer) => {
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
// These are great for full-screen, which adjusts to a window.
|
||||
const height = window.innerHeight;
|
||||
const width = window.innerWidth - 50;
|
||||
// These are better for fitting in a container, which stays that size.
|
||||
//const height = container.scrollHeight;
|
||||
//const width = container.scrollWidth;
|
||||
|
||||
camera.aspect = width / height;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
renderer.setSize(width, height);
|
||||
renderer.setPixelRatio(window.devicePixelRatio);
|
||||
};
|
||||
|
||||
|
||||
4
src/components/World/systems/controls.js
vendored
4
src/components/World/systems/controls.js
vendored
@@ -6,8 +6,8 @@ function createControls(camera, canvas) {
|
||||
|
||||
//enable controls?
|
||||
controls.enabled = true;
|
||||
controls.autoRotate = true;
|
||||
controls.autoRotateSpeed = 0.2;
|
||||
controls.autoRotate = false;
|
||||
//controls.autoRotateSpeed = 0.2;
|
||||
|
||||
// control limits
|
||||
// It's recommended to set some control boundaries,
|
||||
|
||||
Reference in New Issue
Block a user