def ZoomCamera(scale, duration, repeat, tm = 0.0): if scale <= 0 or repeat == 0 or duration <= 0: return if repeat < 0: repeat = IFINIT_LOOP_NUM oldValue = [NBGM_SCRIPT_CONTEX.queryInfo('GetViewPointDistance')] newValue = [oldValue[0]*scale] action = [SetViewPointDistance] __start_animation__(oldValue, newValue, duration, repeat, tm, action)
def RotateCamera(delta_angle, duration, repeat, tm = 0.0): if repeat == 0 or duration <= 0: return if repeat < 0: repeat = IFINIT_LOOP_NUM oldValue = [NBGM_SCRIPT_CONTEX.queryInfo('GetRotateAngle')] newValue = [oldValue[0] + delta_angle] action = [SetRotateAngle] __start_animation__(oldValue, newValue, duration, repeat, tm, action)
def GetTiltAngle(): return NBGM_SCRIPT_CONTEX.queryInfo('GetTiltAngle')
def SetBackground(background, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetBackground', [background], tm)
def SetAvatarMode(mode, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetAvatarMode', [mode], tm)
def SetAvatarScale(scaleValue, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetAvatarScale', [scaleValue], tm)
def SetViewSize(x, y, width, height, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetViewPointDistance', (x, y, width, height), tm)
def SetHorizonDistance(horizonDistance, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetHorizonDistance', [horizonDistance], tm)
def Tilt(angle, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('Tilt', [angle], tm)
def UnLoadTile(nbmName, autoerease = True, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('UnLoadTile', [nbmName], tm) if autoerease: NBGM_SCRIPT_CONTEX.loaded_tiles.remove(nbmName)
def WaitForSeconds(seconds): if seconds <= 0: return NBGM_SCRIPT_CONTEX.WaitForSeconds(seconds)
def LoadNBMTile(nbmName, baseDrawOrder, labelDrawOrder, filePath, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('LoadNBMTile', (nbmName, baseDrawOrder, labelDrawOrder, filePath), tm) NBGM_SCRIPT_CONTEX.loaded_tiles.add(nbmName)
def SetCurrentCommonMaterial(materialName, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetCurrentCommonMaterial', [materialName], tm)
def LoadCommonMaterial(materialName, filePath, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('LoadCommonMaterial', (materialName, filePath), tm)
def Move(dx, dy, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('Move', (dx, dy), tm)
def SetTiltAngle(angle, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetTiltAngle', [angle], tm) NBGM_SCRIPT_CONTEX.tilt_angle = float(angle)
def SetViewCenter(mercatorX, mercatorY, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetViewCenter', (mercatorX, mercatorY), tm)
def Rotate(angle, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('Rotate', [angle], tm)
def SetViewPointDistance(distance, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetViewPointDistance', [distance], tm) NBGM_SCRIPT_CONTEX.viewpoint_distance = float(distance)
def SetRotateAngle(angle, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetRotateAngle', [angle], tm) NBGM_SCRIPT_CONTEX.rotate_angle = float(angle)
def SetPerspective(fov, aspect, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetPerspective', (fov, aspect), tm)
def SetRotateCenter(screenX, screenY, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetRotateCenter', (screenX, screenY), tm)
def SetAvatarState(state, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetAvatarState', [state], tm)
def OnTouchEvent(screenX, screenY, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('OnTouchEvent', (screenX, screenY), tm)
def SelectAndTrackAvatar(x, y, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SelectAndTrackAvatar', (x, y), tm)
def OnPaning(screenX, screenY, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('OnPaning', (screenX, screenY), tm)
def SetSkyDayNight(isDay, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('SetSkyDayNight', [isDay], tm)
def Zoom(deltaH, tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('Zoom', [deltaH], tm)
def GetRotateAngle(): return NBGM_SCRIPT_CONTEX.queryInfo('GetRotateAngle')
def RenderFrame(tm = 0.0): NBGM_SCRIPT_CONTEX.addTask('RenderFrame', [], tm)