This file contains 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 { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' | |
async componentDidMount() { | |
... | |
this.camera = new THREE.PerspectiveCamera(75, window.innerWidth / (window.innerHeight - navigationBarHeight), 0.1, 1000) | |
this.camera.position.set(0, 0, 3) | |
this.controls = new OrbitControls(this.camera, this.renderer.domElement) | |
This file contains 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 React from 'react'; | |
import * as THREE from "three" | |
const navigationBarHeight = 100 | |
... | |
async componentDidMount() { | |
const mainView = this.mainViewRef.current | |
this.renderer = new THREE.WebGLRenderer({ antialias: true }) |
This file contains 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 React from 'react'; | |
export class AvatarView extends React.Component { | |
mainViewRef = React.createRef() | |
render = () => ( | |
<div | |
ref={this.mainViewRef} | |
className="avatarView" | |
style={{ | |
display: `${!this.props.showIFrame ? 'none': 'block'}`, | |
height: calc(100vh - 100px); |
This file contains 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
# Python 3 | |
# Bulk file renaming script | |
# importing os module | |
import os | |
import re | |
import sys | |
import glob | |
if len(sys.argv) != 5: |
This file contains 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
this.predictor.onPredict = prediction => { | |
for (const key in prediction.blendShapes) { | |
const value = prediction.blendShapes[key] | |
// RPM uses the ARKit key convention ("mouthSmileLeft" as opposed to "mouthSmile_L") | |
const arKitKey = BlendShapeKeys.toARKitConvention(key) | |
// Now... apply these values to moprh target settings in model meshes | |
// three.js example |
This file contains 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
let stream = await navigator.mediaDevices.getUserMedia({ | |
audio: false, | |
video: { | |
width: { ideal: 640 }, | |
height: { ideal: 360 }, | |
facingMode: 'user' | |
} | |
}) | |
predictor.start({ stream }) |
This file contains 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
predictor.onPredict = (results => { | |
console.log(results) | |
}) | |
// or if you like RX | |
this.predictor.dataStream.subscribe((results) => { | |
console.log(results) | |
}) |
This file contains 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 { AUPredictor } from '@quarkworks-inc/avatar-webkit' | |
let predictor = new AUPredictor({ | |
apiToken: ${AVATAR_WEBKIT_AUTH_TOKEN}, | |
... | |
}) |
This file contains 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
from datetime import datetime, timedelta | |
from rest_framework.request import Request | |
from rest_framework.response import Response | |
from rest_framework.status import HTTP_200_SUCCESS | |
from rest_framework.views import APIView | |
import shopify | |
from django.settings import IS_TEST | |
from trynow.models import ( | |
Order, |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>co.quarkworks.jenkins-slave-agent</string> | |
<key>UserName</key> | |
<string>jenkins</string> | |
<key>SessionCreate</key> | |
<true/> |