提交 3139ba60 编写于 作者: J Jerome Etienne

more work

上级 1a7c138b
This is my own version of the multi markers.
Definition of multi marker.
a multi marker is a group of marker acting as one.
# Goal
Make a multi marker with a nice workflow. It must be as easy as possible for the user.
It must handle dynamic markers positions.
......@@ -13,6 +18,13 @@ It must handle dynamic markers positions.
Thus even if only one sub-marker is visible, multi-marker position will still be tracked properly
# Area Learning Process
- the user moves its phone around the area to learn
- we detect markers position
- we store statistics on the respective position between each marker
- if i simultaneously see marker1 and marker2, i store the position of marker2 in relation to marker1
- When the learning process is considered done, output a file containing a description of this multi-marker
# Motivation
there was to many bugs in artoolkit
......
var THREEx = THREEx || {}
THREEx.ArMarkerHelper = function(markerControls){
this.object3d = new THREE.Group
var mesh = new THREE.AxisHelper()
this.object3d.add(mesh)
// var text = markerControls.id
// debugger
var text = markerControls.parameters.patternUrl.slice(-1).toUpperCase();
var canvas = document.createElement( 'canvas' );
canvas.width = 64;
canvas.height = 64;
var context = canvas.getContext( '2d' );
var texture = new THREE.CanvasTexture( canvas );
// put the text in the sprite
context.font = '48px monospace';
context.fillStyle = 'rgba(192,192,255, 0.5)';
context.fillRect( 0, 0, canvas.width, canvas.height );
context.fillStyle = 'darkblue';
context.fillText(text, canvas.width/4, 3*canvas.height/4 )
texture.needsUpdate = true
// var geometry = new THREE.CubeGeometry(1, 1, 1)
var geometry = new THREE.PlaneGeometry(1, 1)
var material = new THREE.MeshBasicMaterial({
map: texture,
transparent: true
});
var mesh = new THREE.Mesh(geometry, material)
mesh.rotation.x = -Math.PI/2
this.object3d.add(mesh)
}
......@@ -31,7 +31,8 @@ gravityLength: <span id='gravityLength'></span><br/>
Absolute: <span id='orientationAbsolute'></span><br/>
Alpha: <span id='orientationAlpha'></span><br/>
Beta: <span id='orientationBeta'></span><br/>
Gamma: <span id='orientationGamma'></span><br/>
Gamma: <span id='orientationGamma'></span><br/>
<script>
// README
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册