Skip to content

Commit

Permalink
✨ shrink 3d plane model
Browse files Browse the repository at this point in the history
  • Loading branch information
slooi committed Sep 26, 2024
1 parent 7a9c411 commit 4fe3e21
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/webgl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export function createWebglRenderer(canvas: HTMLCanvasElement) {
console.log("createWebglRenderer was called!")
// canvas
// const canvas = document.querySelector("canvas") as HTMLCanvasElement
canvas.width = 300 * 4
canvas.height = 300 * 3
canvas.width = 300 * 4 //window.innerWidth
canvas.height = 300 * 3 // window.innerHeight
// document.querySelector("body")?.append(canvas)
canvas.style.width = `${canvas.width}px`
canvas.style.height = `${canvas.height}px`
Expand Down Expand Up @@ -180,10 +180,10 @@ export function createWebglRenderer(canvas: HTMLCanvasElement) {

// Length front
100, 0, 100,
130 * 50, 0, 100,
130 * 50, 130, 100,
130 * 25, 0, 100,
130 * 25, 130, 100,
100, 0, 100,
130 * 50, 130, 100,
130 * 25, 130, 100,
100, 130, 100,
// Length left
100, 0, 100,
Expand All @@ -195,11 +195,11 @@ export function createWebglRenderer(canvas: HTMLCanvasElement) {

// Length top
100, 130, 100,
130 * 50, 130, 100,
130 * 50, 130, 130 * 50,
130 * 25, 130, 100,
130 * 25, 130, 130 * 25,
100, 130, 100,
130 * 50, 130, 130 * 50,
100, 130, 130 * 50,
130 * 25, 130, 130 * 25,
100, 130, 130 * 25,
]
const colors = [
// Length front
Expand Down

0 comments on commit 4fe3e21

Please sign in to comment.