Skip to content

Commit

Permalink
Update ssp[2.11.52]
Browse files Browse the repository at this point in the history
  • Loading branch information
beginnerJq committed Aug 26, 2024
1 parent 4d93b49 commit fc55033
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 49 deletions.
4 changes: 2 additions & 2 deletions libs/soonspacejs/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions libs/soonspacejs/plugins/cps-soonmanager.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions page/plugin/cpsScheme.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
cpsSoonmanagerPlugin.setPath(path);
await cpsSoonmanagerPlugin.loadScene({
loadFlowData: true,
asId: 'id'
});
await ssp.flyMainViewpoint(undefined, { duration: 0 });

Expand Down
1 change: 1 addition & 0 deletions page/plugin/cpsSoonmanager.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
*/
await cpsSoonmanagerPlugin.loadScene({
loadSceneAlgorithm: LoadSceneAlgorithm.DFS,
asId: 'id'
});

/**
Expand Down
13 changes: 10 additions & 3 deletions page/plugin/cpsSoonmanagerLevel.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
},
});

const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin =
ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin'));
const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin(
CpsSoonmanagerPlugin,
'cpsSoonmanagerPlugin'
));

cpsSoonmanagerPlugin.setPath('../../assets/sceneData/cps/智慧园区');

Expand All @@ -68,34 +70,39 @@
cpsSoonmanagerPlugin.loadScene({
loadTargetId: '8M626VCDV6N6',
loadLevel: 1,
asId: 'id',
});
},
'2F': () => {
cpsSoonmanagerPlugin.loadScene({
loadTargetId: '8M626VCDV6N8',
loadLevel: 1,
asId: 'id',
});
},
'3F': () => {
cpsSoonmanagerPlugin.loadScene({
loadTargetId: '8M626VCDV6NA',
loadLevel: 1,
asId: 'id',
});
},
'4F': () => {
cpsSoonmanagerPlugin.loadScene({
loadTargetId: '8M626VCDV6N9',
loadLevel: 1,
asId: 'id',
});
},
'5F': () => {
cpsSoonmanagerPlugin.loadScene({
loadTargetId: '8M626VCDV6N7',
loadLevel: 1,
asId: 'id',
});
},
加载全部: () => {
cpsSoonmanagerPlugin.loadScene();
cpsSoonmanagerPlugin.loadScene({ asId: 'id' });
},
清空: () => {
ssp.getAllModel().forEach((model) => ssp.removeObject(model));
Expand Down
15 changes: 8 additions & 7 deletions page/plugin/firstPersonControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,21 @@
/**
* load scene
*/
const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin =
ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin'));
const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin(
CpsSoonmanagerPlugin,
'cpsSoonmanagerPlugin'
));

cpsSoonmanagerPlugin.setPath('../../assets/sceneData/2.0/东方之门0525');

await cpsSoonmanagerPlugin.loadScene();
await cpsSoonmanagerPlugin.loadScene({
asId: 'id',
});

/**
* 第一人称
*/
const firstPersonControls = ssp.registerPlugin(
FirstPersonControlsPlugin,
'firstPersonControls'
);
const firstPersonControls = ssp.registerPlugin(FirstPersonControlsPlugin, 'firstPersonControls');

