0.1.1 • Published 6 years ago
altizure-plugin-gltf v0.1.1
GLTF
The GLTF plugin for Altizure Javascript 3D SDK
__
usage
This plugin needs altizure
defined.
in js
This plugin has to be used together with the altizure
module. Make sure altizure
is in your dependencies (or devDependencies) list in package.json
file.
import {Sandbox} from 'altizure'
import GLTFMarker from 'altizure-plugin-gltf'
let options = {
altizureApi:{
key: your key here...
}
}
let sandbox = new Sandbox('page-content', options)
let gltfMarker = new GLTFMarker({
sandbox,
position: {lng: 114.21146546031991, lat: 22.426228743611954, alt: 100},
scale: 10,
url: '../public/sketch/sketch.gltf',
// front, back, up, down, left, right
envMapBase: '../public/envmap/lake1/',
envMapUrl: [
'lake1_ft.JPG', 'lake1_bk.JPG',
'lake1_up.JPG', 'lake1_dn.JPG',
'lake1_lf.JPG', 'lake1_rt.JPG'
]
})
in html
<head>
<script type="text/javascript" src="https://unpkg.com/altizure/release/altizure-sdk.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/altizure-plugin-gltf"></script>
</head>
<body>
<div id="page-content" />
<script>
let options = {
altizureApi:{
key: your key here...
}
}
let sandbox = new altizure.Sandbox('page-content', options)
let gltfMarker = new altizure.GLTFMarker({
sandbox,
position: {lng: 114.21146546031991, lat: 22.426228743611954, alt: 100},
scale: 10,
url: '../public/sketch/sketch.gltf',
// front, back, up, down, left, right
envMapBase: '../public/envmap/lake1/',
envMapUrl: [
'lake1_ft.JPG', 'lake1_bk.JPG',
'lake1_up.JPG', 'lake1_dn.JPG',
'lake1_lf.JPG', 'lake1_rt.JPG'
]
})
</script>
</body>