Skip to content

Commit

Permalink
Merge pull request #1169 from Kurtil/fix/bcfPluginSetViewpoint
Browse files Browse the repository at this point in the history
fix BCF plugin set viewpoint
  • Loading branch information
xeolabs authored Oct 10, 2023
2 parents 22783a5 + 799676a commit dff8715
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ class BCFViewpointsPlugin extends Plugin {

scene.clearSectionPlanes();

if (bcfViewpoint.clipping_planes) {
if (bcfViewpoint.clipping_planes && bcfViewpoint.clipping_planes.length > 0) {
bcfViewpoint.clipping_planes.forEach(function (e) {
let pos = xyzObjectToArray(e.location, tempVec3);
let dir = xyzObjectToArray(e.direction, tempVec3);
Expand All @@ -653,7 +653,7 @@ class BCFViewpointsPlugin extends Plugin {

scene.clearLines();

if (bcfViewpoint.lines) {
if (bcfViewpoint.lines && bcfViewpoint.lines.length > 0) {
const positions = [];
const indices = [];
let i = 0;
Expand Down Expand Up @@ -683,7 +683,7 @@ class BCFViewpointsPlugin extends Plugin {

scene.clearBitmaps();

if (bcfViewpoint.bitmaps) {
if (bcfViewpoint.bitmaps && bcfViewpoint.bitmaps.length > 0) {
bcfViewpoint.bitmaps.forEach(function (e) {
const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png"
const bitmap_data = e.bitmap_data; // base64
Expand Down

0 comments on commit dff8715

Please sign in to comment.