/arp

Just shared Spark AR - Patch Assets

Just Shared - My Spark AR Patch Assets

| download | - 25 Option Picker.arp

25 Option Picker Image

| download | - 25 Texts Option Picker.arp

25 Texts Option Picker Image

| download | - 3D Line.arp

  • TODO

| download | - Boolean Counter 4.arp

Boolean Counter 4 Image

| download | - Boolean Counter 8.arp

Boolean Counter 8 Image

| download | - Boolean Counter 16.arp

Boolean Counter 16 Image

| download | - Distance Between Line And Point.arp

  • TODO

| download | - FaceLess.arp

Patches work that's copied form Spark AR Community's post

| download | - Fresnel.arp

Fresnel Image

| download | - Fresnel Shader.arp

Since v83 - able to use Patch Assets as Material's Shader

| download | - Fullscreen Plane.arp

Fullscreen Plane Image

| download | - 6 Steps Gaussian Blur.arp

  • TODO

| download | - Loop Animation 2.arp

Loop Animation 2 Image

| download | - Masking Shader.arp

  • TODO

| download | - Masking Shader 2.arp

  • TODO

| download | - Masking Shader 3.arp

  • TODO

| download | - OR PULSE.arp

Like "Pulse Multiplexer" in Spark AR Library

| download | - Pixel Less Shader.arp

Since v83 - able to use Patch Assets as Material's Shader

Pixelless Shader Image

| download | - SDF Round Rectangle.arp

  • TODO

| download | - SDF Round Rectangle 2.arp

  • TODO

| download | - 2D Water Distortion.arp

  • TODO

| download | - World to Focal.arp

World to Focal Image World to Focal Scene Image

const Scene = require('Scene');
const Patches = require('Patches');
const FaceTracking = require('FaceTracking');
export const Diagnostics = require('Diagnostics');

Promise.all([
    Scene.root.findFirst('Camera'),
    Scene.root.findFirst('left_eye'),
    Scene.root.findFirst('right_eye')
]).then(results => {
    const Camera = results[0];
    const face = FaceTracking.face(0);
    const left_eye = results[1];
    const right_eye = results[2];

    left_eye.transform.position = face.leftEye.center;
    right_eye.transform.position = face.rightEye.center;

    Patches.inputs.setScalar('fd',Camera.focalPlane.distance);
    Patches.inputs.setPoint('ct_facePosition',face.cameraTransform.position);
    Patches.inputs.setPoint('wt_leftEyePosition',left_eye.worldTransform.position);
    Patches.inputs.setPoint('wt_rightEyePosition',right_eye.worldTransform.position);
});