Skip to content

Commit a5ad137

Browse files
marcuskirschjanraasch
authored andcommitted
chore: initial commit
0 parents  commit a5ad137

40 files changed

+13910
-0
lines changed

.circleci/config.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
install:
8+
working_directory: ~/angular-stl-model-viewer
9+
docker:
10+
- image: circleci/node:10
11+
steps:
12+
- checkout
13+
- run:
14+
name: Checking Versions
15+
command: |
16+
node --version
17+
npm --version
18+
yarn --version
19+
- restore_cache:
20+
name: Restore Yarn Package Cache
21+
keys:
22+
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
23+
- yarn-packages-{{ .Branch }}
24+
- yarn-packages-master
25+
- yarn-packages-
26+
- run:
27+
name: Install Dependencies
28+
command: yarn install --frozen-lockfile --non-interactive
29+
- save_cache:
30+
name: Save Yarn Package Cache
31+
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
32+
paths:
33+
- node_modules/
34+
- persist_to_workspace:
35+
root: .
36+
paths: .
37+
test:
38+
working_directory: ~/angular-stl-model-viewer
39+
docker:
40+
- image: circleci/node:10-browsers
41+
environment:
42+
CHROME_BIN: "/usr/bin/google-chrome"
43+
steps:
44+
- attach_workspace:
45+
at: ~/angular-stl-model-viewer
46+
- run:
47+
name: Test
48+
command: yarn test
49+
- run:
50+
name: Lint
51+
command: yarn lint
52+
53+
workflows:
54+
version: 2
55+
install-and-test:
56+
jobs:
57+
- install
58+
- test:
59+
requires:
60+
- install
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/demo
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
/examples/basic/node_modules
10+
/bower_components
11+
12+
# IDEs and editors
13+
/.idea
14+
/.vscode
15+
.project
16+
.classpath
17+
*.launch
18+
.settings/
19+
20+
# misc
21+
/.sass-cache
22+
/connect.lock
23+
/coverage/*
24+
/libpeerconnection.log
25+
npm-debug.log
26+
testem.log
27+
/typings
28+
29+
# e2e
30+
/e2e/*.js
31+
/e2e/*.map
32+
33+
#System Files
34+
.DS_Store
35+
Thumbs.db
36+
37+
index.js
38+
index.js.map
39+
src/*.js
40+
src/*.js.map
41+
aot
42+
bundles
43+
dist

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 tevim GmbH
4+
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[![CircleCI][circleci-svg]][circleci]
2+
3+
angular-stl-model-viewer
4+
==
5+
This is a angular component to render stl-models with THREE.js.
6+
7+
Installation
8+
==
9+
- `yarn add angular-stl-model-viewer`
10+
- or download the zip file from [release page][releases]
11+
12+
Usage
13+
==
14+
- import `StlModelViewerModule` to your app module
15+
- use stl-model-viewer component in your html `<stl-model-viewer stlModel="example.stl"></stl-model-viewer>`
16+
17+
Configuration
18+
==
19+
## Input Properties
20+
| Attr | Type | Default | Details |
21+
| ------------ | ---------------------- | -------------------------------------------------------------------------------- |--------------------------------------------------- |
22+
| stlModel | string | - | Path to stl-model |
23+
| hasControls | boolean | true | If true, the user can interact with the stl-model |
24+
| camera | THREE.Camera | THREE.PerspectiveCamera( 35, WindowInnerWidth / WindowInnerHeight, 1, 15 ) | The projection mode used for rendering the scene |
25+
| cameraTarget | THREE.Vector3 | THREE.Vector3( 0, 0, 0 ) | The orientation point for the camera |
26+
| light | THREE.Light | THREE.PointLight( 0xffffff ) | Illuminates the scene |
27+
| material | THREE.MeshMaterialType | THREE.MeshPhongMaterial({ color: 0xc4c4c4, shininess: 100, specular: 0x111111 }) | Casts more precisely the possible materials assignable to a [ [Mesh]] object |
28+
| scene | THREE.Scene | THREE.Scene() | Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights and cameras |
29+
| renderer | THREE.WebGLRenderer | THREE.WebGLRenderer({ antialias: true }) | Displays your beautifully crafted scenes using WebGL |
30+
| controls | THREE.OrbitControls | THREE.OrbitControls | Allow the camera to orbit around a target |
31+
| meshOptions | MeshOptions | {} | - |
32+
33+
## Output Events
34+
| Attr | Details |
35+
| ---------- | ---------------------------------------- |
36+
| rendered | Emitted when the stl-model is rendered. |
37+
38+
39+
## MeshOptionsType
40+
41+
| Attr | Type | Default | Details |
42+
| ------------- | -------------------- | ------------------------------- | --------------------------------------- |
43+
| castShadow | boolean | true | Gets rendered into shadow map |
44+
| position | THREE.Vector3 | THREE.Vector3( 0, 0, 0 ) | Object's local position |
45+
| receiveShadow | boolean | true | Material gets baked in shadow receiving |
46+
| scale | THREE.Vector3 | THREE.Vector3( 0.03, 0.03, 0.03 ) | Object's local scale |
47+
| up | THREE.Vector3 | - | Up direction |
48+
| userData | {[key: string]: any} | - | An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned |
49+
| visible | boolean | - | Object gets rendered if true |
50+
51+
Contributing
52+
===
53+
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using `yarn lint` and `yarn test`.
54+
55+
License
56+
===
57+
58+
angular-stl-model-viewer is Copyright © 2018 [tevim GmbH][tevim]. It is free software, and may be redistributed under the terms specified in the [LICENSE][license] file.
59+
60+
[circleci]: https://circleci.com/gh/tevim/angular-stl-model-viewer
61+
[circleci-svg]: https://circleci.com/gh/tevim/angular-stl-model-viewer.svg?style=svg
62+
[license]: https://github.com/tevim/angular-stl-model-viewer/blob/master/LICENSE
63+
[releases]: https://github.com/tevim/angular-stl-model-viewer/releases
64+
[tevim]: https://www.tevim.com

examples/basic/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
basic example
2+
==
3+
4+
This is the basic example based on a angular 6 project.
5+
6+
## Getting started
7+
To get started, clone this repo, navigates to examples/basic directory and run `yarn install`.
8+
9+
Now you're ready to start the development server using `yarn start` and open your browser at http://localhost:4200/.

0 commit comments

Comments
 (0)