Model Civil Engineering Structures with mas.js.
You can use mas.js online! Just click here.
Alternatively, you can run it from a local machine. The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need a Web Browser and run a local server. Git is optional.
Fork, clone or download this repository.
Use the browser you want. We recommend Firefox or Google Chrome.
You can run a local server with using python. If you have python 2, you can run the command
python -m SimpleHTTPServer
in the folder root.
If you have python 3, run the command
python3 -m http.server
If you have already a local host running on your machine, you can open the index.html file to test the program.
Details about the functions provides by mas.js.
-
Load a model.
open("filename.json")
- filename.json: input file.
-
Add a joint to the model at position (x, y, z).
addJoint(x, y, z)
- x: coordinate x.
- y: coordinate y.
- z: coordinate z.
-
Add a frame to the model with j as the near joint and k as the far joint.
addFrame(name, j, k)
- name: name of the frame.
- j: near joint.
- k: far joint.
-
Add many joints to the model at random positions inside a sphere.
manyJoints(radius, number)
- radius: sphere's radius.
- number: number of joints.
-
Add many frames to the model at random positions inside a sphere.
manyFrames(radius, number)
- radius: sphere's radius.
- number: number frames.
- JavaScript
- CSS
- html
- three.js
- Cristian Ramirez - rvcristiand