Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

チュートリアルページのコードでエラーが発生する #570

Closed
fullmated opened this issue Apr 28, 2018 · 3 comments
Closed

Comments

@fullmated
Copy link

https://grimoire.gl/guide/1_essentials/02_introduction.html
のRotateコンポーネントの説明において、チュートリアルのページには以下のようなコードが書かれている。

$update:function(){
    this.phi += this.getValue("speed");
    this.node.setAttribute("rotation",this.phi + "," + this.phi + "," + this.phi);
  }

しかしこのまま書くとコンソールでエラーが吐き出される。SAMPLEの通りに書いたら正常に動作した。

$update:function(){
    this.phi += this.getAttribute("speed");
    this.node.setAttribute("rotation",this.phi + "," + this.phi + "," + this.phi);
}

ページに書かれたコードが間違っていたのでしょうか。それとも、私の環境の問題でしょうか。

Chrome バージョン: 65.0.3325.181(Official Build) (64 ビット)

@cx20
Copy link

cx20 commented Apr 28, 2018

チュートリアルのコードが古いようですね。Grimiore.js v0.12.0 以降では getValue ではなく getAttribute を使う必要があるようです。

#403

getAttribute/getValueなどの名前の統一(破壊的変更)

@kyasbal
Copy link
Member

kyasbal commented May 4, 2018

チュートリアル直さないといけなそうですね。コメントありがとうございます!

@fullmated
Copy link
Author

@cx20 迅速に教えていただきありがとうございます!
@kyasbal-1994 よろしくお願いいたします! また何かあったら報告いたします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants