HTML5 布加迪威龙跑车自动化制造过程模拟

news/2024/11/29 12:48:17/

Greensock公司的TweenMax是很好的HTML5动画操作JS库。

本例是演示如何使用TweenMax来模拟跑车的机械自动化制造/自动化装配过程。


思路就是把一些汽车零部件图片按时序以渐入动效入场到Web页面指定位置,从而形成汽车整体自动组装的动画。

$(document).ready(function() {var miniBoxesHolder = $('#ruler_1_wrap');var boxesTl = new TimelineMax({repeat: 1,repeatDelay: 0,yoyo: true});for (n = 0; n < 12; n++) {miniBoxesHolder.append('<div class="ruler_box_1"> </div>');}var rulers = $('.ruler_box_1');anim: (new TimelineLite()).appendMultiple([TweenMax.staggerFromTo(rulers, .3, {css: {height: 0,top: 0,backgroundColor: '#000',borderColor: 'red',rotation: 720,autoAlpha: 0}}, {css: {height: 330,backgroundColor: 'transparent',transformOrigin: "bottom",borderColor: '#777',rotation: 0,autoAlpha: .3},ease: Back.easeOut,immediateRender: true}, .1),]).appendMultiple([TweenMax.fromTo($('#veyron_rear_break'), 1.2, {css: {opacity: 0,right: -1000,},immediateRender: true}, {css: {right: 166,opacity: 1},ease: SlowMo.ease}),TweenMax.fromTo($('#veyron_front_break'), 2.1, {css: {opacity: 0,right: -1900},immediateRender: true}, {css: {right: 678,opacity: 1,delay: 1},ease: SlowMo.ease}),TweenMax.fromTo($('#veyron_bumper'), 1, {css: {opacity: 0,right: -1100,top: -9},immediateRender: true}, {css: {right: -97,top: -9,opacity: .7},ease: SlowMo.ease}),TweenMax.fromTo($('#veyron_frame'), 2.5, {css: {opacity: 0,right: -1100,top: -5},immediateRender: true}, {css: {right: -76,top: -5,opacity: .7},ease: SlowMo.ease,delay: 1}),TweenMax.fromTo($('#veyron_siding'), 1.2, {css: {opacity: 0,right: -1200,top: -135},immediateRender: true}, {css: {right: -335,top: -135,opacity: .7},ease: SlowMo.ease}),TweenMax.fromTo($('#veyron_fender'), 1.9, {css: {opacity: 0,right: -1200,top: -158},immediateRender: true}, {css: {right: 274,top: -158,opacity: .7},ease: Back.easeIn}),TweenMax.fromTo($('#veyron_window'), 2.4, {css: {opacity: 0,right: -100,top: -341},immediateRender: true}, {css: {right: 6,top: -341,opacity: .7},ease: Back.easeOut}),TweenMax.staggerFromTo($('#ruler_horizontal_2'), 2, {css: {height: 0,left: 900,backgroundColor: '#fff',rotation: 400,autoAlpha: 0}}, {css: {height: 1,width: 891,bottom: 85,left: 5,transformOrigin: "top",backgroundColor: '#777',rotation: 1080,opacity: .2,autoAlpha: .4},ease: Back.easeOut,immediateRender: true}, .1),TweenMax.staggerFromTo($('#veyron_tire'), 2.5, {css: {opacity: 0,right: -2991,top: -301}}, {css: {right: -191,top: -301,opacity: .7},ease: SlowMo.ease,immediateRender: true}),TweenMax.staggerFromTo($('#veyron_tire_2'), 3, {css: {opacity: 0,right: -2558,top: -301}}, {css: {right: -558,top: -301,opacity: .7},ease: Back.easeOut,immediateRender: true}, .9),TweenMax.staggerFromTo($('#veyron_head_1'), 1, {css: {left: 44,top: -1579,autoAlpha: 0}}, {css: {left: 44,top: -976,autoAlpha: .9},ease: SlowMo.ease,immediateRender: true}, 2),], -2).appendMultiple([TweenMax.staggerFromTo($('#bugatti_veyron'), 4, {css: {opacity: 0,},immediateRender: true}, {css: {opacity: .9}}, 5),TweenMax.staggerFromTo($('#bugatti_v_tire'), .1, {css: {opacity: 0},immediateRender: true}, {css: {opacity: 1}}),TweenMax.staggerFromTo($('#bugatti_v_tire_2'), .1, {css: {opacity: 0},immediateRender: true}, {css: {opacity: 1}}),TweenMax.staggerTo($('#bugatti_veyron'), .1, {css: {opacity: .4,},immediateRender: true}),]).appendMultiple([TweenMax.staggerTo($('#veyron_hold_box'), 5, {css: {zIndex: "77777",opacity: 1}}),TweenMax.staggerTo($('#veyron_hold_box'), 1, {css: {opacity: 0}}),TweenMax.staggerFromTo($('#bugatti_v_tire'), 5, {css: {rotation: '0deg'}}, {css: {rotation: '70deg'},immediateRender: true}),TweenMax.staggerFromTo($('#bugatti_v_tire_2'), 5, {css: {rotation: '0deg'},immediateRender: true}, {css: {rotation: '70deg'}}),TweenMax.staggerTo($('#veyron_hold_box'), 5, {css: {left: 7}}),TweenMax.staggerTo($('#stage_2'), 5, {css: {left: 102}}),TweenMax.staggerFromTo(rulers, 3, {css: {autoAlpha: .3,rotation: '0deg'}}, {css: {autoAlpha: 0,rotation: '4000deg'},ease: Back.easeOut,immediateRender: true}, .2),])
});

在线演示地址: http://wow.techbrood.com/static/20150225/5650.html


by iefreer


http://www.ppmy.cn/news/371615.html

相关文章

仿QQ发送图片时选中后加蒙版(想看跑车请进)

主要实现给GridView加CheckBox选中后可以加蒙版 FruitAdapter 添加CheckBox和蒙版只需在FruitAdapter中完成造作即可 public class FruitAdapter extends BaseAdapter {private LayoutInflater mInflater;private List<Fruit> mFruits;private boolean mCheckBoxManager…

Michael Dell来到了北京,迈凯伦的跑车开进了现场……

Michael Dell来到了北京&#xff0c;迈凯伦的跑车开进了现场…… 话说今年的戴尔科技峰会最最直观的吸睛之处&#xff0c;小编我首推这两点&#xff01; 听着依旧健步如飞的Michael Dell在台上声情并茂地讲述着一手建立起来的商业帝国在未来&#xff0c;在中国助力企业数字化转…

中国历史上的这几款跑车,你还记得它们么?

说起跑车&#xff0c;大多数人会联想到法拉利、保时捷这样的顶级超跑&#xff0c;又或是BRZ、86、MX5等相对亲民的小跑车。跑车大多对制造工艺要求非常严格&#xff0c;所以跑车的动力以及操控性都比普通的车型更加出色。我们国家的造车水平也越来越高&#xff0c;为什么就没有…

python爬虫设计图片大全_Spider-Python实战之通过Python爬虫爬取图片制作Win7跑车主题...

; Copyright ?Microsoft Corp. [Theme] ; Windows 7 - IDS_THEME_DISPLAYNAME_AERO DisplayName兰博基尼 # 个性化主题名称 SetLogonBackground0 ; Computer - SHIDI_SERVER [CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon] DefaultValue%SystemRoot%\System32\i…

探索iOS之Metal编程指南

iOS推出Metal渲染库为了取代OpenGL。Metal有自己的Shader语言&#xff0c;渲染效率比OpenGL高。在这里我们一起探索&#xff1a;Metal使用C限制、预处理定义、动态链接配置、GPU编译配置、设备坐标系、视口坐标系、纹理坐标系、矢量类型、矩阵类型、采样器状态、矩阵相乘。 1、…

iOS 战斗机跑车效果

原文地址::https://blog.csdn.net/qq_30513483/article/details/73650193 近来看到QQ音乐里面有一些酷酷的礼物效果&#xff0c;手痒&#xff0c;从网上找到一些素材&#xff0c;尝试做一下&#xff0c;效果有点粗糙&#xff0c;但是还是学到了一些东西&#xff0c;故和大家一起…

AE实践一:跑车动画

一、实践素材获取 1、关注“Genji是真想教会你”公众号 2、回复有关课堂序号&#xff0c;比如我应该回复“AE04”获取本次实践的素材 二、步骤 1、导入素材&#xff1a; Psd的文件拖到ae里。当把psd文件拖到左合成区时&#xff0c;会出现一个选框 导入素材。可以理解为把…

Java多态概述

什么是多态? 同类型的对象&#xff0c;执行同一个行为&#xff0c;会表现出不同的行为特征。 多态的常见形式 父类类型 对象名称 new子类构造器; 接口 对象名称 new 实现类构造器;多态中成员访问特点 方法调用: 编译看左边&#xff0c;运行看右边。 即在调用对象的方法时&…