删除console.log
This commit is contained in:
35
index.html
35
index.html
@ -473,7 +473,7 @@
|
||||
</div>
|
||||
<div class="category-content expanded">
|
||||
<div class="option-group">
|
||||
<button class="option-btn" data-option="color-3">SPFADSW10FTW</button>
|
||||
<button class="option-btn" data-option="color-3">SPFSW10FTW</button>
|
||||
<button class="option-btn" data-option="color-4">SPFPDS10FTC</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -603,12 +603,10 @@
|
||||
|
||||
|
||||
kernel.on('model:load:progress', (data) => {
|
||||
console.log('模型加载事件', data);
|
||||
});
|
||||
|
||||
|
||||
kernel.on('model:loaded', (data) => {
|
||||
console.log('模型加载完成', data);
|
||||
// 隐藏进度条
|
||||
const progressContainer = document.getElementById('progress-container');
|
||||
if (progressContainer) {
|
||||
@ -617,7 +615,6 @@
|
||||
});
|
||||
|
||||
kernel.on('all:ready', (data) => {
|
||||
console.log('所有模块加载完,', data);
|
||||
kernel.material.apply({
|
||||
target: 'Material__2',
|
||||
attribute: 'alpha',
|
||||
@ -680,12 +677,6 @@
|
||||
});
|
||||
document.dispatchEvent(event);
|
||||
|
||||
console.log('配置变更:', {
|
||||
category: categoryName,
|
||||
value: this.dataset.option,
|
||||
text: this.textContent
|
||||
});
|
||||
|
||||
const currentText = this.textContent;
|
||||
sku = currentText;
|
||||
await getProductConfig(currentText)
|
||||
@ -705,7 +696,6 @@
|
||||
|
||||
// 监听热点点击事件
|
||||
window.addEventListener('hotspot:click', (event) => {
|
||||
console.log('热点被点击:', event.detail);
|
||||
const { id, name, payload } = event.detail;
|
||||
|
||||
const clickInfoDiv = document.getElementById('click-info');
|
||||
@ -738,7 +728,6 @@
|
||||
|
||||
// 监听模型点击事件
|
||||
window.addEventListener('model:click', (event) => {
|
||||
console.log('模型被点击:', event.detail);
|
||||
const { meshName, modelName, materialName, modelControlType } = event.detail;
|
||||
|
||||
const clickInfoDiv = document.getElementById('click-info');
|
||||
@ -799,12 +788,7 @@
|
||||
});
|
||||
document.dispatchEvent(event);
|
||||
|
||||
console.log('配置变更(多选):', {
|
||||
category: categoryName,
|
||||
selectedValues: selectedValues,
|
||||
checked: this.checked,
|
||||
currentValue: this.dataset.option
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -835,7 +819,6 @@
|
||||
document.getElementById('color-btn-1').addEventListener('click', () => {
|
||||
const materialName = window.getCurrentMaterialName();
|
||||
if (materialName) {
|
||||
console.log('切换为白色,材质名:', materialName);
|
||||
kernel.material.apply({
|
||||
target: materialName,
|
||||
albedoColor: '#FFFFFF',
|
||||
@ -849,7 +832,6 @@
|
||||
document.getElementById('color-btn-2').addEventListener('click', () => {
|
||||
const materialName = window.getCurrentMaterialName();
|
||||
if (materialName) {
|
||||
console.log('切换为黑色,材质名:', materialName);
|
||||
kernel.material.apply({
|
||||
target: materialName,
|
||||
albedoColor: '#000000',
|
||||
@ -865,7 +847,6 @@
|
||||
if (pickedMesh) {
|
||||
const modelName = kernel.model.findModelNameByMesh?.(pickedMesh);
|
||||
if (modelName) {
|
||||
console.log('旋转90度,模型名:', modelName);
|
||||
kernel.transform.rotation({
|
||||
modelId: modelName,
|
||||
vector3: { x: 0, y: 90, z: 0 }
|
||||
@ -884,10 +865,9 @@
|
||||
if (pickedMesh) {
|
||||
const modelName = kernel.model.findModelNameByMesh?.(pickedMesh);
|
||||
if (modelName) {
|
||||
console.log('旋转180度,模型名:', modelName);
|
||||
kernel.transform.rotation({
|
||||
modelId: modelName,
|
||||
vector3: { x: 0, y: 30, z: 0 }
|
||||
vector3: { x: 0, y: 180, z: 0 }
|
||||
});
|
||||
} else {
|
||||
console.log('未找到模型名称');
|
||||
@ -906,7 +886,6 @@
|
||||
const modelName = kernel.model.findModelNameByMesh(pickedMesh);
|
||||
const success = kernel.model.removeByName(modelName);
|
||||
if (success) {
|
||||
console.log('模型已移除');
|
||||
// 关闭信息框
|
||||
kernel.domTo3D.detach('model-info');
|
||||
} else {
|
||||
@ -935,7 +914,6 @@
|
||||
|
||||
// 监听模型加载完成事件
|
||||
kernel.on('model:loaded', (data) => {
|
||||
console.log('模型加载完成', data);
|
||||
// 隐藏进度条
|
||||
const progressContainer = document.getElementById('progress-container');
|
||||
if (progressContainer) {
|
||||
@ -949,14 +927,12 @@
|
||||
let currentPickedMesh = null;
|
||||
|
||||
kernel.on('model:click', (data) => {
|
||||
console.log('模型点击事件', data);
|
||||
console.log('模型控制类型:', data.modelControlType);
|
||||
|
||||
|
||||
// 获取模型关联的 SKU
|
||||
const modelName = data.modelName;
|
||||
const sku = window.getSkuByModelId(modelName);
|
||||
console.log('点击的模型ID:', modelName);
|
||||
console.log('关联的SKU:', sku || '未找到关联的SKU');
|
||||
|
||||
|
||||
switch (data.modelControlType) {
|
||||
case "color":
|
||||
@ -1022,7 +998,6 @@
|
||||
});
|
||||
|
||||
kernel.on('hotspot:click', (event) => {
|
||||
console.log('热点被点击:', event);
|
||||
|
||||
const { id, name, payload } = event;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user