Skip to content

Commit

Permalink
small VRC improvements; add selector offset; query distance; new exam…
Browse files Browse the repository at this point in the history
…ples including remote control app
  • Loading branch information
phoenixbf committed Jan 9, 2022
1 parent 0c3a3ff commit 1976208
Show file tree
Hide file tree
Showing 33 changed files with 831 additions and 158 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
154 changes: 154 additions & 0 deletions data/collections/samples/models/chrysippus/50k_delighted-4k-basis.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{
"asset" : {
"copyright" : "CC-BY-NC E.Demetrescu",
"generator" : "Khronos glTF Blender I/O v1.6.16",
"version" : "2.0"
},
"extensionsUsed" : [
"KHR_draco_mesh_compression"
],
"extensionsRequired" : [
"KHR_draco_mesh_compression"
],
"scene" : 0,
"scenes" : [
{
"name" : "Scene",
"nodes" : [
0
]
}
],
"nodes" : [
{
"mesh" : 0,
"name" : "50k_delighted"
}
],
"materials" : [
{
"doubleSided" : true,
"name" : "50k_delighted",
"normalTexture" : {
"index" : 0
},
"pbrMetallicRoughness" : {
"baseColorTexture" : {
"index" : 1
},
"metallicRoughnessTexture" : {
"index" : 2
},

"roughnessFactor": 1.0,
"metallicFactor": 1.0
}
}
],
"meshes" : [
{
"name" : "50k_delighted",
"primitives" : [
{
"attributes" : {
"POSITION" : 0,
"NORMAL" : 1,
"TEXCOORD_0" : 2
},
"extensions" : {
"KHR_draco_mesh_compression" : {
"bufferView" : 0,
"attributes" : {
"POSITION" : 0,
"NORMAL" : 1,
"TEXCOORD_0" : 2
}
}
},
"indices" : 3,
"material" : 0,
"mode" : 4
}
]
}
],
"textures" : [
{
"sampler" : 0,
"source" : 0
},
{
"sampler" : 0,
"source" : 1
},
{
"sampler" : 0,
"source" : 2
}
],
"images" : [
{
"name" : "CH_Nor",
"uri" : "4k/CH_Nor.basis"
},
{
"name" : "CH_albedo",
"uri" : "4k/CH_albedo.basis"
},
{
"name" : "CH_Met-CH_Rough",
"uri" : "4k/CH_Met-CH_Rough.basis"
}
],
"accessors" : [
{
"componentType" : 5126,
"count" : 26044,
"max" : [
-0.247078999876976,
0.07961300015449524,
0.06736399978399277
],
"min" : [
-0.33241501450538635,
-0.06719200313091278,
-0.026221999898552895
],
"type" : "VEC3"
},
{
"componentType" : 5126,
"count" : 26044,
"type" : "VEC3"
},
{
"componentType" : 5126,
"count" : 26044,
"type" : "VEC2"
},
{
"componentType" : 5123,
"count" : 150000,
"type" : "SCALAR"
}
],
"bufferViews" : [
{
"buffer" : 0,
"byteLength" : 181946,
"byteOffset" : 0
}
],
"samplers" : [
{
"magFilter" : 9729,
"minFilter" : 9987
}
],
"buffers" : [
{
"byteLength" : 181948,
"uri" : "50k_delighted.bin"
}
]
}
Binary file modified data/collections/samples/models/openbox/panel-b.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/collections/samples/models/openbox/panel-g.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/collections/samples/models/openbox/panel-r.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/collections/samples/models/openbox/panel-w.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 27 additions & 7 deletions data/scenes/samples/montebelluna/scene.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
"rotation": 1.0
},
"xlightprobes": {
"auto": true
"list": {
"LP0": {
"pos": [342,116,-118.5],
"near": 0.35
}
}
},
"mainlight": {
"xshadows": true,
"direction": [
-0.303,
-0.868,
-0.392
]
"shadows": true,
"direction": [-0.303,-0.868,-0.392]
}
},

Expand Down Expand Up @@ -102,5 +103,24 @@
"edges": {
".": ["Attuale", "Build. 2", "Building 1", "Last period", "Last period Rec","Build. 2 Rec"]
}
},

