Sfoglia il codice sorgente

Update documentation

customisations
alemart 1 anno fa
parent
commit
98aa3c6674

+ 12
- 24
README.md Vedi File

@@ -2,33 +2,27 @@
2 2
 
3 3
 [![GitHub release (latest by date)](https://img.shields.io/github/v/release/alemart/martins-js)](https://github.com/alemart/martins-js/releases/) ![GitHub file size in bytes on a specified ref (branch/commit/tag)](https://img.shields.io/github/size/alemart/martins-js/dist/martins.min.js?branch=master&label=minified%20js) [![GitHub Repo stars](https://img.shields.io/github/stars/alemart/martins-js?logo=github)](https://github.com/alemart/martins-js/stargazers) [![GitHub Sponsors](https://img.shields.io/github/sponsors/alemart?logo=github)](https://github.com/sponsors/alemart/)
4 4
 
5
-Create amazing Augmented Reality experiences with **MARTINS.js**, a GPU-accelerated Augmented Reality engine for the web. Users don't need specialized hardware nor dedicated software - only a modern web browser.
6
-
7
-:man_technologist: MARTINS.js is free and open-source software.
5
+Create amazing Augmented Reality experiences with **MARTINS.js**, a GPU-accelerated Augmented Reality engine for the web.
8 6
 
9 7
 :books: Technical documentation is available at <https://alemart.github.io/martins-js/>.
10 8
 
9
+## Features
10
+
11
+* **Standalone AR**. Runs in any modern web browser on Android, iOS and even on Desktop computers. No need of WebXR-capable devices.
12
+* **Image tracking**. Use it to track detailed images such as: book covers, cartoons and photos.
13
+
11 14
 ## Try WebAR right now!
12 15
 
13
-1. Scan or tap the QR code below with a mobile device.
14
-2. A [web page](https://alemart.github.io/martins-js/demo/) will be opened. It's the WebAR experience.
15
-3. The web page will request access to your webcam. Authorize it.
16
-4. Scan the cartoon below.
17
-5. Enjoy! :wink:
16
+[Launch a demo!](https://alemart.github.io/martins-js/demo/instructions)
18 17
 
19 18
 >
20
-> **Guidelines for WebAR:**
19
+> **Guidelines:**
21 20
 >
22
-> - WebGL2 and WebAssembly are required. Use a [compatible browser](#browser-compatibility).
23
-> - Don't move the camera too quickly - it produces motion blur.
24
-> - The physical environment should be properly illuminated.
25
-> - Avoid low-quality cameras (cameras of common smartphones are OK).
21
+> * Don't move the camera too quickly. This produces motion blur.
22
+> * The target image should appear clearly in the video.
23
+> * The physical environment should be properly illuminated.
26 24
 >
27 25
 
28
-[![WebAR demo](https://alemart.github.io/martins-js/demo/reference-image-with-qr-code.webp)](https://alemart.github.io/martins-js/demo/)
29
-
30
-Visit the [Demo gallery](https://alemart.github.io/martins-js/gallery/) for more.
31
-
32 26
 ## Try locally
33 27
 
34 28
 Try the demos on your own machine:
@@ -46,18 +40,12 @@ npm start
46 40
 
47 41
 ## Why use MARTINS.js?
48 42
 
49
-Here is why MARTINS.js is a great choice for creating Augmented Reality experiences:
50
-
51 43
 * **No need to download apps!** MARTINS.js is a WebAR engine. It runs in web browsers. Users can access the AR experience immediately.
52 44
 * **Fast and powerful!** MARTINS.js is GPU-accelerated. It uses WebGL2 and WebAssembly for turbocharged performance.
53 45
 * **No need of custom hardware or software!** MARTINS.js is built from scratch using standard web technologies. All it requires is a modern web browser.
54 46
 * **Fully standalone!** MARTINS.js has in it everything it needs to analyze the environment and help you create AR. There are no additional requirements. No need of WebXR.
55 47
 * **Easy to get started!** MARTINS.js can be used with a `<script>` tag in your page. A static HTML page is enough to get started.
56 48
 
57
-## Features
58
-
59
-* **Image tracking**, also known as natural feature tracking. Use it to track detailed images such as: book covers, cartoons and photos.
60
-
61 49
 ## Browser compatibility
62 50
 
63 51
 MARTINS.js is compatible with all major web browsers:
@@ -72,4 +60,4 @@ MARTINS.js requires WebGL2 and WebAssembly.
72 60
 
73 61
 ## About
74 62
 
75
-MARTINS.js is free and open-source software developed by [Alexandre Martins](https://github.com/alemart). It is based on [Speedy Vision](https://github.com/alemart/speedy-vision) and released under the [LGPL](LICENSE.md).
63
+MARTINS.js is free and open-source software developed by [Alexandre Martins](https://github.com/alemart) and released under the [LGPL](LICENSE.md). It is based on [Speedy Vision](https://github.com/alemart/speedy-vision).

+ 0
- 33
demos/NOTICE.txt Vedi File

@@ -1,33 +0,0 @@
1
-MARTINS.js WebAR engine developed by Alexandre Martins (https://github.com/alemart)
2
-
3
-MARTINS.js: GPU-accelerated Augmented Reality for the web
4
-Copyright (c) Alexandre Martins
5
-https://github.com/alemart/martins-js
6
-
7
-Speedy Vision: GPU-accelerated Computer Vision for JavaScript
8
-Copyright (c) Alexandre Martins
9
-https://github.com/alemart/speedy-vision
10
-
11
-A-Frame: A web framework for building virtual reality experiences
12
-Copyright (c) A-Frame authors
13
-https://aframe.io
14
-
15
-Babylon.js: a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework
16
-Copyright (c) Microsoft Corporation and Babylon.js contributors
17
-https://www.babylonjs.com
18
-
19
-Three.js: JavaScript 3D Library
20
-Copyright (c) Three.js authors
21
-https://threejs.org
22
-
23
-aframe-particle-system-component: Particle systems for A-Frame
24
-Copyright (c) IdeaSpace
25
-https://github.com/IdeaSpaceVR/aframe-particle-system-component
26
-
27
-ShaderParticleEngine: A GLSL-heavy particle engine for THREE.js
28
-Copyright (c) Luke Moody (squarefeet)
29
-https://github.com/squarefeet/ShaderParticleEngine
30
-
31
-three-bmfont-text: renders BMFont files in ThreeJS with word-wrapping
32
-Copyright (c) Jam3 (mattdesl)
33
-https://github.com/Jam3/three-bmfont-text

+ 1
- 1
docs/demo/index.md Vedi File

@@ -1,4 +1,4 @@
1 1
 ---
2
-template: basic_demo.html
2
+template: basic-demo.html
3 3
 title: ""
4 4
 ---

+ 2
- 23
docs/demo/instructions.md Vedi File

@@ -1,26 +1,5 @@
1 1
 ---
2
-title: Try WebAR right now!
2
+template: basic-demo-readme.html
3
+title: ""
3 4
 ---
4 5
 
5
-# Try WebAR right now!
6
-
7
-## Follow the steps
8
-
9
-1. Scan or tap the QR code below with a mobile device.
10
-2. A [web page](./index.md) will be opened. It's the WebAR experience.
11
-3. The web page will request access to your webcam. Authorize it.
12
-4. Scan the cartoon below.
13
-5. Enjoy! :wink:
14
-
15
-!!! info "Guidelines for WebAR"
16
-
17
-    - WebGL2 and WebAssembly are required. Use a [compatible browser](../getting-started/index.md#browser-compatibility).
18
-    - Don't move the camera too quickly - it produces motion blur.
19
-    - The physical environment should be properly illuminated.
20
-    - Avoid low-quality cameras (cameras of common smartphones are OK).
21
-
22
-[![WebAR demo](reference-image-with-qr-code.webp "Based on free image by ArtRose from https://pixabay.com/pt/vectors/bruxa-vassoura-gato-chap%c3%a9u-magia-5635225/")](./index.md){ ._blank }
23
-
24
-## Wanna see more?
25
-
26
-[Demo gallery](../gallery.md){ .md-button .md-button--primary }

+ 4
- 16
docs/download.md Vedi File

@@ -1,17 +1,5 @@
1
-# Download
1
+---
2
+template: download.html
3
+title: "Download"
4
+---
2 5
 
3
-MARTINS.js can be downloaded from GitHub or used via a CDN. Read the [getting started](./getting-started/index.md) guide for information on how to add it to your web page.
4
-
5
-## Download from GitHub
6
-
7
-[:octocat: Download now](https://github.com/alemart/martins-js/releases){ .md-button ._blank }
8
-
9
-## Using a CDN
10
-
11
-Add the following to the `<head>` of your HTML page:
12
-
13
-```html
14
-<script src="https://cdn.jsdelivr.net/gh/alemart/martins-js@VERSION/dist/martins.min.js"></script>
15
-```
16
-
17
-Replace `VERSION` by ![GitHub release (latest by date)](https://img.shields.io/github/v/release/alemart/martins-js?color=%23ffffff&display_name=tag&label=%20)

+ 25
- 88
docs/gallery.md Vedi File

@@ -2,119 +2,60 @@
2 2
 title: WebAR Demo gallery
3 3
 ---
4 4
 
5
-<style>
6
-.gallery-grid {
7
-    display: flex;
8
-    flex-direction: row;
9
-    flex-wrap: wrap;
10
-    align-items: flex-end;
11
-    justify-content: space-evenly;
12
-}
13
-
14
-.gallery-item {
15
-    text-align: center;
16
-    padding: 0;
17
-}
18
-
19
-.gallery-item img {
20
-    width: 100%;
21
-    image-rendering: pixelated;
22
-}
23
-
24
-@media screen and (min-width: 600px) {
25
-    .gallery-item {
26
-        flex-basis: 40%;
27
-    }
28
-}
29
-
30
-@media screen and (min-width: 1220px) {
31
-    .gallery-item img {
32
-        transition: transform 0.25s, opacity 0.25s;
33
-        opacity: 0.9;
34
-    }
35
-    .gallery-item img:hover {
36
-        transform: scale(1.125);
37
-        opacity: 1.0;
38
-    }
39
-}
40
-</style>
41
-
42
-# WebAR Demo gallery
43
-
44
-Here you'll find some cool examples of what you can do with MARTINS.js. Simply click on a link or scan any of the QR codes below. After opening the web pages, scan the [target image](#target-image). In addition, please read the [guidelines](#guidelines).
5
+# Demo gallery
45 6
 
46
-## Basic demos
7
+Please read the [guidelines](#guidelines) before you play with the demos. Feel free to remix them.
47 8
 
48
-The following demos will help you get started:
9
+## Basic demos
49 10
 
50
-<div class="gallery-grid" markdown>
51
-<div class="gallery-item" markdown>
52
-[![QR code](./img/qr-demo-hello-aframe.gif)](/martins-js/demos/hello-aframe){ ._blank }
11
+### WebAR with A-Frame
53 12
 
54
-**MARTINS.js with AFRAME**
13
+Create an augmented scene with A-Frame. This is the easiest demo to edit!
55 14
 
56
-[Launch demo](/martins-js/demos/hello-aframe){ ._blank } | [View the code](https://github.com/alemart/martins-js/tree/master/demos/hello-aframe){ ._blank }
57
-</div>
58
-<div class="gallery-item" markdown>
59
-[![QR code](./img/qr-demo-hello-three.gif)](/martins-js/demos/hello-three){ ._blank }
15
+[Launch demo](/martins-js/demos/hello-aframe/README.html){ ._blank .md-button }
60 16
 
61
-**MARTINS.js with THREE.js**
17
+### WebAR with three.js
62 18
 
63
-[Launch demo](/martins-js/demos/hello-three){ ._blank } | [View the code](https://github.com/alemart/martins-js/tree/master/demos/hello-three){ ._blank }
64
-</div>
65
-<div class="gallery-item" markdown>
66
-[![QR code](./img/qr-demo-hello-webgl.gif)](/martins-js/demos/hello-webgl){ ._blank }
19
+Create an augmented scene with three.js.
67 20
 
68
-**MARTINS.js with pure WebGL**
21
+[Launch demo](/martins-js/demos/hello-three/README.html){ ._blank .md-button }
69 22
 
70
-[Launch demo](/martins-js/demos/hello-webgl){ ._blank } | [View the code](https://github.com/alemart/martins-js/tree/master/demos/hello-webgl){ ._blank }
71
-</div>
72
-<div class="gallery-item" markdown>
73
-[![QR code](./img/qr-demo-touch-interaction.gif)](/martins-js/demos/touch-interaction){ ._blank }
23
+### WebAR with WebGL only
74 24
 
75
-**Touch interaction with THREE.js**
25
+Create an augmented scene without additional libraries. Writing WebGL code is intricate and not needed.
76 26
 
77
-[Launch demo](/martins-js/demos/touch-interaction){ ._blank } | [View the code](https://github.com/alemart/martins-js/tree/master/demos/touch-interaction){ ._blank }
78
-</div>
79
-</div>
27
+[Launch demo](/martins-js/demos/hello-webgl/README.html){ ._blank .md-button }
80 28
 
81
-## Minimal demos
29
+### Hello, world!
82 30
 
83
-Explore the source code with these minimalistic demos:
31
+A basic template to help you get started.
84 32
 
85
-<div class="gallery-grid" markdown>
86
-<div class="gallery-item" markdown>
87
-[![QR code](./img/qr-demo-hello-world.gif)](/martins-js/demos/hello-world){ ._blank }
33
+[Launch demo](/martins-js/demos/hello-world/README.html){ ._blank .md-button }
88 34
 
89
-**Hello, World!**
35
+## Interactive demos
90 36
 
91
-[Launch demo](/martins-js/demos/hello-world){ ._blank } | [View the code](https://github.com/alemart/martins-js/tree/master/demos/hello-world){ ._blank }
92
-</div>
93
-<div class="gallery-item" markdown>
94
-[![QR code](./img/qr-demo-simple-webcam.gif)](/martins-js/demos/simple-webcam){ ._blank }
37
+### Touch interaction
95 38
 
96
-**Simple Webcam demo**
39
+Have virtual elements respond to touch input.
97 40
 
98
-[Launch demo](/martins-js/demos/simple-webcam){ ._blank } | [View the code](https://github.com/alemart/martins-js/tree/master/demos/simple-webcam){ ._blank }
99
-</div>
100
-</div>
41
+[Launch demo](/martins-js/demos/touch-three/README.html){ ._blank .md-button }
101 42
 
102 43
 ## Guidelines
103 44
 
104
-You can use a webcam or a video file as input. Click on the 🎥 icon at the top-right corner of the screen to toggle webcam input. When using a webcam:
45
+For a good experience:
105 46
 
106
-* Avoid low-quality cameras. A camera of a typical smartphone is probably good enough.
107 47
 * Don't move the camera nor the target image too quickly. This produces motion blur.
108
-* Make sure that the physical environment is properly illuminated.
109 48
 * The target image should appear clearly in the video.
49
+* The physical environment should be properly illuminated.
110 50
 * If you're scanning the image on a screen, make sure to adjust the brightness. If the screen is too bright (too dark), it will cause overexposure (underexposure) in the video and tracking difficulties - details of the images will be lost. Screen reflections are also undesirable.
111 51
 * If you print the image, avoid shiny materials (e.g., glossy paper). They may generate artifacts in the image and interfere with the tracking. Prefer non-reflective materials.
52
+* Avoid low-quality cameras. Cameras of common smartphones are okay.
112 53
 
113 54
 ## Try locally
114 55
 
115 56
 Try the demos on your own machine:
116 57
 
117
-1. Run on a console:
58
+* Run on a console:
118 59
 
119 60
 ```sh
120 61
 git clone git@github.com:alemart/martins-js.git
@@ -122,9 +63,5 @@ cd martins-js
122 63
 npm start
123 64
 ```
124 65
 
125
-2. Open [https://localhost:8000/demos/](https://localhost:8000/demos/)
126
-3. Pick a demo and have fun!
127
-
128
-## Target image
129
-
130
-[![Target image](./assets/my-reference-image.webp)](./assets/my-reference-image.webp "Based on free image by ArtRose from https://pixabay.com/pt/vectors/bruxa-vassoura-gato-chap%c3%a9u-magia-5635225/"){ ._blank }
66
+* Open [https://localhost:8000/demos/](https://localhost:8000/demos/)
67
+* Pick a demo and have fun!

+ 6
- 11
docs/getting-started/index.md Vedi File

@@ -2,28 +2,23 @@
2 2
 
3 3
 [![GitHub release (latest by date)](https://img.shields.io/github/v/release/alemart/martins-js)](https://github.com/alemart/martins-js/releases/) ![GitHub file size in bytes on a specified ref (branch/commit/tag)](https://img.shields.io/github/size/alemart/martins-js/dist/martins.min.js?branch=master&label=minified%20js) [![GitHub Repo stars](https://img.shields.io/github/stars/alemart/martins-js?logo=github)](https://github.com/alemart/martins-js/stargazers) [![GitHub Sponsors](https://img.shields.io/github/sponsors/alemart?logo=github)](https://github.com/sponsors/alemart/)
4 4
 
5
-Create amazing Augmented Reality experiences with **MARTINS.js**, a GPU-accelerated Augmented Reality engine for the web. Users don't need specialized hardware nor dedicated software - only a modern web browser.
5
+Create amazing Augmented Reality experiences with **MARTINS.js**, a GPU-accelerated Augmented Reality engine for the web.
6 6
 
7 7
 [Get started](./introduction.md){ .md-button .md-button--primary } [Try a demo](../demo/instructions.md){ .md-button .md-button } [:heart:{ .heart } Support my work](../support-my-work.md){ .md-button }
8 8
 
9
-:man_technologist: MARTINS.js is free and open-source software.
9
+## Features
10 10
 
11
-:books: Technical documentation is available at <https://alemart.github.io/martins-js/>.
11
+* **Standalone AR**. Runs in any modern web browser on Android, iOS and even on Desktop computers. No need of WebXR-capable devices.
12
+* **Image tracking**. Use it to track detailed images such as: book covers, cartoons and photos.
12 13
 
13 14
 ## Why use MARTINS.js?
14 15
 
15
-MARTINS.js is a great choice for creating Augmented Reality experiences:
16
-
17 16
 * **No need to download apps!** MARTINS.js is a WebAR engine. It runs in web browsers. Users can access the AR experience immediately.
18 17
 * **Fast and powerful!** MARTINS.js is GPU-accelerated. It uses WebGL2 and WebAssembly for turbocharged performance.
19
-* **No need of custom hardware or software!** MARTINS.js is built from scratch using standard web technologies. All it requires is a modern and compatible web browser.
18
+* **No need of custom hardware or software!** MARTINS.js is built from scratch using standard web technologies. All it requires is a modern web browser.
20 19
 * **Fully standalone!** MARTINS.js has in it everything it needs to analyze the environment and help you create AR. There are no additional requirements. No need of WebXR.
21 20
 * **Easy to get started!** MARTINS.js can be used with a `<script>` tag in your page. A static HTML page is enough to get started.
22 21
 
23
-## Features
24
-
25
-* **Image tracking**, also known as natural feature tracking. Use it to track detailed images such as: book covers, cartoons and photos.
26
-
27 22
 ## Browser compatibility
28 23
 
29 24
 MARTINS.js is compatible with all major web browsers:
@@ -38,4 +33,4 @@ MARTINS.js requires WebGL2 and WebAssembly.
38 33
 
39 34
 ## About
40 35
 
41
-MARTINS.js is free and open-source software developed by [Alexandre Martins](https://github.com/alemart). It is based on [Speedy Vision](https://github.com/alemart/speedy-vision) and released under the [LGPL](../license.md).
36
+MARTINS.js is free and open-source software developed by [Alexandre Martins](https://github.com/alemart) and released under the [LGPL](../license.md). It is based on [Speedy Vision](https://github.com/alemart/speedy-vision).

+ 11
- 0
docs_overrides/basic-demo-readme.html Vedi File

@@ -0,0 +1,11 @@
1
+<!doctype html>
2
+<html>
3
+    <head>
4
+        <meta charset="utf-8">
5
+        <meta http-equiv="refresh" content="0; url='{{ 'demos/hello-webgl/README.html' | url }}'">
6
+        <title>MARTINS.js WebAR demo</title>
7
+    </head>
8
+    <body>
9
+        <p>Redirecting to <a href="{{ 'demos/hello-webgl/README.html' | url }}">{{ 'demos/hello-webgl/README.html' | url }}</a>...</p>
10
+    </body>
11
+</html>

docs_overrides/basic_demo.html → docs_overrides/basic-demo.html Vedi File

@@ -2,10 +2,10 @@
2 2
 <html>
3 3
     <head>
4 4
         <meta charset="utf-8">
5
-        <meta http-equiv="refresh" content="0; url='{{ 'demos/hello-webgl/?webcam' | url }}'">
5
+        <meta http-equiv="refresh" content="0; url='{{ 'demos/hello-webgl' | url }}'">
6 6
         <title>MARTINS.js WebAR demo</title>
7 7
     </head>
8 8
     <body>
9
-        <p>Loading the <a href="{{ 'demos/hello-webgl/?webcam' | url }}">WebAR demo</a>...</p>
9
+        <p>Loading the <a href="{{ 'demos/hello-webgl' | url }}">WebAR demo</a>...</p>
10 10
     </body>
11 11
 </html>

+ 11
- 0
docs_overrides/download.html Vedi File

@@ -0,0 +1,11 @@
1
+<!doctype html>
2
+<html>
3
+    <head>
4
+        <meta charset="utf-8">
5
+        <meta http-equiv="refresh" content="0; url='https://github.com/alemart/martins-js/releases'">
6
+        <title>Download MARTINS.js</title>
7
+    </head>
8
+    <body>
9
+        <p>Redirecting to <a href="https://github.com/alemart/martins-js/releases">https://github.com/alemart/martins-js/releases</a>...</p>
10
+    </body>
11
+</html>

+ 1
- 2
docs_overrides/partials/copyright.html Vedi File

@@ -25,7 +25,6 @@
25 25
     <div class="md-copyright__highlight">
26 26
       {{ config.site_name }}.
27 27
       {{ config.copyright }}.
28
-      Made in Brazil
29 28
     </div>
30 29
   {% if not config.extra.generator == false %}
31 30
     This page is licensed under the
@@ -37,7 +36,7 @@
37 36
     </a>
38 37
     and is made with
39 38
     <a
40
-      href="https://squidfunk.github.io/mkdocs-material/"
39
+      href="https://squidfunk.github.io/mkdocs-material"
41 40
       target="_blank" rel="noopener"
42 41
     >
43 42
       Material for MkDocs

+ 1
- 9
mkdocs.yml Vedi File

@@ -40,20 +40,12 @@ markdown_extensions:
40 40
       #emoji_index: !!python/name:materialx.emoji.gemoji 
41 41
       #emoji_generator: !!python/name:materialx.emoji.to_svg
42 42
 
43
-extra:
44
-  social:
45
-    - icon: fontawesome/brands/github
46
-      link: https://github.com/alemart/martins-js
47
-    - icon: fontawesome/brands/youtube
48
-      link: https://youtube.com/alemart88
49
-
50 43
 dev_addr: 127.0.0.1:8008
51 44
 
52 45
 nav:
53 46
   - 'Home': 'index.md'
54 47
   - 'Getting started':
55 48
     - 'Welcome': 'getting-started/index.md'
56
-    - 'Download': 'download.md'
57 49
     - 'WebAR Crash Course':
58 50
       - 'Introduction': 'getting-started/introduction.md'
59 51
       - 'Concepts': 'getting-started/concepts.md'
@@ -67,9 +59,9 @@ nav:
67 59
     - 'Questions & Answers': 'faq.md'
68 60
     - 'Support my work': 'support-my-work.md'
69 61
     - 'License': 'license.md'
62
+  - 'Download': 'download.md'
70 63
   - 'Demos':
71 64
     - 'Demo gallery': 'gallery.md'
72
-    - 'Try WebAR now!': 'demo/instructions.md'
73 65
   - 'API':
74 66
     - 'General':
75 67
       - 'Session': 'api/session.md'

Loading…
Annulla
Salva