KITASENJU DESIGN BLOG

memo, html, javascript, unity

Entries from 2022-08-28 to 1 day

縦画面にぴったりあわせる threejs

const fovRad = (this.camera.fov / 2) * (Math.PI / 180); let distance = (window.innerHeight / 2) / Math.tan(fovRad); this.camera.position.set(0,0,distance); let scale:number = window.innerHeight/100;//meshのおおきさがwindow.innerHeightと同…

random glslは0-1の範囲

float random(vec2 co){ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); }

"FOOTER"