etiennepinchon / magixjs Goto Github PK
View Code? Open in Web Editor NEWMagiXJS Framework
Home Page: https://magixjs.com
License: Other
MagiXJS Framework
Home Page: https://magixjs.com
License: Other
Just wanted to make sure you had links to the documentation on the website!
I noticed it's in the bottom right corner. But I think it should be more apparent so I can learn how to use this tool!
Cool project!
https://magixjs.com/ -> NET:ERR_CERT_DATE_INVALID
Site loads fine if I bypass warnings ๐
I have a view that when it's tapped, it does something, but when it's long-pressed, it enables dragging. The tap event isn't working with the drag constraints. Nothing happens when tapped under these conditions:
# Imports
Font 'Roboto', '500,400,300'
# Starting Vars & Functions
lights = false
lightLevel = 0
longPress = false
screen =
height: App.height
width: App.height*(17/30)
if App.height*(17/30)-1 > App.width
screen =
height: App.width*(30/17)
width: App.width
globalConvertX = (x) ->
return x*(screen.height/300)
globalConvertY = (x) ->
return x*(screen.width/170)
# Create page
App.page = new Page
backgroundColor: '#0F0F3B'
# Object Background View
background = new View
width: globalConvertY(120)
height: globalConvertX(250)
backgroundColor: white
borderRadius: globalConvertX(5)
shadowY: globalConvertY(3)
shadowBlur: globalConvertX(6)
shadowColor: 'rgba(0,0,0,0.4)'
background.center()
background.clip = yes
# Slider View
slider = new View
width: globalConvertY(140)
height: globalConvertX(33)
backgroundColor: '#40BFC9'
borderRadius: globalConvertX(4)
shadowY: globalConvertY(3)
shadowBlur: globalConvertX(6)
shadowColor: 'rgba(0,0,0,0.4)'
transition:
duration: 0.2
curve: 'cubic-out'
slider.centerX()
slider.clip = yes
slider.y = globalConvertY(222)
slider.draggable.enabled = no
slider.draggable.horizontal = no
slider.draggable.vertical = yes
slider.draggable.momentumOptions =
friction: 15
slider.draggable.overdragScale = 0.1
slider.draggable.constraints =
y: (App.height - (globalConvertX(250) - globalConvertY(40)))/2
height: globalConvertX(250) - globalConvertY(40)
width: App.widths
slider.draggable.bounceOptions =
friction: 25
tension: 300
slider.draggable.directionLock = yes
slider.draggable.directionLockThreshold =
y: 0
x: 1000
# Event Listening
background.onTap (event) ->
if lights == true
lights = false
lightLevel = 100
else
lights = true
lightLevel = 0
slider.animate
y: globalConvertY((lightLevel*1.77)+45)
time: 0.2
curve: 'spring(300, 25)'
slider.onLongPress (event) ->
slider.draggable.enabled = yes
slider.animate
shadowY: globalConvertY(6)
shadowBlur: globalConvertX(12)
shadowColor: 'rgba(0,0,0,0.5)'
time: 0.15
curve: 'cubic-out'
slider.onLongPressEnd (event) ->
slider.draggable.enabled = no
slider.animate
shadowY: globalConvertY(3)
shadowBlur: globalConvertX(6)
shadowColor: 'rgba(0,0,0,0.4)'
time: 0.15
curve: 'cubic-out'
slider.onTap (event) ->
if lights == true
lights = false
lightLevel = 100
else
lights = true
lightLevel = 0
slider.animate
y: globalConvertY((lightLevel*1.77)+45)
time: 0.2
curve: 'spring(300, 25)'
If you remove the drag constraints, it works just fine, but I need the constraints. What's not working?
When I visit magixjs.com I don't see how or where to use this
Love the documentation but 1 or 2 tutorials would make it even better!
Love this project and I'm looking forward to using this!
Keep up the good work ๐ฅ
When I make a change on files I get this error, is there a way to correct it ?
{ Error: ENOENT: no such file or directory, open 'C:\C:\Users\yassi\test\documents\App.coffee' }
LiveScript is a CoffeeScript dialect and it has more functional syntax than CoffeeScript.
Tried this
myText = new Text
text: 'Hello'
fontSize: 64
color: black
Below Phone, myText
fontSize: 32
color: 'red'
dis not work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.