Skip to content

Commit

Permalink
Build JS files to make it work with GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cszach committed Apr 29, 2024
1 parent 63bba25 commit a0faf04
Show file tree
Hide file tree
Showing 111 changed files with 1,955 additions and 14 deletions.
1 change: 1 addition & 0 deletions examples/cornell-box-raytraced/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
2 changes: 1 addition & 1 deletion examples/cornell-box-raytraced/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
</head>
<body>
<canvas></canvas>
<script src="./index.ts" type="module"></script>
<script src="./index.js" type="module"></script>
</body>
</html>
66 changes: 66 additions & 0 deletions examples/cornell-box-raytraced/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/cornell-box-raytraced/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/cornell-box/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
2 changes: 1 addition & 1 deletion examples/cornell-box/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
</head>
<body>
<canvas></canvas>
<script src="./index.ts" type="module"></script>
<script src="./index.js" type="module"></script>
</body>
</html>
61 changes: 61 additions & 0 deletions examples/cornell-box/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/cornell-box/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions examples/cornell-box/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ renderer.init().then(() => {
lightMesh
);

// Canvas resize
let i = 0;

const resizeObserver = new ResizeObserver(entries => {
i = 0;

entries.forEach(entry => {
const canvas = entry.target as HTMLCanvasElement;
const width = entry.contentBoxSize[0].inlineSize;
Expand All @@ -116,7 +111,7 @@ renderer.init().then(() => {
// renderer.render(scene, camera, 20);

function frame() {
renderer.render(scene, camera, i++);
renderer.render(scene, camera);

window.requestAnimationFrame(frame);
}
Expand Down
1 change: 1 addition & 0 deletions examples/hello-eclipse/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
47 changes: 47 additions & 0 deletions examples/hello-eclipse/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a0faf04

Please sign in to comment.