I added a few methods to three-orbit-controls to be able to manually define phi or theta and be able to rotate to a given point.
// rotation in Y
controls.setAzimuthalAngle(theta);
// rotation in X
controls.setPolarAngle(phi);
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<path id="svg" fill="#5DD7FC" d="M0.5,262.094c0,0,52.172,79.049,158.323,77.241c68.433-2.031,165.549-32.296,191.523-132.123 | |
c0,0,27.893,4.742,47.654-16.939c-26.99,3.727-44.944-4.743-44.944-4.743s35.346-1.017,43.137-21.908 | |
c-20.89,9.035-46.751,1.355-46.751,1.355S337.245,90.22,262.939,87.51c0,0,39.713-8.093,33.502-17.24 | |
c-4.968-6.663-32.597,5.722-32.597,5.722s15.396-6.776,15.057-14.003c-15.584,1.806-29.888,13.325-29.888,13.325 | |
s4.365-7.001,4.44-9.937c-37.114,20.628-62.334,97.455-62.334,97.455s-9.411-10.427-25.07-21.72 | |
C128.257,118.829,58.544,92.479,58.544,92.479s-4.668,28.759,32.522,49.838c-15.207,1.205-22.886,3.162-22.886,3.162 |
// http://www.iquilezles.org/www/articles/morenoise/morenoise.htm | |
// Hector Arellano | |
float rand(vec2 co){ | |
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); | |
} | |
const float inv289 = 0.00346020761; |
varying float depth; | |
uniform float mNear; | |
uniform float mFar; | |
vec4 pack_depth(float value) { | |
return vec4(floor(value * 256.0)/255.0, floor(fract(value * 256.0) * 256.0)/255.0 , floor(fract(value * 65536.0) * 256.0)/255.0, 1.0); | |
} |
import THREE from 'three' | |
import WAGNER from '@superguigui/wagner' | |
import Config from '../../config' | |
import Mediator from '../../utils/Mediator.js' | |
let gui = require('dat-gui').GUI | |
let config = Config.instance |
const base64 = require('base-64'); | |
const zpipe = require("zpipe"); | |
const jsonpClient = require('jsonp-client') | |
export default class DepthDecoder { | |
constructor(panoID) { |
projectionOnScreen() { | |
this.screenSpacePosition.copy( this.objectposition ).project( this.camera ); | |
this.screenSpacePosition.x = ( this.screenSpacePosition.x + 1 ) / 2; | |
this.screenSpacePosition.y = ( this.screenSpacePosition.y + 1 ) / 2; | |
} |
I added a few methods to three-orbit-controls to be able to manually define phi or theta and be able to rotate to a given point.
// rotation in Y
controls.setAzimuthalAngle(theta);
// rotation in X
controls.setPolarAngle(phi);
var ncp = require('ncp').ncp; | |
var copyobj = require('../package.json').copy; | |
for (var prop in copyobj) { | |
ncp(copyobj[prop].src, copyobj[prop].dest, function (err) { | |
if (err) { | |
return console.error(err); |
this.tInput = this.webGL_createTexture(2048.0, this.GL.RGBA, this.GL.NEAREST, this.GL.NEAREST, this.GL.UNSIGNED_BYTE, true); | |
WebglFrag.prototype.webGL_createTexture = function(textureSize, format, maxFilter, minFilter, type, unBind) { | |
var texture = this.GL.createTexture(); | |
texture.size = textureSize; | |
this.GL.bindTexture(this.GL.TEXTURE_2D, texture); |
addTouchEvent() { | |
console.log('readd') | |
this.wrapper = document.querySelector('.wrapper') | |
let bla = ["touchstart", "touchend", "touchmove"] | |
bla.forEach( (func)=> { |