Skip to content
master
Go to file
Code

Latest commit

## [1.24.0](v1.23.0...v1.24.0) (2020-08-29)

#### Features

* **Tracking:** ability to determine surface validity by target point ([30d1a45](30d1a45))
  > The new TargetPointValidity rule allows a type of Vector3Rule to be used to determine if the located point of the RayCast in the SurfaceLocator should be considered a valid target.
  >
  > This can be used with the NavMeshRule to determine if a point on a surface is within the NavMesh boundaries.
  >
  > The stub Vector3 rule has been moved out of the StraightLineCastTest and into its own stub so it can be used in multiple places. This is instead of testing with the actual NavMeshRule.
* **Transformation:** add common float aggregate functions ([26ce17c](26ce17c))
  > A number of aggregate functions for float collections have been added to return common aggregates such as:
  >
  > * Mean * Median * Mode * Min * Max * Range

#### Bug Fixes

* **Extraction:** extract correct direction based on UseLocal setting ([46e2fa7](46e2fa7))
  > The UseLocal setting was not returning data that made sense. The `UseLocal = false` was just returning the world direction Vector which had nothing to do with the `Source` so it made little sense to have it part of the TransformDirectionExtractor.
  >
  > The `UseLocal = true` setting was actually returning the world direction of the `Source` so this is now the `UseLocal = false` operation as `Source.transform.forward` is actually the world forward direction of the `Source` even if it is a nested GameObject with multiple parent rotations.
  >
  > This means the `UseLocal = true` setting is now the local direction of the `Source` GameObject so if it is a nested child with an additional parent rotation then the local forward is purely the local rotation of the GameObject multiplied by the world forward constant (Vector3.forward).
  >
  > Whilst this will introduce a breaking change, it's actually a fix for operations that were not correct, so it's not a feature including breaking changes, it's actually fixing inaccurate behaviour.
* **Tracking:** ensure correct axis is rotated around ([ad9c1cf](ad9c1cf))
  > The RotateAroundAngularVelocity was using the rotate axis as the current target rotation multiplied by the target direction which will only work if the target isn't rotated. It only needs to rotate around the target direction as this is already taking rotation of the target into consideration.
12eb96c

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Zinnia logo

Zinnia

A collection of design patterns for solving common problems.

[zin-ee-uh]

Release License Backlog

Introduction

Zinnia is a collection of design patterns for the Unity software that can be beneficial in (but not limited to) spatial computing development.

Requires the Unity software version 2018.3.10f1 (or above).

Getting Started

Setting up a project

  • Using the Unity software version 2018.3.10f1 (or above), create a new project using the 3D Template or open an existing project.
  • Ensure the project Scripting Runtime Version is set to .NET 4.x Equivalent.
    • In the Unity software select Main Menu -> Edit -> Project Settings to open the Project Settings inspector.
    • Select Player from the left hand menu in the Project Settings window.
    • In the Player settings panel expand Other Settings.
    • Ensure the Scripting Runtime Version is set to .NET 4.x Equivalent.

Adding the package to the Unity project manifest

  • Navigate to the Packages directory of your project.

  • Adjust the project manifest file manifest.json in a text editor.

    • Ensure https://registry.npmjs.org/ is part of scopedRegistries.
      • Ensure io.extendreality is part of scopes.
    • Add io.extendreality.zinnia.unity to dependencies, stating the latest version.

    A minimal example ends up looking like this. Please note that the version X.Y.Z stated here is to be replaced with the latest released version which is currently Release.

    {
      "scopedRegistries": [
        {
          "name": "npmjs",
          "url": "https://registry.npmjs.org/",
          "scopes": [
            "io.extendreality"
          ]
        }
      ],
      "dependencies": {
        "io.extendreality.zinnia.unity": "X.Y.Z",
        ...
      }
    }
  • Switch back to the Unity software and wait for it to finish importing the added package.

Running the tests

If you want to run the tests that come with Zinnia please follow these steps.

Because Zinnia is a package tests have to be explicitly enabled for this package, before the Test Runner can pick them up.

  • Navigate to the Packages directory of your project.

  • Adjust the project manifest file manifest.json in a text editor.

    • Ensure io.extendreality.zinnia.unity is part of testables.

    A minimal example ends up looking like this.

    {
      "scopedRegistries": [
        ...
      ],
      "testables": [
        "io.extendreality.zinnia.unity"
      ],
      "dependencies": {
        ...
      }
    }
  • As noted in the official Unity documentation:

    NOTE: You may need to re-import the package, because the test framework doesn't always immediately pick up changes to the testables attribute.

    • Within the Unity software's Project window expand the Packages node.
    • Right-click on the Zinnia.Unity child node and choose Reimport.
    • Wait for the Unity software to finish re-importing the package.
  • In the Unity software select Main Menu -> Window -> Test Runner.

  • Within the Test Runner window click on the PlayMode tab and the click Run All button.

  • If all the tests pass then the installation was successful.

Note: The tests are not compatible with the Run all in player option.

Updating to the latest version

The package will show up in the Unity Package Manager UI once the above steps have been carried out. From then on the package can be updated by selecting the package in the Unity Package Manager and clicking on the Update button or using the version selection UI.

Naming

Inspired by the Zinnia genus of plants known for their colorful, long lasting flower heads and their great ease to grow from seeds. This repository, much like the Zinnia flower aims to be easy to use and allow your projects to grow and flourish into long lasting, easy to maintain solutions.

Fun Fact: Zinnias have been grown aboard the International Space Station and have demonstrated the capability to blossom in a weightless environment.

Contributing

Please refer to the Extend Reality Contributing guidelines and the Unity project coding conventions.

Code of Conduct

Please refer to the Extend Reality Code of Conduct.

License

Code released under the MIT License.

Disclaimer

These materials are not sponsored by or affiliated with Unity Technologies or its affiliates. "Unity" is a trademark or registered trademark of Unity Technologies or its affiliates in the U.S. and elsewhere.

You can’t perform that action at this time.