Toggle navigation
Toggle navigation
This project
Loading...
Sign in
arcs
/
arcs.js
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
didier
2015-05-16 14:16:59 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a6325c0b8e237272401e6736de59b0e71d2e9ce0
a6325c0b
1 parent
3dc01498
Modified documentation templates
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
7 deletions
Gruntfile.js
components/arucodetector.js
components/arviewer.js
components/loop.js
docs/arcs/tmpl/container.tmpl
docs/arcs/tmpl/method.tmpl
docs/jsdoc.conf.json
docs/sigslot.js
Gruntfile.js
View file @
a6325c0
...
...
@@ -18,7 +18,8 @@ module.exports = function (grunt) {
options
:
{
verbose
:
true
,
destination
:
'docs/components'
,
template
:
'docs/arcs'
template
:
'docs/arcs'
,
configure
:
'docs/jsdoc.conf.json'
}
}
},
...
...
components/arucodetector.js
View file @
a6325c0
...
...
@@ -5,6 +5,7 @@ arcs_module(
/**
* @class ARUCODetector
* @classdesc Component that detects ARUCO markers in images
* This component encapsulate the {@link https://github.com/jcmellado/js-aruco|js-aruco} library.
*/
ARUCODetector
=
ARCS
.
Component
.
create
(
function
()
{
...
...
@@ -15,10 +16,11 @@ arcs_module(
/**
* Detects ARUCO markers in the given image.
* If markers are detected, this slot triggers the signal
"onMarkers"
.
* If markers are detected, this slot triggers the signal
onMarkers
.
* @param image {obj} the image in which markers should be detected
* @emits
ARUCODetector#onMarker
* @emits
onMarkers
* @function ARUCODetector#detect
* @slot
*/
this
.
detect
=
function
(
image
)
{
/*1 recover markers from image
...
...
@@ -32,7 +34,7 @@ arcs_module(
* Signal that is emitted when markers are detected in an image.
* @function ARUCODetector#onMarkers
* @param markers {array} Array of detected markers.
* @
access
signal
* @signal
*/
},
...
...
components/arviewer.js
View file @
a6325c0
...
...
@@ -192,6 +192,7 @@ arcs_module(
/**
* Adds new objects to the current 3D scene
* @param scene {object} 3D object as defined by Three.js to add to the scene.
* @signal
* @function ARViewer#addScene
*/
this
.
addScene
=
function
(
scene
)
{
...
...
components/loop.js
View file @
a6325c0
...
...
@@ -23,6 +23,9 @@ arcs_module(function (ARCS) {
* eventually triggered.
* @param n {numeric} number of iterations
* @function Loop#setIterations
* @slot
* @emits newIteration
* @emits sendToken
*/
this
.
setIterations
=
function
(
n
)
{
var
i
;
...
...
@@ -32,6 +35,17 @@ arcs_module(function (ARCS) {
}
this
.
emit
(
"sendToken"
,
"end"
);
};
/** @function Loop#newIteration
* @signal
* @param n {number} current iteration number.
*/
/** @function Loop#sendToken
* @signal
* @param s {string} token to emit.
*/
},
"setIterations"
,
//slotList
[
"sendToken"
,
"newIteration"
]
// signalList
...
...
@@ -48,6 +62,7 @@ arcs_module(function (ARCS) {
/**
* @param n {numeric} number to display
* @function DisplayInt#display
* @slot
*/
this
.
display
=
function
(
n
)
{
console
.
log
(
" DisplayInt : "
+
n
);
...
...
@@ -74,7 +89,8 @@ arcs_module(function (ARCS) {
* This slot adds its parameter to its internal sum and send it back by using
* the signal "sum".
* @param n {integer} add n to the internal sum of the component.
* @function Sum.add
* @function Sum#add
* @slot
*/
Sum
.
slot
(
"add"
,
function
(
n
)
{
this
.
total
=
this
.
total
+
n
;
...
...
docs/arcs/tmpl/container.tmpl
View file @
a6325c0
...
...
@@ -106,16 +106,41 @@
<?js } ?>
<?js
var methods = self.find({kind: 'function', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
var methods = self.find({kind: 'function',
slot: false, signal: false,
memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
if (methods && methods.length && methods.forEach) {
?>
<h3 class="subsection-title">Methods</h3>
<dl><?js methods.forEach(function(m) {
?>
<dl><?js methods.forEach(function(m) {?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var slots = self.find({slot: true, memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
if (slots && slots.length && slots.forEach) {
?>
<h3 class="subsection-title">Slots</h3>
<dl><?js slots.forEach(function(m) { ?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var signals = self.find({signal: true, memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
if (signals && signals.length && signals.forEach) {
?>
<h3 class="subsection-title">Signals</h3>
<dl><?js signals.forEach(function(m) { ?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var typedefs = self.find({kind: 'typedef', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
if (typedefs && typedefs.length && typedefs.forEach) {
...
...
docs/arcs/tmpl/method.tmpl
View file @
a6325c0
...
...
@@ -59,6 +59,14 @@ var self = this;
<?js }); ?></ul>
<?js } ?>
<?js if (data.emits && emits.length) { ?>
<h5>Emits signals:</h5>
<ul><?js emits.forEach(function(f) { ?>
<li><?js= self.linkto(f) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (data.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<?js if (exceptions.length > 1) { ?><ul><?js
...
...
docs/jsdoc.conf.json
0 → 100644
View file @
a6325c0
{
"plugins"
:
[
"docs/sigslot.js"
]
}
docs/sigslot.js
0 → 100644
View file @
a6325c0
exports
.
defineTags
=
function
(
dictionary
)
{
dictionary
.
defineTag
(
'signal'
,
{
onTagged
:
function
(
doclet
,
tag
)
{
doclet
.
signal
=
true
;
},
mustNotHaveValue
:
true
,
mustNotHaveDescription
:
true
});
dictionary
.
defineTag
(
'slot'
,
{
onTagged
:
function
(
doclet
,
tag
)
{
doclet
.
slot
=
true
;
},
mustNotHaveValue
:
true
,
mustNotHaveDescription
:
true
});
dictionary
.
defineTag
(
'emits'
,
{
onTagged
:
function
(
doclet
,
tag
)
{
doclet
.
emits
=
doclet
.
emits
||
[];
doclet
.
emits
.
push
(
tag
.
value
);
},
mustHaveValue
:
true
});
};
exports
.
handlers
=
{
processingComplete
:
function
(
e
)
{
var
doclets
=
e
.
doclets
;
var
i
;
for
(
i
=
0
;
i
<
doclets
.
length
;
i
++
)
{
if
(
doclets
[
i
].
kind
===
'function'
)
{
doclets
[
i
].
signal
=
doclets
[
i
].
signal
||
false
;
doclets
[
i
].
slot
=
doclets
[
i
].
slot
||
false
;
}
}
}
};
\ No newline at end of file
Please
register
or
login
to post a comment