Skip to content

Repository files navigation

ReFlex

Software Development SDK for Elastic Displays as open source mono repo

Complete Documentation as github pages available at https://visual-engineers.org/reflex/

  • .NET Core library as framework for different depth sensors, calibration, depth image filtering and reconstruction of interactions
  • APS.NET Core / Angular server application as frontend for library
  • can be packaged as electron app for desktop
  • Example client applications for Plain HTML, Angular, React, Vue.js, Plugins for Unity, Unreal Engine 5
  • Emulator as Development Tool
  • Example Applications

Table of contents

  1. Build status
  2. Repository structure
  3. External Dependencies
  4. use shared code
  5. NPM commands
  6. Python gRPC Processing service
  7. Known issues / Troubleshooting
  8. Updating .NET
  9. Documentation (github pages)

Build status

ReFlex Library (.NET)Library:Test
Shared Types (TypeScript)Shared Types:Build
Shared Components (Angular)Shared Components:Build
Tools/TrackingServer (Angular)Server:Build
Server:Lint
Server:Test
Tools/Emulator (Angular)Emulator:Build

Repository structure

DirectoryContent
appsApplications using the ReFlex framework
designDesign / Graphic source files
docsdocumentation for github pages
examplesTemplates and Plugins (Angular, Vue.js, React, Unreal Engine 5, Unity. .NET)
externalPlace for external libraries, if needed (see External Dependencies)
libraryReFlex .NET library
packagesShared Typescript code between applications (see Use Shared Code)
scriptsadditional automation scripts either for CI or local development
servicesMicro services for extending server capabilities
testTest projects, test artifacts, Insomnia workspace
toolsDeveloper Tools and Server application

⬆ back to top

NPM workspaces

The repository uses NPM workspaces for better management of dependencies

Therefore, the repository should be initialized in the root folder by running the command npm install and not in the sub directories (although there are package.json files, but these files are just handling the local dependencies)

⬆ back to top

Repository initialization

  • run npm run build:shared-types to build shared types library
  • run npm install in root directory
  • if building with electron: Install Electron-Builder globally by running: npm install electron -g

⬆ back to top

Development

  • Adding a new workspace: npm init -w ./path/to/workspace/directory
  • Adding packages to workspace: npm install -w ./path/to/workspace/directory package --save (in workspace root directory)

⬆ back to top

External Dependencies

  • The following dlls need to be placed in the external directory for use with the associated depth cameras
  • Intel RealSense R2/D435/L515Intel.Realsense.dll, libpxcclr.cs.dll, libpxccpp2c.dll, realsense2.dll from Intel RealSense SDK (Files are included as nuget package)
  • Microsoft KinectMicrosoft.Kinect.dll, Microsoft.Kinect.xml from Microsoft Kinect for Windows SDK 2.0
  • for compatibility reasons, no sensors are included in the build process by default. To include specific sensors use the appropriate flags described in the Server documentation

⬆ back to top

use shared code

  • for using reflex-shared-types in another project, just install it as workspace dependency in the current project with

     npm install ./packages/reflex-shared-types -w ./tools/ReFlex.TrackingServer/ClientApp --save
  • types are available by importing @reflex/shared-types

⬆ back to top

NPM commands

CommandDescriptionRemarks
npm run buildruns build command in all subrepos of workspace
npm run build-completeruns build command in all subrepos of workspace, including test-ci and lint commands
npm run build:shared-typesbuilds package Shared Types
npm run build:shared-componentsbuilds Shared Angular Components(#use-shared-code)
npm run build:server:electron-winbuilds ReFlex.TrackingServer as Electron app packaged for Windows
npm run build:server:electron-osxbuilds ReFlex.TrackingServer as Electron app packaged for OSX (Intel x64)needs to be run on macOS
npm run build:server:electron-osx-arm64builds ReFlex.TrackingServer as Electron app packaged for OSX (ARM64)needs to be run on macOS
npm run build:server:electron-linuxbuilds ReFlex.TrackingServer as Electron app packaged for Linux (x64)
npm run build:server:electron-linux-arm64builds ReFlex.TrackingServer as Electron app packaged for Linux (ARM64)
npm run build:emulatorbuilds Emulator Angular App
npm run build:emulator:electron-winbuilds Emulator as Electron app packaged for Windows (x64)npm install is executed after packaging to restore the dev dependencies
npm run build:emulator:electron-osxbuilds Emulator as Electron app packaged for Windows (x64)npm install is executed after packaging to restore the dev dependencies, needs to be run on macOS
npm run build:emulator:electron-osx-arm64builds Emulator as Electron app packaged for Windows (x64)npm install is executed after packaging to restore the dev dependencies, needs to be run on macOS
npm run build:emulator:electron-linuxbuilds Emulator as Electron app packaged for Windows (x64)npm install is executed after packaging to restore the dev dependencies
npm run build:emulator:electron-linux-arm64builds Emulator as Electron app packaged for Windows (x64)npm install is executed after packaging to restore the dev dependencies
npm run build:example-angularbuilds Angular Template
npm run build:example-reactbuilds React Template
npm run build:example-vuebuilds Vue.js Template
npm run build:loggingbuilds Logging tool
npm run start:emulatorbuild and start Emulator Angular app on localhost:4300
npm run start:example-angularbuild and start Angular Template on localhost:4201
npm run start:example-reactbuild and start React Template on localhost:3000
npm run start:example-vuebuild and start Vue.js Template on localhost:8080
npm run start:loggingbuild and start Logging tool on localhost:4302
npm run start:serverbuild and start ReFlex.TrackingServer tool (only Angular frontend) on localhost:4200Server backend must be started separately
npm run lint:emulatorexecutes linter on Emulator project
npm run lint:serverexecutes linter on ReFlex.TrackingServer project
npm run test:emulatorexecutes tests on Emulator project
npm run test:net-with-reportexecutes .NET tests on .NET Solution ReFlex.sln and generates report for testsCurrently only compatible with Windows
npm run test:serverexecutes tests on ReFlex.TrackingServer project

Known issues

  • Electron seems not to be perfectly suitable to be used in monorepos, as building the app in the package process removes all dev dependencies, including the electron-builder package if installed locally
    Therefore, electron-builder needs to be installed globally before executing a build:emulator:electron-xxx script
  • Additionally, npm install is executed after packaging to restore the dev dependencies
  • if a command build:emulator:electron-xxx is executed from within the emulator project, npm install has to be executed manually afterwards
  • test and build-complete commands start a headless Chrome instance and therefore require Chrome to be installed and path to Chrome binary to be set in PATH.

⬆ back to top

Python gRPC Processing service

  • as an example for integrating external services, a python gRPC service for extracting interactions from the camera depth image is provided in services/python-backend
  • service is consumed when setting Interaction Processor to Remote
  • in the ReFlex.TrackingServer, the service is configured in Services/RemoteInteractionProcessingService.cs
  • Documentation: Python gRPC service

⬆ back to top

Known issues / Troubleshooting

  • Karma Test Explorer Plugin for vs code does not work well with the current npm workspace setup, as it does not identify the correct angular path. In order to use the plugin, the global angular installation is used as fallback.

  • if an application behaves different when executing the packaged electron version (either installed using the setup or the executable in the win-unpacked directory)), this may be caused by outdated Electron Cache. In this case, open

    • %AppData% Folder (Windows)
    • ~/.config Folder (Linux)
    • ~/Library/Application Support/ (MacOS)
      and delete the app folder there
  • to delete all temporary folders / cached packages / build artifacts, run the following command in the scripts folder:

     ./cleanup_packages.sh package-directories.txt

⬆ back to top

Updating .NET

  • The .NET version which is used to build the ReFlex Solution is specified in the global.json file in the root directory
  • .NET versions must be updated in all projects (library) and Server component of tools/ReFlex.TrackingServer as well als examples/ExampleWPF and examples/MAUI
  • After a .NET Update this need to be changed to the matching .NET version in global.json, to ensure compatibility
  • global.json is needed especially for CI, as th github action setup-dotnet by defauilt installs the newest version and build the solution with this version, which is likely to cause errors

⬆ back to top

Documentation (github pages)

Documentation is hosted as github page at https://visual-engineers.org/reflex.

The documentation content for the github pages can be found in the docs folder.

repository readme files

readme files in the repository (including this file) are copied into the docs directory as part of the deployment CI step by executing the scripts\copy_docs.sh shell script.

The related readme files are:

repo readmetarget directorysection in pages
readme.mddocs/software/repo/reflex.mdSoftware > Repository > ReFlex Framework
library/README.mddocs/software/repo/library.mdSoftware > Repository > ReFlex Library (.NET)
tools/ReFlex.TrackingServer/readme.mddocs/software/apps/server.mdSoftware > Applications > Server
tools/logging/README.mddocs/software/apps/logging.mdSoftware > Applications > Logging
tools/emulator/README.mddocs/software/apps/emulator.mdSoftware > Repository > Emulator

Testing github pages locally

testing the github pages can be done by following the instruction at Github Docs: Testing your GitHub Pages site locally with Jekyll

⬆ back to top

About

Software Development Kit for Elastic Displays

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages