Commit 9d62b45b authored by limingzhe's avatar limingzhe

first

parent 058295b3
......@@ -12,6 +12,7 @@
<div class="item-box">
<span>item-{{i+1}}</span>
<app-upload-image-with-preview
style="width: 100%"
[picUrl]="it.pic_url"
......
import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef} from '@angular/core';
import {NzMessageService} from 'ng-zorro-antd';
......@@ -14,7 +15,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
_item: any;
KEY = 'hw_000';
KEY = 'dfzx_12';
......@@ -35,7 +36,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
constructor(private appRef: ApplicationRef) {
constructor(private appRef: ApplicationRef,
private message: NzMessageService) {
}
......@@ -166,6 +168,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
addPic() {
if (this.picArr.length >= 15) {
this.message.error('最多添加15个');
return;
}
this.picArr.push({
pic_url: '',
audio_url: '',
......
......@@ -1495,6 +1495,38 @@ export function showPopParticle(img, pos, parent) {
}
export function bezierMove(item, p0, p1, p2, time, callback = null, easing = null) {
const obj = {factor: 0};
const tween = new TWEEN.Tween(obj).to({factor: 1}, time * 1000);
if (callback) {
tween.onComplete(() => {
callback();
});
}
if (easing) {
tween.easing(easing);
}
tween.onUpdate( (obj, p) => {
// 起点P0 控制点P1 终点P2
// (1 - t)^2 P0 + 2 t (1 - t) P1 + t^2 P2
const t = obj.factor;
item.x = (1 - t) * (1 - t) * p0.x + 2 * t * (1 - t) * p1.x + t * t * p2.x;
item.y = (1 - t) * (1 - t) * p0.y + 2 * t * (1 - t) * p1.y + t * t * p2.y;
});
tween.start();
}
export function shake(item, time = 0.5, callback = null, rate = 1) {
......
This diff is collapsed.
......@@ -5,6 +5,16 @@ const res = [
['btn_right', "assets/play/btn_right.png"],
['text_bg', "assets/play/text_bg.png"],
['mask', "assets/play/mask.png"],
['flashlight', "assets/play/flashlight.png"],
['start', "assets/play/start.png"],
['next', "assets/play/next.png"],
['star', "assets/play/star.png"],
['pic', "assets/play/default/pic.png"],
];
......@@ -13,7 +23,8 @@ const res = [
const resAudio = [
// ['click', "assets/play/music/click.mp3"],
['leave', "assets/play/music/leave.mp3"],
['select', "assets/play/music/select.mp3"],
......
src/assets/play/bg.jpg

25.8 KB | W: | H:

src/assets/play/bg.jpg

803 KB | W: | H:

src/assets/play/bg.jpg
src/assets/play/bg.jpg
src/assets/play/bg.jpg
src/assets/play/bg.jpg
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment