Skip to content

Commit

Permalink
Update soonspacejs[v2.11.35]
Browse files Browse the repository at this point in the history
  • Loading branch information
beginnerJq committed Mar 27, 2024
1 parent 116af6c commit 8939c0a
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 13 deletions.
6 changes: 3 additions & 3 deletions libs/soonspacejs/index.js

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions page/poiNode/poiNodeNormal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>SoonSpace Example</title>
<link rel="stylesheet" href="../../assets/css/base.css" />
<style>
#poiTemplate {
width: 668px;
height: 432px;
background: #f0f0f0;
border-radius: 3px;
padding: 0;
}

#poiTemplate > iframe {
width: 100%;
height: 100%;
}
</style>
</head>

<body>
<div id="tips">相机转动至 PoiNode 指定方向的背面时将会隐藏</div>
<div id="view"></div>

<div id="poiTemplate" style="display: none">
<iframe src="https://xwbuilders.com/soonspacejs/" frameborder="0"></iframe>
</div>

<script type="importmap">
{
"imports": {
"three": "../../libs/three/build/three.module.js",
"three/examples/": "../../libs/three/examples/",
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js",
"@soonspacejs/plugin-soonmanager2-sync": "../../libs/soonspacejs/plugins/soonmanager2-sync.js"
}
}
</script>
<script type="module">
import SoonSpace from 'soonspacejs';
import Soonmanager2SyncPlugin from '@soonspacejs/plugin-soonmanager2-sync';
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';

const ssp = new SoonSpace({
el: '#view',
});

ssp.setEnvironment({
path: '../../assets/img/hdr/',
file: 'puresky_1k.hdr',
background: true,
});
</script>
</body>
</html>
6 changes: 4 additions & 2 deletions page/poiNode/poiNodeTransition.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
}
</script>
<script type="module">
import { Vector3 } from 'three';
import SoonSpace from 'soonspacejs';
import EffectPlugin from '@soonspacejs/plugin-effect';
import { GUI } from '../../libs/gui.js';
Expand All @@ -48,6 +49,7 @@
options: {
showGrid: false,
showInfo: false,
showViewHelper: true,
background: {
color: '#ccc',
},
Expand Down Expand Up @@ -114,7 +116,7 @@
},
element: poiNodeEl1,
elementAutoDisplay: false,
occlude: true,
occlude: new Vector3(1, 0, 0),
onChange(visible) {
console.log('change1', visible);
poiNodeContent1.style.opacity = visible ? 1 : 0;
Expand Down Expand Up @@ -148,7 +150,7 @@
},
element: poiNodeEl2,
elementAutoDisplay: false,
occlude: true,
occlude: new Vector3(1, 0, 0),
onChange(visible) {
console.log('change2', visible);
poiNodeContent2.style.opacity = visible ? 1 : 0;
Expand Down
16 changes: 8 additions & 8 deletions page/sceneTool/environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
"three-mesh-bvh": "../../libs/three-mesh-bvh/build/index.module.js",
"soonspacejs": "../../libs/soonspacejs/index.js",
"@soonspacejs/plugin-soonmanager2-sync": "../../libs/soonspacejs/plugins/soonmanager2-sync.js",
"@soonspacejs/plugin-effect": "../../libs/soonspacejs/plugins/effect.js",
"gui": "../../libs/gui.js"
"@soonspacejs/plugin-effect": "../../libs/soonspacejs/plugins/effect.js"
}
}
</script>
<script type="module">
import SoonSpace from 'soonspacejs';
import Soonmanager2SyncPlugin from '@soonspacejs/plugin-soonmanager2-sync';
import EffectPlugin from '@soonspacejs/plugin-effect';
import { GUI } from 'gui';
import { GUI } from "three/examples/jsm/libs/lil-gui.module.min.js";

const ssp = (window.ssp = new SoonSpace({
el: '#view',
Expand All @@ -38,6 +37,11 @@
},
showGrid: false,
},
events: {
// modelClick(p) {
// console.log(p);
// },
},
}));

/**
Expand Down Expand Up @@ -132,11 +136,7 @@

paramsHandle();

gui
.add(params, 'file')
.options(files)
.name('HDR环境')
.onChange(paramsHandle);
gui.add(params, 'file').options(files).name('HDR环境').onChange(paramsHandle);

gui.add(params, 'background').name('同步至背景').onChange(paramsHandle);
</script>
Expand Down

0 comments on commit 8939c0a

Please sign in to comment.