firstPersonControls.start({
position: { x: 37, y: 5, z: 4 },
Expand Down
40 changes: 12 additions & 28 deletions page/plugin/tiles-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,11 @@

const tilesPlugin = ssp.registerPlugin(TilesPlugin, 'tilesPlugin');

const baseUrl =
'https://xunwweiresource.oss-cn-shenzhen.aliyuncs.com/3dtiles/杭州交规院';
const baseUrl = 'https://xunwweiresource.oss-cn-shenzhen.aliyuncs.com/3dtiles/杭州交规院';

const tiles = await tilesPlugin.loadTiles(
baseUrl + '/交规院1101块/tileset.json'
);
const tiles1 = await tilesPlugin.loadTiles(
baseUrl + '/交规院1022块/tileset.json'
);
const tiles2 = await tilesPlugin.loadTiles(
baseUrl + '/交规院1027块/tileset.json'
);
const tiles = await tilesPlugin.loadTiles(baseUrl + '/交规院1101块/tileset.json');
const tiles1 = await tilesPlugin.loadTiles(baseUrl + '/交规院1022块/tileset.json');
const tiles2 = await tilesPlugin.loadTiles(baseUrl + '/交规院1027块/tileset.json');

window.tilesArr = [tiles, tiles1, tiles2];

Expand Down Expand Up @@ -110,14 +103,16 @@
controls.camera.up.copy(up);
controls.updateCameraUp();

const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin =
ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin'));
const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin(
CpsSoonmanagerPlugin,
'cpsSoonmanagerPlugin'
));

cpsSoonmanagerPlugin.setPath(baseUrl + '/杭州交规院Scene');
cpsSoonmanagerPlugin.setKey(
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOcXDr8lcaQcg5b6XSK4ov9//GTEynWkfalnawqQK5ngATR5sFastfaVQK7ISRNlsZ/trggyXZPTmBD3m+Uy2e6PtELOIhusie8n4xGjno2ZhRu5dB8IuzFyEDM05WwHNlUFJPKInVikyLzmW1wKO/j69PAnsULsHwcMVLb6pKmQIDAQAB'
);
await cpsSoonmanagerPlugin.loadScene({ needsModelsBoundsTree: false });
await cpsSoonmanagerPlugin.loadScene({ needsModelsBoundsTree: false, asId: 'id' });
// await ssp.computeModelsBoundsTree();
// const modelGroup = await ssp.loadModel({
// id: 'test-opt',
Expand All @@ -126,17 +121,8 @@

const [modelGroup] = ssp.getObjectByName('编组1');

modelGroup.position.set(
...[-2763238.779194681, 4758145.7093269, 3214945.9224052825]
);
modelGroup.rotation.set(
...[
-2.6640808767967856,
-0.25157887271232854,
2.6848083784246044,
'XYZ',
]
);
modelGroup.position.set(...[-2763238.779194681, 4758145.7093269, 3214945.9224052825]);
modelGroup.rotation.set(...[-2.6640808767967856, -0.25157887271232854, 2.6848083784246044, 'XYZ']);

// 重置中心点
// ssp.signals.click.add((event) => {
Expand Down Expand Up @@ -178,9 +164,7 @@

ssp.signals.sceneRendered.add(() => {
const totalLoaded =
tiles.lruCache.itemList.length -
tiles.parseQueue.items.length -
tiles.downloadQueue.items.length;
tiles.lruCache.itemList.length - tiles.parseQueue.items.length - tiles.downloadQueue.items.length;

const { calls, triangles } = ssp.viewport.renderer.info.render;
infoEl.innerText =
Expand Down
2 changes: 1 addition & 1 deletion page/sceneTool/sky-ocean-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDO0R1vcfWt4v2SoWDdODBA6NoMhRW1jBXta5AJNCRcIhdipCDni/ef23Vnqop2Cjbb8G3iMm62tuZn47RXeKRs1/41kuQL2/Vhra2kdenJIQ5txNxUReRtrsih/seOnU/vpNmSZcX8l/iWPmwp5ERFHosYXqnpEsyMaw/8Z7npSQIDAQAB'
);
cpsSoonmanagerPlugin.setPath('../../assets/sceneData/上海长江大桥demo_导入');
await cpsSoonmanagerPlugin.loadScene();
await cpsSoonmanagerPlugin.loadScene({ asId: 'id' });

// 动画播放
const animationsData = await cpsSoonmanagerPlugin.fetchAnimationsData();
Expand Down
12 changes: 6 additions & 6 deletions page/topology/topologyPassable.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@

ssp.setModelDracoDecoderPath('../../libs/soonspacejs/draco/');

const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin =
ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin'));
const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin(
CpsSoonmanagerPlugin,
'cpsSoonmanagerPlugin'
));

cpsSoonmanagerPlugin.setPath(
'../../assets/sceneData/cps/养正-建模-首层平面图讯维视图'
);
cpsSoonmanagerPlugin.setPath('../../assets/sceneData/cps/养正-建模-首层平面图讯维视图');

/**
* 加载场景
*/
await cpsSoonmanagerPlugin.loadScene();
await cpsSoonmanagerPlugin.loadScene({ asId: 'id' });

/**
* 加载拓扑路径数据
Expand Down

0 comments on commit fc55033

Please sign in to comment.