Skip to content

Instantly share code, notes, and snippets.

@hyperlogic
hyperlogic / texture-scrape.py
Created October 16, 2019 21:50
download the fbx and textures for an avatar
#
# texture-scrape.py url.to.fst
#
import sys, urllib.request, urllib.parse, re, json, os
import shutil
fst_url = sys.argv[1]
# create a temp dir to hold contents of the avatar
{
"root": {
"children": [
],
"data": {
"endFrame": 300,
"loopFlag": true,
"startFrame": 1,
"timeScale": 1,
"url": "qrc:///avatar/animations/idle.fbx"
{
"root": {
"children": [
],
"data": {
"endFrame": 83,
"loopFlag": false,
"startFrame": 83,
"timeScale": 1,
"url": "http://hifi-content.s3.amazonaws.com/ozan/dev/anim/standard_anims_160127/kneel.fbx"
// bugz-1538 repro subject script
// TODO: connect to domain.
function onMessageHandler(channel, message, sender) {
if (channel !== "ajt-repro") {
return;
}
var data = JSON.parse(message);
// Identifier for the animation state handler, we use this to remove the handler at the end of the script.
var animHandlerId;
var testTrigger = false;
var additiveBlendAlpha = 0.0;
var lookLeftRightAlpha = 0.0;
var lookUpDownAlpha = 0.0;
// Called every frame with the current value for the requested anim vars.
function animHandler(props) {
{
"root": {
"children": [
{
"children": [
],
"data": {
"endFrame": 300,
"loopFlag": true,
"startFrame": 1,
@hyperlogic
hyperlogic / additive-blend-test.js
Last active August 29, 2019 17:52
additive blending test script
// Identifier for the animation state handler, we use this to remove the handler at the end of the script.
var animHandlerId;
var testTrigger = false;
var additiveBlendAlpha = 0.0;
var lookLeftRightAlpha = 0.0;
// Called every frame with the current value for the requested anim vars.
function animHandler(props) {
props.additiveBlendAlpha = additiveBlendAlpha;
@hyperlogic
hyperlogic / additive-blend-test.json
Last active August 29, 2019 17:51
json for additive blending
{
"root": {
"children": [
{
"children": [
],
"data": {
"endFrame": 1,
"loopFlag": false,
"startFrame": 1,
var POSITIVE_KEY = "z";
var NEGATIVE_KEY = "c";
var RAISE_HAND_KEY = "v";
var APPLAUD_KEY = "b";
var POINT_KEY = "n";
function init() {
Controller.keyPressEvent.connect(keyPressHandler);
Controller.keyReleaseEvent.connect(keyReleaseHandler);
// Identifier for the animation state handler, we use this to remove the handler at the end of the script.
var animHandlerId;
var idleTrigger = false;
var kneelTrigger = false;
var slowKneelTrigger = false;
var jjTrigger = false;
var waveTrigger = false;
var overlayAlpha = 0.0;
var overlayBoneSet = 0; // fullBody