"viewpoints": {
"pov-entrance": {
"position": [341.40,117.09,-114.92],
"target": [341.44,116.92,-115.91],
"fov": 57
},
"pov-anvil": {
"position": [341.073,117.0,-120.42
],
"target": [341.38,116.49,-119.62],
"fov": 57
},
"pov-forge": {
"position": [342.97,117.0,-117.85],
"target": [342.96,116.49,-118.71],
"fov": 57
}
}
}
29 changes: 12 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"since 2017-06"
],
"dependencies": {
"3d-tiles-renderer": "^0.3.4",
"3d-tiles-renderer": "^0.3.5",
"axios": "^0.24.0",
"body-parser": "^1.19.1",
"chalk": "4.1.2",
Expand All @@ -63,7 +63,7 @@
"express": "^4.17.2",
"express-basic-auth": "^1.2.1",
"express-session": "^1.17.2",
"fast-glob": "^3.2.7",
"fast-glob": "^3.2.9",
"fast-json-patch": "^3.1.0",
"fs-extra": "^10.0.0",
"glob": "^7.2.0",
Expand All @@ -88,9 +88,9 @@
"replace": "^1.2.1",
"session-file-store": "^1.5.0",
"sharp": "^0.29.3",
"socket.io": "^4.4.0",
"socket.io": "^4.4.1",
"three": "0.136.0",
"three-mesh-bvh": "0.5.2",
"three-mesh-bvh": "0.5.3",
"webdav-server": "^2.6.2",
"zlibjs": "^0.3.1"
}
Expand Down
2 changes: 1 addition & 1 deletion public/dist/ATON.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/THREE.bundle.js

Large diffs are not rendered by default.

Binary file added public/examples/app-basic/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions public/examples/app-basic/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" href="/res/aton-logo.png" sizes="512x512" type="image/png">

<!-- Add iOS meta tags and icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="ATON Sample">
<link rel="apple-touch-icon" href="/res/aton-logo.png">
<meta name="description" content="ATON Sample">
<!-- Add meta theme-color -->
<meta name="theme-color" content="#000000" />

<title>ATON App sample</title>
<link rel="stylesheet" type="text/css" href="/res/css/aton.css">

<script type="text/javascript" src="/vendors/vendors.min.js"></script>

<script type="text/javascript" src="/dist/THREE.bundle.js"></script>
<script type="module" src="/src/ATON.js"></script>
<script>
window.onload = ()=>{
// Realize our App
let myApp = ATON.App.realize();

// Setup: this is executed once (App initialization)
// This may include UI setup (HTML), events handling, etc.
myApp.setup = ()=>{
ATON.FE.realize(); // Realize the base front-end
ATON.FE.addBasicLoaderEvents(); // Add basic front-end events (loading spinner, automatic home, ...)

// Create and load a sample 3D model
ATON.createSceneNode("acube").load("samples/models/atoncube.gltf").attachToRoot();

// Set sample panorama
ATON.setMainPanorama("samples/pano/bg-welcome.jpg");

// Setup a lightprobe centered in the 3D model
ATON.addLightProbe( new ATON.LightProbe().setPosition(0,0,0).setNear(1.0) );
};

// Update: this is executed continuously
myApp.update = ()=>{
let t = ATON.getElapsedTime();

let N = ATON.getSceneNode("acube");
if (N){
N.scale.y = 1.2 + (Math.cos(t) * 0.5); // stretch the node along y axis depending on current time
}
};

// Ok, let's run our App!
myApp.run();
};
</script>
</head>

<body oncontextmenu="return false;">
<!-- Top Toolbar -->
<div id="idTopToolbar" class="atonToolbar atonToolbar-top-left"></div>

<!-- Bottom Toolbar -->
<div id="idBottomToolbar" class="atonToolbar atonToolbar-bottom"></div>

<!-- Main Popup -->
<div id="idPopup" class="atonPopupContainer" style="display:none;"></div>

<!-- Loader -->
<div id="idLoader" class="atonCenterLoader" style="display:none;"></div>

<!-- Powered by -->
<div id='idPoweredBy' class="atonToolbar atonToolbar-bottom poweredBy" >
Powered by <a href="http://osiris.itabc.cnr.it/scenebaker/index.php/projects/aton/" target="_blank">ATON</a>
</div>
</body>
Loading

0 comments on commit 1976208

Please sign in to comment.