Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
node-version: "15.x"

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,4 @@ typings/
.env

# next.js build output
.next

dist/bundle.js
dist/bundle.js.map
.next
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# HW 0: Intro to Javascript and WebGL
HW 0: Intro to Javascript and WebGL
==============
![](images/cube.gif)

[Link to Demo](https://jyguan18.github.io/hw00-intro-base)

In this homework, I first made a Cube class that inherits from Drawable. For lighting purposes (to see all the sides), all of the normals are positive 1.

Using dat.gui, I created a handful of additional controls like a color picker, frequency + amplitude of the perline noise, and enabling time (for the cube to move and distort with time).

For my noise function, I used a combination of 1 - abs(perlin) and layered fbm on the background. I separated out the primary line color and the complementary background color using a smoothstep and applied the fbm to the background.

To deform the cube, I changed the vertex positions with respect to time using a sin function.

#

<p align="center">
<img width="360" height="360" src="https://user-images.githubusercontent.com/1758825/132532354-e3a45402-e484-499e-bfa7-2d73b9f2c946.png">
Expand Down
Loading