forked from LeenkxTeam/Leenkx_Examples
update
This commit is contained in:
19
script_properties/Sources/lnx/MyTrait.hx
Normal file
19
script_properties/Sources/lnx/MyTrait.hx
Normal file
@ -0,0 +1,19 @@
|
||||
package lnx;
|
||||
|
||||
import iron.math.Vec4;
|
||||
|
||||
class MyTrait extends iron.Trait {
|
||||
|
||||
// Property marked with @prop gets exposed in
|
||||
// Blender - Properties - Object - Leenkx Traits panel
|
||||
@prop
|
||||
var speed:Float = 0.1;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
|
||||
notifyOnUpdate(function() {
|
||||
object.transform.rotate(Vec4.zAxis(), speed);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user