added viewer
This commit is contained in:
parent
3422005b82
commit
556a9158eb
9 changed files with 59 additions and 46995 deletions
|
|
@ -14,7 +14,7 @@ class Components::PreviewFrame < Components::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def view_template
|
def view_template
|
||||||
a href: "/webxr/dist/xrforge.html?#{model_model_file_path(@file.model, @file, format: @file.extension)}", target:"_blank" do
|
a href: "/view?#{model_model_file_path(@file.model, @file, format: @file.extension)}", target:"_blank" do
|
||||||
if @file
|
if @file
|
||||||
local
|
local
|
||||||
elsif @object.remote?
|
elsif @object.remote?
|
||||||
|
|
|
||||||
51
manyfold/usr/src/app/public/view/index.html
Normal file
51
manyfold/usr/src/app/public/view/index.html
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +0,0 @@
|
||||||
<script>
|
|
||||||
alert(document.location.search)
|
|
||||||
</script>
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,43 +0,0 @@
|
||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 58.752 58.752" style="enable-background:new 0 0 58.752 58.752;" xml:space="preserve">
|
|
||||||
<g>
|
|
||||||
<path stroke="#CCC" stroke-opacity="0.5" fill="white" d="M52.524,23.925L12.507,0.824c-1.907-1.1-4.376-1.097-6.276,0C4.293,1.94,3.088,4.025,3.088,6.264v46.205
|
|
||||||
c0,2.24,1.204,4.325,3.131,5.435c0.953,0.555,2.042,0.848,3.149,0.848c1.104,0,2.192-0.292,3.141-0.843l40.017-23.103
|
|
||||||
c1.936-1.119,3.138-3.203,3.138-5.439C55.663,27.134,54.462,25.05,52.524,23.925z M49.524,29.612L9.504,52.716
|
|
||||||
c-0.082,0.047-0.18,0.052-0.279-0.005c-0.084-0.049-0.137-0.142-0.137-0.242V6.263c0-0.1,0.052-0.192,0.14-0.243
|
|
||||||
c0.042-0.025,0.09-0.038,0.139-0.038c0.051,0,0.099,0.013,0.142,0.038l40.01,23.098c0.089,0.052,0.145,0.147,0.145,0.249
|
|
||||||
C49.663,29.47,49.611,29.561,49.524,29.612z"/>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
File diff suppressed because one or more lines are too long
|
|
@ -1,51 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
body{
|
|
||||||
background: #555;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img#btn_play:hover {
|
|
||||||
opacity: 1.0;
|
|
||||||
}
|
|
||||||
img#btn_play {
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
width:30%;
|
|
||||||
max-width:400px;
|
|
||||||
transform: translate(-50%,-50%);
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: 0.6;
|
|
||||||
transition: 0.3s;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script type="module" crossorigin src="./xrforge-r929vkvh.js"></script></head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<img id="btn_play" src="./play-c89r1cs1.svg" />
|
|
||||||
|
|
||||||
<a-scene>
|
|
||||||
<a-entity id="scene" animation-mixer_disabled gltf-model></a-entity>
|
|
||||||
|
|
||||||
<a-entity id="player" movement-controls touch-controls="axis:y" wasd-controls="fly:true" look-controls="magicWindowTrackingEnabled:true">
|
|
||||||
<a-entity camera="fov:90" position="0 1.6 0" id="camera"></a-entity>
|
|
||||||
<a-entity id="left-hand" hand-tracking-grab-controls="hand:left;modelColor:#cccccc" raycaster="objects:.ray" blink-controls="cameraRig:#player; teleportOrigin: #camera; collisionEntities: .floor"></a-entity>
|
|
||||||
<a-entity id="right-hand" hand-tracking-grab-controls="hand:right;modelColor:#cccccc" laser-controls="hand: right" raycaster="objects:.ray" blink-controls="cameraRig:#player; teleportOrigin: #camera; collisionEntities: .floor"></a-entity>
|
|
||||||
</a-entity>
|
|
||||||
|
|
||||||
</a-scene>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -54,6 +54,7 @@ rec
|
||||||
pkgs.pkgsStatic.inotify-tools # inotifywait e.g.
|
pkgs.pkgsStatic.inotify-tools # inotifywait e.g.
|
||||||
pkgs.pkgsStatic.zip # inotifywait e.g.
|
pkgs.pkgsStatic.zip # inotifywait e.g.
|
||||||
pkgs.pkgsStatic.ts # job management
|
pkgs.pkgsStatic.ts # job management
|
||||||
|
pkgs.pkgsStatic.assimp # cli 3D editing/conversion
|
||||||
./..
|
./..
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,11 @@
|
||||||
echo " $ # copy image to other server
|
echo " $ # copy image to other server
|
||||||
echo " $ docker save xrforge | bzip2 | ssh user@host docker load"
|
echo " $ docker save xrforge | bzip2 | ssh user@host docker load"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Development:"
|
||||||
|
echo ""
|
||||||
|
echo "" $ cd xrforge-webxr && bun run build && cp dist/xrforge.html ../manyfold/usr/src/app/public/view/index.html
|
||||||
|
echo "" $ manyfold/cli/manyfold.sh run -e DEV=1 -v ./manyfold/usr/src/app/public/view:/usr/src/app/public/view
|
||||||
|
echo ""
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue