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
license: mit |
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
if (typeof web3 !== 'undefined') { | |
web3 = new Web3(web3.currentProvider); | |
} else { | |
// set the provider you want from Web3.providers | |
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
} | |
//console.log(web3); // {eth: .., shh: ...} // it's here! |
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
# Blender Python script to triangulate obj coming from Google Blocks | |
# result http://vatelier.net/MyDemo/TestingTriangulation/ | |
# via https://blender.stackexchange.com/questions/34537/how-to-batch-convert-between-file-formats | |
import bpy # Python interface for Blender, use Shift+F4 to start the interactive console. | |
# alternatively for headless server side batch conversion use blender -b -P triangulate_obj.py | |
import os | |
def convert_in_dir(path): | |
for root, dirs, files in os.walk(path): | |
for f in files: |
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 bpy | |
ob = bpy.context.object # get the active object | |
mesh = ob.data | |
for area in bpy.context.screen.areas: | |
if area.type == 'VIEW_3D': | |
for space in area.spaces: | |
if space.type == 'VIEW_3D': | |
space.viewport_shade = 'MATERIAL' | |
bpy.context.scene.game_settings.material_mode = 'GLSL' |
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 Blender to WebVR in 1 click (warning: you need your own backend but a 1 php file is enough) | |
demo https://www.youtube.com/watch?v=PD1qTKp5DZ4 | |
improvments | |
JS traverser to start/stop animations and change morph target values | |
render as 360 rather than mesh, either as an option and/or beyond a threshold | |
for addon proper https://docs.blender.org/manual/en/dev/advanced/scripting/addon_tutorial.html |
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
# 360 map for offline rendering of an existing heavy scene | |
""" | |
example of player https://vatelier.net/MyDemo/Browsable360s/ | |
improvement | |
- have an example WITHOUT a mesh in the middle creating a black screen, duh | |
- fading in/out with a bit of virtual camera movement for target loading | |
- stero renders |
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
[Port 14] Generic SuperSpeed USB Hub | |
[Port 1] USB Composite Device | |
HoloLens Sensors | |
USB Input Device | |
HID-compliant device | |
HID-compliant device | |
HoloLens Sensors | |
Samsung Windows Mixed Reality 800ZAA | |
Select filter to monitor (q to quit): 14 | |
Invalid input |
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
// use the s shortcut to toggle autoscroll | |
var as; document.onkeyup = function(e) { | |
if(e.key == "s"){ | |
if (!as) { | |
as = setInterval( () => { document.querySelector("#viewerContainer").scrollBy(0, 1) } , 100 ); | |
// for a normal page use window.scrollBy instead | |
} else { | |
clearInterval(as); as = null; scrolling = false; | |
} | |
} |
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
for(var el of document.querySelectorAll('a[href$="500"]')){el.parentElement.parentElement.parentElement.style.display="none"} |
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
// cf https://support.glitch.com/t/exporting-all-projects/9367/2 | |
const fetch = require('node-fetch'); | |
const wget = require('node-wget'); | |
// cf localStorage.cachedUser in Glitch editor | |
var OWNER_TOKEN = "xxxx-yyyy-zzzzz-aaaa-bbbbb" | |
var USER_ID = "123456" | |
var PROJECT_ID = "" | |
var urlAllProjects = `https://api.glitch.com/users/${USER_ID}?authorization=${OWNER_TOKEN}` |