factoryEasingTween

package
v0.0.0-...-a8ee3e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

Example

Webassembly and Golang factoryTween functions example

This example can move 200 divs simultaneously on my Sansung Galaxy A51 phone (a basic cell phone model, with android) and 700 divs on my Mac Book.

Environment variables:

GOARCH=wasm
GOOS=js

Go tool arguments:

-o main.wasm

Code Golang:

//go:build js
// +build js

//
package main

import (
	global "github.com/helmutkemper/iotmaker.santa_isabel_theater.globalConfig"
	"github.com/helmutkemper/iotmaker.santa_isabel_theater.platform.webbrowser/css"
	document2 "github.com/helmutkemper/iotmaker.santa_isabel_theater.platform.webbrowser/document"
	"github.com/helmutkemper/iotmaker.santa_isabel_theater.platform.webbrowser/factoryBrowserImage"
	"github.com/helmutkemper/iotmaker.santa_isabel_theater.platform/factoryTween"
	"github.com/helmutkemper/iotmaker.santa_isabel_theater.platform/mathUtil"
	"log"
	"strconv"
	"time"
)

func main() {
	
	done := make(chan struct{}, 0)
	document := global.Global.Document
	
	// Carrega a imagem
	factoryBrowserImage.NewImage(
		29,
		50,
		map[string]interface{}{
			"id":  "spacecraft",
			"src": "./small.png",
		},
		true,
		false,
	)
	
	var err error
	document.GetElementById(document, "palco")
	for a := 0; a != 10; a += 1 {
		
		id := "div_" + strconv.FormatInt(int64(a), 10)
		var cssClass = css.Class{}
		cssClass.SetList("current", "animate")
		err = document.CreateElement(document, "palco", "div", document2.Property{Property: "id", Value: id}, cssClass)
		if err != nil {
			log.Printf("document.CreateElement().error: %v", err.Error())
		}
		var e = document.GetElementById(document, id)
		var border = 200
		factoryTween.NewSelectRandom(
			time.Duration(mathUtil.Int(1000, 3000))*time.Millisecond,
			mathUtil.Float64FomInt(border, global.Global.Document.GetDocumentWidth()-29-border),
			mathUtil.Float64FomInt(border, global.Global.Document.GetDocumentWidth()-29-border),
			func(x, p float64, ars ...interface{}) {
				px := strconv.FormatFloat(x, 'E', 10, 32) + "px"
				document.SetElementStyle(e, "left", px)
			},
			-1,
		)
		
		factoryTween.NewSelectRandom(
			time.Duration(mathUtil.Int(1000, 3000))*time.Millisecond,
			mathUtil.Float64FomInt(border, global.Global.Document.GetDocumentHeight()-50-border),
			mathUtil.Float64FomInt(border, global.Global.Document.GetDocumentHeight()-50-border),
			func(y, p float64, ars ...interface{}) {
				py := strconv.FormatFloat(y, 'E', 10, 32) + "px"
				document.SetElementStyle(e, "top", py)
			},
			-1,
		)
	
	}
	
	<-done
}

Html code:

<html>
<head>
  <meta charset="utf-8"/>
  <style>
      body {
          margin: 0 !important;
          padding: 0 !important;
      }

      .animate {
        width: 29px;
        height: 50px;
        position: absolute;
        background-image: url("./small.png");
      }
  </style>
  <script src="wasm_exec.js"></script>
  <script>
    const go = new Go();
    WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
      go.run(result.instance);
    });
  </script>
</head>
<body>
  <div id="palco"></div>
</body>
</html>

Webassembly needs a server to run. The example below is a simple static server that prints the IP address to standard output.

package main

import (
  "log"
  "net"
  "net/http"
)

