Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scilla-components
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
scilla-components
Commits
542cf045
Commit
542cf045
authored
Apr 09, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改tween,增加host
parent
1fcc68a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
rollup.config.js
rollup.config.js
+5
-2
FullStageSize.ts
src/other/FullStageSize.ts
+15
-3
registerAllComponents.ts
src/registerAllComponents.ts
+2
-0
No files found.
rollup.config.js
View file @
542cf045
...
...
@@ -7,12 +7,14 @@ const commonjs = require('rollup-plugin-commonjs');
const
typescript
=
require
(
'rollup-plugin-typescript2'
);
const
{
uglify
}
=
require
(
'rollup-plugin-uglify'
);
const
name
=
'scilla-components'
;
export
default
{
input
:
'src/index.ts'
,
output
:
{
file
:
'dist/bundle.js'
,
file
:
`dist/
${
name
}
.js`
,
format
:
'umd'
,
name
:
'scilla-components'
,
name
,
//sourcemap: true,
},
plugins
:
[
...
...
@@ -23,6 +25,7 @@ export default {
typescript
:
require
(
'typescript'
),
tslib
:
require
(
'tslib'
),
useTsconfigDeclarationDir
:
true
,
declaration
:
false
,
}),
commonjs
(),
//uglify({}),
...
...
src/other/FullStageSize.ts
View file @
542cf045
...
...
@@ -11,7 +11,15 @@ import {getStageSize, ScillaComponent, } from "scilla";
export
default
class
FullStageSize
extends
ScillaComponent
{
once
:
boolean
=
true
;
private
stageSize
;
private
_stageSize
;
get
stageSize
(){
if
(
!
this
.
_stageSize
){
this
.
_stageSize
=
getStageSize
();
}
return
this
.
_stageSize
;
}
onCreate
()
{
super
.
onCreate
();
...
...
@@ -20,8 +28,6 @@ export default class FullStageSize extends ScillaComponent {
onAwake
()
{
super
.
onAwake
();
this
.
stageSize
=
getStageSize
();
this
.
execute
();
}
...
...
@@ -33,6 +39,12 @@ export default class FullStageSize extends ScillaComponent {
}
}
onEditorUpdate
(
t
)
{
super
.
onEditorUpdate
(
t
);
this
.
execute
();
}
execute
()
{
const
{
width
,
height
}
=
this
.
stageSize
;
...
...
src/registerAllComponents.ts
View file @
542cf045
...
...
@@ -14,6 +14,7 @@ import Transform from './base/Transform';
import
CameraController
from
'./other/CameraController'
;
import
ContentSizeFitter
from
'./other/ContentSizeFitter'
;
import
RelativeLayout
from
'./other/RelativeLayout'
;
import
FullStageSize
from
'./other/FullStageSize'
;
import
CircleRenderer
from
'./renderer/CircleRenderer'
;
import
FrameAnimationRenderer
from
'./renderer/FrameAnimationRenderer'
;
import
GraphicRenderer
from
'./renderer/GraphicRenderer'
;
...
...
@@ -41,6 +42,7 @@ export function registerAllComponents(){
registerDef
(
'components/other/CameraController'
,
CameraController
);
registerDef
(
'components/other/ContentSizeFitter'
,
ContentSizeFitter
);
registerDef
(
'components/other/RelativeLayout'
,
RelativeLayout
);
registerDef
(
'components/other/FullStageSize'
,
FullStageSize
);
registerDef
(
'components/renderer/CircleRenderer'
,
CircleRenderer
);
registerDef
(
'components/renderer/FrameAnimationRenderer'
,
FrameAnimationRenderer
);
registerDef
(
'components/renderer/GraphicRenderer'
,
GraphicRenderer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment