Skip to content

Commit

Permalink
Merge branch 'develop' into feature/blender-export
Browse files Browse the repository at this point in the history
# Conflicts:
#	libs/gltf-extension-validator/project.json
#	libs/gltf-extension/project.json
#	package.json
#	yarn.lock
  • Loading branch information
vspdi committed Dec 2, 2023
2 parents 9741546 + 9d9cf5c commit d4284c8
Show file tree
Hide file tree
Showing 140 changed files with 33,918 additions and 10,393 deletions.
Binary file removed .DS_Store
Binary file not shown.
10 changes: 4 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"ignorePatterns": [
"**/*"
],
"plugins": [
"@nrwl/nx"
],
"plugins": ["@nx"],
"overrides": [
{
"files": [
Expand All @@ -15,7 +13,7 @@
"*.jsx"
],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -38,7 +36,7 @@
"*.tsx"
],
"extends": [
"plugin:@nrwl/nx/typescript",
"plugin:@nx/typescript",
"prettier"
],
"plugins": [
Expand Down Expand Up @@ -96,7 +94,7 @@
"*.jsx"
],
"extends": [
"plugin:@nrwl/nx/javascript"
"plugin:@nx/javascript"
],
"rules": {}
}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
"on":
push:
branches:
- main
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
always-auth: true
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_TECHUSER }}" > ~/.npmrc
- run: npm ci
- run: npm run test
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_TECHUSER }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_TECHUSER }}
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test
"on":
push:
branches:
- develop
- feature/**
- hotfix/**
- renovate/**
pull_request:
types:
- opened
- synchronize
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: npm
- run: npm ci
- run: npm run build
- run: npm run test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: npm
- run: npm ci
- run: npm run build
- run: npm run lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.nx/cache
1 change: 0 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[submodule "libs/gltf-extension/glTF-spec"]
path = libs/gltf-extension/glTF-spec
url = git@github.com:alchemisten/glTF.git
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

/dist
/coverage

/.nx/cache
39 changes: 39 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"branches": "main",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"publish": false
}
],
"@semantic-release/github",
[
"@semantic-release/exec",
{
"publishCmd": "nx run-many --target=publish --ver=${nextRelease.version} --exclude=3d-studio-example,gltf-extension,gltf-extension-validator"
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"package-lock.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@saithodev/semantic-release-backmerge",
{
"branches": [
"develop"
],
"backmergeStrategy": "merge"
}
]
]
}
96 changes: 96 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the maintainers of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Submitting an Issue
Before you submit an issue, please search the issue tracker. An issue for your problem might already
exist and the discussion might inform you of workarounds readily available.

We want to fix all the issues as soon as possible, but before fixing a bug, we need to reproduce
and confirm it. In order to reproduce bugs, we require that you provide a minimal reproduction.
Having a minimal reproducible scenario gives us a wealth of important information without going
back and forth to you with additional questions.

## Pull Request Process
1. Please note that we use [semantic-release](https://github.com/semantic-release/semantic-release) to determine the next release version number.
Make sure to follow the [Angular commit message guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format) to ensure the correct new version.
2. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
3. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
4. Your pull request will be merged by the project owners once it has been reviewed.

## Code of Conduct

### Our Pledge

We as members, contributors, and project maintainers pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

### Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Enforcement Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

### Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team via our [homepage](https://alchemisten.ag).
All complaints will be reviewed and investigated promptly and fairly.

All project maintainers are obligated to respect the privacy and security of the
reporter of any incident.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1,
available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct/](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Viktor Spadi
Copyright (c) 2022 Alchemisten AG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,26 @@ based on [Three JS](https://threejs.org).

This mono repo contains the following packages. See their individual READMEs
for more details:
* GLTF Extension: Contains the definition for the *.alcm file object which
* [Viewer Core](libs/viewer-core/README.md):
Contains the actual viewer and the core features.
* [Viewer UI](libs/viewer-ui/README.md):
Contains a UI for the viewer and the core features.
* [React Website](libs/react-website/README.md):
Contains a React Website which can be used with a single component with
minimal configuration.
* [Example](apps/3d-studio-example/README.md):
Contains an example application which is used mainly for development, but
also contains examples for the usage of the viewer and the viewer UI.
* GLTF Extension: Contains the definition for the *.alcm file object which
extends the default *.gltf file definition with all configuration options
necessary for the viewer.
* GLTF Extension Validator: TODO
* [Viewer Core](libs/viewer-core/README.md):
Contains the actual viewer and the core features. Examples for the most
common use cases are available.

## Development

### Build
Run `npm run build` to create a new build.

### New release
Merging to the `main` branch will automatically create a new release via
semantic-release.
10 changes: 10 additions & 0 deletions apps/3d-studio-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 3D Studio Example
This is an example application for the 3D Studio Viewer Core and UI. It is used for development and to provide usage examples.

## Development

Running `npm start` will serve a live reload development server on `localhost:4200`,
serving the files from the `3d-studio-example` app. The base files can be used for development,
further examples for specific functionality should receive their own subfolder in
`apps/3d-studio-example/src/examples`. To run any of these examples open the corresponding
index.html file in the browser, e.g. `localhost:4200/src/examples/multiple-viewers/index.html`.
4 changes: 2 additions & 2 deletions apps/3d-studio-example/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/3d-studio-example/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["coverage/apps/3d-studio-example"],
"outputs": ["{workspaceRoot}/coverage/apps/3d-studio-example"],
"options": {
"jestConfig": "apps/3d-studio-example/jest.config.ts",
"passWithNoTests": true
Expand Down
15 changes: 15 additions & 0 deletions apps/3d-studio-example/src/examples/custom-service/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Custom Service Example</title>
<link rel="stylesheet" href="../../styles.css" />
</head>
<body>
<div id="container-wrapper">
<div id="viewer-container"></div>
</div>
<script type="module" src="../../polyfills.ts"></script>
<script type="module" src="index.ts"></script>
</body>
</html>
35 changes: 35 additions & 0 deletions apps/3d-studio-example/src/examples/custom-service/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { ViewerLauncher } from '@schablone/3d-studio-viewer-core';
import { AlternativeLoggerService } from './logger';

(function () {
const container = document.getElementById('viewer-container');
if (!container) {
return;
}

const launcher = new ViewerLauncher({
customManager: {
logger: AlternativeLoggerService,
},
loggerOptions: {
environment: 'develop',
},
});
launcher.createCanvasViewer(
{
objects: [
{
name: 'Milk-Truck',
path: 'assets/models/milk-truck-draco/CesiumMilkTruck.gltf',
},
],
render: {
continuousRendering: true,
},
project: {
basedir: 'http://127.0.0.1:4200',
},
},
container
);
})();
Loading

0 comments on commit d4284c8

Please sign in to comment.