func main() {
  var err error
  var addrs []net.Addr
  
  var ifaces []net.Interface
  
  ifaces, err = net.Interfaces()
  // handle err
  for _, i := range ifaces {
    addrs, err = i.Addrs()
    // handle err
    for _, addr := range addrs {
      var ip net.IP
      switch v := addr.(type) {
      case *net.IPNet:
        ip = v.IP
      case *net.IPAddr:
        ip = v.IP
      }
      log.Printf("addr: %v", ip)
    }
  }
  
  fs := http.FileServer(http.Dir("./"))
  http.Handle("/", fs)
  
  log.Println("Listening on :3000..")
  err = http.ListenAndServe(":3000", nil)
  if err != nil {
    log.Fatal(err)
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInBack

func NewInBack(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInBack

English: Ease tween in back

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in back

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInBounce

func NewInBounce(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInBounce

English: Ease tween in bounce

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in bounce

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInCircular

func NewInCircular(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInCircular

English: Ease tween in circular

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in circular

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInCubic

func NewInCubic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInCubic

English: Ease tween in cubic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in cubic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInElastic

func NewInElastic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInElastic

English: Ease tween in elastic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in elastic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInExponential

func NewInExponential(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInExponential

English: Ease tween in exponential

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in exponential

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutBack

func NewInOutBack(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutBack

English: Ease tween in out back

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out back

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutBounce

func NewInOutBounce(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutBounce

English: Ease tween in out bounce

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out bounce

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutCircular

func NewInOutCircular(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutCircular

English: Ease tween in out circular

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out circular

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutCubic

func NewInOutCubic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutCubic

English: Ease tween in out cubic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out cubic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutElastic

func NewInOutElastic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutElastic

English: Ease tween in out elastic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out elastic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutExponential

func NewInOutExponential(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutExponential

English: Ease tween in out exponential

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out exponential

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutQuadratic

func NewInOutQuadratic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutQuadratic

English: Ease tween in out quadratic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out quadratic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutQuartic

func NewInOutQuartic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutQuartic

English: Ease tween in out quartic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out quartic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutQuintic

func NewInOutQuintic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutQuintic

English: Ease tween in out quintic

duration: animation duration
startValue: initial value
endValue: final value
onStepFunc: on step function
loop: number of loops or -1 for infinite loops
arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
           Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português: Facilitador de interpolação in out quintic

duration: duração da animação
startValue: valor inicial
endValue: valor final
onStepFunc: função para o evento passo
loop: número de interações ou -1 para um número infinito de interações
arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
           Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInOutSine

func NewInOutSine(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInOutSine

English:

Ease tween in out sine

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação in out sine

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInQuadratic

func NewInQuadratic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInQuadratic

English:

Ease tween in quadratic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação in quadratic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInQuartic

func NewInQuartic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInQuartic

English:

Ease tween in quartic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação in quartic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInQuintic

func NewInQuintic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInQuintic

English:

Ease tween in quintic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação in quintic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewInSine

func NewInSine(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewInSine

English:

Ease tween in sine

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação in sine

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewLinear

func NewLinear(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewLinear

English:

Ease tween linear.

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
      Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: this; args[1]: x; args[2]: y}

Português:

Facilitador de interpolação linear.

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
      Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: this; args[1]: x; args[2]: y}

func NewOutBack

func NewOutBack(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutBack

English:

Ease tween out back

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out back

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutBounce

func NewOutBounce(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutBounce

English:

Ease tween out bounce

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out bounce

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutCircular

func NewOutCircular(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutCircular

English:

Ease tween out circular

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out circular

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutCubic

func NewOutCubic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutCubic

English:

Ease tween out cubic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out cubic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutElastic

func NewOutElastic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutElastic

English:

Ease tween out elastic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out elastic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutExponential

func NewOutExponential(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutExponential

English:

Ease tween out exponential

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out exponential

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutQuadratic

func NewOutQuadratic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutQuadratic

English:

Ease tween out quadratic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out quadratic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutQuartic

func NewOutQuartic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutQuartic

English:

Ease tween out quartic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação out quartic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutQuintic

func NewOutQuintic(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutQuintic

English:

Ease tween ease out quintic

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação ease out quintic

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewOutSine

func NewOutSine(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewOutSine

English:

Ease tween ease out sine

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação ease out sine

 Entrada:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

func NewRandom

func NewRandom(
	duration time.Duration,
	startValue,
	endValue float64,
	onStepFunc interface{},
	loop int,
	arguments ...interface{},
) *easingTween.Tween

NewRandom

English:

Ease tween random

 Input:

   duration: animation duration
   startValue: initial value
   endValue: final value
   onStepFunc: on step function
   loop: number of loops or -1 for infinite loops
   arguments: array of arguments passed for functions onStart, onEnd, onInvert and onStep.
              Example: ..., [arguments] x, y) will be onStartFunc(value, args...) { args[0]: x; args[1]: y}

Português:

Facilitador de interpolação random

 Input:

   duration: duração da animação
   startValue: valor inicial
   endValue: valor final
   onStepFunc: função para o evento passo
   loop: número de interações ou -1 para um número infinito de interações
   arguments: array de argumentos passados para as funções onStart, onEnd, onInvert e onStep.
              Exemplo: ..., [argumentos] x, y) será onStartFunc(value, args...) { args[0]: x; args[1]: y}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL