Continuing the discussion from Generate 3D tiles in CPP:
Thx it works perfectly, now I’m trying to not use 3D tiles, and watched how the files is read.
I wanted to do something like that :
const response = await fetch('http://localhost:8080/content.pnts');
const arrayBuffer = await response.arrayBuffer();
const model = await Cesium.Model.fromPnts({
arrayBuffer,
byteOffset: 0
});
viewer.scene.primitives.add(model);
but it’s not working, there are options missing fromPnts , by example content :
backFaceCulling: true
byteOffset: 0
clippingPlanes: undefined
colorBlendAmount: 0.5
colorBlendMode: 0
content: Model3DTileContent {_tileset: Cesium3DTileset, _tile: Cesium3DTile, _resource: Resource, _model: undefined, _metadata: undefined, …}
cull: false
customShader: CustomShader {mode: "MODIFY_MATERIAL", lightingModel: undefined, uniforms: {…}, varyings: {…}, vertexShaderText: undefined, …}
debugWireframe: false
enableDebugWireframe: false
enablePick: false
enableShowOutline: true
featureIdLabel: "featureId_0"
forwardAxis: 0
imageBasedLighting: ImageBasedLighting {_imageBasedLightingFactor: Cartesian2, _sphericalHarmonicCoefficients: undefined, _specularEnvironmentMaps: undefined, _specularEnvironmentCubeMap: undefined, _specularEnvironmentCubeMapDirty: true, …}
incrementallyLoadTextures: false
instanceFeatureIdLabel: "instanceFeatureId_0"
lightColor: undefined
modelMatrix: Matrix4 {0: 1, 1: 0, 2: 0, 3: 0, 4: 0, 5: 1, 6: 0, 7: 0, 8: 0, 9: 0, 10: 1, 11: 0, 12: 0, 13: 0, 14: 0, 15: 1}
opaquePass: 4
outlineColor: Color {red: 0, green: 0, blue: 0, alpha: 1}
pointCloudShading: PointCloudShading {attenuation: false, geometricErrorScale: 1, maximumAttenuation: undefined, baseResolution: undefined, eyeDomeLighting: true, …}
projectTo2D: false
releaseGltfJson: true
resource: Resource {_url: "http://localhost:8080/content.pnts", _templateValues: {…}, _queryParameters: {…}, headers: {…}, request: Request, …}
shadows: 1
showCreditsOnScreen: false
showOutline: true
splitDirection: 0
upAxis: 1
any idea what are the important options ?
modelMatrix, customShader are logical to be included.
but content, I don’t know what to put instead of Model3DTileContent.