Skip to content

Commit

Permalink
fix (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
blairmacintyre committed May 17, 2018
1 parent a002d88 commit f552b31
Show file tree
Hide file tree
Showing 9 changed files with 219 additions and 0 deletions.
24 changes: 24 additions & 0 deletions examples/ar_simplest/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,30 @@ <h5>(click to dismiss)</h5>
}
}

function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
Expand Down
24 changes: 24 additions & 0 deletions examples/face_tracking/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,30 @@ <h5>(click to dismiss)</h5>
}
}

function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
Expand Down
24 changes: 24 additions & 0 deletions examples/hit_test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,30 @@ <h5>(click to dismiss)</h5>
}
}

function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
Expand Down
24 changes: 24 additions & 0 deletions examples/image_detection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,30 @@ <h5>(click to dismiss)</h5>
return context.getImageData(0, 0, img.width, img.height);
}
}
function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}



window.addEventListener('DOMContentLoaded', () => {
Expand Down
24 changes: 24 additions & 0 deletions examples/opencv-aruco/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,30 @@ <h5>(click to dismiss)</h5>
console.log('OpenCV.js is ready');
openCVready = true
}
function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
Expand Down
25 changes: 25 additions & 0 deletions examples/opencv-face/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,31 @@ <h5>(click to dismiss)</h5>
openCVready = true
}

function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
try {
Expand Down
24 changes: 24 additions & 0 deletions examples/peoples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,30 @@ <h5>(click to dismiss)</h5>
return mesh
}
}
function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
Expand Down
25 changes: 25 additions & 0 deletions examples/simplecv/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,31 @@ <h5>(click to dismiss)</h5>
}
}

function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
try {
Expand Down
25 changes: 25 additions & 0 deletions examples/vr_simplest/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,31 @@
}
}

function AxesHelper( size ) {
size = size || 1;

var vertices = [
0, 0, 0, size, 0, 0,
0, 0, 0, 0, size, 0,
0, 0, 0, 0, 0, size
];

var colors = [
1, 0, 0, 1, 0.6, 0,
0, 1, 0, 0.6, 1, 0,
0, 0, 1, 0, 0.6, 1
];

var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );

var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

return new THREE.LineSegments(geometry, material);
}


window.addEventListener('DOMContentLoaded', () => {

window.pageApp = new VRSimplestExample(document.getElementById('target'))
Expand Down

0 comments on commit f552b31

Please sign in to comment.