https://github.com/bchao1/webgl-3d-viewer

3D model viewer in WebGL and pure Javascript.

https://github.com/bchao1/webgl-3d-viewer

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.3%) to scientific vocabulary

Keywords

3d-models 3d-viewer 3d-visualization computer-graphics javascript opengl shading transformations webgl
Last synced: 5 months ago · JSON representation

Repository

3D model viewer in WebGL and pure Javascript.

Basic Info
  • Host: GitHub
  • Owner: bchao1
  • Language: HTML
  • Default Branch: master
  • Homepage:
  • Size: 60.9 MB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
3d-models 3d-viewer 3d-visualization computer-graphics javascript opengl shading transformations webgl
Created almost 5 years ago · Last pushed almost 5 years ago
Metadata Files
Readme

README.md

3D Viewer

3D viewer in WebGL and pure Javascript.

Viewer

Features

  • Controllable Phong illumination model:
    • Ambient intensity
    • Diffuse intensity
    • Specular intensity
    • Specular order
  • Controllable light source colors (currently 3 light sources)
  • Controllable geometry:
    • Translation
    • Scaling
    • Rotation
    • 3D shear
  • Controllable camera:
    • FOV (field of view)
  • Controllable models
  • Toggle Y-axis rotation animation

Shadings

|Flat|Gouraud|Phong| |--|--|--| |flat|gouraud|phong| |flat|gouraud|phong|

Phong illumination model

"Suzanne" a.k.a Blender Monkey.

|Ambient|Diffuse|Specular|Full| |--|--|--|--| |ambient|diffuse|specular|full|

|Low specular order (metal-like)|High specular order (glossy)| |--|--| |spec-low|spec-high|

Model transformations

"Stanford Bunny"

|Original|Rotate|Translate|Scale|Shear| |--|--|--|--|--| |orig|rotate|translate|scale|shear|

Using your own model

You can modify line 843,844 in index.html to use your own model. Concretely, comment out the predefined models modelNames = ["buddha", "teapot", "bunny", "suzanne"]; and change to modelNames = ["own"];. The program will load the ./src/model/Own.json file and render it.

To generate the Own.json file, modify input_obj_path and texture_path in the ./src/raw/obj2json.py script. The script loads a .obj file and (optinally) a texture atlas and outputs a processed json file to ./src/model/Own.json. Input models generated by this script are scaled and centered to fit a [-50, 50] box (aspect ratio kept).

Stanford "Happy Buddha"

buddha-happy

Owner

  • Name: Brian Chao
  • Login: bchao1
  • Kind: user
  • Location: Stanford, California
  • Company: Stanford University

Stanford Ph.D. student. Research in computational photography, displays, and computer graphics. Open source enthusiast.

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 31
  • Total Committers: 1
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
bchao1 w****0@g****m 31

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels