mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
2 files changed
+6
-5
No files matched your search
@@ -29,10 +29,11 @@ export class TransformClip {
|
||||
this.looping = false;
|
||||
}
|
||||
|
||||
step(object: THREE.Object3D) {
|
||||
//if (this.step_frame >= 60/this.length && this.looping == false) { return; } // Reached max frames.
|
||||
step(object: THREE.Object3D, offset: number, frame: number) {
|
||||
this.step_frame = frame-offset;
|
||||
if (this.step_frame < 0) { this.step_frame = 0; }
|
||||
if (this.step_frame >= this.length) { return; } // Reached max frames.
|
||||
if(this.positions.length < 2) { return; } // If there are enough points in the scene.
|
||||
this.step_frame += 1;
|
||||
|
||||
let time_frame = (this.step_frame/this.length);
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ export class TimeLine {
|
||||
let object = this.scene.get_object_by_uuid(element.object_uuid)
|
||||
if (element.type == "transform") {
|
||||
if (object && this.transformEngine.clips[element.object_uuid]) {
|
||||
this.transformEngine.clips[element.object_uuid].length = (element.ending_offset - element.start_offset)
|
||||
this.transformEngine.clips[element.object_uuid].step(object)
|
||||
this.transformEngine.clips[element.object_uuid].length = (element.ending_offset - element.start_offset);
|
||||
this.transformEngine.clips[element.object_uuid].step(object, element.start_offset, this.scrubberPosition);
|
||||
}
|
||||
}
|
||||
else if (element.type == "audio") {
|
||||
|
||||
Reference in new issue
Block a user