Skip to content

Instantly share code, notes, and snippets.

View cedricpinson's full-sized avatar

Cedric Pinson cedricpinson

View GitHub Profile
@cedricpinson
cedricpinson / shadernode
Last active August 29, 2015 14:10
shader node api tests
var inputVariables = [ a, b, c];
var outputVariable = factory.getVariable('vec4','outputResult');
factory.getNodeAdd().inputs(inputsVariables).output(outputVariable);
var normal = this.getOrCreateNormal();
var lightingInputs = {
lights: lights
normal: normal,
<link rel="stylesheet" type="text/css" href="http://www.(SITEWEB).com/sketchfab.css">
<div class="holder">
<iframe width="100%" height="100%" src="https://sketchfab.com/models/375ae80dc7e34b229cc9739b1ce92e2b/embed?autostart=1&autospin=0.2&controls=0&transparent=1&ui_watermark=0&stop_button=0&desc_button=0" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>
<a class="bouton" href="#blank">
<div class="bar">
<div class="info-bulle">
<p>Powered by <b>Sketchfab</b></p>
</div>
</div>
</a>
#!/bin/bash
path="./"
filename="Ellly.blend"
file=${path}${filename}
description="Test of the api with a simple model"
token_api="ff00ff"
title="test upload model"
tags="test blender character"
private=1
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
register_openers()
filename="../data/model.zip"
description="Test of the api with a simple model"
token_api="xxxxxxxxxxxxxxxxx"
title="model title"
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
require "uri"
require "net/https"
require "base64"
require 'rubygems'
require "json"
screenshot="../data/thumbnail.png"
@cedricpinson
cedricpinson / upload_model.sh
Created December 7, 2012 20:25
bash/curl upload model to sketchfab
#!/bin/bash
path="./"
filename="Ellly.blend"
file=${path}${filename}
description="Test of the api with a simple model"
token_api="ff00ff"
title="Uber Glasses"
tags="test collada glasses"
private=1
@cedricpinson
cedricpinson / gist:5295809
Created April 2, 2013 20:18
start command for sketchfab-iframe
var promise = start('lryj5P1gwkVTmAI53wdqfmUWFym', {
"nocamera": 1, // no camera animation at start
"autostart": 1, // start when loaded
"transparent": 1, // set the background transparent
"controls": 0, // remove the control UI
"desc_button":0, // remove description UI
"stop_button":0 // remove the stop button
});
@cedricpinson
cedricpinson / gist:5295831
Created April 2, 2013 20:21
stop command
var promise = stop();
@cedricpinson
cedricpinson / gist:5295874
Created April 2, 2013 20:26
lookat command
var promise = lookat( [ 0,13,10], // eye position
[0,10,0], // target to lookat
4.3); // duration of the animation
@cedricpinson
cedricpinson / gist:5303078
Created April 3, 2013 16:59
start stop example
var sketchfabModule = window['sketchfab-iframe'];
var moduleVersion = sketchfabModule.version;
var Sketchfab = sketchfabModule.Sketchfab;
var Q = sketchfabModule.Q;
// example with only start stop
var urlid = "z9Psf5XIvSeuJYiMnuBgeRjLwql";
var iframeWindow = $('#myIframe')[0];
var api = new Sketchfab(iframeWindow);