Skip to content

Commit

Permalink
Add default viewpoint
Browse files Browse the repository at this point in the history
Update CHANGES.md
  • Loading branch information
TiagoCavalcante committed Jan 5, 2022
1 parent 0474107 commit 8cbd2fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CHANGES
dev
---

Improvements:
- Add default viewpoint (#61)

Documentation:
- Add more examples (#59)

Expand Down
2 changes: 1 addition & 1 deletion docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The main function of mathics-threejs-backend is `drawGraphics3d`, takes the foll
- `ymax` (type: number)
- `zmax` (type: number)
- `lighting` (type: [element[]](/mathics-threejs-backend/types/element)) — array of lights, default: `[]`
- `viewpoint` (type: number[3]) — the normalized camera coordinate (normalized means that the coordinate is going to be scaled, e.g. `[1, 1, 1]` is the upper back right corner of the bounding box independently from its size)
- `viewpoint` (type: number[3]) — the normalized camera coordinate (normalized means that the coordinate is going to be scaled, e.g. `[1, 1, 1]` is the upper back right corner of the bounding box independently from its size). Default: `[1.3, -2.4, 2]`
- `protocol` (type: string) — protocol version (current is `1.2`), if it isn't compatible a warning is shown instead of the graphics. Only availiable in production version
- `maxSize` (type: number) — default: `400`
- `innerWidthMultiplier` (type: number) — the multiplier of the window inner width, the effective width is `min(maxSize, innerWidthMultiplier * window.innerWidth)`, default: `0.65`
Expand Down
2 changes: 1 addition & 1 deletion src/graphics3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function (
extent,
elements = [],
lighting = [],
viewpoint
viewpoint = [1.3, -2.4, 2]
},
maxSize = 400,
innerWidthMultiplier = 0.65
Expand Down

0 comments on commit 8cbd2fa

Please sign in to comment.