From python CGI to jekyll stuff
|
@ -1,7 +1,11 @@
|
||||||
|
---
|
||||||
|
layout: withjs
|
||||||
|
title: Hermite Test
|
||||||
|
extrajs: <script src="/static/js/HermiteTest/HermiteTest.js"></script>
|
||||||
|
---
|
||||||
<section>
|
<section>
|
||||||
<h2>Hermite test</h2>
|
<pre>
|
||||||
<code>
|
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
</code>
|
</pre>
|
||||||
#
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
|
|
||||||
mainJs = Web.Element()
|
|
||||||
mainJs.open_string = ' <script src="js/HermiteTest.js"></script>'
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
body.add_child(jsIncludes)
|
|
||||||
jsIncludes.add_child(mainJs)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,6 +1,14 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>3DUI - {{ page.title }}</title>
|
||||||
|
<meta charset='utf-8' />
|
||||||
|
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic" />
|
||||||
|
<link rel="stylesheet" href="/static/css/style.css" />
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1 id="title">Welcome ! <img src='/img/python-powered.svg' alt='Python powered' width=80/></h1>
|
<h1 id="title">Welcome !</h1>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -11,5 +19,8 @@
|
||||||
<li><a href="/stream/">Streaming simulator</a></li>
|
<li><a href="/stream/">Streaming simulator</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
#
|
{{ content }}
|
||||||
|
{{ page.extrajs }}
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
layout: main
|
||||||
|
---
|
||||||
|
{{ content }}
|
||||||
|
|
||||||
|
<script src="/static/js/three.js"></script>
|
||||||
|
<script src="/static/js/Tools.js"></script>
|
||||||
|
<script src="/static/js/three/stats.min.js"></script>
|
||||||
|
<script src="/static/js/three/DDSLoader.js"></script>
|
||||||
|
<script src="/static/js/three/MTLLoader.js"></script>
|
||||||
|
<script src="/static/js/three/OBJLoader.js"></script>
|
||||||
|
<script src="/static/js/three/OBJMTLLoader.js"></script>
|
||||||
|
<script src="/static/js/three/OrbitControls.js"></script>
|
||||||
|
<script src="/static/js/Cube.js"></script>
|
||||||
|
<script src="/static/js/ProgressiveSphere.js"></script>
|
||||||
|
<script src="/static/js/Camera.js"></script>
|
||||||
|
<script src="/static/js/FixedCamera.js"></script>
|
||||||
|
<script src="/static/js/BouncingCube.js"></script>
|
||||||
|
<script src="/static/js/BufferGeometryToGeometry.js"></script>
|
||||||
|
<script src="/static/js/PointerCamera.js"></script>
|
||||||
|
<script src="/static/js/CameraContainer.js"></script>
|
||||||
|
<script src="/static/js/Hermite.js"></script>
|
||||||
|
<script>static_path="/static/"</script>
|
|
@ -1,8 +1,13 @@
|
||||||
|
---
|
||||||
|
layout: withjs
|
||||||
|
title: Bouncing cube
|
||||||
|
extrajs: <script src="/static/js/bouncing/BouncingMain.js"></script>
|
||||||
|
---
|
||||||
<section>
|
<section>
|
||||||
<h2>Bouncing cube</h2>
|
<h2>Bouncing cube</h2>
|
||||||
<p>
|
<p>
|
||||||
Click on the cube to make it jump !
|
Click on the cube to make it jump !
|
||||||
</p>
|
</p>
|
||||||
<div id="container"></div>
|
<div id="container"></div>
|
||||||
#
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
|
|
||||||
mainJs = Web.Element()
|
|
||||||
mainJs.open_string = ' <script src="js/BouncingMain.js"></script>'
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
body.add_child(jsIncludes)
|
|
||||||
jsIncludes.add_child(mainJs)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,10 +0,0 @@
|
||||||
<section>
|
|
||||||
<h2>Error 403</h2>
|
|
||||||
<p>
|
|
||||||
You're not supposed to be here :o
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Please go back to the <a href="/">index</a> or wherever you want...
|
|
||||||
</p>
|
|
||||||
#
|
|
||||||
</section>
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,10 +0,0 @@
|
||||||
<section>
|
|
||||||
<h2>Error 404</h2>
|
|
||||||
<p>
|
|
||||||
The page you requested was not found... this is annoying :s
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
You can go back to the <a href="/">index</a> or wherever you want...
|
|
||||||
</p>
|
|
||||||
#
|
|
||||||
</section>
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,10 +0,0 @@
|
||||||
<section>
|
|
||||||
<h2>Error 500</h2>
|
|
||||||
<p>
|
|
||||||
Wow, you crashed my website... :'(
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
You can go back to the <a href="/">index</a> or wherever you want... (if it works...)
|
|
||||||
</p>
|
|
||||||
#
|
|
||||||
</section>
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
Before Width: | Height: | Size: 172 KiB |
14
index.html
|
@ -1,20 +1,24 @@
|
||||||
|
---
|
||||||
|
layout: main
|
||||||
|
title: Index
|
||||||
|
---
|
||||||
<section>
|
<section>
|
||||||
<h2>Index</h2>
|
<h2>Index</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/bouncing/">A bouncing cube that jumps when you click on it</a></li>
|
<li><a href="/bouncing/">A bouncing cube that jumps when you click on it</a></li>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<a href="/multisphere/">Sphere with multi-resolution</a>
|
<a href="/multisphere/}">Sphere with multi-resolution</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Lots of obj files loaded and displayed. When you click
|
Lots of obj files loaded and displayed. When you click
|
||||||
somewhere, the current obj is hidden and the next one, with
|
somewhere, the current obj is hidden and the next one, with a
|
||||||
a better resolution is shown.
|
better resolution is shown.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<a href="/scene/">A proto of the real thing</a>
|
<a href="/prototype/">A proto of the real thing</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You can move the camera with the arrow keys and move the
|
You can move the camera with the arrow keys and move the
|
||||||
|
@ -39,5 +43,5 @@
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
#
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
9
index.py
|
@ -1,9 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
Web.render('index.html')
|
|
||||||
|
|
||||||
print('<a href="/priv">download</a>')
|
|
|
@ -1,4 +1,8 @@
|
||||||
<section>
|
---
|
||||||
|
layout: withjs
|
||||||
|
title: Multi-sphere
|
||||||
|
extrajs: <script src="/static/js/multisphere/MultiSphere.js"></script>
|
||||||
|
---
|
||||||
<h2>Multiresolution sphere</h2>
|
<h2>Multiresolution sphere</h2>
|
||||||
<p>
|
<p>
|
||||||
This is the first test of multi-resolution. In fact, it's not
|
This is the first test of multi-resolution. In fact, it's not
|
||||||
|
@ -7,5 +11,3 @@
|
||||||
the canvas.
|
the canvas.
|
||||||
</p>
|
</p>
|
||||||
<div id="container"></div>
|
<div id="container"></div>
|
||||||
#
|
|
||||||
</section>
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
|
|
||||||
mainJs = Web.Element()
|
|
||||||
mainJs.open_string = ' <script src="js/MultiSphere.js"></script>'
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
body.add_child(jsIncludes)
|
|
||||||
jsIncludes.add_child(mainJs)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Prototype
|
||||||
|
layout: withjs
|
||||||
|
extrajs: <script src="/static/js/prototype/main.js"></script>
|
||||||
|
---
|
||||||
<section>
|
<section>
|
||||||
<h2>3D Interface</h2>
|
<h2>3D Interface</h2>
|
||||||
<p>
|
<p>
|
||||||
|
@ -23,5 +28,5 @@
|
||||||
<input type="checkbox" id="showarrows" style="margin-bottom:10px" checked>
|
<input type="checkbox" id="showarrows" style="margin-bottom:10px" checked>
|
||||||
<label for="showarrows">Show arrows</label>
|
<label for="showarrows">Show arrows</label>
|
||||||
<div id="container"> </div>
|
<div id="container"> </div>
|
||||||
#
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from webtools import Web
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print('Content-type: text/html')
|
|
||||||
print()
|
|
||||||
|
|
||||||
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
|
|
||||||
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
|
|
||||||
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
|
|
||||||
jsIncludes = Web.Element(Web.ROOT_DIR + 'templates/jsIncludes.html')
|
|
||||||
|
|
||||||
mainJs = Web.Element()
|
|
||||||
mainJs.open_string = ' <script src="js/main.js"></script>'
|
|
||||||
content = Web.Element('index.html')
|
|
||||||
|
|
||||||
staticPath = Web.Element()
|
|
||||||
staticPath.open_string = ' <script>static_path = \'/\';</script>'
|
|
||||||
|
|
||||||
page.add_child(head)
|
|
||||||
page.add_child(body)
|
|
||||||
body.add_child(content)
|
|
||||||
body.add_child(jsIncludes)
|
|
||||||
jsIncludes.add_child(staticPath)
|
|
||||||
jsIncludes.add_child(mainJs)
|
|
||||||
|
|
||||||
page.print()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,49 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
import random
|
|
||||||
|
|
||||||
N = 4;
|
|
||||||
|
|
||||||
def rand_vector():
|
|
||||||
print('new THREE.Vector3(', end='')
|
|
||||||
print(random.uniform(-500,500), end='')
|
|
||||||
print(',', end='')
|
|
||||||
print(random.uniform(-500,500), end='')
|
|
||||||
print(',', end='')
|
|
||||||
print(random.uniform(0,500), end='')
|
|
||||||
print(')', end='')
|
|
||||||
|
|
||||||
def rand_color():
|
|
||||||
chars = [ str(x) for x in range(10)] + [chr(x) for x in range(ord('a'), ord('f') + 1)]
|
|
||||||
print('0x', end='')
|
|
||||||
for i in range(6):
|
|
||||||
print(chars[random.randint(0, len(chars)-1)],end='');
|
|
||||||
|
|
||||||
def gen_positions():
|
|
||||||
print('var positions = [')
|
|
||||||
for i in range(N):
|
|
||||||
print(' ', end='')
|
|
||||||
rand_vector()
|
|
||||||
print(',')
|
|
||||||
print(' ', end='')
|
|
||||||
gen_vector()
|
|
||||||
print('\n];')
|
|
||||||
|
|
||||||
def gen_colors():
|
|
||||||
print('var colors = [')
|
|
||||||
for i in range(N):
|
|
||||||
print(' ', end='')
|
|
||||||
rand_color()
|
|
||||||
print(',')
|
|
||||||
print(' ', end='')
|
|
||||||
rand_color()
|
|
||||||
print('\n];')
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
gen_colors()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |