|
@@ -30,23 +30,27 @@ Once you pick a 3D rendering technology, you need to integrate it with MARTINS.j
|
30
|
30
|
|
31
|
31
|
Writing a glue code is a task of moderate complexity. It requires dealing with matrices, with performance issues, and with some idiosyncrasies of the 3D rendering technologies in order to make sure it all works as intended. It is advisable to have specialized knowledge of computer graphics programming in order to write a glue code that works correctly.
|
32
|
32
|
|
33
|
|
-I provide easy-to-use glue codes that work with different 3D rendering technologies in my demos, so that you don't need to deal with the complexity. Those glue codes are JavaScript (.js) files. You just need to add a glue code to your web page (e.g., via a `<script>` tag) and then the integration will be done for you. It's really that simple! Also, my glue codes may be used in both free and non-free projects.
|
|
33
|
+I provide easy-to-use glue codes that work with different 3D rendering technologies in my demos, so that you don't need to deal with the complexity. Those glue codes are JavaScript (.js) files. You just need to add a glue code to your web page (e.g., via a `<script>` tag) and then the integration will be done for you. It's really that simple!
|
34
|
34
|
|
35
|
|
-[:octocat: Get the glue codes on GitHub](https://github.com/alemart/martins-js/tree/master/dist){ .md-button ._blank }
|
36
|
|
-
|
37
|
|
-[Get the glue codes in my demos](../gallery.md){ .md-button ._blank }
|
|
35
|
+[Find the glue codes in my demos](../gallery.md){ .md-button ._blank }
|
38
|
36
|
|
39
|
37
|
## Create the virtual scene
|
40
|
38
|
|
41
|
39
|
Once you plug in the glue code, you'll be using the 3D rendering technology of your choice to create the virtual scene. The physical scene will be automatically augmented with the virtual scene, thus creating the augmented scene.
|
42
|
40
|
|
43
|
41
|
<figure markdown>
|
44
|
|
-<video src="../../img/demo-cool2.webm" poster="../../img/demo-cool2.webp" style="width:600px" controls muted loop playsinline autoplay oncanplay="this.muted=true;this.play()"></video>
|
|
42
|
+<video poster="../../img/demo-cool2.webp" style="width:600px" controls muted loop playsinline autoplay oncanplay="this.muted=true;this.play()">
|
|
43
|
+ <source src="../../img/demo-cool2.webm" type="video/webm" />
|
|
44
|
+ <source src="../../img/demo-cool2.mp4" type="video/mp4" />
|
|
45
|
+</video>
|
45
|
46
|
<figcaption markdown>An augmented scene with a [3D model](../assets/my-3d-model.glb "A public domain 3D model from Kenney, converted to glTF format") from [Kenney](https://www.kenney.nl){ ._blank }</figcaption>
|
46
|
47
|
</figure>
|
47
|
48
|
|
48
|
49
|
<figure markdown>
|
49
|
|
-<video src="../../img/demo-cool.webm" poster="../../img/demo-cool.webp" style="width:600px" controls muted loop playsinline autoplay oncanplay="this.muted=true;this.play()"></video>
|
|
50
|
+<video poster="../../img/demo-cool.webp" style="width:600px" controls muted loop playsinline autoplay oncanplay="this.muted=true;this.play()">
|
|
51
|
+ <source src="../../img/demo-cool.webm" type="video/webm" />
|
|
52
|
+ <source src="../../img/demo-cool.mp4" type="video/mp4" />
|
|
53
|
+</video>
|
50
|
54
|
<figcaption markdown>A similar augmented scene viewed from a different perspective</figcaption>
|
51
|
55
|
</figure>
|
52
|
56
|
|
|
@@ -76,7 +80,10 @@ A-Frame is easy for beginners and pleasing for experts. A simple scene is declar
|
76
|
80
|
<body>
|
77
|
81
|
<div id="ar-viewport"></div>
|
78
|
82
|
<img id="my-reference-image" src="my-reference-image.webp" hidden>
|
79
|
|
- <video id="my-video" src="my-video.webm" hidden muted loop playsinline autoplay oncanplay="this.muted=true;this.play()"></video>
|
|
83
|
+ <video id="my-video" hidden muted loop playsinline autoplay oncanplay="this.muted=true;this.play()">
|
|
84
|
+ <source src="my-video.webm" type="video/webm" />
|
|
85
|
+ <source src="my-video.mp4" type="video/mp4" />
|
|
86
|
+ </video>
|
80
|
87
|
|
81
|
88
|
<!-- This is a scene -->
|
82
|
89
|
<a-scene ar-scene>
|