Skip to content

Commit

Permalink
Update build files
Browse files Browse the repository at this point in the history
  • Loading branch information
king2088 committed Sep 20, 2023
1 parent 3c201c5 commit e333939
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 80 deletions.
2 changes: 1 addition & 1 deletion dist/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions dist/types/3dLoader/vue3dLoader.vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,9 @@ declare const _default: import("vue").DefineComponent<{
updateStats: () => void;
onProcess: (xhr: ProgressEvent) => void;
addTexture: (object: Object3D, texture: any) => void;
clearSceneWrapper: () => void;
clearScene: () => void;
setObjectAttribute: (type: string, val: any) => void;
getAllObject: () => any;
setLabel: () => void;
setSpriteLabel: () => void;
clearSprite: () => void;
generateCanvas: (text: string, style: any) => HTMLCanvasElement;
Expand Down
3 changes: 1 addition & 2 deletions dist/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,9 @@ declare const _default: {
updateStats: () => void;
onProcess: (xhr: ProgressEvent<EventTarget>) => void;
addTexture: (object: Three.Object3D<Three.Event>, texture: any) => void;
clearSceneWrapper: () => void;
clearScene: () => void;
setObjectAttribute: (type: string, val: any) => void;
getAllObject: () => any;
setLabel: () => void;
setSpriteLabel: () => void;
clearSprite: () => void;
generateCanvas: (text: string, style: any) => HTMLCanvasElement;
Expand Down
56 changes: 28 additions & 28 deletions dist/vue-3d-loader.cjs.js

Large diffs are not rendered by default.

40 changes: 21 additions & 19 deletions dist/vue-3d-loader.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -40872,7 +40872,7 @@ const _sfc_main = defineComponent({
loadModelSelect();
}
if (valueArray[3]) {
clearSceneWrapper();
clearScene();
}
if (valueArray[4] || valueArray[5]) {
updateRenderer();
Expand Down Expand Up @@ -40923,7 +40923,6 @@ const _sfc_main = defineComponent({
updateCamera();
}, { deep: true });
watch([() => props.labels], () => {
clearSprite();
setSpriteLabel();
}, { deep: true });
function resetScene() {
Expand Down Expand Up @@ -40960,7 +40959,8 @@ const _sfc_main = defineComponent({
webGLRendererOptions,
showFps,
enableDamping,
dampingFactor
dampingFactor,
labels
} = props;
if (filePath && typeof filePath === "object") {
isMultipleModels.value = true;
Expand Down Expand Up @@ -41002,6 +41002,9 @@ const _sfc_main = defineComponent({
el.appendChild(stats.dom);
}
animate();
if (labels && labels.length > 0) {
setSpriteLabel();
}
}
function setContainerElementStyle(el) {
const { width, height } = props;
Expand Down Expand Up @@ -41243,8 +41246,6 @@ const _sfc_main = defineComponent({
addTexture(object, _texture);
}
}
clearSprite();
setLabel();
emit("load", scene);
}, (event) => {
if (!parallelLoad) {
Expand Down Expand Up @@ -41353,7 +41354,7 @@ const _sfc_main = defineComponent({
}
});
}
function clearSceneWrapper() {
function clearScene() {
scene.clear();
}
function setObjectAttribute(type, val) {
Expand All @@ -41373,20 +41374,11 @@ const _sfc_main = defineComponent({
function getAllObject() {
return isMultipleModels.value ? scene : object;
}
function setLabel() {
const { filePath } = props;
if (isMultipleModels.value) {
if (loaderIndex.value === filePath.length - 1) {
setSpriteLabel();
}
} else {
setSpriteLabel();
}
}
function setSpriteLabel() {
const { labels } = props;
if (!labels || labels.length <= 0)
return;
clearSprite();
const obj = isMultipleModels.value ? scene : object;
const spriteImageLabel = (image) => {
if (!textureLoader) {
Expand Down Expand Up @@ -41426,8 +41418,18 @@ const _sfc_main = defineComponent({
const sceneChildren = scene.children;
for (let i = sceneChildren.length - 1; i >= 0; i--) {
const item = sceneChildren[i];
if (item && item instanceof Sprite) {
scene.remove(item);
if (item) {
if (item instanceof Group && item.children) {
scene.children[i].children = item.children.map((_item) => {
if (_item instanceof Sprite) {
return null;
}
return _item;
}).filter((item2) => item2);
}
if (item instanceof Sprite) {
scene.remove(item);
}
}
}
}
Expand Down Expand Up @@ -41589,7 +41591,7 @@ const _sfc_main = defineComponent({
};
}
});
var vue3dLoader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6249086c"]]);
var vue3dLoader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-112a1ace"]]);
const install = (app) => {
app.component(vue3dLoader.name, vue3dLoader);
};
Expand Down
56 changes: 28 additions & 28 deletions dist/vue-3d-loader.global.js

Large diffs are not rendered by default.

0 comments on commit e333939

Please sign in to comment.