Browse Source

Merge remote-tracking branch 'origin/master'

master
liupeng 5 months ago
parent
commit
9a7106c0ee
  1. 17
      src/core/engine/SceneHelp.ts
  2. 3
      src/core/script/LCCScript.ts

17
src/core/engine/SceneHelp.ts

@ -81,14 +81,15 @@ export default class SceneHelp {
this.scene.add(hemisphereLight) this.scene.add(hemisphereLight)
// 完全不透明的地板 // 完全不透明的地板
// const geometry = new THREE.PlaneGeometry(gridOption.gridSize, gridOption.gridSize) const geometry = new THREE.PlaneGeometry(gridOption.gridSize, gridOption.gridSize)
// const material = new THREE.MeshBasicMaterial({ const material = new THREE.MeshBasicMaterial({
// color: '#ffffff', color: '#ffffff',
// side: THREE.BackSide side: THREE.BackSide
// }) })
// const ground = new THREE.Mesh(geometry, material) const ground = new THREE.Mesh(geometry, material)
// ground.rotation.x = -Math.PI / 2 ground.rotation.x = Math.PI / 2
// this.scene.add(ground) ground.position.y = -0.01
this.scene.add(ground)
// const directionalLight = new THREE.DirectionalLight(0xffffff, 1.5) // const directionalLight = new THREE.DirectionalLight(0xffffff, 1.5)
// directionalLight.position.set(5, 5, 5).multiplyScalar(3) // directionalLight.position.set(5, 5, 5).multiplyScalar(3)

3
src/core/script/LCCScript.ts

@ -93,13 +93,12 @@ export default class LCCScript implements LCC {
} }
saveAndSyncScripts(scriptList: { name: string; content: string }[]): Promise<ServerResponse<{ name: string; content: string }[]>> { saveAndSyncScripts(scriptList: { name: string; content: string }[]): Promise<ServerResponse<{ name: string; content: string }[]>> {
if (!worldModel.state.project_uuid || !worldModel.state.runState.currentEnvId) { if (!worldModel.state.project_uuid) {
return Promise.reject(new Error('Project UUID or Environment ID is not set.')) return Promise.reject(new Error('Project UUID or Environment ID is not set.'))
} }
return Request.request.post('/api/workbench/LccController@saveAndSyncScripts', { return Request.request.post('/api/workbench/LccController@saveAndSyncScripts', {
projectUUID: worldModel.state.project_uuid, projectUUID: worldModel.state.project_uuid,
envId: worldModel.state.runState.currentEnvId,
scriptList: scriptList scriptList: scriptList
}) })
} }

Loading…
Cancel
Save