This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adam ferris found it: | |
#import <lights> | |
struct PhongMaterialParameters { | |
vec3 emission; | |
vec3 ambientFactor; | |
vec3 diffuseFactor; | |
vec3 specularFactor; | |
float shininess; | |
float occlusion; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import numpy as np | |
import cv2 | |
from keras.applications.imagenet_utils import preprocess_input | |
from keras.layers import Dense, Reshape | |
from keras.models import Sequential, Model, load_model | |
from keras.applications.resnet50 import ResNet50 | |
from keras.optimizers import Adam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const t = require('Time'); | |
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const objText = Scene.root.find('2dText0'); | |
let frame = 0; | |
const round = (val, precision = 1) => { | |
const multiplier = Math.pow(10, precision || 0); | |
return Math.round(val * multiplier) / multiplier; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// | |
// Plexus | |
// Collab by Ben Ursu & Dan Cronin | Afrosquared | |
// Spark AR Studio | |
// Instagram | https://www.instagram.com/a/r/?effect_id=2029175904053487 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================== | |
// The following example demonstrates how to store, retrieve and remove data | |
// across multiple sessions. | |
// | |
// Project setup: | |
// - Insert two rectangles | |
// - Insert text | |
// - Position the rectangles and text so that all are visible | |
// - Add 'data' to 'Whitelisted keys' under the 'Persistence' Capability | |
// - Add the 'Tap Gesture' capability under 'Touch Gestures' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Particle } from './Particle'; | |
import { Ease } from './PFTween'; | |
const FaceTracking = require("FaceTracking"); | |
const HeadRotationTrigger = require("./sparkar-head-rotation-trigger.js"); | |
const EventHelpers = require("./sparkar-event-helpers.js"); | |
const Scene = require('Scene'); | |
const TouchGestures = require('TouchGestures'); | |
const Diagnostics = require('Diagnostics'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Scene = require('Scene') | |
const Animation = require('Animation') | |
Scene.root.findFirst('emitter0').then(obj => { | |
const alphaSampler = Animation.samplers.HSVA([ | |
Animation.samplers.constant(1), | |
Animation.samplers.constant(1), | |
Animation.samplers.constant(1), | |
Animation.samplers.easeInQuad(1, 0) | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Scene = require('Scene'); | |
const Reactive = require('Reactive'); | |
const TouchGestures = require('TouchGestures') | |
var mug_ctrl = Scene.root.find('portal') | |
var planeTracker = Scene.root.find('planeTracker0'); | |
TouchGestures.onTap().subscribe(function(gesture) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#source https://github.com/matterport/Mask_RCNN/issues/1361 | |
#You can 'filter out' classes you don't need after you run the detection but it doesn't prune the weights though. So, I'm not sure it would speed things up. Hope it helps. | |
# COCO class names | |
class_names = ['BG', 'person', 'bicycle', 'car', 'motorcycle', 'airplane', | |
'bus', 'train', 'truck', 'boat', 'traffic light', | |
'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', | |
'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', | |
'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
vec4 textureColor = texture2D(sTexture, vTextureCoord); | |
vec3 fragRGB = textureColor.rgb; | |
vec3 fragHSV = rgb2hsv(fragRGB); | |
float h = vHSV.x / 360.0; | |
fragHSV.x *= h; | |
fragHSV.yz *= vHSV.yz; | |
fragHSV.x = mod(fragHSV.x, 1.0); | |
fragHSV.y = mod(fragHSV.y, 1.0); | |
fragHSV.z = mod(fragHSV.z, 1.0); |