body {
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}
/*
* https://deck.gl/docs/api-reference/core/first-person-view
*/
const {DeckGL, FirstPersonView, PointCloudLayer, COORDINATE_SYSTEM} = deck;
const {PLYLoader} = loaders;
new DeckGL({
views: new FirstPersonView({
focalDistance: 100,
fovy: 80,
// near: 0.1,
// far: 1000,
}),
initialViewState: {
longitude: 0,
latitude: 0,
position: [0, 0, 43.5],
bearing: 0,
pitch: 0,
maxPitch: 89,
minPitch: -89
},
controller: true,
layers: [
new PointCloudLayer({
// Data source: Dorit Borrmann, and Hassan Afzal from Jacobs University Bremen
data: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/thermoscan.ply',
modelMatrix: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1],
coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,
pointSize: 4,
loaders: [PLYLoader]
})
]
});
This Pen doesn't use any external CSS resources.