Cesium-Clock


文档链接

new Cesium.Clock(options)

describe

A simple clock for keeping track of simulated time.

options

Type:object

Object with the following properties:

NameTypeDefaultDescription
startTimeJulianDateThe start time of the clock.
stopTimeJulianDateThe stop time of the clock.
currentTimeJulianDateThe current time.
multiplierNumber1.0Determines how much time advances when clock#tick is called,negative values allow for advancing backward.
clockStepClockStepClockStep.SYSTEM_CLOCK_MULTIPLIERDetermines if calls to Clock#tick are frame dependent or system clock dependent.
clockRangeClockRangeClockRange.UNBOUNDEDDetermines how the clock should behave when Clock#startTime or Clock#stopTime is reached.
canAnimateBooleantrueIndicates whether Clock#tick can advance time. This could be false if data is being buffered, for example. The clock will only tick when both Clock#canAnimate and Clock#shouldAnimate are true.
shouldAnimateBooleanfalseIndicates whether Clock#tick should attempt to advance time. The clock will only tick when both Clock#canAnimate and Clock#shouldAnimate are true.

Throws:

DeveloperError : startTime must come before stopTime.

Example:

// Create a clock that loops on Christmas day 2013 and runs in real-time.
var clock = new Cesium.Clock({
   startTime : Cesium.JulianDate.fromIso8601("2013-12-25"),
   currentTime : Cesium.JulianDate.fromIso8601("2013-12-25"),
   stopTime : Cesium.JulianDate.fromIso8601("2013-12-26"),
   clockRange : Cesium.ClockRange.LOOP_STOP,
   clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER
});

Members

canAnimate : Boolean
clockRange : ClockRange
clockStep : ClockStep
currentTime : JulianDate
multiplier : Number
onStop : Event
onTick : Event
shouldAnimate : Boolean
startTime : JulianDate

 The start time of the clock. 

stopTime : JulianDate

 The stop time of the clock. 

Methods

tick() → JulianDate

JulianDate

new Cesium.JulianDate(julianDayNumber, secondsOfDay, timeStandard)

Core/JulianDate.js 207

Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC). For increased precision, this class stores the whole number part of the date and the seconds part of the date in separate components. In order to be safe for arithmetic and represent leap seconds, the date is always stored in the International Atomic Time standard TimeStandard.TAI.

NameTypeDefaultDescription
julianDayNumberNumber0.0optional The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.
secondsOfDayNumber0.0optional The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.
timeStandardTimeStandardTimeStandard.UTCoptional The time standard in which the first two parameters are defined.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值