提交 7dcba1d3 编写于 作者: A aardgoose

fix merge conflict

......@@ -1928,6 +1928,8 @@
Object.assign( Quaternion, {
isQuaternion: true,
slerp: function ( qa, qb, qm, t ) {
return qm.copy( qa ).slerp( qb, t );
......@@ -12787,6 +12789,9 @@
data.envMap = this.envMap.toJSON( meta ).uuid;
data.reflectivity = this.reflectivity; // Scale behind envMap
if ( this.combine !== undefined ) data.combine = this.combine;
if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;
}
if ( this.gradientMap && this.gradientMap.isTexture ) {
......@@ -15635,14 +15640,22 @@
* @author Artur Trzesiok
*/
function Texture3D( data, width, height, depth, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
function Texture3D( data, width, height, depth ) {
Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
// We're going to add .setXXX() methods for setting properties later.
// Users can still set in Texture3D directly.
//
// var texture = new THREE.Texture3D( data, width, height, depth );
// texture.anisotropy = 16;
//
// See #14839
Texture.call( this, null );
this.image = { data: data, width: width, height: height, depth: depth };
this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
this.magFilter = NearestFilter;
this.minFilter = NearestFilter;
this.generateMipmaps = false;
this.flipY = false;
......@@ -37155,6 +37168,7 @@
if ( json.fog !== undefined ) material.fog = json.fog;
if ( json.flatShading !== undefined ) material.flatShading = json.flatShading;
if ( json.blending !== undefined ) material.blending = json.blending;
if ( json.combine !== undefined ) material.combine = json.combine;
if ( json.side !== undefined ) material.side = json.side;
if ( json.opacity !== undefined ) material.opacity = json.opacity;
if ( json.transparent !== undefined ) material.transparent = json.transparent;
......@@ -37288,6 +37302,7 @@
if ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );
if ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );
if ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;
if ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity;
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -1922,6 +1922,8 @@ function Quaternion( x, y, z, w ) {
Object.assign( Quaternion, {
isQuaternion: true,
slerp: function ( qa, qb, qm, t ) {
return qm.copy( qa ).slerp( qb, t );
......@@ -12781,6 +12783,9 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
data.envMap = this.envMap.toJSON( meta ).uuid;
data.reflectivity = this.reflectivity; // Scale behind envMap
if ( this.combine !== undefined ) data.combine = this.combine;
if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;
}
if ( this.gradientMap && this.gradientMap.isTexture ) {
......@@ -15629,14 +15634,22 @@ Object.defineProperty( CubeTexture.prototype, 'images', {
* @author Artur Trzesiok
*/
function Texture3D( data, width, height, depth, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
function Texture3D( data, width, height, depth ) {
Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
// We're going to add .setXXX() methods for setting properties later.
// Users can still set in Texture3D directly.
//
// var texture = new THREE.Texture3D( data, width, height, depth );
// texture.anisotropy = 16;
//
// See #14839
Texture.call( this, null );
this.image = { data: data, width: width, height: height, depth: depth };
this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
this.magFilter = NearestFilter;
this.minFilter = NearestFilter;
this.generateMipmaps = false;
this.flipY = false;
......@@ -37149,6 +37162,7 @@ Object.assign( MaterialLoader.prototype, {
if ( json.fog !== undefined ) material.fog = json.fog;
if ( json.flatShading !== undefined ) material.flatShading = json.flatShading;
if ( json.blending !== undefined ) material.blending = json.blending;
if ( json.combine !== undefined ) material.combine = json.combine;
if ( json.side !== undefined ) material.side = json.side;
if ( json.opacity !== undefined ) material.opacity = json.opacity;
if ( json.transparent !== undefined ) material.transparent = json.transparent;
......@@ -37282,6 +37296,7 @@ Object.assign( MaterialLoader.prototype, {
if ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );
if ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );
if ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;
if ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity;
......@@ -4,12 +4,8 @@
<title>three.js / editor</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
</head>
<body ontouchstart="">
<link href="css/main.css" rel="stylesheet" />
......
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.BoxLineGeometry = function ( width, height, depth, widthSegments, heightSegments, depthSegments ) {
THREE.BufferGeometry.call( this );
width = width || 1;
height = height || 1;
depth = depth || 1;
widthSegments = Math.floor( widthSegments ) || 1;
heightSegments = Math.floor( heightSegments ) || 1;
depthSegments = Math.floor( depthSegments ) || 1;
var widthHalf = width / 2;
var heightHalf = height / 2;
var depthHalf = depth / 2;
var segmentWidth = width / widthSegments;
var segmentHeight = height / heightSegments;
var segmentDepth = depth / depthSegments;
var vertices = [];
var x = - widthHalf, y = - heightHalf, z = - depthHalf;
for ( var i = 0; i <= widthSegments; i ++ ) {
vertices.push( x, - heightHalf, - depthHalf, x, heightHalf, - depthHalf );
vertices.push( x, heightHalf, - depthHalf, x, heightHalf, depthHalf );
vertices.push( x, heightHalf, depthHalf, x, - heightHalf, depthHalf );
vertices.push( x, - heightHalf, depthHalf, x, - heightHalf, - depthHalf );
x += segmentWidth;
}
for ( var i = 0; i <= heightSegments; i ++ ) {
vertices.push( - widthHalf, y, - depthHalf, widthHalf, y, - depthHalf );
vertices.push( widthHalf, y, - depthHalf, widthHalf, y, depthHalf );
vertices.push( widthHalf, y, depthHalf, - widthHalf, y, depthHalf );
vertices.push( - widthHalf, y, depthHalf, - widthHalf, y, - depthHalf );
y += segmentHeight;
}
for ( var i = 0; i <= depthSegments; i ++ ) {
vertices.push( - widthHalf, - heightHalf, z, - widthHalf, heightHalf, z );
vertices.push( - widthHalf, heightHalf, z, widthHalf, heightHalf, z );
vertices.push( widthHalf, heightHalf, z, widthHalf, - heightHalf, z );
vertices.push( widthHalf, - heightHalf, z, - widthHalf, - heightHalf, z );
z += segmentDepth;
}
this.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
}
THREE.BoxLineGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
THREE.BoxLineGeometry.prototype.constructor = THREE.BoxLineGeometry;
......@@ -99,7 +99,7 @@ THREE.FBXLoader = ( function () {
}
//console.log( FBXTree );
// console.log( fbxTree );
var textureLoader = new THREE.TextureLoader( this.manager ).setPath( resourceDirectory ).setCrossOrigin( this.crossOrigin );
......@@ -743,14 +743,6 @@ THREE.FBXLoader = ( function () {
for ( var i = 0; i < relationships.children.length; i ++ ) {
if ( i === 8 ) {
console.warn( 'FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.' );
break;
}
var child = relationships.children[ i ];
var morphTargetNode = deformerNodes[ child.ID ];
......@@ -2001,7 +1993,7 @@ THREE.FBXLoader = ( function () {
if ( morphTarget === null ) return;
parentGeo.morphAttributes.position = [];
parentGeo.morphAttributes.normal = [];
// parentGeo.morphAttributes.normal = []; // not implemented
var self = this;
morphTarget.rawTargets.forEach( function ( rawTarget ) {
......@@ -2010,7 +2002,7 @@ THREE.FBXLoader = ( function () {
if ( morphGeoNode !== undefined ) {
self.genMorphGeometry( parentGeo, parentGeoNode, morphGeoNode, preTransform );
self.genMorphGeometry( parentGeo, parentGeoNode, morphGeoNode, preTransform, rawTarget.name );
}
......@@ -2022,7 +2014,7 @@ THREE.FBXLoader = ( function () {
// in FBXTree.Objects.Geometry, however it can only have attributes for position, normal
// and a special attribute Index defining which vertices of the original geometry are affected
// Normal and position attributes only have data for the vertices that are affected by the morph
genMorphGeometry: function ( parentGeo, parentGeoNode, morphGeoNode, preTransform ) {
genMorphGeometry: function ( parentGeo, parentGeoNode, morphGeoNode, preTransform, name ) {
var morphGeo = new THREE.BufferGeometry();
if ( morphGeoNode.attrName ) morphGeo.name = morphGeoNode.attrName;
......@@ -2056,7 +2048,7 @@ THREE.FBXLoader = ( function () {
var morphBuffers = this.genBuffers( morphGeoInfo );
var positionAttribute = new THREE.Float32BufferAttribute( morphBuffers.vertex, 3 );
positionAttribute.name = morphGeoNode.attrName;
positionAttribute.name = name || morphGeoNode.attrName;
preTransform.applyToBufferAttribute( positionAttribute );
......@@ -2890,7 +2882,7 @@ THREE.FBXLoader = ( function () {
parse: function ( text ) {
this.currentIndent = 0;
console.log("FBXTree: ", FBXTree);
this.allNodes = new FBXTree();
this.nodeStack = [];
this.currentProp = [];
......
/**
* @author Kai Salmen / https://kaisalmen.de
* Development repository: https://github.com/kaisalmen/WWOBJLoader
*/
* @author Kai Salmen / https://kaisalmen.de
* Development repository: https://github.com/kaisalmen/WWOBJLoader
*/
'use strict';
......@@ -157,7 +157,7 @@ THREE.OBJLoader2 = (function () {
* @param {number} numericalValue Numerical value describing the progress
*/
OBJLoader2.prototype.onProgress = function ( type, text, numericalValue ) {
var content = Validator.isValid( text ) ? text: '';
var content = Validator.isValid( text ) ? text : '';
var event = {
detail: {
type: type,
......@@ -181,12 +181,12 @@ THREE.OBJLoader2 = (function () {
output += '\nurl: ' + event.currentTarget.responseURL + '\nstatus: ' + event.currentTarget.statusText;
}
this.onProgress( 'error', output, -1 );
this.onProgress( 'error', output, - 1 );
this._throwError( output );
};
OBJLoader2.prototype._throwError = function ( errorMessage ) {
if ( Validator.isValid( this.callbacks.onReportError ) ) {
if ( Validator.isValid( this.callbacks.onReportError ) ) {
this.callbacks.onReportError( errorMessage );
......@@ -272,7 +272,6 @@ THREE.OBJLoader2 = (function () {
};
}
var fileLoader = new THREE.FileLoader( this.manager );
fileLoader.setPath( this.path );
fileLoader.setResponseType( 'arraybuffer' );
......@@ -281,7 +280,6 @@ THREE.OBJLoader2 = (function () {
}
};
/**
* Run the loader according the provided instructions.
* @memberOf THREE.OBJLoader2
......@@ -293,9 +291,21 @@ THREE.OBJLoader2 = (function () {
this._applyPrepData( prepData );
var available = prepData.checkResourceDescriptorFiles( prepData.resources,
[
{ ext: "obj", type: "ArrayBuffer", ignore: false },
{ ext: "mtl", type: "String", ignore: false },
{ ext: "zip", type: "String", ignore: true }
{
ext: "obj",
type: "ArrayBuffer",
ignore: false
},
{
ext: "mtl",
type: "String",
ignore: false
},
{
ext: "zip",
type: "String",
ignore: true
}
]
);
if ( Validator.isValid( workerSupportExternal ) ) {
......@@ -442,8 +452,8 @@ THREE.OBJLoader2 = (function () {
workerCode += '/**\n';
workerCode += ' * This code was constructed by OBJLoader2 buildCode.\n';
workerCode += ' */\n\n';
workerCode += 'THREE = { LoaderSupport: {} };\n\n';
workerCode += funcBuildObject( 'THREE.LoaderSupport.Validator', Validator );
workerCode += 'THREE = { ' + LoaderSupport.constructor.name + ': {} };\n\n';
workerCode += funcBuildObject( 'THREE.' + LoaderSupport.constructor.name + '.' + LoaderSupport.Validator.constructor.name, Validator );
workerCode += funcBuildSingleton( 'Parser', Parser );
return workerCode;
......@@ -484,7 +494,6 @@ THREE.OBJLoader2 = (function () {
);
};
/**
* Parse OBJ data either from ArrayBuffer or string
* @class
......@@ -516,13 +525,13 @@ THREE.OBJLoader2 = (function () {
mtllibName: '',
// reset with new mesh
faceType: -1,
faceType: - 1,
subGroups: [],
subGroupInUse: null,
smoothingGroup: {
splitMaterials: false,
normalized: -1,
real: -1
normalized: - 1,
real: - 1
},
counts: {
doubleIndicesCount: 0,
......@@ -553,8 +562,8 @@ THREE.OBJLoader2 = (function () {
// faces are stored according combined index of group, material and smoothingGroup (0 or not)
this.rawMesh.subGroups = [];
this.rawMesh.subGroupInUse = null;
this.rawMesh.smoothingGroup.normalized = -1;
this.rawMesh.smoothingGroup.real = -1;
this.rawMesh.smoothingGroup.normalized = - 1;
this.rawMesh.smoothingGroup.real = - 1;
// this default index is required as it is possible to define faces without 'g' or 'usemtl'
this.pushSmoothingGroup( 1 );
......@@ -644,25 +653,25 @@ THREE.OBJLoader2 = (function () {
this.globalCounts.totalBytes = length;
var buffer = new Array( 128 );
for ( var code, word = '', bufferPointer = 0, slashesCount = 0, i = 0; i < length; i++ ) {
for ( var code, word = '', bufferPointer = 0, slashesCount = 0, i = 0; i < length; i ++ ) {
code = arrayBufferView[ i ];
switch ( code ) {
// space
case 32:
if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
word = '';
break;
// slash
case 47:
if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
slashesCount++;
if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
slashesCount ++;
word = '';
break;
// LF
case 10:
if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
word = '';
this.globalCounts.lineByte = this.globalCounts.currentByte;
this.globalCounts.currentByte = i;
......@@ -681,7 +690,7 @@ THREE.OBJLoader2 = (function () {
}
}
this.finalizeParsing();
if ( this.logging.enabled ) console.timeEnd( 'OBJLoader2.Parser.parse' );
if ( this.logging.enabled ) console.timeEnd( 'OBJLoader2.Parser.parse' );
};
/**
......@@ -691,7 +700,7 @@ THREE.OBJLoader2 = (function () {
* @param {string} text OBJ data as string
*/
Parser.prototype.parseText = function ( text ) {
if ( this.logging.enabled ) console.time( 'OBJLoader2.Parser.parseText' );
if ( this.logging.enabled ) console.time( 'OBJLoader2.Parser.parseText' );
this.configure();
this.legacyMode = true;
this.contentRef = text;
......@@ -699,23 +708,23 @@ THREE.OBJLoader2 = (function () {
this.globalCounts.totalBytes = length;
var buffer = new Array( 128 );
for ( var char, word = '', bufferPointer = 0, slashesCount = 0, i = 0; i < length; i++ ) {
for ( var char, word = '', bufferPointer = 0, slashesCount = 0, i = 0; i < length; i ++ ) {
char = text[ i ];
switch ( char ) {
case ' ':
if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
word = '';
break;
case '/':
if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
slashesCount++;
if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
slashesCount ++;
word = '';
break;
case '\n':
if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
word = '';
this.globalCounts.lineByte = this.globalCounts.currentByte;
this.globalCounts.currentByte = i;
......@@ -745,12 +754,15 @@ THREE.OBJLoader2 = (function () {
var i;
if ( legacyMode ) {
for ( i = start; i < stop; i++ ) line += content[ i ];
for ( i = start; i < stop; i ++ ) {
line += content[ i ];
}
} else {
for ( i = start; i < stop; i++ ) line += String.fromCharCode( content[ i ] );
for ( i = start; i < stop; i ++ ) {
line += String.fromCharCode( content[ i ] );
}
}
line = line.trim();
......@@ -801,8 +813,8 @@ THREE.OBJLoader2 = (function () {
}
// "f vertex/uv ..."
} else if ( bufferLength === slashesCount * 2 ) {
// "f vertex/uv ..."
} else if ( bufferLength === slashesCount * 2 ) {
this.checkFaceType( 1 );
for ( i = 3, length = bufferLength - 2; i < length; i += 2 ) {
......@@ -813,8 +825,8 @@ THREE.OBJLoader2 = (function () {
}
// "f vertex/uv/normal ..."
} else if ( bufferLength * 2 === slashesCount * 3 ) {
// "f vertex/uv/normal ..."
} else if ( bufferLength * 2 === slashesCount * 3 ) {
this.checkFaceType( 2 );
for ( i = 4, length = bufferLength - 3; i < length; i += 3 ) {
......@@ -825,7 +837,7 @@ THREE.OBJLoader2 = (function () {
}
// "f vertex//normal ..."
// "f vertex//normal ..."
} else {
this.checkFaceType( 3 );
......@@ -843,15 +855,19 @@ THREE.OBJLoader2 = (function () {
case 'l':
case 'p':
bufferLength = bufferPointer - 1;
if ( bufferLength === slashesCount * 2 ) {
if ( bufferLength === slashesCount * 2 ) {
this.checkFaceType( 4 );
for ( i = 1, length = bufferLength + 1; i < length; i += 2 ) this.buildFace( buffer[ i ], buffer[ i + 1 ] );
for ( i = 1, length = bufferLength + 1; i < length; i += 2 ) {
this.buildFace( buffer[ i ], buffer[ i + 1 ] );
}
} else {
this.checkFaceType( ( lineDesignation === 'l' ) ? 5 : 6 );
for ( i = 1, length = bufferLength + 1; i < length; i ++ ) this.buildFace( buffer[ i ] );
this.checkFaceType( ( lineDesignation === 'l' ) ? 5 : 6 );
for ( i = 1, length = bufferLength + 1; i < length; i ++ ) {
this.buildFace( buffer[ i ] );
}
}
break;
......@@ -881,7 +897,7 @@ THREE.OBJLoader2 = (function () {
if ( mtlName !== '' && this.rawMesh.activeMtlName !== mtlName ) {
this.rawMesh.activeMtlName = mtlName;
this.rawMesh.counts.mtlCount++;
this.rawMesh.counts.mtlCount ++;
this.checkSubGroup();
}
......@@ -904,7 +920,7 @@ THREE.OBJLoader2 = (function () {
if ( smoothCheck !== smoothingGroupInt ) {
this.rawMesh.counts.smoothingGroupCount++;
this.rawMesh.counts.smoothingGroupCount ++;
this.checkSubGroup();
}
......@@ -964,16 +980,16 @@ THREE.OBJLoader2 = (function () {
var indexPointerV = 3 * ( faceIndexVi > 0 ? faceIndexVi - 1 : faceIndexVi + scope.vertices.length / 3 );
var vertices = scope.rawMesh.subGroupInUse.vertices;
vertices.push( scope.vertices[ indexPointerV++ ] );
vertices.push( scope.vertices[ indexPointerV++ ] );
vertices.push( scope.vertices[ indexPointerV ++ ] );
vertices.push( scope.vertices[ indexPointerV ++ ] );
vertices.push( scope.vertices[ indexPointerV ] );
var indexPointerC = scope.colors.length > 0 ? indexPointerV + 1 : null;
if ( indexPointerC !== null ) {
var colors = scope.rawMesh.subGroupInUse.colors;
colors.push( scope.colors[ indexPointerC++ ] );
colors.push( scope.colors[ indexPointerC++ ] );
colors.push( scope.colors[ indexPointerC ++ ] );
colors.push( scope.colors[ indexPointerC ++ ] );
colors.push( scope.colors[ indexPointerC ] );
}
......@@ -982,7 +998,7 @@ THREE.OBJLoader2 = (function () {
var faceIndexUi = parseInt( faceIndexU );
var indexPointerU = 2 * ( faceIndexUi > 0 ? faceIndexUi - 1 : faceIndexUi + scope.uvs.length / 2 );
var uvs = scope.rawMesh.subGroupInUse.uvs;
uvs.push( scope.uvs[ indexPointerU++ ] );
uvs.push( scope.uvs[ indexPointerU ++ ] );
uvs.push( scope.uvs[ indexPointerU ] );
}
......@@ -991,8 +1007,8 @@ THREE.OBJLoader2 = (function () {
var faceIndexNi = parseInt( faceIndexN );
var indexPointerN = 3 * ( faceIndexNi > 0 ? faceIndexNi - 1 : faceIndexNi + scope.normals.length / 3 );
var normals = scope.rawMesh.subGroupInUse.normals;
normals.push( scope.normals[ indexPointerN++ ] );
normals.push( scope.normals[ indexPointerN++ ] );
normals.push( scope.normals[ indexPointerN ++ ] );
normals.push( scope.normals[ indexPointerN ++ ] );
normals.push( scope.normals[ indexPointerN ] );
}
......@@ -1004,14 +1020,14 @@ THREE.OBJLoader2 = (function () {
var indicesPointer = this.rawMesh.subGroupInUse.indexMappings[ mappingName ];
if ( THREE.LoaderSupport.Validator.isValid( indicesPointer ) ) {
this.rawMesh.counts.doubleIndicesCount++;
this.rawMesh.counts.doubleIndicesCount ++;
} else {
indicesPointer = this.rawMesh.subGroupInUse.vertices.length / 3;
updateSubGroupInUse();
this.rawMesh.subGroupInUse.indexMappings[ mappingName ] = indicesPointer;
this.rawMesh.subGroupInUse.indexMappingsCount++;
this.rawMesh.subGroupInUse.indexMappingsCount ++;
}
this.rawMesh.subGroupInUse.indices.push( indicesPointer );
......@@ -1021,7 +1037,7 @@ THREE.OBJLoader2 = (function () {
updateSubGroupInUse();
}
this.rawMesh.counts.faceCount++;
this.rawMesh.counts.faceCount ++;
};
Parser.prototype.createRawMeshReport = function ( inputObjectCount ) {
......@@ -1058,7 +1074,9 @@ THREE.OBJLoader2 = (function () {
indices = meshOutputGroup.indices;
if ( indices.length > 0 && absoluteIndexMappingsCount > 0 ) {
for ( var i in indices ) indices[ i ] = indices[ i ] + absoluteIndexMappingsCount;
for ( var i in indices ) {
indices[ i ] = indices[ i ] + absoluteIndexMappingsCount;
}
}
meshOutputGroupTemp.push( meshOutputGroup );
......@@ -1102,7 +1120,7 @@ THREE.OBJLoader2 = (function () {
}
if ( this.logging.enabled && this.logging.debug ) console.debug( this.createRawMeshReport( this.inputObjectCount ) );
this.inputObjectCount++;
this.inputObjectCount ++;
this.buildMesh( result );
var progressBytesPercent = this.globalCounts.currentByte / this.globalCounts.totalBytes;
......@@ -1165,7 +1183,6 @@ THREE.OBJLoader2 = (function () {
materialName = materialNameOrg + ( haveVertexColors ? '_vertexColor' : '' ) + ( meshOutputGroup.smoothingGroup === 0 ? '_flat' : '' );
} else {
materialName = this.rawMesh.faceType === 6 ? 'defaultPointMaterial' : 'defaultLineMaterial';
......@@ -1179,9 +1196,11 @@ THREE.OBJLoader2 = (function () {
var defaultMaterialName = haveVertexColors ? 'defaultVertexColorMaterial' : 'defaultMaterial';
materialOrg = this.materials[ defaultMaterialName ];
if ( this.logging.enabled ) console.warn( 'object_group "' + meshOutputGroup.objectName + '_' +
meshOutputGroup.groupName + '" was defined with unresolvable material "' +
materialNameOrg + '"! Assigning "' + defaultMaterialName + '".' );
if ( this.logging.enabled ) {
console.warn( 'object_group "' + meshOutputGroup.objectName + '_' +
meshOutputGroup.groupName + '" was defined with unresolvable material "' +
materialNameOrg + '"! Assigning "' + defaultMaterialName + '".' );
}
materialNameOrg = defaultMaterialName;
// if names are identical then there is no need for later manipulation
......@@ -1225,7 +1244,7 @@ THREE.OBJLoader2 = (function () {
selectedMaterialIndex = materialIndex;
materialIndexMapping[ materialName ] = materialIndex;
materialNames.push( materialName );
materialIndex++;
materialIndex ++;
}
materialGroupLength = this.useIndices ? meshOutputGroup.indices.length : meshOutputGroup.vertices.length / 3;
......@@ -1293,7 +1312,7 @@ THREE.OBJLoader2 = (function () {
}
this.outputObjectCount++;
this.outputObjectCount ++;
this.callbackMeshBuilder(
{
cmd: 'meshData',
......@@ -1352,7 +1371,7 @@ THREE.OBJLoader2 = (function () {
* @param {callback} [onProgress] A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains total and Integer bytes.
* @param {callback} [onError] A function to be called if an error occurs during loading. The function receives the error as an argument.
* @param {string} [crossOrigin] CORS value
* @param {Object} [materialOptions] Set material loading options for MTLLoader
* @param {Object} [materialOptions] Set material loading options for MTLLoader
*/
OBJLoader2.prototype.loadMtl = function ( url, content, onLoad, onProgress, onError, crossOrigin, materialOptions ) {
var resource = new THREE.LoaderSupport.ResourceDescriptor( url, 'MTL' );
......@@ -1360,7 +1379,6 @@ THREE.OBJLoader2 = (function () {
this._loadMtl( resource, onLoad, onProgress, onError, crossOrigin, materialOptions );
};
OBJLoader2.prototype._loadMtl = function ( resource, onLoad, onProgress, onError, crossOrigin, materialOptions ) {
if ( THREE.MTLLoader === undefined ) console.error( '"THREE.MTLLoader" is not available. "THREE.OBJLoader2" requires it for loading MTL files.' );
if ( Validator.isValid( resource ) && this.logging.enabled ) console.time( 'Loading MTL: ' + resource.name );
......
......@@ -916,15 +916,21 @@ THREE.VRMLLoader.prototype = {
if ( data.coordIndex ) {
function triangulateIndexArray( indexArray ) {
function triangulateIndexArray( indexArray, ccw ) {
if ( ccw === undefined ) {
// ccw is true by default
ccw = true;
}
var triangulatedIndexArray = [];
var ccw = data.ccw === undefined ? true : data.ccw; // ccw is true by default
var skip = 0;
for ( i = 0, il = indexArray.length; i < il; i ++ ) {
var indexedFace = data.coordIndex[ i ];
var indexedFace = indexArray[ i ];
// VRML support multipoint indexed face sets (more then 3 vertices). You must calculate the composing triangles here
......@@ -948,10 +954,10 @@ THREE.VRMLLoader.prototype = {
}
var positionIndexes = data.coordIndex ? triangulateIndexArray( data.coordIndex ) : [];
var normalIndexes = data.normalIndex ? triangulateIndexArray( data.normalIndex ) : positionIndexes;
var colorIndexes = data.colorIndex ? triangulateIndexArray( data.colorIndex ) : positionIndexes;
var uvIndexes = data.texCoordIndex ? triangulateIndexArray( data.texCoordIndex ) : positionIndexes;
var positionIndexes = data.coordIndex ? triangulateIndexArray( data.coordIndex, data.ccw ) : [];
var normalIndexes = data.normalIndex ? triangulateIndexArray( data.normalIndex, data.ccw ) : positionIndexes;
var colorIndexes = data.colorIndex ? triangulateIndexArray( data.colorIndex, data.ccw ) : positionIndexes;
var uvIndexes = data.texCoordIndex ? triangulateIndexArray( data.texCoordIndex, data.ccw ) : positionIndexes;
var newIndexes = [];
var newPositions = [];
......
......@@ -56,7 +56,7 @@
container = document.getElementById( 'container' );
camera = new THREE.PerspectiveCamera( 25, window.innerWidth / window.innerHeight, 1, 10000 );
camera = new THREE.PerspectiveCamera( 25, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.set( 15, 10, - 15 );
scene = new THREE.Scene();
......@@ -71,6 +71,16 @@
var animations = collada.animations;
var avatar = collada.scene;
avatar.traverse( function( node ) {
if ( node.isSkinnedMesh ) {
node.frustumCulled = false;
}
} );
mixer = new THREE.AnimationMixer( avatar );
var action = mixer.clipAction( animations[ 0 ] ).play();
......@@ -88,9 +98,9 @@
var ambientLight = new THREE.AmbientLight( 0xffffff, 0.2 );
scene.add( ambientLight );
var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.8 );
directionalLight.position.set( 1, 1, - 1 );
scene.add( directionalLight );
var pointLight = new THREE.PointLight( 0xffffff, 0.8 );
scene.add( camera );
camera.add( pointLight );
//
......@@ -102,6 +112,9 @@
//
controls = new THREE.OrbitControls( camera, renderer.domElement );
controls.screenSpacePanning = true;
controls.minDistance = 5;
controls.maxDistance = 40;
controls.target.set( 0, 2, 0 );
controls.update();
......
......@@ -31,11 +31,11 @@
<a href="http://threejs.org" target="_blank" rel="noopener">three.js</a> car materials demo :
Ferrari 458 Italia model by <a href="https://sketchfab.com/models/57bf6cc56931426e87494f554df1dab6" target="_blank" rel="noopener">vicent091036</a>
<br><br>
<strong>MATERIALS:</strong>
<span>Body: <select id="body-mat"></select></span>
<span>Rims / Trim: <select id="rim-mat"></select></span>
<span>Glass: <select id="glass-mat"></select></span><br>
<span><strong>Driving Mode</strong>(arrow keys and space)<input type="checkbox" id="drive-toggle"></span>
<span>Glass: <select id="glass-mat"></select></span>
<br><br>
<span>Follow camera: <input type="checkbox" id="camera-toggle"></span>
</div>
<div id="container"></div>
......@@ -47,8 +47,6 @@
<script src="js/Car.js"></script>
<script src="js/controls/OrbitControls.js"></script>
<script src="js/Detector.js"></script>
<script src="js/libs/stats.min.js"></script>
......@@ -56,19 +54,19 @@
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
var camera, scene, renderer, controls, stats, carModel, materialsLib, envMap;
var camera, scene, renderer, stats, carModel, materialsLib, envMap;
var bodyMatSelect = document.getElementById( 'body-mat' );
var rimMatSelect = document.getElementById( 'rim-mat' );
var glassMatSelect = document.getElementById( 'glass-mat' );
var driveModeToggle = document.getElementById( 'drive-toggle' );
driveModeToggle.addEventListener( 'change', onDriveModeToggle );
var followCamera = document.getElementById( 'camera-toggle' );
followCamera.addEventListener( 'change', onFollowCameraToggle );
var lightHolder = new THREE.Group();
var clock = new THREE.Clock();
var car = new THREE.Car();
car.enabled = false;
car.turningRadius = 75;
var carParts = {
body: [],
......@@ -76,7 +74,6 @@
glass: [],
};
var damping = 5.0;
var distance = 5;
var cameraTarget = new THREE.Vector3();
......@@ -86,13 +83,8 @@
var container = document.getElementById( 'container' );
camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 200 );
camera.position.set( 3.25, 1.25, -5 );
controls = new THREE.OrbitControls( camera, container );
controls.enableDamping = true;
controls.dampingFactor = 0.25;
controls.target.set( 0, 0.75, 0 );
camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 200 );
camera.position.set( 3.25, 2.0, -5 );
scene = new THREE.Scene();
scene.fog = new THREE.Fog( 0xd7cbb1, 1, 80 );
......@@ -112,7 +104,7 @@
ground.renderOrder = 1;
scene.add( ground );
var grid = new THREE.GridHelper( 2400, 240, 0x000000, 0x000000 );
var grid = new THREE.GridHelper( 400, 40, 0x000000, 0x000000 );
grid.material.opacity = 0.2;
grid.material.depthWrite = false;
grid.material.transparent = true;
......@@ -306,12 +298,8 @@
}
function onDriveModeToggle() {
function onFollowCameraToggle() {
car.enabled = !car.enabled;
controls.enabled = !car.enabled;
controls.reset();
carModel.position.copy( origin );
}
......@@ -320,51 +308,39 @@
var delta = clock.getDelta();
if ( carModel && !controls.enabled ) {
car.update( delta );
if ( carModel ) {
updateCamera( delta );
car.update( delta / 3 );
resetPosition();
// keep the light (and shadow) pointing in the same direction as the car rotates
lightHolder.rotation.y = -carModel.rotation.y;
} else {
if ( followCamera.checked ) {
controls.update();
carModel.getWorldPosition( cameraTarget );
cameraTarget.y = 2.5;
cameraTarget.z += distance;
}
camera.position.lerp( cameraTarget, delta * damping );
stats.update();
}
}
function updateCamera( delta ) {
camera.lookAt( carModel.position );
carModel.getWorldPosition( cameraTarget );
cameraTarget.y = 2.5;
cameraTarget.z += distance;
}
camera.position.lerp( cameraTarget, delta * damping );
camera.lookAt( carModel.position );
stats.update();
}
function resetPosition() {
if( carModel.position.distanceTo( origin ) > 1200 ) {
if ( carModel.position.distanceTo( origin ) > 200 ) {
carModel.position.copy( origin );
car.speed = 0;
car.enabled = false;
setTimeout( function() {
car.enabled = true;
}, 1500 )
}
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - ball shooter</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......@@ -28,6 +24,8 @@
<script src="../build/three.js"></script>
<script src="js/vr/WebVR.js"></script>
<script src="js/geometries/BoxLineGeometry.js"></script>
<script>
var container;
......@@ -36,6 +34,7 @@
var room;
var count = 0;
var radius = 0.08;
var normal = new THREE.Vector3();
var relativeVelocity = new THREE.Vector3();
......@@ -61,17 +60,15 @@
camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.1, 10 );
room = new THREE.Mesh(
new THREE.BoxBufferGeometry( 6, 6, 6, 8, 8, 8 ),
new THREE.MeshBasicMaterial( { color: 0x808080, wireframe: true } )
room = new THREE.LineSegments(
new THREE.BoxLineGeometry( 6, 6, 6, 10, 10, 10 ),
new THREE.LineBasicMaterial( { color: 0x808080 } )
);
room.geometry.translate( 0, 3, 0 );
scene.add( room );
scene.add( new THREE.HemisphereLight( 0x606060, 0x404040 ) );
var light = new THREE.DirectionalLight( 0xffffff );
light.position.set( 1, 1, 1 ).normalize();
var light = new THREE.HemisphereLight( 0xffffff, 0x444444 );
light.position.set( 1, 1, 1 );
scene.add( light );
var geometry = new THREE.IcosahedronBufferGeometry( radius, 2 );
......@@ -159,8 +156,7 @@
if ( controller.userData.isSelecting ) {
var object = room.children[ 0 ];
room.remove( object );
var object = room.children[ count ++ ];
object.position.copy( controller.position );
object.userData.velocity.x = ( Math.random() - 0.5 ) * 0.02;
......@@ -168,7 +164,7 @@
object.userData.velocity.z = ( Math.random() * 0.02 - 0.1 );
object.userData.velocity.applyQuaternion( controller.quaternion );
room.add( object );
if ( count === room.children.length ) count = 0;
}
......@@ -187,45 +183,47 @@
handleController( controller1 );
handleController( controller2 );
// keep cubes inside room
//
var range = 3 - radius;
for ( var i = 0; i < room.children.length; i ++ ) {
var cube = room.children[ i ];
var object = room.children[ i ];
object.position.add( object.userData.velocity );
cube.position.add( cube.userData.velocity );
// keep objects inside room
if ( cube.position.x < - range || cube.position.x > range ) {
if ( object.position.x < - range || object.position.x > range ) {
cube.position.x = THREE.Math.clamp( cube.position.x, - range, range );
cube.userData.velocity.x = - cube.userData.velocity.x;
object.position.x = THREE.Math.clamp( object.position.x, - range, range );
object.userData.velocity.x = - object.userData.velocity.x;
}
if ( cube.position.y < radius || cube.position.y > 6 ) {
if ( object.position.y < radius || object.position.y > 6 ) {
cube.position.y = Math.max( cube.position.y, radius );
object.position.y = Math.max( object.position.y, radius );
cube.userData.velocity.x *= 0.98;
cube.userData.velocity.y = - cube.userData.velocity.y * 0.8;
cube.userData.velocity.z *= 0.98;
object.userData.velocity.x *= 0.98;
object.userData.velocity.y = - object.userData.velocity.y * 0.8;
object.userData.velocity.z *= 0.98;
}
if ( cube.position.z < - range || cube.position.z > range ) {
if ( object.position.z < - range || object.position.z > range ) {
cube.position.z = THREE.Math.clamp( cube.position.z, - range, range );
cube.userData.velocity.z = - cube.userData.velocity.z;
object.position.z = THREE.Math.clamp( object.position.z, - range, range );
object.userData.velocity.z = - object.userData.velocity.z;
}
for ( var j = i + 1; j < room.children.length; j ++ ) {
var cube2 = room.children[ j ];
var object2 = room.children[ j ];
normal.copy( cube.position ).sub( cube2.position );
normal.copy( object.position ).sub( object2.position );
var distance = normal.length();
......@@ -233,23 +231,23 @@
normal.multiplyScalar( 0.5 * distance - radius );
cube.position.sub( normal );
cube2.position.add( normal );
object.position.sub( normal );
object2.position.add( normal );
normal.normalize();
relativeVelocity.copy( cube.userData.velocity ).sub( cube2.userData.velocity );
relativeVelocity.copy( object.userData.velocity ).sub( object2.userData.velocity );
normal = normal.multiplyScalar( relativeVelocity.dot( normal ) );
cube.userData.velocity.sub( normal );
cube2.userData.velocity.add( normal );
object.userData.velocity.sub( normal );
object2.userData.velocity.add( normal );
}
}
cube.userData.velocity.y -= 0.00098;
object.userData.velocity.y -= 0.00098;
}
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - cubes</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......@@ -26,9 +22,10 @@
<body>
<script src="../build/three.js"></script>
<script src="js/vr/WebVR.js"></script>
<script src="js/geometries/BoxLineGeometry.js"></script>
<script>
var clock = new THREE.Clock();
......@@ -75,9 +72,9 @@
crosshair.position.z = - 2;
camera.add( crosshair );
room = new THREE.Mesh(
new THREE.BoxBufferGeometry( 6, 6, 6, 8, 8, 8 ),
new THREE.MeshBasicMaterial( { color: 0x404040, wireframe: true } )
room = new THREE.LineSegments(
new THREE.BoxLineGeometry( 6, 6, 6, 10, 10, 10 ),
new THREE.LineBasicMaterial( { color: 0x808080 } )
);
room.position.y = 3;
scene.add( room );
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - dragging</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - lorenz attractor</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
margin: 0px;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - paint</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - panorama</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
html, body {
background-color: #000;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - roller coaster</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
margin: 0px;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - sandbox</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
margin: 0px;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - sculpt</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - 360 stereo video</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - htc vive - paint</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......
......@@ -4,12 +4,8 @@
<title>three.js webvr - htc vive - sculpt</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-08-30 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-08-30" content="Ag80lPFLAvRyqP2W5I5XBzACxrTAQTWa3cXebXzq+WzW66nlQa6lvejGg1gdAMrzYbY6jUWp8g08kEnzb6svVgcAAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNTYzNjYxOX0=">
<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-08-28" content="Ag7nJS0Q6nBKfmRY1XLKHslnz73amLhaf8RoFpYz36MpMq0oa30AETLXer74BIwa3t8uDXlR0n4W9f/o674Rqw4AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkRldmljZSIsImV4cGlyeSI6MTUzNTQxNDQwMH0=">
<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-08-28 -->
<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-08-28" content="AsflqqNG2L/Eepy8xSwCYwWH5U7w3nN7Ak137jGxMeBFz9lqQVcMBqMTcMw6ZkxThB7ZM2Cn7hgPqX++ZlgC9wMAAABYeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJYUkdhbWVwYWRTdXBwb3J0IiwiZXhwaXJ5IjoxNTM1NDE0NDAwfQ==">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-09-11 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-09-11" content="AqhFUYKxq/d+E8CDT0fuYRCg8TvlTP52x0Jv7I9t27sLhR30LmcahBRfSwzP89ukjs2+ia99VrrLoRyaFAwJVA0AAABQeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMU02MiIsImV4cGlyeSI6MTUzNjYyNDAwMH0=">
<style>
body {
font-family: Monospace;
......
......@@ -118,7 +118,7 @@
"arr-flatten": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
"integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=",
"dev": true
},
"arr-union": {
......@@ -226,7 +226,7 @@
"base": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
"integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=",
"dev": true,
"requires": {
"cache-base": "^1.0.1",
......@@ -357,7 +357,7 @@
"cache-base": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
"integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=",
"dev": true,
"requires": {
"collection-visit": "^1.0.0",
......@@ -580,7 +580,7 @@
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
"integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=",
"dev": true,
"requires": {
"arr-union": "^3.1.0",
......@@ -647,7 +647,7 @@
"cloneable-readable": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz",
"integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==",
"integrity": "sha1-1ZHe5Kj4vBXaQ86X3O66E9Q+KmU=",
"dev": true,
"requires": {
"inherits": "^2.0.1",
......@@ -868,7 +868,7 @@
"date-fns": {
"version": "1.29.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz",
"integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==",
"integrity": "sha1-EuYJzcuTUScxHQTTMzTilgoqVOY=",
"dev": true
},
"debug": {
......@@ -898,7 +898,7 @@
"deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=",
"dev": true
},
"deep-is": {
......@@ -910,7 +910,7 @@
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
"integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
"integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=",
"dev": true,
"requires": {
"is-descriptor": "^1.0.2",
......@@ -1072,7 +1072,7 @@
"es6-promise": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
"integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"integrity": "sha1-3EIhwrFlGHYL2MOaUtjzVvwA7Sk=",
"dev": true
},
"escape-string-regexp": {
......@@ -1411,7 +1411,7 @@
"is-extendable": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=",
"dev": true,
"requires": {
"is-plain-object": "^2.0.4"
......@@ -2875,7 +2875,7 @@
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
"dev": true,
"requires": {
"isobject": "^3.0.1"
......@@ -3166,7 +3166,7 @@
"matcher-collection": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/matcher-collection/-/matcher-collection-1.0.5.tgz",
"integrity": "sha512-nUCmzKipcJEwYsBVAFh5P+d7JBuhJaW1xs85Hara9xuMLqtCVUrW6DSC0JVIkluxEH2W45nPBM/wjHtBXa/tYA==",
"integrity": "sha1-LuCVQ4Nyy4iE8FgjQTjAXGROwzk=",
"dev": true,
"requires": {
"minimatch": "^3.0.2"
......@@ -3285,7 +3285,7 @@
"mixin-deep": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
"integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
"integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=",
"dev": true,
"requires": {
"for-in": "^1.0.2",
......@@ -3295,7 +3295,7 @@
"is-extendable": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=",
"dev": true,
"requires": {
"is-plain-object": "^2.0.4"
......@@ -3379,7 +3379,7 @@
"normalize-package-data": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
"integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=",
"dev": true,
"requires": {
"hosted-git-info": "^2.1.4",
......@@ -3874,7 +3874,7 @@
"rc": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=",
"dev": true,
"requires": {
"deep-extend": "^0.6.0",
......@@ -4014,7 +4014,7 @@
"regex-not": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
"integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
"integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=",
"dev": true,
"requires": {
"extend-shallow": "^3.0.2",
......@@ -4166,7 +4166,7 @@
"ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
"integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=",
"dev": true
},
"rimraf": {
......@@ -4292,7 +4292,7 @@
"rollup-watch": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/rollup-watch/-/rollup-watch-4.3.1.tgz",
"integrity": "sha512-6yjnIwfjpSrqA8IafyIu7fsEyeImNR4aDjA1bQ7KWeVuiA+Clfsx8+PGQkyABWIQzmauQ//tIJ5wAxLXsXs8qQ==",
"integrity": "sha1-WqHq6reHrd82iQXRArOdb8XOSos=",
"dev": true,
"requires": {
"chokidar": "^1.7.0",
......@@ -4383,7 +4383,7 @@
"set-value": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
"integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=",
"dev": true,
"requires": {
"extend-shallow": "^2.0.1",
......@@ -4482,7 +4482,7 @@
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
"integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
"integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=",
"dev": true,
"requires": {
"base": "^0.11.1",
......@@ -4518,7 +4518,7 @@
"snapdragon-node": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
"integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=",
"dev": true,
"requires": {
"define-property": "^1.0.0",
......@@ -4569,7 +4569,7 @@
"snapdragon-util": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
"integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=",
"dev": true,
"requires": {
"kind-of": "^3.2.0"
......@@ -4620,7 +4620,7 @@
"spdx-correct": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz",
"integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==",
"integrity": "sha1-BaW01xU6GVvJLDxCW2nzsqlSTII=",
"dev": true,
"requires": {
"spdx-expression-parse": "^3.0.0",
......@@ -4630,13 +4630,13 @@
"spdx-exceptions": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz",
"integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==",
"integrity": "sha1-LHrmEFbHFKW5ubKyr30xHvXHj+k=",
"dev": true
},
"spdx-expression-parse": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
"integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=",
"dev": true,
"requires": {
"spdx-exceptions": "^2.1.0",
......@@ -4646,7 +4646,7 @@
"spdx-license-ids": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz",
"integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==",
"integrity": "sha1-enzShHDMbToc/m1miG9rxDDTrIc=",
"dev": true
},
"speedometer": {
......@@ -4658,7 +4658,7 @@
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
"integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=",
"dev": true,
"requires": {
"extend-shallow": "^3.0.0"
......@@ -4896,7 +4896,7 @@
"to-regex": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
"integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
"integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=",
"dev": true,
"requires": {
"define-property": "^2.0.2",
......@@ -4928,7 +4928,7 @@
"tree-kill": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz",
"integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==",
"integrity": "sha1-WEZ4Yje0I5AU8F2xVrZDIS1MbzY=",
"dev": true
},
"trim-newlines": {
......@@ -4974,30 +4974,6 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
"uglify-js": {
"version": "3.4.9",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
"integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
"dev": true,
"requires": {
"commander": "~2.17.1",
"source-map": "~0.6.1"
},
"dependencies": {
"commander": {
"version": "2.17.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
},
"union": {
"version": "0.4.6",
"resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz",
......
......@@ -28,7 +28,6 @@
"scripts": {
"build": "rollup -c",
"build-test": "rollup -c test/rollup.unit.config.js",
"build-uglify": "rollup -c && uglifyjs build/three.js -cm --preamble \"// threejs.org/license\" > build/three.min.js",
"build-closure": "rollup -c && java -jar node_modules/google-closure-compiler/compiler.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
"dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"http-server -c-1 -p 8080\"",
"dev-test": "concurrently --names \"ROLLUP,ROLLUPTEST,HTTP\" -c \"bgBlue.bold,bgRed.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"rollup -c test/rollup.unit.config.js -w -m inline\" \"http-server -p 8080\"",
......@@ -58,8 +57,7 @@
"google-closure-compiler": "20180805.0.0",
"http-server": "^0.11.1",
"qunit": "^2.6.2",
"rollup": "^0.65.0",
"uglify-js": "^3.4.9"
"rollup": "^0.65.0"
},
"jspm": {
"files": [
......
......@@ -218,6 +218,9 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
data.envMap = this.envMap.toJSON( meta ).uuid;
data.reflectivity = this.reflectivity; // Scale behind envMap
if ( this.combine !== undefined ) data.combine = this.combine;
if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;
}
if ( this.gradientMap && this.gradientMap.isTexture ) {
......
......@@ -100,7 +100,7 @@ MeshMatcapMaterial.prototype.copy = function ( source ) {
this.color.copy( source.color );
this.matcap = source.map;
this.matcap = source.matcap;
this.map = source.map;
......
import { _Math } from './Math.js';
import { Vector3 } from './Vector3.js';
/**
* @author mikael emtinger / http://gomo.se/
* @author alteredq / http://alteredqualia.com/
......@@ -8,6 +5,9 @@ import { Vector3 } from './Vector3.js';
* @author bhouston / http://clara.io
*/
import { _Math } from './Math.js';
import { Vector3 } from './Vector3.js';
function Quaternion( x, y, z, w ) {
this._x = x || 0;
......@@ -19,6 +19,8 @@ function Quaternion( x, y, z, w ) {
Object.assign( Quaternion, {
isQuaternion: true,
slerp: function ( qa, qb, qm, t ) {
return qm.copy( qa ).slerp( qb, t );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册