Socket
Book a DemoInstallSign in
Socket

com.github.asus4.texture-source

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.github.asus4.texture-source - npm Package Compare versions

Comparing version

to
0.2.2

2

package.json
{
"name": "com.github.asus4.texture-source",
"version": "0.2.1",
"version": "0.2.2",
"displayName": "TextureSource",

@@ -5,0 +5,0 @@ "description": "Simplify WebCamera and test video handling for using Computer Vision in Unity",

# Texture Source
[![upm](https://img.shields.io/npm/v/com.github.asus4.texture-source?label=upm)](https://www.npmjs.com/package/com.github.asus4.texture-source)
TextureSource is a utility that provides a consistent API to get the texture from various sources.
![virtual-texture](https://github.com/asus4/TextureSource/assets/357497/e52f80d2-b1be-4cfa-81f7-76cdafe271bc)
## Example API Usage
```c#
using TextureSource;
using UnityEngine;
[RequireComponent(typeof(VirtualTextureSource))]
public class TextureSourceSample: MonoBehaviour
{
private void Start()
{
// Listen to OnTexture event from VirtualTextureSource
// Also able to bind in the inspector
if (TryGetComponent(out VirtualTextureSource source))
{
source.OnTexture.AddListener(OnTexture);
}
}
private void OnDestroy()
{
if (TryGetComponent(out VirtualTextureSource source))
{
source.OnTexture.RemoveListener(OnTexture);
}
}
public void OnTexture(Texture texture)
{
// Do whatever 🥳
// You don't need to think about webcam texture rotation.
}
}
```
## Install via UPM

@@ -21,3 +60,3 @@

"dependencies": {
"com.github.asus4.texture-source": "0.2.1",
"com.github.asus4.texture-source": "0.2.2",
...// other dependencies

@@ -34,3 +73,3 @@ }

Then, right-click on the project panel and create the TexureSource scriptable object that you want to use. You can set different sources for the Editor and Runtime.
Then, right-click on the project panel and create the TextureSource scriptable object that you want to use. You can set different sources for the Editor and Runtime.

@@ -41,3 +80,3 @@ ![scriptable-object](https://github.com/asus4/TextureSource/assets/357497/6c4862e2-5298-4f4e-8cd5-076d54d46db8)

#### WebCam Texture Source
### WebCam Texture Source

@@ -48,3 +87,3 @@ Includes collecting device rotation.

#### Video Texture Source
### Video Texture Source

@@ -55,7 +94,7 @@ Useful when using test videos only in the Editor.

#### AR Foundation Texture Source
### AR Foundation Texture Source
Provides AR camera texture access. It supports both ARCore/ARKit.
![ar-faoundation-texture-source](https://github.com/asus4/TextureSource/assets/357497/5ac82a8a-0554-41a2-b9ef-c03ebd60c6ff)
![ar-foundation-texture-source](https://github.com/asus4/TextureSource/assets/357497/5ac82a8a-0554-41a2-b9ef-c03ebd60c6ff)

@@ -62,0 +101,0 @@ ## Acknowledgement

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.