archive 001 and 002 as early prototypes
This commit is contained in:
parent
87563cb9e3
commit
778873c9ce
12 changed files with 85 additions and 15 deletions
|
@ -39,12 +39,11 @@ console.log(chalk.green`>> Generating HTML and Markdown ...`);
|
|||
await generate(works);
|
||||
|
||||
console.log(chalk.green`>> Copying public files ...`);
|
||||
const publics = globSync("src/public/*");
|
||||
for (const file of publics) {
|
||||
const dest = file.replace("src/public/", "html/");
|
||||
cpSync(file, dest);
|
||||
console.log(chalk.yellow(` -> ${dest}...`));
|
||||
}
|
||||
const { stdout, stderr, exitCode } = Bun.spawnSync([
|
||||
"sh",
|
||||
"-c",
|
||||
"cp -r src/public/* html/",
|
||||
]);
|
||||
|
||||
console.log(chalk.green`>> Convert meshes ...`);
|
||||
await convertMeshes();
|
||||
|
|
File diff suppressed because one or more lines are too long
2
html/chunk-34454e0a94287d20.js
Normal file
2
html/chunk-34454e0a94287d20.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,5 @@
|
|||
// This one is archived.
|
||||
|
||||
import { Shader } from "./shader";
|
||||
import { BasicPlane } from "./basic-plane";
|
||||
import { App } from "./app";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This one is archived.
|
||||
import { MeshRenderer } from "../renderer/mesh-renderer";
|
||||
import plane from "../meshes/plane";
|
||||
import { WebGLApp } from "../renderer/webgl";
|
||||
|
@ -14,21 +15,19 @@ const camera = new Transform(
|
|||
quat.fromEuler(quat.create(), 15, 0, 0)
|
||||
);
|
||||
|
||||
(window as any).ANGLE_X = 15;
|
||||
(window as any).ANGLE_Y = 0;
|
||||
(window as any).ANGLE_Z = 0;
|
||||
const modelTransform = new Transform([0, 0, 4]);
|
||||
|
||||
app.onUpdate((time: number) => {
|
||||
const stride = 2;
|
||||
const x = Math.sin(time * 0.0001) * (stride * 2 - stride * 0.5);
|
||||
// const y = Math.tan(time * 0.001) * (stride * 2 - stride * 0.5);
|
||||
const cameraStride = 3;
|
||||
const x = Math.sin(time * 0.0001) * (cameraStride * 2 - cameraStride * 0.5);
|
||||
|
||||
camera.rotation = quat.fromEuler(quat.create(), x, 0, 0);
|
||||
// modelTransform.rotation = quat.fromEuler(quat.create(), x, 0, 0);
|
||||
});
|
||||
|
||||
new Renderable(
|
||||
app,
|
||||
new Transform([0, 0, 4]),
|
||||
modelTransform,
|
||||
new MeshRenderer(app, torus, uvRainbow(app), camera, {
|
||||
drawMode: app.gl.TRIANGLE_FAN,
|
||||
})
|
||||
|
|
14
src/meshes/torus-scuffed.ts
Normal file
14
src/meshes/torus-scuffed.ts
Normal file
File diff suppressed because one or more lines are too long
25
src/public/001-platform-provenance/index.html
Normal file
25
src/public/001-platform-provenance/index.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>com.mekanoe.art // 001-platform-provenance</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="/001-platform-provenance/main.js" type="module"></script>
|
1
src/public/001-platform-provenance/main.js
Normal file
1
src/public/001-platform-provenance/main.js
Normal file
File diff suppressed because one or more lines are too long
25
src/public/002-webgl-engine/index.html
Normal file
25
src/public/002-webgl-engine/index.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>com.mekanoe.art // 002-webgl-engine</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="/002-webgl-engine/main.js" type="module"></script>
|
1
src/public/002-webgl-engine/main.js
Normal file
1
src/public/002-webgl-engine/main.js
Normal file
File diff suppressed because one or more lines are too long
2
src/public/chunk-1da54319833c650d.js
Normal file
2
src/public/chunk-1da54319833c650d.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -42,7 +42,7 @@ export class Telemetry extends Behavior {
|
|||
} | U: ${this.app.registry.onUpdate.length} | aU: ${
|
||||
this.app.registry.onAfterUpdate.length
|
||||
}`;
|
||||
}, 1000);
|
||||
}, 1001);
|
||||
}
|
||||
|
||||
onAfterUpdate(time: number) {
|
||||
|
|
Loading…
Add table
Reference in a new issue