add 003 beginnings
This commit is contained in:
parent
778873c9ce
commit
28faa03ac6
8 changed files with 47 additions and 15 deletions
|
@ -10,6 +10,7 @@ https://art.mekanoe.com
|
|||
|
||||
- [./001-platform-provenance](https://art.mekanoe.com/001-platform-provenance)
|
||||
- [./002-webgl-engine](https://art.mekanoe.com/002-webgl-engine)
|
||||
- [./003-scene](https://art.mekanoe.com/003-scene)
|
||||
|
||||
## Development
|
||||
|
||||
|
|
25
html/003-scene/index.html
Normal file
25
html/003-scene/index.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>com.mekanoe.art // 003-scene</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/work.css" />
|
||||
<main>
|
||||
<canvas id="canvas" width="1280" height="720"></canvas>
|
||||
<div id="telemetry">XX.X FPS (XX.X ms)</div>
|
||||
</main>
|
||||
<script src="/003-scene/main.js" type="module"></script>
|
1
html/003-scene/main.js
Normal file
1
html/003-scene/main.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{a as y,b as z,c as B,d as C,e as D,f as k} from"../chunk-7f8a022861c7b8c3.js";import"../chunk-e60581a63af9c45c.js";var x="precision highp float;void main(){gl_FragColor=vec4(1.0,0.0,1.0,1.0);}";var j="attribute vec4 aVertexPosition;uniform mat4 uModelViewMatrix;uniform mat4 uProjectionMatrix;void main(){gl_Position=uProjectionMatrix*uModelViewMatrix*aVertexPosition;}";var q=(E)=>new k().vertex(j).fragment(x).app(E);var i=new B({fov:45});new C(i,new y,new z(i,D,q(i)));i.start();
|
2
html/chunk-7f8a022861c7b8c3.js
Normal file
2
html/chunk-7f8a022861c7b8c3.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,6 +31,7 @@
|
|||
</header>
|
||||
<section id="works">
|
||||
<ul>
|
||||
<li><a href="/003-scene">./003-scene</a></li>
|
||||
<li><a href="/002-webgl-engine">./002-webgl-engine</a></li>
|
||||
<li><a href="/001-platform-provenance">./001-platform-provenance</a></li>
|
||||
</ul>
|
||||
|
|
16
src/003-scene/main.ts
Normal file
16
src/003-scene/main.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { MeshRenderer } from "../renderer/mesh-renderer";
|
||||
import { WebGLApp } from "../renderer/webgl";
|
||||
import { Renderable } from "../renderer/renderable";
|
||||
import { Transform } from "../renderer/transform";
|
||||
import torus from "../meshes/torus";
|
||||
import { errorShader } from "../common-shaders/error";
|
||||
|
||||
const app = new WebGLApp({ fov: 45 });
|
||||
|
||||
new Renderable(
|
||||
app,
|
||||
new Transform(),
|
||||
new MeshRenderer(app, torus, errorShader(app))
|
||||
);
|
||||
|
||||
app.start();
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue