Adding upstream version 0.0~git20250520.a1d9079+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
590ac7ff5f
commit
20149b7f3a
456 changed files with 70406 additions and 0 deletions
26
exp/sprite/clock/clock.go
Normal file
26
exp/sprite/clock/clock.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package clock provides a clock and time functions for a sprite engine.
|
||||
package clock
|
||||
|
||||
// A Time represents an instant in sprite time.
|
||||
//
|
||||
// The application using the sprite engine is responsible for
|
||||
// determining sprite time.
|
||||
//
|
||||
// Typically time 0 is when the app is initialized and time is
|
||||
// quantized at the intended frame rate. For example, an app may
|
||||
// record wall time when it is initialized
|
||||
//
|
||||
// var start = time.Now()
|
||||
//
|
||||
// and then compute the current instant in time for 60 FPS:
|
||||
//
|
||||
// now := clock.Time(time.Since(start) * 60 / time.Second)
|
||||
//
|
||||
// An application can pause or reset sprite time, but it must be aware
|
||||
// of any stateful sprite.Arranger instances that expect time to
|
||||
// continue.
|
||||
type Time int32
|
Loading…
Add table
Add a link
Reference in a new issue