bilibili / bilibili/bas

非渐变属性计时BUG?

Open
#16 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
201
Forks
17
PR merge metrics
No merged PRs in 30d

Description

最近在写 [gas → bas 的转码器](https://opendanmakucommunity.github.io/gas/ide/),然后想支持一下非渐变属性(如content)的瞬时动画,然而感觉计时非常之谜。

参考如下代码:
````
def text timer {
content = ""
x = 0
y = 0
}
def text t {
content = "Hello World! (0)"
x = 50%
y = 0
color = 0xff0000
}

set timer { content = "000" } 1s
then set timer { content = "001" } 1s
then set timer { content = "002" } 1s
then set timer { content = "003" } 1s
then set timer { content = "004" } 1s
then set timer { content = "005" } 1s
then set timer { content = "006" } 1s
then set timer { content = "007" } 1s
then set timer { content = "008" } 1s
then set timer { content = "009" } 1s
then set timer { content = "010" } 1s

set t {} 3s
then set t { content = "Hello World! (3)"} 0s
then set t {} 3s
then set t { content = "Hello World! (6)"} 0s
then set t {} 3s
then set t { content = "Hello World! (9)"} 0s
then set t {} 2s

set t { color = 0x00ff00 } 5s
then set t { color = 0x0000ff } 5s
then set t { color = 0xff0000 } 1s
````

期望:
在 3s 时 t 的字变成 `Hello World! (3)`
在 6s 时 t 的字变成 `Hello World! (6)`
在 9s 时 t 的字变成 `Hello World! (9)`

实际:
在 3s 时 t 的字变成 `Hello World! (3)`
在 **5s** 时 t 的字变成 `Hello World! (6)`
在 **6s** 时 t 的字变成 `Hello World! (9)`

目前看颜色渐变和计时器都没有问题,然而 `Hello World!` 部分究竟是为什么计时不对呢。。。。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the gas → bas converter linked in the issue and reproduce the supplied script, comparing the non-gradient content changes with the working color and timer behavior. Done means the content changes occur at 3s, 6s, and 9s as expected, rather than at 5s and 6s.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.