Skip to content

marthed/VR-VPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VR-VPL

A visual programming language for XR based on Blockly.


Setup

  1. Use Unity 2020.2.4f1
  2. Clone repo
  3. Setup for project for VR development
  4. Install external packages
    • Download and import Bolt from Unity Assets Store.
    • Download Oculus SDK and add it in the Oculus folder. Assets->Oculus.
    • Download BetterStreamingAssets and import it to Unity.
    • Add other missing assets and update the list here if needed.
  5. Build to Oculus Quest

Latest version

0.2

Unity scene

CodeSpace

Responsible for converting Unity-Blocks to Blockly-Javascript code. Also responsible for Block connection/disconnection behavior in 3D-space. Root GameObject of all Blocks.

  • Toolbox: Responsible for creating new Block GameObjects and providing a menu of Block options. NOTE: Current scene (4/11-21) does not make use of the Toolbox, instead 2 Blocks are set before runtime.

Web

  • Browser. Uses a Gecko (Mozilla) browser plugin to render web content.
  • HTTP server. Serves a HTML-page.

Data Flow Controls

Responsible for coordinating actions between CodeSpace and Web.
Observes the CodeSpace. When notified, sets updated Blockly-code on server and refreshes the browser.

Block

Basic building block (no-pun intended) for application.
Based on Blockly Blocks.
Has one OutputConnector and one(or more) InputConnectors.
Ex: An If-statement (controls_if) Block has two inputs.

if ([INPUTCONNECTOR1]) {
  [INPUTCONNECTOR2]
}

The OutputConnector is the entire statement/expression/value of the Block.
Ex: A logical operator (logic_compare) can be connected to the control_if Block.

  [INPUTCONNECTOR1] === [INPUTCONNECTOR2]
if ([INPUTCONNECTOR1_OF_LOGIC_COMPARE] === [INPUTCONNECTOR2_OF_LOGIC_COMPARE]) {
  [INPUTCONNECTOR2_OF_CONTROLS_IF]
}

Block connection is detected by OnTriggerEnter() of Block InputConnector.
CodeSpace stores a connectionId, info on which Blocks are connected and sets the Unity Physics behavior (e.g. set transform Parent, set position, disable Rigidbody etc).

NOTE: Block connection/disconnection behavior is under construction.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors