Better scaling.
This commit is contained in:
11
src/open.js
11
src/open.js
@@ -9,7 +9,7 @@ let group;
|
||||
|
||||
function addStar() {
|
||||
let geometry = new THREE.BufferGeometry();
|
||||
let vertices = starCoordinates(2 / 3, 1, 0);
|
||||
let vertices = starCoordinates(2, 3, 0);
|
||||
geometry.addAttribute('position', new THREE.BufferAttribute(vertices, 3));
|
||||
geometry.setIndex(filledStarIndices());
|
||||
let material = new THREE.MeshBasicMaterial({color: 0x00ff00});
|
||||
@@ -19,7 +19,6 @@ function addStar() {
|
||||
}
|
||||
|
||||
function startOpenAnimation() {
|
||||
|
||||
scene = new THREE.Scene();
|
||||
camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||
camera.position.z = 5;
|
||||
@@ -41,12 +40,14 @@ function loadFont() {
|
||||
let font = new THREE.Font(data);
|
||||
let geometry = new THREE.TextGeometry('Ja!', {
|
||||
font: font,
|
||||
size: 0.5,
|
||||
height: 0.1,
|
||||
size: 1.2,
|
||||
height: 0.3,
|
||||
curveSegments: 12
|
||||
}).center();
|
||||
|
||||
let textMaterial = new THREE.MeshBasicMaterial({color: 0xff00ff});
|
||||
let textMaterial = new THREE.MeshBasicMaterial({
|
||||
color: 0xff00ff
|
||||
});
|
||||
|
||||
let mesh = new THREE.Mesh(geometry, textMaterial);
|
||||
group.add(mesh);
|
||||
|
||||
Reference in New Issue
Block a user